Sophie

Sophie

distrib > Mandriva > 2010.2 > x86_64 > by-pkgid > a58d85af59edf7fb701c73ea3ce1c5aa > files > 46

hevea-1.10-4mdv2010.0.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>

<META http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<META name="GENERATOR" content="hevea 1.10">
<META name="Author" content="Luc Maranget">
<LINK rel="stylesheet" type="text/css" href="manual.css">
<TITLE>Commands and Environments</TITLE>
</HEAD>
<BODY >
<A HREF="manual022.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
<A HREF="manual024.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
<HR>
<H2 CLASS="section"><A NAME="htoc56">B.1</A>&#XA0;&#XA0;Commands and Environments</H2><UL>
<LI><A HREF="manual023.html#toc43">Command Names and Arguments</A>
</LI><LI><A HREF="manual023.html#toc44">Environments</A>
</LI><LI><A HREF="manual023.html#toc45">Fragile Commands</A>
</LI><LI><A HREF="manual023.html#toc46">Declarations</A>
</LI><LI><A HREF="manual023.html#toc47">Invisible Commands</A>
</LI><LI><A HREF="manual023.html#toc48">The <TT>\\</TT> Command</A>
</LI></UL>
<H3 CLASS="subsection"><A NAME="toc43"></A><A NAME="htoc57">B.1.1</A>&#XA0;&#XA0;Command Names and Arguments</H3><P>L<sup>A</sup>T<sub>E</sub>X comments that start with &#X201C;<CODE>%</CODE>&#X201D; and end at end of line are ignored and produce no output.
Usually, H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A ignore such comments. However, H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A processes
text that follows &#X201C;<CODE>%HEVEA</CODE>&#X201D; and some other comments have a specific meaning to it (see
section&#XA0;<A HREF="manual007.html#comments">5.3</A>).</P><P><A NAME="@default141"></A>
Command names follow strict L<sup>A</sup>T<sub>E</sub>X syntax. That is, apart from
<CODE>#</CODE>, <CODE>$</CODE>, <CODE>~</CODE>, <CODE>_</CODE> and <CODE>^</CODE>, they either are
&#X201C;<CODE>\</CODE>&#X201D; followed by a single non-letter character or
&#X201C;<CODE>\</CODE>&#X201D; followed by a sequence of letters.
Additionally, the letter sequence may be preceded by &#X201C;<CODE>@</CODE>&#X201D;
(and this is the case of many of H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A internal commands), or
terminated by &#X201C;<CODE>*</CODE>&#X201D; (starred variants are implemented as plain
commands).</P><P>Users are strongly advised to follow strict L<sup>A</sup>T<sub>E</sub>X syntax for
arguments. That is, mandatory arguments are enclosed in curly braces
<CODE>{</CODE>&#X2026; <CODE>}</CODE> and braces inside arguments must be properly
balanced.
Optional arguments are enclosed in square brackets <CODE>[</CODE>&#X2026;
<CODE>]</CODE>.
However, H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A does its best to read arguments even when they are
not enclosed in curly braces.
Such arguments are a single, different from &#X201C;<CODE>\</CODE>&#X201D;, &#X201C;<CODE>{</CODE>&#X201D;
and &#X201C;<CODE> </CODE>&#X201D;, character or
a command name.
Thus, constructs such as <CODE>\'ecole</CODE>,
<CODE>$a_1$</CODE> or <CODE>$a_\Gamma$</CODE> are
recognized and processed as &#XE9;cole <I>a</I><SUB>1</SUB> and <I>a</I><SUB>&#X393;</SUB>.
By contrast, <CODE>a^\mbox{...}</CODE> is not recognized
and must be written <CODE>a^{\mbox{...}}</CODE>.</P><P>Also note that, by contrast with L<sup>A</sup>T<sub>E</sub>X, comments are parsed during
argument scanning, as an important consequence brace nesting is also
checked inside comments.</P><P><A NAME="@default142"></A>
<A NAME="@default143"></A>
With respect to previous versions,
H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A has been improved as regards emulation of complicated
argument passing. That is,
commands and their arguments can now appear in
different static text bodies. As a consequence,
H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A correctly processes the following source:
</P><PRE CLASS="verbatim">\newcommand{\boite}{\textbf}
\boite{In bold}
</PRE><P>The definition of <CODE>\boite</CODE> makes it reduces as
<CODE>\textbf</CODE> and H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A succeeds in fetching the argument
&#X201C;<CODE>{In bold}</CODE>&#X201D;. We get
</P><BLOCKQUOTE CLASS="quote"><HR NOSHADE SIZE=1 ALIGN=center>

<B>In bold</B>
<HR NOSHADE SIZE=1 ALIGN=center></BLOCKQUOTE><P>The above example arguably is no &#X201C;legal&#X201D; L<sup>A</sup>T<sub>E</sub>X,
but H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A handles it.
Of course, there remains
numerous &#X201C;clever&#X201D; L<sup>A</sup>T<sub>E</sub>X tricks that exploits T<sub>E</sub>X internal
behavior, which H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A does not handle.
For instance consider the following source:
</P><PRE CLASS="verbatim">\newcommand{\boite}[1]{\textbf#1}
\boite{{In bold}, Not in Bold.}
</PRE><P>L<sup>A</sup>T<sub>E</sub>X typesets the text &#X201C;In bold&#X201D; using bold font, leaving
the rest of the text alone. While H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A typesets everything using
bold font. Here is H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A output:
</P><BLOCKQUOTE CLASS="quote"><HR NOSHADE SIZE=1 ALIGN=center>

<B>In bold, Not in Bold.</B>
<HR NOSHADE SIZE=1 ALIGN=center></BLOCKQUOTE><P>
Note that, in most similar situations, H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A will likely crash.</P><P>As a conclusion of this important section,
Users are strongly advised to use ordinary command names and
curly braces and not to think too much the T<sub>E</sub>X way.</P><H3 CLASS="subsection"><A NAME="toc44"></A><A NAME="htoc58">B.1.2</A>&#XA0;&#XA0;Environments</H3><P>Environment opening and closing is performed like in L<sup>A</sup>T<sub>E</sub>X, with
<CODE>\begin{</CODE><I>env</I><CODE>}</CODE> and
<CODE>\end{</CODE><I>env</I><CODE>}</CODE>.
The <CODE>*</CODE>-form of an environment is a plain environment.</P><P>It is not advised to use <CODE>\</CODE><I>env</I> and
<CODE>\end</CODE><I>env</I> in place of <CODE>\begin{</CODE><I>env</I><CODE>}</CODE> and
<CODE>\end{</CODE><I>env</I><CODE>}</CODE>.</P><H3 CLASS="subsection"><A NAME="toc45"></A><A NAME="htoc59">B.1.3</A>&#XA0;&#XA0;Fragile Commands</H3><P>
Fragile commands are not relevant to H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A and <CODE>\protect</CODE> is
defined as a null command.</P><H3 CLASS="subsection"><A NAME="toc46"></A><A NAME="htoc60">B.1.4</A>&#XA0;&#XA0;Declarations</H3><P>
Scope rules are the same as in L<sup>A</sup>T<sub>E</sub>X.</P><H3 CLASS="subsection"><A NAME="toc47"></A><A NAME="htoc61">B.1.5</A>&#XA0;&#XA0;Invisible Commands</H3><P>
I am a bit lost here. However spaces in the output should correspond
to users expectations. Note that, to H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A being
invisible commands is a static property attached to command name.</P><H3 CLASS="subsection"><A NAME="toc48"></A><A NAME="htoc62">B.1.6</A>&#XA0;&#XA0;The <TT>\\</TT> Command</H3><P>The <CODE>\\</CODE> and <CODE>\\*</CODE> commands are the same, they perform a
line break, except inside arrays where they end the current row.
Optional arguments to <CODE>\\</CODE> and <CODE>\\*</CODE> are ignored.</P><HR>
<A HREF="manual022.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
<A HREF="manual024.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>