CTAN Comprehensive TeX Archive Network

CTAN up­date: bool­expr

Date: Au­gust 31, 2009 7:40:38 AM CEST
This up­date should within a day be at your lo­cal mir­ror. Jim Hef­feron Saint Michael's Col­lege .................................................................................. The fol­low­ing in­for­ma­tion was pro­vided by our fel­low con­trib­u­tor: Name of con­tri­bu­tion: bool­expr Ver­sion num­ber: 2.9 Author's name: Florent CHERVET Lo­ca­tion on CTAN: /macros/la­tex/con­trib/bool­expr/ Sum­mary de­scrip­tion: purely ex­pand­able boolean ex­pres­sions and switch (eTeX) [v2.9 2008/08/31] Li­cense type: lppl An­nounce­ment text:
Test­ing val­ues of coun­ters re­quired \num­ber of \nu­m­expr : \bool­expr{\num­ber\value{myCounter}=5} Now num­ber is no more re­quired be­fore \value. \switch has an op­tional ar­gu­ment (and re­mains purely ex­pand­able...): eg: \switch[\value{myCounter}] \case{=0}... \case{<10}... \case{<=12}... \oth­er­wise...... \endswitch Doc­u­men­ta­tion up­dated.
This pack­age is lo­cated at http://tug.ctan.org/tex-archive/macros/la­tex/con­trib/bool­expr/ . More in­for­ma­tion is at http://tug.ctan.org/pkg/bool­expr (if the pack­age is new it may take a day for that in­for­ma­tion to ap­pear). We are sup­ported by the TeX Users Group http://www.tug.org . Please join a users group; see http://www.tug.org/user­groups.html .

bool­expr – A boolean ex­pres­sion eval­u­a­tor and a switch com­mand

The \bool­expr macro eval­u­ates boolean ex­pres­sions in a purely ex­pand­able way.

\bool­expr{ A \OR B \AND C } ex­pands to 0 if the log­i­cal ex­pres­sion is TRUE. A, B, C may be: nu­meric ex­pres­sions such as: x=y, x<>y, x>y or x<y; – boolean switches: \iftrue 0\else 1\fi;
– con­di­tion­als: \ifc­sname what­sit\end­c­sname 0\else 1\fi;
– an­other \bool­expr: \bool­expr{ D \OR E \AND F }:

\bool­expr may be used with \if­case:
  \if­case\bool­expr{ A \OR B \AND C }
    What to do if true
  \else
    What to do if false
  \fi

The \switch com­mand (which is also ex­pand­able) has the form:
\switch
\case{<boolean ex­pres­sion>} ...
\case{<boolean ex­pres­sion>} ...
... \oth­er­wise ...
\endswitch

Pack­agebool­expr
Ver­sion3.14
Copy­right2009 Florent Chervet
Main­tainerFlorent Chervet

An­nounce­ments

more

Guest Book Sitemap Contact Contact Author