CTAN Comprehensive TeX Archive Network

CTAN update: boolexpr

Date: April 12, 2010 10:43:21 AM CEST
the daemon stirs from his slumbers, and proclaimsL > The following information was provided by the package's contributor. > > Name of contribution: boolexpr > Author's name: Florent CHERVET > Location on CTAN: /tex-archive/macros/latex/contrib/boolexpr/ > Summary description: purely expandable boolean expressions and switch (eTeX) > License type: lppl > > Announcement text given by the package's contributor: > ---------------------------------------------------------------------- > etoolbox (v1.9 2010-04-10) now defines a \ifboolexpr macro > (which is not purely expandable). > \ifboolexpr was used to be defined by boolexpr.sty > > Fix has been done to be able to use boolexpr and purely > expandable \ifboolexpr. thanks for that. i've installed the new version, and updated the catalogue source repository. > Users may view the package catalogue entry at > http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/boolexpr.html > or they may browse the package directory at > http://www.tex.ac.uk/tex-archive/macros/latex/contrib/boolexpr/ and of course, the catalogue entry will change, minutely, overnight tonight. Robin Fairbairns For the CTAN team

boolexpr – A boolean expression evaluator and a switch command

The \boolexpr macro evaluates boolean expressions in a purely expandable way.

\boolexpr{ A \OR B \AND C } expands to 0 if the logical expression is TRUE. A, B, C may be: numeric expressions such as: x=y, x<>y, x>y or x<y;
– boolean switches: \iftrue 0\else 1\fi;
– conditionals: \ifcsname whatsit\endcsname 0\else 1\fi;
– another \boolexpr: \boolexpr{ D \OR E \AND F }:

\boolexpr may be used with \ifcase:

        \ifcase\boolexpr{ A \OR B \AND C }
           What to do if true
        \else
           What to do if false
        \fi
      

The \switch command (which is also expandable) has the form:

      \switch
      \case{<boolean expression>} ...
      \case{<boolean expression>} ...
      ...
      \otherwise ...
      \endswitch
    

Packageboolexpr
Version3.14
Copyright2009 Florent Chervet
MaintainerFlorent Chervet

Announcements

more

Guest Book Sitemap Contact Contact Author