And what does the following sentence mean?
\newif\ifCAST@typeinfo \CAST@typeinfotrue
Thank you!
A full overview of more or less every bit of information is
http://www.ctan.org/tex-archive/info/
: I am a new user of latex. I can't understand what does the command
: "\newif" mean?
This one is a TeX primitive and not limited to LaTeX. The full documentation
for that can be found in the TeX Book by Donald Knuth.
\newif does what its name suggests: it creates a new conditional, or Boolean
toggle. The following example shows it:
\newif\ifLastname
\Lastnamefalse
My last name is \ifLastname Corff\else C.\fi, my first name is Oliver.
% prints:
% My last name is C., my first name is Oliver.
\Lastnametrue
My last name is \ifLastname Corff\else C.\fi, my first name is Oliver.
% prints:
% My last name is Corff, my first name is Oliver.
: And what does the following sentence mean?
: \newif\ifCAST@typeinfo \CAST@typeinfotrue
A Boolean \ifCAST@typeinfo is created which is then declared as true.
This 'sentence' actually is a sequence of two statements, not one.
Oliver.
--
Dr. Oliver Corff e-mail: co...@zedat.fu-berlin.de
Also note that the @ symbol is used to make "private" commands.
Normally, if you type \ifCAST@typeinfo (or anything else with an @ in
it), TeX will complain as the at symbol is not a letter (and so not
allowed in command names). You can only use private commands inside
packages (.sty files) or by doing:
\makeatletter
Private commands here
\makeatother
Joseph Wright
It is not a TeX "primitive" in the sense of being built into TeX.
It is a defined command and is, in fact, defined slightly
differently in plainTeX , LaTeX and conTeXt (and possibly other
formats).
All, however, have exactly the same effect: \newif\ifXXX
creates three new commands:
\ifXXX, \XXXtrue, and \XXXfalse
The first is initialized with \let\ifXXX\iffalse.
The second has the meaning "\let\ifXXX\iftrue" and the
last has the meaning "\let\ifXXX\iffalse".
Dan
: Oliver <co...@zedat.fu-berlin.de> wrote:
: > This one is a TeX primitive and not limited to LaTeX. The full documentation
: > for that can be found in the TeX Book by Donald Knuth.
: It is not a TeX "primitive" in the sense of being built into TeX.
: It is a defined command and is, in fact, defined slightly
: differently in plainTeX , LaTeX and conTeXt (and possibly other
: formats).
Sorry for getting this one wrong; I was somehow convinced that it was
built-in. Haven't had a look at the files for too long time.