home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.univie.ac.at!scsing.switch.ch!univ-lyon1.fr!ghost.dsi.unimi.it!rpi!usc!news.service.uci.edu!unogate!mvb.saic.com!info-tex
- From: Martin Ward <Martin.Ward@durham.ac.uk>
- Newsgroups: comp.text.tex
- Subject: Re: Problems with false conditionals
- Message-ID: <AA10629.9301270942.ws-csm3@uk.ac.durham>
- Date: Wed, 27 Jan 93 09:42:08 GMT
- Organization: Info-Tex<==>Comp.Text.Tex Gateway
- X-Gateway-Source-Info: Mailing List
- Lines: 31
-
- Michael Barr writes:
-
- > The following four lines cause an error:
- > \iffalse
- > \newif\iftest
- > \fi
- > \bye
- >
- > On the other hand, these four don't:
- > \iftrue
- > \newif\iftest
- > \fi
- > \bye
- >
- ...
- >
- > I think the correct explanation is really the same
- > thing that led me to this kludge in the first place: the parser sees
- > \ifnnull as an \if, even when it is just being defined. But it does not
- > see it as an \if when it is just a control sequence.
-
- This is the answer - when skipping conditional text. TeX is in "fast" mode,
- and does not expand macros - including the \newif macro (naturally - imagine
- you had previously defined \def\foobar{\newif} - why should TeX know that
- it has to expand \foobar? What if the _definition_ of \foobar was in the
- conditional text).
-
- So all your \newif declarations must come _outside_ all \if nesting.
-
- Martin.
-
-