Previous Next Contents

B.1  Commands and Environments

B.1.1  Command Names and Arguments

LATEX comments, that start with ``%'' and end at end of line are ignored and produce no output.

Command names follow strict LATEX syntax. That is, apart from #, $, ~, _ and ^, they either are ``\'' followed by a single non-letter character or ``\'' followed by a sequence of letters. Additionally, the letter sequence may either be preceded by ``@'' (and this is the case of many of HEVEA internal commands), or terminated by ``*'' (starred variants are implemented as plain commands).

Users are strongly advised to follow strict LATEX syntax for arguments. That is, mandatory arguments are enclosed in curly braces {... } and braces inside arguments must be properly balanced. Optional arguments are enclosed in square brackets [... ]. However, HEVEA does its best to read arguments even when they are not enclosed in curly braces. Such arguments are a single, different from ``\'', ``{'' and `` '', character or a command name. Thus, constructs such as \'ecole, $a_1$ or $a_\Gamma$ are recognized and processed as ``école'' ``a1'' and ``aG''. Note that, by contrast with LATEX, comments are parsed during argument scanning, as an important consequence brace nesting is also checked inside comments.

Another important restriction is that command names must appear followed by all their arguments, in the same static body of text. As a consequence, the following definition is dangerous:
\newcommand{\boite}{\textbf}
In the command application \boite{text}, the command \textbf and its argument text do not appear in the same static body of text. A sure definition is:
\newcommand{\boite}[1]{\textbf{#1}}
Note that this restriction is not that absolute, source that does not follow it may work as expected or not.

B.1.2  Environments

Environment opening and closing is performed like in LATEX, with \begin{env} and \end{env}. The *-form of an environment is a plain environment.

It is not advised to use \env and \endenv in place of \begin{env} and \end{env}.

B.1.3  Fragile Commands

Fragile commands are not relevant to HEVEA and \protect is defined as a null command.

B.1.4  Declarations

Scope rules are the same as in LATEX.

B.1.5  Invisible Commands

I am a bit lost here. However spaces in the output should correspond to users expectations. Note that, to HEVEA being invisible commands is a static property attached to command name.

B.1.6  The \\ Command

The \\ and \\* commands are the same, they perform a line break, except inside arrays where they end the current row. Optional arguments to \\ and \\* are ignored.


Previous Next Contents