<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="José Grimm" />
<title>Tralics, a LaTeX to XML translator; Part I</title>
<link rel="stylesheet" href="tralics.css" />
<meta name="keywords" content="Latex, XML, HTML, MathML, Perl, PostScript, Pdf" />
</head><body><h1>Tralics, a LaTeX to XML translator; Part I</h1><p>French title: Tralics, un traducteur de LaTeX vers XML; Partie I</p><p> Author: José Grimm<a id="uid1" href="#note1" title="Email: Jose.Grimm@sophia.inria.fr"><small>(note: </small>&#10163;<small>)</small></a></p><p> Location: Sophia Antipolis &#8211; Méditerranée</p><p>Inria Research Theme: THnum</p><p>Inria Research Report Number: 309</p><p>Revision: 3</p><p> Team: Apics</p><p> Date: September 2005</p><p>Revised Date: April 2008</p><p>Keywords: Latex, XML, HTML, MathML, Perl, PostScript, Pdf.</p><p>French keywords: Latex, XML, HTML, MathML, Perl, PostScript, Pdf.</p><h2>Abstract</h2><p>In this paper we describe <span class="sansserif">Tralics</span>, a LaTeX to <span class="sansserif">XML</span> translator.
A previous version of the software (written in Perl) was used to obtain
the Pdf version of Inria´s &#8220;Rapport d´Activité&#8221; for year 2001. The
current version of the software (written in C++) is used for both the <span class="sansserif">HTML</span> and
Pdf version since year 2002: the <span class="sansserif">XML</span> generated by <span class="sansserif">Tralics</span> is conforming
to a local <span class="sansserif">DTD</span>, similar to the TEI; it is converted to Pdf via pdfTeX and
the <tt>xmltex</tt> package, and the <span class="sansserif">HTML</span> via a xslt processor.</p>
<p>We explain here the philosophy of the software, its usage, its limitations,
and how to customize it. All commands defined by <span class="sansserif">Tralics</span> are explained in
this document, for most of them, we give an example of use. The index lists
all commmands, environments, and options.</p>
<p>Version 2 of this document holds additions for <span class="sansserif">Tralics</span> 2.9.
Version 3 of this document holds additions for <span class="sansserif">Tralics</span> 2.12.</p>
<h2>French Abstract</h2><p>Dans cet article nous décrivons le logiciel <span class="sansserif">Tralics</span>, un traducteur de LaTeX vers <span class="sansserif">XML</span>. Une version antérieure de ce logiciel, écrite en Perl, a été
utilisée pour générer la version Pdf du Rapport d´activité de l´Inria en 2001.
La version actuelle du logiciel, écrite en C++, a été utilisée pour
obtenir à la fois le <span class="sansserif">HTML</span> et le Pdf depuis 2002 : nous avons utilisé
une <span class="sansserif">DTD</span> locale, similaire à la TEI, et pdfTeX plus <tt>xmltex</tt> pour
obtenir le Pdf.</p>
<p>Nous expliquons ici la philosophie de <span class="sansserif">Tralics</span>, son usage, ses limitations,
et comment paramétrer le logiciel. Toutes les commandes définies par <span class="sansserif">Tralics</span>,
sont expliquées, pour la plupart d´entre elles on donne un exemple
d´utilisation. Un index regroupe l´ensemble des commmandes, environnements et
options.</p>
<p>La version 2 de ce document contient des mises à jour pour <span class="sansserif">Tralics</span> 2.9.
La version 3 de ce document contient des mises à jour pour <span class="sansserif">Tralics</span> 2.12.</p>
<hr /><h1>Short Table of Contents</h1><p>
<br /><b>1. <a href="#cid1">Introduction</a></b>
<br /><b>2. <a href="#cid2">Expansion</a></b>
<br /><b>3. <a href="#cid3">Mathematics</a></b>
<br /><b>4. <a href="#cid4">Translating a bibliography</a></b>
<br /><b>5. <a href="#cid5">Other commands</a></b>
<br /><b>6. <a href="#cid6">Running Tralics</a></b>
<br /><a href="#bibliography"><b>Bibliography</b></a>
<br /><a href="#tableofcontents"><b>Table of Contents</b></a>
<br /><a href="#index1"><b>Index</b></a></p>

<h1 id="cid1">1. Introduction</h1>
<p>The <i>Tralics</i> software was designed as a tool for the Raweb. In this chapter,
we explain some of our motivations.
In the next chapter, we study some TeX commands and explain how they are
handled in the same fashion by <i>Tralics</i>. Following chapters explain some
differences, merely because <span class="sansserif">XML</span> is not dvi. In a final chapter, we explain
how to configurate <i>Tralics</i>. There is a second part, that explains how the
<span class="sansserif">XML</span> files can be used, converted into Pdf or <span class="sansserif">HTML</span>; it describes also the
Raweb <span class="sansserif">DTD</span>. The last chapter of the second part describes additions to the
program made since 2007.</p>
<h2 id="uid2">1.1. A short history of the Raweb</h2>
<p>A short history of the Raweb may be found on the Inria internal web site<a id="uid3" href="#note2" title="See http://www.inria.fr/interne/disc/apropos/chantiers/raweb-xml/histoire.html"><small>(note: </small>&#10163;<small>)</small></a>.
The question concerns Inria´s Annual Activity
Report, also known as &#8220;Rapport d´activité&#8221;, or &#8220;Annexe technique&#8221; to the
RA or &#8220;annexes scientifiques&#8221; to the RA. This is a document, written by the
research teams, at the end of the year <span class="math"><i>N</i></span> (October, November), and published
in March of year <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>N</mi><mo>+</mo><mn>1</mn></mrow></math></span>.</p>
<p>Until the 1993 edition (published in 1994), only a paper version existed.
A LaTeX model was used
since 1987, designed by Jacques André then Martin Jourdan. See the reference
<a href="#bid0" title="Louarn1988">[5]</a>,
by Louarn in the first Cahiers Gutenberg.</p>
<p>In 1993, contacts were made with the Grif S.A. society,
for the design of a
<span class="sansserif">SGML</span> <span class="sansserif">DTD</span> and a LaTeX-to-<span class="sansserif">SGML</span> converter<a id="uid4" href="#note3" title="Grif stands for `GRenoble Interactive Formatter´; further developments of this editor by the Opera t..."><small>(note: </small>&#10163;<small>)</small></a>.
As a result, Philippe Louarn was
able to put on the web the RA (year 1994)
in its <span class="sansserif">HTML</span> version<a id="uid5" href="#note4" title="See http://www.inria.fr/rapportsactivite/RA94/RA94.html"><small>(note: </small>&#10163;<small>)</small></a>.
But this converter was judged too complicated (rules were too strict)
and for several years, the <span class="sansserif">HTML</span> was directly produced from the LaTeX source, using <tt>latex2html</tt>.</p>
<p>In 1996, a working group (conducted by Albert Benveniste) gave new
specifications: independent modules, grouped into ten sections, etc.
A technical group was created (conducted by Gérard Paget), whose objective was
to find a company that could sell a
software (maybe using <span class="sansserif">XML</span> as intermediate language). None was found, but
the design of modules (in LaTeX syntax) was well-defined by Laurent Pierron
and José Grimm with the aid of Marie-Pierre Durollet and Jean-Claude Le Moal.
For the Ra98, a Perl script did some preprocessing, splitting
the LaTeX source into modules (one module per <span class="sansserif">HTML</span> page). The author
wishes to thank all these people (including A. Quadrat), who gave him the idea
to work on LaTeX and write a translator.</p>
<p>In 1999, the Scientific Annexes to Inria´s Annual Report were renamed
RAWEB, to emphasize the role played by the Web (it is available as a CD-Rom,
but no more printed by Inria).</p>
<p>In 2001, the Perl scripts mentioned above evolved into a LaTeX-to-<span class="sansserif">XML</span> converter (some ideas were borrowed from <tt>latex2html</tt>, which is also a
Perl script). The main trouble was conversion from <span class="sansserif">XML</span> to Pdf, and we used
tools from the TeX community (by S. Rahtz and D. Carlisle <a href="#bid1" title="Carlisle, Goossens, Rahtz2000">[1]</a>) and pdfLaTeX.
On the other hand, the images in the <span class="sansserif">HTML</span> files were converted by
<tt>latex</tt>.
Additional software (for creation on a global index, etc.)
was written/used by Marie-Pierre Durollet.</p>
<p>This gave a complicated object: a Perl script, that converts a LaTeX file into <span class="sansserif">XML</span> (using Omega as a subprocess for the math) followed by another
Perl script that extracts the math, calls <tt>latex</tt>, then
<tt>dvips</tt>, then <tt>pstoimg</tt> (a Perl script that calls
<tt>ppmquant</tt>, <tt>pnmcrop</tt>, and so forth, whose job is to
produce a <span class="sansserif">png</span> image for the math formula), and finally an XSLT processor
for the effective conversion. This became even more complicated in 2004, where
a new <span class="sansserif">DTD</span> was introduced (designed by Bruno Marmol and people mentioned above),
hence a <span class="sansserif">XML</span>-to-<span class="sansserif">XML</span> translator.
See Figure <a href="#uid6">1</a>.</p>
<table style="caption-side:bottom" width="80%" id="uid6"><caption><strong>Figure 1. </strong><i>A diagram that explains how the Raweb operates</i>. Rectangular boxes contain
tools, diamond-shape boxes are style sheets, and circles contain language
names. The name <span class="sansserif">XML</span> is in a double circle, it is the central object;
the arrow labeled `D4´ that connects it to itself indicates conversion from
one <span class="sansserif">DTD</span> to the other, used in 2004.
The box containing `em´ represents the
Perl script <tt>extract-math.pl</tt> that handles the math formulas; it uses tools
borrowed from <tt>latex2html</tt>. The diagram is written in `pgf´, a format
that <i>Tralics</i> cannot interpret yet.</caption><tbody align="center"><tr><td><img src="xml-route2.png" alt="xml-route2" /></td></tr></tbody></table>

<h2 id="uid7">1.2. Birth of Tralics</h2>
<p>The big Perl script was rewritten as a C++ translator, renamed
<i>Tralics</i>, and got (for version 1.6) a first IDDN<a id="uid8" href="#note5" title="InterDepositDigitalNumber = IDDN.FR.001.510030.001.S.P.2002.000.31235 is the IDDN for version 2.9.4,..."><small>(note: </small>&#10163;<small>)</small></a>
number in December 2002.
This software was still able to produce a LaTeX preview of the Raweb:
The source is read, the syntax is tested, a LaTeX file is written
for each module, <tt>latex</tt> and <tt>bibtex</tt> are called,
the resulting dvi is converted to PostScript. But the same <i>Tralics</i> can be used
in a different way: the source is read, the syntax is tested, an <span class="sansserif">XML</span> file is created,
an XSLT processor is called to generate the XSL/Format, and <tt>pdflatex</tt>
generates the Pdf (you can also generate an <span class="sansserif">HTML</span> version).</p>
<p>Since 2003, there are a few people writing their RA directly in
<span class="sansserif">XML</span>. As a consequence, the new <i>Tralics</i>, that is used in 2004,
does only the bare minimum: it converts the LaTeX code into <span class="sansserif">XML</span> code.
There is a Perl script that does everything else
(calling external programs like
<tt>latex</tt>, <tt>xsltproc</tt>, etc). A non-obvious point concerns the
math and the images. For the math, see above;
for the images, a Perl script (the same as above)
is used for conversion from PostScript to <span class="sansserif">png</span>. In some cases, the image
already exists in <span class="sansserif">png</span> format and it is unwise to re-create it.</p>
<p>In 2007, the name of the Raweb changed; it is now RalyX. Here is a quote
from the Web page:</p>
<p>The objective of the RalyX<a id="uid9" href="#note6" title="Web site is http://ralyx.inria.fr"><small>(note: </small>&#10163;<small>)</small></a>
project was to publish and exploit dynamically the
annual INRIA activity reports; Ralyx is based on the
Xylème<a id="uid10" href="#note7" title="Web site is http://www.xyleme.com"><small>(note: </small>&#10163;<small>)</small></a>
system, a native
<span class="sansserif">XML</span> database. Xylème stores the <span class="sansserif">XML</span> version of the activity reports and
supports queries to the reports involving both their structure and their
content.</p>
<p>The first objective was to offer a tool for browsing the activity report with
the same interface as the legacy <span class="sansserif">HTML</span> version. However, thanks to Xylème,
pages and links are no longer statics, but computed on the fly, which can
offer more flexibility in the future (different styles of display, editing
along the year, etc).</p>

<h2 id="uid11">1.3. Main objectives</h2>
<p>The main objectives of <i>Tralics</i> are described in
<a href="#bid2" title="Grimm2002">[3]</a>. Recall that we want a program that converts from one
language to another, such that</p>
<ul>
<li id="uid12"><p class="nofirst noindent">the result is easily analyzable,</p>
</li>
<li id="uid13"><p class="nofirst noindent">the structure is preserved,</p>
</li>
<li id="uid14"><p class="nofirst noindent">the translation is univocal.</p>
</li></ul>
<p>By the very choice of the <span class="sansserif">XML</span> language as target, the first objective is
automatically satisfied. The only little problem concerns spaces:<a id="uid15"></a>
in which cases are spaces used as delimiter or as text? The translation
of `<samp>\par&#9251;x{&#9251;}{&#9251;}x\par</samp>´ is
`<tt class="txt">&lt;p&gt;x&#9251;&#9251;&#9251;x&lt;/p&gt;</tt>´, and this is often
interpreted in the same fashion as a single space.</p>
<p>The third item has the following meaning: the translation of `<samp>\foo</samp>´
and `<samp>\bar</samp>´ should be different in case these objects have different meanings
in LaTeX, but should be the same otherwise. One could argue that some
tokens could be translated more than once in a different context (remember
the <samp>\texorpdfstring</samp><a id="uid16"></a>
command). We could imagine special rules for the
bibliography; in fact, in math mode you must use a different function to add
attributes to an element. On the other hand, we have an application where
`<samp>\tt</samp>´<a id="uid17"></a> and `<samp>\bf</samp>´<a id="uid18"></a> are treated alike: in fact, all font information
is removed, by redefining element names.</p>
<p>The important point is preservation of the structure. This means of course
that the initial document has some structure and the target has one
also. Clearly the structure of an <span class="sansserif">XML</span> document is given by its <span class="sansserif">DTD</span>, but this
is completely ignored by <i>Tralics</i>. The first version of the program was very
strict; nowadays, in your document, you can omit the `<samp>\documentclass</samp>´<a id="uid19"></a>,
the `<samp>\begin{document}</samp>´<a id="uid20"></a>, or the `<samp>\end{document}</samp>´.<a id="uid21" href="#note8" title="Put `Hello, word!´ in a tex file, compile, and admire the result!"><small>(note: </small>&#10163;<small>)</small></a></p>
<p>There are some implicit
rules, for instance that `<samp>\section</samp>´<a id="uid22"></a> terminates a `<samp>\subsection</samp>´<a id="uid23"></a>, the
occurrence of a character in vertical mode triggers the start of a <tt class="txt">&lt;p&gt;</tt>
element, etc.</p>
<p>In <a href="#bid2" title="Grimm2002">[3]</a>, we wrote that the document should satisfy three kinds of
of assumptions: some technical assumptions (like: there is no `<samp>\0</samp>´ in the
document), some validity assumptions (the document can be compiled by LaTeX without errors, it respects the rules of the Raweb as given on the web pages),
and more general, unwritten, rules. The current translator is more flexible:
there is no restriction on the syntax of commands, except that null
characters are not allowed, plain TeX documents are translated
(for instance the file <span class="sansserif">xii.tex</span> by D. Carlisle that starts with
<samp>\let~\catcode~`76</samp> and ends with
<samp>Yer.W,:jbye</samp>), and we have an application
where only one part of the document is translated: only code before
`<samp>\maketitle</samp>´ is used. In this document we shall explain these things.</p>

<h2 id="uid24">1.4. Notes on the distribution</h2>
<p>The <i>Tralics</i> software is formed of five different types of files.
On one hand we have the documentation; this is formed of a sequence of
LaTeX documents (like the one you are reading), converted by <i>Tralics</i> into
<span class="sansserif">XML</span> then <span class="sansserif">HTML</span>, together with a sequence of <span class="sansserif">HTML</span> pages that describe all commands,
features, and packages. These files have no explicit Copyright notice (so that
default rules apply). The distribution contains a lots of tools that can be
used for the conversion from <span class="sansserif">XML</span> to <span class="sansserif">XML</span>, <span class="sansserif">HTML</span>, or Pdf, written by various
authors, with different copyright notices.</p>
<p>The <i>Tralics</i> executable can be obtained by compiling the sources; some
precompiled versions are also available. Some configuration files are also
provided (files with extension <span class="sansserif">.tcf</span>, <span class="sansserif">.clt</span>, or
<span class="sansserif">.plt</span>). The binary may contain a path to these auxiliary files, if
this is not the case, the path must be given at runtime to the program.
Sources are distributed according to
the CeCILL Free Software Licensing Agreement. This gives anybody the right to
modify the sources, redistribute the software, and include it (or part of it)
into another Software (see the Copyright Notice for details).</p>
<p>Finally, the distribution contains some test files. These are examples of
source code, and their <span class="sansserif">XML</span> translation. Most of these file compile without
error, but some files test the error handling mechanism. These files are
distributed under the same conditions as the source files, and it is assumed
that whoever changes the sources modifies the test files accordingly.</p>

<h2 id="uid25">1.5. An example</h2>
<p>Let´s consider the following piece of code.</p>
<pre class="latex-code">    $\left [1=2\right\}$ est une \emph{formule de mathématiques}~!
</pre>
<p class="nofirst noindent">You would expect this to be understood by LaTeX as
`<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mfenced xmlns:xlink="http://www.w3.org/1999/xlink" separators="" open="[" close="}"><mn>1</mn><mo>=</mo><mn>2</mn></mfenced></math></span> est une <i>formule de mathématiques</i> !´
but<a id="uid26" href="#note9" title="In the HTML version, the delimiters around 1=2 are not shown if the browser in not in MathML mode"><small>(note: </small>&#10163;<small>)</small></a>
the result is
 `Hello, world!´,
since we have preceded it by this (curious) list of commands</p>
<pre class="latex-code">    \catcode`\$=\active\def$#1~{\catcode`\$=3 Hello, world} %$emacs
</pre>
<p class="nofirst noindent">In TeX, translation depends on a great number of tables, that assign values
to numeric or symbolic quantities. For instance, each character (a number
between 0 and 255) in each font (for instance <samp>\OT1/cmr/m/it/10</samp>)
is associated to its dimensions, ligature informations, etc. Our example
(with a normal dollar sign)
uses three fonts: a math font, an italic font and an upright font. Often,
these tables are read only by TeX, in some other cases a user might look at
them, and sometimes they are designed to be modified. For instance, the slant
value of the current font is in general ignored (except by commands like
`<samp>\emph</samp>´<a id="uid27"></a>). A very important table holds the meaning of commands:
they may be predefined (like `<samp>\left</samp>´<a id="uid28"></a>), defined in a format
(like `<samp>\emph</samp>´), or defined by the user (there are a great number of
mathematicians that define a command named `<samp>\RR</samp>´ for the set of real
numbers).</p>
<p>An important table is the table of category codes. Each character has a
category code, an integer between 0 and 15. For instance, `e´ has category
letter, `é´ has category active (so that it is equivalent to
`<samp>\´e</samp>´)<a id="uid29" href="#note10" title="In reality, this depends on the input encoding. In Tralics, there are very few active characters."><small>(note: </small>&#10163;<small>)</small></a>,
backslash, open brace, close brace and dollar sign are of category 0, 1, 2,
and 3 respectively. A command like `<samp>\left</samp>´ is formed by an introducer (any
character of category 0, its value is irrelevant) and a sequence of letters
(in the example, the space<a id="uid30"></a> that follows is not part of the command, since its
category code is 5; this space will be read again, and ignored, unless its
category code changes; such a change can be triggered by the evaluation of the
command); while a command like `<samp>\}</samp>´ or `<samp>\$</samp>´ is formed of an
introducer and a single non-letter character (when followed by
spaces, these spaces do not disappear). Writing a TeX scanner is easy, the
only difficulty is that category codes can change (for instance, in verbatim
mode). In the example, the tokens are the following: <tt>$</tt><sub>3</sub>
<span style="text-decoration:underline">left</span> <tt>[</tt><sub>12</sub> <tt>1</tt><sub>12</sub> <tt>=</tt><sub>12</sub>
<span style="text-decoration:underline">right</span> <span style="text-decoration:underline">{</span>, etc, <tt>s</tt><sub>11</sub> <tt>}</tt><sub>2</sub>
<tt>~</tt><sub>13</sub> <tt>!</tt><sub>12</sub>.
Note that a closing brace, with default category code is shown as `<tt>}</tt><sub>2</sub>´,
while a command whose name is formed of a closing brace is shown as
<span style="text-decoration:underline">}</span>.
We use underlining in the <span class="sansserif">HTML</span> version, instead of boxing, as in the TeXbook. If you say <samp>\let</samp><samp>\foo</samp><samp>\bar</samp>, and ask <i>Tralics</i> for the meaning of <samp>\foo</samp>, as in <samp>\show</samp><samp>\foo</samp>, it knows the name
`foo´ of the token and its value (this is a command code) and gets the name
`bar´ from a lookup table, and adds the current value of the escape character
in front. If this is the plus sign, you will see <samp>+foo=+bar</samp>.</p>
<p>Parsing an expression means finding for each command its arguments.
In the example, the two active characters <samp>é</samp> and <samp>~</samp> take no argument.
The <samp>\active</samp><a id="uid31"></a> command takes no argument either. The <samp>\emph</samp> command takes
one argument<a id="uid32" href="#note11" title="Since \emph is robust, it takes no argument, but the non-robust command associated to it reads the a..."><small>(note: </small>&#10163;<small>)</small></a>:
a token, or a token list delimited by braces (i.e. characters
with category codes 1 and 2), these braces are not part of the argument. The two commands <samp>\left</samp><a id="uid33"></a> and <samp>\right</samp><a id="uid34"></a> are
special: they want a delimiter, in reality a pointer into a special slot in the
current math font; the argument cannot be delimited by braces. The syntax of
<samp>\catcode</samp><a id="uid35"></a> is more complicated. In fact, it is an instance of
&lt;codename&gt;<a id="uid36" href="#note12" title="We use angle brackets for the formal syntax of   as explained in the book, ."><small>(note: </small>&#10163;<small>)</small></a>,
and &lt;codename&gt;&lt;8-bit number&gt; is something
that can follow <samp>\the</samp><a id="uid37"></a> or be used as &lt;internal integer&gt;,
while a &lt;code assignment&gt;
is &lt;codename&gt; &lt;8-bit number&gt; &lt;equals&gt; &lt;number&gt;.
We shall explain this in details later; the idea is that, depending on the
context, the <samp>\catcode</samp> command returns a value stored in a table or
modifies it.
In the case of</p>
<p class="nofirst noindent">      <samp>\catcode`\$=\active</samp></p>
<p class="nofirst noindent">the &lt;8-bit number&gt;
is the internal internal code of the dollar sign, expressed in the form
`<samp>`\$</samp>´, and the &lt;number&gt; is another character
code<a id="uid38" href="#note13" title="In fact, you should use \active only in the scope of a \catcode, so you can forget that `\active´ ty..."><small>(note: </small>&#10163;<small>)</small></a>.
Expanding a command means (roughly speaking) reading its arguments, and
replacing it with the body of the command (where special markers like
`<samp>#1</samp>´
have been substituted by the value of the arguments). In some cases, internal
tables may be consulted, but they are never modified. Evaluating a command
implies modification of some internal state variables (for instance, a
character can be added to the current character list, or a complete paragraph
split into lines, or a register modified). In this example, the dollar
character becomes magically active: a dollar character is no more read as
<tt>$</tt><sub>3</sub> but as <tt>$</tt><sub>13</sub>.<a id="uid39"></a></p>
<p>The syntax of <samp>\def</samp><a id="uid40"></a> and friends is
&lt;def&gt;&lt;control sequence&gt;&lt;definition text&gt;
where &lt;definition text&gt; is &lt;parameter text&gt;&lt;left brace&gt;&lt;balanced text&gt;&lt;right brace&gt;. In the case of</p>
<p class="nofirst noindent">      <samp>\def$#1~{\catcode`\$=3 Hello, world}</samp></p>
<p class="nofirst noindent">the &lt;control sequence&gt; is the dollar sign (the object to be defined, a
command or, as in this example, an active character),
the &lt;parameter text&gt; is everything before the open brace, here
`<samp>#1~</samp>´, and the
&lt;balanced text&gt; is everything between the braces. Evaluation of
`<samp>\def</samp>´ consists in storing in a table the &lt;parameter text&gt; and the
&lt;balanced text&gt; (TeX stores also a special marker representing the
&lt;left brace&gt;). What happens now when
TeX sees a dollar sign? since this character is active, the definition given
above applies. The &lt;parameter text&gt; explains how to read arguments. In
this case, `<samp>#1~</samp>´ means that there is one argument, everything up to (but not
including) a tilde character. In the case of
`<samp>$\left....$...}~!</samp>´, all
characters are read (except the exclamation point). They are replaced by the
body (no substitution is needed). After that, TeX sees <samp>\catcode</samp> and
evaluates it as before, so that the dollar sign becomes a math shift character
again. The space after the digit 3 disappears, and we are left with
`Hello, word!´. Note: the example is given in French, first in order to show
how 8-bit characters can be used, and also because, in English, there is no
tilde before an exclamation point. In general, when a macro reads a delimited
argument and sees an empty line instead of the delimiter, it signals an error
of the form <i>Runaway argument?
Paragraph ended before $ was complete</i>.</p>
<p>Translation difficulties. There are different kinds of LaTeX to <span class="sansserif">HTML</span>/<span class="sansserif">XML</span> translators. Some, like <tt>gellmu</tt><a id="uid41" href="#note14" title="Generalized Extensible -Like Markup"><small>(note: </small>&#10163;<small>)</small></a> use a syntax of their own; others, like <tt>tex4ht</tt>
use TeX as preprocessor, thus understand the full syntax; there are
translators like <tt>tth</tt> or <tt>hévéa</tt> that use a fixed (and
efficient parser), or like <tt>latex2html</tt> (written in Perl) that use pattern matching,
and global substitutions instead of sequential evaluation. Neither of these
is perfect. We explain in this paper how <i>Tralics</i> deals with a certain number
of problems.</p>

<h2 id="uid42">1.6. Some remarks on the <b>Translation</b></h2>
<p>In LaTeX, commands can be defined in five places:</p>
<ol>
<li id="uid43"><p class="nofirst noindent">In the Pascal source. In this case, the command is a primitive, for
instance `<samp>\def</samp>´ or `<samp>\left</samp>´. No equivalent might exist in the target
language (for instance, you cannot define anything in a <span class="sansserif">XML</span> document, the
result of `<samp>\left</samp>´ is an attribute of the <tt class="txt">&lt;mfenced&gt;</tt> element that
results of the translation of the group implied by <samp>\left</samp>. And what
about <samp>\dump</samp><a id="uid44"></a>?)</p>
</li>
<li id="uid45"><p class="nofirst noindent">In the format file. In this case, the command is defined in a file (for
instance <span class="sansserif">latex.ltx</span>), analyzed by TeX and stored on disk using a
fast retrieval method. For instance, plain TeX, LaTeX, ConTeXt have
their own format file. Both plain TeX and LaTeX define a command named
`<samp>\item</samp>´<a id="uid46"></a>, in a different way, for the same purpose (the LaTeX command must
be used inside a special environment, the plain TeX one can be used
everywhere).</p>
</li>
<li id="uid47"><p class="nofirst noindent">In a class file. A class file defines markup commands for a generic
purpose (a book, an article, a presentation). For a book, you have a
frontmatter, for an article, you can have a title page, in both you have
sections, etc. The class defines also the current font, together with
a lot of dimensions.</p>
</li>
<li id="uid48"><p class="nofirst noindent">In a package. The difference between a class and a package was introduced
by LaTeX2&#1013;. Each document uses a single class, and lots of packages (this
document uses the `report´ class, and the `RR´ package for the look;
it uses `hyperref´ for hyper-links, `amsmath´ for the mathematical examples,
`fancyvrb´ for the verbatim examples, etc.).
Note that the plain TeX format provides a macro <samp>\proclaim</samp><a id="uid49"></a> for theorems, while
the amsmath package provides a command <samp>\newtheorem</samp><a id="uid50"></a> for defining theorems.</p>
</li>
<li id="uid51"><p class="nofirst noindent">In the TeX source, or files included via <samp>\input</samp>. The TeX source
may redefine commands defined earlier; a package may redefine commands from
the class, but should not redefine commands from other packages (i.e., the
order in which packages are loaded should have no importance).</p>
</li></ol>
<p>If one is to design a translator, the question is: which commands to translate?
and how? Our idea is that all TeX primitives should be understood (the
difference between `<samp>\dump</samp>´ and `<samp>\mydump</samp>´ is that you get either an
<i>Unimplemented</i> or <i>Undefined</i> command error), as well as all
standard LaTeX commands; of course all user-defined commands are expanded.
Concerning classes and packages, our model (the Raweb) looks like a report.
There are too many classes and packages for implementing them all. In earlier
versions of the software, commands <samp>\documentclass</samp> <samp>{foo}</samp> or
<samp>\usepackage</samp> <samp>{bar}</samp> did some action if the class foo or the package
bar were known, and were ignored otherwise; we mentioned in the first version
of this document interest in PhD thesis and slides classes, but no progress
have been made in this direction.</p>
<p>In the current version of the software, commands <samp>\documentclass</samp>,
<samp>\usepackage</samp> and all these are fully implemented. However, instead of
reading <span class="sansserif">foo.cls</span> and <span class="sansserif">bar.sty</span>, <i>Tralics</i> reads
<span class="sansserif">foo.clt</span>, and <span class="sansserif">bar.plt</span>. As an example, consider the
<span class="sansserif">makeidx</span> package. The difference between the <span class="sansserif">sty</span> and
<span class="sansserif">plt</span> files is in the
definition of the <samp>\printindex</samp> command. The semantics of this command is:
insert the index here. In the first version of <i>Tralics</i> there was no index,
but nowadays multiple indexes (including glossaries) are allowed; the effect
of the command is to mark a position in the <span class="sansserif">XML</span> tree, if omitted the index
will be put at the end of the document; as a consequence, this cannot be a
user-defined command. On the other hand, the LaTeX code asks to read the content of
the index file (produced by makeindex) via <samp>\@input@</samp>; this a command that,
as <samp>\@input</samp>, is used by LaTeX to read files that may be created after a
first run (files of type aux, toc, bbl, ind, etc.), and is not implemented in
<i>Tralics</i> (you run <i>Tralics</i> only once).</p>
<p>Another feature is worth mentioning. We have shown above some syntax rules;
the source document uses the command <samp>\syntax</samp>, that takes one argument and
put brackets around it; we followed Knuth´s notations and used the character
<samp>\langle</samp>. This produces a math formula with a single character and my
my favourite Web browser (in non-MathML mode) produces an ugly result, so that
a simple less-than sign has been used for the <span class="sansserif">HTML</span> version.
You can define a command <samp>\iftralics</samp> in the same way as <samp>\ifpdf</samp>
(checking for instance that <samp>\tralicsversion</samp> is defined), and write
conditional code (an example will be given later). But we used the opportunity
provided by <i>Tralics</i> that, if your file is <span class="sansserif">myfile.tex</span>,
<span class="sansserif">myfile.ult</span> is read before the TeX source (by <i>Tralics</i>,
and not LaTeX) and this file may contain command redefinitions (of course,
if you want to redefine a not-yet-defined command, some care must be taken).</p>
<p>Let´s assume that <samp>\foo</samp> is a command defined in one of these LaTeX files. Should
it be translated by <i>Tralics</i>? and how? Notice first that a user command is
always expandable, and has to be expanded; only the input stream is affected
by this operation that consists in reading arguments and replacing them by an
instantiated body. On the other hand, evaluation may modify or use
internal tables, which can be implemented differently in our translator than
in TeX (for instance, in pdfTeX, there is a way to re-use an
image). Whenever a command is defined in a style file<a id="uid52" href="#note15" title="Sometimes packages are called style files, because this was the original term, and the extension is .sty."><small>(note: </small>&#10163;<small>)</small></a>, we could use the
LaTeX source. In some cases, for efficiency reasons, we implemented them in
<tt>C++</tt> (for instance, the whole fp package has been re-written).</p>
<p>A typical example is the <samp>\it</samp><a id="uid53"></a> command. This is a non official LaTeX command (see <a href="#bid4" title="Goossens, Mittelbach, Samarin1993">[2]</a>, or <a href="#bid5" title="Mittelbach, Goossens, Braams, Carlisle, Rowley2004">[6, section 7.3.6]</a>): &#8220;it is
legitimate for you to redefine them in a package or in the preamble according
to your personal taste&#8221;. In <i>Tralics</i>, there is no difference
between `<samp>\it</samp>´ and `<samp>\normalfont</samp><samp>\itshape</samp>´<a id="uid54"></a>. What these commands do in LaTeX is rather complex: essentially, some variables are set and `<samp>\selectfont</samp>´<a id="uid55"></a>
is called. These commands are robust: if you use `<samp>\it</samp>´ in a chapter title,
the toc file<a id="uid56" href="#note16" title="writes in this file everything needed to produce a Table of Contents; the content of the file can be..."><small>(note: </small>&#10163;<small>)</small></a>
will contain the name of the command, not the result of the
expansion. Since <i>Tralics</i> does not write anything in a toc file, this
feature is not implemented. Using font changes in a title is not recommended:
look at the table of contents for this section. You will see that the word
`Translation´ is in a different font, although it is the same in the main
document. The command <samp>\texorpdfstring</samp> has been used, otherwise pdfTeX complains with <i>Token not allowed in a PDFDocEncoded string</i>, because
font changes are forbidden in bookmarks.</p>
<p>Consider now a command like <samp>\motscle</samp><a id="uid57"></a>. This is defined by
the Raweb as an environment (you can use it in <i>Tralics</i> only as an
environment) and it expands to something like
`<samp>{\bf mots clés}~</samp>´. We do not
want <i>Tralics</i> to use this expansion. One reason can be that the
post-processor might prefer something like
`<samp>\textbf{Mots clefs}~:</samp>´
(i.e., use
an alternate spelling, use an initial capital, add punctuation, etc). Another
reason is that, since 2003, the Raweb is in English, and the translation
should be an English word. For this reason, the translation of
<samp>\motcles</samp> is <tt class="txt">&lt;keywords&gt;</tt>. The raweb class file contains commands
that should not be translated: for instance, there is a command
<samp>\ra@finpart</samp> whose purpose is to add a period after the last keyword. This
should not be done by the translator, but by the program that will typeset the
<span class="sansserif">XML</span> result.</p>
<p>Some TeX primitives are hard to translate. For instance the <samp>\´</samp> command is
assumed to put an acute accent over a character. It is defined (via an
indirection through font encoding tables) in terms of the
<samp>\accent</samp><a id="uid58"></a> primitive. We could translate <samp>\´</samp> into a Unicode
combining character (U+301, to be placed after the character, see
<a href="#bid6" title="The Unicode Consortium2003">[7, paragraph 7.7]</a>). But in general, we have a construction like
<samp>\´e</samp> which is defined in iso-latin1, this is the Unicode character
&#8220;latin small letter e with acute&#8221;. In the same fashion `<samp>\k a</samp>´ translates to
`<span class="txt">&#261;</span>´, this could produce `<tt class="txt">&amp;aogon;</tt>´, but the actual translation
by <i>Tralics</i> is `<tt class="txt">&amp;#x105;</tt>´. In a previous version of <i>Tralics</i>, a
construction like <samp>\´\^</samp> was
illegal. In the current version, we use a double indirection table. You can
typeset the name Hàn Th&#7871; Thành of the author of pdfTeX, the input is
<samp>Th\´{\^e}</samp>, the <i>Tralics</i> output is <tt class="txt">Th&amp;#x1EBF;</tt>.
If you know the Unicode character value, you can enter it (in <i>Tralics</i> as
<samp>Th</samp><samp>^^^^1ebf</samp> or as <samp>Th\char1EBF</samp>).</p>
<p>A construction like `<samp>\font\myfont=cmt10 at 13pt</samp>´<a id="uid59"></a>
defines a command <samp>\myfont</samp> that can be used as
<samp>{\myfont \char217w}</samp><a id="uid60"></a>. The effect of
this command is to pick up two characters from the font cmt10, scaled by some
ratio (it depends on the &#8220;at&#8221; size of the font), and typeset them. Note
that the font could specify a ligature, so that the result could be a single
character. In any case, the result might look very different from `Ùw´
(for instance LaTeX provides a font containing only lines or circles). In the
current version of <i>Tralics</i>, translation does not depend on the current font.
The only interest of changing the current font with <samp>\font</samp> is that you can
access or modify the internal tables of the font (but no metric file is read
at all by <i>Tralics</i>).</p>
<p>In order to translate font changes correctly, you should define a command, for instance
<samp>\myw</samp>, that uses character w, of the font `myfont´; the command could be
more elaborate (it could look at the slant of the current font and select a
slanted version of the character); the command could then be redefined for
<i>Tralics</i>, either using a Unicode character, for instance <samp>\char"1E09</samp><a id="uid61"></a>
if you want a C with cedilla and acute, or something else if the character is
not defined by Unicode.</p>

<h2 id="uid62">1.7. Category codes and characters</h2>
<p>A category code is an integer between 0 and 16, as explained in the TeXbook;
it is an attribute of a character, as used by the tokenizer.
The codes are used according to the following table.</p>
<ol>
<li id="uid63"><p class="nofirst noindent">A character of category code 1 serves as group delimiter (opening
character), as well as delimiter for macros and token lists. It is
a &lt;left brace&gt; as used in the rules explained above. By default, the
left brace character <samp>{</samp> is the only one with category 1.</p>
</li>
<li id="uid64"><p class="nofirst noindent">A character of category code 2 serves as group delimiter (closing
character), as well as delimiter for macros and token lists. It is
a &lt;right brace&gt; as used in the rules explained above. By default, the
right brace character <samp>}</samp> is the only one with category 2. The end of
`verbatim´ environment is handled by the following piece of code, that shows how
to change the category codes of the three characters mentioned above, and use
alternate characters for the same purpose.</p>
<pre class="latex-code">\begingroup \catcode `|=0 \catcode `[= 1
\catcode`]=2 \catcode `\{=12 \catcode `\}=12
\catcode`\\=12 |gdef|@xverbatim#1\end{verbatim}[#1|end[verbatim]]
|endgroup
</pre>

</li>
<li id="uid65"><p class="nofirst noindent">A character of category 3 serves a math shift character. By default the
dollar character `<samp>$</samp>´
is the only character in this category. The same character can be used to
start and end a formula. Two consecutive character of category code 3 are
used to start or end display math; the characters need not be the same.</p>
</li>
<li id="uid66"><p class="nofirst noindent">A character of category code 4 is used as delimiter in arrays; it
indicates the end of a cell. A typical row in a LaTeX array is
<samp>a&amp;b&amp;c\\</samp>;
in plain TeX, it would finish with <samp>\cr</samp> or <samp>\crcr</samp>. The
<samp>&amp;</samp> character is the only one of category code 4.</p>
</li>
<li id="uid67"><p class="nofirst noindent">A character of category 5 is a end-of-line character. When such a
character is seen, all remaining characters on the current line are ignored.
After that, the reader behaves as if it had seen nothing, a space, or a
<samp>\par</samp> token. In some cases, the <samp>\par</samp> token is invalid. In <i>Tralics</i>,
this space character is special, in that it may print as a new line
character, in TeX, it is a normal space.
By default, only the carriage return character is of category code
5 (this character is inserted at the end of every line, instead of the line
feed, carriage return, or both, that marks the end-of-line in the file).</p>
</li>
<li id="uid68"><p class="nofirst noindent">A character of category 6 can be used as delimiter in a command, or a
table preamble. By default, there is one character of this category, the
`<samp>#</samp>´. A typical array preamble is
`<samp>\indent#\hfil&amp;\quad#\hfil\cr</samp>´ (this is the first example of <samp>\halign</samp> in
the TeXbook. We shall not describe TeX arrays here).</p>
</li>
<li id="uid69"><p class="nofirst noindent">A character of category code 7 is a superscript character; by default,
it is the hat character. Do not confuse it with <samp>\^</samp> that produces an
accent. Such a character can be used only in math mode. There is also the
double hat construction, explained later in section <a href="#uid1866" title="Character encoding">5.1</a>:
two identical characters of
category code 7 can be used to read any 8bit character as in <samp>^^ab</samp>; in
<i>Tralics</i>, a 16 bit character can be read using 4 such characters.</p>
</li>
<li id="uid70"><p class="nofirst noindent">A character of category code 8 (by default the underscore character) can
be used as subscript character; as in the case of superscript characters,
you can use it only in math mode.</p>
</li>
<li id="uid71"><p class="nofirst noindent">A character of category code 9 is ignored. <i>Tralics</i> ignores no
character by default. On the other hand, it cannot put a null character in
a string, so that the null character will not appear in the <span class="sansserif">XML</span> output
(note: the same holds for <samp>\char0</samp> and <samp>^^00</samp>).<a id="uid72"></a></p>
</li>
<li id="uid73"><p class="nofirst noindent">A character of category 10 behaves like a space. By default, space,
tabulation, character 160 behave like this (note that the character 160 is
no-break space, it should be equivalent to <samp>~</samp>).</p>
</li>
<li id="uid74"><p class="nofirst noindent">A character of category code 11 is a letter. By default, only characters
in the range `a´ to `z´ and `A´ to `Z´ are of category 11.</p>
</li>
<li id="uid75"><p class="nofirst noindent">A character of category 12 is an `Other character´. All characters not
listed here are of category 12, including all digits.</p>
</li>
<li id="uid76"><p class="nofirst noindent">A character of category 13 is an active character. Currently, there is
only one active character, the <samp>~</samp>. An error is signaled in the case where
an active character is used, but undefined. <i>Tralics</i> defines
<samp>_</samp>, <samp>#</samp> and <samp>&amp;</samp>, to be the same as <samp>\_</samp>, <samp>\#</samp> and
<samp>\&amp;</samp>.</p>
</li>
<li id="uid77"><p class="nofirst noindent">A character of category code 14, is a comment character: all characters
remaining on the current line are discarded. By default
`<samp>%</samp>´ is a comment character.</p>
</li>
<li id="uid78"><p class="nofirst noindent">A character of category code 15 is invalid. By default, all characters
are valid.</p>
</li>
<li id="uid79"><p class="nofirst noindent">A character of category code 16 is a `short verb´ character. This is a
feature that does not exist in TeX. If you use
<samp>\DefineShortVerb</samp> to make it a short verb, you should undefine the
character before changing its category code. Unexpected results can follow if
non-ASCII characters are of category code 16.</p>
</li>
<li id="uid80"><p class="nofirst noindent">A character of category code 0 is used to create a command like
<samp>\foo</samp> or <samp>\\</samp>; the associated token is <span style="text-decoration:underline">foo</span> or <span style="text-decoration:underline">\</span>; the
value of the character is irrelevant. By default, there is only one
character of category 0, the backslash.</p>
</li></ol>
<p>In version one of this document, we started with category code 0,
decremented the `enumi´ counter by one, before the first item, so that the
first item label was zero. However <i>Tralics</i> does not use this counter in a
`enumerate´ environment. Hence, the easiest solution, for having the same
labels in the Pdf and <span class="sansserif">HTML</span> version, was to move this item to the end of the
list.</p>
<p>If a TeX file contains the following lines,</p>
<pre class="latex-code">\show{ \show} \show$  \show&amp; \show# \show^ \show_ %$
\expandafter\show\space  \show a \show 1 %
\def\foo+{}
\foo{ \foo} \foo$ \foo&amp; \foo# \foo^ \foo_ \foo a \foo1
</pre>
<p class="nofirst noindent">then <i>Tralics</i> will print:</p>
<pre class="latex-code">begin-group character {.
end-group character }.
math shift character $.
alignment tab character &amp;.
macro parameter character #.
superscript character ^.
subscript character _.
blank space  .
the letter a.
the character 1.
</pre>
<p class="nofirst noindent">In any case, we have a prefix that depends on the category code, then the
value of the character. All calls to the command <samp>\foo</samp> are wrong and
signal an error. We show here the first
error message, followed by the &#8220;got&#8221; part of the other error messages. It is
important to remember that the command has to be followed by the right token,
or the right character with the right category code.</p>
<pre class="latex-code">Error signaled at line 20 of file txt6.tex:
Use of \foo doesn't match its definition;
   got {Character { of catcode 1},
   expected {Character + of catcode 12}.
   got {Character } of catcode 2}
   got {Character $ of catcode 3}
   got {Character &amp; of catcode 4}
   got {Character # of catcode 6}
   got {Character ^ of catcode 7}
   got {Character _ of catcode 8}
   got a
   got {Character 1 of catcode 12}
</pre>

<h2 id="uid81">1.8. Considerations about mathematics</h2>
<p>Translating mathematical formulas is rather difficult: this is because
mathematics are complex in both TeX and MathML. Basically, you start with
kernels, add some decoration, and connect these things. Kernels can be letters
like x, y, z or A, B, C, but you see very often Greek letters like &#945;,
&#946;, &#915;, &#916;, Hebraic characters like &#8501;, old German,
like &#8472;. Decoration can be, like in <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mi>y</mi> </msup></math></span>, a second kernel on the left,
the right, above, below.
People use also bars, dots, rings, arrows,
etc. There are different types of connectors: for instance you can say <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>=</mo><mi>y</mi></mrow></math></span> or
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>&#8741;</mo><mi>y</mi></mrow></math></span>, using parallel bars, or <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>×</mo><mi>y</mi></mrow></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>+</mo><mi>y</mi></mrow></math></span> using crossing bars.
Amstex was designed by Spivak for easy typesetting of tensors of the form
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msubsup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>T</mi> <mrow><msub><mi>j</mi> <mn>1</mn> </msub><msub><mi>j</mi> <mn>2</mn> </msub><mo>...</mo><msub><mi>j</mi> <mi>m</mi> </msub></mrow> <mrow><msub><mi>i</mi> <mn>1</mn> </msub><msub><mi>i</mi> <mn>2</mn> </msub><mo>...</mo><msub><mi>i</mi> <mi>n</mi> </msub></mrow> </msubsup></math></span>.</p>
<p>The first difficulty consists in representing all these symbols. In TeX, you
use commands like <samp>\alpha</samp>, defined as <samp>\mathchar"10B</samp>, whose effect is to
chose a character from a font (depending on the packages used; a big
difficulty is to chose math fonts that go well with the main text font of the
document). Some characters exist in bold version, or in italics version. A non
trivial question is how to put everything in bold: you could use commands
like <samp>\boldx</samp> <samp>\boldequals</samp> <samp>\boldalpha</samp>. It would be simpler to say
<samp>\bold</samp><samp>{$x=\alpha$}</samp>. One solution is to say
`<samp>\boldmath</samp>´<a id="uid82"></a><a id="uid83" href="#note17" title="An example of bold math is when typesetting the 2&#1013; logo, see page ."><small>(note: </small>&#10163;<small>)</small></a>,
or equivalently
`<samp>\mathversion</samp><samp>{bold}</samp>´<a id="uid84"></a> before starting a math formula;
the effect is to use a bold version of everything (in fact, of all characters
that use one of the math families, but the number of families is so small that
not all symbols use this mechanism). You can say
`<samp>\mathbf</samp><samp>{x}</samp>´<a id="uid85"></a> or
`<samp>\bm</samp><samp>{x}</samp>´<a id="uid86"></a> in a math formula.
Only <samp>\mathbf</samp> is implemented in <i>Tralics</i>, it provides a bold upright font;
on the other hand, the <samp>\bm</samp> command is defined in the <span class="sansserif">bm</span> package;
provided that fonts are available, it should use a bold version of everything
(at least for all characters for which a bold typeface exists).</p>
<p>Traditionally, uppercase letters were upright, lowercase letters were
italics. This is the default for Greek letters, but TeX uses italics for
Roman letters; digits are by default upright uppercase, but lower case
digits (also known as &#8220;oldstyle numbers&#8221;) can also be used.
There are some
exceptions to these rules: an operator like <samp>\sin</samp> is typeset using upright
font. As said above, <samp>\mathbf</samp> produces upright characters. The so-called
&#8220;black board&#8221; or &#8220;double-struck&#8221; characters obtained
by <samp>\mathbb</samp><a id="uid87"></a> are upright, for instance
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mi xmlns:xlink="http://www.w3.org/1999/xlink">&#8477;</mi></math></span>. An interesting point: lots of people prefer
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mi xmlns:xlink="http://www.w3.org/1999/xlink">&#8477;</mi></math></span>, using <samp>\mathbbm</samp>. Some people fake it as
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>I</mi><mspace width="-0.166667em"></mspace><mspace width="-0.166667em"></mspace><mi>R</mi></mrow></math></span>, using <samp>$I\!\!R$</samp>. You can always use <samp>\mathrm</samp> for an upright
character, as in <samp>$\mathrm{E}=mc^2$</samp>.
Some packages provide italic
uppercase Greek letters, and upright lowercase. Then
you can apply the Laplace operator
to the Delta function like this: <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>&#916;</mi><mi>&#916;</mi></mrow></math></span>.
This is shown in the dvi file as <img src="deltadelta.png" alt="deltadelta.png" />.</p>
<p>In MathML, characters should not be used directly. For instance, you should
use <tt class="txt">&lt;mn&gt;125&lt;/mn&gt;</tt> for a number, <tt class="txt">&lt;mi&gt;Foo&lt;/mi&gt;</tt> for the variable Foo and
<tt class="txt">&lt;mo&gt;sin&lt;/mo&gt;</tt> for the operator sin. These elements have a mathvariant
attribute, which indicates which variant to use. In the case <tt class="txt">&lt;mo&gt;</tt>, the
default is upright; in the case <tt class="txt">&lt;mi&gt;</tt>, the MathML norms says:
&#8220;The default <tt>mathvariant</tt> would (typically) be <tt>normal</tt>
(non-slanted) unless the content is a single character,
in which case it would be <tt>italic</tt>.&#8221;
So we could translate <samp>\mathbb</samp><samp>{R}</samp> as an <tt class="txt">&lt;mi&gt;</tt> element
containing a
normal R with a mathvariant attribute of value doublestruck. An alternate
solution consists in using a double struck character R, and no mathvariant
attribute. Here are all the possible variants, and for the character A its
Unicode value:
normal, bold (1D400), italic (1D434), bold-italic (1D468),
double-struck (1D358), bold-fraktur (1D56C),
script (1D49C), bold-script (1D4D0), fraktur (1D504),
sans-serif (1D5A0), bold-sans-serif (1D5D4), sans-serif-italic (1D608),
sans-serif-bold-italic (1D63C), monospace (1D670).
In the case of Greek letters, Unicode knows the following variants:
bold, italic, bold italic, sans-serif bold, and sans-serif bold italic.
And in the case of digits: bold, double-struck, sans-serif, sans-serif bold,
monospace. Your browser should show these characters as
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>&amp;#x1D400;</mo><mo>,</mo><mo>&amp;#x1D434;</mo><mo>,</mo><mo>&amp;#x1D468;</mo><mo>,</mo><mo>&amp;#x1D358;</mo><mo>,</mo><mo>&amp;#x1D56C;</mo><mo>,</mo><mo>&amp;#x1D49C;</mo><mo>,</mo><mo>&amp;#x1D4D0;</mo><mo>,</mo><mo>&amp;#x1D504;</mo><mo>,</mo><mo>&amp;#x1D5A0;</mo><mo>,</mo><mo>&amp;#x1D5D4;</mo><mo>,</mo><mo>&amp;#x1D608;</mo><mo>,</mo><mo>&amp;#x1D63C;</mo><mo>,</mo><mspace width="4.pt"></mspace><mtext>and</mtext><mspace width="4.pt"></mspace><mo>&amp;#x1D670;</mo><mo>.</mo></mrow></math></span></p>
<p>Note: there are some holes in the table, starting at 1D400. For instance
the Laplace symbol (U+2112) looks like <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mi xmlns:xlink="http://www.w3.org/1999/xlink">&#8466;</mi></math></span>,
but the
the translation of <samp>\mathcal</samp><a id="uid88"></a>
(that TeX shows as <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mi xmlns:xlink="http://www.w3.org/1999/xlink">&#8466;</mi></math></span>), is not 1D49C+11 (this character does not
exists). The dvi file shows <img src="calL.png" alt="calL.png" /> and <img src="scrL.png" alt="scrL.png" /> for these symbols.
Another special case: there are some variants of the Greek letters
&#1013; and &#949;; which one is the default is unclear.</p>
<p>There are two complementary views of MathML: presentation and content.
This is how you would convert <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>=</mo><mi>b</mi></mrow></math></span> using content markup:
<tt class="txt">&lt;reln&gt;</tt> <tt class="txt">&lt;eq/&gt;</tt> <tt class="txt">&lt;ci&gt;</tt> a <tt class="txt">&lt;/ci&gt;</tt>
<tt class="txt">&lt;ci&gt;</tt> b <tt class="txt">&lt;/ci&gt;</tt> <tt class="txt">&lt;/reln&gt;</tt>. And this is how <i>Tralics</i> converts the same using presentation
<tt class="txt">&lt;mrow&gt;</tt>
<tt class="txt">&lt;mi&gt;</tt>a<tt class="txt">&lt;/mi&gt;</tt>
<tt class="txt">&lt;mo&gt;</tt>=<tt class="txt">&lt;/mo&gt;</tt>
<tt class="txt">&lt;mi&gt;</tt>b<tt class="txt">&lt;/mi&gt;</tt>
<tt class="txt">&lt;/mrow&gt;</tt>.
A more complex example, in presentation mode:</p>
<pre class="xml-code">&lt;apply&gt;
  &lt;int/&gt;
  &lt;bvar&gt;&lt;ci&gt;x&lt;/ci&gt;&lt;/bvar&gt;
  &lt;condition&gt;
    &lt;apply&gt;&lt;in/&gt;&lt;ci&gt;x&lt;/ci&gt;&lt;ci type="set"&gt;C&lt;/ci&gt;&lt;/apply&gt;
  &lt;/condition&gt;
  &lt;apply&gt;&lt;sin/&gt;&lt;ci&gt;x&lt;/ci&gt;&lt;/apply&gt;
&lt;/apply&gt;
</pre>
<p class="nofirst noindent">You can clearly see that we apply the <tt class="txt">&lt;int&gt;</tt> operation to some quantity
(in which <tt class="txt">&lt;sin&gt;</tt> is applied to <span class="math"><i>x</i></span>), subject to some condition (in
which <tt class="txt">&lt;in&gt;</tt> is applied to <span class="math"><i>x</i></span> and some set).
If you consider
the expression <samp>$\int_0^\infty \sin(x)dx$</samp>, it is translated by <i>Tralics</i> as</p>
<pre class="xml-code">&lt;msubsup&gt;&lt;mo&gt;&amp;int;&lt;/mo&gt; &lt;mn&gt;0&lt;/mn&gt; &lt;mi&gt;&amp;infin;&lt;/mi&gt; &lt;/msubsup&gt;
&lt;mrow&gt;
  &lt;mo form='prefix'&gt;sin&lt;/mo&gt;
  &lt;mo&gt;(&lt;/mo&gt;
  &lt;mi&gt;x&lt;/mi&gt;
  &lt;mo&gt;)&lt;/mo&gt;
  &lt;mi&gt;d&lt;/mi&gt;
  &lt;mi&gt;x&lt;/mi&gt;
&lt;/mrow&gt;
</pre>
<p class="nofirst noindent">Forget about the <tt class="txt">&lt;mrow&gt;</tt> element, this is added by <i>Tralics</i> using some
heuristic rules that do not always work; their effect is to isolate the
parentheses from the integral sign: the height of the parentheses should be
normal. In the expression, one can see that the integral sign<a id="uid89"></a> is a
character considered as an operator (there no <tt class="txt">&lt;int&gt;</tt> element
here); it has an exponent and an index.
In the same fashion, <samp>\sin</samp><a id="uid90"></a> is translated as a
<tt class="txt">&lt;mo&gt;</tt> element (with an attribute that says it precedes its argument).
Nothing in the formula says that the argument is <span class="math"><i>x</i></span>.<a id="uid91" href="#note18" title="Apart from the kludge mentioned above, Tralics make no difference between the letter x and the paren..."><small>(note: </small>&#10163;<small>)</small></a>
Nothing says
that `<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>d</mi><mi>x</mi></mrow></math></span>´ is not the product of <span class="math"><i>d</i></span> and <span class="math"><i>x</i></span>, but a conventional way of
indicating that <span class="math"><i>x</i></span> is the bound variable (the <tt class="txt">&lt;bvar&gt;</tt> above). In fact,
<i>Tralics</i> cannot guess the <i>use</i> of the tokens, it knows only the
layout: for instance, is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msubsup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>&#915;</mi> <mrow><mi>i</mi><mi>j</mi></mrow> <mi>k</mi> </msubsup></math></span> a Christoffel symbol with three
indices or a randomly Greek letter, with two indices raised to some power?
And what about <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mrow></mrow> <mn>3</mn> </msup><mi> He </mi></mrow></math></span> or this footnote?<a id="uid92" href="#note19" title="Guess: in the previous formula, was the H in or out of the math formula."><small>(note: </small>&#10163;<small>)</small></a>
Note that such expressions are not part of
content markup: in both cases, these things look like tensors
and are to be produced with <tt class="txt">&lt;mmultiscripts&gt;</tt>. In what follows, we shall
speak only of the presentation part of MathML.</p>
<p>Some features are difficult to implement. For instance, it is possible to
group some equations in a single mathematical formula, and put a label (with a
reference like 17) to the whole, as well as a label for each subequations
(referenced as 17.a, 17.b, etc). It is also possible to split an equation on
more than one line, with a single number for it:</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mtable xmlns:xlink="http://www.w3.org/1999/xlink" displaystyle="true"><mtr><mtd columnalign="right"><mrow><mi>&#950;</mi><mo>(</mo><mi>s</mi><mo>)</mo></mrow></mtd><mtd columnalign="left"><mrow><mo>=</mo><mn>1</mn><mo>/</mo><msup><mn>1</mn> <mi>s</mi> </msup><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>2</mn> <mi>s</mi> </msup><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>3</mn> <mi>s</mi> </msup><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>4</mn> <mi>s</mi> </msup><mo>...</mo></mrow></mtd></mtr><mtr><mtd></mtd><mtd columnalign="left"><mrow><mo>=</mo><mn>1</mn><mo>/</mo><msup><mn>1</mn> <mi>s</mi> </msup><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>3</mn> <mi>s</mi> </msup><mo>+</mo><mo>...</mo><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>2</mn> <mi>s</mi> </msup><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>4</mn> <mi>s</mi> </msup><mo>+</mo><mo>...</mo></mrow></mtd></mtr></mtable></math></div>
<p class="nofirst noindent">It is possible to add some
lines of text between two equations</p>
<div class="mathdisplay"><table width="100%" id="uid93"><tr valign="middle"><td class="leqno"></td><td><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mtable xmlns:xlink="http://www.w3.org/1999/xlink" displaystyle="true"><mtr><mtd columnalign="right"><mi>X</mi></mtd><mtd columnalign="left"><mrow><mo>=</mo><mn>1</mn><mo>/</mo><msup><mn>2</mn> <mi>s</mi> </msup><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>4</mn> <mi>s</mi> </msup><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>6</mn> <mi>s</mi> </msup><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>8</mn> <mi>s</mi> </msup><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>10</mn> <mi>s</mi> </msup><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>12</mn> <mi>s</mi> </msup><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>14</mn> <mi>s</mi> </msup><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>16</mn> <mi>s</mi> </msup><mo>+</mo><mo>...</mo></mrow></mtd></mtr><mtr><mtd columnalign="left" columnspan="2"><mrow><mtext>as</mtext><mspace width="4.pt"></mspace><mtext>in</mtext><mspace width="4.pt"></mspace><mtext>this</mtext><mspace width="4.pt"></mspace><mtext>example</mtext><mspace width="4.pt"></mspace><mtext>(equals</mtext><mspace width="4.pt"></mspace><mtext>signs</mtext><mspace width="4.pt"></mspace><mtext>are</mtext><mspace width="4.pt"></mspace><mtext>aligned)</mtext></mrow></mtd></mtr><mtr><mtd></mtd><mtd columnalign="left"><mrow><mo>=</mo><mfrac><mn>1</mn> <msup><mn>2</mn> <mi>s</mi> </msup></mfrac><mrow><mo>(</mo><mn>1</mn><mo>/</mo><msup><mn>1</mn> <mi>s</mi> </msup><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>2</mn> <mi>s</mi> </msup><mo>+</mo><mn>1</mn><mo>/</mo><msup><mn>3</mn> <mi>s</mi> </msup><mo>+</mo><mo>...</mo><mo>)</mo></mrow></mrow></mtd></mtr></mtable></math></td><td class="eqno">(1)</td></tr></table></div>
<p class="nofirst noindent">What <i>Tralics</i> produces in this case is a single table (with a single equation
number), and the intertext is just a new row, left aligned, that spans two
columns (see <samp>\intertext</samp><a id="uid94"></a> in section <a href="#uid3953">&#10043;</a>).</p>
<p>Horizontal spacing in math formulas in managed intelligently by TeX. In the
case of <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>+</mo><mi>b</mi></mrow></math></span> or <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>=</mo><mi>b</mi></mrow></math></span>, there is some space on each side of the operator,
and this space disappears when the formula becomes an exponent or an
index. Here is an example.</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mfrac><mrow><mi>a</mi><mo>+</mo><mi>b</mi></mrow> <mrow><mi>a</mi><mo>=</mo><mi>b</mi></mrow></mfrac><mo>,</mo><mspace width="2.em"></mspace><msubsup><mi>x</mi> <mrow><mi>a</mi><mo>=</mo><mi>b</mi></mrow> <mrow><mi>a</mi><mo>+</mo><mi>b</mi></mrow> </msubsup><mo>.</mo></mrow></math></div>
<p class="nofirst noindent">that shows as <img src="spacing.png" alt="spacing.png" /> in the dvi file.
Each operator has a type, and the value of horizontal spacing depends on the
type of the tokens on the left and the right. Traditionally, parentheses are
removed around the arguments of sine and cosine, and you say: sine squared of
X instead of sine of X, the whole squared. Example:</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mo form="prefix">sin</mo> <mn>2</mn> </msup><mi>x</mi><mo>+</mo><msup><mrow><mo>(</mo><mo form="prefix">sin</mo><mi>x</mi><mo>)</mo></mrow> <mn>2</mn> </msup><mo>.</mo></mrow></math></div>
<p class="nofirst noindent">In TeX, you can consider every expression (a simple atom, or a list in
braces) as an operator, provided that it is preceded by its type.
Types Over, Under, Acc, Rad, Vcent are obtained by construction
(overline, underline, adding an accent, constructing a radical, vertical centering). Types Ord, Op, Bin, Rel, Open, Close, Punct, Inner
are obtained by defining characters via <samp>\mathchar</samp>, or using the following
commands
<samp>\mathord</samp><a id="uid95"></a>,
<samp>\mathop</samp><a id="uid96"></a>,
<samp>\mathbin</samp><a id="uid97"></a>,
<samp>\mathrel</samp><a id="uid98"></a>,
<samp>\mathopen</samp><a id="uid99"></a>,
<samp>\mathclose</samp><a id="uid100"></a>,
<samp>\mathpunct</samp><a id="uid101"></a>,
<samp>\mathinner</samp><a id="uid102"></a>.
These commands are understood by <i>Tralics</i>, but in general ignored. In the case
of an inline expression, a line break can only appear after an operator (like
plus or equal), provided it is the main operator (in particular, if you put
the whole expression in braces, no line break will occur). This is ignored by
<i>Tralics</i>. Hence something like <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>f</mi><mo>(</mo><msup><mi>x</mi> <mrow><mi>a</mi><mo>+</mo><mi>b</mi></mrow> </msup><mo>)</mo></mrow></math></span> cannot be broken<a id="uid103" href="#note20" title="but Netscape does not hesitate to break after the plus sign, in the case of &lt;sup&gt;, observation made in 1999"><small>(note: </small>&#10163;<small>)</small></a>.</p>
<p>Note that exponents and indices use a smaller font size, and exponents in
exponents use an even smaller one: compare <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <msubsup><mi>y</mi> <mi>&#949;</mi> <mi>&#1013;</mi> </msubsup> </msup></math></span> with
<img src="doubleindex.png" alt="doubleindex" />. The image was obtained by converting the math
formula into <span class="sansserif">XML</span>, then in a png image (such kind of images will be put into
<span class="sansserif">HTML</span> pages, because there are few <span class="sansserif">HTML</span> browsers that understand MathML. We
used
anti-aliasing, because this is supposed to increase readability).
There are
three sizes, and four styles (<samp>\displaystyle</samp><a id="uid104"></a>,
<samp>\textstyle</samp><a id="uid105"></a>, <samp>\scriptstyle</samp><a id="uid106"></a>, and
<samp>\scriptscriptstyle</samp><a id="uid107"></a>). The first two styles in the
list have the same size (in MathML, there is an attribute <span class="sansserif">scriptlevel</span> that
controls the size of the expression, and another one, <span class="sansserif">displaystyle</span>,
that says
if the expression is in display style or not). In fact, TeX has two substyles,
cramped or not. Consider carefully the placement of exponents in the following
example</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mfrac><mrow><msub><mi>a</mi> <mn>2</mn> </msub><mo>+</mo><msup><mi>x</mi> <mn>2</mn> </msup></mrow> <mrow><msub><mi>a</mi> <mn>2</mn> </msub><mo>+</mo><msup><mi>x</mi> <mn>2</mn> </msup></mrow></mfrac><mo>=</mo><mfrac><msubsup><mi>x</mi> <mn>3</mn> <mn>2</mn> </msubsup> <msubsup><mi>x</mi> <mn>3</mn> <mn>2</mn> </msubsup></mfrac><mo>.</mo></mrow></math></div>
<p class="nofirst noindent"><big></big>
this is shown as <img src="mathformula.png" alt="mathformula.png" /> in the dvi file.</p>
<p>One problem (for a translator like <i>Tralics</i>) deals with the placement of
arguments versus operators. For instance, if you want to put a dot over a
letter, you can say <samp>$\dot x$</samp> (compare the math version <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mover xmlns:xlink="http://www.w3.org/1999/xlink" accent="true"><mi>x</mi> <mo>&#729;</mo></mover></math></span> and the text
version <i>&#7819;</i>; in text mode, slants are taken into account).
The MathML equivalent is an <tt class="txt">&lt;msup&gt;</tt> whose first
element is the identifier x. If you want to put a prime after a letter you
say <samp>x´</samp>, or <samp>x^{\prime}</samp><a id="uid108"></a>. If you want to put an arrow over x
prime, you have the choice between <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mover xmlns:xlink="http://www.w3.org/1999/xlink" accent="true"><msup><mi>x</mi> <mo>'</mo> </msup> <mo>&#8594;</mo></mover></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mrow><mover accent="true"><mi>x</mi> <mo>&#8594;</mo></mover></mrow> <mo>'</mo> </msup></math></span>. With the fonts
used in this example, the first solution looks horrible. You can say
<samp>x_2^3</samp> or <samp>x^3_2</samp>: the result is the same: a math item, formed of a nucleus, a
superscript and a subscript. If you want something like <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msubsup><mrow></mrow> <mn>3</mn> <mn>2</mn> </msubsup><mi>x</mi></mrow></math></span>, you have to
use two items, the first one has an empty nucleus, the second has no scripts.
You can say <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msub><mi>R</mi> <mi>i</mi> </msub><msup><mrow></mrow> <mi>j</mi> </msup><msub><mrow></mrow> <mrow><mi>k</mi><mi>l</mi></mrow> </msub></mrow></math></span>, using three items. The MathML translation should
consist in a single <tt class="txt">&lt;mmultiscripts&gt;</tt> element. It is possible to
enclose a formula by braces, brackets, etc, provided that the font contains
the machinery needed for it. You can either use <samp>\big</samp><a id="uid109"></a> and its
variants, if you know the height of the formula, or <samp>\left</samp> and
<samp>\right</samp>, or as in the example that follows, use an environment like
<samp>matrix</samp> that uses whatever is best.</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mfenced xmlns:xlink="http://www.w3.org/1999/xlink" open="(" close=")"><mtable><mtr><mtd><mi>a</mi></mtd><mtd><mi>b</mi></mtd></mtr><mtr><mtd><mi>c</mi></mtd><mtd><mi>d</mi></mtd></mtr></mtable></mfenced></math></div>
<p>The <samp>\over</samp><a id="uid110"></a> command (and friends) are discouraged by amstex:
you get a message of the form <i>Package amsmath Warning: Foreign command
\over; \frac or \genfrac should be used instead</i>. In fact the
command takes two arguments, one before and one after. Example</p>
<p class="nofirst noindent"><samp> x=\left( a+b \over c+d\right)^2+1</samp> gives</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>=</mo><msup><mfenced separators="" open="(" close=")"><mfrac><mrow><mi>a</mi><mo>+</mo><mi>b</mi></mrow> <mrow><mi>c</mi><mo>+</mo><mi>d</mi></mrow></mfrac></mfenced> <mn>2</mn> </msup><mo>+</mo><mn>1</mn></mrow></math></div>
<p class="nofirst noindent">The trouble is the following: Assume that we have a command <samp>\myfrac</samp>
that typesets its arguments as <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>/</mo><mi>b</mi></mrow></math></span> if the current style is script or
scriptscript, and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mfrac xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi> <mi>b</mi></mfrac></math></span> otherwise. In an expression as above, the current
style cannot be known before the <samp>\over</samp> is seen. For this reason,
TeX introduced a command <samp>\mathchoice</samp><a id="uid111"></a> that takes four
arguments, one for each style; after TeX has completely read the math
expression, it takes, in a second pass, the relevant token list. This is
complicated. This mechanism is partially implemented in the current version of
<i>Tralics</i>.</p>
<p>If you do not like MathML, you can set the integer <samp>\@nomathml</samp> to a
non-zero value. If it is positive, then most math commands are allowed outside
math mode, with trivial translation. If it is negative, then math formulas are
parsed as usual, but the resulting tree is output à la TeX, rather than
producing a MathML formula. Example</p>
<pre class="latex-code">\makeatletter
\@nomathml=1
\sqrt{\alpha+\beta ^4}
\@nomathml=-1
$\sqrt{\alpha+\beta ^4}$
</pre>
<p class="nofirst noindent">The translation is</p>
<pre class="latex-code">\sqrt \alpha +\beta ^4
&lt;texmath type='inline'&gt;\sqrt{\alpha +\beta ^4}&lt;/texmath&gt;
</pre>

<h2 id="uid112">1.9. Some subtleties of TeX</h2>
<p>Assume that we have a number, say `1.3´, and want to convert this to a
dimension, say `1.3pt´. If the number is in a command <samp>\foo</samp>, we can say
<samp>\dimen0=</samp><samp>\foo pt</samp>. On the other hand, how can we get 1.3 given that
<samp>\dimen0</samp> holds 1.3pt? We may use <samp>\the</samp><samp>\dimen0</samp>, and remove the
last two characters. Hence we say
<samp>\expandafter</samp><samp>\rem@pt</samp><samp>\the</samp><samp>\dimen0</samp>. One trouble is that the
category codes of the characters `<samp>pt</samp>´ produced by the <samp>\the</samp> command
are 12, not 11, so that a definition like</p>
<pre class="latex-code">\def\rem@pt#1pt{#1}
</pre>
<p class="nofirst noindent">does not work. You could try to change the category codes of <samp>p</samp> and
<samp>t</samp> in the
definition, but these letters are part of the name of the command. Some black
magic has to be used. The code shown here converts also `12.0pt´ to `12´.</p>
<pre class="latex-code">\begingroup
  \catcode`P=12
  \catcode`T=12
  \lowercase{
    \def\x{\def\rem@pt##1.##2PT{##1\ifnum##2&gt;\z@.##2\fi}}}
  \expandafter\endgroup\x
</pre>
<p class="nofirst noindent">Implementing such a construction in a Perl script is not obvious. Consider
then the following example:</p>
<pre class="latex-code">\def\foo#1{#1x#1}\def\xbar#1{ $#1$}
\expandafter\foo\xbar y
\foo\xbar y
</pre>
<p class="nofirst noindent">Consider line 2. After <samp>\expandafter</samp> has read the two tokens <samp>\foo</samp>
and <samp>\xbar</samp>, current state is S, a space and the character `<samp>y</samp>´
are not yet read. Expansion of <samp>\xbar</samp> reads as argument the character <samp>y</samp>; the space before it is
ignored. The expansion is then <span style="text-decoration:underline">foo</span> <tt>&#9251;</tt><sub>5</sub>
<tt>$</tt><sub>3</sub> <tt>y</tt><sub>11</sub> <tt>$</tt><sub>3</sub>. Hence the
argument of <samp>\foo</samp> is the dollar sign, expanding it gives
<tt>$</tt><sub>3</sub> <tt>x</tt><sub>11</sub>
<tt>$</tt><sub>3</sub> <tt>y</tt><sub>11</sub>
<tt>$</tt><sub>3</sub>. Note that this gives an odd number of dollar signs.</p>
<p>Consider now the third line. Here the argument of <samp>\foo</samp> is <samp>\xbar</samp>. The
expansion is <span style="text-decoration:underline">xbar</span> <tt>x</tt><sub>11</sub> <span style="text-decoration:underline">xbar</span>, and a space and `<samp>y</samp>´
have to be read. The expansion of <samp>\xbar</samp> is
<tt>&#9251;</tt><sub>5</sub> <tt>$</tt><sub>3</sub> <tt>x</tt><sub>11</sub>
<tt>$</tt><sub>3</sub>. The second <samp>\xbar</samp> reads a space and `<samp>y</samp>´ as its
argument. The expansion is <tt>&#9251;</tt><sub>5</sub> <tt>$</tt><sub>3</sub> <tt>y</tt><sub>11</sub>
<tt>$</tt><sub>3</sub>. Note that <tt>latex2html</tt> complains with: <i>Unknown
commands: xbarx</i>, because the string is rescanned, and a space should have
been added.
In the second version of our translator, which was a Perl
script as <tt>latex2html</tt>, we solved this problem as follows. The commands
<samp>\\</samp> and <samp>\!</samp> are replaced by <samp>\00!</samp> and <samp>\01!</samp>, special characters are
replaced by <samp>\3#!</samp>, <samp>\3&amp;!</samp>, <samp>\3&lt;!</samp>, <samp>\3&gt;!</samp>, and
<samp>\3~!</samp>. A command like
<samp>\foo</samp> is replaced by <samp>\1foo!</samp>, spaces after <samp>\foo</samp> are removed. Using
such a mechanism, we can handle spaces correctly, as long as the category
codes do not change.</p>
<p>The current version of <i>Tralics</i> uses the same representation as TeX for
its tokens, namely an integer. A character token like
<tt>$</tt><sub>3</sub>, is represented by the integer <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>c</mi><mo>+</mo><mi>N</mi><mo>*</mo><mi>C</mi></mrow></math></span>, where
<span class="math"><i>N</i></span> is the number of characters, <span class="math"><i>c</i></span> the character value (here 36), and <span class="math"><i>C</i></span>
the category code (here 3). In TeX, the constant <span class="math"><i>N</i></span> is 256, in <i>Tralics</i>,
it is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn> <mn>16</mn> </msup></math></span>. Let <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>M</mi><mo>=</mo><mn>16</mn><mo>*</mo><mi>N</mi></mrow></math></span>; then non-character tokens are integers <span class="math"><i>x</i></span> at
least <span class="math"><i>M</i></span>, and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>-</mo><mi>M</mi></mrow></math></span> is the address in the table of equivalents. An active
character is represented by <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>c</mi><mo>+</mo><mi>N</mi><mo>*</mo><mi>C</mi></mrow></math></span>, with <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>C</mi><mo>=</mo><mn>16</mn></mrow></math></span>, and a single-character
command is represented by <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>c</mi><mo>+</mo><mi>N</mi><mo>*</mo><mi>C</mi></mrow></math></span> with <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>C</mi><mo>=</mo><mn>17</mn></mrow></math></span>; multiletter control sequences
are represented by integers larger than <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>M</mi><mo>+</mo><mn>2</mn><mi>N</mi></mrow></math></span>, and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>-</mo><mi>M</mi><mo>-</mo><mn>2</mn><mi>N</mi></mrow></math></span> is the
hashtable location of the token (it contains the name of the token).</p>
<p>If you say <samp>\uccode</samp><samp>`\~=`A</samp> two integers are read; in these
case, they are character constants; the value is obtained by taking the token
modulo <span class="math"><i>N</i></span>. If you say <samp>\uppercase</samp><samp>{~}</samp>, for each token in
the list, something happens if the value is less than <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>M</mi><mo>+</mo><mi>N</mi></mrow></math></span>; if the value
modulo <span class="math"><i>N</i></span> is <span class="math"><i>c</i></span>, and if the upper case equivalent of <span class="math"><i>c</i></span> is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>c</mi> <mo>'</mo> </msup></math></span>, a non-zero
value, then <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>x</mi> <mo>'</mo> </msup><mo>=</mo><mi>x</mi><mo>-</mo><mi>c</mi><mo>+</mo><msup><mi>c</mi> <mo>'</mo> </msup></mrow></math></span> is used instead of <span class="math"><i>x</i></span>. Note that if <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>C</mi><mo>=</mo><mi>x</mi><mo>/</mo><mi>N</mi></mrow></math></span> and
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>C</mi> <mo>'</mo> </msup><mo>=</mo><msup><mi>x</mi> <mo>'</mo> </msup><mo>/</mo><mi>N</mi></mrow></math></span>, then <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>C</mi><mo>=</mo><msup><mi>C</mi> <mo>'</mo> </msup></mrow></math></span>, this
means that an active character is replaced by an active character, a character
with category code <span class="math"><i>C</i></span> is replaced by a character with the same category code.</p>
<p>The behavior of a token is determined by its command code (and its subcode):
if the token is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>c</mi><mo>+</mo><mi>N</mi><mo>*</mo><mi>C</mi></mrow></math></span>, then <span class="math"><i>C</i></span> is the command code, and <span class="math"><i>c</i></span> the subcode.
Said otherwise, for a character token, the command code is the category code,
and the subcode is the character value. In the other case, the token is
non-constant, its meaning can change. The actual meaning is in the table of
equivalents, it can be pushed on the save stack.
For instance, the default value of
<samp>\count</samp> is (1,90,0). Here the first integer is the definition level, (1 is
the bottom level), 90 is the command code, namely <i>register</i>, and 0 is
the subcode. The default value of <samp>\pausing</samp> is (1,91,324), where the
second number is the command code <i>assignint</i> and the third number an
address in the table of integers.
Remember that, in the case of <samp>\the</samp><samp>\count0</samp>, the <samp>\count</samp> command is
evaluated for a value; in all other cases it is evaluated for side
effects.
In particular for a case like <samp>\global</samp><samp>\count3=17</samp>. Assume
that you say <samp>\count3=17</samp>; in such a case a number is read, namely 3, and
checked for out-of-range. After that, the subtype is looked at (the commands
<samp>\count</samp><a id="uid113"></a>, <samp>\dimen</samp><a id="uid114"></a>, <samp>\skip</samp><a id="uid115"></a>, or <samp>\muskip</samp><a id="uid116"></a> have the same command
code, but different subtypes, they read something and store it
somewhere). Note: if you say <samp>\countdef</samp><samp>\foo3</samp>, then <samp>\foo</samp> has
<i>assignint</i> as command code, and its subcode is 3, thus behaves exactly
like <samp>\pausing</samp>.
Moreover the action is the same as
<samp>\count</samp>, after 3 has been read. In the same fashion, if you say
<samp>\chardef</samp><samp>\bar3</samp>, then <samp>\bar</samp> has <i>chargiven</i> as command
code, and its subcode is 3; the action is exactly the same as
<samp>\char</samp>, after 3 has been read. In the case of <i>chargiven</i>, the
action consists in putting the character in the dvi file (<i>Tralics</i> puts in
the XML tree). In the case of <i>assignint</i>, a integer is stored or
retrieved. For instance, <samp>\foo=17</samp>, and
<samp>\count3=17</samp>
read a number 17. This number will be stored somewhere in the eqtb table; the
location is 3 slots after the start of the <samp>\count</samp> table. This slot
contains (L,V), for instance (4,23). The first number is the definition
level, and the second is the value. In the case L=0, this means that the
object is undefined (in the case of a counter, this means zero). Otherwise
this is the level. In the case <samp>A{B{C}}</samp>, A is at level 1, B at level 2, and
C at level 3. The quantity <span class="math"><i>L</i></span> is never greater than the current level. In
the case where the assignment is global, (L,V) is instantiated to (1,17). In
the case where the current level is L, then V in (L,V) is replaced by 17.
Otherwise, the old value is saved on the stack, and (L,V) is replaced by
(<span class="math"><i>l</i></span>,17) (where <span class="math"><i>l</i></span> is the current level). When the group is closed, the old
value is restored.</p>
<p>Note the following trick. Assume that <samp>\A</samp> increases some counter and puts
the value in <samp>\foo</samp>, <samp>\B</samp> does the same, but changes globally
<samp>\foo</samp>. Assume that you say <samp>{\A\A\B\B\A\A...}</samp>. The first <samp>\A</samp> sets
<samp>\foo</samp> to 1 and saves (0,undef). The second <samp>\A</samp> sets <samp>\foo</samp> to
2. The first <samp>\B</samp> sets <samp>\foo</samp> to 3 at level 1, the second <samp>\B</samp> sets
<samp>\foo</samp> to 4, level unchanged. The next <samp>\A</samp> saves the old
value of <samp>\foo</samp>
and sets <samp>\foo</samp> to 5, etc. As a consequence: every <samp>\A</samp> preceded by a
<samp>\B</samp> will put an item on the save stack. When the stack is restored, the
value to restore will be <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>(</mo><mi>L</mi><mo>,</mo><mi>V</mi><mo>)</mo></mrow></math></span> and the current value <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>(</mo><msup><mi>L</mi> <mo>'</mo> </msup><mo>,</mo><msup><mi>V</mi> <mo>'</mo> </msup><mo>)</mo></mrow></math></span>. If <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mo>'</mo> </msup></math></span> is
1, nothing happens. Otherwise, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>(</mo><msup><mi>L</mi> <mo>'</mo> </msup><mo>,</mo><msup><mi>V</mi> <mo>'</mo> </msup><mo>)</mo></mrow></math></span> is replaced by <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>(</mo><mi>L</mi><mo>,</mo><mi>V</mi><mo>)</mo></mrow></math></span>. As a
consequence the value after the group is the value of the last <samp>\B</samp>.
This results in a waste of the save stack. For this reason, Knuth says: all
assignments to the scratch registers whose numbers are 1, 3, 5, 7 and 9 should
be <samp>\global</samp>; all assignments to the other scratch registers (0, 2, 4, 6,
8, 255) should be non-<samp>\global</samp>.</p>
<p>A silly question is: what happens if you say <samp>{</samp><samp>\let</samp> <samp>\endgraf</samp>
<samp>\par</samp> <samp>\gdef</samp><samp>\par</samp><samp>{}</samp> <samp>\edef</samp> <samp>\foo</samp>
<samp>{<samp>\endgraf</samp>}</samp> <samp>\Foo</samp> <samp>\def</samp> <samp>\endgraf</samp> <samp>{}</samp>
<samp>\Bar</samp> <samp>}</samp>. In the current version of <samp>\Tralics</samp>, but this is also
true for TeX, when you say <samp>\def</samp><samp>\foo</samp>, the command code of <samp>\foo</samp>
is changed to be <i>user-defined</i>, and the subcode is an address into a table
containing the token list of the body. On the other hand, <samp>\let</samp> <samp>\foo</samp>
<samp>\bar</samp> will use the command code and subcode of <samp>\bar</samp>, and copy this
in <samp>\foo</samp>. In the original version of <i>Tralics</i>, the Perl version, we had two
tables: the list of predefined commands, with their internal number, and the
list of user defined commands with their body. In the code above, when
<samp>\Foo</samp> is executed, then <samp>\foo</samp> is a user defined command, whose body
contains <samp>\endgraf</samp><a id="uid117"></a>, whose meaning is the original <samp>\par</samp>.
When <samp>\Bar</samp> is seen, the meaning of this token has changed. The essential
reason why <i>Tralics</i> was re-written in C++ is to make this piece of code work.</p>

<h2 id="uid118">1.10. Language options</h2>
<p>Most TeX formats (plain, LaTeX, amstex) have been written by American
people; nowadays, major developments are done in Europe (including the
conTeXt format, and the <span class="sansserif">hyperref</span> package). However, lots of people use basic primitives for their
French publications, and the situation is not simplified by the fact that
there are two packages for writing French documents (one by late Bernard Gaulle, and one
by D. Flipo).</p>
<p>In the original version of TeX you had to say `<samp>\´e</samp>´ for an e acute, and you
had to say `<samp>\c c</samp>´ or `<samp>\c{c}</samp>´ for a c cedilla (which form being the best is
in general unknown). For homogeneity reasons, Lamport recommends
<samp>\´{e}</samp>. Because some accents are redefined by tables, or tabular
environments, the solution that always works is <samp>\a´{e}</samp>.
This is something
strange, but a translator like <i>Tralics</i> has to cope with it (for instance,
some authors of the Raweb use BibTeX files that are generated automatically from a
data-basis, and this software systematically produces <samp>\a</samp> for accents).
This makes texts rather uneasy to read, and not every spell-checker
understands this (Ispell for instance allows <samp>José</samp> or <samp>Jos\´e</samp>, but not
both). By default (i.e. on Linux machine) LaTeX understands
iso-8859-1. This means that all characters used in France are recognized
(except, &#339;&#338;&#376;, these characters cause also problems in HTML). Recently,
another character was introduced, namely &#8364;. Nobody knows how to
use it (according to <a href="#bid5" title="Mittelbach, Goossens, Braams, Carlisle, Rowley2004">[6, paragraph 7.8.7]</a>, published in april
2004, <samp>\texteuro</samp><a id="uid119"></a> is the official LaTeX way, it is
translated by <i>Tralics</i> as <tt class="txt">&amp;#20AC;</tt>). In case of
doubt, you should use `euro´.</p>
<p>In order to emphasize words, you can underline them, use a different
font, or mark them with quotes. In English, you would use quotes &#8220;like
these&#8221; or `like these´, but never like &#8220;this&#8221;. In France, guillemets
« are used like this ». Note that the spacing is different from English, but
the package should take case of everything. The forever question is: how to
enter these funny characters in my keyboard made in
Mexico<a id="uid120" href="#note21" title="or Thailand; it has an international layout, with a W. logo which is a registered trademark of M.C."><small>(note: </small>&#10163;<small>)</small></a>. One solution consists of typing two
<samp>&lt;</samp> in a row and hope for the best (we have either an active character, or a
ligature). Note that <i>Tralics</i> translates
<samp>\verb+&lt;&lt;--&gt;&gt;+</samp> as
<tt class="txt">&lt;hi rend=´tt´&gt;&amp;lt;&amp;#x200B;</tt><!--PASS THROUGH allowbreak--><tt class="txt">&amp;lt;&amp;#x200B;</tt><!--PASS THROUGH allowbreak--><tt class="txt">-&amp;#x200B;-&amp;#x200B;</tt><!--PASS THROUGH allowbreak--><tt class="txt">&amp;gt;&amp;#x200B;&amp;gt;&amp;#x200B;</tt>
<!--PASS THROUGH allowbreak--><tt class="txt">&lt;/hi&gt;</tt>
the funny characters have as only purpose to inhibit ligatures in the
resulting <span class="sansserif">XML</span><a id="uid121" href="#note22" title="This character is not generated when using option nozerowidthspace"><small>(note: </small>&#10163;<small>)</small></a>. The result might also be:
¡¡ and ¿¿.
Depending on the packages, you should perhaps use
<samp>\guillemotleft</samp><a id="uid122"></a>,
<samp>\guillemotright</samp><a id="uid123"></a>
or <samp>\og</samp>, <samp>\fg</samp>. Which method is the best is still unclear to me.</p>

<h1 id="cid2">2. Expansion</h1>
<p>One part of the work of TeX is to replace all user defined tokens by
primitives; this is the main objective of the `expansion´ process. In this
respect, there is little difference between TeX and <i>Tralics</i>. In this
chapter, we review some constructions.</p>
<h2 id="uid124">2.1. Defining new commands</h2>
<p>A definition is typically of the form</p>
<pre class="latex-code">\def\fooi{foo}
\def\fooii#1#2{#2#1}
\def\fooiii+#1.#2=#3#{Seen#1#2#3.}
</pre>
<p class="nofirst noindent">You may wonder why the commands are not called `<samp>\foo1</samp>´, `<samp>\foo2</samp>´ and
`<samp>\foo3</samp>´. The reason is that, if digits have standard category codes, they are
not of type letter, so that `<samp>\2foo</samp>´ is the command <samp>\2</samp>, followed by the
letters `<samp>foo</samp>´ (the tokens are <span style="text-decoration:underline">2</span> <tt>f</tt><sub>11</sub> <tt>o</tt><sub>11</sub>
<tt>o</tt><sub>11</sub>) and `<samp>\foo2</samp>´ is the command <samp>\foo</samp> followed by the digit
<samp>2</samp> (the tokens are <span style="text-decoration:underline">foo</span> <tt>2</tt><sub>12</sub>). It is possible to create the
token <span style="text-decoration:underline">foo2</span> via <samp>\csname foo2\endcsname</samp>,<a id="uid125"></a>
and it is also possible to
change the category code of 2. This is in general a bad idea: If you say
<samp>\setlength{\parindent}{\foo2+2cm}</samp>, it is impossible to design the
<samp>\setlength</samp> command so that `<samp>\foo2</samp>´ is read as a command and
`<samp>2cm</samp>´ as a dimension. On the other hand, if you say
<samp>\def\foo2#1#2{#2#1}</samp>, TeX expects,
after the second <samp>#</samp>, the character 2 with category code 12; if
not it complains with: <i>Parameters must be numbered consecutively</i>.
In <i>Tralics</i>, the message is a bit different, it says
<i>Error while scanning definition of \foo2
expecting #2; got #{Character 2 of catcode 11}.</i>)
Note how <tt>2</tt><sub>11</sub> is printed.</p>
<p>Before <samp>\def</samp>, you can put a prefix: it can be <samp>\long</samp><a id="uid126"></a>,
indicating that the command accepts whole paragraphs as arguments; it can be
<samp>\outer</samp><a id="uid127"></a>, indicating that the command cannot be the argument
of another command;
it can be <samp>\protected</samp><a id="uid128"></a>, indicating that the command should not be
expanded in an <samp>\edef</samp> (this is an &#1013;-TeX extension);
it can be <samp>\global</samp><a id="uid129"></a>. This last prefix can
be put before any assignment, it says that the assignment is global (unless
<samp>\globaldefs</samp> is non-zero). More than one prefix can be used, the order
is irrelevant.
After the <samp>\def</samp> comes the object to define (this is either an active
character, or a command name), then what TeX calls
&lt;parameter text&gt;, and this is followed by the body. The body starts
with the first opening brace (any character of category code 1) and ends with
the first closing brace (any character with category code 2) that makes the
body balanced against braces. These braces are not part of the body. The
parameter text is an arbitrary sequence of tokens, but cannot contain
braces. If it contains a <samp>#</samp><a id="uid130"></a> (in fact, any
character of category code 6), it has to be the final character of the
sequence, or be followed by the digits 1, 2, 3, up to 9, in order. If there is
some text between <samp>#3</samp> and <samp>#4</samp> (or between <samp>#3</samp> and the start of the body),
this imposes a constraint on the third argument. If there is some text before
<samp>#1</samp>, this imposes a constraint on the command itself. In the body you can use
<samp>##</samp>, this will be replaced by a <samp>#</samp>; you can also use <samp>#1</samp>, <samp>#2</samp>, etc., this
will be replaced by the value of the first, second, etc., argument. As above,
the <samp>#</samp> is any character of category 6, the digits are of category 12, you
cannot access the second argument if only one is available. If you define
<samp>\foo2</samp> as above, TeX will signal a second error:
<i>Illegal parameter number in definition of \foo2</i>.</p>
<p>Once you have defined the commands, you can use them. We give here
an example, and the translation by <i>Tralics</i></p>
<pre class="latex-code">\fooi\fooii12\fooiii+ok. {\itshape 3} =xyz{}!
</pre>

<pre class="xml-code">foo21Seenok &lt;hi rend='it'&gt;3&lt;/hi&gt; xyz.!
</pre>

<p class="nofirst noindent">and also by LaTeX `foo21Seenok <i>3</i> xyz.!´ Some explanations. The first
command takes no argument, thus is easy to understand. The second command
takes two arguments, its body is `<samp>#2</samp><samp>#1</samp>´ so that the expansion is the token
list formed by the tokens of the second argument followed by the tokens of the
first argument. In the case of `<samp>\foo12</samp>´, the arguments are `<samp>1</samp>´ and
`<samp>2</samp>´ (a list of length one). In the case of
`<samp>\fooii {AB} {CD}</samp>´, the
arguments are `<samp>AB</samp>´ and `<samp>CD</samp>´, a list of length two. This is
because TeX ignores initial spaces<a id="uid131"></a> when reading undelimited
arguments; in any case, an argument is well-balanced against braces
(same definition as above for the body of a command). The shortest
possible sequence of tokens is read (in the case of an undelimited argument,
this sequence is never empty). If the result starts with an open brace and
ends with a closing braces, these are removed, provided that the remaining
token list is well-balanced; for instance, in the case
`<samp>\fooii{}a</samp>´,
the first argument is empty. If the command is not <samp>\long</samp>, then <samp>\par</samp>
tokens are forbidden in the argument. In any case tokens that are defined to be
<samp>\outer</samp> are forbidden in a parameter.</p>
<p>In the case of <samp>\fooiii</samp>, the situation is a bit more complicated. Fetching
the argument is more involved than in the general case.
The specification is: plus sign, argument, dot, argument, equals sign,
argument, sharp sign.
Note first that the `<samp>+</samp>´ sign is not part of the command name, but is
required after it whenever used. The first argument here is the shortest
sequence (possibly empty) of tokens, that is a balanced list, and this is
followed by the required token list (here, a single dot). Here it is
`<samp>&#9251;{\it&#9251;3}&#9251;</samp>´; a pair of initial and final braces
disappear, if possible. The `<samp>#{</samp>´ after `<samp>#3</samp>´ says that the
third argument is delimited by an open brace. This brace is left unread. Such
a construction is rare: it occurs only four times in the LaTeX sources,
two example will be given later in section <a href="#uid919" title="Conditional expansion">2.10</a>.</p>
<p>Consider the following example:
`<samp>\def\opt[#1]{}</samp>´. If you say
`<samp>\opt[foo]</samp>´ or `<samp>\opt[{foo}]</samp>´, the argument
is `<samp>foo</samp>´. If you say `<samp>\opt[{[foo]}]</samp>´, it is
`<samp>[foo]</samp>´. It is
important to know that braces are required if you want a closing bracket in the
argument. In the case of `<samp>\item[{\it foo}]</samp>´<a id="uid132"></a>,
the braces are useless; the scope of the <samp>\it</samp> command is limited to
`<samp>foo</samp>´ because an
additional pair of braces is added somewhere in the body of the <samp>\item</samp> command. The following example is non-trivial:</p>
<pre class="latex-code">\def\@car#1#2\@nil{#1}
\def\@cdr#1#2\@nil{#2}
\if b\expandafter\@car\f@series\@nil\boldmath\fi
</pre>
<p class="nofirst noindent">Both commands <samp>\@car</samp> and <samp>\@cdr</samp> read a normal (undelimited) argument,
and a second argument delimited by <samp>\@nil</samp>, and return one of these.
These commands are implemented in <i>Tralics</i> in the C++ kernel for efficiency.
The third line shows a use of <samp>\@car</samp>, where the arguments are the
expansion of <samp>\f@series</samp>; the main assumption is that this token list
does not contain the <samp>\@nil</samp><a id="uid133"></a> token, which is a reserved
command. The caller of the macro must also ensure that the list is not empty,
for otherwise the first argument would be be <samp>\@nil</samp>, and the end of the
second argument would never be seen if the <samp>\@nil</samp> does not appear in the
document text. Note that an error is signaled and scanning stops at the first
<samp>\par</samp> token (or empty line) because the command is not outer.</p>
<p>Let´s assume that <samp>\f@series</samp> expands to a non-empty list, for instance
`<samp>mc</samp>´ (this means that the current font has medium weight and is
condensed). Then `<samp>\@car md\@nil</samp>´
expands to `<samp>m</samp>´. The third line of our example uses <samp>\@car</samp> to get the
first character of <samp>\f@series</samp>, and compares it to `<samp>b</samp>´ (the result
is true if the current font is bold, extra bold, bold condensed, etc). This
code is used for typesetting the LaTeX2&#1013; logo in bold version as
<b>LaTeX2&#1013;</b>. The commands <samp>\if</samp> and <samp>\expandafter</samp>
will be explained later. Note that <samp>\if</samp> fully expands what follows the
letter b. This means that you are in trouble if <samp>\f@series</samp> expands to an
empty list, or if the first token is a command whose expansion may cause
problem (perhaps because it has delimited arguments and <samp>\@car</samp> gobbled the
delimiter), or is empty, or is a list that starts with the letter b.</p>
<p>The following example is from the TeXbook:</p>
<pre class="latex-code">\def\cs AB#1#2C$#3\$ {#3ab#1 c##\x #2}
\cs AB{\Look}C${And\$ }{look}\$ 5
</pre>
<p class="nofirst noindent">If you feed this to <i>Tralics</i><a id="uid134" href="#note23" title="The last character on the line is not read"><small>(note: </small>&#10163;<small>)</small></a>,
you will get three errors (one because of the
`<samp>##</samp>´, and two undefined commands). In verbose mode, the transcript file
of <i>Tralics</i> will contain the following</p>
<pre class="log-code">\cs AB#1#2C$#3\$ -&gt;#3ab#1 c##\x #2
#1&lt;-\Look
#2&lt;-
#3&lt;-{And\$ }{look}
</pre>
<p>One question is: should arguments be in braces or not?
As seen elsewhere, some commands have a special syntax, and cannot be followed
by braces (for instance, in the case of `<samp>\catcode`\$</samp>´ the
argument is the backtick followed by the dollar). In a case like
<samp>$a \over b+c$</samp>,
there are two arguments, one before and one after the command.
An expression like <samp>$a\over b\over c$</samp> is a error. The error message
says to add some braces, but they are used only for grouping. A similar error
message is issued if you say <samp>$a^b^c$</samp>. But compare
`<samp>$a^{b^c}d$</samp>´ and
`<samp>$a\over {b\over c}d$</samp>´: the translation is
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>a</mi> <msup><mi>b</mi> <mi>c</mi> </msup> </msup><mi>d</mi></mrow></math></span><a id="uid135"></a> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mfrac xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi> <mrow><mfrac><mi>b</mi> <mi>c</mi></mfrac><mi>d</mi></mrow></mfrac></math></span><a id="uid136"></a>.
In the case of <samp>\sqrt</samp> <samp>\frac12</samp>, braces are inserted by TeX when
converting <samp>\frac</samp> into <samp>\over</samp>; since <i>Tralics</i> replaces <samp>\over</samp> by
<samp>\frac</samp>, no such braces are added and an error is signaled because of
missing braces.</p>
<p>It is sometimes important to know which braces disappear or remain.
As an example, you can say `<samp>\def\ap{a´}</samp>´ in order to get <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi> <mo>'</mo> </msup></math></span>; but if you
say this `<samp>$x_\ap\not=x_{\ap}$</samp>´, you get <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msubsup><mi>x</mi> <mi>a</mi> <mo>'</mo> </msubsup><mo>&#8800;</mo><msub><mi>x</mi> <msup><mi>a</mi> <mo>'</mo> </msup> </msub></mrow></math></span>.
In fact, you cannot say that `<samp>\ap</samp>´ is the argument of the underscore
command; this is because TeX expands everything; in one case, it sees that the
underscore is followed by the letter a, in the second case by a brace, hence a
delimiter for a math list.</p>
<p>In general, you will be faced with the following problem:
you say `<samp>\def\foo#1{\xbar#1}</samp>´ and
`<samp>\def\xbar#1{{\itshape #1}}</samp>´. Note the
double braces: the outer braces delimit the argument (of <samp>\def</samp>, i.e., the
body of <samp>\xbar</samp>), the inner braces delimit the scope of <samp>\itshape</samp>.
When you say `<samp>\foo{12}</samp>´ only the first letter is in italics,
another level of braces is needed. This is what you can see in the transcript
file of <i>Tralics</i>:</p>
<pre class="log-code">\foo #1-&gt;\xbar #1
#1&lt;-12
\xbar #1-&gt;{\itshape #1}
#1&lt;-1
{begin-group character {}
+stack: level + 3 for brace
{\itshape}
{font change \itshape}
...
</pre>
<p class="nofirst noindent">In this example, braces are missing in <samp>\foo</samp>, a remedy is to add a pair
of braces in the argument, like `<samp>\foo{{12}}</samp>´.
A comment in the TeX source says: Braces are effectively
removed when they surround a single Ord without sub/superscripts, or when they
surround an accent that is the nucleus of an Ord atom.
This is the case in `<samp>{{\tilde x}^2}^3</samp>´, hence you get
a <i>Double superscript</i> error; in this
case adding additional braces has no effect; the only solution consists in
adding something in the inner list (for instance a kern of width zero).</p>
<p>It is possible to define commands inside commands. For instance, you can say</p>
<pre class="latex-code">\def\foov#1{\def\xbar##1{#1##1###1####1}}
</pre>
<p class="nofirst noindent">When the scanner reads a token list, it handles `<samp>#</samp>´ signs (in fact,
any character of category 6) in a special manner inside a definition. The token
list of the previous line is <span style="text-decoration:underline">def</span> <span style="text-decoration:underline">foov</span> <tt>#</tt><sub>23</sub>
<tt>{</tt><sub>1</sub> <span style="text-decoration:underline">def</span> <span style="text-decoration:underline">xbar</span> <tt>#</tt><sub>6</sub>
<tt>1</tt><sub>12</sub> <tt>{</tt><sub>1</sub> <tt>1</tt><sub>25</sub>
<tt>#</tt><sub>6</sub> <tt>1</tt><sub>12</sub> <tt>#</tt><sub>6</sub> <tt>1</tt><sub>25</sub>
<tt>#</tt><sub>6</sub> <tt>#</tt><sub>6</sub> <tt>1</tt><sub>12</sub>
<tt>}</tt><sub>2</sub>
<tt>}</tt><sub>2</sub>. As you can see, there are three possibilities for a
sharp sign: before the brace that defines the body, it is
<tt>#</tt><sub>23</sub>, and the digit that follows is omitted<a id="uid137" href="#note24" title="uses #13, because no confusion with an active character can occur."><small>(note: </small>&#10163;<small>)</small></a>, it is <tt>1</tt><sub>25</sub>, <tt>2</tt><sub>25</sub>, in the body when followed
by 1, 2, etc<a id="uid138" href="#note25" title="uses 15, because no confusion with a character of category 5 can occur (See book, exercise 7.3)."><small>(note: </small>&#10163;<small>)</small></a>. It is
<tt>#</tt><sub>6</sub> when followed by a sharp sign. Said otherwise, a double
sharp sign in a definition is equivalent to a normal one outside.
Note the following trick.</p>
<pre class="latex-code">\catcode`\^6
\def\foo#1^2{#1^1## #^ ^# ^^}
\show\foo
</pre>
<p class="nofirst noindent">A quantity like <tt>1</tt><sub>25</sub> is shown as <samp>^1</samp>, because the hat character
appears as <samp>^2</samp> (i.e., the token <tt>^</tt><sub>25</sub>) in the
&lt;parameter text&gt; part of the
definition. Hence TeX prints
<samp>\foo=macro: #1^2-&gt;^1^1## ^^ ## ^^</samp>.
On the other hand, <i>Tralics</i> uses a
different mechanism for macros: it remembers the number of arguments and
the items between them, hence does not make the difference
with a macro defined as `<samp>\def\xbar^1#2{...}</samp>´<a id="uid139" href="#note26" title="Said otherwise \ifx\foo\xbar produces different results in and in Tralics; these two commands take t..."><small>(note: </small>&#10163;<small>)</small></a>.
<samp>\foo=macro: #1#2-&gt;#1#1## ^^ ## ^^</samp>.</p>
<p>Assume now that you say `<samp>\foov{17}</samp>´. The result of the expansion is the token
list shown above, with <tt>1</tt><sub>25</sub> replaced by
<tt>1</tt><sub>12</sub> <tt>7</tt><sub>12</sub>. When <samp>\xbar</samp> is defined the
<tt>#</tt><sub>6</sub> will read the character that follows, in this case
<tt>1</tt><sub>12</sub>. The situation is as if you had said
`<samp>\def\xbar#1{17#1#17##1}</samp>´. Evaluating <samp>\xbar</samp> may signal an error, because
of the `<samp>##</samp>´ (no error is signaled in case the argument of <samp>\xbar</samp> is
`<samp>\gee</samp>´, a command that ignores its first and third argument).
If you call <samp>\foo</samp> with `<samp>25</samp>´ instead of `<samp>17</samp>´ as argument, you will get the
following error
<i>Illegal parameter number in definition of \xbar</i><a id="uid140" href="#note27" title="This was accepted by Tralics until version 2.3: if a command takes one argument, the value of the se..."><small>(note: </small>&#10163;<small>)</small></a>.</p>

<h2 id="uid141">2.2. Defining commands in LaTeX</h2>
<p>You can say<a id="uid142"></a></p>
<pre class="latex-code">\newcommand*{\fooi}{foo}
\newcommand*{\fooii}[2]{#2#1}
\newcommand\fooiv[3][bar]{Seen#1#2#3}
</pre>
<p class="nofirst noindent">The first two lines define the same commands as in the start of
section <a href="#uid124" title="Defining new commands">2.1</a>. It is not possible to define <samp>\fooiii</samp>. However,
you can define <samp>\fooiv</samp>, a command that takes an optional argument.
In fact, you call it like this `<samp>\fooiv[X]YZ</samp>´; the expansion will be
`<samp>SeenXYZ</samp>´. You can put a pair of braces around the arguments,
like `<samp>\fooiv[{X}]{Y}{Z}</samp>´, the result is the same. Braces are needed for the
first argument in case you want a closing bracket in it. If the first argument
is `<samp>bar</samp>´, you can omit the `<samp>[bar]</samp>´: for this reason, the argument is called
optional. In LaTeX, <samp>\fooiv</samp> expands to <samp>\@protected@testopt</samp>, which
is a command to make <samp>\fooiv</samp> robust (i.e., in some cases, the test for an
optional argument is delayed); it then expands to <samp>\\fooiv</samp>,
which is a command that takes three arguments. In <i>Tralics</i>, no auxiliary
command is used. If you say `<samp>\show\fooiv</samp>´, <i>Tralics</i> will print the
following on the transcript file.</p>
<pre class="log-code">\fooiv=opt \long macro: bar#2#3-&gt;Seen#1#2#3.
</pre>
<p class="nofirst noindent">Commands defined by <samp>\newcommand</samp> are <samp>\long</samp><a id="uid143"></a> unless a star
is used (they accept paragraphs as arguments.)
The `opt´
before it shows that the command takes an optional argument. We show the value
of this argument instead of <samp>#1</samp> before the <samp>-&gt;</samp>. The following is printed by
LaTeX</p>
<pre class="latex-code">&gt; \fooiv=macro:
-&gt;\@protected@testopt \fooiv \\fooiv {bar}.
</pre>
<p class="nofirst noindent">Since being <samp>\long</samp> deals with reading parameters, in LaTeX,
it is the auxiliary command <samp>\\fooiv</samp> which is <samp>\long</samp>. This shows
how to ask LaTeX for the meaning of the auxiliary command and its answer:
<a id="uid144"></a></p>
<pre class="latex-code">\expandafter\show\csname\string\fooiv\endcsname
&gt; \\fooiv=\long macro:
[#1]#2#3-&gt;Seen#1#2#3.
</pre>
<p>The philosophy of LaTeX is that a user should not randomly redefine commands.
For this reason, you must use <samp>\newcommand</samp> (for an undefined command) or
<samp>\renewcommand</samp><a id="uid145"></a> (for overwriting an existing command).
In the same fashion, <samp>\renewenvironment</samp><a id="uid146"></a> is used to
redefine an environment; we shall see later that an environment `<samp>foo</samp>´ is
defined by two commands: <samp>\foo</samp> and <samp>\endfoo</samp>. You should never define
<samp>\endfoo</samp>. This explains error messages of the form:
<i>LaTeX Error: Command \endfoobar already defined.
Or name \end... illegal, see p.192 of the manual.</i>
In <i>Tralics</i>, we do not check that the command starts with `end´; the error
message is
<i>\newcommand: cannot define \foo; token is
already defined.</i> You can use <samp>\providecommand</samp><a id="uid147"></a>,
the syntax is the same. In this case, the definition is silently ignored if
the command already exists. You can use <samp>\DeclareRobustCommand</samp><a id="uid148"></a>, this
is defined by <i>Tralics</i> to be the same as <samp>\providecommand</samp> although the
LaTeX behavior is different.
You can say `<samp>\global</samp><samp>\def</samp><samp>\foo</samp><samp>{}</samp>´, this is
the same as `<samp>\gdef</samp><samp>\foo</samp><samp>{}</samp><a id="uid149"></a>, it defines <samp>\foo</samp> globally. You
cannot use the <samp>\global</samp> prefix for LaTeX commands. You can use
<samp>\CheckCommand</samp><a id="uid150"></a>. This is like <samp>\newcommand</samp>, but it does not define
the command; instead it defines a dummy command, then checks that the dummy
command has the same definition as the real one and produces a warning in case
of mismatch; this feature can be used before overwriting a command.</p>
<p>It is now time to explain that braces have two different purposes: as a
delimiter for an argument list, and also for grouping: in the same fashion
as the formula <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>z</mi><mo>(</mo><mi>x</mi><mo>+</mo><mi>y</mi><mo>)</mo></mrow></math></span> can be considered as <span class="math"><i>z</i></span> applied to <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>+</mo><mi>y</mi></mrow></math></span> or the
product of <span class="math"><i>z</i></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>+</mo><mi>y</mi></mrow></math></span>. In the case of `<samp>\textit</samp><samp>{12}</samp>´, the braces delimit
the arguments, in the case of `<samp>{\itshsape 12}</samp>´, the braces are used for
grouping. In both cases, all characters up to the closing brace are in
italics, but this property depends on the semantics of the operator, not the
syntax.
There is a big difference between these two use of braces: the tokenizer produces
token lists that are always balanced (there are as many opening delimiters as
closing delimiters, where delimiters are characters of category code 1 and 2).
On the other hand, if you say `<samp>\let\bgroup={</samp>´, the <samp>\bgroup</samp> has the same
meaning as an opening brace, hence triggers the start of a new group; but it is
not an explicit character (such things are called &#8220;implicit characters&#8221; in the
TeXbook).
When you say `<samp>\hbox...</samp>´<a id="uid151"></a> the opening brace can be implicit or explicit (in
this case, braces are used both as delimiters and for grouping).
Groups can also be defined by math shift characters (if you like
empty lines in the source of a math formula, you can say
`<samp>$\let\par\relax ...$</samp>´), or implicitly for a cell in a table,
or via <samp>\left</samp> and <samp>\right</samp> in a math formula, or via
<samp>\begingroup</samp> and <samp>\endgroup</samp> (they define a &#8220;semi simple group&#8221;).</p>
<p>One difference between plain TeX and LaTeX is the existence of
named groups: instead of saying `<samp>\beginfoo</samp>´ and `<samp>\endfoo</samp>´, you say
`<samp>\begin{foo}</samp>´ and `<samp>\end{foo}</samp>´. This is interpreted by LaTeX as</p>
<ol>
<li id="uid152"><p class="nofirst noindent">When <samp>\begin{foo}</samp><a id="uid153"></a> is seen,</p>
<ol>
<li id="uid154"><p class="nofirst noindent">a test is made to see if `<samp>\foo</samp>´
exists: if it does not exist, an error is signaled and steps
(<a href="#uid157">1.3</a>) and (<a href="#uid158">1.4</a>) are skipped (via a call to <samp>\expandafter</samp>):</p>
</li>
<li id="uid155"><p class="nofirst noindent">the command <samp>\begingroup</samp><a id="uid156"></a> is executed (with space hacking);</p>
</li>
<li id="uid157"><p class="nofirst noindent">the name `<samp>foo</samp>´ is stored in <samp>\@currenvir</samp>;</p>
</li>
<li id="uid158"><p class="nofirst noindent">the command <samp>\foo</samp> is executed.</p>
</li></ol>
</li>
<li id="uid159"><p class="nofirst noindent">When <samp>\end{foo}</samp><a id="uid160"></a> is seen,</p>
<ol>
<li id="uid161"><p class="nofirst noindent">the command <samp>\endfoo</samp> is executed;</p>
</li>
<li id="uid162"><p class="nofirst noindent"> the name `<samp>foo</samp>´ is compared with <samp>\@currenvir</samp>, an error is signaled
in case of mismatch;</p>
</li>
<li id="uid163"><p class="nofirst noindent"> the command <samp>\endgroup</samp><a id="uid164"></a> is executed (with more space hacking).<a id="uid165"></a></p>
</li></ol>
</li></ol>
<p>This mechanism is not symmetric. It is implemented in <i>Tralics</i> in a similar
manner (but there are some differences that can be analyzed by a malicious
user). The first remark is the following: on entry, you may get a message
that says <i>LaTeX Error: Environment unknown undefined</i>, on exit you
would get <i>LaTeX Error: \begin{document} ended by
\end{unknown}</i>. The trick is that the <samp>\endfoo</samp> token
(created by <samp>\csname</samp>) is never undefined (its default action is
<samp>\relax</samp>).
One important point is that the command used in step (<a href="#uid158">1.4</a>)
is <samp>\foo</samp>, not <samp>\beginfoo</samp>.
In <a href="#bid5" title="Mittelbach, Goossens, Braams, Carlisle, Rowley2004">[6, example 7-3-1]</a>, there is an example
of `<samp>bfseries</samp>´ as an environment; there is no command <samp>\endbfseries</samp>.
Note that in step (<a href="#uid158">1.4</a>), the token that comes after <samp>\foo</samp> is
the token after `<samp>\begin{foo}</samp>´, and this means that <samp>\foo</samp> can grab
its arguments; on the other hand the token after <samp>\endfoo</samp> in step (<a href="#uid161">2.1</a>)
is the start of the sequence that checks the environment name:
thus <samp>\endfoo</samp> cannot read its argument (we shall see in a minute why
steps (<a href="#uid161">2.1</a>) and (<a href="#uid162">2.2</a>) cannot be swapped). In the current version of
<i>Tralics</i>, the &#8220;space hacking&#8221; is not implemented; we shall not discuss it
here.</p>
<p>There are some tokens whose name start with `end´, you should no use these as
environments. Consider <samp>\begingroup</samp><a id="uid166"></a> and <samp>\endgroup</samp><a id="uid167"></a>, the
commands explained above; consider <samp>\input</samp><a id="uid168"></a>, <samp>\endinput</samp><a id="uid169"></a>,
these are TeX primitives for inputting from a file; consider <samp>\beginL</samp>,
<samp>\endL</samp>, <samp>\beginR</samp>, <samp>\endR</samp>, the &#1013;-TeX extensions for left-to-right
or right-to-left writing; consider
<samp>\citation</samp><a id="uid170"></a> and <samp>\endcitation</samp><a id="uid171"></a>, these are <i>Tralics</i> commands
for the bibliography; the command <samp>\endsec</samp><a id="uid172"></a> indicates the end of a
section; the <samp>\endlinechar</samp><a id="uid173"></a> is a reference to an integer register
that contains the character to be added at the end of each line. Commands
<samp>\endgraf</samp><a id="uid174"></a> and <samp>\endline</samp><a id="uid175"></a> are aliases to <samp>\par</samp> and <samp>\cr</samp>.</p>
<p>This is how you can define new environments:<a id="uid176"></a></p>
<pre class="latex-code">\newenvironment{x}[2]{#1BY\begin{y}#2AY} {by\end{y}ay}
\newenvironment{y}{Z}{z}
\begin{x}a b c \end{x}
</pre>
<p class="nofirst noindent">This typesets as <samp>aBYZbAY c byzay</samp>. The <samp>\begin</samp> part reads two
arguments. The <samp>\end</samp> part takes no argument; it could use the first
argument of the <samp>\begin</samp>, provided that this one saves it in a command.
In verbose mode, the following is printed
by <i>Tralics</i> in the transcript file. We have removed all lines with
`Character sequence´ and `Text´.</p>
<pre class="log-code"><span class="prenumber">1</span> [185] \begin{x}a b c \end{x}
<span class="prenumber">2</span> {\begin}
<span class="prenumber">3</span> {\begin x}
<span class="prenumber">4</span> +stack: level + 3 for environment entered on line 185
<span class="prenumber">5</span> \x #1#2-&gt;#1BY\begin {y}#2AY
<span class="prenumber">6</span> #1&lt;-a
<span class="prenumber">7</span> #2&lt;-b
<span class="prenumber">8</span> {\begin}
<span class="prenumber">9</span> {\begin y}
<span class="prenumber">10</span> +stack: level + 4 for environment entered on line 185
<span class="prenumber">11</span> \y -&gt;Z
<span class="prenumber">12</span> {\end}
<span class="prenumber">13</span> {\end x}
<span class="prenumber">14</span> \endx -&gt;by\end {y}ay
<span class="prenumber">15</span> {\end}
<span class="prenumber">16</span> {\end y}
<span class="prenumber">17</span> \endy -&gt;z
<span class="prenumber">18</span> {\endgroup (for env)}
<span class="prenumber">19</span> +stack: ending environment y; resuming x.
<span class="prenumber">20</span> +stack: level - 4 for environment from line 185
<span class="prenumber">21</span> {\endgroup (for env)}
<span class="prenumber">22</span> +stack: ending environment x; resuming document.
<span class="prenumber">23</span> +stack: level - 3 for environment from line 185
</pre>
<p class="nofirst noindent">At lines 4, 10, 20 and 23, you can see that the current &#8220;level&#8221; changes
(this is what TeX calls the &#8220;semantic level&#8221;).
The default level is level one, our example was done at level two, the first
environment is at level three, the second at level four<a id="uid177" href="#note28" title="The command \currentgrouplevel defined by &#1013;- returns one less than this value."><small>(note: </small>&#10163;<small>)</small></a>.
When you see
`level + 4´, it is because the level has just incremented; if you see
`level - 4´ it means that the level will decrease. At lines 18 and 21, you
see that <i>Tralics</i> uses a special `<samp>\endgroup</samp>´<a id="uid178"></a> token.
Look closely at lines 13 and 19: when <i>Tralics</i> sees `<samp>\end{x}</samp>´, the current
environment is `y´, it is only after evaluation of <samp>\endx</samp> that the
environment is `x´ again; this example shows that
steps (<a href="#uid161">2.1</a>) and (<a href="#uid162">2.2</a>) cannot be swapped. In <i>Tralics</i> the name
of the environment cannot be modified by the user.</p>
<p>Because of the <samp>\begingroup</samp> command, everything, until the <samp>\endgroup</samp>,
is local to this group; in particular <samp>\@currenvir</samp> will be restored.
If you say something like</p>
<pre class="latex-code">\begin{zfoo}\renewcommand\endzfoo{A}\end{zfoo}
</pre>
<p class="nofirst noindent">the command associated to <samp>\end{zfoo}</samp> is locally redefined. In some
cases, this is a big mistake: in <i>Tralics</i>, the start command can assume that
the corresponding end command is executed or an error is signaled. In fact,
the meaning of <samp>\endzfoo</samp> is stored on a special stack, and restored by
<samp>\end{zfoo}</samp>. There is a big hack in LaTeX (and also in <i>Tralics</i>):
since no text should follow the end of the document, there is no need to store
on the stack every definition given between the start and end of the
document; thus <samp>\document</samp> executes a <samp>\endgroup</samp>; logically,
<samp>\enddocument</samp><a id="uid179"></a> should insert a <samp>\begingroup</samp> token; in LaTeX, this is
not needed because step (<a href="#uid163">2.3</a>) is never executed. In <i>Tralics</i> we re-insert a <samp>\begin</samp>, because we have to typeset the bibliography.
(as a consequence, the start-line in the trace is the line that contains
<samp>\end</samp>). Moreover, action cannot be
completely trivial, because we have to re-insert all tokens saved by
<samp>\AtEndDocument</samp><a id="uid180"></a>. We show here the transcript file,
assuming that only one token has been saved, namely <samp>\empty</samp>. You can see the
stack increase and decrease; you can see the <samp>\endinput</samp> that closes the
current file; you can also see a second <samp>\enddocument</samp> command whose
action is to pop the <span class="sansserif">XML</span> stack; it is marked `pop (module)´ for historical
reasons.</p>
<pre class="log-code">[31] \end{document}
{\end}
{\end document}
+stack: level + 2 for environment entered on line 31
{\enddocument}
{\endallinput}
\empty -&gt;
{\enddocument}
{Pop (module) 2: document_v div0_v div1_v}
{\endgroup (for env)}
+stack: ending environment document; resuming document.
+stack: level - 2 for environment from line 31
++ Input stack empty at end of file
</pre>
<p>The last line of the transcript file shown above says that the current file
was not inputted by another one. What happens if a file <span class="sansserif">foo.tex</span>
contains <samp>\input tralics-rr</samp>, followed by some junk?
Well, the purpose of the
pseudo command <samp>\endallinput</samp> is to forget about everything. The
transcript file would contain</p>
<pre class="log-code">++ End of file tralics-rr.tex
++ cur_file_pos restored to 0
++ Input stack -- 1 tralics-rr.tex
++ Input stack empty at end of file
</pre>
<p>Clearly, you cannot use a document environment in a document; if you try,
LaTeX complains with <i>LaTeX Error: Can be used only in preamble</i>
(the preamble is everything before <samp>\begin{document}</samp>). The error message
of <i>Tralics</i> is a bit more explicit: <i>Two environments named document</i>.
If you put <samp>\begin{it}</samp> before <samp>\begin{document}</samp>, LaTeX does not complain.
The trouble is at the end: you will get an error of the form
<i>LaTeX Error: \begin{it} on input
line 9 ended by \end{document}</i>,
followed by a TeX warning :
<i>(\end occurred inside a group at level 1)</i>.
In <i>Tralics</i>, an error is signaled at the start:
<i>\begin{document} not at level 0</i>.
On page <a href="#uid3146" title="Translating the Raweb">6.5</a>, you see statistics of the form `Save stack +1582
-1582´; this means that the semantic stack pointer has increased 1582
times, it has decreased the same number of times, so that the end of the
document has been seen at level zero, no warning is issued in the case the two
numbers are not the same.</p>
<p>The package <span class="sansserif">checkend</span> contains a magic command whose effect is to
unwind the stack, signaling an error if unclosed items are seen. This command
should only be used at end of document, in the end-document hook. The result
of using the package produces a result like the following:</p>
<pre class="log-code">Error signaled at line 687 of file testkeyval.tex:
Non-closed \begingroup started at line 683.
Non-closed brace started at line 437.
Non-closed environment `it' started at line 213.
</pre>

<h2 id="uid181">2.3. Some small examples</h2>
<p>Remember that <samp>\foo</samp> and <samp>\;</samp> are two commands who differ only in the
following behavior: when the tokenizer sees a backslash followed by a semi
colon (whose category code is not letter), it constructs a command whose name
is formed by that character (and sets the internal state to a mode in which
spaces are not ignored). On the other hand, if the backslash is followed by a
letter, all letters are read (and the state is set such that following spaces
will be ignored). By space,
we mean here every character that has the category code of a space. A space
after <samp>\verb</samp> is never ignored, but it is unwise to use this space as
delimiter. In the case of <samp>\foo</samp>, the tokenizer allocates a slot on the
hash table (unless <samp>\foo</samp> already exists). The possibility to change
category codes dynamically is interesting (however, the implementation of
<samp>\verb</samp><a id="uid182"></a> in <i>Tralics</i> uses no category code changes, and is more
efficient). The two commands <samp>\makeatletter</samp><a id="uid183"></a>
and <samp>\makeatother</samp><a id="uid184"></a> change the category codes of the at
sign character @, to letter and other. For instance</p>
<pre class="latex-code">\makeatletter
  \def\foo@val{}
  \def\foo#1{\def\foo@val{#1}\check@foo}
  \def\usefoo{\foo@val}
\makeatother
</pre>
<p class="nofirst noindent">In this example, we have two user commands: <samp>\foo</samp> that defines a variable,
and <samp>\usefoo</samp> that uses it. The variable <samp>\foo@val</samp> has a reserved name;
there is a command <samp>\check@foo</samp> that makes sure that the argument is
correct. The default category code of <samp>@</samp> is 12; in most of the examples, we
shall assume that it is 11, because these examples come from the LaTeX kernel or style files where the default category code is 11.</p>
<p>As explained above, `<samp>\catcode`\$=3</samp>´ changes the category code of the dollar
sign. What follows has to be a character code (a number between 0 and 255)
followed by an optional equals sign, followed by a valid category code (an
integer between 0 and 15). Assume that you say <samp>\def\A{25}</samp>, followed by
`<samp>\catcode\A7.</samp>´. In the case where standard category codes are in effect this is
tokenised as <span style="text-decoration:underline">catcode</span> <span style="text-decoration:underline">A</span> <tt>7</tt><sub>12</sub> <tt>.</tt><sub>12</sub>. But when a number is
read, all tokens are expanded, until the end of the number is found (in the
case where the number is formed by digits, one space character after the
number will be read, if possible). In this case, TeX reads the digits 2, 5
and 7. It stops reading at the dot. This is an error (signaled by <i>Tralics</i> as
<i>Bad character code replaced by 0: 257</i>). Then TeX reads an optional
equals sign (there is none) and an integer (there is none). Hence you get a
second error (<i>Missing number, treated as zero</i>). The result is that
you have changed the category code of the null character to zero (like
backslash). Since version 2.9, <i>Tralics</i> accepts 16bit characters, so that the
number 257 is valid, and you changed the category code of the letter `latin
small letter a with caron´ to zero.</p>
<p>If you want to put 7 in the category code of the character defined
by the command <samp>\A</samp>, you should say `<samp>\catcode\A=7~</samp>´.<a id="uid185" href="#note29" title="Here, and in the lines that follow, you should replace the tilde by anything that stops scanning the number."><small>(note: </small>&#10163;<small>)</small></a>
It is possible to make
<samp>\A</samp> a reference to the character number 25, by using
<samp>\chardef</samp><a id="uid186"></a>. Thus you can say
`<samp>\chardef\A25~</samp>´ and
`<samp>\catcode\A7~</samp>´. Note that, in the context of routines like scanint, a
character number is a valid number; so that <samp>\A</samp> can be used as the number
25, wherever a number is required. In the sources of LaTeX you can see
`<samp>\chardef\active=13</samp>´<a id="uid187"></a>. You will also see
`<samp>\mathchardef\@cclvi=256</samp>´<a id="uid188"></a>;
there is no difference between <samp>\chardef</samp> and
<samp>\mathchardef</samp>, except that a character is in the range 0-255, while a math
char can take larger values (less than <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn> <mn>15</mn> </msup></math></span>). You can use
<samp>\countdef\B26</samp><a id="uid189"></a> (this
will make <samp>\B</samp> as a reference to count register number 26),
<samp>\dimendef\C27</samp><a id="uid190"></a> (this
will make <samp>\C</samp> as a reference to dimension register number 27),
<samp>\skipdef\D28</samp><a id="uid191"></a> (this
will make <samp>\D</samp> as a reference to skip register number 28),
<samp>\muskipdef\E29</samp><a id="uid192"></a> (this
will make <samp>\E</samp> as a reference to muskip register number 29),
and <samp>\toksdef\F30</samp><a id="uid193"></a> (this
will make <samp>\F</samp> as a reference to token register number 30).
There is no `<samp>\boxdef</samp>´. The reason is that, if you want to copy the value of
counter 1 into counter 0, you say
<samp>\count0=\count1</samp>. If you say <samp>\count@=\B</samp>
this will put the value of the counter 26 into
<samp>\count@</samp><a id="uid194"></a> (this
is the counter 255). However, you say
<samp>\setbox0=\copy1</samp><a id="uid195"></a> if you want to copy the content of
box 1 into box 0: the syntax is not the same. Note that <samp>\setbox0=\box1</samp> copies and clears the box number one.
When you use a command like
<samp>\chardef</samp>, a line will be added to the transcript file, even in
non-verbose mode, see section <a href="#uid3817" title="Bootstrap code">6.13</a>.</p>
<p>Commands can be defined via `<samp>\let</samp>´<a id="uid196"></a>. You say
<samp>\let\A=\B</samp>, where
<samp>\A</samp> is a token that can be defined (active characters or commands; TeX does not care if the token is defined or not). It is followed by
&lt;equals&gt;&lt;one optional space&gt;. This means that TeX reads all
space tokens; if the first unread token is an equals sign, it is read
as well as the next token, provided that it is a space. If the equals sign is
followed by two space tokens, only one is read. Instead of <samp>\B</samp>, you can put
any token. After that, the current meaning of <samp>\A</samp> will be the current
meaning of <samp>\B</samp>. For instance, if you say
<samp>\let</samp><samp>\foo</samp><samp>\bar</samp><samp>\show</samp><samp>\foo</samp>
you will get <samp>\foo=macro:-&gt;\mathaccent "7016\relax</samp>.
In plain TeX, you would
see a space instead of <samp>\relax</samp> (both a space and a <samp>\relax</samp> indicate the
end of the number). In <i>Tralics</i>, you would see <samp>\foo=\bar</samp>, this is because
<samp>\bar</samp> is a primitive, instead of a user defined command. If you say
<samp>\let\A=+</samp>, then <samp>\A</samp> will behave like a <samp>+</samp> character (of category 12).
In fact, this is called an implicit character, and sometimes an explicit
character is required. For instance in the case <samp>\parindent=-3.4pt</samp>, the
minus sign, the digits, the dot, and the two letters pt must be explicit
characters. However, after<a id="uid197"></a></p>
<pre class="latex-code">\let\bgroup={  \let\egroup=} \let\sp=^ \let\sb=_
</pre>
<p class="nofirst noindent">there is no difference between <samp>$x\sp\bgroup a\sb b\egroup$</samp> and
<samp>$x^{a_b}$</samp>. The assignments shown here are made by <i>Tralics</i> when bootstrapping, and the command so defined should be considered primitives.
A token list has to be well balanced against explicit braces. For instance</p>
<pre class="latex-code">\def\foo{{\catcode`}=0\egroup}
</pre>
<p class="nofirst noindent">satisfies the requirements. The body of the command consists in
<tt>{</tt><sub>1</sub> <span style="text-decoration:underline">catcode</span> <tt>`</tt><sub>12</sub>
<tt>}</tt><sub>2</sub> <tt>=</tt><sub>12</sub> <tt>0</tt><sub>12</sub>
<span style="text-decoration:underline">egroup</span>. If you evaluate <samp>\foo</samp>, the <samp>\catcode</samp> command will read
the four tokens that follow; it will modify the category code of the opening
brace. All this happens inside a group opened by <tt>{</tt><sub>1</sub> and
closed by <span style="text-decoration:underline">egroup</span>, so that this is harmless. One use of <samp>\let</samp> is
the following:</p>
<pre class="latex-code">\def\fooA{a very long command}
\def\fooB{another very long command}
\def\xbar#1{\ifx 0#1\let\foo\fooA \else \let\foo\fooB\fi}
</pre>
<p class="nofirst noindent">Here we use the fact that <samp>\let</samp> just moves a pointer.<a id="uid198" href="#note30" title="The reference count of the token list of the body of \fooA or \fooB must also be increased."><small>(note: </small>&#10163;<small>)</small></a>
This is faster than copying a list. In particular, consider<a id="uid199"></a></p>
<pre class="latex-code">\def\xbar#1{\ifx 0#1\fooA \else \fooB\fi}
\def\xbar#1{\ifx 0#1\let\foo\fooA \else \let\foo\fooB\fi\foo}
</pre>
<p class="nofirst noindent">The first line executes conditionally one of <samp>\fooA</samp> and
<samp>\fooB</samp>. However, this command cannot read an argument (because <samp>\fooA</samp>
is followed by <samp>\else</samp> and <samp>\fooB</samp> by <samp>\fi</samp>). In the second case, we
define <samp>\foo</samp> conditionally, and it can read its arguments without problem.</p>
<p>You can use the following construct</p>
<pre class="latex-code">\def\addtofoo#1{\let\oldfoo\foo\def\foo{#1\oldfoo}}
% example of use
\def\foo{A}\foo
\addtofoo{B}\foo
</pre>
<p class="nofirst noindent">This typesets as

ABA. Beware: the <samp>\addtofoo</samp> command can be
used only once (the old value of <samp>\oldfoo</samp> has to be saved...). We shall see
later how to replace in the definition above the <samp>\oldfoo</samp> by its value,
using either tokens lists or <samp>\edef</samp>, using a method where <samp>\oldfoo</samp> is a
temporary. This is another example:</p>
<pre class="latex-code">\def\double#1#2{\let#1#2\def#2{#1#1}}
% example
\def\B{\C}\def\C{to}\double\tmp\B
</pre>
<p class="nofirst noindent">
Here `<samp>\B</samp>´ typesets as `toto´. In fact <samp>\B</samp> is defined as
`<samp>\tmp</samp><samp>\tmp</samp>´, where
<samp>\tmp</samp> is the old definition of <samp>\B</samp>, namely a command that expands to
`<samp>\C</samp>´. It you say <samp>\def\C{ti}\B</samp>, you will get
`titi´. If in <samp>\double</samp> the <samp>\let</samp> is replaced by a <samp>\def</samp> as
<samp>\def#1{#2}</samp>, the
expansion of <samp>\tmp</samp> would have been <samp>\B</samp>, and <samp>\B</samp> would have been
the same as <samp>\B</samp><samp>\B</samp>. You see the problem? This could provoke a stack
overflow, a parameter stack overflow, or even a program crash.</p>
<p>Let´s mention the existence of <samp>\futurelet</samp><samp>\A</samp><samp>\B</samp><samp>\C</samp><a id="uid200"></a>. It is the
same as <samp>\let</samp><samp>\A</samp><samp>\C</samp><samp>\B</samp><samp>\C</samp>. The usefulness of such a
construct will be explained later.</p>
<p>You can say <samp>\expandafter\A\B</samp><a id="uid201"></a>. In such a case, TeX reads
the first token, saves it somewhere, calls expand if possible, re-inserts the
saved token. Nothing special happens if the second token (here <samp>\B</samp>) cannot
be expanded, because it is a non-active character, or a command like
<samp>\par</samp> or <samp>\relax</samp>. But assume that <samp>\A</samp> is a command that uses one
argument (for instance <samp>\textit</samp>) and <samp>\B</samp> expands to `<samp>foo</samp>´. If you
use <samp>\expandafter</samp>, only the first letter will be in italics. Assume that
<samp>\foo</samp> expands to a dollar sign. Then <samp>$\foo</samp>
is an empty math formula because <samp>\foo</samp> is not expanded,
but <samp>\expandafter$\foo.$$</samp>
is a display math formula with a dot. The main reason why tokens are not
expanded after a dollar sign (when TeX looks for an other dollar sign) is
that a test <samp>$\ifmmode true\fi$</samp> should evaluate to true. You can use
<samp>\expandafter</samp> if you want the test to be executed outside math mode.
Note: if a table contains a template of the form `<samp>$#$</samp>´, if the cell starts
with <samp>\ifmmode</samp>, then the test is expanded (i.e. evaluated) before math
mode is entered, because TeX is looking for an <samp>\omit</samp> token. As a
consequence you should always put `<samp>\relax</samp>´ before a test (this is not needed
if a command is made &#8220;Robust&#8221;).</p>
<p>Look carefully at the following lines:</p>
<pre class="latex-code"><span class="prenumber">1</span> \def\toto{\titi!}\def\titi{\tata}\def\tata{\tutu}
<span class="prenumber">2</span> \expandafter\expandafter\expandafter\def\toto{5}
<span class="prenumber">3</span> \let\E\expandafter \E\E\E\def\toto{6}
<span class="prenumber">4</span> \def\E{\expandafter} \E\E\E\def\toto{7}
<span class="prenumber">5</span> \expandafter\def\toto{8}
</pre>
<p class="nofirst noindent">On the first line we define three commands <samp>\toto</samp>, <samp>\titi</samp> and
<samp>\tata</samp>. As we shall see, lines 2, 3 and 4 do not change the meaning of
<samp>\toto</samp>, so that, on line 5, the expansion of `<samp>\toto</samp>´ is `<samp>\titi!</samp>´. In
this case, the effect of the <samp>\expandafter</samp> is to replace `<samp>\toto</samp>´ by
`<samp>\titi!</samp>´. Hence, line 5 defines a macro <samp>\titi</samp>, that has to be followed
by an exclamation point, takes no argument, and expands to 8.
Consider now line 2. The first <samp>\expandafter</samp> puts apart the
<samp>\expandafter</samp> token; it expands the next token, which is
<samp>\expandafter</samp>, and the expansion of this is: read the token that follows
(here `<samp>\def</samp>´), and expand the token that follows. This is `<samp>\toto</samp>´, that
expands to `<samp>\titi!</samp>´. If we pop back the two tokens, line 2 is equivalent to
`<samp>\expandafter\def\titi!{5}</samp>´. This looks like line 5, so that it is the same as
`<samp>\def\tata!{5}</samp>´. There is no difference between lines 2 and 3: the <samp>\E</samp>
command behaves exactly like <samp>\expandafter</samp>. Consider now line 4. What
TeX does is expand the first token. It is <samp>\E</samp>, it expands to
`<samp>\expandafter</samp>´. Since the token can be expanded, it will. Thus TeX reads and remembers the token that follows. It expands the next token (the
third `<samp>\E</samp>´). Its expansion is `<samp>\expandafter</samp>´. Hence, line 4 is equivalent
to `<samp>\E\expandafter\def\toto{7}</samp>´. Now, the <samp>\E</samp> in this list has as effect to
try to expand the second token; it is <samp>\def</samp>, which cannot be
expanded. Hence this `<samp>\E</samp>´ is useless. Line 4 is equivalent to
`<samp>\expandafter\def\toto{7}</samp>´. And this defines <samp>\titi</samp>. We give here the trace
of <i>Tralics</i> (it is a bit more complete then the trace of TeX):</p>
<pre class="log-code">\E -&gt;\expandafter
{\expandafter \E \E}
\E -&gt;\expandafter
\E -&gt;\expandafter
{\expandafter \expandafter \def}
{\expandafter \def \toto}
\toto -&gt;\titi !
{\def}
{\def \titi !-&gt;7}
</pre>
<p>A question is : how many commands with two characters can be defined in
<i>Tralics</i>? The answer is 255 squared (all characters but the null character are
allowed<a id="uid202" href="#note31" title="Since Tralics2.9 uses 16bit integers for characters, this number is much larger, nearly 2 32 ; it is..."><small>(note: </small>&#10163;<small>)</small></a>). Of course, if you say `<samp>\def\++{}</samp>´, this defines the `<samp>\+</samp>´ command
not the `<samp>\++</samp>´. You could imagine to change category codes (but, in a
construction like `<samp>\def\{}{}</samp>, it is impossible to give a different role to
the first and second opening brace). The solution is given by
<samp>\csname</samp><a id="uid203"></a>, you can use it like this
`<samp>\csname1+1=2\endcsname</samp>´. Note that this typesets nothing: when <samp>\csname</samp>
manufactures a new control sequence name, it defines it as being <samp>\relax</samp>
(the control sequence will exist, until the end of the job).
You can hide the <samp>\csname</samp> command, like this</p>
<pre class="latex-code">\def\nameuse#1{\csname #1\endcsname}
\nameuse{1+1=2}
</pre>
<p class="nofirst noindent">If you want to define such a beast, you must use <samp>\expandafter</samp>.</p>
<pre class="latex-code">\def\namedef#1{\expandafter\def\csname #1\endcsname}
\namedef{1+1=2}{true}
</pre>
<p class="nofirst noindent">The two commands <samp>\@namedef</samp><a id="uid204"></a>
and <samp>\@nameuse</samp><a id="uid205"></a> are defined by LaTeX and <i>Tralics</i> like <samp>\namedef</samp> and <samp>\nameuse</samp>.</p>
<p>You can also say <samp>\namedef{++}#1{#1+#1}</samp> followed by
<samp>\nameuse{++}{3}</samp>. This
should give 3+3. If you want a macro named <samp>\{}</samp>, you can say
<samp>\nameuse{\string\{\string\}}</samp>, provided that <samp>\escapechar=-1</samp>. If you do not
like this setting of <samp>\escapechar</samp>, you can define a command, say
<samp>\Lbra</samp>, that expands to <tt>{</tt><sub>12</sub>
(an inactive opening brace character) using whatever
method seems best. For instance<a id="uid206"></a></p>
<pre class="latex-code">{\escapechar=-1 \xdef\Lbra{\string\{}\xdef\Rbra{\string\}}}
\namedef{\Lbra\Rbra}{Hey}
</pre>
<p class="nofirst noindent">We explained above what happens when three <samp>\expandafter</samp> come in a row. Thus,
it should not surprise you that the following command defines <samp>\foo</samp>.</p>
<pre class="latex-code">\expandafter\expandafter\expandafter\def\nameuse{foo}{12}
</pre>
<p>A more realistic example of <samp>\csname</samp> is</p>
<pre class="latex-code">\def\allocate#1{....}
\def\newcount#1{\allocate{ctr}\countdef#1\allocationnumber}
\def\newcounter#1{\expandafter\newcount\csname c@#1\endcsname}
</pre>
<p class="nofirst noindent"><a id="uid207"></a>
There are ten such commands in LaTeX,
<samp>\newcount</samp><a id="uid208"></a>, <samp>\newtoks</samp><a id="uid209"></a>, <samp>\newbox</samp><a id="uid210"></a>,
<samp>\newdimen</samp><a id="uid211"></a>, <samp>\newskip</samp><a id="uid212"></a>, <samp>\newmuskip</samp><a id="uid213"></a>,
<samp>\newread</samp><a id="uid214"></a>, <samp>\newwrite</samp><a id="uid215"></a>, <samp>\newlanguage</samp><a id="uid216"></a> are
implemented in <i>Tralics</i>.
The equivalent of <samp>\allocate</samp> takes as
argument a type (for counters, dimensions, skip registers,
muskip registers, box registers, token registers,
input registers, output register, math families, language codes,
insertions, etc) and allocates
a unique number depending on the type, and puts it in <samp>\allocationnumber</samp>.
Count registers between 10 and 19 are used for this purpose, and the user
should not modify them. Command <samp>\new@mathgroup</samp> is not implemented because
math groups are unused.
Note that <samp>\newsavebox</samp><a id="uid217"></a> and <samp>\newdimen</samp><a id="uid218"></a>
are the same as <samp>\newbox</samp> and <samp>\newskip</samp> since <i>Tralics</i> does not
check redefinition of the command; the command <samp>\newinsert</samp><a id="uid219"></a> is not
implemented (this requires a box register, a count register, a dimen register
and a skip register; each unprocessed float in LaTeX uses a insert, this may
trigger a <i>too many unprocessed floats</i> error).
The command <samp>\newhelp</samp><a id="uid220"></a> is not implemented in <i>Tralics</i>, it allocates
no counter.</p>
<p>For instance, if you say <samp>\newcount</samp><samp>\Foo</samp>, the allocated number could be 110, if you say
<samp>\newskip</samp><!--PASS THROUGH allowbreak--><samp>\Bar</samp>, the number could be 46. In the first case, the result is as if
you had said <samp>\countdef\Foo110</samp>.
In the case of <samp>\newcounter{foo}</samp>,
the result is as <samp>\newcount\c@foo111</samp>. Note that there are only 256
count registers available in TeX<a id="uid221" href="#note32" title="many more in &#1013;-, but they are dynamically allocated; in Tralics2.9, the limit is 4096"><small>(note: </small>&#10163;<small>)</small></a>.
You can use registers zero to nine as scratch
registers (Do not forget that <samp>\count0</samp> contains the current page number),
LaTeX uses registers 10 to 21 for its allocation mechanism. In the current
version, the first free counter is 79. Some other counters are allocated by
the class, and the package (in the transcript file, one line is printed for
every call to <samp>\allocate</samp>, for instance:
<samp>\c@chapter=\count80</samp>; in <i>Tralics</i>, the line looks like
<samp>{\countdef \c@foo=\count43}</samp>).</p>
<p>A very important point is that all tokens between <samp>\csname</samp><a id="uid222"></a> and
<samp>\endcsname</samp><a id="uid223"></a> are fully expanded. It is an error if a non-character token
remains. Thus it is important to know which commands are expanded, and those
that cannot be expanded. The exact rules are in the TeXbook, chapter 20. As a rule of
thumb, commands that do no typesetting and modify no internal table can be
expanded. More precisely: user defined commands, conversions like
<samp>\string</samp><a id="uid224"></a>, <samp>\number</samp><a id="uid225"></a>, conditionals like
<samp>\fi</samp><a id="uid226"></a>, marks, and some special commands like <samp>\csname</samp>,
<samp>\expandafter</samp>, <samp>\the</samp><a id="uid227"></a> can be expanded. A construction like
<samp>\csname\char`A\endcsname</samp> is invalid.</p>
<p>If you say <samp>\noexpand</samp><samp>\foo</samp><a id="uid228"></a>, the result is <samp>\foo</samp>,
unexpanded. Example:</p>
<pre class="latex-code"><span class="prenumber">1</span> \def\FOO{12}
<span class="prenumber">2</span> %\csname\noexpand\FOO\endcsname  %bad
<span class="prenumber">3</span> \edef\xbar{\noexpand\FOO}
<span class="prenumber">4</span> \noexpand\FOO
<span class="prenumber">5</span> \expandafter\textit\FOO
<span class="prenumber">6</span> \expandafter\textit\noexpand\FOO
<span class="prenumber">7</span> \count0=1\FOO
<span class="prenumber">8</span> \count0=1\noexpand\FOO
</pre>
<p class="nofirst noindent">Line two is an error: the no-expanded <samp>\FOO</samp> is not a character.
On line 3, the body of <samp>\xbar</samp> is `<samp>\FOO</samp>´, it will be expanded later. The
translation of line 4 is empty (the command <samp>\FOO</samp> is temporarily seen as
<samp>\relax</samp>, and <samp>\relax</samp> does nothing). Because of the <samp>\expandafter</samp>,
the argument of <samp>\textit</samp> on line 5 is 1, on line 6 it is 12.
On line 7, 112 is put in <samp>\count0</samp>, because <samp>\FOO</samp> is expanded.
On line 8, 1 is put in the register, and 12 is typeset. On lines 8 and 6,
<samp>\FOO</samp> is expanded twice, the first expansion being inhibited by the
<samp>\noexpand</samp>.</p>
<p>Some quantities are never expanded, for instance <samp>\lowercase</samp> (this is
black magic), <samp>\def</samp> (more generally all assignments), <samp>\relax</samp> (it does
nothing, but stops scanning integers, dimensions, glue, etc), <samp>\hbox</samp>,
<samp>\par</samp><a id="uid229" href="#note33" title="Unless redefined by"><small>(note: </small>&#10163;<small>)</small></a>, <samp>\left</samp>, etc.
There are cases when an expandable token is not expanded: ten cases in
TeX, and four additional cases in &#1013;-TeX, these are described in section
<a href="#uid3749" title="Extensions">6.12</a>.
Be careful with constructs like <samp>\csnameé</samp><samp>\endcsname</samp><a id="uid230"></a>: LaTeX may
signal an error involving <samp>\unhbox</samp>.</p>
<p>A command can be defined via <samp>\edef</samp><a id="uid231"></a> instead of <samp>\def</samp>
(<samp>\xdef</samp><a id="uid232"></a> is the same as <samp>\edef</samp>, with an implicit
<samp>\global</samp>
prefix). All tokens, unless defined with <samp>\protected</samp>, in the body of the definition are expanded. Example:</p>
<pre class="latex-code">\def\A{\B\C} \def\C{1}
\def\Bgroup{{\iffalse}\fi}\def\Egroup{\iffalse{\fi}}
{\let\B\relax \global\edef\D\bgroup{\A\noexpand\C\egroup}}
{\let\B\relax \global\edef\E\Bgroup{\A\noexpand\C\Egroup}
</pre>
<p class="nofirst noindent">In this example, we consider two groups, that define (locally) a command
<samp>\B</samp> and (globally) two commands <samp>\D</samp> and <samp>\E</samp>. The difference
between these two commands is that <samp>\bgroup</samp> is an implicit character: when
evaluated, it behaves like an opening brace, but it cannot be expanded. On the
other hand, <samp>\Bgroup</samp> expands to an open brace. The <samp>\edef</samp> expands
tokens following an explicit opening brace. It stops reading after having
found an explicit closing brace (resulting from the expansion of
<samp>\Egroup</samp>, not <samp>\egroup</samp>). The expansion of `<samp>\A</samp>´ is `<samp>\B</samp><samp>\C</samp>´, this is expanded again.
Since <samp>\B</samp> is relax, it cannot be expanded, and is left unchanged. The
expansion of `<samp>\C</samp>´ is `<samp>1</samp>´, so that the full expansion of `<samp>\A</samp>´ is
`<samp>\B1</samp>´. The expansion of `<samp>\noexpand</samp><samp>\C</samp>´ is `<samp>\C</samp>´. Thus, the example
is equivalent to</p>
<pre class="latex-code">\global\def\D\bgroup{\B1\C\egroup}
\global\E\Bgroup{\B1\C}
</pre>
<p class="nofirst noindent">You can put three <samp>\noexpand</samp> in a row followed by some token X. After the
first expansion, the result is <samp>\noexpand</samp> followed by X, after the second
expansion, the result is X. In the example that follows, the value of <samp>\B</samp>
is <samp>\xbar</samp>.</p>
<pre class="latex-code">\def\xbar{xbar}
\edef\A{\noexpand\noexpand\noexpand\xbar}
\edef\B{\A}
</pre>
<p>Consider a realistic example like this</p>
<pre class="latex-code">\def\add#1#2{\edef#1{#1\do{#2}}}
\def\cons#1#2{\begingroup\let\@elt\relax\xdef#1{#1\@elt #2}\endgroup}
</pre>
<p class="nofirst noindent">We can say something like</p>
<pre class="latex-code">\def\A{}\def\B{}  %init
\let\do\relax% just in case
\add\A x, \add\A y, \add\A z,
\cons\B{ab}, \cons\B{cd}, \cons\B{ef}.
\show\A\show\B
</pre>
<p class="nofirst noindent">This gives two ways to add some tokens to a list. Because both commands use
<samp>\edef</samp>, full expansion is in use; you have to be very careful if the
tokens contain macros that can be expanded. For the case of <samp>\add</samp>, we
assume that <samp>\do</samp><a id="uid233"></a> does nothing; for the case of <samp>\cons</samp>, the command resets
<samp>\@elt</samp> to <samp>\relax</samp>. The body of <samp>\A</samp> will be
<samp>\do{x}\do{y}\do{z}</samp>
and the body of <samp>\B</samp> will be <samp>\@elt ab\@elt cd\@elt ef</samp>.
Note the absence of braces: if you really need them, you should add them to
the argument of the <samp>\cons</samp> command. The built-in command
<samp>\@cons</samp><a id="uid234"></a></p>
<p>The major problem with <samp>\edef</samp> is that it is not aware of
assignments. Assume that <samp>\def\@A\B{}</samp>, and
<samp>\def\C{B \let\@A\D}</samp>, <samp>\def\E{\C}</samp>
have been somehow evaluated.
Consider now an <samp>\edef</samp> containing <samp>\E</samp>. This implies expansion of
<samp>\C</samp>, hence of `<samp>\let</samp><samp>\@A</samp><samp>\D</samp>´. The <samp>\let</samp> command cannot be expanded. Hence
<samp>\@A</samp> is expanded, and you get the following error: <i>Use of \@A
doesn´t match its definition</i> from inside <samp>\C</samp>. You have never heard
of this command <samp>\@A</samp>, and never used <samp>\C</samp>! For this reason some commands
are made robust: for instance <samp>\hspace</samp> expands to
`<samp>\protect</samp><samp>\hspace</samp> ´ (the second command here has a space at the end), and
<samp>\protect</samp><a id="uid235"></a> is defined to be <samp>\relax</samp><a id="uid236"></a>, or <samp>\noexpand</samp><a id="uid237"></a>,
and sometimes <samp>\string</samp><a id="uid238"></a>. This mechanism works only if you use
<samp>\protected@edef</samp> instead of <samp>\edef</samp><a id="uid239"></a>. (Note: <samp>\protect</samp> behaves
like <samp>\string</samp> inside
<samp>\protected@write</samp>, which is a variant of <samp>\write</samp><a id="uid240"></a>).</p>

<h2 id="uid241">2.4. Variables in TeX</h2>
<p>By variable, we mean everything that the user can modify or watch
changing. For instance, the current hash table usage is not a variable (it
varies, of course, but the value is available only at the end of the run, in
the transcript file). The current vertical list is updated whenever a paragraph
is split into lines; you cannot access this list, however the <samp>\output</samp>
routine gets the part of it that should be typeset on the current page in the
box register 255. There are general purpose variables, and specialised ones:
for instance <samp>\spacefactor</samp> makes sense only in horizontal mode, and the
height of the material on current page (<samp>\pagetotal</samp>) can be used only
between paragraphs (in fact, it is updated by TeX whenever a line is added
to the page; you can consult, and even modify, this value at any time). There
are variables that you cannot modify (the version number, for instance) or
only once (the magnification), or in the preamble (i.e., LaTeX reads some
variables at begin-document, changes done later to these variables are
ignored).</p>
<p>Variables can be classified into two categories depending on their use: in
some cases you need to put a prefix before <samp>\foo</samp> if you want to use it, in
other cases the prefix is required for modification. For instance, if <samp>\foo</samp> is a
user-defined command, you say <samp>\let</samp><samp>\foo</samp>, or <samp>\def</samp><samp>\foo</samp>, if
you want to change the value, and simply <samp>\foo</samp> if you want to use it. In
the same fashion <samp>\font</samp><samp>\tenrm</samp> defines a font, and <samp>\tenrm</samp> is a
use. On the other hand, if you say <samp>\pageno=3</samp>, this will set the
current page number to 3 (this is plain TeX syntax, the LaTeX syntax will
be explained later). If you say something like <samp>\hskip-\fontdimen2\font</samp>, the <samp>\hskip</samp> command is a prefix that says that the
variable that follows will be used. In this case, this is some dimension from
a font. Note that <samp>\fontdimen</samp> is a prefix so that <samp>\font</samp> does not
define a new font, but refers to the current font. The meaning of the above
piece of code is: insert horizontal space, whose amount is the opposite of the
second parameter of the current font (i.e., normal interword space).</p>
<p>According to the TeXbook, a &lt;font&gt; can be a command like <samp>\tenrm</samp> defined by
<samp>\font</samp> <samp>\tenrm</samp> <samp>=somefont</samp>, of the null font <samp>\nullfont</samp><a id="uid242"></a>,
or the current font <samp>\font</samp><a id="uid243"></a>, or a family member (<samp>\textfont</samp><a id="uid244"></a>,
<samp>\scriptfont</samp>, or <samp>\scriptscriptfont</samp><a id="uid245"></a>, followed by a 4bit integer).
In the case of <samp>\hyphenchar</samp><a id="uid246"></a> or <samp>\skewchar</samp><a id="uid247"></a>, a &lt;font&gt;
follows the command. This gives a reference to an integer, the hyphenchar or
skewchar of the font (if this integer is not a valid character, the font has
no hyphenchar or skewchar). In the case of <samp>\fontdimen</samp><a id="uid248"></a>, there is an
integer P, a font, and this defines a reference to a dimension. The integer P
must be positive and not greater than the number of parameters in the font
(initialised by TeX to the number of parameters in the font metric file, 7
for a normal font, 13 for math extension, 22 for math symbols, see TeXbook,
appendix F). You can get an error: <i>Font somefont has only 7 fontdimen
parameters</i>. In <i>Tralics</i>, the value is zero if P is out-of-range. In TeX,
the last loaded font table can be dynamically increased: if you assign a value
at position <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>P</mi><mo>&gt;</mo><mi>M</mi></mrow></math></span>, this will increase M. In <i>Tralics</i>, this is possible for all
fonts, if <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>P</mi><mo>&lt;</mo><msup><mn>10</mn> <mn>5</mn> </msup></mrow></math></span>.</p>
<p>The value of a variable can be</p>
<ul>
<li id="uid249"><p class="nofirst noindent">an integer (32bit, signed, with magnitude less than <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn> <mn>31</mn> </msup></math></span>).
The value can be restricted in some cases (to 0-255 if it is an index in a
table of registers, to 0-255 if it is a character, etc).</p>
</li>
<li id="uid250"><p class="nofirst noindent">a dimension, often expressed in pt, (an integer number of times the
small unit sp). Normally, the maximum value is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn> <mn>14</mn> </msup></math></span>pt, but TeX does
not always check for overflow.</p>
</li>
<li id="uid251"><p class="nofirst noindent">a glue. Called rubber length in LaTeX. It is like a dimension with a
stretch part, and a shrink part.</p>
</li>
<li id="uid252"><p class="nofirst noindent">a muglue. Like glue, but only one unit of measure is allowed: mu (math
unit).</p>
</li>
<li id="uid253"><p class="nofirst noindent">a token list. This is a list of tokens (as always, well balanced against
explicit braces).</p>
</li>
<li id="uid254"><p class="nofirst noindent">a font.</p>
</li>
<li id="uid255"><p class="nofirst noindent">a box (a box contains characters, rules, boxes, penalties, glue,
whatsit, etc, but no commands).
In <i>Tralics</i> a box contains <span class="sansserif">XML</span> stuff.</p>
</li></ul>
<p>You can say `<samp>\afterassignment</samp><samp>\foo</samp><samp>\count0=3</samp>´; in this case, the
command <samp>\foo</samp> is pushed on a special stack, and popped after assignment is
complete. There is only room for one token on this special stack. For
instance, if you write the following:</p>
<pre class="latex-code">\def\fooA{\relax}\def\fooB{\relax}\def\fooC{\relax}\def\fooD{\relax}
\afterassignment \fooA\afterassignment\fooB
\fooC\count0=1\fooD
</pre>
<p class="nofirst noindent">the transcript file of <i>Tralics</i> will contain (in verbose mode)</p>
<pre class="log-code">[9] \afterassignment \fooA\afterassignment\fooB
{\afterassignment}
{\afterassignment: \fooA}
{\afterassignment}
{\afterassignment: \fooB}
</pre>
<p class="nofirst noindent">At this point, the after assignment stack contains <samp>\fooB</samp>. The order of
evaluation is now the following: <samp>\fooD</samp> is expanded; this gives
<samp>\relax</samp>, which terminates scanning of the number; it will be read again,
after evaluation of <samp>\fooB</samp>:</p>
<pre class="log-code">[10] \fooC\count0=1\fooD
\fooC -&gt;\relax
{\relax}
{\count}
+scanint for \count-&gt;0
\fooD -&gt;\relax
+scanint for \count-&gt;1
{after assignment: \fooB}
\fooB -&gt;\relax
{\relax}
{\relax}
</pre>
<p>You can use the <samp>\showbox</samp><a id="uid256"></a> command for displaying the
content of a box. This is a little example. It uses <samp>\everyhbox</samp>
and <samp>\afterassignment</samp><a id="uid257"></a>. Note the
order in which these tokens are inserted.</p>
<pre class="latex-code">\everyhbox{3}
\def\foo{12}
\afterassignment\foo\setbox0=\hbox{4}
\showbox0
</pre>
<p>This is what TeX prints in the log file:</p>
<pre class="log-code">&gt; \box0=
\hbox(6.4151+0.0)x19.99512
.\T1/cmr/m/n/10 1
.\T1/cmr/m/n/10 2
.\T1/cmr/m/n/10 3
.\T1/cmr/m/n/10 4
</pre>
<p class="nofirst noindent">The first line of the trace starts with <samp>\hbox</samp> or <samp>\vbox</samp>, followed by
the dimensions (height, depth, width; the unit is `pt´ by default), optionally
followed by `shifted 27.1´ if the the box is shifted, and by `glue set 0.19´
if the glue has to be stretched or shrunk. After that, you will see the
content of the box, one line per item
(no more than <samp>\showboxbreadth</samp><a id="uid258"></a> lines are printed per
box), each item is preceded by a context (a sequence of <span class="math"><i>N</i></span> dots at depth <span class="math"><i>N</i></span>,
tokens at depth greater than <samp>\showboxdepth</samp><a id="uid259"></a> are not
shown). In the box, you can see things like `<samp>\penalty -51</samp>´
or `<samp>\kern</samp> <samp>28.45274</samp>´
or `<samp>\glue</samp> <samp>3.0</samp> <samp>plus</samp> <samp>1.0</samp>´ or
`<samp>\glue</samp><samp>(\baselineskip)</samp> <samp>2.28015</samp>´
(this last glue is inserted automatically by TeX, it knows where it comes
from, so that the name can be printed), <samp>\special{...}</samp>,
<samp>\write4{\indexentry...}</samp>.
The interesting point in the last object is that
we have a list of tokens that will be evaluated later (when the page is
shipped out). <i>Tralics</i> does not put <samp>\kern</samp><a id="uid260"></a>,
<samp>\penalty</samp><a id="uid261"></a>, neither <samp>\glue</samp><a id="uid262"></a> in a box. The <samp>\special</samp><a id="uid263"></a>
command is not implemented; finally <samp>\write</samp><a id="uid264"></a> is never delayed.
In our example, the box contains four items, which are
characters (TeX shows a command that contains the name of the font; in
our example, the font is something like `ecrm1000´).</p>
<p>In <i>Tralics</i>, you would see the same characters, but no font and no size.
On the other hand, you can say something
like<a id="uid265"></a></p>
<pre class="latex-code">\everyxbox{Test}
\setbox0=\xbox{foo}{1\xbox{bar}{2} %
   \AddAttToLast{x}{1}\AddAttToCurrent{y}{2}3}
\showbox0
</pre>
<p class="nofirst noindent">and you will see</p>
<pre class="xml-code">&lt;foo y='2'&gt;Test1&lt;bar x='1'&gt;Test2&lt;/bar&gt; 3&lt;/foo&gt;
</pre>
<p class="nofirst noindent">Note the two commands that were used to add attributes to the current <span class="sansserif">XML</span> elements, and the last constructed one. We have added another command,
<samp>\XMLaddatt</samp> that takes as optional argument the id of the element to which
the attribute value pair should be added. This is an integer; if omitted, the
current element is used. You can use <samp>\XMLlastid</samp> or <samp>\XMLcurrentid</samp>
(there are references to variables, you must use <samp>\the</samp> if you want the
value). If you want to overwrite an existing attribute pair, you must use a
star. The previous example can be written like this:
<a id="uid266"></a></p>
<pre class="latex-code">\everyxbox{Test}
\setbox0=\xbox{foo}{1\xbox{bar}{2} %
   \XMLaddatt[\the\XMLlastid]{x}{1}\XMLaddatt[\the\XMLcurrentid]{y}{22}%
   \XMLaddatt[\the\XMLlastid]{x}{11}\XMLaddatt*{y}{2}3}
\showbox0
</pre>
<p>If <samp>\foo</samp> is any command then <samp>\show</samp><samp>\foo</samp><a id="uid267"></a> will show its value.
Here are some examples</p>
<pre class="latex-code">\def\Bar#1#{#1} \show\Bar
\let\foo\par \show\foo
\renewcommand\foo[2][toto]{#1#2} \show\foo
\let\foo=1 \show\foo
\let\foo=_ \show\foo
\let\foo=\undef \show\foo
\show\bgroup
</pre>
<p class="nofirst noindent">This is what <i>Tralics</i> prints (it differs slightly from the LaTeX output)</p>
<pre class="log-code">\Bar=macro: #1#-&gt;#1.
\foo=\par.
\foo=opt \long macro: toto#2-&gt;#1#2
\foo=the character 1.
\foo=subscript character _.
\foo=undefined.
\bgroup=begin-group character {.
</pre>
<p class="nofirst noindent">In the case of a variable, you can say <samp>\the</samp><samp>\foo</samp><a id="uid268"></a>, the result is a
token list that represents the value of <samp>\foo</samp> (if <samp>\foo</samp> is a token
list, <samp>\the</samp><samp>\foo</samp> is the value of <samp>\foo</samp>, otherwise, it is a list of
characters). The command <samp>\showthe</samp><a id="uid269"></a> will show the value,
i.e. print on the terminal the token list returned by <samp>\the</samp>. Example</p>
<pre class="latex-code">\def\Show#1{\the#1\showthe#1}
\widowpenalty=3 \Show\widowpenalty
\parindent1.5pt \Show\parindent
\leftskip = 1pt plus 2fil minus 4fill \Show\leftskip
\thinmuskip = 3mu plus -2fil minus 4fill \Show\thinmuskip
\count0=17 \Show{\count0}
\dimen0=17pt \Show{\dimen0}
\skip0=17pt plus 1 pt minus 2pt \Show{\skip0}
\muskip0=17mu plus 1 mu minus 2mu \Show{\muskip0}
\Show{\catcode`\A}
\Show{\lccode`\B}
\Show\inputlineno
\font\xa=cmr10 at 11truept
\fontdimen6\xa = 11pt \hyphenchar\xa=`\-
\Show{\fontdimen6\xa}
\Show{\hyphenchar\xa}
\chardef\foo25
\Show\foo
\Show\xa
\toks0={\foo = \foo} \def\foo{foo}
\Show{\toks0}
</pre>
<p>This is what <i>Tralics</i> prints on the screen.</p>
<pre class="log-code">\show: 3
\show: 1.5pt
\show: 1.0pt plus 2.0fil minus 4.0fill
\show: 3.0mu plus -2.0fil minus 4.0fill
\show: 17
\show: 17.0pt
\show: 17.0pt plus 1.0pt minus 2.0pt
\show: 17.0mu plus 1.0mu minus 2.0mu
\show: 11
\show: 98
\show: 79
\show: 11.0pt
\show: 45
\show: 25
\show: cmr10
\show: \foo= \foo
</pre>
<p class="nofirst noindent">The typeset result is:
<i>31.5pt0.0pt0.0mu1717.0pt17.0pt plus 1.0pt minus 2.0pt17.0mu plus 1.0mu minus 2.0mu11987911.0pt
45
25cmr10
foo= foo</i><a id="uid270" href="#note34" title="This might be unexpected, and differs from the output. In fact, the command \the is expanded before ..."><small>(note: </small>&#10163;<small>)</small></a>.</p>
<p>In the case of <samp>\the\foo</samp><a id="uid271"></a>,
<samp>\showthe\foo</samp><a id="uid272"></a>,
<samp>\advance\foo</samp><a id="uid273"></a>,
<samp>\multiply\foo</samp><a id="uid274"></a>,
<samp>\divide\foo</samp><a id="uid275"></a>, the token that
follows the first command is fully expanded.</p>

<h2 id="uid276">2.5. All the variables</h2>
<p>All variables (exceptions will be given later) are in the table of
equivalents: this table contains the current meaning of quantities that are
saved/restored by the grouping mechanism of TeX. In TeX this table is
divided into six parts; in <i>Tralics</i>, the layout is slightly different, for
instance, because TeX makes a heavy using of glue (each space character
produces a glue item), while <i>Tralics</i> ignores them completely. This big table
contains the following objects</p>
<ol>
<li id="uid277"><p class="nofirst noindent">the current equivalent of single character control sequences (for <samp>~</samp>
as well as <samp>\~</samp>);</p>
</li>
<li id="uid278"><p class="nofirst noindent">the hash table (in <i>Tralics</i>, there are two such tables, if the command
<samp>\foo</samp> produces <tt class="txt">&lt;bar gee=´true´&gt;</tt>, the three strings `bar´, `gee´
and `true´ are in a special table).</p>
</li>
<li id="uid279"><p class="nofirst noindent">all glue parameters.</p>
</li>
<li id="uid280"><p class="nofirst noindent">all quantities that fit on 16 bits.</p>
</li>
<li id="uid281"><p class="nofirst noindent">all integers.</p>
</li>
<li id="uid282"><p class="nofirst noindent">all dimensions.</p>
</li></ol>
<p>The glue parameters are the following (unused by <i>Tralics</i>, initialised to 0,
unless stated otherwise.</p>
<ul>
<li id="uid283"><p class="nofirst noindent"><samp>\lineskip</samp><a id="uid284"></a>: interline glue if <samp>\baselineskip</samp> is
infeasible.</p>
</li>
<li id="uid285"><p class="nofirst noindent"><samp>\baselineskip</samp><a id="uid286"></a>: desired glue between baselines.</p>
</li>
<li id="uid287"><p class="nofirst noindent"><samp>\parskip</samp><a id="uid288"></a>: extra glue just above a paragraph.</p>
</li>
<li id="uid289"><p class="nofirst noindent"><samp>\abovedisplayskip</samp><a id="uid290"></a>:
extra glue just above displayed math.</p>
</li>
<li id="uid291"><p class="nofirst noindent"><samp>\belowdisplayskip</samp><a id="uid292"></a>: extra glue just below
displayed math.</p>
</li>
<li id="uid293"><p class="nofirst noindent"><samp>\abovedisplayshortskip</samp><a id="uid294"></a>:
glue above displayed math following short lines.</p>
</li>
<li id="uid295"><p class="nofirst noindent"><samp>\belowdisplayshortskip</samp><a id="uid296"></a>:
glue below displayed math following short lines.</p>
</li>
<li id="uid297"><p class="nofirst noindent"><samp>\leftskip</samp><a id="uid298"></a>: glue at left of justified lines.</p>
</li>
<li id="uid299"><p class="nofirst noindent"><samp>\rightskip</samp><a id="uid300"></a>: glue at right of justified lines.
LaTeX uses <samp>\leftskip</samp> and <samp>\rightskip</samp> for commands like
<samp>\centering</samp>, <samp>\raggedright</samp> etc. Unused by <i>Tralics</i>. On the other
hand there is <samp>\nocentering</samp><a id="uid301"></a>, whose effect is the same as setting
both leftskip and rightskip to zero.</p>
</li>
<li id="uid302"><p class="nofirst noindent"><samp>\topskip</samp><a id="uid303"></a>: glue at top of main pages.</p>
</li>
<li id="uid304"><p class="nofirst noindent"><samp>\splittopskip</samp><a id="uid305"></a>: glue at top of split pages.</p>
</li>
<li id="uid306"><p class="nofirst noindent"><samp>\tabskip</samp><a id="uid307"></a>: glue between aligned entries.</p>
</li>
<li id="uid308"><p class="nofirst noindent"><samp>\spaceskip</samp><a id="uid309"></a>: glue between words.</p>
</li>
<li id="uid310"><p class="nofirst noindent"><samp>\xspaceskip</samp><a id="uid311"></a>: glue after sentences.</p>
</li>
<li id="uid312"><p class="nofirst noindent"><samp>\parfillskip</samp><a id="uid313"></a>: glue on last line of paragraph.</p>
</li>
<li id="uid314"><p class="nofirst noindent"><samp>\thinmuskip</samp><a id="uid315"></a>: thin space in math formula.</p>
</li>
<li id="uid316"><p class="nofirst noindent"><samp>\medmuskip</samp><a id="uid317"></a>: medium space in math formula.</p>
</li>
<li id="uid318"><p class="nofirst noindent"><samp>\thickmuskip</samp><a id="uid319"></a>: thick space in math formula.</p>
</li>
<li id="uid320"><p class="nofirst noindent"><samp>\itemsep</samp><a id="uid321"></a>: defined by LaTeX. Rubber space between
successive items in a list.</p>
</li>
<li id="uid322"><p class="nofirst noindent"><samp>\labelsep</samp><a id="uid323"></a>: defined by LaTeX. The space between the
end of the label box and the text of the item in a list.</p>
</li>
<li id="uid324"><p class="nofirst noindent"><samp>\parsep</samp><a id="uid325"></a>: defined by LaTeX. Rubber space between
paragraphs within an item.</p>
</li>
<li id="uid326"><p class="nofirst noindent"><samp>\fill</samp><a id="uid327"></a>: defined by LaTeX. Holds 0pt plus 1fill. You
should not modify it.</p>
</li>
<li id="uid328"><p class="nofirst noindent"><samp>\smallskipamount</samp><a id="uid329"></a>, <samp>\medskipamount</samp><a id="uid330"></a>,
<samp>\bigskipamount</samp><a id="uid331"></a>. Quantities defined by <i>Tralics</i> in the same way as
LaTeX, but unused.</p>
</li>
<li id="uid332"><p class="nofirst noindent"><samp>\floatsep</samp><a id="uid333"></a>, <samp>\textfloatsep</samp><a id="uid334"></a>, <samp>\intextsep</samp><a id="uid335"></a>,
<samp>\dblfloatsep</samp><a id="uid336"></a>, <samp>\dbltextfloatsep</samp><a id="uid337"></a>: glue inserted by LaTeX between float and other material.</p>
</li>
<li id="uid338"><p class="nofirst noindent"><samp>\hideskip</samp><a id="uid339"></a>. Holds -1000pt plus 1 fill. This is used in TeX to
implement <samp>\hidewidth</samp>, a construction not implemened in <i>Tralics</i>.</p>
</li>
<li id="uid340"><p class="nofirst noindent"><samp>\z@skip</samp><a id="uid341"></a>. You should leave this quantity unchanged</p>
</li>
<li id="uid342"><p class="nofirst noindent"><samp>\normalbaselineskip</samp><a id="uid343"></a>, <samp>\normallineskip</samp><a id="uid344"></a>.
Use by LaTeX for font switching.</p>
</li>
<li id="uid345"><p class="nofirst noindent"><samp>\listparindent</samp><a id="uid346"></a>, <samp>\topsep</samp><a id="uid347"></a>, <samp>\partopsep</samp><a id="uid348"></a>.
Some parameters used by LaTeX.</p>
</li>
<li id="uid349"><p class="nofirst noindent"><samp>\@tempskipa</samp>, <samp>\@tempskipb</samp><a id="uid350"></a>:
temporary skip</p>
</li></ul>
<p>The token parameters are the following (initially empty; unused by <i>Tralics</i> unless stated otherwise):</p>
<ul>
<li id="uid351"><p class="nofirst noindent"><samp>\parshape</samp><a id="uid352"></a>: for funny paragraphs (not really a token
list).</p>
</li>
<li id="uid353"><p class="nofirst noindent"><samp>\output</samp><a id="uid354"></a>: user defined output routine.</p>
</li>
<li id="uid355"><p class="nofirst noindent"><samp>\everypar</samp><a id="uid356"></a>: tokens inserted by TeX at start of
every paragraph.</p>
</li>
<li id="uid357"><p class="nofirst noindent"><samp>\everymath</samp><a id="uid358"></a>: tokens inserted by TeX and <i>Tralics</i> at the start
of every non-display math formula.</p>
</li>
<li id="uid359"><p class="nofirst noindent"><samp>\everydisplay</samp><a id="uid360"></a>: tokens inserted by TeX and
<i>Tralics</i> at the start
of every display math formula.</p>
</li>
<li id="uid361"><p class="nofirst noindent"><samp>\everyhbox</samp><a id="uid362"></a>: tokens inserted by TeX and <i>Tralics</i> at the start of every <samp>\hbox</samp>.</p>
</li>
<li id="uid363"><p class="nofirst noindent"><samp>\everyvbox</samp><a id="uid364"></a>: tokens inserted by TeX and <i>Tralics</i> at the start of every <samp>\vbox</samp>.</p>
</li>
<li id="uid365"><p class="nofirst noindent"><samp>\everyxbox</samp><a id="uid366"></a>: tokens inserted by <i>Tralics</i> at the start of every <samp>\xbox</samp>.</p>
</li>
<li id="uid367"><p class="nofirst noindent"><samp>\everyjob</samp><a id="uid368"></a>: tokens inserted by TeX and <i>Tralics</i> at the start of every job. This must be defined by the format (for TeX),
otherwise it is useless; in <i>Tralics</i>, you must put
<samp>everyjob</samp><!--PASS THROUGH allowbreak--><samp>="\something</samp><!--PASS THROUGH allowbreak--><samp>{like this}"</samp> in the configuration file.</p>
</li>
<li id="uid369"><p class="nofirst noindent"><samp>\everycr</samp><a id="uid370"></a>: tokens inserted by TeX after every
<samp>\cr</samp> or non redundant <samp>\crcr</samp>.</p>
</li>
<li id="uid371"><p class="nofirst noindent"><samp>\errhelp</samp><a id="uid372"></a>: tokens that will be printed by TeX in
case of user-error.</p>
</li>
<li id="uid373"><p class="nofirst noindent"><samp>\everyeof</samp><a id="uid374"></a>: tokens inserted by &#1013;-TeX at each end-of-file.</p>
</li>
<li id="uid375"><p class="nofirst noindent"><samp>\@temptokena</samp><a id="uid376"></a>: scratch register.</p>
</li></ul>
<p>The integer parameters are the following. These parameters are zero, unless
stated otherwise.</p>
<ul>
<li id="uid377"><p class="nofirst noindent"><samp>\pretolerance</samp><a id="uid378"></a>: badness tolerance before
hyphenation (initialised to 100 by <i>Tralics</i>).</p>
</li>
<li id="uid379"><p class="nofirst noindent"><samp>\tolerance</samp><a id="uid380"></a>: badness tolerance after hyphenation
(initialised to 200 by <i>Tralics</i>).</p>
</li>
<li id="uid381"><p class="nofirst noindent"><samp>\linepenalty</samp><a id="uid382"></a>: amount added to the badness of
every line in a paragraph.</p>
</li>
<li id="uid383"><p class="nofirst noindent"><samp>\hyphenpenalty</samp><a id="uid384"></a>: penalty for break after discretionary hyphen.</p>
</li>
<li id="uid385"><p class="nofirst noindent"><samp>\exhyphenpenalty</samp><a id="uid386"></a>: penalty for break after
explicit hyphen.</p>
</li>
<li id="uid387"><p class="nofirst noindent"><samp>\clubpenalty</samp><a id="uid388"></a>: penalty for creating a club line
at a bottom of a page.</p>
</li>
<li id="uid389"><p class="nofirst noindent"><samp>\widowpenalty</samp><a id="uid390"></a>: penalty for creating a widow line
at top of page.</p>
</li>
<li id="uid391"><p class="nofirst noindent"><samp>\displaywidowpenalty</samp><a id="uid392"></a>: ditto, just before
a display.</p>
</li>
<li id="uid393"><p class="nofirst noindent"><samp>\brokenpenalty</samp><a id="uid394"></a>: penalty for breaking a page at
a broken line.</p>
</li>
<li id="uid395"><p class="nofirst noindent"><samp>\binoppenalty</samp><a id="uid396"></a>: penalty for breaking after a
binary operation in a math formula.</p>
</li>
<li id="uid397"><p class="nofirst noindent"><samp>\relpenalty</samp><a id="uid398"></a>: penalty for breaking after a relation in a math formula.</p>
</li>
<li id="uid399"><p class="nofirst noindent"><samp>\predisplaypenalty</samp><a id="uid400"></a>:
penalty for breaking just before a displayed formula.</p>
</li>
<li id="uid401"><p class="nofirst noindent"><samp>\postdisplaypenalty</samp><a id="uid402"></a>:
penalty for breaking just after a displayed formula.</p>
</li>
<li id="uid403"><p class="nofirst noindent"><samp>\interlinepenalty</samp><a id="uid404"></a>: additional penalty for a
page break between lines.</p>
</li>
<li id="uid405"><p class="nofirst noindent"><samp>\doublehyphendemerits</samp><a id="uid406"></a>: demerits for
for consecutive broken lines.</p>
</li>
<li id="uid407"><p class="nofirst noindent"><samp>\finalhyphendemerits</samp><a id="uid408"></a>:
demerits for a penultimate broken line.</p>
</li>
<li id="uid409"><p class="nofirst noindent"><samp>\adjdemerits</samp><a id="uid410"></a>: demerits for adjacent incompatible
lines.</p>
</li>
<li id="uid411"><p class="nofirst noindent"><samp>\mag</samp><a id="uid412"></a>: magnification ratio, times 1000.</p>
</li>
<li id="uid413"><p class="nofirst noindent"><samp>\delimiterfactor</samp><a id="uid414"></a>:
ratio for variable-size delimiters.</p>
</li>
<li id="uid415"><p class="nofirst noindent"><samp>\looseness</samp><a id="uid416"></a>: change to the number of lines in a
paragraph.</p>
</li>
<li id="uid417"><p class="nofirst noindent"><samp>\time</samp><a id="uid418"></a>: current time of day. Number of minutes since
midnight, computed by <i>Tralics</i> at start of run.</p>
</li>
<li id="uid419"><p class="nofirst noindent"><samp>\day</samp><a id="uid420"></a>: current day of the month (between 1 and 31).</p>
</li>
<li id="uid421"><p class="nofirst noindent"><samp>\month</samp><a id="uid422"></a>: current month of the year (between 1 and 12).</p>
</li>
<li id="uid423"><p class="nofirst noindent"><samp>\year</samp><a id="uid424"></a>: current year of our Lord.
The initial values of <samp>\time</samp>, <samp>\day</samp>, <samp>\month</samp>, <samp>\year</samp>, are
printed in the transcript file by <i>Tralics</i> in the following format: 2006/10/24 10:18:10</p>
</li>
<li id="uid425"><p class="nofirst noindent"><samp>\showboxbreadth</samp><a id="uid426"></a>: maximum items per level when
boxes are shown (when <i>Tralics</i> shows the content of a box, it always shows
everything).</p>
</li>
<li id="uid427"><p class="nofirst noindent"><samp>\showboxdepth</samp><a id="uid428"></a>:
maximum level when boxes are shown (when <i>Tralics</i> shows the content of a box, it always shows everything).</p>
</li>
<li id="uid429"><p class="nofirst noindent"><samp>\hbadness</samp><a id="uid430"></a>: hboxes exceeding this badness will be shown.</p>
</li>
<li id="uid431"><p class="nofirst noindent"><samp>\vbadness</samp><a id="uid432"></a>: vboxes exceeding this badness will be
shown.</p>
</li>
<li id="uid433"><p class="nofirst noindent"><samp>\pausing</samp><a id="uid434"></a>: pause after each line is read from a file.
In <i>Tralics</i> there is no interaction with the user.</p>
</li>
<li id="uid435"><p class="nofirst noindent"><samp>\tracingonline</samp><a id="uid436"></a>: show diagnostic output on
terminal. In verbose mode, this variable, and some other ones are set to a
non-zero value, as explained in section <a href="#uid3206" title="Tracing commands">6.6</a>.</p>
</li>
<li id="uid437"><p class="nofirst noindent"><samp>\tracingmacros</samp><a id="uid438"></a>:
show macros as they are being expanded.</p>
</li>
<li id="uid439"><p class="nofirst noindent"><samp>\tracingstats</samp><a id="uid440"></a>: show memory usage if TeX knows
it.</p>
</li>
<li id="uid441"><p class="nofirst noindent"><samp>\tracingparagraphs</samp><a id="uid442"></a>: show line-break
calculations.</p>
</li>
<li id="uid443"><p class="nofirst noindent"><samp>\tracingpages</samp><a id="uid444"></a>: show page-break calculations.</p>
</li>
<li id="uid445"><p class="nofirst noindent"><samp>\tracingoutput</samp><a id="uid446"></a>: show boxes when they are
shipped out.</p>
</li>
<li id="uid447"><p class="nofirst noindent"><samp>\tracinglostchars</samp><a id="uid448"></a>: show characters that
aren´t in the font.</p>
</li>
<li id="uid449"><p class="nofirst noindent"><samp>\tracingcommands</samp><a id="uid450"></a>: show command codes.</p>
</li>
<li id="uid451"><p class="nofirst noindent"><samp>\tracingrestores</samp><a id="uid452"></a>:
show equivalents when they are restored.</p>
</li>
<li id="uid453"><p class="nofirst noindent"><samp>\uchyph</samp><a id="uid454"></a>: hyphenate words beginning with a capital
letter.</p>
</li>
<li id="uid455"><p class="nofirst noindent"><samp>\outputpenalty</samp><a id="uid456"></a>: penalty found at current page
break.</p>
</li>
<li id="uid457"><p class="nofirst noindent"><samp>\maxdeadcycles</samp><a id="uid458"></a>: bound on consecutive dead
cycles of output.</p>
</li>
<li id="uid459"><p class="nofirst noindent"><samp>\insertpenalties</samp><a id="uid460"></a>. Is the sum of all penalties for split
insertions on the current page.</p>
</li>
<li id="uid461"><p class="nofirst noindent"><samp>\spacefactor</samp><a id="uid462"></a>: According to the TeXbook: &#8220;the exact amount
of glue inserted by a space depends on <samp>\spacefactor</samp>,
the current font, and the <samp>\spaceskip</samp><a id="uid463"></a>
and <samp>\xspaceskip</samp><a id="uid464"></a> parameters as described in Chapter 12.&#8221;</p>
</li>
<li id="uid465"><p class="nofirst noindent"><samp>\hangafter</samp><a id="uid466"></a>:
hanging indentation changes after this many lines.</p>
</li>
<li id="uid467"><p class="nofirst noindent"><samp>\floatingpenalty</samp><a id="uid468"></a>:
penalty for insertions heldover after a split.</p>
</li>
<li id="uid469"><p class="nofirst noindent"><samp>\globaldefs</samp><a id="uid470"></a>: override <samp>\global</samp> specifications.</p>
</li>
<li id="uid471"><p class="nofirst noindent"><samp>\fam</samp><a id="uid472"></a>: current family.</p>
</li>
<li id="uid473"><p class="nofirst noindent"><samp>\escapechar</samp><a id="uid474"></a>: escape character for token output.
Initialised by <i>Tralics</i> to backslash.</p>
</li>
<li id="uid475"><p class="nofirst noindent"><samp>\defaulthyphenchar</samp><a id="uid476"></a>: value of
<samp>\hyphenchar</samp> when a font is loaded.</p>
</li>
<li id="uid477"><p class="nofirst noindent"><samp>\defaultskewchar</samp><a id="uid478"></a>: value of <samp>\skewchar</samp>
when a font is loaded.</p>
</li>
<li id="uid479"><p class="nofirst noindent"><samp>\endlinechar</samp><a id="uid480"></a>: character placed at the right end
of the buffer when reading a new line. Initialised by <i>Tralics</i> to CR (ascii
13).</p>
</li>
<li id="uid481"><p class="nofirst noindent"><samp>\newlinechar</samp><a id="uid482"></a>: character that prints as a LF.
Initialised by <i>Tralics</i> to LF, but not used.</p>
</li>
<li id="uid483"><p class="nofirst noindent"><samp>\language</samp><a id="uid484"></a>: the current set of hyphenation rules.
For <i>Tralics</i>, 0 means English, 1 means French, 2 means German, and 3 stands
for any other language.</p>
</li>
<li id="uid485"><p class="nofirst noindent"><samp>\lefthyphenmin</samp><a id="uid486"></a>: minimum left hyphenation fragment size.</p>
</li>
<li id="uid487"><p class="nofirst noindent"><samp>\righthyphenmin</samp><a id="uid488"></a>: minimum right hyphenation fragment size.</p>
</li>
<li id="uid489"><p class="nofirst noindent"><samp>\holdinginserts</samp><a id="uid490"></a>:
do not remove insertion nodes from <samp>\box255</samp>.</p>
</li>
<li id="uid491"><p class="nofirst noindent"><samp>\errorcontextlines</samp><a id="uid492"></a>: maximum intermediate
line pairs shown. In <i>Tralics</i>, the context of an error is not shown.</p>
</li>
<li id="uid493"><p class="nofirst noindent"><samp>\tracingassigns</samp><a id="uid494"></a>,<samp>\tracinggroups</samp><a id="uid495"></a>,<samp>\tracingifs</samp><a id="uid496"></a>,<samp>\tracingscantokens</samp><a id="uid497"></a>,
<samp>\tracingnesting</samp><a id="uid498"></a>. These are extensions of &#1013;-TeX, that
control what is printed in the transcript file.</p>
</li>
<li id="uid499"><p class="nofirst noindent"><samp>\tracingmath</samp><a id="uid500"></a>: controls what is printed when <i>Tralics</i> interprets a math formula.</p>
</li>
<li id="uid501"><p class="nofirst noindent"><samp>\predisplaydirection</samp><a id="uid502"></a>,<samp>\lastlinefit</samp><a id="uid503"></a>,
<samp>\savingdiscards</samp><a id="uid504"></a>, <samp>\savinghyphcodes</samp><a id="uid505"></a>. These are other
&#1013;-TeX extensions, described in section <a href="#uid3749" title="Extensions">6.12</a></p>
</li>
<li id="uid506"><p class="nofirst noindent"><samp>\FPseed</samp><a id="uid507"></a>. This is defined only when the FP package is
loaded.</p>
</li>
<li id="uid508"><p class="nofirst noindent"><samp>\TeXXeTstate</samp><a id="uid509"></a> controls &#1013;-TeX bidirectional printed, unused by
<i>Tralics</i>.</p>
</li>
<li id="uid510"><p class="nofirst noindent"><samp>\@nomathml</samp><a id="uid511"></a>. If this number is non-zero, math
formulas are not converted into MathML expressions.</p>
</li>
<li id="uid512"><p class="nofirst noindent"><samp>\notrivialmath</samp><a id="uid513"></a>. This controls how some
<i>trivial</i> math formulas should be translated as text.</p>
</li>
<li id="uid514"><p class="nofirst noindent"><samp>\hyphenchar</samp><a id="uid515"></a>, <samp>\skewchar</samp><a id="uid516"></a>. The command should be
followed by a font reference, and this is a reference to the hyphenchar or
skewchar of the font.</p>
</li>
<li id="uid517"><p class="nofirst noindent"><samp>\interlinepenalties</samp><a id="uid518"></a>, <samp>\clubpenalties</samp>, <samp>\widowpenalies</samp>,
and <samp>\displaywidowpenalties</samp>. Commands defined by &#1013;-TeX, described in section
<a href="#uid3749" title="Extensions">6.12</a>. Like <samp>\parshape</samp>; the command reads an integer <span class="math"><i>n</i></span>, and
returns the corresponding value in the slot, it can also read <span class="math"><i>n</i></span> integers and
store them.</p>
</li>
<li id="uid519"><p class="nofirst noindent"><samp>\@mathversion</samp><a id="uid520"></a>.
If the value of the counter is positive, then a bold variant is used for math
characters, if possible. The command <samp>\mathversion</samp> reads an argument; it
sets the counter to one if the argument is `bold´, to zero otherwise.</p>
</li>
<li id="uid521"><p class="nofirst noindent"><samp>\@tempcnta</samp>, <samp>\@tempcnta</samp>: Scratch counter.</p>
</li>
<li id="uid522"><p class="nofirst noindent"><samp>\interfootnotelinepenalty</samp><a id="uid523"></a> contains penalty added by LaTeX in
footnotes.</p>
</li>
<li id="uid524"><p class="nofirst noindent"><samp>\interdisplaylinepenalty</samp><a id="uid525"></a> contains penalty inserted by LaTeX between lines of equations/</p>
</li></ul>
<p>The following quantities are read only variables. They are integers, unless
stated otherwise.</p>
<ul>
<li id="uid526"><p class="nofirst noindent"><samp>\lastpenalty</samp><a id="uid527"></a> returns
the value of the last item on the current list, if it is a penalty
(always zero in <i>Tralics</i>).</p>
</li>
<li id="uid528"><p class="nofirst noindent"><samp>\lastkern</samp><a id="uid529"></a> returns
the value of the last item on the current list, if it is a kern. This is a
dimension, 0pt in <i>Tralics</i>.</p>
</li>
<li id="uid530"><p class="nofirst noindent"><samp>\lastskip</samp><a id="uid531"></a> returns
the value of the last item on the current list, if it is glue. This is a
dimension, 0pt in <i>Tralics</i>.</p>
</li>
<li id="uid532"><p class="nofirst noindent"><samp>\lastnodetype</samp><a id="uid533"></a> is an &#1013;-TeX extension containing the type of the
last item on the current list; always zero in <i>Tralics</i>.</p>
</li>
<li id="uid534"><p class="nofirst noindent"><samp>\inputlineno</samp><a id="uid535"></a> contains the current input line number.</p>
</li>
<li id="uid536"><p class="nofirst noindent"><samp>\badness</samp><a id="uid537"></a> contains
the current badness (always zero in <i>Tralics</i>).</p>
</li>
<li id="uid538"><p class="nofirst noindent"><samp>\XMLlastid</samp><a id="uid539"></a> contains the
unique identifier of the most recently created <span class="sansserif">XML</span> element.
Defined only by <i>Tralics</i>.</p>
</li>
<li id="uid540"><p class="nofirst noindent"><samp>\XMLcurrentid</samp><a id="uid541"></a> contains
the unique identifier of the current <span class="sansserif">XML</span> element.
Defined only by <i>Tralics</i>.</p>
</li>
<li id="uid542"><p class="nofirst noindent"><samp>\currentgrouplevel</samp><a id="uid543"></a> contains the current grouping level (index
in the semantic stack); it is an &#1013;-TeX extension.</p>
</li>
<li id="uid544"><p class="nofirst noindent"><samp>\currentgrouptype</samp><a id="uid545"></a> contains the type of the current
semantic group; it is an &#1013;-TeX extension, explained in section
<a href="#uid3749" title="Extensions">6.12</a>.</p>
</li>
<li id="uid546"><p class="nofirst noindent"><samp>\currentiflevel</samp><a id="uid547"></a>, <samp>\currentiftype</samp><a id="uid548"></a>,
<samp>\currentifbranch</samp><a id="uid549"></a> are &#1013;-TeX extensions described
in section <a href="#uid3749" title="Extensions">6.12</a>. The variables contain information about
the condition stack.</p>
</li>
<li id="uid550"><p class="nofirst noindent"><samp>\eTeXversion</samp><a id="uid551"></a> is defined by &#1013;-TeX,
contains its revision number.</p>
</li>
<li id="uid552"><p class="nofirst noindent"><samp>\fontcharwd</samp><a id="uid553"></a>, <samp>\fontcharht</samp><a id="uid554"></a>,
<samp>\fontchardp</samp><a id="uid555"></a>,<samp>\fontcharic</samp><a id="uid556"></a>.
These &#1013;-TeX extension commands read a font identifier, and an integer
(character position).
They return a property of the character in the font, always 0 in <i>Tralics</i>.</p>
</li>
<li id="uid557"><p class="nofirst noindent"><samp>\parshapelength</samp><a id="uid558"></a>, <samp>\parshapeindent</samp><a id="uid559"></a>,
<samp>\parshapedimen</samp><a id="uid560"></a>.
Commands that read an integer and give properties of the current paragraph
shape.</p>
</li>
<li id="uid561"><p class="nofirst noindent"><samp>\numexpr</samp><a id="uid562"></a>, <samp>\dimexpr</samp><a id="uid563"></a>, <samp>\glueexpr</samp><a id="uid564"></a>,
<samp>\muexpr</samp><a id="uid565"></a>: these commands read an expression, that can be a number,
a dimension, a glue or a math dimension, with an extended syntax.
They are &#1013;-TeX extensions described
in section <a href="#uid3749" title="Extensions">6.12</a>.</p>
</li>
<li id="uid566"><p class="nofirst noindent"><samp>\gluestretchorder</samp><a id="uid567"></a>, <samp>\glueshrinkorder</samp><a id="uid568"></a>,
<samp>\gluestretch</samp><a id="uid569"></a>, <samp>\glueshrink</samp><a id="uid570"></a>. These commands read some glue,
and extract a part of it. They are &#1013;-TeX extensions described
in section <a href="#uid3749" title="Extensions">6.12</a>.</p>
</li>
<li id="uid571"><p class="nofirst noindent"><samp>\gluetomu</samp><a id="uid572"></a>, <samp>\mutoglue</samp><a id="uid573"></a>: These commands read some glue,
or math glue, and convert. They are &#1013;-TeX extensions described
in section <a href="#uid3749" title="Extensions">6.12</a>.</p>
</li></ul>
<p>The counters defined in <i>Tralics</i> are the following. The counters are not
used unless specified otherwise, but you can say
<samp>\renewcommand\thepage{...}</samp>, this is not an error.</p>
<ul>
<li id="uid574"><p class="nofirst noindent"><samp>page</samp><a id="uid575"></a>. This is <samp>\count0</samp>. Tralics initialises it to 1.</p>
</li>
<li id="uid576"><p class="nofirst noindent"><samp>enumi</samp><a id="uid577"></a>, <samp>enumii</samp><a id="uid578"></a>,
<samp>enumiii</samp><a id="uid579"></a>, <samp>enumiv</samp><a id="uid580"></a>: for enumerations.
Unless specified otherwise, the enumeration counter is updated, but the value
is not used.</p>
</li>
<li id="uid581"><p class="nofirst noindent"><samp>part</samp><a id="uid582"></a>, for parts of a book.</p>
</li>
<li id="uid583"><p class="nofirst noindent"><samp>chapter</samp><a id="uid584"></a>,
<samp>subsection</samp><a id="uid585"></a>,
<samp>section</samp><a id="uid586"></a>,
<samp>subsubsection</samp><a id="uid587"></a>,
<samp>paragraph</samp><a id="uid588"></a>,
<samp>subparagraph</samp><a id="uid589"></a>. Each counter depends on the preceding
one.</p>
</li>
<li id="uid590"><p class="nofirst noindent"><samp>FancyVerbLine</samp><a id="uid591"></a>, this is the default counter
used by the <samp>verbatim</samp> environment for counting lines.</p>
</li>
<li id="uid592"><p class="nofirst noindent"><samp>footnote</samp><a id="uid593"></a>. Each call to the <samp>\footnote</samp> command
increments this counter, but the value is not used.</p>
</li>
<li id="uid594"><p class="nofirst noindent"><samp>mpfootnote</samp><a id="uid595"></a>. Minipage footnotes.</p>
</li>
<li id="uid596"><p class="nofirst noindent"><samp>bottomnumber</samp><a id="uid597"></a>,
<samp>topnumber</samp><a id="uid598"></a>:
used by latex for float placement.</p>
</li>
<li id="uid599"><p class="nofirst noindent"><samp>totalnumber</samp><a id="uid600"></a>,
<samp>dbltopnumber</samp><a id="uid601"></a>:</p>
</li></ul>
<p>The dimension parameters are the following:</p>
<ul>
<li id="uid602"><p class="nofirst noindent"><samp>\parindent</samp><a id="uid603"></a>: indentation of paragraphs.</p>
</li>
<li id="uid604"><p class="nofirst noindent"><samp>\mathsurround</samp><a id="uid605"></a>: space around math in text.</p>
</li>
<li id="uid606"><p class="nofirst noindent"><samp>\lineskiplimit</samp><a id="uid607"></a>: threshold where
<samp>\baselineskip</samp> switches to <samp>\lineskip</samp>.</p>
</li>
<li id="uid608"><p class="nofirst noindent"><samp>\hsize</samp><a id="uid609"></a>: line width in horizontal mode.</p>
</li>
<li id="uid610"><p class="nofirst noindent"><samp>\vsize</samp><a id="uid611"></a>: page height in vertical mode.</p>
</li>
<li id="uid612"><p class="nofirst noindent"><samp>\maxdepth</samp><a id="uid613"></a>: maximum depth of boxes on main pages.</p>
</li>
<li id="uid614"><p class="nofirst noindent"><samp>\splitmaxdepth</samp><a id="uid615"></a>: maximum depth of boxes on split
pages.</p>
</li>
<li id="uid616"><p class="nofirst noindent"><samp>\boxmaxdepth</samp><a id="uid617"></a>: maximum depth of explicit vboxes.</p>
</li>
<li id="uid618"><p class="nofirst noindent"><samp>\hfuzz</samp><a id="uid619"></a>: tolerance for overfull hbox messages.</p>
</li>
<li id="uid620"><p class="nofirst noindent"><samp>\vfuzz</samp><a id="uid621"></a>: tolerance for overfull vbox messages.</p>
</li>
<li id="uid622"><p class="nofirst noindent"><samp>\delimitershortfall</samp><a id="uid623"></a>:
maximum amount uncovered by variable delimiters.</p>
</li>
<li id="uid624"><p class="nofirst noindent"><samp>\nulldelimiterspace</samp><a id="uid625"></a>:
blank space in null delimiters.</p>
</li>
<li id="uid626"><p class="nofirst noindent"><samp>\scriptspace</samp><a id="uid627"></a>:
extra space after subscript or superscript.</p>
</li>
<li id="uid628"><p class="nofirst noindent"><samp>\predisplaysize</samp><a id="uid629"></a>:
length of text preceding a display.</p>
</li>
<li id="uid630"><p class="nofirst noindent"><samp>\displaywidth</samp><a id="uid631"></a>:
length of line for displayed equation.</p>
</li>
<li id="uid632"><p class="nofirst noindent"><samp>\displayindent</samp><a id="uid633"></a>:
indentation of line for displayed equation.</p>
</li>
<li id="uid634"><p class="nofirst noindent"><samp>\overfullrule</samp><a id="uid635"></a>: width of rule that identifies
overfull hboxes.</p>
</li>
<li id="uid636"><p class="nofirst noindent"><samp>\hangindent</samp><a id="uid637"></a>: amount of hanging indentation.</p>
</li>
<li id="uid638"><p class="nofirst noindent"><samp>\hoffset</samp><a id="uid639"></a>:
amount of horizontal offset when shipping pages out.</p>
</li>
<li id="uid640"><p class="nofirst noindent"><samp>\voffset</samp><a id="uid641"></a>: amount of vertical offset when shipping
pages out.</p>
</li>
<li id="uid642"><p class="nofirst noindent"><samp>\emergencystretch</samp><a id="uid643"></a>: reduces badnesses on final pass of line-breaking.</p>
</li>
<li id="uid644"><p class="nofirst noindent"><samp>\z@</samp><a id="uid645"></a>: You should forget that this is a variable, and use
it only as the constant zero.</p>
</li>
<li id="uid646"><p class="nofirst noindent"><samp>\p@</samp><a id="uid647"></a>: contains 1pt.</p>
</li>
<li id="uid648"><p class="nofirst noindent"><samp>\evensidemargin</samp><a id="uid649"></a>: defined by LaTeX, left
margin for even pages.</p>
</li>
<li id="uid650"><p class="nofirst noindent"><samp>\oddsidemargin</samp><a id="uid651"></a>: defined by LaTeX, left
margin for odd pages.</p>
</li>
<li id="uid652"><p class="nofirst noindent"><samp>\leftmargin</samp><a id="uid653"></a>: defined by LaTeX. Space between
the left margin of the page and the left margin of the text. Depends on the
list level.</p>
</li>
<li id="uid654"><p class="nofirst noindent"><samp>\rightmargin</samp><a id="uid655"></a>: defined by LaTeX.
Similar to <samp>\leftmargin</samp>, but for the right margin.</p>
</li>
<li id="uid656"><p class="nofirst noindent"><samp>\leftmargini</samp><a id="uid657"></a>: defined by LaTeX.
Value of left margin for a list at level one.</p>
</li>
<li id="uid658"><p class="nofirst noindent"><samp>\leftmarginii</samp><a id="uid659"></a>: defined by LaTeX.
Value of left margin for a list at level two.</p>
</li>
<li id="uid660"><p class="nofirst noindent"><samp>\leftmarginiii</samp><a id="uid661"></a>: defined by LaTeX.
Value of left margin for a list at level three.</p>
</li>
<li id="uid662"><p class="nofirst noindent"><samp>\leftmarginiv</samp><a id="uid663"></a>: defined by LaTeX.
Value of left margin for a list at level four.</p>
</li>
<li id="uid664"><p class="nofirst noindent"><samp>\leftmarginv</samp><a id="uid665"></a>: defined by LaTeX.
Value of left margin for a list at level five.</p>
</li>
<li id="uid666"><p class="nofirst noindent"><samp>\leftmarginvi</samp><a id="uid667"></a>: defined by LaTeX.
Value of left margin for a list at level six.</p>
</li>
<li id="uid668"><p class="nofirst noindent"><samp>\itemindent</samp><a id="uid669"></a>: defined by LaTeX. Extra indentation
added to the horizontal indentation of the text part of the first line of an
item in a list.</p>
</li>
<li id="uid670"><p class="nofirst noindent"><samp>\labelwidth</samp><a id="uid671"></a>: defined by LaTeX. Nominal width of
the box containing the label of an item.</p>
</li>
<li id="uid672"><p class="nofirst noindent"><samp>\fboxsep</samp><a id="uid673"></a>: defined by LaTeX. Space left between the
edge of the box and its content produced by <samp>\fbox</samp> or <samp>\framebox</samp>.</p>
</li>
<li id="uid674"><p class="nofirst noindent"><samp>\fboxrule</samp><a id="uid675"></a>: defined by LaTeX. Width of line
produced by <samp>\fbox</samp> or <samp>\framebox</samp>.</p>
</li>
<li id="uid676"><p class="nofirst noindent"><samp>\arraycolsep</samp><a id="uid677"></a>: defined by LaTeX, contains half of the witdh
of the default horizontal space in a math array.</p>
</li>
<li id="uid678"><p class="nofirst noindent"><samp>\tabcolsep</samp><a id="uid679"></a>: defined by LaTeX, contains half of the witdh
of the default horizontal space in a text array.</p>
</li>
<li id="uid680"><p class="nofirst noindent"><samp>\arrayrulewidth</samp><a id="uid681"></a>: defined by LaTeX, contains the witdh
of vertical rules in an array.</p>
</li>
<li id="uid682"><p class="nofirst noindent"><samp>\doublerulewidth</samp><a id="uid683"></a>: defined by LaTeX, contains the distance
between two vertical rules in an array.</p>
</li>
<li id="uid684"><p class="nofirst noindent"><samp>\normallineskiplimit</samp><a id="uid685"></a>: default value of
<samp>\lineskiplimit</samp>.</p>
</li>
<li id="uid686"><p class="nofirst noindent"><samp>\epsfxsize</samp><a id="uid687"></a>. Used for including images.</p>
</li>
<li id="uid688"><p class="nofirst noindent"><samp>\epsfysize</samp><a id="uid689"></a>. Used for including images.</p>
</li>
<li id="uid690"><p class="nofirst noindent"><samp>\unitlength</samp><a id="uid691"></a>. Used for the picture
environment. Initialised by <i>Tralics</i> to 1pt.</p>
</li>
<li id="uid692"><p class="nofirst noindent"><samp>\textwidth</samp><a id="uid693"></a>. Width of the text.
Initialised by <i>Tralics</i> to 427pt. More or less 15cm.</p>
</li>
<li id="uid694"><p class="nofirst noindent"><samp>\textheight</samp><a id="uid695"></a>. Height of the text.
Initialised by <i>Tralics</i> to 570pt. More or less 20cm.</p>
</li>
<li id="uid696"><p class="nofirst noindent"><samp>\columnwidth</samp><a id="uid697"></a>: this is defined by LaTeX as containing the
current line width; in a two-column document this is the half of
<samp>\textwidth</samp> minus <samp>\columnsep</samp>, otherwise it is <samp>\textwidth</samp>.
LaTeX copies this value in <samp>\hsize</samp> is some cases (for instance, when
switching between one column and two columns).</p>
</li>
<li id="uid698"><p class="nofirst noindent"><samp>\marginparwidth</samp><a id="uid699"></a>, <samp>\marginparsep</samp><a id="uid700"></a>,
<samp>\marginparpush</samp><a id="uid701"></a>: three parameters defined by LaTeX for placement
of marginal notes.</p>
</li>
<li id="uid702"><p class="nofirst noindent"><samp>\topmargin</samp><a id="uid703"></a>, <samp>\headheight</samp><a id="uid704"></a>, <samp>\headsep</samp><a id="uid705"></a>: these
three dimensions are used by LaTeX for controlloing the header of a page.</p>
</li>
<li id="uid706"><p class="nofirst noindent"><samp>\footskip</samp><a id="uid707"></a>: this dimension (not glus) is used by LaTeX for
controlloing the footer of a page.</p>
</li>
<li id="uid708"><p class="nofirst noindent"><samp>\columnsep</samp><a id="uid709"></a>, <samp>\columnseprule</samp><a id="uid710"></a>: this is defined by
LaTeX as containing the distance between columns and width of the vertical
rule between columns in a multi-column document.</p>
</li>
<li id="uid711"><p class="nofirst noindent"><samp>\linewidth</samp><a id="uid712"></a>: this is defined by LaTeX as containing the
current line width (typically, this is <samp>\columnwidth</samp> minus the margins
introduced by list environment). In <i>Tralics</i>, these two commands are
undefined, except that you can use it
as a unit of measure inside the optional argument of <samp>\includegraphics</samp>
for `height´ and `width´: the value is 15cm.</p>
</li>
<li id="uid713"><p class="nofirst noindent"><samp>\@tempdima</samp><a id="uid714"></a>,
<samp>\@tempdima</samp><a id="uid715"></a>,
<samp>\@tempdima</samp><a id="uid716"></a>: three scratch registers.</p>
</li>
<li id="uid717"><p class="nofirst noindent"><samp>\paperheight</samp><a id="uid718"></a>, <samp>\paperwidth</samp><a id="uid719"></a>: contains the size of the
paper on which the document will be printed; is A4 by default in <i>Tralics</i>,
namely 297 and 210mm.</p>
</li>
<li id="uid720"><p class="nofirst noindent"><samp>\jot</samp><a id="uid721"></a>: a small quantity, in fact 3pt.</p>
</li>
<li id="uid722"><p class="nofirst noindent"><samp>\maxdimen</samp><a id="uid723"></a>: a large quantity, in fact the largest dimension
that can be stored is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn> <mn>14</mn> </msup></math></span>pt minus one sp.</p>
</li></ul>
<p>The registers are the following</p>
<ul>
<li id="uid724"><p class="nofirst noindent"><samp>\count xxx</samp><a id="uid725"></a>: table of 256 &#8220;count&#8221; registers.</p>
</li>
<li id="uid726"><p class="nofirst noindent"><samp>\dimen xxx</samp><a id="uid727"></a>: table of 256 &#8220;dimen&#8221; registers.</p>
</li>
<li id="uid728"><p class="nofirst noindent"><samp>\skip xxx</samp><a id="uid729"></a>: table of 256 &#8220;skip&#8221; registers.</p>
</li>
<li id="uid730"><p class="nofirst noindent"><samp>\muskip xxx</samp><a id="uid731"></a>: table of 256 &#8220;muskip&#8221; registers.</p>
</li>
<li id="uid732"><p class="nofirst noindent"><samp>\toks xxx</samp><a id="uid733"></a>: table of 256 token lists.</p>
</li>
<li id="uid734"><p class="nofirst noindent"><samp>\box xxx</samp><a id="uid735"></a>: table of 256 box registers.</p>
</li>
<li id="uid736"><p class="nofirst noindent"><samp>\wd xxx</samp><a id="uid737"></a>: Width of box N. If you ask for the value of
the width, you will get zero. If you modify the width, nothing happens.</p>
</li>
<li id="uid738"><p class="nofirst noindent"><samp>\ht xxx</samp><a id="uid739"></a>: Height of box N.</p>
</li>
<li id="uid740"><p class="nofirst noindent"><samp>\dp xxx</samp><a id="uid741"></a>: Depth of box N.</p>
</li>
<li id="uid742"><p class="nofirst noindent"><samp>\delcode xxx</samp><a id="uid743"></a>: table of 256 delimiter code mappings.
Unused by <i>Tralics</i>.</p>
</li>
<li id="uid744"><p class="nofirst noindent"><samp>\catcode xxx</samp><a id="uid745"></a>: table of 256 category codes.
In <i>Tralics</i>, <samp>\{}$&amp;#^_~%</samp>
have standard category codes. All letters have category code 11.
Space, tabulation, non-breaking space (character 160) have category 10.
All other characters have category 12.</p>
</li>
<li id="uid746"><p class="nofirst noindent"><samp>\sfcode xxx</samp><a id="uid747"></a>: table of 256 spacefactor mappings.
Not used by <i>Tralics</i>.</p>
</li>
<li id="uid748"><p class="nofirst noindent"><samp>\lccode xxx</samp><a id="uid749"></a>: table of 256 lowercase equivalents.</p>
</li>
<li id="uid750"><p class="nofirst noindent"><samp>\uccode xxx</samp><a id="uid751"></a>: table of 256 uppercase equivalents.
Since <i>Tralics</i>2.9, uppercase equivalent of
ÿ is &#376; (hex FF and 178), and vice-versa.</p>
</li>
<li id="uid752"><p class="nofirst noindent"><samp>\mathcode xxx</samp><a id="uid753"></a>: table of 256 math mode mappings.
The math code of a character is ignored, except that a value of 32768, that
makes the character active in math mode.</p>
</li></ul>
<p>Since version 2.9 of <i>Tralics</i>, all characters have 16 bits, so that the number
of characters 256 should be replaced by <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn> <mn>16</mn> </msup></math></span>. i.e. 65536, in the sizes
above. Moreover, the number of other registers (from <samp>\count</samp> to <samp>\box</samp>
above) has been increased to 4096.</p>
<p>Some quantities are meaningful when TeX makes lines into pages. The
dimension <samp>\pagegoal</samp><a id="uid754"></a> contains the current page height (minus the size
of all potential insertions). The current page height has a natural value
in <samp>\pagetotal</samp><a id="uid755"></a> and a shrink part in <samp>\pageshrink</samp><a id="uid756"></a>, the
stretch part is in <samp>\pagestretch</samp><a id="uid757"></a>, its `fil´ part is in
<samp>\pagefilstretch</samp><a id="uid758"></a>, its `fill´ part in <samp>\pagefillstretch</samp><a id="uid759"></a>
and its `filll´ part in <samp>\pagefilllstretch</samp><a id="uid760"></a>. The depth of the box is a
constant dimension, in <samp>\pagedepth</samp><a id="uid761"></a>. Whenever the output routine is
called, TeX increases the value of the integer counter
<samp>\deadcycles</samp><a id="uid762"></a>; an error is signaled if the value is too big, it is
reset to zero by <samp>\shipout</samp><a id="uid763"></a>. In <samp>\prevdepth</samp><a id="uid764"></a>, you can find the
depth of the most recent box on the current vertical list, in the integer
<samp>\prevgraf</samp><a id="uid765"></a> the number of lines in the most recent paragraph that has
been completed or partially completed.
Of course, all these value are zero in <i>Tralics</i>.</p>
<p>In plain TeX, you can use <samp>\nointerlineskip</samp> and
<samp>\offinterlineskip</samp>. These commands change the value of
<samp>\prevdepth</samp>. They are ignored by <i>Tralics</i>.</p>

<h2 id="uid766">2.6. Using the variables</h2>
<p>There are three routines defined in <i>Tralics</i>, named scanint, scandimen and
scanglue that read a integer, a dimension and glue. Assume that
<samp>\count0</samp> is 1, <samp>\parindent</samp> is 3pt, and you say
<samp>\skip\count0=2pt plus \parindent\relax</samp>.
The transcript file of <i>Tralics</i> will contain</p>
<pre class="log-code">[346] \skip\count0=2pt plus \parindent \relax
{\skip}
+scanint for \count-&gt;0
+scanint for \skip-&gt;1
+scanint for \skip-&gt;2
+scandimen for \skip-&gt;2.0pt
+scandimen for \skip-&gt;3.0pt
{scanglue 2.0pt plus 3.0pt\relax }
{changing \skip1=0.0pt into \skip1=2.0pt plus 3.0pt}
{\relax}
</pre>
<p class="nofirst noindent">The exact rules will be given later. The following happens here: After
<samp>\skip</samp> there is an integer, an optional equals sign, then glue. After
<samp>\count</samp> there has to be an integer. Thus, scanint reads an integer for
<samp>\count</samp>, and an other one for <samp>\skip</samp>. A glue item is formed of a
dimension (the natural width), optionally followed by `<samp>plus</samp>´ and a dimension
(the stretch part), optionally
followed by `<samp>minus</samp>´ and a dimension (the shrink part). In this case, there is no stretch part,
because of <samp>\relax</samp>. The second dimension comes from the variable
<samp>\parindent</samp>; the first dimension is explicit: the integer part of the
dimension is read by scanint.</p>
<p>An integer can be explicit or implicit: an implicit integer comes from a
command (it can be a variable like <samp>\date</samp>, or a constant like
<samp>\active</samp>). In all other cases, the number can be followed by one optional
space. In general, the number will be given as a non-empty sequence of digits,
like <samp>01239</samp>; you can specify digits in base 16 as <samp>&#8220;FF</samp>, this is 255,
in this case, letters between A and F (uppercase, category 11 or 12) are
allowed. You can specify digits in base 8 as <samp>´177</samp>, this is 127. You can
also specify a digit as a character: <samp>`A</samp> is 65. You can say <samp>`\A</samp>, this is
also 65; note that a backslash is needed in cases like <samp>`\%</samp>. Only one letter
is allowed in the command name, digits and quotes must have category 12.</p>
<p>An integer or a dimension can be preceded by a sign. This is a sequence of
arbitrary length, formed of spaces or <tt>+</tt><sub>12</sub> or <tt>-</tt><sub>12</sub>
signs. If the number of minus signs is odd, this changes the sign of the
result. Hence if you say <samp>\count0=+-+´77</samp> and <samp>\count1=-\count0</samp>,
this will put 63 in <samp>\count1</samp>.</p>
<p>A dimension can be implicit or explicit. You can say <samp>\count0=\dimen0</samp>: in
this case the value of the dimension in sp units is put in the count register.
You can say <samp>\dimen0=\skip0</samp>: the shrink and stretch part of the glue is
ignored. You can also say <samp>\count0=\skip0</samp> (guess what happens). It is not
possible to convert (directly) an integer to a dimension or glue. An explicit dimension
is formed of a factor and a unit of measure. The factor can be an integer
(hence <samp>-´77pt</samp> is a valid dimension), or a decimal number (given in base ten,
like <samp>1.5</samp>, or <samp>1,5</samp>). Units can be
<a id="uid767"></a><samp>pt</samp>, <samp>pc</samp>, <samp>in</samp>, <samp>bp</samp>, <samp>cm</samp>, <samp>mm</samp>, <samp>dd</samp>,
<samp>cc</samp>, <samp>sp</samp>. The case is irrelevant: <samp>Pt</samp>, <samp>pt</samp>,
<samp>PT</samp> and <samp>pT</samp> are valid, the category code may be anything (it cannot be
active, because everything is fully expanded). Units shown above
can be preceded by <samp>true</samp><a id="uid768"></a> (note that <i>Tralics</i> ignores
magnification,
thus the `<samp>true</samp>´ prefix). Units can also be <samp>em</samp><a id="uid769"></a> or
<samp>ex</samp><a id="uid770"></a>. These values depend on the current font. <i>Tralics</i> always
assumes that the font is a ten point one. A unit of measure can also be an
integer, a dimension, or glue. For instance <samp>\dimen0=1\count0</samp> will multiply
the value of <samp>\count0</samp> by one. This is the dual to <samp>\count0=\dimen0</samp>.
You can say <samp>\parindent=1.2\parindent</samp> if you want to increase it by 20%.</p>
<p>A glue is formed of three parts: a dimension, a stretch part, and a shrink
part. The stretch part can be a dimension (it can use special units like
`<samp>fil</samp>´, `<samp>fill</samp>´ and `<samp>filll</samp>´, these are called infinite, of first, second and
third order). You can say
<samp>\skip0=0pt plus 1fil</samp>.<a id="uid771"></a> For some strange reasons, after <samp>fil</samp> you
can put a second <samp>L</samp>, and a third one. As is the case with other units like <samp>ex</samp>
or <samp>em</samp>, the case is irrelevant. Spaces are ignored after the <samp>L</samp>. Moreover,
TeX continues scanning for an <samp>L</samp> after having found `<samp>filll</samp>´; if found, it
signals the following error:
<i>Illegal unit of measure (replaced by filll)</i>. In the case of
<samp>\skip0=2\skip0</samp>, the equals sign is followed by a dimension: there is a
factor 2, and a unit (the fixed part of <samp>\skip0</samp>). As a consequence,
this multiplies by two the fixed part of the glue, and sets the shrink and
stretch part to zero (unless the code above is followed by `<samp>plus</samp>´ or
`<samp>minus</samp>´).</p>
<p>Note: if you say <samp>\chardef\foo=123\foo</samp>, then <samp>\foo</samp> is made equal to 123:
the first thing that <samp>\chardef</samp> does it to make <samp>\foo</samp> the same as
<samp>\relax</samp>, so that scanning stops after digit 3. On the other hand in the
case of <samp>\count0=3\ifnum...</samp> the conditional is evaluated while reading the
number, thus before the assignment is complete. In particular, if the test
compares <samp>\count0</samp> with something else, the value might be different from
three. Assume that <samp>\count0</samp> and <samp>\count13</samp> contain the value 7. What happens
if you say:
<samp>\count0=2\ifnum\count0=\count13\fi4</samp> ?
It will put 2 in <samp>\count0</samp> and
typeset 4. In fact, after the digit 3 is sensed, the <samp>\fi</samp> token terminates
the <samp>\ifnum</samp>. It does so by inserting a <samp>\relax</samp> token, and a second
<samp>\fi</samp> token. The effect of <samp>\relax</samp> is to finish reading the number.
Thus <samp>\ifnum</samp> can compare the two values. If these two values are
different, the expansion of the conditional is empty, and 24 is put in
<samp>\count0</samp>. But the test is true, and TeX reads again the inserted
<samp>\relax</samp>: it has as effect to stop scanning of the number 2. After that
the inserted <samp>\fi</samp> is read. The transcript file of <i>Tralics</i> might
look like the following.
Since version 2.9, the transcript file contains also assignments. So you can
see the order: when the <samp>\fi</samp> is seen, the last <samp>\count</samp>, hence the RHS
of the equality, is not yet evaluated and a <samp>\fi</samp> token is inserted,
preceded by a <samp>\relax</samp> token; these are evaluated later; the <samp>\relax</samp>
token is seen by <samp>\count</samp>, and left unchanged. After that, we have the
number 13, hence the value of <samp>\count13</samp>, hence the truth value of the
test. Now, the body of the conditional is read; it consists solely of the
<samp>\relax</samp>. This one is seen by the first <samp>\count</samp>, that has the value
needed by the assignment. After the assignment is complete, the <samp>\relax</samp> is
considered again: it is read, and the inserted <samp>\fi</samp> is evaluated.</p>
<pre class="log-code">[2677] \count0=2\ifnum\count0=\count13\fi4
{\count}
+scanint for \count-&gt;0
+\ifnum989
+scanint for \count-&gt;0
+scanint for \ifnum-&gt;7
+\fi989
+scanint for \count-&gt;13
+scanint for \ifnum-&gt;7
+iftest989 true
+scanint for \count-&gt;2
{changing \count0=7 into \count0=2}
{\relax}
+\fi989
Character sequence: 4 .
</pre>
<p>A token list is a like a command
without arguments. You can say <samp>\foo={ABC}</samp> if you want to put something it
it, and <samp>\the</samp><samp>\foo</samp> if you want to use the list. The equals sign is
optional. You can insert a <samp>\relax</samp><a id="uid772"></a> between the equals sign
and the opening brace. In the example that follows, you can see that, after the
optional equals sign, you can put as many spaces or <samp>\relax</samp> tokens as you
like; tokens are expanded, as long as no brace is found. The last line of the
example shows that the token that follows <samp>\the</samp> is expanded (if <samp>\the</samp>
itself is expanded). Thus, the last line adds some tokens at the end of the
list. Note the space in <samp>\A</samp>: without it, TeX would see something like
<samp>\the</samp><samp>\toks0</samp><samp>\the</samp><samp>\toks0</samp>, and the second <samp>\the</samp> is expanded by the scanint
routine, so that this inserts in <samp>\toks0</samp> the content of <samp>\toks01</samp>
followed by a sharp sign.</p>
<pre class="latex-code">\def\myrelax{ \relax}
\def\A{\toks0 }
\A=\relax\myrelax{1#}
\A=\expandafter{\the\A \the\A}\showthe\toks0
</pre>
<p class="nofirst noindent">The <samp>\showthe</samp> command prints `<samp>1##\the \A</samp>´, but only a single <samp>#</samp> is in
the list.</p>
<p>We have seen on page <a href="#uid181" title="Some small examples">2.3</a> how to use <samp>\cons</samp> to add some tokens
to a command via <samp>\edef</samp>. The code that follows adds tokens to a list.
The command is called <samp>\addto@hook</samp> in <i>Tralics</i> and is long, but the body is
the same.</p>
<pre class="latex-code">\def\addtohook#1#2{#1\expandafter{\the#1#2}}
\newtoks\foo
\addtohook{\foo}{\do{A}}\addtohook{\foo}{\do{B}}\addtohook{\foo}{\do{C}}
</pre>
<p class="nofirst noindent">The command <samp>\newtoks</samp><a id="uid773"></a> defines its argument as a reference
to a token register, for instance <samp>\toks23</samp>. Whenever you use <samp>\addtohook</samp>
with <samp>\A</samp> as first argument, it is like the assignment
<samp>\A</samp><!--PASS THROUGH allowbreak--><samp>=\expandafter{\the\A...}</samp> shown in the previous example.
Other example</p>
<pre class="latex-code">  \T\expandafter{\L}
% \xdef\L{...\the\T}
  \xdef\L{\catcode\the\count@=\the\catcode\the\count@\relax\the\T}
</pre>
<p class="nofirst noindent">Let´s assume that <samp>\L</samp> is a parameterless command, and <samp>\T</samp> a reference
to a token register. The first line puts the value of <samp>\L</samp> in <samp>\T</samp>.
The second line explains what we do in the third one. Remember that <samp>\xdef</samp>
expands everything in the body. All tokens are fully expanded (except that the
result of <samp>\the</samp> is not expanded). As a result, this will put some tokens
in front of <samp>\L</samp>. Let´s explain which tokens. We assume that <samp>\count@</samp> is
a reference to some counter, that the counter contains 65, this is the ASCII
code of the upper case letter A, and we assume that the category code is 11.
The first token is <samp>\catcode</samp>, it cannot be expanded, it will be left
unchanged. The second token is <samp>\the</samp>. It can be expanded, the result is
the value of the counter, the two characters 65. The equals sign cannot be
expanded. Then comes <samp>\the</samp>; this expands what follows. The <samp>\catcode</samp>
command reads a number. Because of <samp>\the</samp>, it reads two digits 6 and 5, and
looks at the <samp>\relax</samp>. Note: this <samp>\the</samp> is useless, this example
revealed a bug in <i>Tralics</i>. This is the log of <i>Tralics</i>. The last line
indicates the value of <samp>\L</samp>:</p>
<pre class="log-code">[18]   \xdef\L{\catcode\the\countx=\the\catcode\the\countx\relax\the\T}
{\xdef}
{\the}
{\the \countx}
\the-&gt;65.
{\the}
{\the \catcode}
{\the}
{\the \countx}
\the-&gt;65.
+scanint for \catcode-&gt;65
\the-&gt;11.
{\the}
{\the \T}
\the-&gt;\catcode 48=12\relax .
{\def \L -&gt;\catcode 65=11\relax \catcode 48=12\relax }
</pre>
<p>There are some advantages in putting items in a box. For instance, if it takes
a long time to translate a piece of text that will be used several times, it
can save some time. A second possibility is to create a box in a given context
and use it in another one (this can be used for instance to put verbatim
material in a section title; not in the toc, because the toc is obtained by
reading characters from a file, but the box can be used for page headings).
Finally, one can put some text in a box, measure the size of the box, and do
some action according to the size of the box; it is not possible to measure a
box in <i>Tralics</i> because no typesetting is done. Note that there is a limited
number of boxes (there is a limit on the number of token registers, but you
can always put your token list in a macro; in the same fashion, it is always
possible to store integers and dimensions into token lists, i.e., in commands).
Note that, if you want to implement arithmetics on big numbers, if you
represent a number <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>=</mo><mo>&#8721;</mo><msub><mi>x</mi> <mi>k</mi> </msub><msup><mi>B</mi> <mi>k</mi> </msup></mrow></math></span> as a sequence of commands, try to access to
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mi>k</mi> </msub></math></span> via <samp>\csname x</samp><samp>\the</samp><samp>\k</samp><samp>\endcsname</samp>, and parse this as an integer, then you
get something inefficient. It is much more efficient to say <samp>\fontdimen</samp><samp>\k</samp><samp>\x</samp>
(there is a TeX file by Denis Roegel that computes thousands of digits of
&#960; using font tables as auxiliary memory).</p>

<h2 id="uid774">2.7. Counters</h2>
<p>The most useful registers are counters. Rather than saying `<samp>\count16=0</samp>´, at
the risk of destroying variables used by other packages, you should use named
counters, together with an allocation scheme. We have seen that
`<samp>\newcount</samp><samp>\foo</samp>´ does that. In LaTeX, we can do more. If you say
`<samp>\newcounter</samp><samp>{foo}</samp><samp>[bar]</samp>´<a id="uid775"></a> then a
counter foo is defined that depends on bar.
Let´s assume<a id="uid776" href="#note35" title="In earlier versions, the value returned by the allocator was stored in an internal integer; nowadays..."><small>(note: </small>&#10163;<small>)</small></a>, for simplicity
, that the allocation mechanism allocates count
register 17. Then <samp>\c@foo</samp> is a reference to `<samp>\count17</samp>´. It is assumed that
no package defines a command that starts with <samp>c@</samp>, or <samp>p@</samp> or <samp>cl@</samp>,
so that <samp>\c@foo</samp><a id="uid777"></a>,
<samp>\cl@foo</samp><a id="uid778"></a>, and <samp>\p@foo</samp><a id="uid779"></a> are
reserved for the counter foo.
In LaTeX, there is a command <samp>\value</samp><a id="uid780"></a> that takes
one argument and expands to <samp>\csname</samp> <samp>c@#1</samp><samp>\endcsname</samp>.
The same command exists in <i>Tralics</i>, but it signals an error in the case
where <samp>\c@foo</samp> is not a reference to a count register. You can say
`<samp>\value</samp><samp>{foo}</samp><samp>=10</samp>´, this will put
10 into the counter, you can say `<samp>\the</samp><samp>\value</samp><samp>{foo}</samp>´,
this will typeset the value of the counter.
You should not use this low-level TeX syntax. In fact, if you
say `<samp>\value</samp><samp>{foo}</samp><samp>=10</samp><samp>\the</samp><samp>\value</samp><samp>{foo}</samp>´ this will put 103 into the counter
(assuming that it contained 3). Compare this with
<samp>\parindent</samp><samp>=10</samp><samp>\parindent</samp> where there is an implicit multiplication.</p>
<p>Assignment should be done via `<samp>\setcounter</samp><samp>{foo}</samp><samp>{10}</samp>´<a id="uid781"></a>.
This is the same as `<samp>\global</samp><!--PASS THROUGH allowbreak--><samp>\value</samp><!--PASS THROUGH allowbreak--><samp>{foo}</samp><samp>=10</samp><samp>\relax</samp>´ (plus a check that
`foo´ is a counter). The <samp>\relax</samp><a id="uid782"></a> has as effect to stop
scanning the number. The <samp>\global</samp><a id="uid783"></a> makes the assignment
global. In the same fashion, `<samp>\addtocounter</samp><!--PASS THROUGH allowbreak--><samp>{foo}</samp><!--PASS THROUGH allowbreak--><samp>{4}</samp>´<a id="uid784"></a>
is the same as `<samp>\global</samp><!--PASS THROUGH allowbreak--><samp>\advance</samp><!--PASS THROUGH allowbreak--><samp>\value</samp><!--PASS THROUGH allowbreak--><samp>{foo}</samp><samp>4</samp><samp>\relax</samp>´.
You can say something like
`<samp>\parindent</samp><!--PASS THROUGH allowbreak--><samp>=</samp><samp>\value</samp><samp>{foo}</samp><samp>\xbar</samp>´,
this puts in <samp>\parindent</samp> the value of <samp>\xbar</samp> (let´s assume it is a
dimension) multiplied by the the value of the foo counter.
If you want to typeset the value of the counter, you say
`<samp>\number</samp><samp>\value</samp><samp>{foo}</samp>´.<a id="uid785"></a> You can also use
<samp>\romannumeral</samp><a id="uid786"></a> or <samp>\Romannumeral</samp><a id="uid787"></a>
(this last command is not defined by TeX) instead of <samp>\number</samp>
(it has to be followed by a number, for instance <samp>\value...</samp>).
The following commands
take as argument the name of a counter, and typeset the value:
<samp>\arabic</samp><a id="uid788"></a> (it gives 7),
<samp>\roman</samp><a id="uid789"></a> (it gives vii),
<samp>\Roman</samp><a id="uid790"></a> (it gives VII),
<samp>\alph</samp><a id="uid791"></a> (it gives g),
<samp>\Alph</samp><a id="uid792"></a> (it gives G),
<samp>\fnsymbol</samp><a id="uid793"></a> (it gives **).
The following commands:
<samp>\@arabic</samp><a id="uid794"></a>,
<samp>\@roman</samp><a id="uid795"></a>,
<samp>\@Roman</samp><a id="uid796"></a>,
<samp>\@alph</samp><a id="uid797"></a>,
<samp>\@Alph</samp><a id="uid798"></a>,
<samp>\@fnsymbol</samp><a id="uid799"></a> are used internally by LaTeX. They are
defined in <i>Tralics</i> for compatibility reasons. Hence
`<samp>\number</samp><samp>\value</samp><samp>{foo}</samp>´ is the same as
`<samp>\@arabic</samp><samp>\c@foo</samp>´ and the same as
`<samp>\arabic</samp><samp>{foo}</samp>´; using <samp>\arabic</samp> is the best choice.</p>
<p>Three operations are defined: <samp>\advance</samp><a id="uid800"></a> that increments
a counter (or a dimension, or a glue), <samp>\multiply</samp><a id="uid801"></a>
that multiplies it by an integer, and <samp>\divide</samp><a id="uid802"></a>
that divides it by an integer. In the case of integer division, TeX divides
the absolute values, and adds the required sign to the quotient (the remainder
is not computed). The following piece of code puts in <samp>\count0</samp>
the number of hours and in <samp>\count2</samp> the numbers of minutes (quotient of
remainder of the division of <samp>\time</samp> by 60).</p>
<pre class="latex-code">\count0\time
\divide\count0 60
\count2=-\count0
\multiply\count2 60
\advance\count2 \time
</pre>
<p>You can say <samp>\newlength</samp><samp>\foo</samp><a id="uid803"></a>. This allocates a new skip
register. You can use <samp>\setlength</samp><a id="uid804"></a>
and <samp>\addtolength</samp><a id="uid805"></a>, in the same way as <samp>\setcounter</samp>
and <samp>\addtocounter</samp>. However, assignments are local. Using plain TeX syntax, you can say:</p>
<pre class="latex-code">\dimen0=2mm\dimen1=0.2cm
\advance\dimen0 by-\dimen1
\count0=\dimen0
</pre>
<p class="nofirst noindent">Note that <samp>\dimen@</samp>, <samp>\dimen@i</samp>, and <samp>\dimen@ii</samp><a id="uid806"></a> are aliases for
<samp>\dimen0</samp>, <samp>\dimen0</samp> and <samp>\dimen2</samp>, these quantities are defined but
not used by the LaTeX kernel (but they are used by packages). All registers
with number less than ten can be used freely, others should use the allocation
mechanism. Example</p>
<pre class="latex-code">\newcounter{foo}\newlength\lenA\newlength\lenB
\setlength{\lenA}{2mm}
\setlength\lenB{0.2cm}
\addtolength\lenA{-\lenB}
\setcounter{foo}{\lenA}
</pre>
<p class="nofirst noindent">After this operation, the counter foo contains 5. This means that the
difference between 2mm and 0.2cm is 5sp (two thousands of a micrometer).
Note: <i>Tralics</i> uses exactly the same algorithms as TeX, hence produces the
same results.</p>
<p>Appendix A.3.1 of <a href="#bid5" title="Mittelbach, Goossens, Braams, Carlisle, Rowley2004">[6]</a> describes the <span class="sansserif">calc (package)</span> package.
It allows to write commands like that:<a id="uid807"></a></p>
<pre class="latex-code">\newcommand{\printtime}{%
   \setcounter{hours}{\time/60}%
   \setcounter{minutes}{\time-(\value{hours}*60)}
   \thehours h \theminutes min}
 \def\today{\ifcase\day\or
      1st\or 2nd\or 3rd\or 4th\or 5th\or
      6th\or 7th\or 8th\or 9th\or 10th\or
      11th\or 12th\or 13th\or 14th\or 15th\or
      16th\or 17th\or 18th\or 19th\or 20th\or
      21st\or 22nd\or 23rd\or 24th\or 25th\or
      26th\or 27th\or 28th\or 29th\or 30th\or
      31st\fi~\ifcase\month\or
      January\or February\or March\or April\or May\or June\or
      July\or August\or September\or October\or November\or
      December\fi\space \number\year}
The time is \printtime, \today.
</pre>
<p class="nofirst noindent">In this case, the result of <i>Tralics</i> could be:
`The time is 16h 37min, 7th December 2004.´</p>
<p>You can do operations on integers like this:</p>
<pre class="latex-code">\newcounter{Ac}
\setcounter{Ac}{(1+2)*(3+4)-20}          %% \theAc=1
\addtocounter{Ac}{(1*2)+(3*-4)+(34/7)}   %% \theAc=-5
</pre>
<p class="nofirst noindent">and on dimensions:<a id="uid808"></a></p>
<pre class="latex-code">\newlength{\Bc}
\setlength{\Bc}{(1cm+2cm)*(3+4)-200mm}                    %%\the\Bc=28.4526pt
% exact results should be 1.0pt
\setlength\Bc{\the\Bc*\ratio{25.4pt}{722.7pt}}            %%\the\Bc=0.99985pt
\Bc=1in \setlength\Bc{\the\Bc * 100 / 7227}               %%\the\Bc=0.99998pt
\Bc=1in \setlength\Bc{\the\Bc * \real{ 0.01383700013837}} %%\the\Bc=1.00018pt
\Bc=1cm \setlength\Bc{\the\Bc / \real{28.452755}}         %%\the\Bc=0.99985pt
\Bc=1cm \setlength\Bc{\the\Bc * \ratio{254pt}{7227pt}}    %%\the\Bc=0.99985pt
\Bc=1in \setlength\Bc{\the\Bc / \ratio{7227pt}{100pt}}    %%\the\Bc=1.00018pt
\Bc=1IN \setlength\Bc{\the\Bc / \ratio{7227PT}{100pT}}    %%\the\Bc=1.00018pt
</pre>
<p>In LaTeX, there is a command called <samp>\stepcounter</samp><a id="uid809"></a>. Its
effect is to increment a counter, and reset all counters that depend on it
(see example below). There is also <samp>\refstepcounter</samp><a id="uid810"></a>
whose purpose is to define the current label. This is not implemented in
<i>Tralics</i> (see later for how <samp>\label</samp> works). The idea is that, for a
counter `foo´, the printed value of the label is defined by
`<samp>\p@foo</samp><!--PASS THROUGH allowbreak--><samp>\thefoo</samp>´.
Here <samp>\thefoo</samp><a id="uid811"></a> is normally `<samp>\arabic</samp><samp>{foo}</samp>´,
but the quantity can be redefined. For instance, the book class has
<samp>\renewcommand</samp> <samp>\thesection</samp> <samp>{</samp><samp>\thechapter</samp>
<samp>.</samp><samp>\@arabic</samp> <samp>\c@section</samp><samp>}</samp> (the article
class has no chapter, and does not redefine <samp>\thesection</samp>). Both book and article
classes say:
<samp>\renewcommand</samp><!--PASS THROUGH allowbreak--><samp>\thesubsection</samp><!--PASS THROUGH allowbreak--><samp>{</samp><samp>\thesection</samp><!--PASS THROUGH allowbreak--><samp>.</samp><samp>\@arabic</samp><!--PASS THROUGH allowbreak--><samp>\c@subsection</samp><samp>}</samp>.</p>
<p>Here we define some counters, and make them depend on other counters.</p>
<pre class="latex-code">\newcounter{toto}          \setcounter{toto}{10}
\newcounter{titi}[toto]    \setcounter{titi}{20}
\newcounter{tata}[titi]    \setcounter{tata}{30}
\newcounter{tutu}[toto]    \setcounter{tutu}{40}
</pre>
<p class="nofirst noindent">Here we call <samp>\stepcounter</samp>. The typeset result should be 11101=11101.</p>
<pre class="latex-code">\stepcounter{toto} %  kills titi, tutu
\stepcounter{tata} %%% \thetata=31,
\stepcounter{titi} %% \thetata=0 % titi=1
\stepcounter{tutu}
\thetoto\thetiti\thetata\thetutu=11101
</pre>
<p class="nofirst noindent">The magic is accomplished by the following command:<a id="uid812"></a></p>
<pre class="latex-code">\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}}
</pre>
<p class="nofirst noindent">The first argument is the counter to define (for instance `tutu´), and the
second argument is the dependent counter (for instance `toto´). The <samp>\@cons</samp>
command is defined like on page <a href="#uid181" title="Some small examples">2.3</a>. It modifies the command
<samp>\cl@toto</samp> by adding <samp>\@elt</samp><samp>{tutu}</samp>. If you say <samp>\stepcounter</samp><samp>{toto}</samp>, then
LaTeX executes `<samp>\let</samp> <samp>\@elt</samp><a id="uid813"></a>
<samp>\@stpelt</samp><a id="uid814"></a> <samp>\csname cl@#1</samp><samp>\endcsname</samp>´. Here is a part
of the transcript file of <i>Tralics</i> that shows what happens (you won´t see the
<samp>\csname</samp>, because characters needed for <samp>\c@toto</samp> and <samp>\cl@toto</samp> are read
and expanded only once by <i>Tralics</i>.)</p>
<pre class="log-code">[720] \stepcounter{toto}
\stepcounter-&gt;\global \advance \c@toto 1\relax {\let \@elt \@stpelt \cl@toto }
{\global}
{\global\advance}
+scanint for \c@toto-&gt;1
{globally changing \count45=10 into \count45=11}
{\relax}
{begin-group character {}
+stack: level + 3 for brace entered on line 720
{\let}
{\let \@elt \@stpelt}
{changing \@elt=undefined}
{into \@elt=\@stpelt}
\cl@toto -&gt;\@elt {titi}\@elt {tutu}
\@elt-&gt;\global \c@titi 0\relax
{\global}
{\global\c@titi}
+scanint for \c@titi-&gt;0
{globally changing \count46=20 into \count46=0}
{\relax}
\@elt-&gt;\global \c@tutu 0\relax
{\global}
{\global\c@tutu}
+scanint for \c@tutu-&gt;0
{globally changing \count48=40 into \count48=0}
{\relax}
{end-group character }}
+stack: killing \@elt
+stack: level - 3 for brace from line 720
[721] \stepcounter{tata}
\stepcounter-&gt;\global \advance \c@tata 1\relax {\let \@elt \@stpelt \cl@tata }
{\global}
{\global\advance}
+scanint for \c@tata-&gt;1
{globally changing \count47=30 into \count47=31}
{\relax}
{begin-group character {}
+stack: level + 3 for brace entered on line 721
{\let}
{\let \@elt \@stpelt}
{changing \@elt=undefined}
{into \@elt=\@stpelt}
\cl@tata -&gt;
{end-group character }}
+stack: killing \@elt
+stack: level - 3 for brace from line 721
</pre>

<h2 id="uid815">2.8. Fonts</h2>
<p>One of the question we can ask is: what does <samp>\it</samp> do? As explained above,
this is an unofficial command, thus could be implemented to do anything. Let´s
assume that it is defined in LaTeX2.09 compatibility mode. It is then
possible to explain what happens, but it is harder to explain what <i>Tralics</i> should do. A software like <tt>latex2html</tt> (that we studied carefully when implementing
the first version of <i>Tralics</i> in Perl) uses a lot of energy in order to
translate font changes properly. It is however very difficult to tell it that
<samp>\french</samp> is a similar command (in fact, what we wanted is more than just
finding the scope of the <samp>\french</samp>, we also wanted French syntax rules to
apply, we wanted dashes instead of bullets in lists, etc.). In this paragraph,
we shall explain all the gory details concerning fonts (however, look at
<a href="#bid5" title="Mittelbach, Goossens, Braams, Carlisle, Rowley2004">[6]</a> for what is in a <span class="sansserif">.fd</span> file).</p>
<p>One big table in TeX is the table of fonts: there are <span class="math"><i>N</i></span> fonts with <span class="math"><i>N</i></span>
characters in them (currently <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>N</mi><mo>=</mo><mn>256</mn></mrow></math></span>, and this is a small limit, in
&#937;, this value is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn> <mn>16</mn> </msup></math></span>; the dvi format specifies <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>N</mi><mo>=</mo><msup><mn>2</mn> <mn>32</mn> </msup></mrow></math></span>). A book
like <a href="#bid5" title="Mittelbach, Goossens, Braams, Carlisle, Rowley2004">[6]</a> uses lots of fonts indirectly, via inclusion of PostScript files.
Note that metric files designed for &#937; cannot be read by
TeX. The hyphenation algorithm considers as a word only sequences of
characters from the same font (hence 256 characters per font is a hard
limit). A metric file contains all that it needed for TeX to typeset a
character; it does not contain glyphs. Essentially, it contains three tables,
indicating for each character its height, its depth and its width. There are two
other tables, the lig/kern table, and the kern table, that indicate,
for instance in the case VA that some negative space should be used to make
the characters narrower, and in the case of fi to use a single glyph instead
of two. There is another table (useful only for math mode) that explains how
to construct, for instance, braces of various sizes. Finally, there are some
parameters. One parameter is the design size (the design size of a ten point
font is 10pt), other parameters are the slant, the width of a space (this is
glue), the two values of <samp>ex</samp> and <samp>em</samp>, and extra space. Math fonts have
extra parameters, see <a href="#bid3" title="Knuth1984">[4, appendix G]</a>. A font has two integer
parameters: hyphen char, and skew char. These values are not in the metric
file: when the font is loaded TeX uses the values of
<samp>\defaulthyphenchar</samp><a id="uid816"></a> and
<samp>\defaultskewchar</samp><a id="uid817"></a>. Note: <i>Tralics</i> does not read
TFM files, it sets all parameters to zero.</p>
<p>You load a font by saying <samp>\font</samp><samp>\preloaded=cmr7 scaled</samp> <samp>\magstep4</samp>
or <samp>\font</samp><samp>\foo=cmr10</samp> <samp>at</samp> <samp>12pt</samp>. Such a construction will
read a file <span class="sansserif">cmr7.tfm</span> or <span class="sansserif">cmr10.tfm</span> and apply a scale factor (a factor 2 in the first
case, and 1.2, in the second case). A font like ecrm exists in size
5, 6, 7, 8, 9, 10, 10.95 (magstephalf), 12, 14.4, 17.28, 20.74, 24.88
(magstep 1, 2, 3, 4, and 5 respectively), 29.86 and 35.83.
There are some slight differences
between cmr10 at 12pt and cmr12 (see the TeXbook for details).
You can simply say <samp>\font</samp><samp>\tenrm=cmr10</samp>. After that
you use it like this <samp>{\tenrm test}</samp>. This gives: test. You can use <samp>\fontdimen1</samp><samp>\tenrm</samp> like any dimension<a id="uid818"></a>. For instance, using <samp>\the</samp> to typeset the value, we get
0.0pt for the slant,
0.0pt plus 0.0pt minus
0.0pt for the interword space,
0.0pt for the ex-height,
0.0pt for the quad,<a id="uid819" href="#note36" title="This is a bit more than ten points."><small>(note: </small>&#10163;<small>)</small></a>
0.0pt for the extra space. Parameters for the current font
are:
0.0pt for the slant,
0.0pt plus 0.0pt minus
0.0pt for the interword space,
0.0pt for the ex-height,
0.0pt for the quad,
0.0pt for the extra space.
If you say<a id="uid820"></a></p>
<pre class="latex-code">   \fontencoding{T1}\fontfamily{cmr}\fontseries{m}%
   \fontshape{n}\fontsize{10pt}{12pt}
   \selectfont
</pre>
<p class="nofirst noindent">you specify all font parameter, and you switch (from the font named
`cmr10 at 10.0pt´)
<i>fontfamily U</i>cmr<i>fontseries U</i>m<i>fontshape U</i>n<i>fontesize U</i>10pt12pt<i>selectfont U</i>to the default ten point font with T1 encoding, namely `cmr10 at 10.0pt´.
The default font in this document uses `lmr´ as family.
The parameters are now:
0.0pt for the slant,
0.0pt plus 0.0pt minus
0.0pt for the interword space,
0.0pt for the ex-height,
0.0pt for the quad,
0.0pt for the extra space. As you can see,
they are not exactly the same. However, the glyphs are similar.
The current font name can be printed via <samp>\fontname</samp><samp>\font</samp>.
If you read the XML version, all dimension is zero, and font names empty.
For cmr10, the slant is 0,
the interword space is 3+1/3pt plus 1+2/3pt minus 1+1/9pt, the ex height is
4.30554, the quad is 10.00002pt, the extra space is 1+1/9pt.</p>
<p>The commands shown above are provided by LaTeX. The effect of
<samp>\selectfont</samp> is to take all values (stored by the other commands) and
create a font name (say <samp>\tenrm</samp> for simplicity, see example below for a real
name), check the font, and make it the current font. Printing a character like
e-acute can depend of the encoding (in some cases the character is in the font,
in other cases a combination of two characters is needed). As a consequence,
checking the font means to inform some commands of an encoding change. In the
example above, the quantity 10pt is the size of the font, but the value 12pt
is the baseline skip, changing it means changing some other parameters (for
instance the value of <samp>\strut</samp>). An important task of <samp>\selectfont</samp> is
to associate to the font name <samp>\tenrm</samp> a real name (say
<samp>cmr10</samp>) and call the <samp>\font</samp> commmand. The real name is computed
according to rules defined in a font definition file, for instance
<span class="sansserif">t1cmr.fd</span>, that depend only on the encoding and family; there are
rules that say how to deal with the case where the desired series, shape or
size are unavailable. All these commands are implemented in <i>Tralics</i>. The size
and encoding is currently ignored. We shall describe below some commands that
change the series and shape of the current font (for instance <samp>\bfseries</samp>,
<samp>\itshape</samp>) that are easily related to parameters of
<samp>\selectfont</samp>. Interpreting the argument of <samp>\fontfamily</samp> is a bit more
complicated: for instance pcr is interpreted as cmtt (the name cmtt will be
explained below, while pcr refers to a Courier font).
There is another bunch of font commands, implemented
in <i>Tralics</i>, that provoke an <i>Unimplemented NFSS command</i> error;
for instance <samp>\DeclareTextAccent</samp> is a command that takes three arguments
A, E and N, and says that accent A in encoding E is at position N in the font.</p>
<p>An important characteristic of a font is how glyphs are represented: For
TeX, this is irrelevant, since the dvi file contains only the
metrics. However, the reader will see some black and white pixels (of ink on
a sheet of paper, or dots on a screen, or points on a wall projected by a
beamer). All fonts designed by Knuth are produced by the <tt>metafont</tt>
program that produces both the metrics and the glyphs as bitmaps (in the form
of <span class="sansserif">gf</span> file, usually packed as <span class="sansserif">pk</span> files).
If the resolution of these bitmaps is different from that required by the
printing device, some
interpolation, extrapolation is required (this is sometimes called
`antialiasing´, it may involve colored pixels instead of black and white).
In general, people print a dvi file by converting the first into PostScript
format; in a PostScript or pdf file, a font can be
specified via different formats, Type1, Type3, TrueType etc. The simplest
format is Type3, namely bitmaps. Some software like Acrobat Reader prefer
Type1 (a format in which characters are defined by small programs).
There is no direct way to produce a Type1 file from a metafont file, so that
not all TeX fonts exist in Type1. For instance, the computer modern fonts (in
version OT1) have been translated but not the T1 version (said otherwise,
cmr10 exists in Type1 format, but not ecrm1000). On the other hand, most
commercially available fonts are not produced by metafont, hence cannot be
used directly by TeX. In this document, we
experiment the Latin Modern font family; it is very similar to Computer
Modern.</p>
<p>In modern distributions, the engine behind LaTeX is pdfTeX, so that
producing pdf instead of dvi is as easy; in this case, the engine needs the
glyphs. Since it is no more restricted to informations found in the metric
files, funny effects can be achieved. An extension of TeX, called XeTeX,
produces spectacular results; as in the case of &#937;, the result can be a
variant of the dvi format, called <span class="sansserif">xdv</span> or <span class="sansserif">odvi</span>.</p>
<p>In the case of a format like plain TeX, fonts are used according to the
following scheme. First you define fonts like <samp>\tenrm</samp>, in three sizes
(thus, you define <samp>\sevenrm</samp>, <samp>\fiverm</samp>), and different variants
(say <samp>\teni</samp>, <samp>\tensy</samp>, <samp>\tenex</samp>, <samp>\tensl</samp>, <samp>\tentt</samp>, etc).
Then you say <samp>\textfont0=\tenrm</samp>,<a id="uid821"></a>
<samp>\scriptfont0=...</samp><a id="uid822"></a>,
<samp>\scriptscriptfont0=...</samp><a id="uid823"></a>: this defines
family zero. You do the same for family 1, 2, 3, etc. We shall see later
how certain math symbols use a specified family, in other cases the family
specified by the <samp>\fam</samp><a id="uid824"></a> variable is used (there are only 16
families available). The size of a symbol is defined by the current style
(displaystyle, textstyle, scriptstyle, or scriptscriptstyle). Then you say
<samp>\def\it{\fam4\tenit}</samp>. Thus <samp>\it</samp> has two effects: one is to switch to
<samp>\tenit</samp>, the second one is to set <samp>\fam</samp> to 4. Now, you can define a
command <samp>\twelvepoint</samp> that modifies all the fonts values, using larger
values. Guess what happens for a definition like
<samp>\def\it{\tenit\fam4}</samp>.</p>
<p>In the case of a format like LaTeX, the situation is different. There are
some high level commands like <samp>\large</samp>, that are defined like
<samp>\@setsize</samp> <samp>\large</samp> <samp>{14pt}</samp> <samp>\xiipt</samp><samp>\@xiipt</samp> (note: infinite recursion may be
possible), and the <samp>\xiipt</samp> command is like the <samp>\twelvepoint</samp> command
mentioned above. This is rather complicated. The situation became worse
when people tried to replace computer modern fonts by other fonts.
We shall describe here only the user interface of the NFSS (new font selection
scheme).</p>
<p>There is a clear distinction between <samp>\textit</samp> and <samp>\mathit</samp>:
they are to be used in text mode or math mode only; the command <samp>\it</samp>
chooses one of them. Guess how <samp>\mathit</samp> is defined. In fact, it switches to
some family (the number is not hard-code as the 4 above), to which a font is
associated. This may be OT1/cmr/m/it/10; an important point is that the size
may vary (depending on the current math style of the current font size), but
the encoding is fixed: if the current encoding is T1, a different font is used
in lath mode and in text mode.</p>
<p>We already mentioned that a important characteristic of the font is the
encoding: We met OT1 (Original encoding by Knuth) and T1 (&#8220;Cork&#8221;
encoding, similar to latin 1). There is an obsolete OT2 encoding for cyrillic,
and new ones: T2A, T2B, T2C. The companion mentions over twenty standard font
encodings. In the example of <samp>\showbox</samp> above, TeX told us that the
current font was <samp>\T1/cmr/m/n/10</samp>. The first two letters indicate the
encoding. There are different families of fonts. Assume that you use Computer
Modern fonts (you do this by selecting a package; after that, your whole
document will be in computer modern, unless you use fonts selected via
<samp>\font</samp> or <samp>\selectfont</samp>). There are six sub-families: Roman, Sans,
Typewriter, Fibonacci, Funny roman, and Dunhill. The name of these families
are: cmr, cmss, cmtt, cmfib, cmfr, cmdh. The default family in this document
is cmr. You can chose another family via the commands
<samp>\rmfamily</samp><a id="uid825"></a>, <samp>\ttfamily</samp><a id="uid826"></a> and
<samp>\sffamily</samp><a id="uid827"></a> (no command is provided
for the other families). The commands <samp>\textrm</samp><a id="uid828"></a>,
<samp>\textsf</samp><a id="uid829"></a> and <samp>\texttt</samp><a id="uid830"></a> take an argument
and typeset it using the family. The commands
<samp>\rm</samp><a id="uid831"></a>, <samp>\sf</samp><a id="uid832"></a>, <samp>\tt</samp><a id="uid833"></a> do the same, but
they reset the series to medium, and the shape to normal.
The series of a font can be: bold, bold extended, semibold, etc. In LaTeX you have <samp>\mdseries</samp><a id="uid834"></a> and <samp>\bfseries</samp><a id="uid835"></a>
(you have also <samp>\textmd</samp><a id="uid836"></a> and <samp>\textbf</samp><a id="uid837"></a>,
which are commands that take an argument; you have also <samp>\bf</samp><a id="uid838"></a>
that selects roman family, bold series, normal shape). The shape can be:
normal, italic, slanted, upright italic, small caps, etc. In LaTeX we
have <samp>\upshape</samp><a id="uid839"></a>, <samp>\itshape</samp><a id="uid840"></a>,
<samp>\slshape</samp><a id="uid841"></a>, and <samp>\scshape</samp><a id="uid842"></a>
(and as, usual, <samp>\textup</samp><a id="uid843"></a>, <samp>\textit</samp><a id="uid844"></a>,
<samp>\textsl</samp><a id="uid845"></a> and <samp>\textsc</samp><a id="uid846"></a>; there is also
<samp>\it</samp><a id="uid847"></a>, <samp>\sl</samp><a id="uid848"></a>, <samp>\sc</samp><a id="uid849"></a>).
There are two commands <samp>\em</samp><a id="uid850"></a> (a declaration) and
<samp>\emph</samp><a id="uid851"></a> (that takes an argument) that use upright shape if the
current font has a slant, and italics shape otherwise.
These rules explain the <samp>cmr/m/n</samp> part in the font. In fact, the `cmr´ part
comes from the command <samp>\rmdefault</samp>, but these commands are not implemented
in <i>Tralics</i>. The command <samp>\textnormal</samp><a id="uid852"></a> takes an argument as is the
equivalent of <samp>\normalfont</samp><a id="uid853"></a>.</p>
<p>There are two parameters that define the size of the font. First, document
class options indicate the size used by <samp>\normalsize</samp><a id="uid854"></a>.
In our example it is 10pt. There are ten commands that change the font size.
In increasing order they are <samp>\tiny</samp><a id="uid855"></a>,
<samp>\scriptsize</samp><a id="uid856"></a> <samp>\footnotesize</samp><a id="uid857"></a>,
<samp>\small</samp><a id="uid858"></a>, <samp>\normalsize</samp><a id="uid859"></a>,
<samp>\large</samp><a id="uid860"></a>, <samp>\Large</samp><a id="uid861"></a>,
<samp>\LARGE</samp><a id="uid862"></a>, <samp>\huge</samp><a id="uid863"></a>, and <samp>\Huge</samp><a id="uid864"></a>.
There is a command <samp>\selectfont</samp>; its purpose is to combine everything, the
result will be <samp>\T1/cmr/m/n/10</samp>. There is another process that converts this
to the font name <samp>ecrm1000</samp>, using font definition files.</p>
<p>In math formulas, you see things like <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>&#945;</mi> <mo>'</mo> </msup></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mover xmlns:xlink="http://www.w3.org/1999/xlink" accent="true"><mi>e</mi> <mo>¨</mo></mover></math></span>, but never `á´
and `ë´. If you want an acute accent you use <samp>\acute</samp>, if you want a
double dot accent you say <samp>\ddot</samp>. In fact, the textfont used for math is
very often a 7bit font, without accented letters. If you want
x<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mrow></mrow> <mrow><mover accent="true"><mi>e</mi> <mo>`</mo></mover><mi>m</mi><mi>e</mi></mrow> </msup></math></span> you should say <samp>x$^{\grave{e}me}$</samp>,
or perhaps
<samp>x$^{\hbox{ème}}$</samp> (this gives x<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mrow></mrow> <mtext>ème</mtext> </msup></math></span>,
letters are too big). Note that <i>Tralics</i> may translate this as
x<sup>e</sup>; if you do not like it, either set the
<samp>notrivialmath</samp> counter to zero, or an an empty group in the formula
before the hat.
A solution is <samp>x\textsuperscript{ième}</samp>, x<sup>ième</sup><a id="uid865"></a>. In French, you say 1<sup>er</sup>, 1<sup>re</sup>, 1<sup>ers</sup>, 1<sup>res</sup>,
2<sup>e</sup>, 3<sup>es</sup>, etc., via
<samp>1\ier</samp>, <samp>1\iere</samp>, <samp>1\iers</samp>, <samp>1\ieres</samp>,
<samp>2\ieme</samp>, <samp>3\iemes</samp>.
In English, you say 1<sup>st</sup>, 2<sup>nd</sup>,
3<sup>rd</sup>, 4<sup>th</sup>.</p>

<h2 id="uid866">2.9. Spaces</h2>
<p>In TeX spaces are ignored after a command like <samp>\foo</samp>, and a sequence of
spaces is treated as a single one. The exact rule is the following. There is a
variable whose values can be N (start of line), or M (middle of line) or S
(when spaces are skipped). Whenever a line is read, TeX removes every space
character at the end of the line. It inserts the value of
<samp>\endlinechar</samp><a id="uid867"></a> (provided this is a valid character, an
integer between 0 and 255). The state in N. Spaces are ignored if the state
is S or N; if the state is M, a space produces a space token, and the state is
changed to S; in this sentence a &#8220;space&#8221; is any character whose category
code is 10. If TeX sees an end-of-line character (category 5), it ignores
all other characters on the current line. If the state is N (line was empty),
the tokeniser returns a <samp>\par</samp> token, if the state is M it returns a space
token, otherwise the character is ignored. Note: in <i>Tralics</i>, the space token
produced by an end-of-line is a line-feed character, this is to keep line
breaks in the <span class="sansserif">XML</span> translation. If TeX sees a backslash (or any character
of category code 0), it reads a command; the state will be S if the character
is a letter or a space, it will be N otherwise. If TeX sees anything else,
the state will be M.</p>
<p>For instance, if you say
`<samp>x&#9251;{&#9251;}&#9251;&#9251;&#9251;{&#9251;}y</samp>´ the tokeniser sees 5 spaces.
If you say
<samp>\def\A{&#9251;}</samp> and <samp>\def\B{&#9251;\A&#9251;\A&#9251;}</samp>,
then the body of <samp>\A</samp> contains a space
as well as the body of <samp>\B</samp>. Full expansion of <samp>\B</samp> contains three
spaces and <samp>x&#9251;\B\y</samp> contains four spaces. The command <samp>\space</samp><a id="uid868"></a>
is defined like <samp>\A</samp> above.</p>
<p>Spaces discarded by the tokeniser do not appear in the translation. However,
spaces produced by the tokeniser can be ignored in some cases. A typical
example: a command can take a space as argument, and ignore the argument.
For instance <samp>\\</samp><a id="uid869"></a> is a command that ignores spaces that
follow it using explicit scanning (i.e. <samp>\futurelet</samp>).
We already mentioned that spaces between arguments are generally
ignored. Spaces
can be ignored because you say <samp>\ignorespaces</samp><a id="uid870"></a>: the
effect of this command is to expand what follows, until a non-expandable token
is seen. If it is a space, it is ignored, and the process continues. A space
can be ignored because of a syntax rule (for instance, before an equals sign
in an assignment). In LaTeX you can see things like that <samp>\end{x}</samp> <samp>\end{y}</samp>
<samp>\end{z}</samp>, each `end(xxx)´ being on a line by itself: this produces a space,
and the LaTeX environment mechanism is clever enough to remove these
spurious spaces. It is also possible to remove a space from typeset material
via <samp>\unskip</samp><a id="uid871"></a>.</p>
<p>Spaces are ignored in math mode. The reason is that spaces are used to separate
words, and there are no words in math formulas. There are operators, and these
operators know how much white space to use. In the case of <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>+</mo><mi>y</mi><mo>=</mo><mi>z</mi></mrow></math></span>, on each
side of the plus sign there is some glue, the value comes from <samp>\medmuskip</samp>,
it is 2.22 plus 1.11 minus 2.22; on each side of the equals sign
there is <samp>\thickmuskip</samp>, namely 2.77 plus 2.77
(the unit is pt).<a id="uid872" href="#note37" title="these values were rounded; exact values are 2, 4 and 5 times 10pt/18, and 10pt/18 is a mu."><small>(note: </small>&#10163;<small>)</small></a>
After the zed, there is a kern of value 0.4398. Note: the plus sign is
followed by a penalty of 700, the equals sign by a penalty of 500.
Plain TeX defines<a id="uid873"></a></p>
<pre class="latex-code">\thinmuskip=3mu
\medmuskip=4mu plus 2mu minus 4mu
\thickmuskip=5mu plus 5mu
</pre>
<p class="nofirst noindent">In <i>Tralics</i>, constant values are used (expressed in terms of em units;
one em is 18mu, in the example above one em is 10pt).
You can say <samp>\:</samp><a id="uid874"></a>, <samp>\&gt;</samp><a id="uid875"></a> and <samp>\;</samp><a id="uid876"></a>. This produces
a space (thin, medium, thick) using the values given above.
You can also use <samp>\!</samp><a id="uid877"></a>, this is the negative of thin space.
The translation of <samp>$A\:B\&gt;C\;D\!E$</samp> is:</p>
<pre class="xml-code">&lt;mrow&gt;&lt;mi&gt;A&lt;/mi&gt;&lt;mspace width='0.166667em'/&gt;
      &lt;mi&gt;B&lt;/mi&gt;&lt;mspace width='0.222222em'/&gt;
      &lt;mi&gt;C&lt;/mi&gt;&lt;mspace width='0.277778em'/&gt;
      &lt;mi&gt;D&lt;/mi&gt;&lt;mspace width='-0.166667em'/&gt;&lt;mi&gt;E&lt;/mi&gt;&lt;/mrow&gt;
</pre>
<p>The <samp>\space</samp><a id="uid878"></a> command expands to a single space token. It may
disappear in all cases where the syntax says that a space is optional (because
in general these rules imply expansion); in a case like <samp>\let</samp><samp>\foo</samp><samp>\space</samp>,
tokens are not expanded, and <samp>\foo</samp> is made equivalent to the current value
of <samp>\space</samp>. The <samp>\&#9251;</samp> command cannot be expanded. It starts a
paragraph (if used in vertical mode). It inserts some white space whose value
is the same as if the current space factor were 1000. You can use it after an
abbreviation like <samp>Mr.</samp> in order to indicate that the dot is not an end of
sentence marker. You can also use it after a command like <samp>\TeX</samp> if you want
to leave some space. In math mode, <i>Tralics</i> interprets it as a space of width
6pt. The <samp>~</samp> character is usually active<a id="uid879"></a>, its expansion is
<samp>\nobreakspace</samp><a id="uid880"></a>. This is defined in <i>Tralics</i> to
translate to <tt class="txt">&amp;nbsp;</tt>. You can say
<samp>\quad</samp><a id="uid881"></a> or <samp>\qquad</samp><a id="uid882"></a>. This inserts some
space (the width is one or two em).
If you say <samp>\hskip 1cm</samp><a id="uid883"></a>, this will append
some glue (in <i>Tralics</i>, it will generate a sequence of <tt class="txt">&amp;nbsp;</tt> whose
width is more or less 1cm).
Note: in the current version, entity names are no more generated, hence
<tt class="txt">&amp;nbsp;</tt> is replaced by the Unicode character U+A0, and we assume the the
width of this character is one forth of a quad. In math mode, both the tilde
character and <samp>\nobreakspace</samp> will give 3.33pt; inside an URL, the result
is a tilde character.
If you say <samp>\kern1cm</samp> this will append a kern (like glue, but
the size is fixed). This is ignored by <i>Tralics</i>. A normal space produces glue
(the value of the glue depends on some font parameters; it can also depend on
the current space factor). A glue may disappear at a line break. Kerns will
not. In LaTeX, you use <samp>\hspace</samp><a id="uid884"></a> instead of <samp>\hskip</samp>.
You can use <samp>\hspace*</samp>, in this case, spaces at start of line are not ignored.
Note the syntax <samp>\hspace</samp><samp>{2cm}</samp> vs <samp>\hskip2cm\relax</samp>.</p>
<pre class="latex-code">A\space\space B\ \ C\quad\qquad etc
a\hskip2cm b\hspace{3cm}etc.
x\vskip2cmy\vspace{2cm}etc.
</pre>
<p class="nofirst noindent">Translation is (we have replaced nobreak space by tilde)</p>
<pre class="xml-code">&lt;p&gt;A  B  C~~~~~~~~~etc
a~~~~~~~~~~~~~~b~~~~~~~~~~~~~~~~~~~~~etc.
x&lt;/p&gt;
&lt;p spacebefore='56.9055pt'&gt;y&lt;/p&gt;
&lt;p spacebefore='56.9055pt'&gt;etc.
&lt;/p&gt;
</pre>
<p>When TeX wants to split a paragraph into lines of equal width, it will
have to stretch and shrink the glue that appears on the line; it will remove
interword glue at break points. An item of glue has the form <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>+</mo><mi>y</mi><mo>-</mo><mi>z</mi></mrow></math></span>, where
<span class="math"><i>x</i></span>, <span class="math"><i>y</i></span> and <span class="math"><i>z</i></span> are dimensions (<span class="math"><i>y</i></span> and <span class="math"><i>z</i></span> can be expressed in terms of fil,
fill and filll), all three values can be positive or negative. We can express
this as: we have a vector of size 9: <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>0</mn> </msub></math></span> is the regular part of the glue,
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>1</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>2</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>3</mn> </msub></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>4</mn> </msub></math></span> are the stretch component (in units of pt, fil,
fill, and filll, only one of these components can be given),
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>5</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>6</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>7</mn> </msub></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>8</mn> </msub></math></span> are the shrink components (in units of pt, fil,
fill, and filll, only one of these components can be given). When two pieces
of glue are added, all components are added. The convention is that <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>2</mn> </msub></math></span> is
much larger than <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>1</mn> </msub></math></span>, so that the sum of <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>1</mn> </msub></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>2</mn> </msub></math></span> is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>2</mn> </msub></math></span> (said
otherwise if we add <samp>1pt plus 2pt</samp> and <samp>3pt plus 4fil</samp>, the result is
<samp>4pt plus 4fil</samp>). Such simplifications are not done when TeX computes the sum
of all glue items in a paragraph (as a result, addition is associative).
The command <samp>\hfil</samp><a id="uid885"></a> is equivalent to <samp>\hskip0pt plus 1fil</samp>,
the command <samp>\hfill</samp><a id="uid886"></a> is equivalent to
<samp>\hskip 0pt plus 1fill</samp>, the command <samp>\hfilneg</samp><a id="uid887"></a> is equivalent
to <samp>\hskip 0pt plus -1fil</samp>, the command <samp>\hss</samp><a id="uid888"></a>
is equivalent to
<samp>\hskip 0pt plus 1fil</samp>.
It is an error to use infinite shrinkage, like <samp>\hss</samp>, in a
paragraph, TeX complains with:
<i>Infinite glue shrinkage found in a paragraph.</i>
However you can say <samp>123\hbox to1cm{\hss xxxxxxx\hss}456</samp>, the result is
123xxxxxxx456, said otherwise, the text is centered, no
overfull neither underfull box is signaled.</p>
<p>The commands <samp>\vfil</samp><a id="uid889"></a>, <samp>\vfill</samp><a id="uid890"></a>,
<samp>\vfilneg</samp><a id="uid891"></a>, <samp>\vss</samp><a id="uid892"></a>, behave in the same fashion,
in vertical mode, adding vertical space. <i>Tralics</i> translates <samp>\hfil</samp>,
<samp>\hfill</samp>, <samp>\hfilneg</samp>, and <samp>\hss</samp> as <samp>\leavevmode</samp> followed by an
element <tt class="txt">&lt;hfil&gt;</tt>, that has the same name as the command. It translates
<samp>\vfil</samp>, <samp>\vfill</samp>, <samp>\vfilneg</samp>, and <samp>\vss</samp> in the same fashion, by
using <samp>\par</samp> instead of <samp>\leavevmode</samp>. The three commands
<samp>\bigskip</samp><a id="uid893"></a>, <samp>\medskip</samp><a id="uid894"></a> and <samp>\smallskip</samp><a id="uid895"></a> are used to
insert vertical space between paragraphs, of size 12pt, 6pt and 3pt
respectively (in LaTeX, this is some glue that the user can modify, however,
<i>Tralics</i> ignores the shrink and stretch parts of the glue inserted by
<samp>\hskip</samp><a id="uid896"></a>, <samp>\vskip</samp><a id="uid897"></a>, <samp>\hspace</samp><a id="uid898"></a> and <samp>\vspace</samp><a id="uid899"></a>.)
These four commands read an argument (in LaTeX, <samp>\hspace</samp> and <samp>\vspace</samp>
accept an optional star, that translates to an empty vertical or horizontal
rule, <i>Tralics</i> ignores the star). In the case of an horizontal space,
<samp>\leavevmode</samp> is executed, then <samp>~</samp> are produced (one every 4 pt, a
negative dimension produces nothing). In the case of a vertical space, the
current paragraph is terminated; if after that the mode is
vertical, a new paragraph is started, it has an attribute <span class="sansserif">spacebefore</span>
with as value the dimension. In LaTeX, the behavior is different (see
appendix A.1.5 of <a href="#bid5" title="Mittelbach, Goossens, Braams, Carlisle, Rowley2004">[6]</a>).
In math mode, you can also use <samp>\mskip</samp><a id="uid900"></a> and <samp>\mkern</samp><a id="uid901"></a>, these
command use mu as unit, where 18mu is one em. Since <i>Tralics</i> does not know
the value of an em, it uses 10pt, so that the dimension is first divided by
18, then multiplied by 10.
Example</p>
<pre class="latex-code">a\vfil\vfill\vfilneg\vss
b\hfil\hfill\hfilneg\hss
c\bigskip d\smallskip e\medskip f
$\mskip3mu\mkern2mu \mskip 18mu$
</pre>
<p class="nofirst noindent">Translation is</p>
<pre class="xml-code">&lt;p&gt;a&lt;/p&gt;
&lt;vfil/&gt;&lt;vfill/&gt;&lt;vfilneg/&gt;&lt;vss/&gt;
&lt;p&gt;b&lt;hfil/&gt;&lt;hfill/&gt;&lt;hfilneg/&gt;&lt;hss/&gt;c&lt;/p&gt;
&lt;p spacebefore='12.0pt'&gt;d&lt;/p&gt;
&lt;p spacebefore='3.0pt'&gt;e&lt;/p&gt;
&lt;p spacebefore='6.0pt'&gt;f
&lt;formula type='inline'&gt;&lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
&lt;mrow&gt;&lt;mspace width='1.66656pt'/&gt;&lt;mspace width='1.111pt'/&gt;
&lt;mspace width='10.0pt'/&gt;&lt;/mrow&gt;&lt;/math&gt;
&lt;/formula&gt;
&lt;/p&gt;
</pre>
<p>In TeX, there is no command that starts a paragraph. The <samp>\leavevmode</samp><a id="uid902"></a>
command is implemented as <samp>\unhbox</samp><samp>\voidb@x</samp>, where <samp>\unhbox</samp> starts a new
paragraph if needed, and produces nothing, provided that its argument is the
void box; the paragraph may contain the current indentation and the value of
<samp>\everypar</samp>. This is a primitive in <i>Tralics</i>, the value of <samp>\everypar</samp>
is unused. Both commands <samp>\indent</samp><a id="uid903"></a> and <samp>\noindent</samp><a id="uid904"></a> make sure
the current mode is horizontal, the first one inserts the current indentation
(an empty box with the width of <samp>\parindent</samp><a id="uid905"></a>). In TeX,
you can use <samp>\indent</samp> anywhere in a paragraph. In <i>Tralics</i>, the translation
of</p>
<pre class="latex-code">a\noindent b \indent c
{\centering a\noindent b \indent c\par d}
{\raggedright a\noindent b \par\indent c\par d}
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;p&gt;a&lt;/p&gt;
&lt;p noindent='true'&gt;b&lt;/p&gt;
&lt;p rend='center' noindent='false'&gt;c
a&lt;/p&gt;
&lt;p rend='center'&gt;b&lt;/p&gt;
&lt;p rend='center'&gt;c&lt;/p&gt;
&lt;p rend='center'&gt;d
a&lt;/p&gt;
&lt;p noindent='true' rend='flushed-left'&gt;b&lt;/p&gt;
&lt;p noindent='false' rend='flushed-left'&gt;c&lt;/p&gt;
&lt;p rend='flushed-left'&gt;d&lt;/p&gt;
</pre>
<p class="nofirst noindent">The rules are the following: if <samp>\indent</samp> or <samp>\noindent</samp> appear in an
empty paragraph, that is not centered, and that has no <span class="sansserif">noindent</span>
attribute, one is set. Otherwise a new paragraph is started. It will have a
<span class="sansserif">noindent</span> attribute, unless the paragraph is centered. The value of
<samp>\parindent</samp> is never considered.</p>
<p>The translation of <samp>\par</samp><a id="uid906"></a> is a bit complicated. Nothing happens
inside a <samp>\hbox</samp>, in <samp>\term</samp><a id="uid907" href="#note38" title="There is no \term command in Tralics. Until version 2.11.6, the \par command was ignored if the curr..."><small>(note: </small>&#10163;<small>)</small></a>, or if the current mode is not horizontal.
The current <span class="sansserif">XML</span> element should be a <tt class="txt">&lt;p&gt;</tt>. A final space is removed from it.
It will be popped from the stack. This restores the mode to the value of the
previous mode. It restores the current <span class="sansserif">XML</span> element to the parent of
the <tt class="txt">&lt;p&gt;</tt>. A newline character is added to it.
There is an exception: in cases like
<samp>\noindent</samp><samp>\par</samp>, or <samp>\bigskip</samp><samp>\par</samp>, or <samp>\\</samp><samp>\par</samp>, the <samp>\par</samp> command was
ignored until version 2.5 (pl7). The behavior is now: if the paragraph is
empty, but there are attributes, then the <tt class="txt">&lt;p&gt;</tt> is removed, and attributes
are added to the next <tt class="txt">&lt;p&gt;</tt> element.</p>
<p>The translation of <samp>\\</samp> depends on the context. The command can be followed
by an optional star, and an optional dimension. Inside a cell, this indicates
the end of the cell as well as the the end of the row. You can say
<samp>\newline</samp><a id="uid908"></a>, this is like <samp>\\</samp> without optional argument and array
test. In vertical mode,
LaTeX complains with <i>There´s no line here to end</i>, but <i>Tralics</i> ignores the command. Inside a title, the command is ignored. Otherwise, the
behavior is like <samp>\noindent</samp>; if an optional argument is given, it behaves
like <samp>\vskip</samp>. For instance, the translation of</p>
<pre class="latex-code">a \\b \\[2cm] c \newline[3cm]d \noindent e \vskip 4cm f
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;p&gt;a&lt;/p&gt;
&lt;p noindent='true'&gt;b&lt;/p&gt;
&lt;p noindent='true' spacebefore='56.9055pt'&gt; c&lt;/p&gt;
&lt;p noindent='true'&gt;[3cm]d&lt;/p&gt;
&lt;p noindent='true'&gt;e&lt;/p&gt;
&lt;p spacebefore='113.81102pt'&gt;f&lt;/p&gt;
</pre>
<p class="nofirst noindent">Many people do not know that <samp>\\</samp> takes an optional argument, and try to use
different tricks in order to avoid errors triggered by <samp>\\</samp><samp>\\</samp>. We have seen
for instance</p>
<pre class="latex-code">\def\ligne{\protect{\mbox{}\\\mbox{}\indent}}
</pre>
<p class="nofirst noindent">Remember that <samp>\protect</samp> is like <samp>\noexpand</samp>, it is not a LaTeX command that takes an argument! More strange cases can be found in
<a href="#bid2" title="Grimm2002">[3]</a>.</p>
<p>The commands <samp>\nolinebreak</samp><a id="uid909"></a>, <samp>\nopagebreak</samp><a id="uid910"></a>,
<samp>\pagebreak</samp><a id="uid911"></a>, and <samp>\linebreak</samp><a id="uid912"></a> are defined by LaTeX to take
an optional argument, an integer between 0 and 4. They insert some
penalty, but depend on the mode, like <samp>\hspace</samp> and <samp>\vspace</samp>.
They are ignored in <i>Tralics</i>.
The command <samp>\break</samp>, <samp>\nobreak</samp>, and <samp>\allowbreak</samp>, are defined by
LaTeX, they insert some penalty(zero, plus or minus infinity). They are
ignored by Tralics. The commands <samp>\fillbreak</samp><a id="uid913"></a>,
<samp>\goodbreak</samp><a id="uid914"></a>, <samp>\eject</samp><a id="uid915"></a>, <samp>\smallbreak</samp><a id="uid916"></a>,
<samp>\medbreak</samp><a id="uid917"></a>, <samp>\bigbreak</samp><a id="uid918"></a> are defined by LaTeX to terminate a
paragraph and insert some penalty. In <i>Tralics</i>, they behave like <samp>\par</samp>.
Note. The last chapter of the second part of this document explains that, when
converting <span class="sansserif">XML</span> to Pdf, special rules must be used when hyphenating URLs:
ambiguities can be avoided when text is split a slashes. For this reason,
<i>Tralics</i> inserts a <tt class="txt">&lt;allowbreak&gt;</tt> element in these cases, and when the
command <samp>\allowbreak</samp> is used as well.</p>

<h2 id="uid919">2.10. Conditional expansion</h2>
<p>In the previous paragraphs we have shown how to define a macro `<samp>\foo</samp>´ that
expands to `<samp>\bar</samp>´ and a macro `<samp>\bar</samp>´ that expands to `<samp>gee</samp>´.<a id="uid920" href="#note39" title="It is unwise to say `\def\bar´, because \bar is already defined for use in math mode, and who knows ..."><small>(note: </small>&#10163;<small>)</small></a>
Can a translator replace all <samp>\foo</samp> by <samp>\bar</samp> and all <samp>\bar</samp> by
<samp>gee</samp>? the answer is obviously no; first because, if you say
`<samp>\something\bar</samp>´, the
argument will be (after expansion) `<samp>gee</samp>´, while in the case of
`<samp>\something gee</samp>´ it will be `<samp>g</samp>´;
there is a second problem, that occurs in
<tt>latex2html</tt>: if you replace `<samp>\bar</samp>´ by its value, you get `<samp>\somethinggee</samp>´, and
this is wrong, if you reparse it<a id="uid921" href="#note40" title="The remedy is to add a space after the command name. The trouble is when the command results from pa..."><small>(note: </small>&#10163;<small>)</small></a>;
some commands can be randomly redefined
(for instance, at first use) like this:</p>
<pre class="latex-code">   \def\NFSS{NFSS (New Font Selection Scheme)\global\def\NFSS{NFSS}}
</pre>
<p class="nofirst noindent">The last reason is conditional expansion.
Our original translator (written in Perl) has some troubles in these cases.</p>
<p>In this section, we shall consider cases where expansion depends on the
context. We have already seen the commands <samp>\noexpand</samp> for delayed
execution and <samp>\expandafter</samp> that changes the order of expansion, in section
<a href="#uid3749" title="Extensions">6.12</a> we will describe <samp>\protected</samp> which inhibits
expansion in a <samp>\edef</samp>.
We shall analyze three commands: <samp>\Color</samp>, <samp>\Map</samp> and <samp>\Loop</samp>.</p>
<h3 id="uid922">2.10.1. Constructing commands dynamically</h3>
<p>Using colors in TeX is not completely trivial, one reason is that there are
different color models, more or less adapted to the task (printing on paper, on
transparencies, or using a video projector). The <span class="sansserif">color</span> package
proposes</p>
<pre class="latex-code">\def\textcolor#1#{\@textcolor{#1}}
\def\@textcolor#1#2#3{\protect\leavevmode{\color#1{#2}#3}}
</pre>
<p class="nofirst noindent">Note that the brace character that indicates the start of the body of
<samp>\textcolor</samp> is preceded by a sharp sign. This means that the argument of
the command is everything before the brace. In a case of <samp>\textcolor</samp>
<samp>{green}</samp> <samp>{text}</samp>, it is empty. The <samp>\color</samp> command takes two
arguments (the color model, empty in the example, and the color); it changes
the current color, which is magically restored at the end of the group. One
of the reasons why colors are not implemented in <i>Tralics</i> is also the scope
of the command is unclear. Assume that we have two commands
`<samp>\enrouge</samp>´ and `<samp>\envert</samp>´ that take an argument and typeset it in red and
green; they could be defined as</p>
<pre class="latex-code">\def\enrouge#1{\textcolor{red}{#1}}
\def\envert#1{\textcolor{green}{#1}}
</pre>
<p>We explain here how to solve the following problem.
We want to define a command <samp>\Color</samp> that takes two arguments, a color and
text; if the color is `rouge´ or `vert´ it should call <samp>\enrouge</samp> or
<samp>\envert</samp>. Otherwise, some default action is specified (an error could be
signaled, in the following, we assume that the color should be ignored).
One solution to this problem uses tests, as explain in the next section.
This means that we have to change
the macro if a new color (for instance `<samp>\enbleu</samp>´ for blue) is added to the
list. The following works<a id="uid923"></a></p>
<pre class="latex-code">    \def\color#1{\csname en#1\endcsname}
</pre>
<p class="nofirst noindent">The only drawback with this method is that it might produce unexpected results
in the case where the command defined by <samp>\csname</samp> already exists
(try `<samp>\color{d}{document}</samp>´).</p>
<p>There are many commands that use <samp>\csname</samp>. The problem mentioned above can
be avoided if the command contains a non-letter character. For instance, when
the counter foo is defined, the command <samp>\p@foo</samp> is created, and this
command is used whenever the counter is printed. No package should define
commands starting with <samp>p@</samp>. In some cases the construction can be</p>
<pre class="latex-code">\csname\string\color @#1\endcsname
</pre>
<p class="nofirst noindent">This constructs a command with a backslash in its name, and can be created
only via <samp>\csname</samp>, thus offers a good protection.</p>

<h3 id="uid924">2.10.2. Iterating over lists</h3>
<p>In this paragraph we explain how to apply a command to all items in a list.
The list could be defines as follows</p>
<pre class="latex-code">    \def\mylista{\do{A1}\do{B2}\do{C3}}
    \def\mylistb{{A1}{B2}{C3}}
    \def\mylistc{A1,B2,C3}
</pre>
<p class="nofirst noindent">The last line is an example of CVS (comma separated values). The LaTeX command <samp>\@for</samp> can be used to apply a command to every item, and
<samp>\@tfor</samp> should be used in the second case. Here is an example.</p>
<pre class="latex-code">\makeatletter
\let\BreakTfor\@break@tfor\let\Lfor\@for
\makeatother
\def\List{}\def\thelist{12,3,4,5,6} % list is expanded here
\Lfor\Elt:=\thelist\do{\edef\List{\List\Elt}\if\Elt4\BreakTfor\fi}
</pre>
<p>We give here the transcript file produced by <i>Tralics</i>. The same algorithm is
used as in LaTeX. Arguments of <samp>\@for</samp> are respectively an element name,
the colon-equal separator, the list to work on (it will be expanded), the
<samp>\do</samp>-separator, and the code to be applied. On lines 4 and 5 you see the
expansion: there is a call to <samp>\@forloop</samp>, taking as arguments
the expanded list where two dummy items have been added, the end marker
<samp>\@@</samp>, the element name and the code. The command is optimised in teh case
where the list is empty, or has a single element; in the general case, you
will see assignment of <samp>\Elt</samp> (lines 7-8) and expansion
on lines 9, 10, 11. Note that <samp>\@iforloop</samp> is used; you can see on lines
36, 37, 38 the expansion of <samp>\@iforloop</samp>, which is a simple recursive
function. Other assignment of <samp>\Elt</samp> can be seen on lines 22 and 34.
On lines 47 and 48 you can see the expansion of <samp>\@break@tfor</samp>. What
you do not see is that this command gobbles all tokens inserted by
<samp>\@for</samp> and friends (namely, everything up to the <samp>\@@</samp> token, the
element name and the code). Caveat: the expansion of the LaTeX command with
the same name is a double <samp>\fi</samp>.</p>
<pre class="log-code"><span class="prenumber">1</span> [6] \Lfor\Elt:=\thelist\do{\edef\List{\List\Elt}\if\Elt4\BreakTfor\fi}
<span class="prenumber">2</span> {\@for}
<span class="prenumber">3</span> \thelist -&gt;12,3,4,5,6
<span class="prenumber">4</span> \Lfor&lt;- \@forloop 12,3,4,5,6,\@nil ,\@nil \@@ \Elt {\edef \List {\List \Elt }
<span class="prenumber">5</span> \if \Elt 4\BreakTfor \fi }
<span class="prenumber">6</span> {\@forloop}
<span class="prenumber">7</span> {changing \Elt=undefined}
<span class="prenumber">8</span> {into \Elt=macro:-&gt;12}
<span class="prenumber">9</span> \@forloop&lt;- \edef \List {\List \Elt }\if \Elt 4\BreakTfor \fi \def \Elt {3}
<span class="prenumber">10</span> \edef \List {\List \Elt }\if \Elt 4\BreakTfor \fi \@iforloop 4,5,6,\@nil
<span class="prenumber">11</span> ,\@nil \@@ \Elt {\edef \List {\List \Elt }\if \Elt 4\BreakTfor \fi }
<span class="prenumber">12</span> {\edef}
<span class="prenumber">13</span> \List -&gt;
<span class="prenumber">14</span> \Elt -&gt;12
<span class="prenumber">15</span> {changing \List=macro:-&gt;}
<span class="prenumber">16</span> {into \List=macro:-&gt;12}
<span class="prenumber">17</span> +\if1
<span class="prenumber">18</span> \Elt -&gt;12
<span class="prenumber">19</span> +iftest1 false
<span class="prenumber">20</span> +\fi1
<span class="prenumber">21</span> {\def}
<span class="prenumber">22</span> {changing \Elt=macro:-&gt;12}
<span class="prenumber">23</span> {into \Elt=macro:-&gt;3}
<span class="prenumber">24</span> {\edef}
<span class="prenumber">25</span> \List -&gt;12
<span class="prenumber">26</span> \Elt -&gt;3
<span class="prenumber">27</span> {changing \List=macro:-&gt;12}
<span class="prenumber">28</span> {into \List=macro:-&gt;123}
<span class="prenumber">29</span> +\if2
<span class="prenumber">30</span> \Elt -&gt;3
<span class="prenumber">31</span> +iftest2 false
<span class="prenumber">32</span> +\fi2
<span class="prenumber">33</span> {\@iforloop}
<span class="prenumber">34</span> {changing \Elt=macro:-&gt;3}
<span class="prenumber">35</span> {into \Elt=macro:-&gt;4}
<span class="prenumber">36</span> \@iforloop&lt;- \edef \List {\List \Elt }\if \Elt 4\BreakTfor \fi \relax
<span class="prenumber">37</span> \@iforloop 5,6,\@nil ,\@nil \@@ \Elt {\edef \List {\List \Elt }\if
<span class="prenumber">38</span> \Elt 4\BreakTfor \fi }
<span class="prenumber">39</span> {\edef}
<span class="prenumber">40</span> \List -&gt;123
<span class="prenumber">41</span> \Elt -&gt;4
<span class="prenumber">42</span> {changing \List=macro:-&gt;123}
<span class="prenumber">43</span> {into \List=macro:-&gt;1234}
<span class="prenumber">44</span> +\if3
<span class="prenumber">45</span> \Elt -&gt;4
<span class="prenumber">46</span> +iftest3 true
<span class="prenumber">47</span> {\@break@tfor}
<span class="prenumber">48</span> \BreakTfor&lt;- \fi
<span class="prenumber">49</span> +\fi3
</pre>

<h3 id="uid925">2.10.3. Mapping a command</h3>
<p>We consider here the following task. We have a list, like <samp>\mylista</samp> above,
and we want to apply a command, say <samp>\foo</samp> to every element of the list.
The solution we propose here is faster than the previous one; remember that,
in the case of <samp>\@for</samp>, for every element, the unread part of the list,
together with five additional tokens, the element name and the body, all these
tokens are read, and pushed back in the stream. Our solution is as simple as</p>
<pre class="latex-code">   \def\Map{\let\do}
   \def\Map#1#2{\let\do#1#2}
   \def\Map#1#2{\def\do{#1}#2}
</pre>
<p class="nofirst noindent">
Then we say <samp>\Map</samp><samp>\textit</samp><samp>\mylista</samp>. This produces
<i>A1</i><i>B2</i><i>C3</i>.
This is a however a bit unsatisfactory: in some cases the list delimiter is
different
from <samp>\do</samp>, an example is given above: at the start of a chapter, we want
to reset all counters that depend on the chapter counter, in this case
<samp>\@elt</samp> is used as delimiter.
We could imagine a map-with-argument
macro, that would take as argument the <samp>\do</samp>. But this is nothing else than
<samp>\let</samp>! Our definition is so simple that people just say
`<samp>\let</samp><!--PASS THROUGH allowbreak--><samp>\do</samp><a id="uid926"></a><!--PASS THROUGH allowbreak--><samp>\@makeother</samp><!--PASS THROUGH allowbreak--><samp>\dospecials</samp>´, see for instance
<a href="#uid1037" title="A nontrivial command \verb">2.12</a>. The difference between the first two versions of <samp>\Map</samp>
is that the second command takes arguments, hence removes an additional level
of braces. If you say <samp>\Map</samp><!--PASS THROUGH allowbreak--><samp>\foo</samp><!--PASS THROUGH allowbreak--><samp>{\do{A}}</samp>, the command <samp>\foo</samp> is executed in a group in
the first case (and it is a mistake to put braces around it).</p>
<p class="nofirst noindent">In the third case, the first argument <samp>#1</samp> can consist in more than one
token. For instance, if you say
<samp>\def\foo#1#2{&#9251;#1#2&#9251;}</samp>
then <samp>\Map{\foo A}\mylista</samp> gives
` AA1  AB2  AC3 ´. Note that there are too many spaces in this example: the
last space in <samp>\foo</samp> is spurious.<a id="uid927"></a></p>

<h3 id="uid928">2.10.4. Creating a list via pattern matching</h3>
<p>Consider</p>
<pre class="latex-code">% \newcommand{\fooiv}[3][bar]{Seen #1 #2 #3}
\def\fooivaux[#1]#2#3{Seen #1 #2 #3}
\def\fooiv{\@ifnextchar[{\fooivaux}{\fooivaux[bar]}}
</pre>
<p class="nofirst noindent">The commented line is interpreted by LaTeX in the same fashion as the two
other lines (except that the internal name is a bit more complicated than
`<samp>\fooivaux</samp>´). We shall explain later how `<samp>\@ifnextchar</samp>´ works<a id="uid929" href="#note41" title="The actual code uses \kernel@ifnextchar, because amsmath redefines sometimes \@ifnextchar"><small>(note: </small>&#10163;<small>)</small></a>.
We are interested here in how LaTeX converts the `<samp>[3]</samp>´ into
`<samp>[#1]#2#3</samp>´.<a id="uid930"></a>
Since the number of arguments is between zero and nine,
a short sequence of conditionals could be used. Instead, the following code is
used by LaTeX:</p>
<pre class="latex-code"><span class="prenumber">1</span> \long \def \@yargdef #1#2#3{%
<span class="prenumber">2</span>   \ifx#2\tw@
<span class="prenumber">3</span>     \def\reserved@b##11{[####1]}%
<span class="prenumber">4</span>   \else
<span class="prenumber">5</span>     \let\reserved@b\@gobble
<span class="prenumber">6</span>   \fi
<span class="prenumber">7</span>   \expandafter
<span class="prenumber">8</span>     \@yargd@f \expandafter{\number #3}#1%
<span class="prenumber">9</span> }
<span class="prenumber">10</span> \long \def \@yargd@f#1#2{%
<span class="prenumber">11</span>   \def \reserved@a ##1#1##2##{%
<span class="prenumber">12</span>     \expandafter\def\expandafter#2\reserved@b ##1#1%
<span class="prenumber">13</span>     }%
<span class="prenumber">14</span>   \l@ngrel@x \reserved@a 0##1##2##3##4##5##6##7##8##9###1%
<span class="prenumber">15</span> }
</pre>
<p class="nofirst noindent">In the case of `<samp>\newcommand\fooiii[3]{foo}</samp>´ the
<samp>\@yargdef</samp> command is
called with three arguments, the first is <samp>\fooiii</samp>, the command to be
defined, then comes `<samp>\@ne</samp>´<a id="uid931"></a> (some randomly chosen token), then
`<samp>3</samp>´ (the number of arguments) and finally `<samp>{foo}</samp>´, the body of the
command to be defined. This argument is not read, but the code relies on the
fact that it starts with an opening brace. The objective is to produce
`<samp>#1#2#3</samp>´. In the case of `<samp>\newcommand\fooi{foo}</samp>´, arguments are the same
with 0 as third argument, the objective is to produce the empty string.
In the case of <samp>\fooiv</samp>, the second argument is `<samp>\tw@</samp>´,<a id="uid932"></a>
this is something different from `<samp>\@ne</samp>´, the objective is similar, but a bit
different: we want `<samp>[#1]#2#3</samp>´.</p>
<p>In order to make things easier to understand, we shall proceed to the
following simplifications: let´s forget about the percent signs<a id="uid933"></a> (their purpose
is to suppress unwanted space). Let´s forget about `<samp>\long</samp>´<a id="uid934"></a> (is it really
needed?) and `<samp>\l@ngrel@x</samp>´ (this is something that adds conditionally a
`<samp>\long</samp>´ token before the definition). Let´s simplify the names:
we write `<samp>\Ra</samp>´ and `<samp>\Rb</samp>´ instead of `<samp>\reserved@a</samp>´ and
`<samp>\reserved@b</samp>´. We also write `<samp>\ydef</samp>´ and `<samp>\yaux</samp>´
instead of `<samp>\@yargdef</samp>´ and `<samp>\@yargd@f</samp>´. Finally, we replace the arguments
by X, Y, Z, and `<samp>##</samp>´ by a simple `<samp>#</samp>´. Hence we get</p>
<pre class="latex-code">\def \ydef XYZ{
  \ifx Y\tw@
    \def\Rb#11{[##1]}
  \else
    \let\Rb\@gobble
  \fi
  \expandafter \yaux \expandafter{\number Z}X
}
\def\yaux XY{
  \def\Ra #1X#2#{\expandafter\def\expandafter Y\Rb #1X}
  \Ra 0#1#2#3#4#5#6#7#8#9#X
}
</pre>
<p class="nofirst noindent">Let´s start the analysis with the lines 7 and 8. Because of the two
`<samp>\expandafter</samp>´<a id="uid935"></a> tokens, the first token to be expanded is
`<samp>\number</samp>´<a id="uid936"></a>. This means that Z is replaced by its numeric
value. Said otherwise, the number
of arguments can be `<samp>03</samp>´, or `<samp>`\^^C</samp>´, or even
`<samp>\value{page}</samp>´ if the
page number if not too big. In <i>Tralics</i>, only explicit numbers are allowed
(You will get a message like <i>Only one token allowed;
I will assume that the command takes no argument.</i>)
In general, lines 7 and 8 are equivalent to <samp>\yaux{Z}X</samp>.</p>
<p>Let´s now explain lines 2 to 6. We are in a simple case of a conditional (the
commands <samp>\@ne</samp> and <samp>\tw@</samp> are normally equivalent to 1 and 2, they
compare unequal), so that line 3 is executed in case of an optional argument,
and line 5 otherwise. In the last case <samp>\Rb</samp> is a command that takes an
argument and ignores it; otherwise <samp>\Rb</samp> is a command that takes an
argument, delimited by the character `<samp>1</samp>´, ignores it, and the expansion is
`<samp>[#1]</samp>´ (four tokens). Remember that we want `<samp>[#1]#2#3</samp>´, that is a good
starting point.</p>
<p>Consider now lines 11 and 12. In order to simplify explanations, we replace
X by Z and Y by X (i.e. use the argument names of the outer function). We
shall denote by U and V the arguments of <samp>\Ra</samp>. Thus <samp>\Ra</samp> is</p>
<pre class="latex-code">    \def\Ra UZV{\expandafter\def\expandafter X\Rb UZ}
</pre>
<p class="nofirst noindent">The question now is what are the values of U and V? In order to answer this
question we shall write line 14 in a different way.
Let <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>s</mi><mo>(</mo><mi>n</mi><mo>)</mo></mrow></math></span> be the sequence <samp>#1#2....#n#</samp>, and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi><mo>(</mo><mi>n</mi><mo>)</mo></mrow></math></span> the sequence
<samp>#n...#9</samp>.
The content of line 14</p>
<pre class="latex-code">    \Ra 0#1#2#3#4#5#6#7#8#9#Z
</pre>
<p class="nofirst noindent">can be interpreted as <samp>\Ra</samp>, <samp>0</samp>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>s</mi><mo>(</mo><mi>n</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></math></span>, <span class="math"><i>n</i></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow></math></span>,
<samp>#Z</samp>, whenever <span class="math"><i>n</i></span> is a
digit between 1 and 9. Said otherwise, whenever Z is a digit between 1 and 9,
the first argument U of <samp>\Ra</samp> is <samp>0</samp><span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>s</mi><mo>(</mo><mi>n</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></math></span> (the second argument is
ignored, it is everything up to the first brace, the one that delimits the
body). Obviously, in the case where Z is the digit 0, U is empty. We leave it
as an exercise to the reader to see what happens in the case where Z is a
sharp sign<a id="uid937" href="#note42" title="Since Z is the result of expansion of \number it starts with a digit or a minus sign, so that this c..."><small>(note: </small>&#10163;<small>)</small></a>.
In all other
cases, U is the sequence <samp>0</samp><span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>s</mi><mo>(</mo><mn>9</mn><mo>)</mo></mrow></math></span>. The important point is that, whatever Z,
TeX will not read beyond the opening brace of the body.</p>
<p>Assume now that we want to construct a normal command (case <samp>\Rb</samp> is
gobble). It always gobbles a zero (if Z is zero, U is empty, and Z is
gobbled). Thus <samp>\Rb UZ</samp> expand to: nothing if Z is 0,
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>s</mi><mo>(</mo><mi>n</mi><mo>-</mo><mn>1</mn><mo>)</mo><mi>n</mi></mrow></math></span> if Z is a digit between 1 and 9, and <samp>#1#2#3#4#5#6#7#8#9#Z</samp>
otherwise. This yields an error <i>You already have nine parameters</i>
which is adequate in case Z is a number larger than nine. Consider now the
case of an optional argument. Here <samp>\Rb</samp> is a bit different: it reads the
`<samp>0#1</samp>´ part and replaces it by `<samp>[#1]</samp>´. You will get a
<i>Runaway argument?</i> error (or some other strange behavior) in case Z
is `0´ because pattern matching fails (of course, you should never try to
make optional the first argument of a function that takes none).</p>

<h3 id="uid938">2.10.5. A variant of the previous problem</h3>
<p>In the previous paragraph we have shown how to convert an integer, say 3,
into a sequence <samp>#1#2#3</samp>. One trouble with sharp signs is that you
have to double them, and if you define a command in the body of the other one,
they must be doubled again. Thus we state our problem as: given an integer N
between 1 and 9, construct
<samp>\sharp1</samp><samp>\sharp2</samp>...<samp>\sharpN</samp>.
After that, we can evaluate the `<samp>\sharp</samp>´ command<a id="uid939" href="#note43" title="There is a \sharp command, that typesets as &#9839;, hence be careful."><small>(note: </small>&#10163;<small>)</small></a>,
replacing it by `<samp>#</samp>´. One solution (original LaTeX code) uses a loop
from <span class="math"><i>N</i></span> down to <span class="math"><i>Y</i></span> (with <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>Y</mi><mo>=</mo><mn>1</mn></mrow></math></span> in the case of normal argument, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>Y</mi><mo>=</mo><mn>2</mn></mrow></math></span>
otherwise<a id="uid940" href="#note44" title="This explains the names \@ne and \tw@."><small>(note: </small>&#10163;<small>)</small></a>). Some variants will be discussed later on.
The current LaTeX code uses pattern matching, as explained
above, this leasa toi the following solution</p>
<pre class="latex-code">\def\ydef#1#2#3{%
  \def\tmp##1#2##20{##1#2}%
  \def\Sharp{\noexpand\Sharp}%
  \edef\etmp{\tmp\Sharp1\Sharp2\Sharp3\Sharp4\Sharp5\Sharp6\Sharp7%
    \Sharp8\Sharp90}%
  \def\Sharp{########}% needs 8 #
  \edef\etmp{\etmp}%
  \expandafter\def\expandafter#1\etmp{#3}}%
 
\ydef{\acmd}{3}{\string \acmd\space called with #1, #2, and #3.}
Test \acmd A{BC}D.
</pre>
<p class="nofirst noindent">Test \acmd called with A, BC, and D..</p>

<h3 id="uid941">2.10.6. Loops</h3>
<p>A silly question is: can we do loops without conditionals? The answer will be
given later. We assume here that our loop will be of the form: while <span class="math"><i>N</i></span> is
not too big, do something and increment <span class="math"><i>N</i></span>. This mechanism needs modifying a
table (the location of <span class="math"><i>N</i></span>) hence is not pure expansion. In our example, we
will write `<samp>\sharp</samp><samp>\the</samp><samp>\count0</samp>´, and hope that this will evaluate to
`<samp>#3</samp>´ later on, assuming that <samp>\count0</samp> contains `3´ now. How that can
be
implemented is left as an exercise to the reader. See also section <a href="#uid970" title="Syntax of the conditionals">2.11.1</a>.
We shall explain later all the silly details concerning conditionals in
TeX, all we need to know is that you can test <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>&lt;</mo><mi>b</mi></mrow></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>&gt;</mo><mi>b</mi></mrow></math></span>, but neither
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>&#8804;</mo><mi>b</mi></mrow></math></span> nor <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>&#8805;</mo><mi>b</mi></mrow></math></span>. Here is our code:<a id="uid942"></a></p>
<pre class="latex-code">\def\code{\advance\count0 by 1 \sharp\the\count0}
\def\Loop{\ifnum\count0&lt;\count1 \code\Loop\fi}
</pre>
<p class="nofirst noindent">Assume that <samp>\count0</samp> holds 0 and <samp>\count1</samp> holds 3. In this case the test is
true, `<samp>\code</samp>´ is evaluated, then `<samp>\Loop</samp>´. The effect of evaluating
`<samp>\code</samp>´ is to increment the counter and produce `<samp>\sharp1</samp>´. The loop
terminates after `<samp>\sharp3</samp>´ has been produced. Notice that recursion is not
terminal (but it would be in most computer languages): when the test is found
false, there are four `<samp>\if</samp>´ tokens not yet evaluated. This example is
atypical, in that the counter is modified before its use; exchanging the
`<samp>\sharp...</samp>´ and the `<samp>\advance...</samp>´ part implies changing initial and final
value (1,4 instead of 0,3).</p>
<p>Our <samp>\Loop</samp><a id="uid943"></a> command is not generic, in that the name of the counters are
built-in. Thus Knuth proposes the following:</p>
<pre class="latex-code">\def\loop#1\repeat{\def\body{#1}\iterate}
\def\iterate{\body \let\next\iterate \else\let\next\relax\fi \next}
\let\repeat\fi % this makes \loop...\if...\repeat skippable
 
\loop \ifnum \count0&lt;\count1 \sharp \the\count0 \advance\count0 by 1\repeat
</pre>
<p class="nofirst noindent">Note that the last line contains an `<samp>\ifxx</samp>´ where the associated `<samp>\fi</samp>´ is
the `<samp>\repeat</samp>´<a id="uid944"></a> at the end of the line. Thus, in the case where the `<samp>\loop</samp>´
command is <i>not expanded</i> this line is well-balanced regarding
conditionals. In the case where `<samp>\loop</samp>´ <i>is</i> expanded, the value of
the `<samp>\repeat</samp>´ token is irrelevant, it just serves as delimiter, and the
`<samp>\fi</samp>´ has to be found in <samp>\iterate</samp>. In order for <samp>\iterate</samp> to work,
the `<samp>\body</samp>´ should expand to an incomplete conditional, without <samp>\else</samp><a id="uid945"></a>
part. It conditionally sets <samp>\next</samp>, and evaluates it after <samp>\fi</samp>; this
trick makes the recursion terminal.</p>
<p>An alternate version is given by LaTeX, as follows<a id="uid946" href="#note45" title="The kernel contains two versions, one of them being \long."><small>(note: </small>&#10163;<small>)</small></a></p>
<pre class="latex-code">\def\loop#1\repeat{\def\iterate{#1\relax\expandafter\iterate\fi}%
  \iterate \let\iterate\relax}
</pre>
<p class="nofirst noindent">Adding `<samp>\let</samp><samp>\iterate</samp><samp>\relax</samp>´ at the end of the definition has no real
importance; but it causes no harm either. Note the
<samp>\expandafter</samp><a id="uid947"></a> trick:
if the test in the loop is false, neither <samp>\expandafter</samp> nor <samp>\iterate</samp>
are expanded, if the test is true, <samp>\fi</samp> is evaluated before <samp>\iterate</samp>.
Thus recursion is terminal. One difference with the TeX method is that
the body of the loop is put in <samp>\iterate</samp> rather than in a auxiliary
command. The interesting point is the `<samp>\relax</samp>´<a id="uid948"></a>. Guess what happens
in this case:</p>
<pre class="latex-code">\def\bloop#1\repeat{\def\iterate{#1\expandafter\iterate\fi}\iterate}
\count0=0 \count1=4
\bloop \ifnum \count0&lt;\count1 \the\count0 \advance\count0 by 1\repeat
</pre>
<p class="nofirst noindent">If you use LaTeX in verbose mode, you can see that the test
is true, true and false, where you expect it to be true
four times. The printed result is `0´ (hence the question: what did the
second iteration do?). Using <i>Tralics</i>, you will get more information.</p>
<pre class="log-code"><span class="prenumber">1</span> +\ifnum6
<span class="prenumber">2</span> +scanint for \count-&gt;0
<span class="prenumber">3</span> +scanint for \ifnum-&gt;0
<span class="prenumber">4</span> +scanint for \count-&gt;1
<span class="prenumber">5</span> +scanint for \ifnum-&gt;4
<span class="prenumber">6</span> +iftest6 true
<span class="prenumber">7</span> {\the}
<span class="prenumber">8</span> {\the \count}
<span class="prenumber">9</span> +scanint for \count-&gt;0
<span class="prenumber">10</span> \the-&gt;0.
<span class="prenumber">11</span> Character sequence: 0.
<span class="prenumber">12</span> {\advance}
<span class="prenumber">13</span> +scanint for \count-&gt;0
<span class="prenumber">14</span> {\expandafter \iterate \fi}
<span class="prenumber">15</span> +\fi6
<span class="prenumber">16</span> \iterate -&gt;\ifnum \count 0&lt;\count 1 \the \count 0 \advance \count 0 by 1\expandafter \...
<span class="prenumber">17</span> +\ifnum7
<span class="prenumber">18</span> +scanint for \count-&gt;0
<span class="prenumber">19</span> +scanint for \ifnum-&gt;0
<span class="prenumber">20</span> +scanint for \count-&gt;1
<span class="prenumber">21</span> +scanint for \ifnum-&gt;4
<span class="prenumber">22</span> +iftest7 true
<span class="prenumber">23</span> {\the}
<span class="prenumber">24</span> {\the \count}
<span class="prenumber">25</span> +scanint for \count-&gt;0
<span class="prenumber">26</span> \the-&gt;0.
<span class="prenumber">27</span> +scanint for \count-&gt;10
<span class="prenumber">28</span> {\advance}
<span class="prenumber">29</span> +scanint for \count-&gt;0
<span class="prenumber">30</span> {\expandafter \iterate \fi}
<span class="prenumber">31</span> +\fi7
<span class="prenumber">32</span> \iterate -&gt;\ifnum \count 0&lt;\count 1 \the \count 0 \advance \count 0 by 1\expandafter \...
<span class="prenumber">33</span> +\ifnum8
<span class="prenumber">34</span> +scanint for \count-&gt;0
<span class="prenumber">35</span> +scanint for \ifnum-&gt;10
<span class="prenumber">36</span> +scanint for \count-&gt;1
<span class="prenumber">37</span> +scanint for \ifnum-&gt;4
<span class="prenumber">38</span> +iftest8 false
<span class="prenumber">39</span> +\fi8
</pre>
<p class="nofirst noindent">Lines 16 and 32 are a bit too long; there are two token <samp>\iterate</samp><samp>\fi</samp>
that are replaced by <samp>\...</samp></p>
<p>As you can see, all tests have a serial number. On lines 2&#8211;5, you can see why
the first test is true: it is because the numbers 0 and 4 are compared.
On lines 18&#8211;21, you see why the second test is true, and on lines 34&#8211;37,
you see why the last test is false; in fact, <samp>\count0</samp> contains ten. On
line 27, you see something strange. Explanations: Assume
that you say `<samp>\advance</samp> <samp>\Foo4</samp>´, where <samp>\Foo</samp> is a reference to some counter.
In this case, the trace of <i>Tralics</i> will contain
<samp>+scanint for \Foo-&gt;4</samp>,
and everybody understands this. If you replace
<samp>\Foo</samp> by <samp>\count0</samp>, the trace will contain <samp>\count</samp>; it will also
contain a line for the zero in <samp>\count0</samp>. Hence, the number that appears
in line 27 is the value read by the <samp>\advance</samp> in line 12. What happened is
the following: after `<samp>by</samp>´ we have seen the digit `<samp>1</samp>´. In the case of
<samp>\loop</samp>, the next token would be `<samp>\relax</samp>´, and this stops scanning of the
number. But here, we have `<samp>\expandafter</samp>´<a id="uid949"></a>, which is expandable and expanded,
as a consequence, this finishes the first conditional. After that comes the
test; it is true, because we did not increment our counter yet. Then comes
`<samp>\the</samp>´ which is expandable. This reads `<samp>\count0</samp>´, as well as the space
after it. The expansion of `<samp>\the...</samp>´ is the digit zero; so far, we have read
10, and continue reading. The next token is `<samp>\advance</samp>´ and this is not
expandable. Hence <samp>\advance</samp> has read everything up to the next
<samp>\advance</samp>.
Is it needed to explain what happens next? Let´s just notice that,
at line 39, <i>Tralics</i> (and also TeX) are still reading tokens for the second
<samp>\advance</samp>. Since version 2.9, <i>Tralics</i> prints an additional line,
between line 27 and 28, of the form <samp>\count0</samp> changed fro 0 to 10.</p>

<h2 id="uid950">2.11. Conditionals in TeX</h2>
<p>We shall discuss in this section the following commands</p>
<ul>
<li id="uid951"><p class="nofirst noindent"><samp>\if AB</samp> (comparison of two characters, character code),</p>
</li>
<li id="uid952"><p class="nofirst noindent"><samp>\ifcat AB</samp> (comparison of two characters, category code),</p>
</li>
<li id="uid953"><p class="nofirst noindent"><samp>\ifint A=B</samp> (comparison of integers),</p>
</li>
<li id="uid954"><p class="nofirst noindent"><samp>\ifdim A=B</samp> (comparison of dimensions),</p>
</li>
<li id="uid955"><p class="nofirst noindent"><samp>\ifvmode</samp>, <samp>\ihmode</samp>, <samp>\ifmmode</samp>, <samp>\ifinner</samp> (test of the
current mode),</p>
</li>
<li id="uid956"><p class="nofirst noindent"><samp>\ifvoid A</samp>, <samp>\ifhbox A</samp>, <samp>\ifvbox A</samp> (test box register
status),</p>
</li>
<li id="uid957"><p class="nofirst noindent"><samp>\ifx AB</samp> (comparison of two tokens),</p>
</li>
<li id="uid958"><p class="nofirst noindent"><samp>\ifeof N</samp> (test if characters can be read from a channel),</p>
</li>
<li id="uid959"><p class="nofirst noindent"><samp>\iftrue</samp>, <samp>\iffalse</samp> (constant tests),</p>
</li>
<li id="uid960"><p class="nofirst noindent"><samp>\ifcase</samp> (this is called `switch´ in some other languages),</p>
</li>
<li id="uid961"><p class="nofirst noindent"><samp>\ifdefined</samp><a id="uid962"></a> <samp>\cmd</samp> (check if <samp>\cmd</samp> is defined),</p>
</li>
<li id="uid963"><p class="nofirst noindent"><samp>\ifcsname</samp><a id="uid964"></a> <samp>string</samp> <samp>\endcsname</samp> (check if string is the name of a command),</p>
</li>
<li id="uid965"><p class="nofirst noindent"><samp>\iffontchar</samp><a id="uid966"></a> <samp>\font</samp> <samp>chr</samp> (check if chr exists in font),</p>
</li>
<li id="uid967"><p class="nofirst noindent"><samp>\or</samp>, <samp>\else</samp>, <samp>\fi</samp> (must be used after if),</p>
</li>
<li id="uid968"><p class="nofirst noindent"><samp>\unless</samp><a id="uid969"></a> (prefix negating the result).</p>
</li></ul>
<h3 id="uid970">2.11.1. Syntax of the conditionals</h3>
<p>A conditional has the form
<samp>\if test true-code \else false-code \fi</samp>.<a id="uid971"></a>
The <samp>\else</samp><a id="uid972"></a> part is optional; conditionals can be nested, and
this nesting is independent from anything else. The command <samp>\unless</samp>
(provided by &#1013;-TeX) can be used before the if-like command (except
<samp>\ifcase</samp>), its effect is to reverse the truth value of the test.
Conditionals are expanded: this means that
conditionals are evaluated inside a <samp>\edef</samp>, you can use <samp>\noexpand</samp> to
delay evaluation, and <samp>\expandafter</samp> to change the order of expansion.</p>
<p>An important point is the following: if you define a command
<samp>\ifthenelse</samp><a id="uid973"></a> with three argument, that evaluates the first argument
as a boolean, and expands conditionally to the second or third argument,
then these two arguments must be balanced, and category codes are fixed.
In the case of <samp>\if</samp>, there is no such limitations: if the test is found
false, then all tokens are read at high speed until finding a `<samp>\else</samp>´, and
normal processing occurs, or until finding a `<samp>\fi</samp>´, that indicates the end
of the conditional; if the test is true, and if there is an <samp>\else</samp> part,
all tokens between `<samp>\else</samp>´ and `<samp>\fi</samp>´ are read at high speed. Consider for
instance this piece of code</p>
<pre class="latex-code">    \ifnum \A=\B do-nothing \else {\let\fi\relax\C}\fi
</pre>
<p class="nofirst noindent">Assume that the test is false; this means that the else part is evaluated.
Locally `<samp>\fi</samp>´ is redefined to do nothing, and `<samp>\C</samp>´ is evaluated. Let´s
assume that `<samp>\C</samp>´ does nothing special (it could typeset `Hello, world!´).
In this case the `<samp>\fi</samp>´ after the brace terminates the conditional.
Assume now that the test is true. Skipping over the <samp>\else</samp> part at high
speed just means compare the actual value of a token with `<samp>\if</samp>´ or `<samp>\fi</samp>´:
in the first case, the if-counter is incremented, in the second case it is
decremented, in all other cases the counter is left unchanged; reading stops
when the counter is zero. Here, the conditional is terminated by the first
`<samp>\fi</samp>´. This means that you have to be very careful: the end of the
conditional can change, depending on whether the test is true or false.
When we say: `compare the actual value of the token´, this means that the name
is irrelevant, only the meaning is used, for instance `<samp>\repeat</samp>´<a id="uid974"></a> has the same
value as `<samp>\fi</samp>´, and <samp>\loop...\if...\repeat</samp> is well balanced.</p>
<p>All constructions indicated above have a then-part and an else-part,
except <samp>\ifcase</samp><a id="uid975"></a>: this command reads a number (see section
<a href="#uid766" title="Using the variables">2.6</a> for details) and you can specify action
for the case zero, the case one, the case two, using <samp>\or</samp> as separator,
and an optional <samp>\else</samp> for other cases. Any other use of the <samp>\or</samp>
command wil signal a <i>Extra \or</i> error.
For instance, we can solve
the problem of constructing <samp>\sharp1...\sharp N</samp> as follows (assuming `<samp>\N</samp>´
holds the value of <span class="math"><i>N</i></span>)</p>
<pre class="latex-code">\ifcase \N \error{You cannot use zero here}
 \or \sharp1
 \or \sharp1\sharp2
 \or \sharp1\sharp2\sharp3
 \or \sharp1\sharp2\sharp3\sharp4
 \or \sharp1\sharp2\sharp3\sharp4\sharp5
 \or \sharp1\sharp2\sharp3\sharp4\sharp5\sharp6
 \or \sharp1\sharp2\sharp3\sharp4\sharp5\sharp6\sharp7
 \or \sharp1\sharp2\sharp3\sharp4\sharp5\sharp6\sharp7\sharp8
 \or \sharp1\sharp2\sharp3\sharp4\sharp5\sharp6\sharp7\sharp8\sharp9
 \else \error{Argument must be non-negative, at most nine}
\fi
</pre>
<p>The simple conditional `<samp>\if AB ... \else ... \fi</samp>´ compares two characters A
and B<a id="uid976"></a>, it shares some features with <samp>\ifcat</samp><a id="uid977"></a>. It expands tokens, using the
following rules</p>
<ul>
<li id="uid978"><p class="nofirst noindent">In the case <samp>\noexpand</samp><samp>\cmd</samp>, where <samp>\cmd</samp> is a command that
be expanded, it is as if you had said <samp>\relax</samp>.<a id="uid979"></a></p>
</li>
<li id="uid980"><p class="nofirst noindent">In the case <samp>\noexpand</samp> X, where X is an active character,
the token that will be considered is X, without expansion.</p>
</li>
<li id="uid981"><p class="nofirst noindent">In the case <samp>\noexpand</samp> Y, that does not match any of the previous
cases, the <samp>\noexpand</samp> is discarded.</p>
</li>
<li id="uid982"><p class="nofirst noindent">In the case <samp>\cmd</samp>, where <samp>\cmd</samp> can be expanded, it will be
expanded.</p>
</li>
<li id="uid983"><p class="nofirst noindent">In the case X, where X is an active character, it will be expanded.</p>
</li>
<li id="uid984"><p class="nofirst noindent">In the case <samp>\prim</samp>, where <samp>\prim</samp> is a primitive that cannot be
expanded, it is as if you have given character of numeric code <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>-</mo><mn>1</mn></mrow></math></span>, and
category code <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>-</mo><mn>1</mn></mrow></math></span>.</p>
</li>
<li id="uid985"><p class="nofirst noindent">In the case of an implicit character <samp>\cmd</samp> (one obtained
via <samp>\let\cmd Y</samp>, where Y is a character), the numeric code and the category
code of the character is considered.</p>
</li>
<li id="uid986"><p class="nofirst noindent">In the case of an explicit character Y, the numeric code and the category
code of the character is considered.</p>
</li></ul>
<p>The command <samp>\if</samp> compares the two numeric codes, and <samp>\ifcat</samp> compares
the category codes. If you say something like</p>
<pre class="latex-code">\catcode `\A=3
\def\fooi{A}
\catcode `\A=11
\def\fooii{A}
\if\fooi\fooii H\fi \ifcat\fooi\fooii\else e\fi
\if\bgroup{l\fi \ifcat\egroup}l\fi \if\relax\par o\fi
\if01\else,\fi \ifcat01 w\fi \if\par1\else o\fi
\if\noexpand\fooii\relax r\fi \if\fooii Ald\fi \if!!!\fi
</pre>
<p class="nofirst noindent">this should typeset as `Hello, world!´.</p>
<p>You must be very careful using a construction like `<samp>\if\A\B...</samp>´, because of the following</p>
<ul>
<li id="uid987"><p class="nofirst noindent">If <samp>\A</samp> takes no argument, expands to `<samp>foo</samp>´, the test is false, whatever <samp>\B</samp>.</p>
</li>
<li id="uid988"><p class="nofirst noindent">If <samp>\A</samp> is defined by `<samp>\def\A\B{00}</samp>´, the test is true, whatever
<samp>\B</samp>.</p>
</li>
<li id="uid989"><p class="nofirst noindent">If <samp>\A</samp> is defined by `<samp>\def\A\C{}</samp>´, an error
is signaled.</p>
</li>
<li id="uid990"><p class="nofirst noindent">If <samp>\A</samp> is a command that takes an argument, the argument will be
`<samp>\B</samp>´, and what happens depends on what the command does with the argument.</p>
</li>
<li id="uid991"><p class="nofirst noindent">If `<samp>\A</samp>´ expands to `<samp>xxyy</samp>´, the test is true, whatever <samp>\B</samp>,
and a part of <samp>\A</samp> is typeset before `<samp>\B</samp>´.</p>
</li>
<li id="uid992"><p class="nofirst noindent">If `<samp>\A</samp>´ expands to `<samp>xyyx</samp>´, the test is false, `<samp>\B</samp>´ is
ignored.</p>
</li>
<li id="uid993"><p class="nofirst noindent">If `<samp>\A</samp>´ and `<samp>\B</samp>´ expand to nothing, tokens that follow will be
examined.</p>
</li>
<li id="uid994"><p class="nofirst noindent">If `<samp>\A</samp>´ expands to nothing, `<samp>\if\A\B...</samp>´ behaves like
`<samp>\if\B...</samp>´, see above.</p>
</li></ul>
<p>Plain TeX provides an <samp>\outer</samp> macro<a id="uid995" href="#note46" title="There is no clear reason why this command should be \outer, hance uses a normal macro instead"><small>(note: </small>&#10163;<small>)</small></a> <samp>\newif</samp><a id="uid996"></a>
that takes an argument <samp>\iffoo</samp> (whose name starts with the two letters if)
and makes it a new conditional; the
<span class="sansserif">ifthen</span> package provides the more LaTeXish syntax
<samp>\newboolean</samp><a id="uid997"></a><samp>{foo}</samp>. This means that <samp>\iffoo</samp>
true-code <samp>\else</samp> false-code <samp>\fi</samp> becomes valid, and evaluates
false-code. You can say `<samp>\footrue</samp>´ and the condition becomes true
(true-code is evaluated) or `<samp>\foofalse</samp>´ and it becomes false
(false-code is evaluated). The <samp>\global</samp> prefix is allowed before the
command. The <span class="sansserif">ifthen</span> package provides
<samp>\setboolean</samp><a id="uid998"></a><samp>{foo}</samp><samp>{true}</samp> where the second argument
is case insensitive.
These
commands could be implemented as</p>
<pre class="latex-code">\def\footrue{\def\iffoo{\if00}}
\def\foofalse{\def\iffoo{\if01}}
</pre>
<p class="nofirst noindent">The trouble with this definition is that, when `<samp>\iffoo</samp>´ is read at high
speed, it is not recognized as a conditional (it is a user defined command),
see discussion about `<samp>\ifhph</samp>´ in <a href="#bid3" title="Knuth1984">[4, Chapter 20]</a>.
For this reason, the commands <samp>\iftrue</samp><a id="uid999"></a> and
<samp>\iffalse</samp><a id="uid1000"></a> were added to TeX, they
evaluate respectively to true and false, and the following lines
work (because <samp>\let</samp> is used instead of <samp>\def</samp>):</p>
<pre class="latex-code">\def\footrue{\let\iffoo\iftrue}
\def\foofalse{\let\iffoo\iffalse}
</pre>
<p>You can use `<samp>\ifnum</samp>´<a id="uid1001"></a> or `<samp>\ifdim</samp>´<a id="uid1002"></a>: in both cases
a numeric quantity, an operator, and another numerical quantity are read.
Three operators are recognized: less than, greater than and equal to.
In the case of
`<samp>\ifnum</samp>´, both quantities have to be numbers, otherwise dimensions.
Note that glue is converted to a dimension (and possibly a number), by
ignoring the shrink and stretch part. If you want to compare two items of
glue, you must split them into components and check them in order.
The example that follows shows also that math glue must first be converted
into ordinary glue. All the commands shown here are fully expandable;
without the <samp>\relax</samp>, this piece of code
gives three errors (and TeX is still trying to see if the `fill´ is not a
`filll´).</p>
<pre class="latex-code">\muskip0=36mu plus 18mu minus 1fill\relax
\ifnum\glueshrinkorder\mutoglue\muskip0=2\else\bad\fi
\ifdim\glueshrink\mutoglue\muskip0=1pt\else\bad\fi
\ifdim\gluestretch\mutoglue\muskip0=18pt\else\bad\fi
</pre>
<p>Here is an example that uses no extension.</p>
<pre class="latex-code">\count0=0 \count1=1 \dimen0=1pc \dimen1=12pt
\skip0=1cm minus3fill  \skip1=1mmplus 2fill
\tracingall
\ifnum \count0&lt;\count1
  \ifdim \dimen0=\dimen1
    \ifdim \skip0&gt;\skip1 ok \fi\fi\fi
</pre>
<p class="nofirst noindent">This is the trace of <i>Tralics</i>. Note that for LaTeX, all lengths allocated by
<samp>\newlength</samp><a id="uid1003"></a> are &#8220;rubber&#8221; length, i.e. associated to a <samp>\skip</samp><a id="uid1004"></a>
register. Such quantities are automatically converted into rigid length
(however, if you replace in the example `<samp>\skip1</samp>´ by `<samp>1mmplus 2fill</samp>´,
then only a rigid dimension is read, the `<samp>plus 2fill</samp>´ is not part of
the condition).</p>
<pre class="log-code">+\ifnum26
+scanint for \count-&gt;0
+scanint for \ifnum-&gt;0
+scanint for \count-&gt;1
+scanint for \ifnum-&gt;1
+iftest26 true
+\ifdim27
+scanint for \dimen-&gt;0
+scandimen for \ifdim-&gt;12.0pt
+scanint for \dimen-&gt;1
+scandimen for \ifdim-&gt;12.0pt
+iftest27 true
+\ifdim28
+scanint for \skip-&gt;0
+scandimen for \ifdim-&gt;28.45274pt
+scanint for \skip-&gt;1
+scandimen for \ifdim-&gt;2.84526pt
+iftest28 true
+\fi28
+\fi27
+\fi26
</pre>
<p class="nofirst noindent">This is one solution to our problem of producing N sharp signs in a row:</p>
<pre class="latex-code">\ifnum \N&gt;0 \sharp1\fi\ifnum \N&gt;1 \sharp2\fi\ifnum \N&gt;2 \sharp3\fi
\ifnum \N&gt;3 \sharp4\fi\ifnum \N&gt;4 \sharp5\fi\ifnum \N&gt;5 \sharp6\fi
\ifnum \N&gt;6 \sharp7\fi\ifnum \N&gt;7 \sharp8\fi\ifnum \N&gt;8 \sharp9\fi
</pre>
<p class="nofirst noindent">The following construction is a priori more efficient (on the average there
are less tests) but it takes more memory.</p>
<pre class="latex-code">\ifnum \N&gt;0 \sharp1\ifnum \N&gt;1 \sharp2\ifnum \N&gt;2 \sharp3%
\ifnum \N&gt;3 \sharp4\ifnum \N&gt;4 \sharp5\ifnum \N&gt;5 \sharp6%
\ifnum \N&gt;6 \sharp7\ifnum \N&gt;7 \sharp8\ifnum \N&gt;8 \sharp9%
\fi\fi\fi\fi\fi\fi\fi\fi\fi
</pre>
<p>You can test whether a character can be read from an input channel, via the
<samp>\ifeof</samp><a id="uid1005"></a> command. Here is an example from the <i>Tralics</i> torture file.
The file <span class="sansserif">tortureaux.tex</span> has six lines, the first one contains <samp>abc</samp>, the second
one is empty, the third one contains <samp>\a \b {\c</samp>, the fourth one contains
<samp>{} \d} \e</samp>, the next one contains <samp>123</samp>, the last one is empty. The
<samp>\testeq</samp> commands compares two commands: things should be equal here.
(See TeXbook, exercise 20-18, if you do not understand the setting of
<samp>\endlinechar</samp><a id="uid1006"></a>). Commands starting with `bad´ are not
evaluated in this example. Details can be found in section <a href="#uid2570" title="Other expandable commands">5.12</a>.</p>
<pre class="latex-code">{
\openin 5=tortureaux
\endlinechar=-1
\ifeof5 \badifeofatentry\fi
\read 5 to \foo\testeq\foo{abc}
\read 5 to \foo\testeq\foo{}
\read 5 to \foo\testeq\foo{\a\b{\c{} \d} \e}
\global\read 5 to \foo
\closein5\relax
\ifeof5\else\badifeofatexit\fi
}\testeq\foo{123}
\ifeof3\else \badifeofnonexists\fi
</pre>
<p>You can say <samp>\ifvoid25</samp><a id="uid1007"></a>, <samp>\ifhbox25</samp><a id="uid1008"></a> or
<samp>\ifvbox25</samp><a id="uid1009"></a>.
In TeX these command would test the content
of box register 25: if empty, the <samp>\ifvoid</samp> is true, the other tests are
false; if not empty, the box contains a horizontal list or a vertical list,
and <samp>\ifhbox</samp> and <samp>\ifvbox</samp> are respectively true, the two other tests
being false. In <i>Tralics</i>, a box contains a character string or an <span class="sansserif">XML</span> element, but there is no associated orientation; hence <samp>\ifhbox</samp> and
<samp>\ifvbox</samp> always evaluate to false. Instead of 25, any number can be given
(provided it is a valid register number)
In the example that follows, only the first equals sign is part of an
assignment, and box number one is tested.</p>
<pre class="latex-code">       \count0=1
\ifvoid\count0=2\fi
\ifvbox\count0=3\fi
\ifhbox\count0=4\fi
</pre>
<p>You can say <samp>\ifmmode</samp><a id="uid1010"></a>, <samp>\ifvmode</samp><a id="uid1011"></a>,
<samp>\ifhmode</samp><a id="uid1012"></a> and <samp>\ifinner</samp><a id="uid1013"></a>.
These commands check the current mode. The first three evaluate to true if the
mode is math mode, vertical mode, or horizontal mode. The last is true if the
mode is inner (internal vertical mode, restricted horizontal mode, or
(nondisplay) math mode). The following example shows these modes.</p>
<pre class="latex-code">\def\wm{\edef\res{\ifinner i\else I\fi
   \ifhmode h\else H\fi
   \ifvmode v\else V\fi
   \ifmmode m\else M\fi}\res}
\par \wm$$\wm \hbox{\wm $\wm$} \eqno \wm$$
</pre>
<p class="nofirst noindent">The result is: `IHvM IHVm ihVM iHVm iHVm´. If you remove the
`<samp>\edef</samp>´<a id="uid1014"></a>, the trouble will be that typesetting the `I´ enters
horizontal mode. This example fails if `<samp>$$...$$</samp>´ is replaced by
`<samp>\[...\]</samp>´, because <samp>\eqno</samp>
switches to inner math mode, and `<samp>\]</samp>´ checks for outer math.
The same test provokes an error in <i>Tralics</i>, because of the implemenation of
<samp>\eqno</samp>, that expands all tokens, including the token that follows
<samp>\edef</samp>. <i>Tralics</i> knows whether is is in or out of math mode; in math mode
it knows whether it is in display math or not. In these cases, it produces
the same result as TeX. Outerwise <samp>\ifinner</samp> is false, and
<samp>\ifvmode</samp> or <samp>\ifhmode</samp> produce results in accordance to the current
mode, that has little to do with TeX modes.</p>
<p>An extension of &#1013;-TeX is <samp>\isdefined</samp><a id="uid1015"></a>. This reads a token, and yields
true unless it is a macro (or active character) that is undefined. The
command <samp>\ifcsname</samp><a id="uid1016"></a> reads all characters up to <samp>\endcsname</samp> and
constructs a character string in the same way as <samp>\csname</samp>. The value is
true if a command with that name exists (possibly undefined); it is false
otherwise (the important point is that the command is not created). In the
example that follows, assuming <samp>\foo</samp> and <samp>\FOO</samp> undefined, you will see
aBc (or abc, in case someone dedfined <samp>\undefined</samp>). You will also see DEF,
because the LaTeX command <samp>\@ifundefined</samp> creates the token if it deos
not exists, and sets it to <samp>\relax</samp>.</p>
<pre class="latex-code">\makeatletter
\ifcsname foo\endcsname A\else a\fi
\ifx\foo\undefined  B\else b\fi
\ifdefined\foo  C\else c\fi
\@ifundefined{FOO}{D}{d}
\ifcsname FOO\endcsname E\else e\fi
\ifdefined\FOO F\else f\fi
</pre>
<p>The command <samp>\iffontchar</samp> is another extension; it reads a font identifier
(for instance <samp>\font</samp> denotes the current font) and an integer (a character
position); it yields true if the font specifies a character at that position.</p>
<p>The last conditional to explain is <samp>\ifx</samp><a id="uid1017"></a>. This reads two tokens and
compares them. Two tokens are equal if they are character tokens (implicit
or explicit) with same character value and category code, or two TeX primitives with the same meaning, or two user-defined commands with the same
value (same arguments, same body, same <samp>\long</samp> and <samp>\outer</samp> flags)<a id="uid1018" href="#note47" title="If you remember the code of \fooiv, you can see that two commands with optional arguments always com..."><small>(note: </small>&#10163;<small>)</small></a>,<a id="uid1019" href="#note48" title="Note that &#1013;- adds a third flag, \protected that is also compared."><small>(note: </small>&#10163;<small>)</small></a>.</p>

<h3 id="uid1020">2.11.2. Examples of conditional commands</h3>
<p>Using <samp>\ifx</samp> we can code our <samp>\Color</samp> command properly, like that</p>
<pre class="latex-code">\def\Color#1#2{%
  \def\crouge{rouge}\def\cvert{vert}\def\cc{#1}%
 \ifx\cc\crouge\enrouge{#2}\else\ifx\cc\cvert\envert{#2}\else#2\fi\fi}
</pre>
<p class="nofirst noindent">It is possible to avoid these assignments in the <samp>\Color</samp> macro,
provided that they are hidden elsewhere. For instance</p>
<pre class="latex-code">\def\ifstringeq#1#2#3#4{%
  \def\tempa{#1}\def\tempb{#2}%
  \ifx\tempa\tempb#3\else#4\fi}
 
\def\Color#1#2{%
  \ifstringeq{#1}{rouge}{\enrouge{#2}}
  {\ifstringeq{#1}{vert}{\envert{#2}}{#2}}}
</pre>
<p class="nofirst noindent">Note that the <span class="sansserif">ifthen</span> package provides the <samp>\equal</samp> command as helper for
such a situation:
you could say <samp>\ifthenelse</samp><samp>{\equal{A}{B}}</samp><samp>{X}</samp><samp>{Y}</samp>
instead of <samp>\ifstringeq</samp> <samp>{A}</samp><samp>{B}</samp><samp>{X}</samp><samp>{Y}</samp>. Caveat: the <samp>\equal</samp><a id="uid1021"></a> command fully
expands its two arguments, our version expands nothing.</p>
<p>In any computer language, you would define a command that compares two strings
and returns true or false; this is not possible in TeX because commands
return no value. All you can do is modify some variable (a command, a
register, a token list, etc). This assignment can be done by the caller or
the callee. Here is a solution where the token <samp>\next</samp> is set by the
caller:</p>
<pre class="latex-code">\def\Color#1{%
 \ifstringeq{#1}{rouge}{\let\next\enrouge}
 {\ifstringeq{#1}{vert}{\let\next\envert}{\let\next\relax}}%
 \next}
</pre>
<p class="nofirst noindent">Note that, if <samp>\envert</samp> accepts an optional argument, for instance if
<samp>\envert</samp><samp>[clair]</samp><samp>{text}</samp> typesets the text using light
green, you can say
<samp>\Color</samp><samp>{vert}</samp><samp>[clair]</samp><samp>{text}</samp>.
We consider now a case where the assignment is
done by the callee (via <samp>\equaltrue</samp> or <samp>\equalfalse</samp>; there is a
variant that uses <samp>\setboolean</samp>).</p>
<pre class="latex-code">\newif\ifequal
\def\streq#1#2{%
 \def\tempa{#1}\def\tempb{#2}%
 %%variant: \setboolean{equal}{\ifx\tempa\tempb true\else false\fi}
 \ifx\tempa\tempb\equaltrue\else\equalfalse\fi}
 
\def\Color#1{%
 \streq{#1}{rouge}%
 \ifequal\let\next\enrouge\else
    \streq{#1}{vert}%
    \ifequal\let\next\envert\else \let\next\relax\fi\fi
 \next}
</pre>
<p>A subtlety of TeX is that tokens are read only when needed. Said otherwise,
if you say `<samp>\if AB C\else D\fi</samp>´, TeX will evaluate the test; it will
remember that a new conditional has started. If the test is false, it will
skip at high speed until the <samp>\else</samp>, and resume normal evaluation; but if
the test is true, it will resume normal evaluation right now. It is only
when TeX sees an <samp>\else</samp> token (and this can be another one) that it will read all tokens at high speed until
the <samp>\end</samp>. And, when TeX sees the <samp>\fi</samp>, it will pop the conditional
stack. Consider the following example:</p>
<pre class="latex-code">\def\ifstringeq#1#2#3#4{%
   \def\tempa{#1}\def\tempb{#2}%
   \ifx\tempa\tempb\aux{#3}\else\aux{#4}\fi}
\def\aux#1#2\fi{\fi#1}
\def\color#1{%
  \ifstringeq{#1}{rouge}{\enrouge}{\ifstringeq{#1}{vert}{\envert}{\relax}}}
</pre>
<p class="nofirst noindent">Assume that the test is true. Then <samp>\aux</samp> reads all tokens, up to `<samp>\fi</samp>´,
provides a <samp>\fi</samp> to finish the conditional now, then expands to its first
argument (which is argument 3 of <samp>\ifstringeq</samp>). In the case where the test
is false, the same thing happens. This is nicer that the solution that
consists in defining conditionally <samp>\next</samp> and evaluating it after
the <samp>\fi</samp>, it avoids an assignment.</p>

<h3 id="uid1022">2.11.3. Testing the next token</h3>
<p>Let´s consider now a variant of the color problem. We want to write a command
with three arguments A, B and C, it is assumed to read a token, compare it
with A, and expand to B or C. We need an auxiliary command that reads the
token. Thus the solution</p>
<pre class="latex-code">\def\ifnextchar#1#2#3{%
 \let\tempa=#1\def\tempb{#2}\def\tempc{#3}%
 \ifaux
}
\def\ifaux#1{%
  \let\lettoken=#1%
  \ifx\lettoken\tempa\let\tempd\tempb\else\let\tempd\tempc\fi
  \tempd
}
</pre>
<p class="nofirst noindent">Note that we have put an equals sign after `<samp>\let</samp><samp>\tempa</samp>´
and `<samp>\let</samp><samp>\lettoken</samp>´ for the case where the token to match is an equals
sign. If you want to catch spaces, a bit more complicated machinery must be used. There
is a problem with this command, because, if the argument of <samp>\ifaux</samp>
is not a single token, say `<samp>foobar</samp>´, then only `<samp>f</samp>´ will be put in
<samp>\lettoken</samp> and `<samp>oobar</samp>´ will be typeset. On the other hand, if the
argument is empty, then `<samp>\ifx</samp>´ will be put in <samp>\lettoken</samp>; after that
<samp>\lettoken</samp> will be expanded. Since this is <samp>\ifx</samp>, the following tokens
will be compared (said otherwise `<samp>\tempa</samp>´ and `<samp>\let</samp>´), this is not exactly
what is required. In order to solve this problem, we first modify slightly
our code:<a id="uid1023"></a></p>
<pre class="latex-code">\def\ifnextchar#1#2#3{%
 \let\tempa=#1\def\tempb{#2}\def\tempc{#3}%
 \ifaux
}
\def\ifaux#1{\let\lettoken=#1\ifnch}
\def\ifnch{%
  \ifx\lettoken\tempa\let\tempd\tempb\else\let\tempd\tempc\fi
  \tempd
}
</pre>
<p class="nofirst noindent">The <samp>\ifnch</samp> command given above looks like the LaTeX version of the beast.
In fact, spaces are ignored in LaTeX, so that there is an additional test.
Moreover, some variables have a different name, nevertheless, here is the code:</p>
<pre class="latex-code">\def\@ifnch{%
  \ifx\@let@token\@sptoken
    \let\reserved@c\@xifnch
  \else
    \ifx\@let@token\reserved@d
      \let\reserved@c\reserved@a
    \else
      \let\reserved@c\reserved@b
    \fi
  \fi
  \reserved@c}
</pre>
<p>The problem is the <samp>\ifaux</samp> command. The question is: can we rewrite it in
such a way as to read a single token, before calling <samp>\ifnch</samp>. Recall that
we want to distinguish between `<samp>{x}</samp>´ and `<samp>x</samp>´. A very interesting question
is the following: if we read the opening brace, how can we put it back in the
input stream? we cannot do so by just expanding a macro (because the body is
always well balanced). You could try something like
<samp>{\ifnum0=`}\fi</samp> (that
leaves an unmatched brace after expansion), or something like
`<samp>{\iffalse}\fi</samp>´. Our solution is much simpler.
There is a TeX primitive
that gets the token without reading it. To be precise, <samp>\futurelet</samp> reads a
token A, that has to be a command name or an active character, then a second
token B, then a third token C. The value of the token is put in A, using the
equivalent of <samp>\let</samp>, then C and B are pushed back in the input stream (in
this order, the token to be read first is B). The code of <samp>\ifnextchar</samp> is
hence the following:<a id="uid1024"></a></p>
<pre class="latex-code">\def\ifnextchar#1#2#3{%
 \let\tempa=#1\def\tempb{#2}\def\tempc{#3}%
 \futurelet\lettoken\ifnch}
</pre>
<p class="nofirst noindent">What `<samp>\futurelet</samp><samp>\lettoken</samp><samp>\ifnch</samp>´ does is read a token. This
could be a space
character, an equal sign, an open brace, a closing brace, whatever. It puts it
back in the input stream. It puts it also in <samp>\lettoken</samp>. After that, it
evaluates <samp>\ifnch</samp> (which is a command that should take no argument,
of course; it should consult <samp>\lettoken</samp> and depending on the value, call a
command that, maybe, reads the token). There are some variants. For instance
amsmath has a version that omits the comparison with <tt class="txt">&lt;@sptoken&gt;</tt>.
The <span class="sansserif">xkeyval</span> package provides a version where the category codes of
the character to test and the actual token may be different.</p>

<h3 id="uid1025">2.11.4. Reading a space</h3>
<a id="uid1026"></a><p>We consider in this paragraph the following problem: is it possible to define
a command <samp>\sptoken</samp> that behaves like a space character inside <samp>\ifx</samp>?
One problem with the current version of <i>Tralics</i> is that, as has been mentioned
earlier, a newline character in the source file produces a new line character
in the <span class="sansserif">XML</span> file; thus has a different representation as a normal space.
Thus, there are two different space tokens N and S (they have the same category
code, but a different value, 13 or 32). If a macro requires an argument
delimited by a space, both these characters can be used. When comparing token
lists, these tokens are considered equal. However, when using <samp>\ifx</samp>, these
two tokens compare unequal. Our purpose is to create <samp>\sptoken</samp> that
compares equal to S; it is trivial to create the N token, and compare them.</p>
<p>We give here three solutions. The first one uses
<samp>\futurelet</samp>. If the arguments are A, B and C, where A is the command to
define, and C the space, then B has to be a command (if it is a character, it
will be typeset); this cannot be <samp>\foo</samp>, since spaces after <samp>\foo</samp>
disappear, it has to be something like `<samp>\;</samp>´. This command must read the
space, otherwise it appears in the output. We provide two solutions: a command
that is delimited by a space, and a command that takes an argument (remember
that spaces disappear before undelimited arguments):</p>
<pre class="latex-code">\def\; {}\futurelet\SPtoken\; % comment required
\def\;#1{}\futurelet\SPtoken\; 0
</pre>
<p class="nofirst noindent">In both cases, the command <samp>\;</samp> cannot be used for typesetting (in the
LaTeX kernel, it is used for computing the <samp>\SPtoken</samp>, and correctly
redefined after that). We give here an example, where the redefinition is
temporary, inside the box. We can discard the content of the box.</p>
<pre class="latex-code">\setbox0\hbox{\def\;{}\global\futurelet\SPtoken\; }
</pre>
<p class="nofirst noindent">We give now a solution using <samp>\let</samp>. Remember the syntax, after <samp>\let</samp>
and <samp>\sptoken</samp> (the token to be assigned), comes
&lt;equals&gt; and &lt;one optional space&gt; and
&lt;token&gt;, where the last token is our space token. Since &lt;equals&gt;
reads an arbitrary number of spaces and an optional equals sign, an equals sign
is required. Our optional space cannot be optional. So we must produce
a double space. This is not completely trivial. We give here two solutions
(the comment is necessary)</p>
<pre class="latex-code">\def\makesptoken#1{\let\sptoken= #1}\makesptoken{ }
\def\:{\let\Sptoken= } \:  % this makes \Sptoken a space token
</pre>
<p class="nofirst noindent">And now, how can we define <samp>\@xifnch</samp>? this command is assumed to read a
space, discard it, and check again for the next character. Thus the question
is to design a macro that reads a space. This cannot be done via
<samp>\def</samp><samp>\@xifnch</samp><samp>#1</samp>..., since spaces are ignored before undelimited arguments; we
cannot use the technique of the command `<samp>\;</samp>´ above, because we cannot read
what follows the space; the solution consists in a command that takes
no argument, and that starts with a compulsory token, like
<samp>\def</samp><samp>\foo</samp><samp>\bar</samp><samp>{etc}</samp>. The non trivial point is that we want <samp>\bar</samp> to be
replaced by a space token, but spaces disappear after <samp>\foo</samp>. We give here
two solutions.<a id="uid1027"></a></p>
<pre class="latex-code">\expandafter\def\expandafter\foo\space{etc}
\def\:{\Foo}\expandafter\def\: {etc}
</pre>

<h3 id="uid1028">2.11.5. Variants of the Map problem</h3>
<p>Let´s consider the following variant of the <samp>\Map</samp> command. If we have
<samp>\do</samp><samp>{A}</samp><samp>\do</samp><samp>{B}</samp><samp>\do</samp><samp>{C}</samp>, we want to separate arguments with a comma, and put a
period after the last argument; we might as well do something with the
argument, say, typeset it in italics. This is not always possible. In one of
the style sheets used by the Raweb, a Perl postprocessor is used for replacing
some commas by a period. We assume here that we know where the list ends. For
instance, we assume that we can put a `<samp>\endl</samp>´ token at the end of the
list. Then we can write something like</p>
<pre class="latex-code">\def\foo#1#2\endl{\textit{#1}\ifx#2\endl\endl.\else, \foo#2\endl\fi}
</pre>
<p class="nofirst noindent">
Then `<samp>\foo</samp><samp>{A}</samp><samp>{B and C}</samp><samp>{D}</samp><samp>\endl</samp>´ produces
`<i>A</i>, <i>B and C</i>, <i>D</i>.´ as expected. Let´s analyze the code and try to
see why it is wrong. We assume that you never say <samp>\foo</samp><samp>\endl</samp>, because the
list is assumed non-empty. We also assume that the list does not contain the
<samp>\endl</samp> token (in LaTeX, you should use the special marker `<samp>\@nil</samp>´ only as
list delimiter). In our case, the first argument is `<samp>A</samp>´, the second is
`<samp>{B and C}</samp><samp>{D}</samp>´. In the case where the second argument is empty, the test is
true, because <samp>\endl</samp> is compared against itself. In our case, the test is
false because the brace is compared with the letter B. If we put the second
argument in a pair of braces, we get an error: <i>Too many }´s</i>,
because the test is true, and a part of `<samp>#2</samp><samp>\endl</samp><samp>\endl</samp>´ has been
evaluated. This means that our test is wrong. The only safe way to check
whether <samp>#2</samp> is empty is to put it in a command, and check whether this is the
same as <samp>\empty</samp><a id="uid1029"></a>. We shall give a second version of the code where the test
is replaced by <samp>\ifx</samp><samp>\endl</samp><samp>#2</samp><samp>\endl</samp>. In the case where <samp>#2</samp> is empty, the test
evaluates to true, and if <samp>#2</samp> evaluates to some token list that does not
start with <samp>\endl</samp>, the test will be false; this is better.</p>
<p>Note that, when
<samp>\foo</samp> is called again, it compares `<samp>D</samp>´ with `<samp>\endl</samp>´. Does this surprise
you? In fact, if you say `<samp>\foo</samp><samp>{A}</samp><samp>{XY}</samp><samp>{UV}</samp><samp>\endl</samp>´, you get
`<i>A</i>, <i>XY</i>, <i>U</i>, <i>V</i>.´. The trouble is the following: when TeX reads the
arguments of a command, a pair of braces disappears, when possible.
Thus arguments are `<samp>A</samp>´ (without braces) and `<samp>{XY}</samp><samp>{UV}</samp>´ (it is not possible to
remove the braces). When <samp>\foo</samp> is called again, arguments are
`<samp>XY</samp>´ and `<samp>UV</samp>´, without braces. This explains why the test
compares <samp>U</samp> and <samp>V</samp> (by the way, if `<samp>UV</samp>´ is replaced by
`<samp>UUVV</samp>´, the test will be
true, yielding an <i>Undefined control sequence</i> error). When <samp>\foo</samp>
is called again, arguments are now `<samp>U</samp>´ and `<samp>V</samp>´, an unwanted
result. There is a simple way to avoid disappearance of braces: it suffices
to put a token before each item, for instance like this</p>
<pre class="latex-code">\def\foo\do#1#2\endl{\textit{#1}\ifx\endl#2\endl.\else, \foo#2\endl\fi}
\foo\do{A}\do{B}\do{C}\endl
</pre>
<p class="nofirst noindent">The good way of testing that the argument is empty is to use <samp>\@iftempty</samp>,
which a has different syntax:</p>
<pre class="latex-code">\def\foo\do#1#2\endl{\textit{#1}\@iftempty{#2}{.}{, \foo#2\endl}}
\foo\do{A}\do{B}\do{C}\endl
</pre>
<p class="nofirst noindent">A more elegant solution: notice that <samp>#2</samp> starts with <samp>\do</samp>, unless it is
empty. There is no need to read the argument for seeing this, we can use the
<samp>\ifnextchar</samp> command. With the solution proposed here, the token that
marks the end of the list is evaluated: we use <samp>\relax</samp>, because this is
harmless.</p>
<pre class="latex-code">\def\foo{\def\do##1{\textit{##1}\@ifnextchar{\do}{, }{.}}}
\foo\do{A}\do{B}\do{C}\relax
</pre>
<p class="nofirst noindent">Note that we can replace <samp>\relax</samp> by something more useful, for instance a
period:</p>
<pre class="latex-code">\def\foo{\def\do##1{\textit{##1}\@ifnextchar{\do}{, }{}}}
\foo\do{A}\do{B}\do{C}.
</pre>
<p>An alternate solution could use `<samp>\ifprevchar</samp>´ instead of
`<samp>\ifnextchar</samp>´. There is no such command in LaTeX, but the idea is the
following: instead of putting a comma after each argument but the last, we can
put a comma <i>before</i> each argument but the first. All we need to do is to
know if this argument is the first. In one application, we have coded this as:
apply <samp>\do-first</samp> on the first argument, and map <samp>\do-other</samp> on the rest
of the list. If side effects are allowed, we can use a piece of code like
this (note how the final period is typeset):</p>
<pre class="latex-code">\newif\iffirst
\def\do#1{\iffirst\firstfalse\else , \fi\textit{#1}}
\firsttrue
\do{A}\do{B}\do{C}.
</pre>
<p class="nofirst noindent">In fact, there is no need to use an auxiliary command, it suffices to modify
<samp>\do</samp> itself:</p>
<pre class="latex-code">\def\foo{\def\do##1{\textit{##1}\def\do####1{, \textit{####1}}}}
\foo\do{A}\do{B}\do{C}.
</pre>
<p class="nofirst noindent">If you think that there are two many sharp signs, you can try</p>
<pre class="latex-code">\newcommand\normaldo[1]{, \textit{#1}}
\newcommand\firstdo[1]{\textit{#1}\let\do\normaldo}
\newcommand\foo{\let\do\firstdo}
\foo\do{A}\do{B}\do{C}.
</pre>
<p>There are other possibilities implying conditional commands. We shall see
later how to define a <samp>comment</samp> environment that ignores the content of it. It
is as if you said</p>
<pre class="latex-code">\newenvironment{comment}{\iffalse}{\fi}
</pre>
<p>One can make the following strange construct
<samp>{\ifnum0=`}\fi</samp>. In this case,
we compare two numbers, zero and the internal code of the brace (which is in
general non-zero). The result of the test is false, but who cares? the body of
the conditional as well as the else part is empty. Hence, the result is like
<samp>\bgroup</samp>, there are some differences because TeX has two brace counters:
the balance counter and the master counter; there is only one counter in
<i>Tralics</i>. For details, see the TeXbook and its appendix D, where it is said
&#8220;If you understand [...]
you´ll agree that the present appendix deserves its name.&#8221; (the name of the
appendix is `Dirty Tricks´).</p>
<p>A piece of code like this causes trouble to <i>Tralics</i><a id="uid1030"></a></p>
<pre class="latex-code">\def\foo#1{%
  \sbox\tempboxa{#1}%
  \ifdim \wd\tempboxa &gt;\hsize
  #1\par
  \else \hbox to \hsize{\hfil\box\tempboxa\hfil}%
\fi}
</pre>
<p class="nofirst noindent">It is a simplification of the <samp>\@makecaption</samp> command of the
<span class="sansserif">article</span>
class. The idea is to center the caption of an image if it fits on a line
(centering is achieved via <samp>\hfil</samp>). The argument is typeset in a temporary
box, and the width of the box is compared against <samp>\hsize</samp>. Captions in the
Raweb are always centered, but this is not aesthetic.</p>

<h3 id="uid1031">2.11.6. More examples</h3>
<p>Consider again the following example</p>
<pre class="latex-code">\def\ifnch{%
  \ifx\lettoken\tempa\let\tempd\tempb\else\let\tempd\tempc\fi
  \tempd
}
</pre>
<p class="nofirst noindent">It would be much simpler to write:</p>
<pre class="latex-code">\def\ifnch{%
  \ifx\lettoken\tempa\tempb\else\tempc\fi
}
</pre>
<p class="nofirst noindent">The problem here is that the commands <samp>\tempb</samp> and <samp>\tempc</samp> may take an
argument, that would be <samp>\else</samp> or <samp>\fi</samp>. The remedy is</p>
<pre class="latex-code">\def\ifnch{%
  \ifx\lettoken\tempa\expandafter\tempb\else\expandafter\tempc\fi
}
</pre>
<p class="nofirst noindent">In general, you need an <samp>\expandafter</samp> before each token between <samp>\else</samp>
and <samp>\fi</samp>. The command <samp>\@afterfi</samp><a id="uid1032"></a> can be
used to simplify such definitions. Its effect is easy: it reads all token, up
to the <samp>\fi</samp> tokens, evaluates <samp>\fi</samp>, then the other tokens. Such a
command is provided by the following packages: typehtml, grabhedr, gmutils,
gmverb, morehelp, splitbib, babel, and maybe others. Example:</p>
<pre class="latex-code">\def\test#1{
   \ifnum\count0=#1
   somecode
   \else\@afterfi\fct v\fi}
</pre>
<p class="nofirst noindent">If the test is true, then somecode is evaluated, then everything between
<samp>\else</samp> and <samp>\fi</samp> is discarded. But if the test if false, the else part
is interpreted as if it were <samp>\fi</samp><samp>\fct v</samp>.
The command <samp>\@afterelsefi</samp><a id="uid1033"></a> is to be
used in the true part (all tokens between <samp>\else</samp> and <samp>\fi</samp> are
discarded). In the example that follows, <samp>\fct</samp> is called with two
arguments, the first one is u or v, the second is 2.</p>
<pre class="latex-code">\def\test#1{%
   \ifnum\count0=#1 %
   \@afterelsefi \fct u
   \else\@afterfi\fct v\fi}
\def\fct#1#2{} \test32
</pre>
<p>The piece of code that follows computes the factorial of a number, using only
expandable commands (it requires <samp>\numexpr</samp>, an extension provided by &#1013;-TeX).</p>
<pre class="latex-code">\def\JGfactorial#1{%
  \ifnum\numexpr#1&gt;1
    \number \numexpr#1*\JGfactorial{(#1-1)}\relax
  \else 1\fi}
 
\def\factorial#1{%
    \ifnum\numexpr#1&gt;1
      \number \numexpr#1*\factorial{(#1-1)}\expandafter\relax
    \else
      \expandafter1\fi}
 
\def\Factorial#1{%
  \number\ifnum\numexpr#1&gt;1
    \numexpr#1*\Factorial{(#1-1)}\expandafter\relax
  \else
   1\expandafter\space
  \fi
}
 
\def\UDfactorial#1{%
  \number\ifnum\numexpr#1&gt;1
    \numexpr#1*\UDfactorial{(#1-1)}\expandafter\relax
  \else
    \numexpr\ifnum\numexpr#1&lt;0 0\else1\fi\expandafter\relax
  \fi
}%
</pre>
<p>Ulrich Diez, wrote versions 3 and 4; Version 3 uses a space character instead
of <samp>\space</samp> using one of the techniques shown above; he then produced
version 4, which gives a different value for the factorial of a negative
number, and the space after the digit 1 is not needed anymore. In fact, if the
argument is zero or one (case where the first <samp>\ifnum</samp> is false, version 1
and 2 return the character 1, while versions 3 and 4 return the digits of the
number 1, computed by <samp>\number</samp>; in case 3, an optional space is read
after the integer constant, in case 4, the <samp>\relax</samp> token is an end marker
for <samp>\numexpr</samp>, an no optional space is needed after it
(I guess that the purpose of <i>this</i> <samp>\numexpr</samp> if to avoid any
problems if <samp>\space</samp> is redefined); the first <samp>\numexpr</samp> is needed for
the product, and the two other calls are needed if the command calls itself).
The difference between versions 2 and 3 is the placement of <samp>\number</samp>. I
put it just before <samp>\numexpr</samp>, because <samp>\numexpr</samp> can be used only in a
context where a number is seen. Ulrich puts it before the <samp>\ifnum</samp>. Does
this make any difference? If you want to compute the factorial of a number, no.
What about the following code:</p>
<pre class="latex-code">\expandafter\expandafter\expandafter\def
\expandafter\expandafter\expandafter\factorialresult
\expandafter\expandafter\expandafter{\JGfactorial{12}}
</pre>
<p>The effect is the following. The command <samp>\JGfactorial</samp> is expanded twice,
and the result is put in a command; evaluating this command yields the desired
result. The same can be applied to <samp>\UDfactorial</samp>. In any case, the first
expansion gives the body of the macro. The second expansion expands the
<samp>\ifnum</samp> and <samp>\number</samp> respectively. In one case you get lines two and
three of <samp>\JGfactorial</samp>. This is something like</p>
<pre class="latex-code">\def\factorialresult{...\else...\fi}
</pre>
<p class="nofirst noindent">If you do not use this command, TeX will signal an unterminated <samp>\if</samp>. If
you call it twice, you will get an extra <samp>\else</samp> error. On the other hand,
if you consider <samp>\UDfactorial</samp>, the one-level expansion of <samp>\number</samp>
implies expansion of the <samp>\ifnum</samp>, then the <samp>\numexpr</samp> of the body;
expansion of the command means considering all tokens up to the final
<samp>\relax</samp>, and since this <samp>\relax</samp> is preceded by <samp>\expandafter</samp>,
everything up to the final <samp>\fi</samp> is taken into account. Thus, the one-level
expansion of the body is a number, the desired result.</p>

<h3 id="uid1034">2.11.7. Producing N asterisks in a row</h3>
<p>In appendix D of the TeXbook, there are some examples of how to produce N
asterisks in a row. The question is: can we produce this using pure expansion?
this is a solution given by D. Kastrup:<a id="uid1035"></a></p>
<pre class="latex-code">\def\nlines#1{\expandafter\nlineii\romannumeral\number\number #1 000\relax}
\def\nlineii#1{\if#1m\expandafter\theline\expandafter\nlineii\fi}
\def\theline{A}
\nlines{5}
</pre>
<p class="nofirst noindent">


This produces `AAAAA´. The idea is the following: `<samp>\romannumeral3000</samp>´
expands to `<samp>mmm</samp>´. It is then rather easy to convert this sequence of m
into a sequence of A. The argument of the command can be `<samp>\count0</samp>´; the
`<samp>\number</samp>´ has as effect to convert the value of this counter into a
number, it gobbles a space. The argument of the command can be
`<samp>\count1&#9251;</samp>´; the second `<samp>\number</samp>´ will gobble the second space
(I don´t know if there is some other reason for these two <samp>\number</samp>
commands). Here is the same idea, <i>without tests</i>:<a id="uid1036"></a></p>
<pre class="latex-code">\def\recur#1{\csname rn#1\recur}
\def\rn#1{}
\def\rnm#1{\endcsname{#1}#1}
\def\replicate#1{\csname rn\expandafter\recur
  \romannumeral\number\number#1 000\endcsname\endcsname}
 
\dimen0=4sp \replicate{\dimen0}{P}
</pre>
<p class="nofirst noindent">You may wonder how this works. Here is the transcript file of <i>Tralics</i>.</p>
<pre class="log-code"><span class="prenumber">1</span> [216] \replicate{\dimen0}{P}
<span class="prenumber">2</span> \replicate #1-&gt;\csname rn\expandafter \recur \romannumeral
<span class="prenumber">3</span>    \number \number #1 000\endcsname \endcsname
<span class="prenumber">4</span> #1&lt;-\dimen 0
<span class="prenumber">5</span> {\csname}
<span class="prenumber">6</span> {\expandafter \recur \romannumeral}
<span class="prenumber">7</span> +scanint for \dimen-&gt;0
<span class="prenumber">8</span> +scanint for \number-&gt;4
<span class="prenumber">9</span> +scanint for \number-&gt;4000
<span class="prenumber">10</span> +scanint for \romannumeral-&gt;4000
<span class="prenumber">11</span> \recur #1-&gt;\csname rn#1\recur
<span class="prenumber">12</span> #1&lt;-m
<span class="prenumber">13</span> {\csname}
<span class="prenumber">14</span> \recur #1-&gt;\csname rn#1\recur
<span class="prenumber">15</span> #1&lt;-m
<span class="prenumber">16</span> {\csname}
<span class="prenumber">17</span> \recur #1-&gt;\csname rn#1\recur
<span class="prenumber">18</span> #1&lt;-m
<span class="prenumber">19</span> {\csname}
<span class="prenumber">20</span> \recur #1-&gt;\csname rn#1\recur
<span class="prenumber">21</span> #1&lt;-m
<span class="prenumber">22</span> {\csname}
<span class="prenumber">23</span> \recur #1-&gt;\csname rn#1\recur
<span class="prenumber">24</span> #1&lt;-\endcsname
<span class="prenumber">25</span> {\csname}
<span class="prenumber">26</span> {\csname-&gt;\rn}
<span class="prenumber">27</span> \rn #1-&gt;
<span class="prenumber">28</span> #1&lt;-\recur
<span class="prenumber">29</span> {\csname-&gt;\rnm}
<span class="prenumber">30</span> \rnm #1-&gt;\endcsname {#1}#1
<span class="prenumber">31</span> #1&lt;-P
<span class="prenumber">32</span> {\csname-&gt;\rnm}
<span class="prenumber">33</span> \rnm #1-&gt;\endcsname {#1}#1
<span class="prenumber">34</span> #1&lt;-P
<span class="prenumber">35</span> {\csname-&gt;\rnm}
<span class="prenumber">36</span> \rnm #1-&gt;\endcsname {#1}#1
<span class="prenumber">37</span> #1&lt;-P
<span class="prenumber">38</span> {\csname-&gt;\rnm}
<span class="prenumber">39</span> \rnm #1-&gt;\endcsname {#1}#1
<span class="prenumber">40</span> #1&lt;-P
<span class="prenumber">41</span> {\csname-&gt;\rn}
<span class="prenumber">42</span> \rn #1-&gt;
<span class="prenumber">43</span> #1&lt;-P
<span class="prenumber">44</span> Character sequence: PPPP .
</pre>
<p>This is now something else, it is part of a command defined in the RR style
file:</p>
<pre class="latex-code">\bgroup
  \edef\foo{\ifnum 0&lt;0#1x\else y\fi}\def\xbar{x}%
  \ifx\foo\xbar
    \global\compteurtheme=#1
  \else \global\compteurtheme=0 \@latex@error{Pas un thème #1}\@eha\fi
\egroup
</pre>
<p class="nofirst noindent">Assume that <samp>#1</samp> contains a positive number, for instance 25. In this case,
the test will be true, <samp>\foo</samp> will be defined as `<samp>x</samp>´, and will be equal to
<samp>\xbar</samp>. In this case, our command puts <samp>25</samp> in <samp>\compteurtheme</samp>. Some other
tests (not shown here) are done for instance, the value should be a number
between 1 and 4, or a number with two digits, each one being between 1 and 4.
Assume that the argument is not a number, say it is `<samp>gee</samp>´; then <samp>\ifnum</samp>
will compare 0 and 0, the test will be false, <samp>\foo</samp> will be defined as `<samp>y</samp>´
hence is not equal to <samp>\xbar</samp>. Assume that the argument is `<samp>3a</samp>´; this is not a
theme, but a theme and a subtheme. In this case, the test is true,
but <samp>\foo</samp> expands to `<samp>3x</samp>´, and this is not equal to <samp>\xbar</samp>.
Nowadays, themes are `com´, `cog´, etc, and this piece of code has become
useless. It is replaced by something different, see end of section
<a href="#uid3319" title="Array and Tables">6.9</a>.</p>

<h2 id="uid1037">2.12. A nontrivial command \verb</h2>
<p>The code that follows is a simplified version of a LaTeX command</p>
<pre class="latex-code"><span class="prenumber">1</span> \def\verb{%
<span class="prenumber">2</span>   \bgroup
<span class="prenumber">3</span>     \let\do\@makeother \dospecials
<span class="prenumber">4</span>     \verbatim@font\@noligs
<span class="prenumber">5</span>     \@vobeyspaces \frenchspacing\@sverb}
<span class="prenumber">6</span>  
<span class="prenumber">7</span> \def\verb@egroup{\global\let\VBG\@empty\egroup}
<span class="prenumber">8</span> \let\VBG\@empty
<span class="prenumber">9</span>  
<span class="prenumber">10</span> \def\@sverb#1{%
<span class="prenumber">11</span>   \catcode`#1\active
<span class="prenumber">12</span>   \lccode`\~`#1%
<span class="prenumber">13</span>   \gdef\VBG{\verb@egroup\error{...}}%
<span class="prenumber">14</span>   \aftergroup\VBG
<span class="prenumber">15</span>   \lowercase{\let~\verb@egroup}}
</pre>
<p>Note first that this code contains two empty lines, that are read by TeX as
a <samp>\par</samp> token<a id="uid1038"></a> (it is ignored, provided that the definition is
read in vertical mode). Lines 5, 7, and 15 are terminated by a brace and the
end of line character produces a space token<a id="uid1039"></a>, that is ignored for
the same reasons. Lines 1, 10, 12, and 15 are terminated by a <tt>%</tt>
character<a id="uid1040"></a>, since otherwise, it would produce a
space character (ignored in case the command is executed in vertical mode, and
that is not always the case). In the case of lines 2, 3, 4, etc., the end of
line is converted into a space character that disappears because it follows a
command name.</p>
<p>This code defines a command <samp>\verb</samp> that starts a group via
<samp>\bgroup</samp>.<a id="uid1041"></a> At line 3, <samp>\dospecials</samp> is executed, after
redefining <samp>\do</samp><a id="uid1042"></a>. This changes the category code of all special characters
(included all characters made active by packages like babel<a id="uid1043" href="#note49" title="A safe solution would be to change all category codes; but this is time consuming. On the other hand..."><small>(note: </small>&#10163;<small>)</small></a>).
Line 4 changes the current font to a typewriter one, and it executes a piece
of code that inhibits ligatures (for instance the one that converts a double
dash in an en-dash). Note that this document contains a great number of
verbatim examples, either inline or as environments. In some cases, we use a
smaller font; it is hence important to allow the user to parameterize
commands like these. Line 5 contains three commands: The first makes an
end-of-line character active (usually, it will behave like <samp>\par</samp>), the
second enters so-called french spacing mode (a mode where the width of a space
is constant), and the last command <samp>\@sverb</samp> will be explained later.
The `s´ in the name of this command comes from the `starred´ version of
<samp>\verb</samp>: If you say `<samp>\verb*+ +</samp>´, you will get `<samp>&#9251;</samp>´. We have
omitted the test with the star character.</p>
<p>On lines 7 and 8, we define a command <samp>\VBG</samp> that does nothing
(i.e. expands to the empty list) and a command that evaluates to
<samp>\egroup</samp><a id="uid1044"></a> preceded by a global<a id="uid1045"></a> assignment of
<samp>\VBG</samp> to nothing. On line 13, <samp>\VBG</samp> is defined as calling
<samp>\verb@egroup</samp> plus some error, whose text is not shown here. Thus
<samp>\VBG</samp> is a command that 1) resets <samp>\VBG</samp> to a harmless command, 2)
closes the current group, 3) signals an error.</p>
<p>Let´s consider lines 11 and 12. We assume that the argument of <samp>\@sverb</samp> is
some character <span class="math"><i>c</i></span> (If you say
<samp>\def\foo{\verb\foo=\foo</samp> then <samp>\foo</samp>,
you will get an error <i>Improper alphabetic constant</i>, and after that,
you´re really in trouble. In the usual case, the character that follows
<samp>\verb</samp> is read with category code 11 or 12, because of the code line 3.)
Line 11 makes the character <span class="math"><i>c</i></span> active (of category 13); the category code
will recover its old value at the end of the group, and line 13 changes the
lc-code of the tilde character (the lc-code will recover its value at the end
of the group). The lc-code of a character will be used for hyphenation, as
well as conversion from upper case to lower case. We assume here, for the sake
of simplicity, that hyphenation is inhibited by the use of a verbatim font.
Note that <i>Tralics</i> does not care about subtleties like hyphenation.
For this reason, when you say <samp>\verb+foo+</samp>, it will execute
<samp>\verbprefix</samp> <samp>{\verbatimfont foo}</samp>. You can redefine both commands (the
prefix is empty, the font defaults to <samp>\tt</samp>). Notice that <i>Tralics</i> grabs
the argument, contrarily to LaTeX.</p>
<p>Line 14 contains the special command <samp>\aftergroup</samp><a id="uid1046"></a>. This reads a token,
saves it on a stack, and re-inserts it at the end of the current group.</p>
<p>Let´s come back to the LaTeX implementation of <samp>\verb</samp>. So far, we have
read a character, changed its category code, changed the lc-code of the tilde
character, changed the font and other tables, redefined <samp>\VBG</samp>,
aftergrouped it (code on line 13: the token is
popped at the end of the current group, that was opened on line
2, and normally closed on line 7). Line 15 is a kludge: what
<samp>\lowercase</samp><a id="uid1047"></a> does is replace in its argument every
character by its lower case equivalent (using the lc-code table). The result
is evaluated again. Here the argument is formed of three tokens: <samp>\let</samp>,
the tilde and <samp>\verb@egroup</samp>. Since <samp>~</samp> is a character that has a
lower-case equivalent, it will be replaced by that, namely the character
<span class="math"><i>c</i></span>. Note: category codes are left unchanged by this procedure. It is hence
important that <samp>~</samp> be an active character (because <samp>\let</samp> modifies that
value of <samp>~</samp>) and that <span class="math"><i>c</i></span> be active (otherwise, there is no meaning in
changing the value of <span class="math"><i>c</i></span>).</p>
<p>Consider the case of <samp>\verb+\toto+</samp>. Here the character <span class="math"><i>c</i></span> is the plus
sign. After line 15 has been executed, the situation is the following: all
characters are of category other, ligatures are disabled, french spacing is
active, current font is typewriter, a group is opened, and a token is waiting
for the group to terminate. In such a situation, you cannot go outside
LaTeX properly. In fact, the carriage return has been made active in order
to help error recovery (this is not shown here), and the `<samp>+</samp>´ sign has been
made active: this will help us. TeX sees now the following tokens
<tt>\</tt><sub>12</sub> <tt>t</tt><sub>11</sub> <tt>o</tt><sub>11</sub> <tt>t</tt><sub>11</sub>
<tt>o</tt><sub>11</sub> <tt>+</tt><sub>13</sub>. The first five tokens are added to the
current horizontal list as characters in the current font, while the last one
is expanded. The expansion is that of <samp>\verb@egroup</samp>, see line 7. This
defines globally <samp>\VBG</samp>, then closes the group, restoring everything. It
does not restore <samp>\VBG</samp> (because the last assignment was global). After the
group, the after-grouped token <samp>\VBG</samp> is evaluated but it does nothing.</p>
<p>So far, so good: the translation of `<samp>\verb+\foo+</samp>´ is the same as
`<samp>\texttt{\char`\\foo}</samp>´. Note that the author could
have entered the previous expression as
<samp>`\verb-\verb+\foo+-´</samp>, or using the <span class="sansserif">fancyvrb</span> package
as <samp>`|\verb+\toto+|´</samp>, but he used
<samp>\quoted{\BS verb+\BS foo+}</samp>, because, in the HTML file
produced by <i>Tralics</i>, different colors are used for verbatim material;
this is explained in the second part of this document.</p>
<p>Consider now the following example:</p>
<pre class="latex-code">\def\duplicate#1{#1#1} `\duplicate{\verb+x+}++'
</pre>
<p class="nofirst noindent">You would expect `<tt>xx</tt>++´ but you get<i> x+x+ in LaTeX, an error in tralics</i>.
Explanations: the expansion
of <samp>\duplicate</samp> is <span style="text-decoration:underline">verb</span> <tt>+</tt><sub>12</sub> <tt>x</tt><sub>11</sub>
<tt>+</tt><sub>12</sub> <span style="text-decoration:underline">verb</span> <tt>+</tt><sub>12</sub> <tt>x</tt><sub>11</sub>
<tt>+</tt><sub>12</sub> <tt>+</tt><sub>?</sub> <tt>+</tt><sub>?</sub>. The last two plus signs have
not been read, and their category code is still unassigned. The <samp>\verb</samp>
command reads the <tt>+</tt><sub>12</sub> via <samp>\@sverb</samp>. It changes the category
code of the plus sign. The second <samp>\verb</samp> does the same. It reads the
<tt>+</tt><sub>?</sub> as a <tt>+</tt><sub>13</sub>, this finishes evaluation of <samp>\verb</samp>.
The second <samp>\verb</samp> command does the same. In the case where you replace
<samp>++</samp> by <samp>--</samp>, the <samp>\verb</samp> command will see an end of line character before
a plus character and complain with
<i>LaTeX Error: \verb ended by end of line.</i></p>
<p>Consider now the following example:</p>
<pre class="latex-code">\def\braceme#1{{#1}} `\braceme{\verb+x+}++'
</pre>
<p class="nofirst noindent">You get the following error <i>LaTeX Error: \verb illegal in command
argument.</i> Let´s try to see how this is done. The expansion of <samp>\braceme</samp>
produces the following tokens:
<tt>{</tt><sub>1</sub> <span style="text-decoration:underline">verb</span> <tt>+</tt><sub>12</sub> <tt>x</tt><sub>11</sub>
<tt>+</tt><sub>12</sub> <tt>}</tt><sub>2</sub>. After <samp>\@sverb</samp> has finished, the
first non-inactive character is <tt>}</tt><sub>2</sub>, this closes the
current group. Hence, as above, this restores category code, fonts, lc-codes,
etc. It does not restore <samp>\VBG</samp> because assignment is global
(<samp>\gdef</samp><a id="uid1048"></a> at line 13 is like <samp>\global</samp><samp>\def</samp>). The trick is now
that a <samp>\VBG</samp> token is popped from the aftergroup stack. This one calls
<samp>\verb@egroup</samp> and signals an error. What <samp>\verb@egroup</samp> does is to
close a group (the one opened by <samp>\braceme</samp>), and reset <samp>\VBG</samp> to
something harmless. Note that TeX is in a clean mode when the error is
signaled. <i>Tralics</i> has no such error handling mechanism (however, no
category codes are changed when scanning for the end of the command, so
nothing harmful can be done). What this example shows is that error recovery
is not completely trivial; nevertheless nice things can be done.</p>
<p>Note the following special cases;</p>
<pre class="latex-code">\verb test
\verb+test+
\verb^^abtest^^ab
</pre>
<p class="nofirst noindent">In the first case, the delimiter is a space character; the first line is
terminated by a space and you would expect it to be interpreted in the same
way as the second line. The trouble is that TeX removes all spaces
characters at the end of the line (regardless of category codes). The last
line has also a problem: the delimiter is character 171 (double hat
mechanism), and one <samp>\verb</samp> has changed category codes, the double hat
sequence is not seen any more as such, and an error is signaled.</p>
<p>There is a variant to <samp>\verb</samp>, it is the `verbatim´ environment. The
classical exercise is: write a command that reads everything up to
<samp>\end{verbatim}</samp> (backslash and braces are of category 12 in this token
list). There are different packages that solve this problem; For instance
<span class="sansserif">fancyvrb</span> is one of them. A solution is also given in the first
chapter. It does not allow an optional space after `<samp>\end</samp>´.</p>
<p>We give here the LaTeX implementation of the <samp>\end</samp><a id="uid1049"></a> command.</p>
<pre class="latex-code">\def\end#1{%
  \csname end#1\endcsname\@checkend{#1}%
  \expandafter\endgroup\if@endpe\@doendpe\fi
  \if@ignore\@ignorefalse\ignorespaces\fi}
</pre>
<p class="nofirst noindent">As you can see, if you say <samp>\end{foo}</samp>, then <samp>\endfoo</samp> is executed
first. After that the current environment in <samp>\@currenvir</samp> is compared with
the argument, in case of error the variable <samp>\on@line</samp> contains the
start line of the environment. After that, the group is terminated, and we
have two tests. The first uses <samp>\expandafter</samp><a id="uid1050"></a>, this means that the
command <samp>\@doendpe</samp> is executed outside the environment in the case where
the variable <samp>\if@endpe</samp> is true inside the environment. This command is
very complicated (it redefines <samp>\par</samp> and modifies <samp>\everypar</samp>), and not
implemented in <i>Tralics</i>; the effect is to suppress the indentation of the
following paragraph. On the other hand, the two commands <samp>\@ignoretrue</samp> and
<samp>\@ignorefalse</samp> redefine <samp>\if@ignore</samp> globally, so that no
<samp>\expandafter</samp> is needed for this one.</p>
<p>This is an example of <samp>\aftergroup</samp><a id="uid1051"></a>.</p>
<pre class="latex-code">\def\lrbox#1{%
  \edef\reserved@a{%
    \endgroup
    \setbox#1\hbox{\begingroup\aftergroup}%
    \def\noexpand\@currenvir{\@currenvir}%
    \def\noexpand\@currenvline{\on@line}%
  }%
  \reserved@a
  \@endpefalse \color@setgroup \ignorespaces}
\def\endlrbox{\unskip\color@endgroup}
</pre>
<p>The effect of the <samp>\edef</samp> command is to replace the previous definition by
the following (where `17´ is to be replaced by the current line number).
One important point here is that implementing colors in LaTeX is non
trivial, and for this reason, there are two hooks (the commands with the name
`color´, that do nothing if the package is not loaded). Colors are not
implemented in <i>Tralics</i>.</p>
<pre class="latex-code">\def\lrbox#1{%
  \endgroup
  \setbox#1\hbox{\begingroup\aftergroup}%
  \def\@currenvir{lrbox}%
  \def\@currenvline{ on input line 17}%
  \@endpefalse \color@setgroup \ignorespaces}
</pre>
<p>The order of evaluation is the following. Assume that
the current environment is X. The <samp>\begin</samp> command opens a group via
<samp>\begingroup</samp> and changes the environment name to `lrbox´.
The command starts with <samp>\endgroup</samp>, closing this group. After that, we
put something in the box whose number is the argument of the environment;
the content is a hbox, whose start is defined by the brace
(and this brace is a group); we start a group with <samp>\begingroup</samp>, and
call <samp>\aftergroup</samp>. This pushes a brace on the stack; this brace indicates
the end of the hbox, but it will be evaluated later. After that, we change
again the name of the current environment (it was restored to X by the
<samp>\endgroup</samp>, but we made a copy of it in the <samp>\edef</samp>). When the end of
the environment is reached, the following happens. First, the end-code is
executed (this removes space at the end of the box), and <samp>\endgroup</samp> is
executed. As a side-effect this restores the current environment name to X. It
also pops the after group stack, namely the closing brace that terminates the
<samp>\hbox</samp>. One important point here is that the <samp>\setbox</samp> assignment is
done outside the environment (it could done inside, with a <samp>\global</samp><a id="uid1052"></a>
prefix). Such a piece of code is illegal. The <samp>lrbox</samp> environment is not
implemented in <i>Tralics</i> version 2.10.</p>

<h2 id="uid1053">2.13. Expandable tokens</h2>
<p>Assume thar <samp>\err</samp> is un undefined command. The following code</p>
<pre class="latex-code">\ifnum1=0\err1 \err1 \fi
</pre>
<p class="nofirst noindent">will signal two errrors: when TeX reads the second number, it expands
undefined command (hence a first error), and continues scanning, until finding
the space; the test is true, hence the second error.</p>
<p>We give here the list of all tokens that can be expanded.</p>
<ul>
<li id="uid1054"><p class="nofirst noindent">All user defined command.</p>
</li>
<li id="uid1055"><p class="nofirst noindent">All undefined commands.</p>
</li>
<li id="uid1056"><p class="nofirst noindent"><samp>\noexpand</samp><a id="uid1057"></a>: inhibits expansion of the next token.</p>
</li>
<li id="uid1058"><p class="nofirst noindent"><samp>\expandafter</samp><a id="uid1059"></a>: changes order of expansion.</p>
</li>
<li id="uid1060"><p class="nofirst noindent"><samp>\csname</samp><a id="uid1061"></a>. This manufactures a token. Note that
<samp>\endcsname</samp> marks the end of the list, is not expandable, is an error
elsewhere.</p>
</li>
<li id="uid1062"><p class="nofirst noindent"><samp>\number</samp><a id="uid1063"></a>, <samp>\@arabic</samp><a id="uid1064"></a>,
<samp>\romannumeral</samp><a id="uid1065"></a>, <samp>\Romannumeral</samp><a id="uid1066"></a>: these convert numbers.</p>
</li>
<li id="uid1067"><p class="nofirst noindent"><samp>\string</samp><a id="uid1068"></a>, <samp>\meaning</samp><a id="uid1069"></a>,
<samp>\fontname</samp><a id="uid1070"></a>, <samp>\jobname</samp><a id="uid1071"></a>,
<samp>\tralicsversion</samp><a id="uid1072"></a>: These commands convert some internal quantities
into tokens; for instance <samp>\jobname</samp> is the name of the file that is
translated (without an extension `.tex´), and <samp>\tralicsversion</samp> is the
version number of <i>Tralics</i>; it could be `2.5 (pl7)´, or more likely `2.9´.</p>
</li>
<li id="uid1073"><p class="nofirst noindent"><samp>\the</samp><a id="uid1074"></a>. You say <samp>\the</samp><samp>\foo</samp>, if you want to typeset the value of
a variable <samp>\foo</samp>.</p>
</li>
<li id="uid1075"><p class="nofirst noindent"><samp>\input</samp><a id="uid1076"></a>, <samp>\include</samp><a id="uid1077"></a>, <samp>\endinput</samp><a id="uid1078"></a>: Special
macros for files.</p>
</li>
<li id="uid1079"><p class="nofirst noindent"><samp>\if</samp><a id="uid1080"></a>, <samp>\ifcat</samp><a id="uid1081"></a>, <samp>\ifnum</samp><a id="uid1082"></a>,
<samp>\ifdim</samp><a id="uid1083"></a>, <samp>\ifodd</samp><a id="uid1084"></a>, <samp>\ifvmode</samp><a id="uid1085"></a>,
<samp>\ifhmode</samp><a id="uid1086"></a>,
<samp>\ifmmode</samp><a id="uid1087"></a>,
<samp>\ifinner</samp><a id="uid1088"></a>,
<samp>\ifvoid</samp><a id="uid1089"></a>,
<samp>\ifhbox</samp><a id="uid1090"></a>,
<samp>\ifvbox</samp><a id="uid1091"></a>,
<samp>\ifx</samp><a id="uid1092"></a>,
<samp>\ifeof</samp><a id="uid1093"></a>,
<samp>\iftrue</samp><a id="uid1094"></a>,
<samp>\iffalse</samp><a id="uid1095"></a>,
<samp>\ifcase</samp><a id="uid1096"></a>. These start a conditional.</p>
</li>
<li id="uid1097"><p class="nofirst noindent"><samp>\fi</samp><a id="uid1098"></a>, <samp>\or</samp><a id="uid1099"></a>, <samp>\else</samp><a id="uid1100"></a>. These modify the
conditional stack.</p>
</li>
<li id="uid1101"><p class="nofirst noindent"><samp>\topmark</samp><a id="uid1102"></a>, <samp>\firstmark</samp><a id="uid1103"></a>, <samp>\botmark</samp><a id="uid1104"></a>,
<samp>\splitfirstmark</samp><a id="uid1105"></a>, <samp>\splitbotmark</samp><a id="uid1106"></a>. Marks are not yet
implemented. There are &#1013;-TeX extensions, with the same same but for a final
s, that manage a stack of marks.</p>
</li>
<li id="uid1107"><p class="nofirst noindent">A number of commands defined by LaTeX, are implemented as expandable
commands in <i>Tralics</i>.</p>
</li>
<li id="uid1108"><p class="nofirst noindent"><samp>\a</samp><a id="uid1109"></a>, <samp>\´</samp>, <samp>\`</samp>, <samp>\&#8221;</samp>, <samp>\/HAT</samp>, <samp>\~</samp>,
<samp>\k</samp><a id="uid1110"></a>, <samp>\H</samp><a id="uid1111"></a>, <samp>\v</samp><a id="uid1112"></a>, <samp>\b</samp><a id="uid1113"></a>, <samp>\d</samp><a id="uid1114"></a>,
<samp>\u</samp><a id="uid1115"></a>, <samp>\C</samp><a id="uid1116"></a>, <samp>\f</samp><a id="uid1117"></a>, <samp>\c</samp><a id="uid1118"></a>, <samp>\.</samp>, <samp>\=</samp>,
<samp>\r</samp><a id="uid1119"></a>, <samp>\T</samp><a id="uid1120"></a>, <samp>\V</samp><a id="uid1121"></a>, <samp>\D</samp><a id="uid1122"></a>, <samp>\h</samp><a id="uid1123"></a>: these
commands produce an accented character.</p>
</li>
<li id="uid1124"><p class="nofirst noindent">Commands of the form <samp>\textunderscore</samp><a id="uid1125"></a>, <samp>\AA</samp><a id="uid1126"></a>, <samp>\texteuro</samp><a id="uid1127"></a>
expand to a Unicode character.</p>
</li>
<li id="uid1128"><p class="nofirst noindent"><samp>\@firstofone</samp>,<a id="uid1129"></a>
<samp>\@firstoftwo</samp>, <samp>\@secondoftwo</samp> expand to the
first or second argument.</p>
</li>
<li id="uid1130"><p class="nofirst noindent"><samp>\@car</samp>, <samp>\@cdr</samp><a id="uid1131"></a>:
these give access to first or rest of a list terminated by <samp>\@nil</samp>.</p>
</li>
<li id="uid1132"><p class="nofirst noindent"><samp>\@gobble</samp>, <samp>\@gobbletwo</samp>, <samp>\@gobblefour</samp>:
<a id="uid1133"></a> these commands read and ignore 1, 2 or 4
arguments.</p>
</li>
<li id="uid1134"><p class="nofirst noindent"><samp>\zap@space</samp><a id="uid1135"></a> removes unwanted spaces.</p>
</li>
<li id="uid1136"><p class="nofirst noindent"><samp>\strip@prefix</samp><a id="uid1137"></a> removes the prefix inserted by
<samp>\meaning</samp> before the body of a macro.</p>
</li>
<li id="uid1138"><p class="nofirst noindent"><samp>\ensuremath</samp><a id="uid1139"></a> inserts dollars signs outside math mode.</p>
</li>
<li id="uid1140"><p class="nofirst noindent"><a id="uid1141"></a><samp>\hexnumber@</samp>, <samp>\multispan</samp><a id="uid1142"></a>, are defined as in LaTeX.</p>
</li>
<li id="uid1143"><p class="nofirst noindent"><samp>\@afterfi</samp>, <samp>\@afterelsefi</samp><a id="uid1144"></a>: These commands can be used in a
if-then-else structure, they terminate the condition and re-insert the
interesting tokens.</p>
</li>
<li id="uid1145"><p class="nofirst noindent"><samp>\(</samp>, <samp>\)</samp>, <samp>\[</samp>, <samp>\]</samp>: commands for math mode.</p>
</li>
<li id="uid1146"><p class="nofirst noindent"><samp>\UseVerb</samp><a id="uid1147"></a>: restores a quantity saved by <samp>\SaveVerb</samp><a id="uid1148"></a>.</p>
</li>
<li id="uid1149"><p class="nofirst noindent"><samp>\@stpelt</samp><a id="uid1150"></a>, <samp>\stepcounter</samp>,
<samp>\refstepcounter</samp><a id="uid1151"></a>, <samp>\addtocounter</samp><a id="uid1152"></a>,
<samp>\setcounter</samp><a id="uid1153"></a>, <samp>\value</samp><a id="uid1154"></a>. These are user-defined commands in
LaTeX. The expansion in <i>Tralics</i> can depend on the loading of the
<span class="sansserif">calc</span> package.</p>
</li>
<li id="uid1155"><p class="nofirst noindent"><samp>\setlength</samp><a id="uid1156"></a>, <samp>\addtolength</samp><a id="uid1157"></a>. These are user-defined
commands in LaTeX. The expansion in <i>Tralics</i> can depend on the loading of
the <span class="sansserif">calc</span> package.</p>
</li>
<li id="uid1158"><p class="nofirst noindent"><samp>\arabic</samp><a id="uid1159"></a>, <samp>\roman</samp><a id="uid1160"></a>,
<samp>\Roman</samp><a id="uid1161"></a>, <samp>\alph</samp><a id="uid1162"></a>, <samp>\Alph</samp><a id="uid1163"></a>,
<samp>\fnsymbol</samp><a id="uid1164"></a>, <a id="uid1165"></a><samp>\@alph</samp>,
<a id="uid1166"></a><samp>\@Alph</samp>,
<a id="uid1167"></a><samp>\@fnsymbol</samp>: commands to typeset a LaTeX counter.</p>
</li>
<li id="uid1168"><p class="nofirst noindent"><samp>\loop</samp><a id="uid1169"></a>, <a id="uid1170"></a><samp>\@whilenum</samp>,
<a id="uid1171"></a><samp>\@whiledim</samp>,
<a id="uid1172"></a><samp>\@whilesw</samp>: For loops.</p>
</li>
<li id="uid1173"><p class="nofirst noindent"><samp>\xspace</samp><a id="uid1174"></a>. This adds a space if needed.</p>
</li></ul>

<h1 id="cid3">3. Mathematics</h1>
<h2 id="uid1175">3.1. Introduction</h2>
<p>Mathematics play a great role in TeX and <i>Tralics</i>. For instance, TeX has
three modes: vertical mode, in which no typesetting is done, horizontal mode
(where everything happens) and math mode, a mode in which special objects are
handled; a two phase process converts these special objects in normal ones.
Fonts to be used in math mode have special properties (see appendices F and G
of the TeXbook). Not all subtleties of TeX math can be implemented in
<i>Tralics</i>; on the other hand, the <span class="sansserif">XML</span> translation is conforming to MathML.
This defines some entities, for instance in <span class="sansserif">isoamsc.ent</span>, there is a
definition of <tt class="txt">&amp;rceil;</tt> to <tt class="txt">&amp;#x02309;</tt>. As a consequence,
<i>Tralics</i> will translate <samp>\rceil</samp> to <tt class="txt">&lt;mo&gt;&amp;rceil;&lt;/mo&gt;</tt> or
<tt class="txt">&lt;mo&gt;<tt class="txt">&amp;#x02309;</tt>&lt;/mo&gt;</tt>, depending on an option. Translation of a
footnote is in general a <tt class="txt">&lt;footnote&gt;</tt> element, and the user can change the
name of this element; this is not done for maths: the name <tt class="txt">&lt;mo&gt;</tt> is a constant.</p>
<p>The syntax of mathematics is often strange. Instead of</p>
<pre class="latex-code">\math{E=\fraction{1}{2} m\superscript{v}{2}}
</pre>
<p class="nofirst noindent">you say</p>
<pre class="latex-code">$E={1\over 2} mv^2$
</pre>
<p class="nofirst noindent">Three categories codes are defined for use in math mode, they correspond to
the dollar sign (math shift), underscore character (subscript) and hat
character (superscript).
If you want a dollar or underscore character, you can say <samp>\$</samp>,
or <samp>\_</samp>, but <samp>\^</samp> produces an accent over what follows, not a
hat character (In LaTeX, you can say <samp>\textasciicircum</samp>, provided that you
can guess the name).</p>
<p>In the example above, we have two pseudo commands <samp>\fraction</samp> and
<samp>\superscript</samp> (followed by two arguments) whereas the plain
TeX version uses infix operators (placed between the arguments). The first
opertr is greedy. This means that, without the braces in the example above,
everything before <samp>\over</samp> would be the numerator, and everthing after it
would be the denominator. On the other hand, you see sometimes
2<sup>1</sup>6 instead 2<sup>16</sup>,
when people forget braces around the superscript. The essential
difference however is that arguments are typeset in different style: the
nucleus (what precedes the hat operator) is typeset in text style, while
numerator, denominator, superscripts and subscripts are in script style;
moreover, it two objects are placed one above the other, cramped style is used
used for the object that is below the other one (i.e., the denominator or a
subscript). The style influences spacing; because of commands like <samp>\over</samp>,
the current style is known only after the whole expression is parsed. This
explains why you may see:
<i>Package amsmath Warning: Foreign command <samp>\over</samp>;
<samp>\frac</samp> or <samp>\genfrac</samp> should be used instead</i>.</p>
<p>TeX has also a notion of &#8220;inner&#8221; mode. Inside an inner object, you cannot
put an outer one. Such a distinction exists also in <span class="sansserif">HTML</span>, where <tt class="txt">&lt;div&gt;</tt> is
outer and <tt class="txt">&lt;span&gt;</tt> is inner. We explained in the previous chapter that
<samp>\ifinner</samp> can be used to check whether current mode is inner or outer, and
we mentioned that, outside math mode, this is not well defined in
<i>Tralics</i>. This may produces surprising results. Consider for instance
<samp>\hbox{$$}</samp>. Inner mode is the rule inside a box, and a double
dollar sign signals the start of an outer (display math) formula. You would
expect this expression to provoke an error. In fact, TeX assumes that you
know what you do, enters inner math mode when it sees the first dollar
sign, and quits when it sees the second one; this gives an empty math formula
(in fact, it will contain all tokens from the <samp>\everymath</samp> hook),
surrounded by some space: the value of <samp>\mathsurround</samp> (this can be set to
zero using <samp>\m@th</samp>). Note that a math formula defines group: assignments
made inside the formula are forgotten after full evaluation (in particular
after this space is added).</p>
<p>The essential difference between inner (normal, inline) math and outer
(display) math is that a display formula uses a line of its own (very often
the formula is centered on the line). One could say that a display formula
terminates the current paragraph. In fact, it is just interrupted, the
paragraph continues after the formula (this is only interesting in
constructions like <samp>\parshape</samp>, whose scope is the current paragraph; here
a formula counts for three lines; not implemented in <i>Tralics</i>).
The construction <samp>\hbox{$$ x$$}</samp> produces a display math
formula in <i>Tralics</i>, instead of two empty math formulas. Before version
2.11.7, an error was signaled (because <i>Tralics</i> started a new paragraph at
the end of the equation, and this is illegal in a box).</p>
<p>A display math formula can have an equation number
(via commands <samp>\eqno</samp><a id="uid1176"></a>, <samp>\leqno</samp><a id="uid1177"></a>, <samp>\tag</samp>, <samp>\notag</samp>;
these commands were not implemented in early versions, and are described in
the last chapter of the second part of this report).
The MathML documentation says &#8220;One of the important uses of
<tt class="txt">&lt;mlabeledtr&gt;</tt> is for numbered equations. In a <tt class="txt">&lt;mlabeledtr&gt;</tt>,
the label represents the equation number and the elements in the row are the
equation being numbered.
The <span class="sansserif">side</span> and <span class="sansserif">minlabelspacing</span> attributes of <tt class="txt">&lt;mtable&gt;</tt>
determine the placement of the equation number.&#8221; Thus, the recommended way,
for MathML, is to use a table, like this (replace ellipsis by an expression)</p>
<pre class="xml-code">&lt;mtable&gt;
  &lt;mlabeledtr id='e-is-m-c-square'&gt;
    &lt;mtd&gt;
      &lt;mtext&gt; (2.1) &lt;/mtext&gt;
    &lt;/mtd&gt;
    &lt;mtd&gt;
     ...
    &lt;/mtd&gt;
  &lt;/mlabeledtr&gt;
&lt;/mtable&gt;
</pre>
<p class="nofirst noindent">This mechanism is not yet implemented. We do not know how to insert numbers
automatically, so that the proposed solution is: you can use <samp>\label</samp>,
<samp>\ref</samp> for any display math formula. This will add an <span class="sansserif">id</span> attribute
to the <tt class="txt">&lt;formula&gt;</tt> object, which is a wrapper for the <tt class="txt">&lt;math&gt;</tt>.</p>
<p>When you say <samp>{\alpha^2}</samp>, TeX will enter math mode with an error of the form <i>Missing $ inserted</i>.
On the other hand, <i>Tralics</i> will signal two errors, the first is <i>Math
only command \alpha.
Missing dollar not inserted</i>, the second is
<i>Missing dollar not inserted, token ignored: {Character ^ of catcode 7}</i>. If you want a command that works
in math mode and outside math mode, you can say:</p>
<pre class="latex-code">\def\foo{\ifmmode \alpha^2 \else $\alpha^2$\fi}
</pre>
<p class="nofirst noindent">This can be generalised, using the following command</p>
<pre class="latex-code">\DeclareRobustCommand{\ensuremath}{%
  \ifmmode
    \expandafter\@firstofone
  \else
    \expandafter\@ensuredmath
  \fi}
\long\def\@ensuredmath#1{$\relax#1$}
</pre>
<p class="nofirst noindent">The purpose of the <samp>\relax</samp> on the last line is for the case of an empty
argument: we do not want <samp>\ensuremath</samp><samp>{}</samp> to expand to
<samp>$$</samp>. Note that the argument is handled only once (i.e.,
<samp>\ensuremath</samp> does not read it, but calls a helper), because of subtle
bugs, see latex bugs data base amslatex/2104.
We shall say later `Mode independent commands are interpreted as usual´, this
implies that the <samp>\relax</samp> token will do nothing. We shall see later that,
in non-mathml mode, <samp>\relax</samp> appear in the result unless it is the first in
the list. Other commands, not listed in
this chapter, may signal an error. For instance, <samp>\par</samp> is forbidden.
Note that <samp>\mathchar</samp> provokes an
<i>Unimplemented command</i> error. If you want a random Unicode character,
you should use commands like <samp>\mathmi</samp>, <samp>\mathmo</samp>, <samp>\mathmn</samp>.
You can also define a command via
<samp>\chardef</samp> or <samp>\mathchardef</samp> (the result is the same), and use it, the
result is always a <tt class="txt">&lt;mi&gt;</tt> element. The following example shows that
<samp>\amp</samp> produces an ampersand sign in some case, it must be used with care.</p>
<pre class="latex-code">\chardef\AAA"1000
\chardef\CCC`x
\mathchardef\BBB"2000
$\mathbf{x\AAA\BBB\CCC} \mathmi{foo}\mathmo{\&amp;\#666;}\mathmo{\amp\#777;}$
</pre>
<p class="nofirst noindent">Translation</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
  &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
    &lt;mrow&gt;
      &lt;mi mathvariant='bold'&gt;x&lt;/mi&gt;
      &lt;mi&gt;&amp;#x1000;&lt;/mi&gt;
      &lt;mi&gt;&amp;#x2000;&lt;/mi&gt;
      &lt;mi&gt;x&lt;/mi&gt;
      &lt;mi&gt;foo&lt;/mi&gt;
      &lt;mo&gt;&amp;amp;#666;&lt;/mo&gt;
      &lt;mo&gt;&amp;#777;&lt;/mo&gt;
    &lt;/mrow&gt;
  &lt;/math&gt;
&lt;/formula&gt;
</pre>
<p>Because a math expression translates as <tt class="txt">&lt;math&gt;</tt> inside a <tt class="txt">&lt;formula&gt;</tt>, and
that the math has a long namespace attribute, examples will never fit on a
single line.
In order to make the result easier to read, we have inserted some newline
characters, and reindented all these examples.
Two consecutive newline characters are scanned by
TeX as space plus <samp>\par</samp>. This space is ignored by TeX (see TeXbook, the text between exercises 14.12 and 14.13). Hence the general
rule in <i>Tralics</i>: when a <tt class="txt">&lt;p&gt;</tt> element is ended, a trailing space or
newline is removed from the content of the element,
a newline character is added to the parent of the <tt class="txt">&lt;p&gt;</tt>. As a result,
you will very often see <tt class="txt">&lt;p&gt;</tt> at the start of a line and <tt class="txt">&lt;/p&gt;</tt> at the end
of a line in a <span class="sansserif">XML</span> file generated by <i>Tralics</i>.</p>
<p>Consider the following simple example:<a id="uid1178"></a></p>
<pre class="latex-code">$\alpha$ and $$\beta \label{foo}$$
</pre>
<p class="nofirst noindent">The translation is the following</p>
<pre class="xml-code">&lt;p&gt;
 &lt;formula type='inline'&gt;
  &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
   &lt;mi&gt;&amp;alpha;&lt;/mi&gt;
  &lt;/math&gt;
 &lt;/formula&gt; and&lt;/p&gt;
&lt;formula id='uid1' type='display'&gt;
 &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
  &lt;mi&gt;&amp;beta;&lt;/mi&gt;
 &lt;/math&gt;
&lt;/formula&gt;
</pre>
<p>You can also say <a id="uid1179"></a></p>
<pre class="latex-code">\(\alpha\) and \[\beta \label{foo}\]
</pre>
<p class="nofirst noindent">The result is exactly the same. In LaTeX, the commands <samp>\(</samp>, <samp>\)</samp>,
<samp>\[</samp> and <samp>\]</samp> test the current mode. No such test is done by <i>Tralics</i>.
The LaTeX implementation of <samp>\[</samp> is a bit strange. If the formula is in
vertical mode, it will be preceded by a box of width <samp>.6\linewidth</samp>
containing nothing (except two <samp>\hss</samp> commands to fill it) preceded by the
current paragraph indentation. The command <samp>\]</samp> executes
<samp>\ignorespaces</samp>. As you can see, there is some difference between a single
dollar and a double dollar. In the first case, we are in normal math mode,
otherwise in display math mode. One difference is the initial style: it is
<samp>\textstyle</samp> (for normal mode) and <samp>\displaystyle</samp> otherwise (this will be explained
later). A second difference is that the <samp>\everymath</samp> or
<samp>\everydisplay</samp> token list is inserted when
scanning the formula depends on the mode. The third difference is specific to
<i>Tralics</i>. A display math formula is never `trivial´ (see section
<a href="#uid1615" title="Trivial math">3.5</a>), it can have a label (not more than one): in this case,
the <tt class="txt">&lt;formula&gt;</tt> element has an <span class="sansserif">id</span> attribute. In any case, the
<tt class="txt">&lt;formula&gt;</tt> element has a <span class="sansserif">type</span> attribute that explains that the formula is
inline or display. A non-display formula starts a paragraph; a display math
formula cannot appear in a paragraph (the equivalent of <samp>\par</samp> is executed), if the first
non-space token (after expansion) that follows the math formula is not
<samp>\par</samp>, a <samp>\noindent</samp> token will be inserted<a id="uid1180"></a>
(see line 34 of the transcript at page <a href="#uid1542" title="Parsing a math formula">3.3</a>). Note
that, in TeX, a math formula does not end a paragraph, in the sense that a
<samp>\parshape</samp> is valid across math formulas; however what precedes the
formula is split into lines, according to parameters in force at the start of
the formula. <i>Tralics</i> does not split paragraphs into lines, and does not
implement use <samp>\parshape</samp>.</p>

<h2 id="uid1181">3.2. The basic objects</h2>
<p>The following environments are recognized outside math mode, and
produce a math formula: <samp>eqnarray*</samp><a id="uid1182"></a>,
<samp>align*</samp><a id="uid1183"></a>,
<samp>aligned</samp><a id="uid1184"></a>,
<samp>split</samp><a id="uid1185"></a>,
<samp>multline</samp><a id="uid1186"></a>,
<samp>equation*</samp><a id="uid1187"></a>,
<samp>math</samp><a id="uid1188"></a> and
<samp>displaymath</samp><a id="uid1189"></a>. When <i>Tralics</i> sees a dollar character, it
looks at the next character (without expansion). If this is a dollar sign, it
will be read, and display math mode is entered, otherwise, normal math mode is
entered. All environments shown above start display math mode (except
<samp>math</samp>, which enters normal math mode).
The environments <samp>math</samp> and <samp>displaymath</samp> are equivalent to <samp>\(...\)</samp> and
<samp>\[...\]</samp> respectively. The environments <samp>eqnarray</samp>,
and
<samp>split</samp> are implemented
as arrays. There is no difference between</p>
<pre class="latex-code">\begin{eqnarray} a&amp;b\\ c&amp;d \end{eqnarray}
\begin{split} a&amp;b\\ c&amp;d \end{split}
</pre>
<p class="nofirst noindent">and</p>
<pre class="latex-code">\[\begin{array}{rcl} a&amp;b\\ c&amp;d \end{array}\]
\[\begin{array}{rl} a&amp;b\\ c&amp;d \end{array}\]
</pre>
<p class="nofirst noindent">Environments <samp>equation</samp> and <samp>align</samp> are translated as normal math.
A star
after the environment name is ignored. In the case of normal math mode, the
content of the token list <samp>\everymath</samp><a id="uid1190"></a> is inserted before
the formula, for displaymath it is <samp>\everydisplay</samp><a id="uid1191"></a>.
For instance, if you say</p>
<pre class="latex-code">\everymath={(N)\ }
\everydisplay={(D)\ }
$\alpha$ and $$\beta$$
</pre>
<p class="nofirst noindent">the translation will be</p>
<pre class="xml-code">&lt;p&gt;
 &lt;formula type='inline'&gt;
  &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
   &lt;mrow&gt;
    &lt;mo&gt;(&lt;/mo&gt;&lt;mi&gt;N&lt;/mi&gt;&lt;mo&gt;)&lt;/mo&gt;&lt;mspace width='6pt'/&gt;
    &lt;mi&gt;&amp;alpha;&lt;/mi&gt;&lt;/mrow&gt;&lt;/math&gt;&lt;/formula&gt; and&lt;/p&gt;
&lt;formula type='display'&gt;
 &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
  &lt;mrow&gt;
   &lt;mo&gt;(&lt;/mo&gt;&lt;mi&gt;D&lt;/mi&gt;&lt;mo&gt;)&lt;/mo&gt;&lt;mspace width='6pt'/&gt;
   &lt;mi&gt;&amp;beta;&lt;/mi&gt;
  &lt;/mrow&gt;
 &lt;/math&gt;
&lt;/formula&gt;
</pre>
<p>In TeX, you can put anything inside a math formula, provided it is hidden in
a box; this is not possible in <i>Tralics</i>, because we want the <span class="sansserif">XML</span> result to be
conforming to MathML. We shall list here all commands valid in math mode, and
explain later on how they are translated.</p>
<p>Commands <samp>\limits</samp><a id="uid1192"></a>, <samp>\nolimits</samp><a id="uid1193"></a> and <samp>\displaylimits</samp><a id="uid1194"></a>
can be used just after an operator and before subscripts or supscripts, as in
<samp>\int</samp> <samp>\limits</samp> <samp>_x</samp>. They are curently ignored by <i>Tralics</i>.</p>
<p>The following environments are recognized: <samp>array</samp><a id="uid1195"></a>,
<samp>matrix</samp><a id="uid1196"></a>, <samp>pmatrix</samp><a id="uid1197"></a>, <samp>bmatrix</samp><a id="uid1198"></a>,
<samp>Bmatrix</samp><a id="uid1199"></a>, <samp>vmatrix</samp><a id="uid1200"></a>, <samp>Vmatrix</samp><a id="uid1201"></a>.
All these environments produce arrays. For the first, an argument is required,
explaining how cells are aligned. For all other environments, cells are
centered. Environments of the form <samp>Xmatrix</samp> have fences, an implicit
<samp>\left</samp> and <samp>\right</samp>. In order: parentheses, braces, brackets, simple
bars, double bars. There is also an environment <samp>cases</samp><a id="uid1202"></a>, with two
columns, left aligned, that has an open brace as left delimiter, an empty
right delimiter. Example</p>
<pre class="latex-code">$\begin{array}{lcr}a&amp;b&amp;c\end{array}
\begin{bmatrix}d&amp;e\\f&amp;g\end{bmatrix}$
</pre>
<p class="nofirst noindent">The translation is the following.</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
 &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
  &lt;mrow&gt;
    &lt;mtable&gt;
     &lt;mtr&gt;
      &lt;mtd columnalign='left'&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/mtd&gt;
      &lt;mtd&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mtd&gt;
      &lt;mtd columnalign='right'&gt;&lt;mi&gt;c&lt;/mi&gt;&lt;/mtd&gt;
     &lt;/mtr&gt;
    &lt;/mtable&gt;
   &lt;mfenced open='{' close='}'&gt;
    &lt;mtable&gt;
     &lt;mtr&gt;
      &lt;mtd&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;/mtd&gt;
      &lt;mtd&gt;&lt;mi&gt;e&lt;/mi&gt;&lt;/mtd&gt;
     &lt;/mtr&gt;
     &lt;mtr&gt;
      &lt;mtd&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;/mtd&gt;
      &lt;mtd&gt;&lt;mi&gt;g&lt;/mi&gt;&lt;/mtd&gt;
     &lt;/mtr&gt;
    &lt;/mtable&gt;
   &lt;/mfenced&gt;
  &lt;/mrow&gt;
 &lt;/math&gt;
&lt;/formula&gt;
</pre>
<p>The following delimiters are recognized: <samp>&lt;</samp><a id="uid1203"></a>,
<samp>&gt;</samp><a id="uid1204"></a>, <samp>.</samp><a id="uid1205"></a>, <samp>(</samp><a id="uid1206"></a>,
<samp>)</samp><a id="uid1207"></a>, <samp>[</samp><a id="uid1208"></a>, <samp>]</samp><a id="uid1209"></a>
<samp>|</samp><a id="uid1210"></a>,
<samp>\{</samp><a id="uid1211"></a>, <samp>\}</samp><a id="uid1212"></a>,
<samp>\langle</samp><a id="uid1213"></a>, <samp>\rangle</samp><a id="uid1214"></a>,
<samp>\lbrace</samp><a id="uid1215"></a>, <samp>\rbrace</samp><a id="uid1216"></a>,
<samp>\lceil</samp><a id="uid1217"></a>, <samp>\rceil</samp><a id="uid1218"></a>,
<samp>\lgroup</samp><a id="uid1219"></a>, <samp>\rgroup</samp><a id="uid1220"></a>,
<samp>\lfloor</samp><a id="uid1221"></a>, <samp>\rfloor</samp><a id="uid1222"></a>,
<samp>\lmoustache</samp><a id="uid1223"></a>, <samp>\rmoustache</samp><a id="uid1224"></a>,
<samp>\vert</samp><a id="uid1225"></a>, <samp>\Vert</samp><a id="uid1226"></a>,
<samp>\uparrow</samp><a id="uid1227"></a>, <samp>\downarrow</samp><a id="uid1228"></a>,
<samp>\updownarrow</samp><a id="uid1229"></a>,
<samp>\Uparrow</samp><a id="uid1230"></a>, <samp>\Downarrow</samp><a id="uid1231"></a>,
<samp>\Updownarrow</samp><a id="uid1232"></a>. A delimiter is anything that can follow
<samp>\left</samp> or <samp>\right</samp>. For MathML, this has to be a character. As the
following example shows, we use in most cases a character entity.</p>
<pre class="latex-code">$\left\lceil \left\uparrow x\right\}\right.$
$\lceil \uparrow x\}$
</pre>
<p class="nofirst noindent">The translation is</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
 &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
   &lt;mfenced open='&amp;lceil;' close='.'&gt;
     &lt;mfenced open='&amp;uparrow;' close='&amp;rbrace;'&gt;
       &lt;mi&gt;x&lt;/mi&gt;&lt;/mfenced&gt;&lt;/mfenced&gt;&lt;/math&gt;&lt;/formula&gt;
&lt;formula type='inline'&gt;
  &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
    &lt;mrow&gt;&lt;mo&gt;&amp;lceil;&lt;/mo&gt;&lt;mo&gt;&amp;uparrow;&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;}&lt;/mo&gt;
    &lt;/mrow&gt;&lt;/math&gt;&lt;/formula&gt;
</pre>
<p>This is the list of commands allowed in math mode, as well as in text mode:
<samp>\dots</samp><a id="uid1233"></a>, <samp>\ldots</samp><a id="uid1234"></a>, <samp>\quad</samp><a id="uid1235"></a>,
<samp>\qquad</samp><a id="uid1236"></a>, <tt>\&#9251;</tt>, <samp>\$</samp><a id="uid1237"></a>,
<samp>\%</samp><a id="uid1238"></a>, <samp>\&amp;</samp><a id="uid1239"></a>, <samp>\!</samp><a id="uid1240"></a>, <samp>\,</samp><a id="uid1241"></a>
<samp>\{</samp><a id="uid1242"></a>, <samp>\}</samp><a id="uid1243"></a>, <samp>\i</samp><a id="uid1244"></a>,
<samp>\sharp</samp><a id="uid1245"></a>, <samp>\natural</samp><a id="uid1246"></a>,
<samp>\flat</samp><a id="uid1247"></a>,
<samp>\_</samp><a id="uid1248"></a>. The following commands produce space: <samp>\;</samp><a id="uid1249"></a>,
<samp>\:</samp><a id="uid1250"></a>, <samp>\&gt;</samp><a id="uid1251"></a>. Note that <samp>\!</samp> produces a negative space in
math mode, nothing outside math mode.
Example of use:</p>
<pre class="latex-code">\def\alist{\i\j\$\,\_\&amp;\{\}\%\ \^^J\^^I\^^M\!}
\def\blist{\quad,\qquad,\dots,\sharp,\natural,\flat}
\alist\blist
$\alist\blist$
</pre>
<p class="nofirst noindent">This is the translation, with nobreak space replaed by tilde:</p>
<pre class="xml-code">&amp;#x131;j$ _&amp;amp;{}%    ~~~,~~~~~~,...,&amp;#x266F;,&amp;#x266E;,&amp;#x266D;
&lt;formula type='inline'&gt;
 &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
  &lt;mrow&gt;&lt;mo&gt;&amp;inodot;&lt;/mo&gt;&lt;mi&gt;j&lt;/mi&gt;&lt;mi&gt;$&lt;/mi&gt;&lt;mspace width='0.166667em'/&gt;
  &lt;mo&gt;~&lt;/mo&gt;&lt;mo&gt;&amp;amp;&lt;/mo&gt;&lt;mo&gt;{&lt;/mo&gt;&lt;mo&gt;}&lt;/mo&gt;&lt;mo&gt;%&lt;/mo&gt;
  &lt;mspace width='6pt'/&gt;&lt;mspace width='6pt'/&gt;
  &lt;mspace width='6pt'/&gt;&lt;mspace width='6pt'/&gt;
  &lt;mspace width='-0.166667em'/&gt;&lt;mspace width='1.em'/&gt;&lt;mo&gt;,&lt;/mo&gt;
  &lt;mspace width='2.em'/&gt;
  &lt;mo&gt;,&lt;/mo&gt;&lt;mo&gt;&amp;ctdot;&lt;/mo&gt;&lt;mo&gt;,&lt;/mo&gt;&lt;mo&gt;&amp;sharp;&lt;/mo&gt;&lt;mo&gt;,&lt;/mo&gt;
  &lt;mo&gt;&amp;natur;&lt;/mo&gt;&lt;mo&gt;,&lt;/mo&gt;&lt;mo&gt;&amp;flat;&lt;/mo&gt;&lt;/mrow&gt;
 &lt;/math&gt;
&lt;/formula&gt;
</pre>
<p>We give here the list of all symbols that have a translation of the form
<tt class="txt">&lt;mi&gt;&amp;alpha;&lt;/mi&gt;</tt>. They are of type Ord (ordinary symbol).
We start with the lower case Greek letters:
<samp>\alpha</samp><a id="uid1252"></a>, <samp>\beta</samp><a id="uid1253"></a>, <samp>\gamma</samp><a id="uid1254"></a>,
<samp>\delta</samp><a id="uid1255"></a>, <samp>\epsilon</samp><a id="uid1256"></a>, <samp>\varepsilon</samp><a id="uid1257"></a>, <samp>\zeta</samp><a id="uid1258"></a>,
<samp>\eta</samp><a id="uid1259"></a>, <samp>\theta</samp><a id="uid1260"></a>, <samp>\iota</samp><a id="uid1261"></a>, <samp>\kappa</samp><a id="uid1262"></a>,
<samp>\lambda</samp><a id="uid1263"></a>, <samp>\mu</samp><a id="uid1264"></a>, <samp>\nu</samp><a id="uid1265"></a>, <samp>\xi</samp><a id="uid1266"></a>, <samp>\pi</samp><a id="uid1267"></a>,
<samp>\rho</samp><a id="uid1268"></a>, <samp>\sigma</samp><a id="uid1269"></a>, <samp>\tau</samp><a id="uid1270"></a>, <samp>\upsilon</samp><a id="uid1271"></a>,
<samp>\phi</samp><a id="uid1272"></a>, <samp>\chi</samp><a id="uid1273"></a>, <samp>\psi</samp><a id="uid1274"></a>, <samp>\omega</samp><a id="uid1275"></a>,
<samp>\varpi</samp><a id="uid1276"></a>, <samp>\varrho</samp><a id="uid1277"></a>, <samp>\varsigma</samp><a id="uid1278"></a>, <samp>\varphi</samp><a id="uid1279"></a>,
<samp>\vartheta</samp><a id="uid1280"></a>, <samp>\varkappa</samp><a id="uid1281"></a>, then upper case Greek letters:
<samp>\Gamma</samp><a id="uid1282"></a>, <samp>\Delta</samp><a id="uid1283"></a>, <samp>\Theta</samp><a id="uid1284"></a>, <samp>\Lambda</samp><a id="uid1285"></a>,
<samp>\Xi</samp><a id="uid1286"></a>, <samp>\Sigma</samp><a id="uid1287"></a>, <samp>\Upsilon</samp><a id="uid1288"></a>, <samp>\Phi</samp><a id="uid1289"></a>,
<samp>\Pi</samp><a id="uid1290"></a>, <samp>\Psi</samp><a id="uid1291"></a>, <samp>\Omega</samp><a id="uid1292"></a>, then other symbols:
<samp>\hbar</samp><a id="uid1293"></a>, <samp>\ell</samp><a id="uid1294"></a>, <samp>\wp</samp><a id="uid1295"></a>, <samp>\Re</samp><a id="uid1296"></a>, <samp>\Im</samp><a id="uid1297"></a>,
<samp>\partial</samp><a id="uid1298"></a>, <samp>\infty</samp><a id="uid1299"></a>, <samp>\emptyset</samp><a id="uid1300"></a>, <samp>\nabla</samp><a id="uid1301"></a>,
<samp>\surd</samp><a id="uid1302"></a>, <samp>\top</samp><a id="uid1303"></a>, <samp>\bottom</samp><a id="uid1304"></a>, <samp>\bot</samp><a id="uid1305"></a>,
<samp>\angle</samp><a id="uid1306"></a>, <samp>\triangle</samp><a id="uid1307"></a>. Example</p>
<pre class="latex-code">$\alpha\Gamma \surd$
</pre>
<p class="nofirst noindent">This translates as</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
 &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
  &lt;mrow&gt;&lt;mi&gt;&amp;alpha;&lt;/mi&gt;&lt;mi&gt;&amp;Gamma;&lt;/mi&gt;&lt;mi&gt;&amp;radic;&lt;/mi&gt;
  &lt;/mrow&gt;&lt;/math&gt;&lt;/formula&gt;
</pre>
<p>Next comes the list of all symbols whose translation is like log. There are of
type Ord (ordinary symbol), though they should be Op (large operator).
The list is divided in two parts: these have movable limits:
<samp>\det</samp><a id="uid1308"></a>, <samp>\gcd</samp><a id="uid1309"></a>, <samp>\inf</samp><a id="uid1310"></a>, <samp>\injlim</samp><a id="uid1311"></a>,
<samp>\liminf</samp><a id="uid1312"></a>, <samp>\limsup</samp><a id="uid1313"></a>, <samp>\max</samp><a id="uid1314"></a>, <samp>\min</samp><a id="uid1315"></a>,
<samp>\sup</samp><a id="uid1316"></a>, <samp>\projlim</samp><a id="uid1317"></a>, and these have not:
<samp>\dim</samp><a id="uid1318"></a>, <samp>\exp</samp><a id="uid1319"></a>, <samp>\hom</samp><a id="uid1320"></a>, <samp>\ker</samp><a id="uid1321"></a>, <samp>\lg</samp><a id="uid1322"></a>,
<samp>\lim</samp><a id="uid1323"></a>, <samp>\ln</samp><a id="uid1324"></a>, <samp>\log</samp><a id="uid1325"></a>, <samp>\Pr</samp><a id="uid1326"></a>,
<samp>\arccos</samp><a id="uid1327"></a>, <samp>\arcsin</samp><a id="uid1328"></a>, <samp>\arctan</samp><a id="uid1329"></a>, <samp>\arg</samp><a id="uid1330"></a>,
<samp>\cos</samp><a id="uid1331"></a>, <samp>\cosh</samp><a id="uid1332"></a>, <samp>\cot</samp><a id="uid1333"></a>, <samp>\coth</samp><a id="uid1334"></a>,
<samp>\csc</samp><a id="uid1335"></a>, <samp>\deg</samp><a id="uid1336"></a>, <samp>\sec</samp><a id="uid1337"></a>, <samp>\sin</samp><a id="uid1338"></a>,
<samp>\@mod</samp><a id="uid1339"></a>, <samp>\sinh</samp><a id="uid1340"></a>, <samp>\tan</samp><a id="uid1341"></a>,
<samp>\tanh</samp><a id="uid1342"></a>. Example</p>
<pre class="latex-code">$\displaystyle\lim_a \liminf_a \sin_a \hom_a$
</pre>
<p class="nofirst noindent">The LaTeX translation is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mstyle xmlns:xlink="http://www.w3.org/1999/xlink" scriptlevel="0" displaystyle="true"><mrow><munder><mo movablelimits="true" form="prefix">lim</mo> <mi>a</mi> </munder><munder><mo movablelimits="true" form="prefix">lim inf</mo> <mi>a</mi> </munder><msub><mo form="prefix">sin</mo> <mi>a</mi> </msub><msub><mo form="prefix">hom</mo> <mi>a</mi> </msub></mrow></mstyle></math></span>, and
the <i>Tralics</i> version is</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
&lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
&lt;mstyle scriptlevel='0' displaystyle='true'&gt;
&lt;mrow&gt;
 &lt;msub&gt;&lt;mo movablelimits='true' form='prefix'&gt;lim&lt;/mo&gt; &lt;mi&gt;a&lt;/mi&gt; &lt;/msub&gt;
 &lt;msub&gt;&lt;mo movablelimits='true' form='prefix'&gt;lim inf&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/msub&gt;
 &lt;msub&gt;&lt;mo form='prefix'&gt;sin&lt;/mo&gt; &lt;mi&gt;a&lt;/mi&gt; &lt;/msub&gt;
 &lt;msub&gt;&lt;mo form='prefix'&gt;hom&lt;/mo&gt; &lt;mi&gt;a&lt;/mi&gt; &lt;/msub&gt;
&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/math&gt;&lt;/formula&gt;
</pre>
<p class="nofirst noindent">From now on, all symbols translate into the form <tt class="txt">&lt;mo&gt;...&lt;/mo&gt;</tt>. We start with symbols
of type Ord. In reality, most of them they should be of type Op (large
operator).
<samp>\mho</samp><a id="uid1343"></a>, <samp>\clubsuit</samp><a id="uid1344"></a>, <samp>\diamondsuit</samp><a id="uid1345"></a>,
<samp>\heartsuit</samp><a id="uid1346"></a>, <samp>\spadesuit</samp><a id="uid1347"></a>, <samp>\aleph</samp><a id="uid1348"></a>,
<samp>\backslash</samp><a id="uid1349"></a>, <samp>\Box</samp><a id="uid1350"></a>, <samp>\imath</samp><a id="uid1351"></a>, <samp>\jmath</samp><a id="uid1352"></a>,
<samp>\square</samp><a id="uid1353"></a>, <samp>\cong</samp><a id="uid1354"></a>, <samp>\lnot</samp><a id="uid1355"></a>, <samp>\neg</samp><a id="uid1356"></a>,
<samp>\forall</samp><a id="uid1357"></a>, <samp>\exists</samp><a id="uid1358"></a>, <samp>\coprod</samp><a id="uid1359"></a>, <samp>\bigvee</samp><a id="uid1360"></a>,
<samp>\bigwedge</samp><a id="uid1361"></a>, <samp>\biguplus</samp><a id="uid1362"></a>, <samp>\bigcap</samp><a id="uid1363"></a>,
<samp>\bigcup</samp><a id="uid1364"></a>, <samp>\int</samp><a id="uid1365"></a>, <samp>\sum</samp><a id="uid1366"></a>, <samp>\prod</samp><a id="uid1367"></a>,
<samp>\bigotimes</samp><a id="uid1368"></a>, <samp>\bigoplus</samp><a id="uid1369"></a>, <samp>\bigodot</samp><a id="uid1370"></a>,
<samp>\oint</samp><a id="uid1371"></a>, <samp>\bigsqcup</samp><a id="uid1372"></a>, <samp>\smallint</samp><a id="uid1373"></a>. Examples</p>
<pre class="latex-code">$\bigcap \int\oint$
</pre>
<p class="nofirst noindent">The translation is</p>
<pre class="xml-code">&lt;mrow&gt;&lt;mo&gt;&amp;bigcap;&lt;/mo&gt;&lt;mo&gt;&amp;int;&lt;/mo&gt;&lt;mo&gt;&amp;oint;&lt;/mo&gt;&lt;/mrow&gt;
</pre>
<p class="nofirst noindent">These are of type Bin (binary operator).
<samp>\triangleleft</samp><a id="uid1374"></a>, <samp>\triangleright</samp><a id="uid1375"></a>, <samp>\bigtriangleup</samp><a id="uid1376"></a>,
<samp>\bigtriangledown</samp><a id="uid1377"></a>, <samp>\wedge</samp><a id="uid1378"></a>, <samp>\land</samp><a id="uid1379"></a>, <samp>\vee</samp><a id="uid1380"></a>,
<samp>\lor</samp><a id="uid1381"></a>, <samp>\cap</samp><a id="uid1382"></a>, <samp>\cup</samp><a id="uid1383"></a>, <samp>\multimap</samp><a id="uid1384"></a>,
<samp>\dagger</samp><a id="uid1385"></a>, <samp>\ddagger</samp><a id="uid1386"></a>, <samp>\sqcap</samp><a id="uid1387"></a>, <samp>\sqcup</samp><a id="uid1388"></a>,
<samp>\amalg</samp><a id="uid1389"></a>, <samp>\diamond</samp><a id="uid1390"></a>, <samp>\Diamond</samp><a id="uid1391"></a>, <samp>\bullet</samp><a id="uid1392"></a>,
<samp>\wr</samp><a id="uid1393"></a>, <samp>\div</samp><a id="uid1394"></a>, <samp>\odot</samp><a id="uid1395"></a>, <samp>\oslash</samp><a id="uid1396"></a>,
<samp>\otimes</samp><a id="uid1397"></a>, <samp>\ominus</samp><a id="uid1398"></a>, <samp>\oplus</samp><a id="uid1399"></a>, <samp>\uplus</samp><a id="uid1400"></a>,
<samp>\mp</samp><a id="uid1401"></a>, <samp>\pm</samp><a id="uid1402"></a>, <samp>\circ</samp><a id="uid1403"></a>, <samp>\bigcirc</samp><a id="uid1404"></a>,
<samp>\setminus</samp><a id="uid1405"></a>, <samp>\cdot</samp><a id="uid1406"></a>, <samp>\ast</samp><a id="uid1407"></a>, <samp>\times</samp><a id="uid1408"></a>,
<samp>\star</samp><a id="uid1409"></a>, <samp>\in</samp><a id="uid1410"></a>. Example</p>
<pre class="latex-code">$\cap \cup \wr$
</pre>
<p class="nofirst noindent">The translation is</p>
<pre class="xml-code">&lt;formula type='inline'&gt;&lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
&lt;mrow&gt;&lt;mo&gt;&amp;cap;&lt;/mo&gt;&lt;mo&gt;&amp;cup;&lt;/mo&gt;&lt;mo&gt;&amp;wr;&lt;/mo&gt;&lt;/mrow&gt;&lt;/math&gt;&lt;/formula&gt;
</pre>
<p class="nofirst noindent">These are of type Rel (relation).
<samp>\propto</samp><a id="uid1411"></a>, <samp>\sqsubseteq</samp><a id="uid1412"></a>, <samp>\sqsupseteq</samp><a id="uid1413"></a>,
<samp>\sqsubset</samp><a id="uid1414"></a>, <samp>\sqsupset</samp><a id="uid1415"></a>, <samp>\parallel</samp><a id="uid1416"></a>, <samp>\mid</samp><a id="uid1417"></a>,
<samp>\dashv</samp><a id="uid1418"></a>, <samp>\vdash</samp><a id="uid1419"></a>, <samp>\Vdash</samp><a id="uid1420"></a>, <samp>\models</samp><a id="uid1421"></a>,
<samp>\nearrow</samp><a id="uid1422"></a>, <samp>\searrow</samp><a id="uid1423"></a>, <samp>\nwarrow</samp><a id="uid1424"></a>,
<samp>\swarrow</samp><a id="uid1425"></a>, <samp>\Leftrightarrow</samp><a id="uid1426"></a>, <samp>\Leftarrow</samp><a id="uid1427"></a>,
<samp>\Rightarrow</samp><a id="uid1428"></a>, <samp>\ne</samp><a id="uid1429"></a>, <samp>\neq</samp><a id="uid1430"></a>, <samp>\le</samp><a id="uid1431"></a>,
<samp>\leq</samp><a id="uid1432"></a>, <samp>\ge</samp><a id="uid1433"></a>, <samp>\geq</samp><a id="uid1434"></a>, <samp>\succ</samp><a id="uid1435"></a>,
<samp>\approx</samp><a id="uid1436"></a>, <samp>\succeq</samp><a id="uid1437"></a>, <samp>\preceq</samp><a id="uid1438"></a>, <samp>\prec</samp><a id="uid1439"></a>,
<samp>\doteq</samp><a id="uid1440"></a>, <samp>\supset</samp><a id="uid1441"></a>, <samp>\subset</samp><a id="uid1442"></a>, <samp>\supseteq</samp><a id="uid1443"></a>,
<samp>\subseteq</samp><a id="uid1444"></a>, <samp>\bindnasrepma</samp><a id="uid1445"></a>, <samp>\ni</samp><a id="uid1446"></a>,
<samp>\gg</samp><a id="uid1447"></a>, <samp>\ll</samp><a id="uid1448"></a>, <samp>\gtrless</samp><a id="uid1449"></a>, <samp>\geqslant</samp><a id="uid1450"></a>,
<samp>\leqslant</samp><a id="uid1451"></a>, <samp>\not</samp><a id="uid1452"></a>, <samp>\notin</samp><a id="uid1453"></a>,
<samp>\leftrightarrow</samp><a id="uid1454"></a>, <samp>\leftarrow</samp><a id="uid1455"></a>, <samp>\owns</samp><a id="uid1456"></a>, <samp>\gets</samp><a id="uid1457"></a>,
<samp>\rightarrow</samp><a id="uid1458"></a>, <samp>\to</samp><a id="uid1459"></a>, <samp>\mapsto</samp><a id="uid1460"></a>, <samp>\sim</samp><a id="uid1461"></a>,
<samp>\simeq</samp><a id="uid1462"></a>, <samp>\perp</samp><a id="uid1463"></a>, <samp>\equiv</samp><a id="uid1464"></a>, <samp>\asymp</samp><a id="uid1465"></a>,
<samp>\smile</samp><a id="uid1466"></a>, <samp>\iff</samp><a id="uid1467"></a>, <samp>\leftharpoonup</samp><a id="uid1468"></a>,
<samp>\leftharpoondown</samp><a id="uid1469"></a>, <samp>\rightharpoonup</samp><a id="uid1470"></a>,
<samp>\rightharpoondown</samp><a id="uid1471"></a>, <samp>\hookrightarrow</samp><a id="uid1472"></a>,
<samp>\hookleftarrow</samp><a id="uid1473"></a>,
<samp>\Longrightarrow</samp><a id="uid1474"></a>, <samp>\longrightarrow</samp><a id="uid1475"></a>,
<samp>\longleftarrow</samp><a id="uid1476"></a>,
<samp>\Join</samp><a id="uid1477"></a>,
<samp>\longmapsto</samp><a id="uid1478"></a>,
<samp>\frown</samp><a id="uid1479"></a>, <samp>\bowtie</samp><a id="uid1480"></a>,
<samp>\Longleftarrow</samp><a id="uid1481"></a>,</p>
<samp>\longleftrightarrow</samp><a id="uid1482"></a><p>, <samp>\Longleftrightarrow</samp><a id="uid1483"></a>.
Example.</p>
<pre class="latex-code">$\approx\leftrightarrow\Longleftrightarrow$
</pre>
<p class="nofirst noindent">Translation:</p>
<pre class="xml-code">&lt;formula type='inline'&gt;&lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
&lt;mrow&gt;&lt;mo&gt;&amp;approx;&lt;/mo&gt;&lt;mo&gt;&amp;leftrightarrow;&lt;/mo&gt;
&lt;mo&gt;&amp;Longleftrightarrow;&lt;/mo&gt;&lt;/mrow&gt;&lt;/math&gt;&lt;/formula&gt;
</pre>
<p>These are of type Inner: <samp>\cdots</samp><a id="uid1484"></a>, <samp>\hdots</samp><a id="uid1485"></a>, <samp>\vdots</samp><a id="uid1486"></a>,
<samp>\ddots</samp><a id="uid1487"></a>. These are of type Between (they are of type Ord in TeX, but
are used as opening or closing delimiters): <samp>\Vert</samp><a id="uid1488"></a>,
<samp>\|</samp><a id="uid1489"></a>, <samp>\vert</samp><a id="uid1490"></a>, <samp>\uparrow</samp><a id="uid1491"></a>, <samp>\downarrow</samp><a id="uid1492"></a>,
<samp>\Uparrow</samp><a id="uid1493"></a>, <samp>\Downarrow</samp><a id="uid1494"></a>, <samp>\Updownarrow</samp><a id="uid1495"></a>,
<samp>\updownarrow</samp><a id="uid1496"></a>. These are of type Open and Close:
<samp>\rangle</samp><a id="uid1497"></a>, <samp>\langle</samp><a id="uid1498"></a>, <samp>\rmoustache</samp><a id="uid1499"></a>,
<samp>\lmoustache</samp><a id="uid1500"></a>, <samp>\rgroup</samp><a id="uid1501"></a>, <samp>\lgroup</samp><a id="uid1502"></a>,
<samp>\rbrace</samp><a id="uid1503"></a>, <samp>\lbrace</samp><a id="uid1504"></a>, <samp>\lceil</samp><a id="uid1505"></a>, <samp>\rceil</samp><a id="uid1506"></a>,
<samp>\lfloor</samp><a id="uid1507"></a>, <samp>\rfloor</samp><a id="uid1508"></a>.</p>
<p>The following characters are classified as `small´:
<samp>&lt;&gt;,.:;*?!x</samp>, these are
classified as `small-l´ and `small-r´: <samp>()[]</samp>, the vertical bar is small-l,
these are bin: <samp>+/</samp> and the equals sign is of type Rel. Note: what you see
here as x is in reality the character 215. It cannot be printed in verbatim
mode by LaTeX.</p>
<pre class="latex-code">$&lt;&gt;,.:;*?!x ()[]|+-/=$
</pre>
<p class="nofirst noindent">Translation:</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
 &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
   &lt;mrow&gt;&lt;mo&gt;&amp;lt;&lt;/mo&gt;&lt;mo&gt;&amp;gt;&lt;/mo&gt;&lt;mo&gt;,&lt;/mo&gt;&lt;mo&gt;.&lt;/mo&gt;&lt;mo&gt;:&lt;/mo&gt;
      &lt;mo&gt;;&lt;/mo&gt;&lt;mo&gt;*&lt;/mo&gt;&lt;mo&gt;?&lt;/mo&gt;&lt;mo&gt;!&lt;/mo&gt;&lt;mi&gt;&amp;times;&lt;/mi&gt;&lt;mo&gt;(&lt;/mo&gt;
      &lt;mo&gt;)&lt;/mo&gt;&lt;mo&gt;[&lt;/mo&gt;&lt;mo&gt;]&lt;/mo&gt;&lt;mo&gt;|&lt;/mo&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mo&gt;-&lt;/mo&gt;
      &lt;mo&gt;/&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;
   &lt;/mrow&gt;&lt;/math&gt;&lt;/formula&gt;
</pre>
<p>The following commands are used for accents: <samp>\acute</samp><a id="uid1509"></a>,
<samp>\grave</samp><a id="uid1510"></a>, <samp>\mathring</samp><a id="uid1511"></a>, <samp>\ddddot</samp><a id="uid1512"></a>, <samp>\dddot</samp><a id="uid1513"></a>,
<samp>\ddot</samp><a id="uid1514"></a>, <samp>\tilde</samp><a id="uid1515"></a>, <samp>\widetilde</samp><a id="uid1516"></a>, <samp>\bar</samp><a id="uid1517"></a>,
<samp>\breve</samp><a id="uid1518"></a>, <samp>\check</samp><a id="uid1519"></a>, <samp>\hat</samp><a id="uid1520"></a>, <samp>\widehat</samp><a id="uid1521"></a>,
<samp>\vec</samp><a id="uid1522"></a>, <samp>\overrightarrow</samp><a id="uid1523"></a>, <samp>\overleftarrow</samp><a id="uid1524"></a>,
<samp>\underrightarrow</samp><a id="uid1525"></a>, <samp>\underleftarrow</samp><a id="uid1526"></a>, <samp>\dot</samp><a id="uid1527"></a>.</p>
<p>The following commands are special. They will be explained later:
<samp>\overline</samp><a id="uid1528"></a>, <samp>\underline</samp><a id="uid1529"></a>, <samp>\stackrel</samp><a id="uid1530"></a>,
<samp>\underset</samp><a id="uid1531"></a>, <samp>\overset</samp><a id="uid1532"></a>, <samp>\mathchoice</samp><a id="uid1533"></a>,
<samp>\frac</samp><a id="uid1534"></a>, <samp>\overbrace</samp><a id="uid1535"></a>, <samp>\underbrace</samp><a id="uid1536"></a>,
<samp>\genfrac</samp><a id="uid1537"></a>,
<samp>\dfrac</samp><a id="uid1538"></a>, <samp>\tfrac</samp><a id="uid1539"></a>, <samp>\sqrt</samp><a id="uid1540"></a>, <samp>\root</samp><a id="uid1541"></a>.</p>

<h2 id="uid1542">3.3. Parsing a math formula</h2>
<p>This is a non-trivial operation, for this reason in verbose mode, the math
expression will be printed on the transcript file. For instance, given</p>
<pre class="latex-code">\tracingall
$\begin{cases} x &amp;y\\a&amp;b \end{cases} \mkern18mu x^{ {2 }}!$
</pre>
<p class="nofirst noindent">whose translation in no-mathml mode is</p>
<pre class="xml-code">&lt;texmath type='inline'&gt;
 {\left\rbrace \begin{array}{ll} x &amp;amp;y\\a&amp;amp;b \end{array}\right.}
 \hspace{10.0pt}x^{ {2 }}!
&lt;/texmath&gt;
</pre>
<p class="nofirst noindent">the transcript file will contain</p>
<pre class="log-code"><span class="prenumber">1</span> {math shift character $}
<span class="prenumber">2</span> +stack: level + 2 for math entered on line 2
<span class="prenumber">3</span> +stack: level + 3 for math entered on line 2
<span class="prenumber">4</span> \cases -&gt;\left \{\begin {array}{ll}
<span class="prenumber">5</span> +stack: level + 4 for math entered on line 2
<span class="prenumber">6</span> +stack: level + 5 for cell entered on line 2
<span class="prenumber">7</span> +stack: level + 6 for math entered on line 2
<span class="prenumber">8</span> +stack: level - 6 for math from line 2
<span class="prenumber">9</span> +stack: level - 5 for cell from line 2
<span class="prenumber">10</span> +stack: level + 5 for cell entered on line 2
<span class="prenumber">11</span> +stack: level - 5 for cell from line 2
<span class="prenumber">12</span> +stack: level + 5 for cell entered on line 2
<span class="prenumber">13</span> +stack: level - 5 for cell from line 2
<span class="prenumber">14</span> +stack: level + 5 for cell entered on line 2
<span class="prenumber">15</span> \endcases -&gt;\end {array}\right .
<span class="prenumber">16</span> +stack: level - 5 for cell from line 2
<span class="prenumber">17</span> +stack: level - 4 for math from line 2
<span class="prenumber">18</span> +stack: level - 3 for math from line 2
<span class="prenumber">19</span> +scanint for \mkern-&gt;18
<span class="prenumber">20</span> +scandimen for \mkern-&gt;18.0mu
<span class="prenumber">21</span> +stack: level + 3 for math entered on line 2
<span class="prenumber">22</span> +stack: level - 3 for math from line 2
<span class="prenumber">23</span> +stack: level + 3 for math entered on line 2
<span class="prenumber">24</span> +stack: level + 4 for math entered on line 2
<span class="prenumber">25</span> +stack: level - 4 for math from line 2
<span class="prenumber">26</span> +stack: level - 3 for math from line 2
<span class="prenumber">27</span> +stack: level - 2 for math from line 2
<span class="prenumber">28</span> Math: $\begin {cases}{\left\{\begin {array}{ll} x &amp;y\\a&amp;b\end{cases}
<span class="prenumber">29</span> \end {array}\right.} \mkern\hspace{10.0pt}x^{ {2 }}!$
<span class="prenumber">30</span> +scanint for \hspace-&gt;10
<span class="prenumber">31</span> +scandimen for \hspace-&gt;10.0pt
<span class="prenumber">32</span> {scanglue 10.0pt\relax }
<span class="prenumber">33</span> Realloc xml math table to 20
<span class="prenumber">34</span> {Push p 1}
</pre>
<p class="nofirst noindent">We shall explain for each line in the transcript file where it comes from.
Math mode scanning is entered when the translator sees a math shift character
(line 1). The scanner reads some tokens and puts them in a list. The list is
printed at the end (lines 28-29). The start of
the formula is a bit special, in that the token that follows the first dollar
sign is considered unexpanded when we check for a double dollar sign. A new
group is entered, before scanning the whole formula (line 2).</p>
<p>The loop is as follows:</p>
<ul>
<li id="uid1543"><p class="nofirst noindent">A token is read and expanded. Lines 4 and 15 show expansion of user
commands. An error is signaled in the case of end of data.</p>
</li>
<li id="uid1544"><p class="nofirst noindent">In the case of <samp>\nobreakspace</samp><a id="uid1545"></a>, we insert a
<samp>~</samp>.</p>
</li>
<li id="uid1546"><p class="nofirst noindent">If we get a font command, we proceed as follows.
First <samp>\cal</samp><a id="uid1547"></a> is transformed into
<samp>\mathcal</samp>. The font can be
<samp>\mathtt</samp><a id="uid1548"></a>, <samp>\mathcal</samp><a id="uid1549"></a>, <samp>\mathbf</samp><a id="uid1550"></a>,
<samp>\mathrm</samp><a id="uid1551"></a>, <samp>\mathit</samp><a id="uid1552"></a>, <samp>\mathbb</samp><a id="uid1553"></a>, <samp>\mathsf</samp><a id="uid1554"></a>.
These are basic math fonts; they have an inner variant, of the form
<samp>\@mathtt</samp>. There is also
<samp>\mathnormal</samp><a id="uid1555"></a>. The command <samp>\mathfrak</samp><a id="uid1556"></a> selects a Fraktur variant.
We allow old fonts (like <samp>\rm</samp><a id="uid1557"></a>,
<samp>\sf</samp><a id="uid1558"></a>, <samp>\tt</samp><a id="uid1559"></a>, <samp>\bf</samp><a id="uid1560"></a>, <samp>\it</samp><a id="uid1561"></a>,
<samp>\sl</samp><a id="uid1562"></a>), fonts switches of the form <samp>\rmfamily</samp>, or font
commands that take an argument like <samp>\textrm</samp>. These fonts have an inner
variant, say <span class="math"><i>T</i></span>. If the font takes no argument, then the token <span class="math"><i>T</i></span> is
inserted (as explained for <samp>\cal</samp> above).
Otherwise, let <span class="math"><i>S</i></span> be the current math font. In this case, an
argument is read, then <span class="math"><i>S</i></span>, <span class="math"><i>T</i></span> and this argument is pushed back, to be read
again. For instance, if the current font is `sf´, then <samp>\mathrm</samp><samp>{foo}</samp>
produces <samp>\@mathrm foo\@mathsf</samp>: these are five tokens to be read again.
Note: <samp>\mathbbm</samp><a id="uid1563"></a> is an alias for <samp>\mathbb</samp>.
The name of the internal font has changed since the first edition, it has the
form mml@font@xxx, where the suffix is one of normal, upright, bold, italic,
bolditalic, script, boldscript, fraktur, doublestruck, boldfraktur, sansserif,
boldsansserif, sansserifitalic, sansserifbolditalic, and monospace. Details
can be found in the second part of this report.</p>
</li>
<li id="uid1564"><p class="nofirst noindent">In all other cases the current token is added to the list. In
particular, this explains while the trace starts with a dollar and
<samp>\begin</samp>.</p>
</li>
<li id="uid1565"><p class="nofirst noindent">If the token is an open brace, in fact any character of category code 1,
a new math group is read. You can see on
lines 23 and 24 that the stack level increases (a new semantic level is
entered, all assignments are local).</p>
</li>
<li id="uid1566"><p class="nofirst noindent">If the token is a close brace, in fact any character of category code
2, this terminates the current math group
(see lines 25 and 26). An error is signaled in case the current group
should be closed differently (for instance with <samp>\end</samp>, or <samp>\right</samp>,
etc.)</p>
</li>
<li id="uid1567"><p class="nofirst noindent">If the token is a dollar sign, in fact any character of category code
3, then four alternatives can be
chosen. This dollar sign can be the end of the math formula. If we are in
display math, a token is read with expansion. An error is signaled
<i>Display math should end with $$</i> if this
is not a dollar sign (in fact, a character of category code 3). If the
current group is defined by <samp>\hbox</samp>, this can be the start of a math
formula (never display math). The token in <samp>\everymath</samp> are inserted,
then a math formula is read. Otherwise, an error is signaled
<i>Extra $ ignored...</i>, parsing continues.</p>
</li>
<li id="uid1568"><p class="nofirst noindent">In the case of <samp>\label</samp><a id="uid1569"></a>, an argument is read. If we are not in
display math, or if the formula already has a label, you get an error:
<i>Some labels may be lost</i>. Wherever the location of the label, an
attribute will be added to the <tt class="txt">&lt;formula&gt;</tt> element that contains the
<tt class="txt">&lt;math&gt;</tt> element.</p>
</li>
<li id="uid1570"><p class="nofirst noindent">In the case of <samp>\ensuremath</samp><a id="uid1571"></a>, a token list is read, and pushed
back, so that this command acts as <samp>\@firstofone</samp>.</p>
</li>
<li id="uid1572"><p class="nofirst noindent">The case <samp>\begin</samp> or <samp>\end</samp> is considered next. We make the
assumption that this is a user defined environment, or a math
environment. In the case of the example, we have a user environment that
expands to a math environment. For a user defined environment, the following
is executed:</p>
<pre class="latex-code">  {\cases .... \endcases}
</pre>
<p class="nofirst noindent">In the trace, lines 28-29, you will see both <samp>\begin{cases}</samp> and the result of
the expansion of <samp>\cases</samp>, but not <samp>\cases</samp> or the brace. However,
you can see on lines 4 and 15 the expansion of the user defined commands,
and on lines 3 and 18 the braces; these braces can also be seen in the
translation in no-mathml mode.
You can see on lines 6 and 16 that a
group (named `cell´) is opened and closed, because the builtin math
environment starts a cell. This allows <samp>&amp;</samp> or <samp>\\</samp> tokens.
The group defined on lines 7-8 does not exists in TeX.
Let´s hope for the best: the argument of the array should contain only
letters. Whether these characters should be expanded is unclear.</p>
</li>
<li id="uid1573"><p class="nofirst noindent">In the case <samp>\left</samp><a id="uid1574"></a> and <samp>\right</samp><a id="uid1575"></a>, a delimiter is
read. The rules are: <samp>\relax</samp><a id="uid1576"></a> and space tokens are ignored. After
full expansion, the result should be one of the tokens listed above as valid
delimiters,
otherwise an error of the form <i>Invalid character in \left or \right</i> can be signaled. These commands come in pairs; you might get errors like
<i>Missing \right. inserted</i>, or <i>Unexpected \right</i>.
These commands define a group, see lines 5 and 17.</p>
</li>
<li id="uid1577"><p class="nofirst noindent">Case <samp>&amp;</samp> and <samp>\\</samp>. These are valid only inside a cell group. They
terminate a cell group and start a new one. See lines 9 to 14.</p>
</li>
<li id="uid1578"><p class="nofirst noindent">The <samp>\of</samp><a id="uid1579"></a> token is ignored.</p>
</li>
<li id="uid1580"><p class="nofirst noindent">The <samp>\mathchoice</samp><a id="uid1581"></a> command reads 4 arguments, which are
remembered.</p>
</li>
<li id="uid1582"><p class="nofirst noindent">Case of <samp>\frac</samp><a id="uid1583"></a>, etc.
These commands read their arguments. The main
token list will contain a special slot, with the name of the command and the
arguments. In the case of <samp>\sqrt</samp>, the first argument is optional. You say
<samp>\root A \of B</samp>.</p>
</li>
<li id="uid1584"><p class="nofirst noindent">The syntax of <samp>\genfrac</samp><a id="uid1585"></a> is special. It takes six arguments. The
equivalent of the following commands is executed when <i>Tralics</i> bootstraps:<a id="uid1586"></a></p>
<pre class="latex-code">  \def\binom{\genfrac()\z@{}}
  \def\dbinom{\genfrac(){0pt}0}
  \def\tbinom{\genfrac(){0pt}1}
</pre>
<p class="nofirst noindent">This defines three commands that take two arguments with regular syntax. The
first two arguments of <samp>\genfrac</samp> are delimiters or empty. The next one is
a dimension or empty. If empty, a default dimension will be used. In the
example, the first argument is an opening parenthesis, the second is a closing
parenthesis, the third is zero. The next argument is empty or a number between
0 and 3. These numbers correspond to a style:
<samp>\displaystyle</samp><a id="uid1587"></a>, <samp>\textstyle</samp><a id="uid1588"></a>, <samp>\scriptstyle</samp><a id="uid1589"></a>, and
<samp>\scriptscriptstyle</samp><a id="uid1590"></a> respectively. Currently an explicit number is
required; everything else is treated as an empty list. On the other hand, the
dimension is scanned via the scandimen routine (the procedure that prints
lines of the form 19-20).</p>
</li>
<li id="uid1591"><p class="nofirst noindent"><samp>\hbox</samp><a id="uid1592"></a> and friends. Currently, only <samp>\hbox</samp> is
implemented. The current value of <samp>\everyhbox</samp> token list is inserted,
and the argument is read. There are restrictions, see later.</p>
</li>
<li id="uid1593"><p class="nofirst noindent">Case of <samp>\mbox</samp><a id="uid1594"></a>, <samp>\text</samp><a id="uid1595"></a>, <samp>\makebox</samp><a id="uid1596"></a>. Like
<samp>\hbox</samp>, but no <samp>\everyXXX</samp> token list is inserted. Example</p>
<pre class="xml-code">\everyhbox{A}
\everymath{B}
\everydisplay{C}
\[a=\hbox{bc d $ef g$}h i\text{OK}\]
</pre>
<p class="nofirst noindent">Translation, in no-mathml mode.</p>
<pre class="xml-code">&lt;texmath type='display'&gt;Ca=\text{Abc} \text{d} Bef gh i\text{OK}&lt;/texmath&gt;
</pre>

</li>
<li id="uid1597"><p class="nofirst noindent">Case of a math font, for instance <samp>\@mathcal</samp>. The font command is
inserted in the token list, but the variable holding the current font is
(locally) updated.</p>
</li>
<li id="uid1598"><p class="nofirst noindent">Case of a math command (like <samp>\alpha</samp> listed as above). The command
is read. There is a special hack: <samp>\not</samp><samp>\in</samp> is converted to
<samp>\notin</samp>, and <samp>\not=</samp> to <samp>\ne</samp>.</p>
</li>
<li id="uid1599"><p class="nofirst noindent">Case of <samp>\hspace</samp><a id="uid1600"></a>, <samp>\vspace</samp><a id="uid1601"></a>. An argument, preceded by
an optional space, is read. In the case of <samp>\hspace</samp>, a space is added,
otherwise the command is ignored.</p>
</li>
<li id="uid1602"><p class="nofirst noindent"><samp>\kern</samp><a id="uid1603"></a>, <samp>\mskip</samp><a id="uid1604"></a>, <samp>\mkern</samp><a id="uid1605"></a>, <samp>\hskip</samp><a id="uid1606"></a>,
<samp>\vskip</samp><a id="uid1607"></a>. See the example: on
line 19 and 20, there is the trace of the routines that read the
argument. The result is converted into a <samp>\hspace</samp>, with argument
delimited by braces. Look at the trace, line 29. This will be read again
later, see lines 30 to 32. In the case of <samp>\vskip</samp>, we should convert to
<samp>\vspace</samp>, and re-insert, but the argument is ignored. In the case of
<samp>\mkern</samp>, the result is converted into pt units, using the rule
18mu=10pt; in the case of <samp>\mskip</samp>, the stretch and shrink parts of the
glue are discarded.</p>
</li>
<li id="uid1608"><p class="nofirst noindent">An apostrophe is handled in a special way, as explained in the TeX book. Essentially <samp>x´</samp> is <samp>x^{\prime}</samp> and
<samp>x´^2</samp> is <samp>x^{\prime2}</samp>.</p>
</li>
<li id="uid1609"><p class="nofirst noindent">Mode independent commands are interpreted as usual (this includes
undefined commands). This should not typeset anything.</p>
</li>
<li id="uid1610"><p class="nofirst noindent">A character is remembered, together with the current font.</p>
</li>
<li id="uid1611"><p class="nofirst noindent">Mode-independent tokens are evaluated. These are commands like <samp>\def</samp>
that change the environment, and have empty transation. For instance,
<samp>\relax</samp> commands are handled here.</p>
</li>
<li id="uid1612"><p class="nofirst noindent">Everything else is inserted without evaluation.</p>
</li></ul>
<p>We give here an example with some fonts.</p>
<pre class="latex-code">$\mathtt{Ab}\mathcal{Cd}\mathbf{Ef}\mathrm{Gh}\mathit{Ij}
\mathbb{Kl}\mathsf{Mn}$
</pre>
<p class="nofirst noindent">The translation is as follows. You can notice that some variants affect only
uppercase letters.</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
 &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
  &lt;mrow&gt;
   &lt;mi mathvariant='monospace'&gt;A&lt;/mi&gt;
   &lt;mi mathvariant='monospace'&gt;b&lt;/mi&gt;
   &lt;mi&gt;&amp;Cscr;&lt;/mi&gt;
   &lt;mi&gt;d&lt;/mi&gt;
   &lt;mi mathvariant='bold'&gt;E&lt;/mi&gt;
   &lt;mi mathvariant='bold'&gt;f&lt;/mi&gt;
   &lt;mi&gt; G &lt;/mi&gt;
   &lt;mi&gt; h &lt;/mi&gt;
   &lt;mi&gt;I&lt;/mi&gt;
   &lt;mi&gt;j&lt;/mi&gt;
   &lt;mi&gt;&amp;Kopf;&lt;/mi&gt;
   &lt;mi&gt;l&lt;/mi&gt;
   &lt;mi mathvariant='sans-serif'&gt;M&lt;/mi&gt;
   &lt;mi mathvariant='sans-serif'&gt;n&lt;/mi&gt;
  &lt;/mrow&gt;
 &lt;/math&gt;
&lt;/formula&gt;
</pre>

<h2 id="uid1613">3.4. Translation of arrays</h2>
<p>Whenever we see an array (this can be a global environment like
<samp>eqnarray</samp> or a local one, like <samp>array</samp>), we translate all cells one after the other. The
character <samp>&amp;</samp> is the cell separator. The command <samp>\\</samp> is the row
separator. In the case where an array ends with a <samp>\\</samp>, this gives an empty
row: it will be removed. Each cell has an alignment, left, right, or
center. An attribute is added only if this is not center. The <samp>array</samp>
environment has an argument that explains the type of the columns (columns not
indicated are centered). The default alignment is `rl´ for <samp>split</samp> and
<samp>align</samp>, `rcl´ for <samp>eqnarray</samp>, centered for <samp>matrix</samp>. You can use
<samp>\multicolumn</samp><a id="uid1614"></a>. This command takes three arguments: the span which
should be some integer, then the alignment (one of r, l or c) and the content
of the cell. The program may signal errors in case of wrong syntax. Here is an
example:</p>
<pre class="latex-code">$\begin{array}{rcl}
a&amp;b&amp;c&amp;d\\
A&amp;\multicolumn{1}{r}{B}&amp;C&amp;D\\
\end{array}$
</pre>
<p class="nofirst noindent">This is the translation of the array.</p>
<pre class="xml-code">&lt;mtable&gt;
 &lt;mtr&gt;
  &lt;mtd columnalign='right'&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/mtd&gt;
  &lt;mtd&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mtd&gt;
  &lt;mtd columnalign='left'&gt;&lt;mi&gt;c&lt;/mi&gt;&lt;/mtd&gt;
  &lt;mtd&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;/mtd&gt;
 &lt;/mtr&gt;
 &lt;mtr&gt;
  &lt;mtd columnalign='right'&gt;&lt;mi&gt;A&lt;/mi&gt;&lt;/mtd&gt;
  &lt;mtd columnalign='right' columnspan='1'&gt;&lt;mi&gt;B&lt;/mi&gt;&lt;/mtd&gt;
  &lt;mtd columnalign='left'&gt;&lt;mi&gt;C&lt;/mi&gt;&lt;/mtd&gt;
  &lt;mtd&gt;&lt;mi&gt;D&lt;/mi&gt;&lt;/mtd&gt;
 &lt;/mtr&gt;
&lt;/mtable&gt;
</pre>

<h2 id="uid1615">3.5. Trivial math</h2>
<p>If you say `<samp>$x$</samp> <samp>and</samp> <samp>$123$</samp>´, the translation will be</p>
<pre class="xml-code">&lt;p&gt;&lt;formula type='inline'&gt;&lt;simplemath&gt;x&lt;/simplemath&gt;&lt;/formula&gt; and 123&lt;/p&gt;
</pre>
<p class="nofirst noindent">Initially, we found this a good idea; because this can easily be converted in
<span class="sansserif">HTML</span> into <samp>&lt;i&gt;x&lt;/i&gt;</samp>. Moreover `<samp>$2^{i\grave eme}$</samp>´
gives</p>
<pre class="xml-code">&lt;temporary&gt;2&lt;hi rend='sup'&gt;e&lt;/hi&gt;&lt;/temporary&gt;
</pre>
<p class="nofirst noindent">Here the <tt class="txt">&lt;temporary&gt;</tt> element will not show in the <span class="sansserif">XML</span> tree, but is
printed on the terminal if <i>Tralics</i> is called with the `interactivemath´
switch. If you invoke <i>Tralics</i> with the `-notrivialmath´ switch,
these hacks are not tried, and the formula translates into:</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
  &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
   &lt;msup&gt;
    &lt;mn&gt;2&lt;/mn&gt;
    &lt;mrow&gt;
     &lt;mi&gt;i&lt;/mi&gt;
     &lt;mover accent='true'&gt;&lt;mi&gt;e&lt;/mi&gt; &lt;mo&gt;&amp;grave;&lt;/mo&gt;&lt;/mover&gt;
     &lt;mi&gt;m&lt;/mi&gt;
     &lt;mi&gt;e&lt;/mi&gt;
    &lt;/mrow&gt;
   &lt;/msup&gt;
  &lt;/math&gt;
&lt;/formula&gt;
</pre>
<p class="nofirst noindent">There are three hacks: the first is when the formula contains only a letter,
the second is when the formula contains only digits, and the last one is when
people use a math formula instead of <samp>\textsuperscript</samp>. This hack is
applied only if the math formula starts with digits (no digit at all is OK;
braces are ignored) followed by a exponent marker, followed by a special
exponent; this has to be a single token or a token list. In the case of a
single token, the hack is applied only if this is <samp>e</samp> or <samp>o</samp>.
Typically, it
applies in cases like 2<sup>e</sup> and N<sup>o</sup>. In the
case of more than one token, it applies when the exponent is `<samp>th</samp>´,
`<samp>st</samp>´, `<samp>rd</samp>´ and `<samp>nd</samp>´, for cases like
1<sup>st</sup>, 2<sup>nd</sup>,
3<sup>rd</sup>, and 4<sup>th</sup>. There are four rules for
French: `<samp>e</samp>´, `<samp>eme</samp>´, `<samp>ieme</samp>´, `<samp>ème</samp>´ and
`<samp>ième</samp>´ convert to `<samp>e</samp>´,
`<samp>ier</samp>´ and `<samp>er</samp>´ convert to `<samp>er</samp>´, `<samp>iemes</samp>´,
`<samp>ièmes</samp>´ and `<samp>es</samp>´ convert to `<samp>es</samp>´,
`<samp>ère</samp>´ and `<samp>re</samp>´ convert to `<samp>re</samp>´.
The accented letter can be given as <samp>è</samp>, or
<samp>\`e</samp> or <samp>\`{e}</samp> or <samp>\grave{e}</samp> or
<samp>\grave e</samp>. The hack is applied in a case
like:</p>
<pre class="latex-code">$2 ^{\text{\small\rm \grave ere}} $
</pre>
<p class="nofirst noindent">Instead of <samp>\text</samp>, <samp>\hbox</samp> can be used. Instead of <samp>\small</samp> or
<samp>\rm</samp> any font change or font size command can be used. Up to two commands
can be given. The original Perl version had 30 exceptions, including
<samp>$\Sigma{}^{{\rm it}}$</samp> and
<samp>\ddot{\rm o}</samp>. Compare
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>&#931;</mi><msup><mrow></mrow> <mi> it </mi> </msup></mrow></math></span> with &#931;<sup>it</sup> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mover xmlns:xlink="http://www.w3.org/1999/xlink" accent="true"><mi mathvariant="normal">o</mi> <mo>¨</mo></mover></math></span>
with ö.</p>
<p>Since version 2.8, there is an integer register
named <samp>\notrivialmath</samp>, that controls these hacks; it contains initially 1,
it is set to
zero if <i>Tralics</i> is called with the -notrivialmath switch, to seven if
<i>Tralics</i> is called with the -trivialmath math switch (and to 349 if
<i>Tralics</i> is called with <tt>-trivialmath=349</tt>).
If the value is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>A</mi><mo>+</mo><mn>2</mn><mi>B</mi><mo>+</mo><mn>4</mn><mi>C</mi></mrow></math></span> modulo 8,
where A, B, and C are zero (false) or one (true), then the behavior is the
following (by default A is true, other flags are false).</p>
<ul>
<li id="uid1616"><p class="nofirst noindent">If A is true, in the case where the math formula contains optional
digits followed by a special exponent, the rule explained above is applied;
the special exponent can be one of th, rd, nd, st (for English), or those
shown above for French.</p>
</li>
<li id="uid1617"><p class="nofirst noindent">If B is true, some math formulas containing a single token produce a
non-math result. We have shown above the translation of a digit or a letter.
The translation of a minus sign is a en-dash (so that <samp>$-$</samp> is the same
as <samp>-</samp><samp>-</samp>). Other characters are not considered trivial math.
Most commands, whose translation is a single MathML element, including Greek
letters, are converted into their content. Thus, the translation of
<samp>$\alpha$</samp> is <tt class="txt">&amp;alpha;</tt> rather than some long formula.</p>
</li>
<li id="uid1618"><p class="nofirst noindent">If C is true, in the case where the formula starts with a hat or
underscore, followed by a character, or a simple token list, and nothing
more, then the result is a superscript, or subscript, out of math mode.
It is as if you had used <samp>\textsuperscript</samp><a id="uid1619"></a> or
<samp>\textsubscript</samp><a id="uid1620"></a>.
A simple list is a list of characters, with an optional font change at the
beginning. This rule has precedence over the first. Said otherwise,
<samp>$X^{eme}$</samp> is translated as X<sup>eme</sup>. Example</p>
</li></ul>
<pre class="latex-code">$1^e$, $3^{eme}$ X$^{eme}$ $4^{i\grave{e}me}$
$1^{st}$ $2^{nd}$ $3^{rd}$  $4^{th}$
$x$ $1$ $\alpha$ $\pm$ $\longleftrightarrow$ $-$
$_{foo}$ $^{2+3}$  $_{\bf Foo}$
$+$ $x^{eme}$ $\log$ $_{F\bf oo}$
</pre>
<p>Translation (with MathML namespace removed), all hacks enabled:</p>
<pre class="xml-code">&lt;p&gt;1&lt;hi rend='sup'&gt;e&lt;/hi&gt;, 3&lt;hi rend='sup'&gt;e&lt;/hi&gt;
    X&lt;hi rend='sup'&gt;eme&lt;/hi&gt; 4&lt;hi rend='sup'&gt;e&lt;/hi&gt;
1&lt;hi rend='sup'&gt;st&lt;/hi&gt; 2&lt;hi rend='sup'&gt;nd&lt;/hi&gt; 3&lt;hi rend='sup'&gt;rd&lt;/hi&gt;
    4&lt;hi rend='sup'&gt;th&lt;/hi&gt;
&lt;formula type='inline'&gt;&lt;simplemath&gt;x&lt;/simplemath&gt;&lt;/formula&gt;
   1 &amp;alpha; &amp;pm; &amp;longleftrightarrow; &amp;#x2013;
&lt;hi rend='sub'&gt;foo&lt;/hi&gt; &lt;hi rend='sup'&gt;2+3&lt;/hi&gt;
   &lt;hi rend='sub'&gt;&lt;hi rend='bold'&gt;Foo&lt;/hi&gt;&lt;/hi&gt;
&lt;formula type='inline'&gt;&lt;math&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;/math&gt;&lt;/formula&gt;
&lt;formula type='inline'&gt;&lt;math&gt;&lt;msup&gt;&lt;mi&gt;x&lt;/mi&gt;
    &lt;mrow&gt;&lt;mi&gt;e&lt;/mi&gt;&lt;mi&gt;m&lt;/mi&gt;&lt;mi&gt;e&lt;/mi&gt;&lt;/mrow&gt; &lt;/msup&gt;&lt;/math&gt;&lt;/formula&gt;
&lt;formula type='inline'&gt;&lt;math&gt;&lt;mo form='prefix'&gt;log&lt;/mo&gt;&lt;/math&gt;&lt;/formula&gt;
&lt;formula type='inline'&gt;&lt;math&gt;&lt;msub&gt;&lt;mrow&gt;&lt;/mrow&gt;
     &lt;mrow&gt;&lt;mi&gt;F&lt;/mi&gt;&lt;mi mathvariant='bold'&gt;o&lt;/mi&gt;
  &lt;mi mathvariant='bold'&gt;o&lt;/mi&gt;&lt;/mrow&gt; &lt;/msub&gt;&lt;/math&gt;
&lt;/formula&gt;&lt;/p&gt;
</pre>

<h2 id="uid1621">3.6. Conversion to <span class="sansserif">XML</span></h2>
<p>In the case where the value of the counter
<samp>\@nomathml</samp><a id="uid1622"></a> is negative, then the translation
is a <tt class="txt">&lt;texmath&gt;</tt> element containing all tokens of the math list. For instance,</p>
<pre class="latex-code">\csname@nomathml\endcsname=-1
$\begin{pmatrix}
\binom 12&amp;\int_0^\infty f(x)dx\\[2cm]
\mathfrak{W}_2&amp;\text{xyz}=\sqrt{xxyyzz}
\end{pmatrix}$
</pre>
<p class="nofirst noindent">translates as</p>
<pre class="xml-code">&lt;p&gt;&lt;texmath type='inline'&gt;\begin{pmatrix}
\genfrac(){0.0pt}{}{1}{2}&amp;amp;\int _0^\infty f(x)dx\\[2cm]
\@mathfrak W\@mathit _2&amp;amp;\text{xyz}=\sqrt{xxyyzz}
\end{pmatrix}&lt;/texmath&gt;&lt;/p&gt;
</pre>
<p>In all other cases
we use a highly recursive procedure that converts a math list into a
formula. The procedure takes as argument the current style. This is one of D,
T, S, or SS (display, text, script, or script script style). It is D for a
display math formula, T for a normal formula.</p>
<p>Consider first the case where the formula has an <samp>\over</samp>, or a variant, not
hidden inside braces. This example has 6 subexpressions, each of them have
such an operator.
<a id="uid1623"></a></p>
<pre class="latex-code">${a\over b}{a\above2mm b}{a\atop b}
{a\overwithdelims[] b}{a\abovewithdelims[]2mm b}{a\atopwithdelims[] b}$
</pre>
<p class="nofirst noindent">The translation is</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
 &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
  &lt;mrow&gt;
   &lt;mfrac&gt;&lt;mi&gt;a&lt;/mi&gt; &lt;mi&gt;b&lt;/mi&gt;&lt;/mfrac&gt;
   &lt;mfrac linethickness='2mm'&gt;&lt;mi&gt;a&lt;/mi&gt; &lt;mi&gt;b&lt;/mi&gt;&lt;/mfrac&gt;
   &lt;mfrac linethickness='0.0pt'&gt;&lt;mi&gt;a&lt;/mi&gt; &lt;mi&gt;b&lt;/mi&gt;&lt;/mfrac&gt;
   &lt;mfenced open='[' close=']'&gt;
       &lt;mfrac&gt;&lt;mi&gt;a&lt;/mi&gt; &lt;mi&gt;b&lt;/mi&gt;&lt;/mfrac&gt;&lt;/mfenced&gt;
   &lt;mfenced open='[' close=']'&gt;
       &lt;mfrac linethickness='2mm'&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mfrac&gt;&lt;/mfenced&gt;
   &lt;mfenced open='[' close=']'&gt;
       &lt;mfrac linethickness='0.0pt'&gt;&lt;mi&gt;a&lt;/mi&gt; &lt;mi&gt;b&lt;/mi&gt;&lt;/mfrac&gt;&lt;/mfenced&gt;
  &lt;/mrow&gt;
 &lt;/math&gt;
&lt;/formula&gt;
</pre>
<p class="nofirst noindent">It is an error if the formula has more than one such operators. Otherwise, we
have two parts: what precedes the operator and what follows the operator. As
the example shows, some operators need delimiters. Other operators read a
dimension. This dimension must be given explicitly as a sequence of digits and
a unit of measure (we could do better; if you want <samp>\parindent</samp> instead of
<samp>2mm</samp>, you should use <samp>\genfrac</samp> instead). After splitting the formula
into two parts, the same idea than <samp>\genfrac</samp> is used. If the current style
is C, the next style in the list is used for both parts of the formula (if the
style is D or T, the next style is S, otherwise it is SS). Note
that <samp>\choose</samp><a id="uid1624"></a> is like <samp>\over</samp>, you should use <samp>\binom</samp><a id="uid1625"></a>
instead.</p>
<p>We assume from now on that the formula contains no more operators like
<samp>\over</samp>. This means that the current style can be used for the current
object. Items are handled as follows:</p>
<ul>
<li id="uid1626"><p class="nofirst noindent">A space is ignored.</p>
</li>
<li id="uid1627"><p class="nofirst noindent">If the current token is <samp>\text</samp><a id="uid1628"></a>, <samp>\hbox</samp><a id="uid1629"></a>,
<samp>\mbox</samp><a id="uid1630"></a>, this is a command with an argument, that is interpreted
using special rules. A sequence of
characters produces <samp>\mtext</samp>, a space produces a <samp>\mspace</samp>, and math
formulas are allowed. Errors may be signaled if the content of the argument
is too complicated. The translation of</p>
<pre class="latex-code">$ x=0 \text{provided that $y=0$ or } a=1$
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
 &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
  &lt;mrow&gt;
   &lt;mi&gt;x&lt;/mi&gt; &lt;mo&gt;=&lt;/mo&gt;  &lt;mn&gt;0&lt;/mn&gt;
   &lt;mrow&gt;
     &lt;mtext&gt;provided&lt;/mtext&gt;
     &lt;mspace width='0.5em'/&gt;
     &lt;mtext&gt;that&lt;/mtext&gt;
     &lt;mspace width='0.5em'/&gt;
   &lt;mrow&gt; &lt;mi&gt;y&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt; &lt;/mrow&gt;
   &lt;mspace width='0.5em'/&gt;
   &lt;mtext&gt;or&lt;/mtext&gt;&lt;mspace width='0.5em'/&gt;&lt;/mrow&gt;
   &lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;
  &lt;/mrow&gt;
 &lt;/math&gt;
&lt;/formula&gt;
</pre>

</li>
<li id="uid1631"><p class="nofirst noindent">In the case of <samp>$\mathop{\rm sin}$</samp><a id="uid1632"></a>, the
translation is <tt class="txt">&lt;mo form=´prefix´&gt;sin&lt;/mo&gt;</tt>. Any sequence of characters is
allowed instead of `sin´. Instead of <samp>\rm</samp>, any font change command that
switches to `rm´ can be used.</p>
</li>
<li id="uid1633"><p class="nofirst noindent">In the case of <samp>\hspace</samp><a id="uid1634"></a>, an argument is read, converted to a
dimension (in fact, a glue is read via the scanglue routine, the shrink and
stretch parts of the glue are discarded), and the result is a <tt class="txt">&lt;mspace&gt;</tt>
element. For instance <samp>\hspace{2cm plus 3pt}</samp> produces
<tt class="txt">&lt;mspace width=´56.9055pt´/&gt;</tt>.</p>
</li>
<li id="uid1635"><p class="nofirst noindent">In the case of <samp>\displaystyle</samp><a id="uid1636"></a>, <samp>\textstyle</samp><a id="uid1637"></a>,
<samp>\scriptstyle</samp><a id="uid1638"></a>, <samp>\scriptscriptstyle</samp><a id="uid1639"></a>, the current
style is changed, to D, T, S and SS respectively.</p>
</li>
<li id="uid1640"><p class="nofirst noindent">In the case of <samp>\nonscript</samp><a id="uid1641"></a>, the token is discarded if the style
is D or T, kept otherwise. We shall see later that space disappears after
such a token, if it is not discarded. Example.</p>
<pre class="latex-code">$\def\foo{\nonscript~} \foo x^{y\foo}_{\textstyle z\foo}$
</pre>
<p class="nofirst noindent">The translation is</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
 &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
  &lt;mrow&gt;
   &lt;mspace width='3.33333pt'/&gt;
   &lt;msubsup&gt;
    &lt;mi&gt;x&lt;/mi&gt;
    &lt;mstyle scriptlevel='0' displaystyle='false'&gt;
       &lt;mrow&gt;&lt;mi&gt;z&lt;/mi&gt;&lt;mspace width='3.33333pt'/&gt;&lt;/mrow&gt;
    &lt;/mstyle&gt;
    &lt;mi&gt;y&lt;/mi&gt;
   &lt;/msubsup&gt;
  &lt;/mrow&gt;
 &lt;/math&gt;
&lt;/formula&gt;
</pre>

</li>
<li id="uid1642"><p class="nofirst noindent">If the token is a character of category code 7 or 8, it is left
unchanged (typically, case of <samp>^</samp> and <samp>_</samp>).</p>
</li>
<li id="uid1643"><p class="nofirst noindent">If the token is <samp>\limits</samp><a id="uid1644"></a>, <samp>\nolimits</samp><a id="uid1645"></a>,
<samp>\mathord</samp><a id="uid1646"></a>, <samp>\mathop</samp><a id="uid1647"></a>, <samp>\mathbin</samp><a id="uid1648"></a>, <samp>\mathrel</samp><a id="uid1649"></a>,
<samp>\mathopen</samp><a id="uid1650"></a>, <samp>\mathclose</samp><a id="uid1651"></a>, <samp>\mathpunct</samp><a id="uid1652"></a>,
<samp>\mathinner</samp><a id="uid1653"></a>, <samp>\ensuremath</samp><a id="uid1654"></a>, <samp>\nonumber</samp><a id="uid1655"></a>,
<samp>\nolinebreak</samp><a id="uid1656"></a>, it is ignored. However, we remember that the next
object should be Rel, Bin (if <samp>\mathrel</samp> or <samp>\mathbin</samp> has been seen.)</p>
</li>
<li id="uid1657"><p class="nofirst noindent">If the token is
<samp>\big</samp><a id="uid1658"></a>, <samp>\bigl</samp><a id="uid1659"></a>, <samp>\bigm</samp><a id="uid1660"></a>, <samp>\bigr</samp><a id="uid1661"></a>,
<samp>\bigg</samp><a id="uid1662"></a>, <samp>\biggl</samp><a id="uid1663"></a>, <samp>\biggm</samp><a id="uid1664"></a>, <samp>\biggr</samp><a id="uid1665"></a>,
<samp>\Big</samp><a id="uid1666"></a>, <samp>\Bigl</samp><a id="uid1667"></a>, <samp>\Bigm</samp><a id="uid1668"></a>, <samp>\Bigr</samp><a id="uid1669"></a>,
<samp>\Bigg</samp><a id="uid1670"></a>, <samp>\Biggl</samp><a id="uid1671"></a>, <samp>\Biggm</samp><a id="uid1672"></a>, <samp>\Biggr</samp><a id="uid1673"></a>, we remember that
a big object is wanted, with subtype left, right, middle, or other.</p>
</li>
<li id="uid1674"><p class="nofirst noindent">The current token or group is translated, according to the rules given
below. After that, flags may be added (if the object is declared Bin
or Rel or big). The current style is changed to the next style in the case
we are in a group, and the group is preceded by <samp>^</samp> or <samp>_</samp>.</p>
</li>
<li id="uid1675"><p class="nofirst noindent">If the current token is a character, its translation will be a
<tt class="txt">&lt;mi&gt;</tt>, <tt class="txt">&lt;mn&gt;</tt> or <tt class="txt">&lt;mo&gt;</tt> element. In the case of a letter, this may
depend on the font attribute associated to the character. For instance
<samp>{\bf x=1}</samp> gives <tt class="txt">&lt;mi mathvariant=´bold´&gt;x&lt;/mi&gt;</tt> and
<tt class="txt">&lt;mo&gt;=&lt;/mo&gt;</tt> and <tt class="txt">&lt;mn&gt;1&lt;/mn&gt;</tt>.</p>
</li>
<li id="uid1676"><p class="nofirst noindent">If the current token is <samp>\left</samp>, <samp>\right</samp>, or already
translated, it is left unchanged.</p>
</li>
<li id="uid1677"><p class="nofirst noindent">If the token is a constant, like <samp>\alpha</samp>, see the big list at the
start of the chapter, its <span class="sansserif">XML</span> value is inserted.</p>
</li>
<li id="uid1678"><p class="nofirst noindent">If the token is a list, like <samp>{...}</samp>, it will be translated, using a
copy of the current style.</p>
</li>
<li id="uid1679"><p class="nofirst noindent">If the token is a list of the form <samp>\left</samp> ... <samp>\right</samp>, it will be
translated. After that, fences will be added (using what follows the
<samp>\left</samp> and <samp>\right</samp>).</p>
</li>
<li id="uid1680"><p class="nofirst noindent">If the token is a list of the form <samp>\begin{xxx}</samp>...<samp>\end{xxx}</samp>, we assume
that this is an array, or a matrix, we already explained how it can be
translated.</p>
</li>
<li id="uid1681"><p class="nofirst noindent">If the token is <samp>\mathchoice</samp><a id="uid1682"></a>, with its four arguments, one of
them is selected according to the mode. For instance</p>
<pre class="latex-code">\def\foo{\mathchoice{1}{2}{3}{4}}
$\foo{\displaystyle \foo}^{\foo^{\foo}}$
</pre>
<p class="nofirst noindent">translates to</p>
<pre class="xml-code">  &lt;mrow&gt;
   &lt;mn&gt;2&lt;/mn&gt;
   &lt;msup&gt;
    &lt;mstyle scriptlevel='0' displaystyle='true'&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mstyle&gt;
    &lt;msup&gt;
     &lt;mn&gt;3&lt;/mn&gt;
     &lt;mn&gt;4&lt;/mn&gt;
    &lt;/msup&gt;
   &lt;/msup&gt;
  &lt;/mrow&gt;
</pre>

</li>
<li id="uid1683"><p class="nofirst noindent">It is an error if the current token is not a command of the form
<samp>\acute</samp>, etc, or <samp>\overline</samp>, those listed at the end of the section
`basic objects´ on page <a href="#uid1482">&#10043;</a>. As a general rule, for instance
for <samp>\frac</samp><a id="uid1684"></a>, arguments are
translated using the next style (i.e., smaller), unless the style is indicated
(for <samp>\dfrac</samp><a id="uid1685"></a> and <samp>\tfrac</samp><a id="uid1686"></a>, the style is T and S, the style may be
indicated for <samp>\genfrac</samp><a id="uid1687"></a>).
If <samp>\foo</samp> is as above, the translation of</p>
<pre class="latex-code">$\tfrac{\foo}{\foo} = \dfrac{\foo}{\foo} = \frac{\foo}{\foo}
{\displaystyle \frac{\foo}{\foo}}$
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">  &lt;mrow&gt;
   &lt;mstyle scriptlevel='0' displaystyle='false'&gt;
    &lt;mfrac&gt;&lt;mn&gt;3&lt;/mn&gt; &lt;mn&gt;3&lt;/mn&gt;&lt;/mfrac&gt;
   &lt;/mstyle&gt;
   &lt;mo&gt;=&lt;/mo&gt;
   &lt;mstyle scriptlevel='0' displaystyle='true'&gt;
     &lt;mfrac&gt;&lt;mn&gt;2&lt;/mn&gt; &lt;mn&gt;2&lt;/mn&gt;&lt;/mfrac&gt;
   &lt;/mstyle&gt;
   &lt;mo&gt;=&lt;/mo&gt;
   &lt;mfrac&gt;&lt;mn&gt;3&lt;/mn&gt; &lt;mn&gt;3&lt;/mn&gt;&lt;/mfrac&gt;
   &lt;mstyle scriptlevel='0' displaystyle='true'&gt;
     &lt;mfrac&gt;&lt;mn&gt;2&lt;/mn&gt; &lt;mn&gt;2&lt;/mn&gt;&lt;/mfrac&gt;
   &lt;/mstyle&gt;
  &lt;/mrow&gt;
</pre>
<p class="nofirst noindent">The translation of</p>
<pre class="latex-code">\def\xbar#1{\genfrac{}{}{}{#1}{\foo}{\foo}}
$\xbar{0}\xbar{1}\xbar{2}\xbar{3}\xbar{}$
</pre>
<p class="nofirst noindent">is the following. You can notice that, if the argument of <samp>\xbar</samp> is 2 or
3, this does not change the translation of the fraction. In TeX  we get two
formulas that have the same size but are not vertically aligned (why?).</p>
<pre class="xml-code">   &lt;mstyle scriptlevel='0' displaystyle='true'&gt;
    &lt;mfrac&gt;&lt;mn&gt;2&lt;/mn&gt; &lt;mn&gt;2&lt;/mn&gt;&lt;/mfrac&gt;
   &lt;/mstyle&gt;
   &lt;mstyle scriptlevel='0' displaystyle='false'&gt;
    &lt;mfrac&gt;&lt;mn&gt;3&lt;/mn&gt; &lt;mn&gt;3&lt;/mn&gt;&lt;/mfrac&gt;
   &lt;/mstyle&gt;
   &lt;mstyle scriptlevel='1' displaystyle='false'&gt;
    &lt;mfrac&gt;&lt;mn&gt;4&lt;/mn&gt; &lt;mn&gt;4&lt;/mn&gt;&lt;/mfrac&gt;
   &lt;/mstyle&gt;
   &lt;mstyle scriptlevel='2' displaystyle='false'&gt;
    &lt;mfrac&gt;&lt;mn&gt;4&lt;/mn&gt; &lt;mn&gt;4&lt;/mn&gt;&lt;/mfrac&gt;
   &lt;/mstyle&gt;
   &lt;mfrac&gt;&lt;mn&gt;3&lt;/mn&gt; &lt;mn&gt;3&lt;/mn&gt;&lt;/mfrac&gt;
</pre>
<p class="nofirst noindent">As a final example, the translation of</p>
<pre class="latex-code">$\overline{x}\grave{y} \underbrace{z}\stackrel{a}{b}\overset{a}{b} $
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;mover accent='true'&gt;&lt;mi&gt;x&lt;/mi&gt; &lt;mo&gt;&amp;OverBar;&lt;/mo&gt;&lt;/mover&gt;
&lt;mover accent='true'&gt;&lt;mi&gt;y&lt;/mi&gt; &lt;mo&gt;&amp;grave;&lt;/mo&gt;&lt;/mover&gt;
&lt;munder accentunder='true'&gt;&lt;mi&gt;z&lt;/mi&gt; &lt;mo&gt;&amp;UnderBrace;&lt;/mo&gt;
&lt;/munder&gt;&lt;mover&gt;&lt;mi&gt;b&lt;/mi&gt; &lt;mi&gt;a&lt;/mi&gt;&lt;/mover&gt;
&lt;mover&gt;&lt;mi&gt;b&lt;/mi&gt; &lt;mi&gt;a&lt;/mi&gt;&lt;/mover&gt;
</pre>

</li></ul>

<h2 id="uid1688">3.7. Final math mode hacks</h2>
<p>Before we forget it: when the formula is completely translated, we have a
list of <span class="sansserif">XML</span> elements. If the list is empty, the result is
<tt class="txt">&lt;mrow/&gt;</tt>. For instance, in the case of <samp>x^{}</samp>, then exponent is empty. If
the list has a single <span class="sansserif">XML</span> token, this will be the result. Otherwise, everything is
put in a <tt class="txt">&lt;mrow&gt;</tt>. If the current formula, or subformula contains a style
change, it is put in a <tt class="txt">&lt;mstyle&gt;</tt> element. This is not always the good
solution, because the same style is used for everything, what precedes and
what follows the style command. If you look at the <samp>\genfrac</samp> example
above, you can see that styles are added by the <samp>\genfrac</samp> interpreter
(the single TeX switch is associated with two MathML attributes).</p>
<p>If we have a formula, of the form <samp>$_x^{2}_{abc}$</samp>, the translation rules
explained so far tell us that we have: an underscore character, an <span class="sansserif">XML</span> element for <samp>x</samp>, a hat character, an <span class="sansserif">XML</span> element for <samp>{2}</samp>, an underscore,
and an XML element for <samp>{abc}</samp>. We may have <samp>\nonscript</samp> tokens; they will
be removed, as well as a space that follows.
We have to evaluate the commands that control subscripts and superscripts. A hat
character gives <tt class="txt">&lt;msup&gt;</tt>, an underscore character gives <tt class="txt">&lt;msub&gt;</tt>,
and both give <tt class="txt">&lt;msubsup&gt;</tt>. It is possible for a formula to start with an
underscore or a hat: in this case, the kernel is empty. It is not possible for
a formula to end with hat or underscore. A kernel can have at most one
subscript and at most one superscript; hence the formula above is wrong:
the letter x is the first subscript to the empty kernel. A valid formula is
for instance <samp>$_yx^2$</samp>. It translates as</p>
<pre class="xml-code">&lt;mrow&gt;
  &lt;msub&gt;&lt;mrow&gt;&lt;/mrow&gt; &lt;mi&gt;y&lt;/mi&gt; &lt;/msub&gt;
  &lt;msup&gt;&lt;mi&gt;x&lt;/mi&gt; &lt;mn&gt;2&lt;/mn&gt; &lt;/msup&gt;
&lt;/mrow&gt;
</pre>
<p>We have mentioned above that some operators can be flagged as left, right,
and that adding <samp>\bigr</samp> may convert a left operator into a right
operator. There is a magic that converts, in some cases, the <samp>\big</samp>
operator into fences. For instance</p>
<pre class="latex-code">$\bigl [ A\big ( x^2 \big) B \bigr[  $
</pre>
<p class="nofirst noindent">translates as</p>
<pre class="xml-code">&lt;mfenced open='[' close='['&gt;
  &lt;mi&gt;A&lt;/mi&gt;
  &lt;mfenced open='(' close=')'&gt;&lt;msup&gt;&lt;mi&gt;x&lt;/mi&gt; &lt;mn&gt;2&lt;/mn&gt; &lt;/msup&gt;&lt;/mfenced&gt;
  &lt;mi&gt;B&lt;/mi&gt;
&lt;/mfenced&gt;
</pre>
<p class="nofirst noindent">There is another trick, that works in some cases. Consider:</p>
<pre class="latex-code">$\int_0^\infty f(x) dx = \big[  U \big ]$
</pre>
<p class="nofirst noindent">the translation is</p>
<pre class="xml-code">&lt;mrow&gt;
 &lt;msubsup&gt;&lt;mo&gt;&amp;int;&lt;/mo&gt; &lt;mn&gt;0&lt;/mn&gt; &lt;mi&gt;&amp;infin;&lt;/mi&gt; &lt;/msubsup&gt;
 &lt;mrow&gt;
   &lt;mi&gt;f&lt;/mi&gt;&lt;mo&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo&gt;)&lt;/mo&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mi&gt;x&lt;/mi&gt;
 &lt;/mrow&gt;
 &lt;mo&gt;=&lt;/mo&gt;
 &lt;mfenced open='[' close=']'&gt;&lt;mi&gt;U&lt;/mi&gt;&lt;/mfenced&gt;
&lt;/mrow&gt;
</pre>
<p class="nofirst noindent">The interesting point here is the placement of the inner <samp>\mrow</samp>.
The idea is that the parentheses should remain small (not larger than the
<samp>\mrow</samp>). In particular, it should not be influenced by the integral that
precedes and the fence that follows. In some cases, it works.</p>

<h2 id="uid1689">3.8. Extensions</h2>
<p>In <i>Tralics</i>, you can use the following three commands
<samp>\mathmo</samp><a id="uid1690"></a>, <samp>\mathmi</samp><a id="uid1691"></a>, and <samp>\mathmn</samp><a id="uid1692"></a>.
They take an argument and produce a <tt class="txt">&lt;mo&gt;</tt>, <tt class="txt">&lt;mi&gt;</tt>, or <tt class="txt">&lt;mn&gt;</tt>. There is
a file <span class="sansserif">tralics-iso.sty</span> that contains</p>
<pre class="latex-code">\def\makecmd#1{\expandafter\newcommand\csname math#1\endcsname}
\def\makemo#1#2{\makecmd{#2}{\mathmo{\amp\##1;}}}
\def\makemi#1#2{\makecmd{#2}{\mathmi{\amp\##1;}}}
\def\makemn#1#2{\makecmd{#2}{\mathmn{\amp\##1;}}}
</pre>
<p class="nofirst noindent">Then you can say <samp>\makemo</samp><samp>{x02190}</samp><samp>{slarr}</samp>, and this will define a command
<samp>\mathslarr</samp>, whose translation (in math mode only) is
<tt class="txt">&lt;mo&gt;</tt><tt class="txt">&amp;#x02190;</tt><tt class="txt">&lt;/mo&gt;</tt>. The file provides nearly 2000 such definitions, taken
from the MathML entity files, with the MathML names. These commands can be
used instead of TeX commands like <samp>\mathchar</samp><a id="uid1693"></a>: remember that a math-char
is a 15bit integer, where 8 bits are used for the position in a font table,
3 bits for the type, and 4 bits for the family. Only three types are defined
for <i>Tralics</i>, but the content of the element is arbitrary (most math symbols
are between U+2100 and U+27FF, there are also letters between U+1D400 and
U+1D7FF).
There is a command <samp>\mathattribute</samp><a id="uid1694"></a> that adds an attribute pair to the
last created math element. You can say for instance</p>
<pre class="latex-code">\providecommand\operatorname[1]{%
  \mathmo{#1}%
  \mathattribute{form}{prefix}%
  \mathattribute{movablelimits}{true}%
}
</pre>
<p class="nofirst noindent">After that,</p>
<pre class="latex-code">$\min _xf(x) &gt;\operatorname{min} _xf(x)$
</pre>
<p class="nofirst noindent">translates as</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
 &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
  &lt;mrow&gt;
   &lt;msub&gt;&lt;mo movablelimits='true' form='prefix'&gt;min&lt;/mo&gt; &lt;mi&gt;x&lt;/mi&gt; &lt;/msub&gt;
   &lt;mrow&gt;
    &lt;mi&gt;f&lt;/mi&gt; &lt;mo&gt;(&lt;/mo&gt; &lt;mi&gt;x&lt;/mi&gt; &lt;mo&gt;)&lt;/mo&gt; &lt;mo&gt;&amp;gt;&lt;/mo&gt;
   &lt;/mrow&gt;
   &lt;msub&gt;&lt;mo movablelimits='true' form='prefix'&gt;min&lt;/mo&gt; &lt;mi&gt;x&lt;/mi&gt; &lt;/msub&gt;
   &lt;mrow&gt;
    &lt;mi&gt;f&lt;/mi&gt; &lt;mo&gt;(&lt;/mo&gt; &lt;mi&gt;x&lt;/mi&gt; &lt;mo&gt;)&lt;/mo&gt;
   &lt;/mrow&gt;
  &lt;/mrow&gt;
 &lt;/math&gt;
&lt;/formula&gt;
</pre>
<p>The command <samp>\DeclareMathOperator</samp><a id="uid1695"></a> takes two arguments
(say `foo´ and `bar´), with an optional star before the first argument.
It defines <samp>\foo</samp> to be the command <samp>\operatorname</samp> applied to `bar´
(with a star when required). The command <samp>\operatorname</samp><a id="uid1696"></a> is as shown
above (the <span class="sansserif">movablelimits</span> attribute is only added if the command is
followed by a star).</p>
<p>You can use the command <samp>\mathchardef</samp><a id="uid1697"></a>. This is like <samp>\chardef</samp>,
it reads a command and a number. The number should fit on 15 bits.
Otherwise, you will see an error of the form:
<i>Bad mathchar replaced by 0: 1234567</i>. The <samp>\mathchardef</samp> command
reads a command, say <samp>\foo</samp>, and an integer N; there is no difference
between <samp>\foo</samp> and <samp>\mathchar</samp>N, except that <samp>\the</samp><samp>\foo</samp> returns
the integer N, and is faster to parse. Some constants, like <samp>\@cclvi</samp>=256,
are defined in this way by the TeX kernel and should not be used as math
characters. Some commands, like <samp>\eta</samp>=111<sub>16</sub>, are meant to be used as
a math character. In <i>Tralics</i>, until version 2.8 an error will be signaled.
In version 2.9, the translation, in math mode, is a <tt class="txt">&lt;mi&gt;</tt> element
containing this character; you might say <samp>\mathchardef</samp><samp>\eta</samp><samp>"3B7</samp>.
Outside math mode, this gives an error:
that takes the form <i>Undefined command \eta; command code = 264</i>,
instead of <i>Math only command \theta. Missing dollar not inserted</i>;
inside math mode, the behavior is the same as the standard one.</p>
<p>TeX has a special register called <samp>\fam</samp><a id="uid1698"></a>. If you say something like</p>
<pre class="latex-code">\fam3 ${\fam9 \the\fam}\ \the\fam$
</pre>
<p class="nofirst noindent">then the second <samp>\the</samp> expands to minus one. The first gives 9, but LaTeX complains with: <i>\textfont 9 is undefined (character 9)</i>.
In <i>Tralics</i>, you would see</p>
<pre class="xml-code">&lt;mrow&gt;&lt;mn&gt;9&lt;/mn&gt;&lt;mspace width='6pt'/&gt;&lt;mn&gt;3&lt;/mn&gt;&lt;/mrow&gt;
</pre>
<p class="nofirst noindent">As the example shows, the family is unused, and not correctly restored.
Each character has a <samp>\mathcode</samp><a id="uid1699"></a>. The following</p>
<pre class="latex-code">\mathcode`\a="0941 $a\the \mathcode`\a$
</pre>
<p class="nofirst noindent">is interpreted by <i>Tralics</i> as <samp>$a2369$</samp>. However TeX complains, with
<i>\textfont 9 is undefined (character A)</i>, because you ask the lower
case letter a to be printed like the upper case letter A with textfont 9.
A mathcode is a 15bit integer, with an exception: a character whose mathcode
is 32768 behaves like an active character, the action associated to it must be
defined somehow, for instance like this:</p>
<pre class="latex-code">{\catcode`\'=\active \global\let'\active@math@prime}
</pre>
<p>There is a command <samp>\delimiter</samp><a id="uid1700"></a>, it reads a number, but you cannot use
it.
There is a command <samp>\radical</samp><a id="uid1701"></a>, it reads a number, then signals an
error. The <samp>\mathaccent</samp><a id="uid1702"></a> command is similar.</p>
<p>There are commands <samp>\raise</samp><a id="uid1703"></a> and <samp>\lower</samp><a id="uid1704"></a>, as well as
<samp>\vcenter</samp><a id="uid1705"></a>. The last one is not implemented in <i>Tralics</i>. The translation
of</p>
<pre class="latex-code">a\raise2cm\xbox{foo}{bar}\lower 2pt\xbox{xfoo}{xbar}
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;p&gt;a&lt;foo&gt;bar&lt;/foo&gt;&lt;xfoo&gt;xbar&lt;/xfoo&gt;&lt;/p&gt;
</pre>
<p class="nofirst noindent">As you can see, the specification disappear. Maybe in a future version, we
will add an attribute to the box.
You cannot use these commands in math mode in <i>Tralics</i>. In TeX, you can get
an error of the form: <i>You can´t use `\raise´ in vertical mode</i>,
while <samp>\vcenter</samp> is a math only command.
Currently <samp>\indent</samp> and <samp>\noindent</samp> are ignored in math mode (in TeX 
<samp>$\indent_b$</samp> produces a kernel and an index; the kernel is an empty box of
width <samp>\parindent</samp>, of type Ord).</p>

<h1 id="cid4">4. Translating a bibliography</h1>
<h2 id="uid1706">4.1. Introduction</h2>
<p>As said in <a href="#bid5" title="Mittelbach, Goossens, Braams, Carlisle, Rowley2004">[6]</a>, &#8220;citations are cross-references to
bibliographical information outside the current document, such as to
publications containing further information on a subject and source
information about used quotations. [...] There are numerous ways to compile
bibliographies and reference lists. They can be prepared manually, if
necessary, but usually they are automatically generated from a database
containing bibliographic information.&#8221;</p>
<p>There are different ways to cite an author, or a text or a specific part of a
text. The easiest way (for an automated system) is to use numbers, as above;
if you are reading
an interactive version of this document, you can click on the number, and you
will see the entry in the bibliography, at the end of the document (between
the index and the table of contents). This is standard practice;
recommendations for a book series say: <i>References are cited in the text simply as
numbers in square brackets, e.g. [165], do not use the abbreviations
&#8220;Ref./Refs/&#8221; in the middle of a sentence. Only at the beginning of a
sentence should you write &#8220;Reference [165]&#8221;</i>. In some cases, you can see
`[17, p23]´, as the result of `<samp>\cite</samp><samp>[p23]</samp><samp>{foo}</samp>´; this means page 23 of the
reference numbered 17. A bit more sophisticated are references like `[GMS93]´
instead of `<a href="#bid4" title="Goossens, Mittelbach, Samarin1993">[2]</a>´ for a book by Goosens, Mittelbach and Samarin
published in 1993. Computing the key is not obvious, because, if you cite a
book by, say, Goethe, Molière and Shakespeare in 1793, the key will be the
same, and a post-processor has to add a suffix (typically, this is done by a
couple of routines named
<samp>forward.pass</samp> and <samp>reverse.pass</samp> in a <span class="sansserif">bst</span> file). Sometimes, a more explicit
scheme is use, for instance `Knuth, The Art Of ..., Algorithm P´, in the
text, and the full reference can be found in the bibliography. A text of
R. Ridolfi can be cited as `<i>Vita di Girolamo Savonarola</i>,
5<sup>e</sup> éd, Florence, 1974, t. II., p. 182-183´. Note that the name
of the author appears before the citation, and is not repeated inside it.
In some books, citations are given as footnotes, and you can often see
`ibid.´, meaning the previous cited text. These kinds of things are generally
hard to fully automate. For this reason, only a simple scheme is provided by
<i>Tralics</i>: a link to a bibliography section via a key.</p>
<p>The problem is essentially the following: The LaTeX source file contains a
given number of citations, introduced by the <samp>\cite</samp><a id="uid1707"></a> command or a
variant. Each command defines one or more references. For each reference, a key
has to be computed and typeset, an item added to the bibliography, and a link
created. In LaTeX, the document has in general to be processed three times;
the first run will print <samp>\citation</samp><samp>{companion2}</samp> in the auxiliary file.
This file is processed by BibTeX, that generates a <span class="sansserif">bbl</span> file
containing <samp>\bibitem</samp><samp>{companion2}</samp>. On the second run, the bibliography is
typeset, and the key is constructed; if it is 6, then
<samp>\bibcite</samp><samp>{companion2}</samp><samp>{6}</samp> will be printed in the auxiliary file. On the last
run, we know, after reading the auxiliary file, that the <samp>\cite</samp> command
should typeset as 6.</p>
<p>The mechanism in <i>Tralics</i> is a bit different: there is only one run. Each
<samp>\cite</samp> command produces a <tt class="txt">&lt;cit&gt;</tt> element, plus an entry into a
biblist. At the end of the document, the bibliography is constructed, with
all the necessary entries; details will be given later. This gives the
equivalent of a <span class="sansserif">bbl</span> file, it is translated. The result of the
translation is some <span class="sansserif">XML</span> element, that will be inserted somewhere in the main
<span class="sansserif">XML</span> tree. Finally, a check is made to see if all references are defined. The
mechanism is much simpler than in LaTeX; this is really because, in <i>Tralics</i>,
you can add an element or an attribute anywhere in the tree (at the start if you
like) at any moment. In TeX, on the contrary, once a paragraph is typeset,
you cannot modify it, and once a page is shipped out, you cannot modify the
whatsits associated to it (pages numbers, in the case of <samp>\label</samp>,
<samp>\ref</samp> are computed only when the page is shipped out; they are left in a
<samp>\write</samp>, which is a special kind of whatsit).</p>
<p>There are some tentatives to design an <span class="sansserif">XML</span> format for bibliography data
bases; none of them is really satisfactory. We give an example of an entry
using the DocBook syntax:</p>
<pre class="xml-code">  &lt;biblioentry id="abc123" type="book"&gt;
    &lt;author&gt;
      &lt;surname&gt;Flynn&lt;/surname&gt;
      &lt;firstname&gt;Peter&lt;/firstname&gt;
    &lt;/author&gt;
    &lt;title&gt;Understanding SGML and XML Tools&lt;/title&gt;
    &lt;titleabbrev&gt;SGML &amp;amp; XML Tools&lt;/titleabbrev&gt;
    &lt;publisher&gt;
      &lt;publishername&gt;Kluwer&lt;/publishername&gt;
      &lt;address&gt;Boston&lt;/address&gt;
    &lt;/publisher&gt;
    &lt;isbn&gt;0-7923-8169-6&lt;/isbn&gt;
    &lt;date YYYY-MM-DD="1998"&gt;1998&lt;/date&gt;
  &lt;/biblioentry&gt;
</pre>
<p class="nofirst noindent">This should be referenced in the text as:</p>
<pre class="xml-code">&lt;citation&gt;&lt;biblioref linkend="abc123"/&gt;&lt;/citation&gt;
</pre>
<p class="nofirst noindent">This is the same using the TEI syntax:</p>
<pre class="xml-code">  &lt;biblFull id="abc123" rend="book"&gt;
    &lt;titleStmt&gt;
      &lt;title&gt;Understanding SGML and XML Tools&lt;/title&gt;
      &lt;author&gt;
        &lt;persName&gt;
          &lt;foreName&gt;Peter&lt;/foreName&gt;
          &lt;surname&gt;Flynn&lt;/surname&gt;
        &lt;/persName&gt;
      &lt;/author&gt;
      &lt;respStmt&gt;
        &lt;name&gt;http://imbolc.ucc.ie/~pflynn/books&lt;/name&gt;
      &lt;/respStmt&gt;
    &lt;/titleStmt&gt;
    &lt;extent&gt;432&lt;/extent&gt;
    &lt;publicationStmt&gt;
      &lt;publisher&gt;Kluwer Academic Publishers&lt;/publisher&gt;
      &lt;pubPlace&gt;Boston&lt;/pubPlace&gt;
      &lt;idno type="isbn"&gt;0-7923-8169-6&lt;/idno&gt;
      &lt;date value="1998"&gt;1998&lt;/date&gt;
    &lt;/publicationStmt&gt;
  &lt;/biblFull&gt;
</pre>
<p class="nofirst noindent">This should be referenced in the text as:</p>
<pre class="xml-code">&lt;cit&gt;&lt;ref target="abc123"&gt;&lt;/ref&gt;&lt;/cit&gt;
</pre>
<p class="nofirst noindent">These two citations were found on the Web<a id="uid1708" href="#note50" title="From the web page of BiblioX: http://www.silmaril.ie/bibliox/biblioxdoc.html"><small>(note: </small>&#10163;<small>)</small></a>. The careful reader
may notice that two elements are used for the citation (in the DocBook case,
they
are <tt class="txt">&lt;citation&gt;</tt> and <tt class="txt">&lt;biblioref&gt;</tt>, in the TEI case, they are <tt class="txt">&lt;cit&gt;</tt>
and <tt class="txt">&lt;ref&gt;</tt>). <i>Tralics</i> uses the TEI syntax for the citation but a
completely different one for the entries (the syntax is very near to
BibTeX). We shall explain, in the second part of this
document, Chapter 6, how to convert the <i>Tralics</i> <span class="sansserif">DTD</span> into the TEI <span class="sansserif">DTD</span> (at least for the bibliography). The transformation is
incomplete: in BibTeX, a name has four components, and the example shows only
two, surname and forName (or firstname).
A non-trivial question
concerns mathematics: how can we insert math formulas like <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>H</mi> <mi>&#8734;</mi> </msup></math></span> and
what about special words like: &#8220;the TeXbook?&#8221;. The main reason why
<i>Tralics</i> does not read databases written in <span class="sansserif">XML</span> is the need of an <span class="sansserif">XML</span> parser (we have written a BibTeX parser, this is more challenging).</p>
<p>The interaction between the main document and the bibliography is via the
`cite key´<a id="uid1709"></a>
on the LaTeX level, in the <span class="sansserif">XML</span> document, this is via the
Bid attribute, and for the typeset document, this is the `print key´.<a id="uid1710"></a>
As an
example, we shall consider a <span class="sansserif">bbl</span> file, created by <i>Tralics</i>, that
contains</p>
<pre class="latex-code">    \citation{60}{footcite:thesefabien}{bid9}{foot}{phdthesis}[Sey98] ...
</pre>
<p class="nofirst noindent">This is a temporary piece of stuff, the cite key is `thesefabien´, the Bid is
`bid9´, there are two choices for the print key, `60´ or `Sey98´. The <span class="sansserif">XML</span> translation is</p>
<pre class="xml-code">    &lt;citation from='foot' key='60' id='bid9' userid='footcite:thesefabien'
        type='phdthesis'&gt;  ...
</pre>
<p class="nofirst noindent">As you can see, the effective print key is `60´. We shall explain in due
time all details. Let´s start with the cite key, the only quantity that the
author can choose freely. For the references from the web, this key is
`abc123´, this is clearly a randomly chosen value, not mnemonic at all. At the
start of the chapter, we have shown a reference with key `companion2´, this
is the cite key for the second version of the LaTeX companion. The cite key
`thesefabien´ is for the Ph.D. thesis of F. Seyfert. There is no constraint on
the cite key for LaTeX: the only important thing is that the key can be
printed in the auxiliary file and read by BibTeX (some years ago, a colleague
corrected <samp>\cite</samp><samp>{Christele}</samp> to <samp>\cite</samp><samp>{Christèle}</samp>, this gave an awful error;
in current LaTeX, there seems to be no problem). On the other hand, BibTeX needs an identifier. This is a character string that does not start with a
digit, and contains anything but space, tabulation, double quote, percent
sign, sharp sign, backslash, comma, equals sign, braces, parentheses. For
<span class="sansserif">XML</span>, there are additional constraints for an ID: it has to be unique for the
whole document, and some characters like a plus sign are forbidden. In a first
version, we imagined to use the `userid´: this is formed of a prefix (of the
form `cite:´ or `footcite:´, thus making it unique), followed by the cite
key, where forbidden characters like the plus sign were replaced by a minus
sign. However, we found an example where a rather long key differed from
another one only by a forbidden character. Replacement introduced a
conflict. For this reason, we added the Bid: this is automatically
generated, hence is clearly unique and valid. A special feature of BibTeX is
that it does not create lines longer than 78 characters. It adds percent
characters in a sensible position; in some cases, the choice is wrong. Here is
an example:</p>
<pre class="latex-code">\bibitem[13]{Bergamini-Champelovier-Descoubes-Garavel-Mateescu-Serwe-04-a}\RAs%
c{D.~Bergamini, D.~Champelovier, N.~Descoubes, H.~Garavel, R.~Mateescu,
  W.~Serwe},
</pre>
<p class="nofirst noindent">As a result, you will get an error:
<i>Undefined control sequence \RAs</i>.
Note that
there are few people who use such very long cite keys. A simple idea that
works most of the time: use 4 letters for the first author, three letters for
the others, two letters for the year, for instance `Bara-Chy-Pom02´.</p>
<p>As explained, <i>Tralics</i> cannot use an <span class="sansserif">XML</span> database; instead it will use a
<span class="sansserif">bbl</span> file (this is some LaTeX file, that will be translated by
<i>Tralics</i>). The <span class="sansserif">bbl</span> can be part of the source document; in general
it will be automatically constructed by <i>Tralics</i> (in the current version,
BibTeX or any other external program can be used instead). This
<span class="sansserif">bbl</span> file should contain, for each unsolved citation, a command
that solves it (either <samp>\citation</samp> which is a <i>Tralics</i> command, or
<samp>\bibitem</samp> which is a standard LaTeX command, see
section <a href="#uid1717" title="Citing a document">4.2</a>).</p>
<p>One question is: can the <span class="sansserif">bbl</span> contains other items, together with these
<samp>\bibitem</samp> commands? If the bibliography is very long, it can be
interesting to divide it into subsections, and add a comment at the start of
each section; this is easy to do, if the <span class="sansserif">bbl</span> is not produced by BibTeX, or
if you edit it, and if you know how to convince LaTeX not to start the
bibliography with a <samp>\bibitem</samp>. In general, we have a
unique `<samp>\begin{thebibliography}</samp>´ at the start, a `<samp>\end{thebibliography}</samp>´
at the end. The effect is to produce a chapter (or a section), in general
unnumbered, whose name depends on the current language. In the case of the
Raweb, BibTeX produces more than one such environments. In fact, three
databases are used: `foot´, `refer´ and `year´.
Each of the two database files `foot´ and `refer´ produce a set of
references (the `foot´ bibliography was originally typeset as footnotes, via
the <span class="sansserif">footcite</span> package). The third database
produces a sequence of sections, such as theses, books, articles,
conferences, reports, etc.<a id="uid1711" href="#note51" title="Exact ordering on page ."><small>(note: </small>&#10163;<small>)</small></a> Whenever BibTeX sees an entry with a different
category than the preceding entry, it prints the <samp>\end{thebibliography}</samp>
followed by a <samp>\begin{thebibliography}</samp>. Note:
the modified environment takes a required argument (as usual, the longest
label) and an optional argument (the name of the section title; the title
itself being in the class file). As a
consequence, the <span class="sansserif">bbl</span> files produced by the Raweb are incompatible with
standard LaTeX classes. Since year 2001,
BibTeX is not used anymore for the Raweb and the <span class="sansserif">XML</span> result contains
just a sequence of references. However, each entry
has a category (this depends on the <span class="sansserif">from</span> and <span class="sansserif">type</span> attributes),
entries are sorted by category.
The style sheets that convert the <span class="sansserif">XML</span> to
<span class="sansserif">HTML</span> or XSL/Format are assumed to create these sections, one for each category
(see part two of this document). A nontrivial question is then to guarantee
that these two style sheets use the same splitting algorithm, and the same
section titles.</p>
<p>The `print key´<a id="uid1712"></a> is the value that is printed on the paper or displayed on
the screen. Each <tt class="txt">&lt;citation&gt;</tt> has a <span class="sansserif">key</span> attribute that can be used
as print key. However, an <span class="sansserif">XML</span> processor may as well ignore it, and use
numbers 1, 2, 3, etc. It can even sort the entries, before assigning them a
number<a id="uid1713" href="#note52" title="Sorting after assigning a number is weird."><small>(note: </small>&#10163;<small>)</small></a> (see part two of this document). In some cases, <i>Tralics</i> computes a
symbolic key of the form `Sey98´. If the post-processor sorts the entries,
and if the keys are not in alphabetic order, this is a bad idea.</p>
<p>The `key´<a id="uid1714"></a> of an entry is a quantity defined in the database, whose purpose is
to help sorting. In most cases, it is empty, (in some cases the
values are junk); this value is used only in the case where no author
is given (this is standard BibTeX practice, it means that this is rather
useless). The `sort key´<a id="uid1715"></a> of an entry is the character string used for sorting
(this is lost<a id="uid1716" href="#note53" title="Exemples on lines 135 to 148 below were produced with a hacked version of Tralics and bst files"><small>(note: </small>&#10163;<small>)</small></a>; <i>Tralics</i> could insert it in the resulting <span class="sansserif">XML</span>; this would
allow one to merge two bibliographies). In some cases, the print key is part
of the sort key. Imagine for instance a book by Samarin, Mittelbach and
Goossens, written in 1993. The standard key would be GMS93. Assume however
that the authors are taken in the given order, so that the key would be
`SMG93´. Alphabetically, this is after `Sey98´, but if we sort by authors,
Samarin comes before Seyfert.</p>

<h2 id="uid1717">4.2. Citing a document</h2>
<p>In this paragraph, we shall explain the commands that can be put in the
source document for inserting a citation, and the companion commands that
solve the reference. When the <samp>\end{document}</samp><a id="uid1718"></a> command is about to be
translated, <i>Tralics</i> will have created a big list (maybe empty) called the
`biblist´. Each item in the list has four slots:
Reference, Rtype, Bid and Definition. Here Reference is the cite key, Rtype
is a subtype (when merged, these two quantities give the `userid´; this
subtype is not standard LaTeX, you can ignore it. In some cases, two items
with the same Reference and different Rtype are considered unequal, in some
cases they are considered equal; thus, it is a bad idea to use the same cite
key with different subtypes). The Bid is the unique id of the target, of the
form `bid17´, and Definition is the internal number of the target of the
reference (in <i>Tralics</i>, each <span class="sansserif">XML</span> element has an internal number). You can
say: element number 25 is the target of reference `foo´ (syntax described
later). This will solve the entry: If the entry with key foo has Bid 17,
the action is to mark the entry as solved, and to add <span class="sansserif">id</span>=´bid17´ to the
element number 25. When the end of the document is sensed, the list of
unsolved entries is computed, and a request is made for constructing a
<span class="sansserif">bbl</span>. A warning or an error is signaled for missing items by this
construction. This <span class="sansserif">bbl</span> is then translated. It is forbidden to
add unresolved entries to the list. In BibTeX, there is cross reference
mechanism: if X has a cross reference to Y, then X must become before Y; when
Y is read, its fields are used to fill missing fields in X. Unless cited
explicitly, Y will not appear in the bibliography.</p>
<p>The variable <tt>distinguish_refer_in_rabib</tt> was introduced in 2006.
Since this is a long name, we shall abbreviate it to DRY. If it is true, we
distinguish `year´ and `refer´, otherwise there is no distinction. By default
the flag is true, you can set it on the com`mand line, or a configuration file.
For the case of the Raweb, three Rtypes are defined, `foot´<a id="uid1719"></a>,
`year´<a id="uid1720"></a> and `refer´<a id="uid1721"></a>. There is one command,
<samp>\footcite</samp>, to cite elements with Rtype `foot´ and a command, <samp>\cite</samp>,
for anything else. We generalized this mechanism: for all commands described
here, there is no difference between `year´ and an empty Rtype. If DRY is
false, the `refer´ is the same as `year´.
In 2006, commands <samp>\yearcite</samp> and <samp>\refercite</samp> have been introduced.
If DRY is false, these two commands behave the same.</p>
<p>The translation<a id="uid1722"></a> of `<samp>\footcite</samp> <samp>{Knuth}</samp>´ or `<samp>\footcite</samp>
<samp>[p.25]</samp> <samp>{Knuth}</samp>´
is the same as `<samp>\cite</samp> <samp>[foot]</samp> <samp>[]</samp> <samp>{Knuth}</samp>´ or
`<samp>\cite</samp> <samp>[foot]</samp> <samp>[p.25]</samp> <samp>{Knuth}</samp>´.
The translation of<a id="uid1723"></a> `<samp>\yearcite</samp> <samp>{Knuth}</samp>´
or `<samp>\refercite</samp><a id="uid1724"></a> <samp>{Knuth}</samp>´ is the same as
`<samp>\cite</samp> <samp>[year]</samp> <samp>[]</samp> <samp>{Knuth}</samp>´ or
`<samp>\cite</samp> <samp>[refer]</samp> <samp>[]</samp> <samp>{Knuth}</samp>´. These commands have an optional argument.
The <samp>\cite</samp><a id="uid1725"></a> command has two optional arguments, a type and an optional
value. If only one optional argument is given, it is the value (so that
`<samp>\cite</samp> <samp>[p.25]</samp> <samp>{Knuth}</samp>´ has the same meaning as in
LaTeX). The
translation of `<samp>\cite</samp> <samp>[x]</samp> <samp>[y]</samp> <samp>{z}</samp>´ is the
same as
`<samp>\cite@one</samp><a id="uid1726"></a> <samp>{x}</samp> <samp>{z}</samp> <samp>{y}</samp>´ (note the order of the
arguments). However, if you say `<samp>\cite</samp> <samp>[p.25]</samp>
<samp>{Knuth,Lamport}</samp>´, the result is the same as `<samp>\cite@one</samp>
<samp>{}</samp> <samp>{Knuth}</samp> <samp>{p.25}</samp>´, followed by
`<samp>\cite@one</samp> <samp>{}</samp> <samp>{Lamport}</samp> <samp>{}</samp>´, said otherwise,
the second optional argument
applies only to the first citation. Between two <samp>\cite@one</samp> commands (that
come from the same <samp>\cite</samp>) are inserted some
<samp>\citepunct</samp><a id="uid1727"></a> tokens. This is a command that can be
redefined by the user. Its expansion is a comma followed by a space.</p>
<p>People generally say `<samp>Text\footcite{blah}</samp>´, like
`<samp>Text\footnote{blah}</samp>´,
without any space, because <samp>\footcite</samp> is assumed to produce a footnote;
but this is not always the case; for this reason, the command
<samp>\footcitepre</samp><a id="uid1728"></a> is evaluated before insertion of the <span class="sansserif">XML</span> element associated to the citation. The default behavior is the following: if
the last object on the <span class="sansserif">XML</span> tree is a normal or non-breaking space, nothing
happens; otherwise, if the object is not an opening parenthesis, a space will
be added. Moreover, the <samp>\citepunct</samp> is replaced by
<samp>\footcitesep</samp><a id="uid1729"></a>, a command whose translation is comma
space (the idea is that you can redefine it, so that
`<samp>Text\footcite{foo,bar}</samp>´ shows as
`<samp>Text\textsuperscript{13,15}</samp>´, exercise left to the reader).
This is a slight difference between <samp>\footcite</samp> and <samp>\cite</samp> with
`foot´ as optional argument.</p>
<p>The command <samp>\nocite</samp><a id="uid1730"></a> can take one optional argument (a
Rtype). The effect of <samp>\nocite</samp><samp>{foo}</samp> is the same as <samp>\cite</samp>,
regarding the biblist, but it does not modify the <span class="sansserif">XML</span> tree. If you say
<samp>\nocite</samp><samp>{*}</samp>, this
inserts a special marker, meaning: the whole database should be inserted. The
Rtype is ignored in this case. Note that the correct behavior should be: Rtype
is ignored only if one of `year´, `refer´ or `foot´.</p>
<p>In order to implement the <span class="sansserif">natbib</span> package, we make the following
assumptions. The primitive command is <samp>\cite@one</samp><a id="uid1731"></a>, it takes a single
reference (defined by a Reference and a Rtype),
inserts when needed a new item in the biblist, and construct a Bid for the
reference. The command calls <samp>\leavevmode</samp><a id="uid1732"></a>,
for the case where it appears at the start of a paragraph (Remember the
recommendations given above: a paragraph should start with a word, not a
reference). The result of the translation is
<tt class="txt">&lt;ref target=´bid17´/&gt;</tt>, where `bid17´ should be replaced by the value of
the Bid. This element can be non-empty (it contains a note),
and is the child of <tt class="txt">&lt;cit&gt;</tt> element, that has
some attributes. The LaTeX companion, example 12-3-5, says that <samp>\citet</samp>
<samp>{LGC97}</samp> should produce `Goossens et al. (1997)´. The translation by
<i>Tralics</i> does not contain the name nor the year, so that there should be an
attribute that says how parentheses are to be inserted in the final HTML or
Pdf document. Another example is
<samp>\citep</samp> <samp>[see]</samp> <samp>[chap. 2]</samp> <samp>{LGC97}</samp>,
this produces
`(see Gossens et al., 1997, chap. 2)´. This does not really fit in our model:
we can put the post-note in the <tt class="txt">&lt;ref&gt;</tt> element, and the pre-note as an
attribute. This makes these two quantities asymmetric: the pre-note must
contain only characters. Consider now example 12-3-15, <samp>\citet</samp>
<samp>[cf.]</samp> <samp>[p. 55]</samp> <samp>{vLeunen:92, Knuth-CT-a}</samp>. Here the
pre-note is added to each citation, the post-note to the last one (the default
is to put the single note on the first element). The result
is `van Leunen (cf. 92); Knuth (cf. 1986, p.55)´. What <i>Tralics</i> should do in
such a case is unclear. The file <span class="sansserif">natbib.plt</span> defines
<samp>\citeyear</samp> and <samp>\citeyearpar</samp> as follows<a id="uid1733"></a></p>
<pre class="latex-code">\def\cite@type#1#2{{\def\cite@@type{#1}\cite{#2}}}
\def\citeyear{\cite@type{year}}
\def\citeyearpar{\cite@type{yearpar}}
</pre>
<p class="nofirst noindent">The idea is to call <samp>\cite</samp>, the dispatcher function, and to put locally in
<samp>\cite@@type</samp> the type of the citation (year, or parenthesized year).
There is also <samp>\cite@prenote</samp><a id="uid1734"></a> for the prenote. To be precise:
the translation of <samp>\cite@one</samp> <samp>{bar}</samp> <samp>{foo}</samp> <samp>{p25}</samp>
is <tt class="txt">&lt;cit</tt> <span class="sansserif">rend</span>=`bar´ <span class="sansserif">type</span>=`mtype´ <span class="sansserif">prenote</span>=`mynote´
<tt class="txt">&gt;&lt;ref</tt> <span class="sansserif">target</span>=`bid17´ <tt class="txt">/&gt; p25</tt><!--PASS THROUGH allowbreak--><tt class="txt">&lt;/cit&gt;</tt>, where
`mtype´ is the value of <samp>\cite@@type</samp>,
`mynote´ is the value of <samp>\cite@prenote</samp>. Arguments `foo´ and `bar´ define
the reference (normally, the Rtype `foo´ is empty).</p>
<p>You can say <samp>\XMLsolvecite*</samp><samp>[25]</samp><samp>[bar]</samp><samp>{foo}</samp><a id="uid1735"></a>. The star is
optional, as well as the `25´ and the `bar´. If only one optional argument is
given it is the first one. This should be the identifier of an <span class="sansserif">XML</span> element
(you can use <samp>\XMLlastid</samp><a id="uid1736"></a>, the identifier of the last
created element, or <samp>\XMLcurrentid</samp><a id="uid1737"></a>, the identifier of
the current element). The current element is used if the argument is missing
or empty. In any case, this gives an element, say Target.
The second optional argument is the Rtype. The required
argument is the cite key. The result of the command is to solve the entry
defined by the Reference and the Rtype. The easy case is when the reference
has not yet been cited. In this case, we can use as Bid either the id of the
Target, if it exists, or a new id. In this case, an attribute pair
<span class="sansserif">id</span>=`Bid´ is added to the Target. If the entry exists in the biblist,
it might be already solved, and you get an error of the form <i>Already
solved foo</i>. An attribute pair <span class="sansserif">id</span>=`Bid´ is added to the Target,
unless the Target has already an id, case where an error will be signaled,
for instance <i>Cannot solve (element has an Id) foo</i> in the case</p>
<pre class="latex-code">\cite{foo}\section{something}\XMLsolvecite{foo}
</pre>
<p class="nofirst noindent">The problem here is the following: the section element has a Uid, this is like
a Bid, it can be used as target of a <samp>\label</samp>. The <span class="sansserif">XML</span> norm forbids
using two ids for the same element. Maybe in a future version, this will be
allowed (it suffices to implement a double indirection mechanism). However, I
doubt if this is a good idea: if you say <samp>\label</samp><samp>{foo}</samp>,
then <samp>\ref</samp><samp>{foo}</samp> will
produce a <tt class="txt">&lt;ref&gt;</tt> element, this is identical to the <tt class="txt">&lt;ref&gt;</tt> that comes from
the <samp>\cite</samp>. Note that the Raweb <span class="sansserif">DTD</span> says: the target of a
<tt class="txt">&lt;ref&gt;</tt> in a <tt class="txt">&lt;cit&gt;</tt> should be a <tt class="txt">&lt;citation&gt;</tt>.</p>
<p>If a star is given in <samp>\XMLsolvecite</samp>, there is a little hack. If Reference/Rtype is not found in
the biblist, <i>Tralics</i> tries to see if there is an unsolved entry with the
same Reference, Rtype arbitrary. In such a case, this entry will be solved. If
there is no such entry, then a new slot is added to the reference list.</p>
<p>Some commands may produce strange results. Consider<a id="uid1738"></a></p>
<pre class="latex-code">\setbox0 =\hbox{\XMLsolvecite{foo}} \copy0 \copy0
\setbox1 =\xbox{Box}{\XMLsolvecite{bar}} \copy1 \copy1
</pre>
<p class="nofirst noindent">This constructs two empty boxes, with an id bid0 and bid1. Since the first box
is unnamed, the tag will not appear in the <span class="sansserif">XML</span> tree; and no tag implies no
attribute list, so that the first line is an error. On the other hand, the
second box is copied twice; hence the id bid1 appears twice in the <span class="sansserif">XML</span> tree,
this is also an error (the <span class="sansserif">XML</span> is well-formed, but not valid against any
<span class="sansserif">DTD</span> that says that the Bid should be an ID).</p>
<p>You can say <samp>\bibitem</samp><samp>[XX]</samp><samp>{foo}</samp><a id="uid1739"></a>, the
result is the same as <samp>\par</samp> <samp>\leavevmode</samp>
<samp>\XMLsolvecite*</samp> <samp>{foo}</samp>. The optional
argument is ignored. Note that the <samp>\par</samp> command terminates the current
paragraph, and <samp>\leavevmode</samp> starts a new paragraph (in LaTeX,
<samp>\bibitem</samp> calls <samp>\item</samp> that does more or less the same thing). The
important point is that this newly created <tt class="txt">&lt;p&gt;</tt> element is the target of
the reference. If you feed <i>Tralics</i> with the <span class="sansserif">bbl</span> of this document, produced
by LaTeX, you will
see something like</p>
<pre class="xml-code">&lt;Bibliography&gt;&lt;p id='bid0'&gt;
David Carlisle, Michel Goossens, and Sebastian Rahtz.
De XML à PDF avec &lt;hi rend='tt'&gt;xmltex&lt;/hi&gt; et Passive&lt;TeX/&gt;.
In &lt;hi rend='it'&gt;Cahiers Gutenberg&lt;/hi&gt;, number 35-36, pages 79&amp;ndash;114,
2000. &lt;/p&gt;
&lt;p id='bid1'&gt;
Michel Goossens, Frank Mittelbach, and Alexander Samarin.
&lt;hi rend='it'&gt;The &lt;LaTeX/&gt; companion&lt;/hi&gt;.
Addison Wesley, 1993.&lt;/p&gt;
</pre>
<p>On the other hand, translation of the second reference is:</p>
<pre class="xml-code">&lt;citation from='year' key='GMS93' id='bid4' userid='cite:companion'
type='book'&gt;
&lt;bauteurs&gt;&lt;bpers prenom='M.' nom='Goossens' prenomcomplet='Michel'/&gt;
&lt;bpers prenom='F.' nom='Mittelbach' prenomcomplet='Frank'/&gt;
&lt;bpers prenom='A.' nom='Samarin' prenomcomplet='Alexander'/&gt;&lt;/bauteurs&gt;
&lt;btitle&gt;The &lt;LaTeX/&gt; companion&lt;/btitle&gt;
&lt;bpublisher&gt;Addison Wesley&lt;/bpublisher&gt;
&lt;byear&gt;1993&lt;/byear&gt;
&lt;/citation&gt;
</pre>

<h2 id="uid1740">4.3. Using <i>Tralics</i> instead of BibTeX</h2>
<p>The content of the BibTeX database is a sequence of entries of the form</p>
<pre class="latex-code"><span class="prenumber">1</span> @article{example,
<span class="prenumber">2</span>   Author= "Joseph Garrigue and Didier R{\'e}my",
<span class="prenumber">3</span>   Title=   "Extending {ML} with semi-explicit higher-order polymorphism",
<span class="prenumber">4</span>   Number=  "1/2",
<span class="prenumber">5</span>   Volume=  155,
<span class="prenumber">6</span>   Year=    1999,
<span class="prenumber">7</span>   Pages=   "134-169",
<span class="prenumber">8</span>   Journal= "Journal of Functional Programming",
<span class="prenumber">9</span>   Remark=  {a random example},
<span class="prenumber">10</span>   OptMonth = jan,
<span class="prenumber">11</span>   Url=     "ftp://ftp.inria.fr/INRIA/Projects/Cristal/iandc.ps.gz"}
</pre>
<p>This is a second example.</p>
<pre class="latex-code"><span class="prenumber">12</span> @PhdThesis{thesefabien,
<span class="prenumber">13</span>   author =       {Seyfert, Fabien},
<span class="prenumber">14</span>   title =        {Problèmes extrémaux dans les espaces de Hardy,
<span class="prenumber">15</span>     Application à l'identification de filtres hyperfréquences à
<span class="prenumber">16</span>     cavités couplées},
<span class="prenumber">17</span>   school =       {Ecole de Mines de Paris},
<span class="prenumber">18</span>   year =         1998
<span class="prenumber">19</span> }
</pre>

<p>These examples are translated by BibTeX as follows</p>
<pre class="latex-code">\bibitem{example}
Joseph Garrigue and Didier R{\'e}my.
\newblock Extending {ML} with semi-explicit higher-order polymorphism.
\newblock {\em Journal of Functional Programming}, 155(1/2):134--169, 1999.
 
\bibitem{thesefabien}
Fabien Seyfert.
\newblock {\em Problèmes extrémaux dans les espaces de Hardy, Application à
  l'identification de filtres hyperfréquences à cavités couplées}.
\newblock PhD thesis, Ecole de Mines de Paris, 1998.
</pre>
<p>After the @ character, there is a keyword, or an entry type.
The recognized entry types are article<a id="uid1741"></a>,
book<a id="uid1742"></a>,
booklet<a id="uid1743"></a>,
conference<a id="uid1744"></a>,
coursenotes<a id="uid1745"></a>,
inbook<a id="uid1746"></a>,
incollection<a id="uid1747"></a>,
manual<a id="uid1748"></a>,
masterthesis<a id="uid1749"></a>,
misc<a id="uid1750"></a>,
phdthesis<a id="uid1751"></a>,
techreport<a id="uid1752"></a>,
unpublished<a id="uid1753"></a>, as well as
mastersthesis<a id="uid1754"></a>,
a synonym of masterthesis. These types are not part of the BibTeX language,
but are described in any good book about LaTeX, they are the only ones
recognized by <i>Tralics</i>. The case is irrelevant (in one example, we have
`article´ in lower case, in the other, we have `PhdThesis´, mixed case).
Since <i>Tralics</i>2.9.1, you can extend the list of known types, by putting a
line like the following in the configuration file (this will define the types
`hdr´ and `movie´):</p>
<pre class="latex-code">bibtex_extensions = "hdr movie"
</pre>
<p>There are three keywords. The first is `comment´<a id="uid1755"></a>. If you say
<samp>@comment{foo}</samp>, this makes `foo´ a comment. Since everything outside the
scope of a keyword or an entry is discarded, there is no real need for a
comment keyword, or a comment character. In particular, the percent sign is
not a comment character inside a BibTeX file. If you insert a percent sign in
a field, you have to remember that BibTeX will replace newline characters by
spaces, and insert newline characters in the <span class="sansserif">bbl</span> file
wherever it judges adequate. Hence, the percent character will behave, in the
<span class="sansserif">bbl</span>, as a comment character with a random scope.</p>
<p>The second keyword is `string´<a id="uid1756"></a>. It defines a string, for instance
<samp>@string{Foo=&#8220;bar&#8221;}</samp> defines the string
`foo´ (the case is irrelevant) with value `bar´. In the example, there is
a string after the equals sign, but any expression could be used, including
one that uses macros. A macro must be defined before its use; it is always
possible to redefine the macro. There are 12 predefined macros; there are
jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec,<a id="uid1757"></a>.
You can see a use of `jan´ on line 10. These macros are defined by every bst
file, to be `janvier´, `January´ or `Januar´, depending on the language (since
there is no way to tell BibTeX what the current language is, there are two
solutions: either write <span class="sansserif">frplain.bst</span>, that is a copy of
<span class="sansserif">plain.bst</span>, with all keywords translated into French, or use
indirection: the value is <samp>\bbljan{}</samp>, a LaTeX command defined in a
style file depending on the current language. In <i>Tralics</i>, these strings are
defined at bootstrap, to be English names, and redefined
when <samp>\begin{document}</samp><a id="uid1758"></a> is seen. This
gives you a chance to select the correct language. Only Frech, English and
German are known languages.</p>
<p>The last keyword is `preamble´<a id="uid1759"></a>. If you say
<samp>@preamble{&#8220;foo&#8221;}</samp>, the effect is to add the string
`foo´ to the preamble. More than one preamble keyword can be given, they will be
merged, in order. Standard bibliography styles print the preamble at the start
of the <span class="sansserif">bbl</span> file, just before the <samp>\begin{thebibliography}</samp>. In
<i>Tralics</i>, the string is inserted at the start of the file, but the environment
is implicit. The string should not produce text, otherwise strange errors are
signaled, of the form <i>Error signaled at line 4: Non-empty buffer
</i><i><tt>foo</tt></i><i> Some text may be lost.</i>, because only
bibliographic entries are allowed in the bbl; you can cheat by
changing the current mode via <samp>\@setmode</samp>).
Instead of <samp>&#8220;foo&#8221;</samp>, a general value can be
used, for instance <samp>@preamble{jan}</samp> puts January in the preamble.
<i>Note:</i> Instead of braces, you can use parentheses to delimit
the value of an entry, a string or the preamble. Inside the value, you can
use braces instead of double quotes. Thus <samp>@preamble({foo})</samp> is a
valid preamble.</p>
<p>After an entry type comes the cite key, followed by a sequence of pairs, of
the form field=value, separated by commas.
The following field names are recognized:
address,<a id="uid1760"></a>
author, <a id="uid1761"></a>
booktitle,<a id="uid1762"></a>
chapter<a id="uid1763"></a>,
crossref<a id="uid1764"></a>,
doi<a id="uid1765"></a>,
edition<a id="uid1766"></a>,
editor<a id="uid1767"></a>,
howpublished<a id="uid1768"></a>,
institution<a id="uid1769"></a>,
isbn<a id="uid1770"></a>,
isrn<a id="uid1771"></a>,
issn<a id="uid1772"></a>,
journal<a id="uid1773"></a>,
key<a id="uid1774"></a>,
month<a id="uid1775"></a>,
note<a id="uid1776"></a>,
number<a id="uid1777"></a>,
organization<a id="uid1778"></a>,
pages<a id="uid1779"></a>,
publisher<a id="uid1780"></a>,
school<a id="uid1781"></a>,
series<a id="uid1782"></a>,
title<a id="uid1783"></a>,
type<a id="uid1784"></a>,
url<a id="uid1785"></a>,
volume<a id="uid1786"></a>,
year<a id="uid1787"></a>.
The case is irrelevant. If a field name is given, whose value is not in the
previous list, it will be ignored. In the example, line 10, we have an unused
field, `OptMonth´ (some text editors propose templates where optional fields
like `month´ are preceded by `opt´, and sometimes people forget to remove the
prefix). In the first example, field names start with an initial capital, and
there is no space on the left of the equals sign, in the second, field names
are all lower case, there is a space on the left of the equals sign, and
opening braces are vertically aligned (this is the template proposed by
Emacs); these subtleties are ignored by <i>Tralics</i>.</p>
<p>If the configuration file contains line like</p>
<pre class="latex-code">bibtex_fields = "firstpage lastpage"
bibtex_fields = "+allpages"
</pre>
<p class="nofirst noindent">then three additional fields are read by <i>Tralics</i>, namely firstpage,
lastpage, and allpages. They will be inserted in the XML tree, after other
fields, but before the `note´, via a call to <samp>\cititem</samp>.</p>
<p>The value of a field can be a number (lines 5 and 6 in the example), or a
macro name (as on line 10), or a constant in braces (line 9), or a constant in
double quotes (other lines). It is possible to concatenate basic fields, for
instance <samp>apr # "~1"</samp>, via the use of the sharp operator. The way BibTeX handles braces, quotes and backslashes is a bit special. When BibTeX parses
a value, there should be as many opening braces than closing braces; trying to
put a backslash before a brace has no effect<a id="uid1788" href="#note54" title="This is not true in Tralics; you must escape this characters."><small>(note: </small>&#10163;<small>)</small></a>.
If a string is delimited by
double quotes, then braces are needed to hide double quotes. Special characters
should be entered as <samp>{\´e}</samp>, never as <samp>\´{e}</samp>,
but Tralics accepts <samp>é</samp>; in fact, any Unicode character is accepted,
provided that you declare the proper encoding. The case of a non-ascii
character is undefined. When looking for a particle in a name, <i>Tralics</i> must
decide whether a character is upper case or not, and when sorting, the whole
string is converted into lower case letters. In the case of <samp>{\´e}</samp>,
the whole group is converted by BibTeX to the single letter e; <i>Tralics</i> leaves it unchanged; in the same fashion, <samp>é</samp> is left unchanged (it is
represented internally in UTF8 as the two bytes <samp>Ã©</samp>).</p>
<p>Assume that <i>Tralics</i> has seen <samp>@article</samp>, then an opening brace or parenthesis,
followed by <samp>example</samp>. All fields up to the closing brace (or parenthesis) are
read, but, if the entry is useless, no
error is signaled in case of undefined macros, or duplicate fields. If an
entry is useful, all fields are remembered; if it
has a crossref<a id="uid1789"></a> to an entry X, then X becomes useful. Remember:
each entry has a Rtype, this is in general empty; it is added as a prefix
to the cite key. For instance, `thesefabien´ gives
`footcite:thesefabien´. In the case of a crossreference from Y to X, we use
as prefix for X the prefix of Y. An entry can be useful because the user has
said <samp>\nocite</samp><samp>{*}</samp><a id="uid1790"></a>. There is a special hack for the Raweb: we
have three types of entries, `foot´<a id="uid1791"></a>,
`year´<a id="uid1792"></a> and
`refer´<a id="uid1793"></a>. We already mentioned that the types `year´ and `refer´
could be the same as the empty type.
The difference is that <samp>\nocite</samp> applies
only to entries from the file `year´, never to `foot´ (there is an implicit
<samp>\nocite</samp> for `refer´).<a id="uid1794"></a></p>
<p>An entry is useful because it is cited (by <samp>\cite</samp> or <samp>\nocite</samp>).
Since BibTeX is generally case insensitive,
the entry shown above is useful if you say <samp>\cite</samp><samp>{Example}</samp>. However, for
LaTeX, <samp>\cite</samp><samp>{Foo}</samp> and <samp>\cite</samp><samp>{fOO}</samp> are two different items, as a
consequence, two references are needed. Thus, an entry named `foo´ is
ambiguous. For this reason, you should always capitalize entries in a
consistent way (say, use always lowercase letters), and use the same method in
the LaTeX document.</p>
<p>After some manipulations, the entry is printed on the <span class="sansserif">bbl</span> like this (BibTeX version)</p>
<pre class="latex-code"><span class="prenumber">20</span> \citation {GR99a}{example}{article}
<span class="prenumber">21</span> \bauteurs{\bpers\RAo J.\RAb \RAb Garrigue\RAb \RAf \bpers\RAo D.\RAb \RAb
<span class="prenumber">22</span>   R{\'e}my\RAb \RAf }
<span class="prenumber">23</span> \cititem{btitle}{Extending {ML} with semi-explicit higher-order polymorphism}
<span class="prenumber">24</span> \cititem{bjournal}{Journal of Functional Programming}
<span class="prenumber">25</span> \cititem{bnumber}{1/2}
<span class="prenumber">26</span> \cititem{bvolume}{155}
<span class="prenumber">27</span> \cititem{byear}{1999}
<span class="prenumber">28</span> \cititem{bpages}{134--169}
<span class="prenumber">29</span> \url{ftp://ftp.inria.fr/INRIA/Projects/cristal/iandc.ps.gz}
<span class="prenumber">30</span> \endcitation
</pre>
<p>or like that (<i>Tralics</i> version)</p>
<pre class="latex-code"><span class="prenumber">31</span> \citation{60}{footcite:thesefabien}{bid9}{foot}{phdthesis}[Sey98]
<span class="prenumber">32</span> \bauthors{\bpers[Fabien]{F.}{}{Seyfert}{}}
<span class="prenumber">33</span> \cititem{btitle}{Problèmes extrémaux dans les espaces de Hardy, Application
<span class="prenumber">34</span> à l'identification de filtres hyperfréquences à cavités couplées}
<span class="prenumber">35</span> \cititem{btype}{Ph. D. Thesis}
<span class="prenumber">36</span> \cititem{bschool}{Ecole de Mines de Paris}
<span class="prenumber">37</span> \cititem{byear}{1998}
<span class="prenumber">38</span> \endcitation
</pre>
<p class="nofirst noindent">There are some slight differences between these two entries. If you compare
lines 20 and 31, you can see that the number of arguments of the
<samp>\citation</samp> command has changed from three in the original version to six in
the current version. The following were added: the type (here `foot´),
the unique id (here `bid9´), the numerical print key (here `60´). The first entry
was created by BibTeX, that cannot guess the Rtype of the reference nor the
<i>Tralics</i> unique id. It could have computed the number 60, but we initially
thought that only one of the two keys were useful (in the current version,
the <samp>\citation</samp><a id="uid1795"></a> command takes five arguments, plus an
optional one after these.) If you compare lines 21 and 32, you can notice two
differences. First, we have decided, in 2005, to add an optional argument to
the <samp>\bpers</samp><a id="uid1796"></a> command (it contains the full first name). This
might be used for the Ra2005. The second difference is that it is impossible,
in BibTeX, to print braces inside a name. Thus we used <samp>\RAo</samp> for an
opening brace, <samp>\RAf</samp> for a closing brace and <samp>\RAb</samp> for a pair of
closing and opening braces. Omitting the first line, the fields are printed
in the following order:</p>
<ol>
<li id="uid1797"><p class="nofirst noindent">Unless the type is proceedings, the author.</p>
</li>
<li id="uid1798"><p class="nofirst noindent">In the case of a book or inbook, the editor.</p>
</li>
<li id="uid1799"><p class="nofirst noindent">The title.</p>
</li>
<li id="uid1800"><p class="nofirst noindent">In the case of proceedings or incollection, the editor.</p>
</li>
<li id="uid1801"><p class="nofirst noindent">In the case of an article, the journal, number, and volume.</p>
</li>
<li id="uid1802"><p class="nofirst noindent">In the case of a book or inbook, the edition, series, number, volume,
publisher, address.</p>
</li>
<li id="uid1803"><p class="nofirst noindent">In the case of a booklet, the howpublished and address.</p>
</li>
<li id="uid1804"><p class="nofirst noindent">In the case of incollection, the booktitle, series, number, volume,
publisher, address.</p>
</li>
<li id="uid1805"><p class="nofirst noindent">In the case of inproceedings or conference, the booktitle, series,
number, volume, organization, publisher, editor, pages, address.</p>
</li>
<li id="uid1806"><p class="nofirst noindent">In the case of a manual, the organization, edition, address.</p>
</li>
<li id="uid1807"><p class="nofirst noindent">In the case of masterthesis, coursenotes, or phdthesis, the type, school,
and address.</p>
</li>
<li id="uid1808"><p class="nofirst noindent">In the case of a techreport, the type, number, institution, address.
(For the case of masterthesis, phdthesis and techreport, the type has a default
value, that depends on the language, and is initialized together with the
`jan´ macro).</p>
</li>
<li id="uid1809"><p class="nofirst noindent">In the case of misc, the howpublished, editor, booktitle, series,
number, volume, publisher, address.</p>
</li>
<li id="uid1810"><p class="nofirst noindent">In the case of proceedings, the organization, series, number, volume,
publisher, address.</p>
</li>
<li id="uid1811"><p class="nofirst noindent">In any case, the month, year.</p>
</li>
<li id="uid1812"><p class="nofirst noindent">In the case of inbook or incollection, the chapter.</p>
</li>
<li id="uid1813"><p class="nofirst noindent">In the case of inbook, incollection, article or proceedings, the pages.</p>
</li>
<li id="uid1814"><p class="nofirst noindent">In any case, the doi, url, additional fields, note.</p>
</li>
<li id="uid1815"><p class="nofirst noindent">In the case of an extension, all fields mentioned above are considered,
in some order.</p>
</li></ol>
<p>This may seem confusing (is there a standard way for formating entries?).
Note that missing fields are not printed.
In some case, BibTeX prints a message like
&#8220;there´s a number but no series&#8221; or
&#8220;can´t use both volume and number&#8221;. No such message is printed by <i>Tralics</i>.</p>
<p>Two keys are computed, the `Sey98´ or `GR99a´ in the example, and the sort
key<a id="uid1816"></a>, which is something longer. In fact, handling the author
or editor field
produces four characters strings <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>1</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>2</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>3</mn> </msub></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>4</mn> </msub></math></span>.
The <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>4</mn> </msub></math></span> string is the argument of the
<samp>\bauthors</samp><a id="uid1817"></a> or <samp>\beditors</samp><a id="uid1818"></a> (see lines 21, 32).
The <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>1</mn> </msub></math></span> string is `Sey´ or `GR´, the <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>2</mn> </msub></math></span> string contains the full name
(it is like <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>4</mn> </msub></math></span>, without the full first name, and braces)
and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>3</mn> </msub></math></span> contains only the last name (not the first name).</p>
<p>We consider the author (the editor in the case of proceedings).
This may give a triple <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>1</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>2</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>3</mn> </msub></math></span>, unless the field is missing.
If it is missing, we consider the `key´<a id="uid1819"></a> field. If it is not empty,
then <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>1</mn> </msub></math></span> is formed of the first three characters of the field, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>2</mn> </msub></math></span> is
empty, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>3</mn> </msub></math></span> is the field. If it is empty, we consider the editor (author, in
case of proceedings). If this is empty, we consider the cite key, handle it
like the `key´ above. Note: in the case of `<samp>Lo{\&#8220;i}c</samp>´ the first three
characters are `<samp>Lo{\&#8220;i}</samp>´, the last two characters are `<samp>{\&#8220;i}c</samp>´. In the
case of `<samp>Lo\&#8220;ic</samp>´, asking for the first three or last two characters gives
the full string. The last two characters of the year are added to <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>1</mn> </msub></math></span>,
so that we may obtain `GR99´. This gives the print label.
The LaTeX companion says that you can use
<samp>year=&#8221;{\SortNoop{86}}1991"</samp>. With the rules above, the last
two characters of the year are `91´. However, <i>Tralics</i> uses the full year,
not `861991´ when it computes the sort key. In the case when <i>Tralics</i> processes the Raweb for, say
year 2003, if a reference has type `year´, then its year field should not be
missing, and should be `2003´. Otherwise an error is signaled<a id="uid1820" href="#note55" title="No error is signaled if you invoke Tralics with the switch `nobibyearerror´"><small>(note: </small>&#10163;<small>)</small></a>.
The sort key is computed as follows: first a prefix, then the cite label,
then <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>2</mn> </msub></math></span>, then the year, then the title. All characters are converted to
lower case.
Note: when BibTeX converts <samp>{\´E}</samp> to lower case, the result is
`e´. Converting `É´ can produce strange results. Such subtleties do not exist
in <i>Tralics</i> (the style sheet that converts the <span class="sansserif">XML</span> to <span class="sansserif">HTML</span> sorts all
entries; how can we tell it that the author used a <samp>\SortNoop</samp> command?).</p>
<p>Note: <i>Tralics</i> defines <samp>\sortnoop</samp><a id="uid1821"></a> to gobble its argument. On the
other hand, the BibTeX interpreter, when computing the title part of the sort
key, in the case of <samp>{\noopsort foo}</samp>
removes the command and the braces; the same is done for <samp>\SortNoop</samp><a id="uid1822"></a>
and <samp>\noopsort</samp><a id="uid1823"></a>. In a case like <samp>title=&#8220;study of {$H^p$},
part {I}&#8221;</samp> it removes the braces (character after opening brace must be
dollar or upper case letter). The reason for this is that otherwise `part II´
comes before `part I´, and this looks silly.</p>
<p>Because of this sort-again, we try to be clever. Said otherwise, for the
Raweb, and only the Raweb, we use a prefix, formed of a letter and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>L</mi> <mn>3</mn> </msub></math></span>.
The prefix 0 for an entry of Rtype `refer´, 1 for an entry of Rtype `foot´,
and for entries of Rtype `year´, it is:
2 for book, booklet, proceedings, 3 for
phdthesis, 4 for article, inbook, incollection,
5 for conference, inproceedings,
6 for manual, techreport, coursenotes,
7 for masterthesis, misc, unpublished.
These numbers are indices into a table. Currently the order is 02345671.
In a future version, this might be changed (however, the result should be
compatible with the style sheets described in the second part of this report).</p>
<p>Let´s repeat: for the Raweb case, we have in the sort key a prefix that
depends on the type and Rtype, followed by the author names, the print
key, the full author names, the year, the title. In this case, the content
of the <span class="sansserif">bbl</span> will be as on line 31: the first argument of
<samp>\citation</samp> is not the print key, but the index of the reference in the
table after sorting. On the other hand, for the non-Raweb case, the sort
key starts with the print key, the <span class="sansserif">bbl</span> looks like line 20. The
important point is: assume that we have two entries with the same print key,
say `GR99´; we must change them to `GR99a´ and `GR99b´, this is easy to do
when they are consecutive. The following piece of code comes from a standard
<span class="sansserif">bst</span> file. Parsing a <span class="sansserif">bst</span> file is rather easy (maybe one day, <i>Tralics</i> will do
it). The important point is that a postfix language is used: instead of: if a
then b else c, you say: a b c if. This piece of code computes a suffix for
every entry that has the same key as the previous one.</p>
<pre class="latex-code"><span class="prenumber">39</span> FUNCTION {forward.pass}
<span class="prenumber">40</span> { last.sort.label sort.label =
<span class="prenumber">41</span>     { last.extra.num #1 + 'last.extra.num :=
<span class="prenumber">42</span>       last.extra.num int.to.chr$ 'extra.label :=
<span class="prenumber">43</span>     }
<span class="prenumber">44</span>     { "a" chr.to.int$ 'last.extra.num :=
<span class="prenumber">45</span>       "" 'extra.label :=
<span class="prenumber">46</span>       sort.label 'last.sort.label :=
<span class="prenumber">47</span>     }
<span class="prenumber">48</span>   if$
<span class="prenumber">49</span> }
</pre>
<p class="nofirst noindent">Here is the companion routine, executed in reverse order. Its purpose is to
add the `a´ suffix when the next entry has a `b´ suffix. There is a piece of
code, not shown here, that computes the longest label. This is sometimes
nonsense (consider the `De La Cruz´ case below).</p>
<pre class="latex-code"><span class="prenumber">50</span> FUNCTION {reverse.pass}
<span class="prenumber">51</span> { next.extra "b" =
<span class="prenumber">52</span>     { "a" 'extra.label := }
<span class="prenumber">53</span>     'skip$
<span class="prenumber">54</span>   if$
<span class="prenumber">55</span>   label extra.label * 'label :=
<span class="prenumber">56</span>   extra.label 'next.extra :=
<span class="prenumber">57</span> }
</pre>
<p>In summary, when <i>Tralics</i> is used instead of BibTeX, the following happens.
We have a big entry list, and a list of typed databases. From the entry list,
we consider only unsolved ones. For each entry, a prefix is computed, for
instance, `footcite:fabien´, by considering the Rtype, the word `cite:´ and
the cite key. If the Rtype is anything else than `foot´, an empty value will
be used.<a id="uid1824" href="#note56" title="But the prefix `refer´ is kept if the current year is at least 2006, and the magic switch distinguis..."><small>(note: </small>&#10163;<small>)</small></a>
When an entry with cite key `foo´ is read from a database of type
`bar´, the same mechanism is applied. The type of a database is currently
one of `year´, `refer´ or `foot´ (the default being `year´). We plan the
extend this mechanism: more than these three types can be used; `year´
and `refer´ are sometimes the same as empty, but `refer´ has an implicit <samp>\nocite</samp>.</p>
<p>All entries from the database files are read, and stored if useful. For each
entry X that has a crossreference to Y, missing fields in X are copied from
Y. After that Y is discarded (unless cited via <samp>\cite</samp> or <samp>\nocite</samp>). An
error is signaled in case some references are undefined. After that, the sort
label is computed, entries are sorted, the print label is computed, and
everything is printed on the <span class="sansserif">bbl</span> file. This is <span class="sansserif">apics_.bbl</span> if the jobname is
`apics´. Note the underscore in the name.</p>
<p>This is the <span class="sansserif">XML</span> version of the reference above, as used in the Raweb2004.</p>
<pre class="xml-code"><span class="prenumber">58</span> &lt;citation from='foot' key='60' id='bid9' userid='footcite:thesefabien'
<span class="prenumber">59</span>   type='phdthesis'&gt;
<span class="prenumber">60</span> &lt;bauteurs&gt;&lt;bpers prenom='F.' part='' nom='Seyfert' junior=''&lt;/bauteurs&gt;
<span class="prenumber">61</span> &lt;btitle&gt;Problèmes extrémaux dans les espaces de Hardy,
<span class="prenumber">62</span>    Application à l'identification de filtres hyperfréquences à cavités
<span class="prenumber">63</span> couplées&lt;/btitle&gt;
<span class="prenumber">64</span> &lt;btype&gt;Ph. D. Thesis&lt;/btype&gt;
<span class="prenumber">65</span> &lt;bschool&gt;Ecole de Mines de Paris&lt;/bschool&gt;
<span class="prenumber">66</span> &lt;byear&gt;1998&lt;/byear&gt;
<span class="prenumber">67</span> &lt;/citation&gt;
</pre>

<h2 id="uid1825">4.4. The format of a name</h2>
<p>We shall discuss in this section how names can be used in a BibTeX file, and
how <i>Tralics</i> constructs keys. We have already mentioned a procedure that
gives `Sey´ from `Seyfert´. It is not satisfactory, but is used only in rare
cases (when the year is strange, or a strange key has been used). The
important point that, when we fetch the first three letters of <samp>Lo\&#8220;ic</samp>, we do
not obtain neither `<samp>Lo\</samp>´ nor `<samp>Lo\&#8221;</samp>´. The mechanism explained here is more
subtle. The LaTeX companion explains that, in order to get `Göd´ for the
key, you should use one of the first names shown here, not the others.</p>
<pre class="latex-code"> author = {A. G{\"o}del and  B. G{\"{o}}del},
 editor = {C. {G{\"{o}}del} and D. {G\"{o}del}}
</pre>

<p>The rule is that special BibTeX characters are formed by a left brace
followed by a backslash. In the case C, the brace in inside another brace.
In fact, if the bibliography contains the following</p>
<pre class="latex-code"><span class="prenumber">68</span> @Article{GoA,
<span class="prenumber">69</span>   author = {A. G{\"o}del      }, title="X"}
<span class="prenumber">70</span> @Article{GoB,
<span class="prenumber">71</span>   author = {B. G{\"{o}}del    }, title="X" }
<span class="prenumber">72</span> @Article{GoC,
<span class="prenumber">73</span>   author = {C. {G{\"{o}}del}  }, title="X" }
<span class="prenumber">74</span> @Article{GoD,
<span class="prenumber">75</span>   author = {D. {G\"{o}del}    }, title="X" }
</pre>
<p class="nofirst noindent">then the translation by <i>Tralics</i>2.9 looks like this. If you compare with lines
60 and 61 above, you can see that the full first name appears, empty attribute
pairs <span class="sansserif">part</span> and <span class="sansserif">junior</span> are not shown.</p>
<pre class="xml-code"><span class="prenumber">76</span> &lt;biblio&gt;
<span class="prenumber">77</span> &lt;citation from='year' key='Ga' id='bid2' userid='cite:GoC' type='article'&gt;
<span class="prenumber">78</span> &lt;bauteurs&gt;&lt;bpers prenom='C.' nom='Gödel' prenomcomplet='C.'/&gt;&lt;/bauteurs&gt;
<span class="prenumber">79</span> &lt;btitle&gt;X&lt;/btitle&gt;
<span class="prenumber">80</span> &lt;/citation&gt;
<span class="prenumber">81</span> &lt;citation from='year' key='Gb' id='bid3' userid='cite:GoD' type='article'&gt;
<span class="prenumber">82</span> &lt;bauteurs&gt;&lt;bpers prenom='D.' nom='Gödel' prenomcomplet='D.'/&gt;&lt;/bauteurs&gt;
<span class="prenumber">83</span> &lt;btitle&gt;X&lt;/btitle&gt;
<span class="prenumber">84</span> &lt;/citation&gt;
<span class="prenumber">85</span> &lt;citation from='year' key='Göd' id='bid0' userid='cite:Goa' type='article'&gt;
<span class="prenumber">86</span> &lt;bauteurs&gt;&lt;bpers prenom='A.' nom='Gödel' prenomcomplet='A.'/&gt;&lt;/bauteurs&gt;
<span class="prenumber">87</span> &lt;btitle&gt;X&lt;/btitle&gt;
<span class="prenumber">88</span> &lt;/citation&gt;
<span class="prenumber">89</span> &lt;citation from='year' key='Göd' id='bid1' userid='cite:GoB' type='article'&gt;
<span class="prenumber">90</span> &lt;bauteurs&gt;&lt;bpers prenom='B.' nom='Gödel' prenomcomplet='B.'/&gt;&lt;/bauteurs&gt;
<span class="prenumber">91</span> &lt;btitle&gt;X&lt;/btitle&gt;
<span class="prenumber">92</span> &lt;/citation&gt;&lt;/biblio&gt;
</pre>
<p class="nofirst noindent">The same file processed by BibTeX gives the following keys:
<samp>{G{\"}}a</samp>, <samp>{G\"}b</samp>, <samp>G{\&#8220;o}da</samp> and
<samp>G{\&#8221;{o}}db</samp>. The first two keys are
invalid. The reason why
suffixes a and b are added is that a special BibTeX function removes braces
and funny characters when comparing keys. Such a function is not
implemented in <i>Tralics</i>, thus labels <samp>G{\&#8220;o}</samp> and
<samp>G{\&#8221;{o}}d</samp> are considered
different, although their translation is the same. In <i>Tralics</i>, the best thing
to do is use `Gödel´ as name.</p>
<p>Since lots of errors may be found in bibliography files, <i>Tralics</i> tries to be
clever. First, it replaces `<samp>\c{c}</samp>´ by `<samp>ç</samp>´ and
`<samp>\c{C}</samp>´ by `<samp>Ç</samp>´. It also
replaces `<samp>\v {c}</samp>´ by `<samp>{\v c}</samp>´.
Expressions of
the form <samp>\a´e</samp> are replaced by
<samp>\´e</samp>. We also replace backslash-space by a single space.
Maybe other replacements of this kind will be made in a future version. For
instance, we could expand all accent characters, and interpret double-hat
constuct, so that `<samp>é</samp>´, `<samp>\´e</samp>´, and `<samp>^^e9</samp>´ are
interpreted in the same way (the translation is the same).</p>
<p>After that, characters or group of characters are classified, this will make
parsing easier. A sequence like `<samp>{foo}</samp>´ will be considered as a single
random character; something like <samp>\´e</samp> as a single lower case letter,
<samp>\´E</samp> as a single uppercase letter. The expression <samp>\´{e}</samp>
will be replaced by <samp>{\´e}</samp> with a warning, <samp>\"\i</samp> will be
rejected (unless inside braces) because a single character is needed after
backslash-accent. Commands like
<samp>\foo</samp> are also rejected. Note that an ampersand <samp>&amp;</samp> is an error (some people
try to use this instead of `<samp>and</samp>´). Character categories are: space, comma,
dash, and tie (this is a <samp>~</samp>). In a case like this,</p>
<pre class="latex-code"><span class="prenumber">93</span> @Article{cruz,
<span class="prenumber">94</span>   author = {Maria {\MakeUppercase{d}e La} Cruz},
<span class="prenumber">95</span> title="X" }
</pre>
<p class="nofirst noindent">the print key computed by BibTeX is
<samp>{\MakeUppercase{d}e La}C</samp>, this typesets as `De LaC´. Such a construct is not
understood by <i>Tralics</i>, that thinks that the last name is `Cruz´.</p>
<p>If more than one author is given, in the author or editor list, you should use
`<samp>and</samp>´ as separator. Case is irrelevant, a space is required. For instance, the
following citation contains 3 authors and others. The print key is `AAJA+´,
because the last author has a double last name.</p>
<pre class="latex-code"><span class="prenumber">96</span> @Article{many,
<span class="prenumber">97</span>   author = {Joe~And and And,Joe and Joe-And And others}
<span class="prenumber">98</span> title="X" }
</pre>
<p class="nofirst noindent">The BibTeX transformation of this is</p>
<pre class="latex-code"><span class="prenumber">99</span> \bibitem[AAJA{\etalchar{+}}]{many}
<span class="prenumber">100</span> Joe And, Joe And, Joe-And, et~al.
</pre>
<p>If the list is too long, you can use `<samp>others</samp>´ as the last name (case is
important). A name has four components: von, First, Last and Junior. On line
32, you can see the value of the full first name, then the abbreviated first
name, then the von part (empty) then the last name, then the junior part
(empty). In <i>Tralics</i>, the von part is always merged with the last
name.
Consider somebody named Jean de la Fontaine. French rules say that the
particle `de´ should be omitted, unless preceded by the first name or a word
like `Monsieur´. In particular, in the dictionary, you will find him between
La Follette (an American politician) and Lafontaine (a Canadian politician),
not between Delacroix and Delage. More interesting is the case of Marie
Joseph Gilbert Motier, marquis de La Fayette. The name of this guy is
`Motier´, but he is known as `La Fayette´. Another example is William Thomson
(For his work on the transatlantic cable Thomson was created
Baron Kelvin of Largs in 1866. The Kelvin is the river which runs through the
grounds of Glasgow University and Largs is the town on the Scottish coast
where Thomson built his house.) How this guy should be cited is unclear:
William Thomson or Lord Kelvin?</p>
<p>The simple case is when two fields are given, with a comma between. The first
field is the last name, the other field is the first name. Then comes the case
of three fields: last name, junior, and first name. You cannot use more than
three fields, that is, you cannot give more than two commas. In the case no
comma is given, we look at a `von´ part. This is something that starts at a
lower case letter. For instance,</p>
<pre class="latex-code"><span class="prenumber">101</span> @Article{poussin,
<span class="prenumber">102</span>   author = {Charles Louis Xavier Joseph de la Vall{\a'e}e Poussin   },
<span class="prenumber">103</span> title="X" }
</pre>
<p class="nofirst noindent">This is what BibTeX puts in the <span class="sansserif">bbl</span> file:</p>
<pre class="latex-code"><span class="prenumber">104</span> \bibitem[dlVP]{poussin}
<span class="prenumber">105</span> Charles Louis Xavier~Joseph de~la Vall{\a'e}e~Poussin.
<span class="prenumber">106</span> \newblock X.
</pre>
<p class="nofirst noindent">The translation by <i>Tralics</i> is the same, but no ties are inserted (BibTeX inserts one for the first name, the von part, the last name, see TeXbook,
page 92); in my opinion, it is better to split a line between two names,
rather than split a name (what hyphenation patterns should be used in a case
like `Michel Goosens´, the current patterns, here english, or those found in
the bibliography, thus french if we cite the French version of the LaTeX companion?). The `De La Cruz´ example shows how you can fool BibTeX. Tokens
between names are recognized. For instance, consider:</p>
<pre class="latex-code"><span class="prenumber">107</span> @Article{strange,
<span class="prenumber">108</span>   author = {A-b-C and A.b.C and A~b~C and A.Bb.Cc},
<span class="prenumber">109</span> title="X" }
</pre>
<p>This is how BibTeX interprets the names. Authors number two and four have
only a last name, no von part, no first name.</p>
<pre class="latex-code"><span class="prenumber">110</span> \bibitem[bCAbCA]{strange}
<span class="prenumber">111</span> A~b~C, A.b.C, A~b~C, and A.Bb.Cc.
<span class="prenumber">112</span> \newblock X.
</pre>
<p>This is the translation by <i>Tralics</i>. You can see that, for the last author,
one dot has been replaced by a space: this is done in case no other way is
found
to split the name, but there is an upper case letter on each side of the dot.
You can also see that BibTeX inserts some characters (here ties) instead of
dashes. <i>Tralics</i> keeps the dashes, whenever possible.</p>
<pre class="latex-code"><span class="prenumber">113</span> \citation{bCAbCB}{cite:strange}{bid3}{year}{article}
<span class="prenumber">114</span> \bauthors{\bpers[A]{A.}{}{b-C}{}
<span class="prenumber">115</span>           \bpers[]{}{}{A.b.C}{}
<span class="prenumber">116</span>           \bpers[A]{A.}{}{b~C}{}
<span class="prenumber">117</span>           \bpers[A]{A.}{}{Bb.Cc}{}}
<span class="prenumber">118</span> \cititem{btitle}{X}
<span class="prenumber">119</span> \endcitation
</pre>
<p>Here is another example.</p>
<pre class="latex-code"><span class="prenumber">120</span> @Article{strange2,
<span class="prenumber">121</span>   author = {Jean-Claude XX and J.-Ch. YY and J.-{Ch.} ZZ},
<span class="prenumber">122</span> title="X" }
</pre>
<p>This is the translation by BibTeX, in `abbrv´ mode. The format used in plain
mode is <samp>{ff }{vv }{ll}{, jj}</samp>, and in abbrv mode, it is
<samp>{f. }{vv }{ll}{, jj}</samp>. This is explained in any good reference about BibTeX<a id="uid1826" href="#note57" title="For instance Tame the BeaST, by Nicolas Markey, available on CTAN"><small>(note: </small>&#10163;<small>)</small></a>.</p>
<pre class="latex-code"><span class="prenumber">123</span> \bibitem{strange2}
<span class="prenumber">124</span> J.-C. XX, J.-C. YY, and J.-C. ZZ.
<span class="prenumber">125</span> \newblock X.
<span class="prenumber">126</span> \bibitem{poussin}
<span class="prenumber">127</span> C.~L. X.~J. de~la Vall{\a'e}e~Poussin.
<span class="prenumber">128</span> \newblock X.
</pre>
<p>This is the translation by <i>Tralics</i>. The quantity `<samp>{Ch.}</samp>´ is considered as a
single character. No dot is added after it, since it is terminated by a dot.<a id="uid1827" href="#note58" title="According to N. Markey, you should say {\relax Ch}ristopher in Bib"><small>(note: </small>&#10163;<small>)</small></a></p>
<pre class="latex-code"><span class="prenumber">129</span> \citation{XYZ}{cite:strange}{bid3}{year}{article}
<span class="prenumber">130</span> \bauthors{\bpers[Jean-Claude]{J.-C.}{}{XX}{}
<span class="prenumber">131</span>           \bpers[J.-Ch.]{J.-C.}{}{YY}{}
<span class="prenumber">132</span>           \bpers[J.-{Ch.}]{J.-{Ch.}}{}{ZZ}{}}
<span class="prenumber">133</span> \cititem{btitle}{X}
<span class="prenumber">134</span> \endcitation
</pre>
<p>The print key is computed as follows: Each author gives an initial (if the
name is complicated, more than one will be used, for instance Poussin gives
four letters `dlVP´). If a single author is cited, and if it gives less than
three letters, then the first three letters of its name are used (for
instance, Seyfert gives `Sey´). If more than four authors are given, only the
first three ones give an initial, there is a `+´ sign at the end. If `and others´
is given, there is also a `+´ sign.</p>
<p>We show here the sort key, as computed by <i>Tralics</i>, for some the entries
shown above. Remember that these entries have no year field and that the
title is X.</p>
<pre class="latex-code"><span class="prenumber">135</span> cru m. {\makeuppercase{d}e la}. cruz          x
<span class="prenumber">136</span> g c. {g{\"{o}}del}          x
<span class="prenumber">137</span> g d. {g\"{o}del}          x
<span class="prenumber">138</span> g{\"o}d a. g{\"o}del          x
<span class="prenumber">139</span> g{\"{o}}d b. g{\"{o}}del          x
<span class="prenumber">140</span> aaja+ j. and   j. and    joe-and  etal        x
<span class="prenumber">141</span> dlvp c. l. x. j. de la vall{\'e}e poussin          x
</pre>
<p>These are the keys, for the same entries, computed by BibTeX, using the alpha
style. You can see that BibTeX uses last name and first name, whereas
<i>Tralics</i> uses abbreviated first name then last name. The format is:
<samp>{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}</samp>.</p>
<pre class="latex-code"><span class="prenumber">142</span> delac    dela cruz  maria        x
<span class="prenumber">143</span> god    godel  a        x
<span class="prenumber">144</span> god    godel  b        x
<span class="prenumber">145</span> g    godel  c        x
<span class="prenumber">146</span> g    godel  d        x
<span class="prenumber">147</span> aaja    and  joe   and  joe   joe and   et al        x
<span class="prenumber">148</span> dlvp    de la vallee poussin  charles louis xavier joseph        x
</pre>

<h2 id="uid1828">4.5. Commands for the bbl</h2>
<p>The Raweb <span class="sansserif">DTD</span> explains that the following items can appear inside a
bibliography entry.</p>
<ul>
<li id="uid1829"><p class="nofirst noindent"><tt class="txt">&lt;baddress&gt;</tt>, the address of the publisher.</p>
</li>
<li id="uid1830"><p class="nofirst noindent"><tt class="txt">&lt;bauteurs&gt;</tt>, the names of the authors of the document.</p>
</li>
<li id="uid1831"><p class="nofirst noindent"><tt class="txt">&lt;bbooktitle&gt;</tt>, the title of the document.</p>
</li>
<li id="uid1832"><p class="nofirst noindent"><tt class="txt">&lt;bchapter&gt;</tt>, the chapter number, in case it is relevant.</p>
</li>
<li id="uid1833"><p class="nofirst noindent"><tt class="txt">&lt;bedition&gt;</tt>, the edition number.</p>
</li>
<li id="uid1834"><p class="nofirst noindent"><tt class="txt">&lt;bdoi&gt;</tt>, the DOI.</p>
</li>
<li id="uid1835"><p class="nofirst noindent"><tt class="txt">&lt;bediteur&gt;</tt>, the names of the editors.</p>
</li>
<li id="uid1836"><p class="nofirst noindent"><tt class="txt">&lt;bhowpublished&gt;</tt>, how a document is published, in unusual cases.</p>
</li>
<li id="uid1837"><p class="nofirst noindent"><tt class="txt">&lt;binstitution&gt;</tt>, the institution, for the case of a report.</p>
</li>
<li id="uid1838"><p class="nofirst noindent"><tt class="txt">&lt;bjournal&gt;</tt>, the journal where an article can be found.</p>
</li>
<li id="uid1839"><p class="nofirst noindent"><tt class="txt">&lt;bmonth&gt;</tt>, month of publication.</p>
</li>
<li id="uid1840"><p class="nofirst noindent"><tt class="txt">&lt;bnote&gt;</tt>, a note.</p>
</li>
<li id="uid1841"><p class="nofirst noindent"><tt class="txt">&lt;bnumber&gt;</tt>, the number of a report, etc.</p>
</li>
<li id="uid1842"><p class="nofirst noindent"><tt class="txt">&lt;borganization&gt;</tt>, organizer (of a conference ...)</p>
</li>
<li id="uid1843"><p class="nofirst noindent"><tt class="txt">&lt;bpages&gt;</tt>, page number (or sequence of pages).</p>
</li>
<li id="uid1844"><p class="nofirst noindent"><tt class="txt">&lt;bpublisher&gt;</tt>, the publisher of a book.</p>
</li>
<li id="uid1845"><p class="nofirst noindent"><tt class="txt">&lt;bschool&gt;</tt>, the school for a thesis.</p>
</li>
<li id="uid1846"><p class="nofirst noindent"><tt class="txt">&lt;bseries&gt;</tt>, the name of a series.</p>
</li>
<li id="uid1847"><p class="nofirst noindent"><tt class="txt">&lt;btitle&gt;</tt>, the title of the reference.</p>
</li>
<li id="uid1848"><p class="nofirst noindent"><tt class="txt">&lt;btype&gt;</tt>, the type (of a thesis, technical report).</p>
</li>
<li id="uid1849"><p class="nofirst noindent"><tt class="txt">&lt;bvolume&gt;</tt>, the volume.</p>
</li>
<li id="uid1850"><p class="nofirst noindent"><tt class="txt">&lt;xref&gt;</tt>, an external link.</p>
</li>
<li id="uid1851"><p class="nofirst noindent"><tt class="txt">&lt;byear&gt;</tt>, the year of publication.</p>
</li></ul>
<p>In almost every case, if the database file contains a field `foo´ with value
`bar´, the <span class="sansserif">bbl</span> file will contain <samp>\cititem</samp><samp>{bfoo}</samp><samp>{bar}</samp>, and this is
translated into <tt class="txt">&lt;bfoo&gt;bar&lt;/bfoo&gt;</tt>.<a id="uid1852"></a> The <samp>\cititem</samp> command
takes two arguments. The second argument is translated as usual.
The first argument is the name of the resulting element. There is a hook:
in the case where <samp>\cititem-foo</samp> is defined (this is <samp>\cititem</samp> followed by a dash followed by the name of the field), this macro is used instead of
the default procedure. If the database contains a `url´ field, the result
is a call to the <samp>\url</samp> command, that will produce a <tt class="txt">&lt;xref&gt;</tt> element.
The <samp>\cititem</samp> command should be used only in a bibliography.</p>
<p>If the entry in the database contains a `author´ or `editor´, the
<samp>\bauthors</samp><a id="uid1853"></a> or
<samp>\beditors</samp><a id="uid1854"></a> commands will be called. These two commands
must be used inside a bibliography. They take a single argument, translate it,
and put the result in a <tt class="txt">&lt;bauteurs&gt;</tt> or <tt class="txt">&lt;beditor&gt;</tt> element.
Note: the bibliography part of the Raweb <span class="sansserif">DTD</span> was meant to be temporary. For
this reason, the names were chosen so as to replace them easily with new names
(hence the prefix `b´); For some reason, `auteurs´, `editeur´ and attributes
of `bpers´ have French names. Later on, we decided to modify the <i>Tralics</i> names, hence the `bauthors´ and `beditors´. Because `bauteurs´ had a final s,
we added an s to both command names; not the best choice.</p>
<p>The <samp>\bpers</samp><a id="uid1855"></a> command takes one optional argument, and 4
required arguments. The translation is an empty <tt class="txt">&lt;bpers&gt;</tt> element
with following attributes: <span class="sansserif">prenomcomplet</span> for the optional argument,
and <span class="sansserif">prenom</span>, <span class="sansserif">part</span>, <span class="sansserif">nom</span>, <span class="sansserif">junior</span> for the
required arguments.</p>
<p>The <samp>\citation</samp><a id="uid1856"></a> command constructs a <tt class="txt">&lt;citation&gt;</tt>
element. It takes 5 required arguments, and an optional argument. The optional
argument is ignored. Other arguments are converted to attributes. The whole text, up
to <samp>\endcitation</samp><a id="uid1857"></a> is translated in bibliography mode,
and added to the <tt class="txt">&lt;citation&gt;</tt> element. Example:</p>
<pre class="latex-code"><span class="prenumber">149</span>  \citation{a}{b}{c}{d}{e}
<span class="prenumber">150</span>   \cititem{foo}{bar}
<span class="prenumber">151</span>   \beditors{\bpers[a]{b}{c}{d}{e} \bpers[]{B}{}{C}{} \cititem{etal}{}}
<span class="prenumber">152</span>  \endcitation
</pre>
<p>The translation is</p>
<pre class="xml-code"><span class="prenumber">153</span> &lt;citation from='d' key='a' id='c' userid='b' type='e'&gt;
<span class="prenumber">154</span>   &lt;foo&gt;bar&lt;/foo&gt;
<span class="prenumber">155</span>   &lt;bediteur&gt;
<span class="prenumber">156</span>     &lt;bpers prenom='b' part='c' nom='d' junior='e' prenomcomplet='a'/&gt;
<span class="prenumber">157</span>     &lt;bpers prenom='B' nom='C'/&gt;
<span class="prenumber">158</span>     &lt;etal/&gt;
<span class="prenumber">159</span>   &lt;/bediteur&gt;
<span class="prenumber">160</span> &lt;/citation&gt;
</pre>

<h2 id="uid1858">4.6. Other commands</h2>
<p>The <samp>\bibliography</samp><a id="uid1859"></a> command takes
one argument, this is a comma separated list of database files. Spaces are
ignored. The command can be given more than once. This command
(the last occurrence) defines the position where the bibliography should be
inserted.</p>
<p>The command <samp>\insertbibliohere</samp><a id="uid1860"></a> can be used to
force the position of the bibliography. It overwrites the location specified
by the previous command.</p>
<p>The environment `thebibliography´<a id="uid1861"></a> can be used for
typesetting the bibliography. There is an optional argument (ignored), a
required argument (ignored), an optional argument (ignored).
The result is an <span class="sansserif">XML</span> element whose name is defined by
<samp>\refname</samp><a id="uid1862"></a>, by default `Bibliography´,
and whose content is formed of the translation of the environment.
You can redefine this <samp>\refname</samp> command.
An error is signaled if strange commands appear in
the argument, but not for invalid characters (in particular, space cannot
appear in an element name). The command can be empty. In this case, the name
will not appear in the <span class="sansserif">XML</span> result.</p>
<p>The command <samp>\bibliographystyle</samp><a id="uid1863"></a> takes one
argument. Its translation is empty. The argument is remembered. This is the
style to use. If the argument is `bibtex:´, this is an indication that
BibTeX should be used instead of <i>Tralics</i> for the production of the <span class="sansserif">bbl</span>.
The style can be given after the colon, or with the invocation of another
command. If the argument is `program:foo´, this means to use foo as program.
For instance <samp>\bibliographystyle</samp><samp>{program:cat -v}</samp>. In this example, this will
print the auxiliary file; this is not good, because the command should create
the <span class="sansserif">bbl</span> file (its argument is <span class="sansserif">jobname.aux</span>, data must be written on
<span class="sansserif">jobname.bbl</span>). A second <samp>\bibliographystyle</samp> command can be used for
specifying the style (the default is `plain´). Example. Consider a file that
contains these lines</p>
<pre class="latex-code"><span class="prenumber">161</span> \documentclass{article}
<span class="prenumber">162</span> \begin{document}
<span class="prenumber">163</span> \AtEndDocument{\bibitem{unused}Hey}
<span class="prenumber">164</span> \bibliography{torture}
<span class="prenumber">165</span> \bibliographystyle{bibtex:}
<span class="prenumber">166</span> \cite{poussin,cruz,many,strange,unused}
<span class="prenumber">167</span> \end{document}
</pre>
<p>When <i>Tralics</i> sees the <samp>\end{document}</samp><a id="uid1864"></a> command, it evaluates it (with the
hooks, etc.) After that, a <span class="sansserif">bbl</span> is created and translated. If there is no
unsolved entry, nothing happens. If no style command indicates that BibTeX or an external program should compute the <span class="sansserif">bbl</span>, then <i>Tralics</i> does it, as
explained above. In the case of the Raweb, three database files are used:
<span class="sansserif">apicsfoot_2004</span>, <span class="sansserif">apicsrefer_2004</span>, and
<span class="sansserif">apics2004</span>. These files are typed `foot´, `refer´ and `year´. In the
non-Raweb case, files in the list indicated by <samp>\bibliography</samp> are used.
If a file is named `miaou+refer´ or `miaou+foot´ and does not exist, then
miaou is tried instead; in this case the type will be `refer´ and `foot´
(otherwise, it is `year´). In the case an external program is used,
a minimal auxiliary file is created. In the case of the example, it will
contain</p>
<pre class="latex-code"><span class="prenumber">168</span> \citation{poussin}
<span class="prenumber">169</span> \citation{cruz}
<span class="prenumber">170</span> \citation{many}
<span class="prenumber">171</span> \citation{strange}
<span class="prenumber">172</span> \bibstyle{plain}
<span class="prenumber">173</span> \bibdata{torture}
</pre>
<p>The database <span class="sansserif">torture.bib</span> contains a sequence of entries, plus the
following lines. In order to understand the last line, you have to remember
that character strings are always balanced against braces. Hence it is not:
open brace concatenated with 1 concatenated with 1 and close brace. It is: open
brace, double quote, space, sharp, etc, up to double quote, close brace.</p>
<pre class="latex-code"><span class="prenumber">174</span> @String{ stra= {\def}}
<span class="prenumber">175</span> @String{ strb= "#1" }
<span class="prenumber">176</span> @String( strc= "\mycmd " )
<span class="prenumber">177</span> @Preamble (stra # strc # strb )
<span class="prenumber">178</span> @Preamble( "{" #1 #1 "}")
</pre>
<p>After that, the external program is called, and the <span class="sansserif">bbl</span> file is read. In the
example this gives the following. The first line is the preamble.</p>
<pre class="latex-code"><span class="prenumber">179</span> \def\mycmd #1{" #1 #1 "}
<span class="prenumber">180</span> \begin{thebibliography}{1}
<span class="prenumber">181</span>  
<span class="prenumber">182</span> \bibitem{many}
<span class="prenumber">183</span> Joe And, Joe And, Joe-And, et~al.
<span class="prenumber">184</span> \newblock X.
<span class="prenumber">185</span>  
<span class="prenumber">186</span> \bibitem{strange}
<span class="prenumber">187</span> A~b~Cde.
<span class="prenumber">188</span> \newblock X.
<span class="prenumber">189</span>  
<span class="prenumber">190</span> \bibitem{poussin}
<span class="prenumber">191</span> Charles Louis Xavier~Joseph de~la Vall{\a'e}e~Poussin.
<span class="prenumber">192</span> \newblock X.
<span class="prenumber">193</span>  
<span class="prenumber">194</span> \bibitem{cruz}
<span class="prenumber">195</span> Maria {\MakeUppercase{d}e La}~Cruz.
<span class="prenumber">196</span> \newblock X.
<span class="prenumber">197</span>  
<span class="prenumber">198</span> \end{thebibliography}
</pre>
<p class="nofirst noindent">After that, the bibliography is translated and inserted. The resulting <span class="sansserif">XML</span> file is shown here.</p>
<pre class="xml-code"><span class="prenumber">1</span> &lt;?xml version='1.0' encoding='iso-8859-1'?&gt;
<span class="prenumber">2</span> &lt;!DOCTYPE std SYSTEM 'classes.dtd'&gt;
<span class="prenumber">3</span> &lt;!-- Translated from latex by tralics 2.9.1, date: 2006/11/02--&gt;
<span class="prenumber">4</span> &lt;std&gt;
<span class="prenumber">5</span> &lt;biblio&gt;
<span class="prenumber">6</span> &lt;Bibliography&gt;&lt;p id='bid2'&gt;
<span class="prenumber">7</span> Joe And, Joe And, Joe-And, et al.
<span class="prenumber">8</span> X.&lt;/p&gt;
<span class="prenumber">9</span> &lt;p id='bid3'&gt;
<span class="prenumber">10</span> A b Cde.
<span class="prenumber">11</span> X.&lt;/p&gt;
<span class="prenumber">12</span> &lt;p id='bid0'&gt;
<span class="prenumber">13</span> Charles Louis Xavier Joseph de la Vallée Poussin.
<span class="prenumber">14</span> X.&lt;/p&gt;
<span class="prenumber">15</span> &lt;p id='bid1'&gt;
<span class="prenumber">16</span> Maria De La Cruz.
<span class="prenumber">17</span> X.&lt;/p&gt;
<span class="prenumber">18</span> &lt;/Bibliography&gt;
<span class="prenumber">19</span> &lt;/biblio&gt;&lt;p&gt;&lt;cit&gt;&lt;ref target='bid0'/&gt;&lt;/cit&gt;, &lt;cit&gt;&lt;ref target='bid1'/&gt;&lt;/cit&gt;,
<span class="prenumber">20</span> &lt;cit&gt;&lt;ref target='bid2'/&gt;&lt;/cit&gt;, &lt;cit&gt;&lt;ref target='bid3'/&gt;&lt;/cit&gt;,
<span class="prenumber">21</span> &lt;cit&gt;&lt;ref target='bid4'/&gt;&lt;/cit&gt;&lt;/p&gt;
<span class="prenumber">22</span> &lt;p id='bid4'&gt;Hey&lt;/p&gt;
<span class="prenumber">23</span> &lt;/std&gt;
<span class="prenumber">24</span>  
</pre>
<p>Finally, we show here everything printed on the screen, including all warnings
by BibTeX.</p>
<pre class="log-code"><span class="prenumber">1</span> This is tralics 2.9.1, a LaTeX to XML translator
<span class="prenumber">2</span> Copyright INRIA/MIAOU/APICS 2002-2006, Jos\'e Grimm
<span class="prenumber">3</span> Licensed under the CeCILL Free Software Licensing Agreement
<span class="prenumber">4</span> Starting translation of file testb.tex.
<span class="prenumber">5</span> Configuration file identification: standard $ Revision: 2.24 $
<span class="prenumber">6</span> Read configuration file /Users/grimm/work/cvs/tralics/confdir/.tralics_rc.
<span class="prenumber">7</span> Document class: article 2006/08/19 v1.0 article document class for Tralics
<span class="prenumber">8</span> Bib stats: seen 5(1) entries
<span class="prenumber">9</span> This is BibTeX, Version 0.99c (Web2C 7.5.4)
<span class="prenumber">10</span> The top-level auxiliary file: testb.aux
<span class="prenumber">11</span> The style file: plain.bst
<span class="prenumber">12</span> Database file #1: torture.bib
<span class="prenumber">13</span> Warning--empty journal in many
<span class="prenumber">14</span> Warning--empty year in many
<span class="prenumber">15</span> Warning--empty journal in strange
<span class="prenumber">16</span> Warning--empty year in strange
<span class="prenumber">17</span> Warning--empty journal in poussin
<span class="prenumber">18</span> Warning--empty year in poussin
<span class="prenumber">19</span> Warning--empty journal in cruz
<span class="prenumber">20</span> Warning--empty year in cruz
<span class="prenumber">21</span> (There were 8 warnings)
<span class="prenumber">22</span> Math stats: formulas 0, kernels 0, trivial 0, \mbox 0, large 0, small 0.
<span class="prenumber">23</span> Buffer realloc 0, string 1240, size 12510, merge 4
<span class="prenumber">24</span> Macros created 97, deleted 0; hash size 1565; foonotes 0.
<span class="prenumber">25</span> Save stack +20 -20.
<span class="prenumber">26</span> Attribute list search 1476(1402) found 906 in 1097 elements (1076 at boot).
<span class="prenumber">27</span> Number of ref 0, of used labels 0, of defined labels 0, of ext. ref. 0.
<span class="prenumber">28</span> Modules with 0, without 0, sections with 0, without 0
<span class="prenumber">29</span> Output written on testb.xml (593 bytes).
<span class="prenumber">30</span> No error found.
<span class="prenumber">31</span> (For more information, see transcript file testb.log)
</pre>
<p>Some comments. Line 6 shows the name of the configuration file. If this file
contains a line that starts with `## tralics ident rc=´ then all characters
after the equals sign are printed (see line 5). Since version 2.5 (pl4), in
the case where character number 30 is a dollar sign, a space will be added
after it.<a id="uid1865" href="#note59" title="In fact, in subsequent version, a space is added after the first dollar sign, independently of the p..."><small>(note: </small>&#10163;<small>)</small></a>
The reason for this is that the RCS software interprets
a string like `Revision´ in dollar signs; we do not want it to replace the
2.11 by the revision number of the LaTeX document.
We shall explain elsewhere how to read the statistics.</p>
<p>Line 8 shows the number of entries in the biblist. If some entries are solved,
they are shown in parentheses. Here, we have 5-1=4 unsolved entries.
If line 5 of the source
file is commented out, then BibTeX is not used, and lines 9 to 21 will be
replaced by the single line `Seen 4 bibliographic entries´.</p>
<p>The standard configuration file contains a line that says that `article´ is an
alias for `std´. The `std´ configuration defines two quantities: the name of
the <span class="sansserif">DTD</span>, hence the root element, it is <tt class="txt">&lt;std&gt;</tt>, see line 4 of the <span class="sansserif">XML</span> result. It defines <samp>xml_biblio</samp> to be `bibliography´. This is the name of the
element that will hold the bibliography. The default value is `biblio´, but it
can be redefined (see line 5). Do not confuse this with the name of the
element produced by the environment `thebibliography´, that appears line 6 in
the <span class="sansserif">XML</span> result.</p>

<h1 id="cid5">5. Other commands</h1>
<h2 id="uid1866">5.1. Character encoding</h2>
<p>We have to distinguish between input encoding,
internal encoding and output encoding.
The internal encoding of TeX is ASCII (i.e. 65 is the internal
code of the upper case letter A), at least for all characters with code
between 32 and 126. The input encoding is the mechanism that converts the
code of the letter A supplied by computer into the code 65. Almost all input
encodings are nowadays ASCII-based, they produce the same value for the letter
A; the results may be different for a character like é. The output encoding
indicates for a letter, say A, which position in the font to use. We shall not
discuss the output encoding here. Let´s just notice that the character
`<samp>{</samp>´ exists in the font cmtt10, but not in other text fonts of
the computer modern family.
If you read a version
of this document that uses the original encoding (OT1), braces shown in error
messages are taken from a math font, hence are upright. Some years ago,
a 8bit encoding (called T1) was designed, which contains braces. You can
compare Figure 1 in appendix F of the <a href="#bid3" title="Knuth1984">[4]</a> (describing the font
<samp>cmr10</samp>) with Table 7.32 of <a href="#bid5" title="Mittelbach, Goossens, Braams, Carlisle, Rowley2004">[6]</a>, describing <samp>ecrm1000</samp>.</p>
<p>The first version of TeX was using 7bit
input and output characters (but fonts and dvi files were coded on
8bits). There is an extension &#937; to TeX that accepts 16bit characters
as input, using different encoding schemes. Characters that are not part of
the ASCII specifications (less than 32 or greater than 126)
are not guaranteed to be treated the same in all implementations.
For this reason, it it wise to load the <span class="sansserif">inputenc</span> package,
with the current encoding as argument. The effect will be that some
characters, like é will become active, and expand to <samp>\´e</samp>.
As a result: only ASCII letters are
allowed in control sequence names. On the other hand, if you say
<samp>\begin</samp><samp>{motclés}</samp>, then LaTeX complains with <i>LaTeX Error:
Environment motcl\´es undefined</i>. Don´t try to define the
<samp>motcl\´es</samp> environment: the
expansion of the accent depends on the context: it is <samp>é</samp> for
<samp>\begin</samp> and <samp>\´e</samp> for the macro that prints the error message.
Non-ASCII characters may be printed by TeX as
<samp>^^ab</samp> (in some older version of TeX, I had to pretend, via locale settings,
that my computer did not understand English in order for it to output the
guillemet as «).</p>
<p>A silly question concerns end-of-line markers. Some systems like Unix use LF
(line feed) as line separators, some others like Macintosh use CR (carriage
return) and Windows uses CR-LF. This is replaced by TeX by a single
character: the carriage return with ASCII code 13. <i>Tralics</i> interprets CR-LF,
CR and LF alike: as an end-of-line marker. This marker will be replaced by
the character whose code is in <samp>\endlinechar</samp><a id="uid1867"></a>, provided
that this value is in the range 0&#8211;255<a id="uid1868" href="#note60" title="In Tralics, the range is 0&#8211;65535; note that the null characters is discarded, and characters U+FFFE,..."><small>(note: </small>&#10163;<small>)</small></a>. The default value is 13,
a character of category 5. The tokeniser converts this into a <samp>\par</samp> token,
a space token or ignores it depending on the state. This space token has value
32 (but <i>Tralics</i> uses 10, so as to keep the same line breaks in the <span class="sansserif">XML</span> result as in the TeX source). Note that, whenever a line is read,
spaces at the end of the line are removed. If you want a space after a control
sequence, you say something like `<samp>\TeX</samp><samp>\&#9251;</samp>´, and if this construct
appears at the end of a line, the space is ignored; if the endline character
has category code 5, it will be converted to a space, and everything works
fine; if this character is for instance 65, you may get a strange error, like
this</p>
<pre class="latex-code">! Undefined control sequence.^^J
l.170 ...reaks in the \XML\ result as in the \TeX\^^J
                                                  ^^J
? ^^J
</pre>
<p class="nofirst noindent">We have shown here the end of line as <samp>^^J</samp>. There are four lines: the error
messages, two context lines, and the line with the prompt. The two context
lines show that the space at the end of the line is removed. TeX does not
print the undefined control sequence: it assumes that it is either the last
token on the first context line, or a token marked as `&lt;recently read&gt;´ or
something like that; in our case, the undefined control sequence is the one
obtained by replacing <samp>^^J</samp> by the value of the endline character.</p>
<p>There is a way to enter special characters in TeX, for instance <samp>^^J</samp>
is a line feed.<a id="uid1869"></a> The algorithm is the following:
whenever TeX sees two consecutive identical characters of category
code 7, followed by a character whose number is <span class="math"><i>x</i></span>, it replaces these three
characters by the character whose code is <span class="math"><i>y</i></span>, where <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>y</mi><mo>=</mo><mi>x</mi><mo>-</mo><mn>64</mn></mrow></math></span> if <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>&#8805;</mo><mn>64</mn></mrow></math></span>, and
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>y</mi><mo>=</mo><mi>x</mi><mo>+</mo><mn>64</mn></mrow></math></span> if <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>&lt;</mo><mn>64</mn></mrow></math></span>. Hence <samp>^^?</samp> yields <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>y</mi><mo>=</mo><mn>127</mn></mrow></math></span> (this is the delete character).
All characters with codes between 1 and 26 can be obtained using the form
<samp>^^A</samp>, <samp>^^B</samp>, etc. The null character is <samp>^^@</samp>, characters with code
between 27 and 31 are <samp>^^[</samp>, <samp>^^\</samp>, <samp>^^]</samp>, <samp>^^^</samp>
and <samp>^^_</samp>. Character 32 can be represented as <samp>^^`</samp>.
All other characters are ASCII
characters. This is an example of use:<a id="uid1870"></a></p>
<pre class="latex-code">27=\char`\^^[, 28=\char`\^^\,  29=\char`\^^], 30=\char`\^^^, 31= \char`\^^_
</pre>
<p class="nofirst noindent">Because some characters in the list are of category code 15
(invalid), we have used the construction <samp>\char</samp><samp>`</samp><samp>\A</samp> (with A
replaced by some other character). There is no difference between
<samp>\char</samp><samp>`</samp><samp>\A</samp> and <samp>\char</samp><samp>`A</samp>, unless the category code of
the character is one of 0, 5, 9, 14, or 15. The result is the character at
position 65 or whatever in the current font; the example above
selects positions 27 to 31. The translation is</p>
<pre class="xml-code">27=&amp;#x1B;, 28=&amp;#x1C;, 29=&amp;#x1D;, 30=&amp;#x1E;, 31= &amp;#x1F;
</pre>
<p class="nofirst noindent">Note that these characters are invalid in <span class="sansserif">XML</span>1.0, so that this example is not
good; if you compile this document with LaTeX, you will see
[<i>not compiled with latex</i>]. In general you will see a ff ligature or a oe one; this depends on the output
encoding.</p>
<p>When TeX switched to 8 bits, the rule changed a little bit: the previous
rule applies only if <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>0</mn><mo>&#8804;</mo><mi>x</mi><mo>&#8804;</mo><mn>127</mn></mrow></math></span>, it gives <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>0</mn><mo>&#8804;</mo><mi>y</mi><mo>&#8804;</mo><mn>127</mn></mrow></math></span>. Another test
was added: if you say <samp>^^ab</samp>, these four characters are replaced by the
single character whose code is ab (in base 16, i.e. 171 in base ten in this
case). In such a case
two characters are needed: a letter or a digit; only lower case letters
between a and f are allowed. Thus every character in the range 0-255 has such
a representation. Note that, by default, the character <samp>^^ab</samp> has category
code 12, hence is valid. What appears in the dvi file depends on the output
encoding, in the case of a 7bit encoding, the character is unknown, a warning
is printed in the transcript file, that´s all, otherwise, it should be an
opening guillemet, but it could as well be &#324;. The purpose of a package like
<span class="sansserif">inputenc</span> is to change the category code of all special characters,
so that it behaves like a command and produces, in the dvi, something that
is, as much as possible, independent of the output encoding.</p>
<p>According to this rule, the character 32 has can be entered as
<samp>^^20</samp>.
There is one situation where the space character can be used in this way:
at the end of the line, when <samp>\endlinechar</samp> is non trivial.
Note that, in the case where the resulting character has
category 7, it can participate in a hat-hat construct. Here is an example.</p>
<pre class="latex-code">{1^^{^^ab2^^5e^ab3^^5e^5e^ab4\def\Abc{ok}\def\bAc{OK}\^^41bc\b^^41c}
{\catcode `\é=7 ééab $xé2$ %next line should produce M
éé
%$1^è=^^^AééT$ %% hat hat control-A
$1^è=^^^A$ %% hat hat control-A
}\def\msg{a message.^^J}
</pre>
<p class="nofirst noindent">Some explanations are needed. <samp>^^{</samp> is a semi colon, <samp>^^ab</samp> is an opening
French guillemet, <samp>^^5e</samp> is a hat (recursion...), <samp>^^41</samp> is the uppercase
letter A. The first line of the example explains that such funny characters can
appear in a control sequence name. The second line shows that the hat-hat
mechanism can be used with other characters than a hat. It also shows that, if
the mechanism cannot be applied, a character with category 7 behaves like a
superscript character, whatever its numeric value. The line that follows shows
that the end-of-line character is ASCII 13, aka control-M (usually written as
<samp>^M</samp>). After that, there are two lines containing a control-A character,
shown here as <samp>^A</samp>. It is preceded by hat-hat, so that the effect should be a
single A. The line that is commented out contains a control-T written as
<samp>ééT</samp>
(for some strange reasons, this character is invalid in <span class="sansserif">XML</span>1.0, but valid as
an entity in <span class="sansserif">XML</span>1.1, <a href="#bid7" title="W3C1998">[9]</a>, <a href="#bid8" title="W3C2004">[8]</a>).
The last line is just a real example of <samp>^^J</samp>. This
character is printed by <i>Tralics</i> as LF, or CR-LF on Windows. This is the
translation of <i>Tralics</i>:</p>
<pre class="xml-code">&lt;p&gt;1;&amp;#xAB;2&amp;#xAB;3&amp;#xAB;4okOK
&amp;#xAB; &lt;formula type='inline'&gt;
&lt;math xmlns='http://www.w3.org/1998/Math/MathML'
 &gt;&lt;msup&gt;&lt;mi&gt;x&lt;/mi&gt; &lt;mn&gt;2&lt;/mn&gt; &lt;/msup&gt;&lt;/math&gt;&lt;/formula
 &gt; M&lt;formula type='inline'&gt;&lt;math xmlns='http://www.w3.org/1998/Math/MathML'
 &gt;&lt;mrow&gt;&lt;msup&gt;&lt;mn&gt;1&lt;/mn&gt; &lt;mi&gt;&amp;#xE8;&lt;/mi&gt; &lt;/msup&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mo&gt;&lt;/mo
 &gt;&lt;mi&gt;A&lt;/mi&gt;&lt;/mrow&gt;&lt;/math&gt;&lt;/formula&gt;
&lt;/p&gt;
</pre>
<p class="nofirst noindent">We inserted some newline characters at unusual places (just before greater
than signs), other spaces were produced by <i>Tralics</i>; in order to make sure
that 8bit characters are printed correctly, we asked <i>Tralics</i> for a seven bit
output.</p>
<p>As said above, &#937; accepts 16bit characters, using the notation
<samp>^^^^abcd</samp>. This syntax was implemented in <i>Tralics</i>2.7, via
the <samp>\char</samp> command (remember that in <i>Tralics</i>, the <samp>\char</samp> and
<samp>\chardef</samp> commands accept 27bit integers); as a consequence, these
characters could not be used in a command name; thios restriction does not
appluyy anymore (the default category code of characters with code greater
then 127 is other, namely 12). Example</p>
<pre class="latex-code">\def\foo#1#2#3{#1=#2=#3=}
\foo^^^^0153^^^^0152^^^^0178
 ^^^^017b^^8?
</pre>
<p class="nofirst noindent">It is translated by <i>Tralics</i> as
<tt class="txt">&amp;#x153;</tt>=<tt class="txt">&amp;#x152;</tt>=<tt class="txt">&amp;#x178;</tt>= <tt class="txt">&amp;#x17B;</tt><tt class="txt">x?</tt>.
The argument to <samp>\foo</samp> could also
have been: <samp>\oe\OE{\&#8220;Y}</samp>. The transcript file contains lines
of the form:</p>
<pre class="log-code">[8] \foo^^^^0153^^^^0152^^^^0178
\foo #1#2#3-&gt;#1=#2=#3=
#1&lt;-^^^^0153
#2&lt;-^^^^0152
#3&lt;-^^^^0178
</pre>
<p>It is possible to ask for UTF-8 output in the transcript file.
This gives characters that are hard to see using latin1, because characters in
the range 128&#8211;128+32 are in general unprintable.
What is shown here as hat-Ó is a single character.</p>
<pre class="log-code">[2] \foo^^^^0153^^^^0152^^^^0178
\foo #1#2#3-&gt;#1=#2=#3=
#1&lt;-Å^Ó
#2&lt;-Å^Ò
#3&lt;-Å¸
{Push p 1}
Character sequence: Å^Ó=Å^Ò=Å¸= .
</pre>
<p>The original version of the <i>Tralics</i> documentation said:
Si on a un texte qui contient essentiellement des caractères 7bits, et très peu
d´autres caractères, l´utilisation de caractères 16bits consomme énormément de
place. This means that using a 16bit encoding consumes a lot of space if you
write a French document (and even more, for an English one). The sentence has
159 ASCII characters and 6 others; these can be input using iso-8859-1 (aka
latin-1) as input encoding<a id="uid1871" href="#note61" title="All French letters exist in iso-8859-1, except \oe \OE, \&#8220;Y, and the Euro sign"><small>(note: </small>&#10163;<small>)</small></a>. In TeX, it uses 165
bytes, in &#937;, it uses 330 bytes. Using a construction like <samp>\´e</samp> we need
177 bytes (and 7 bits per byte). Using UTF-8 requires only 171 bytes (8 bits
per byte). This explains why UTF-8 is popular. We shall explain (in the second
part of this document) how
UTF-8 is encoded and how TeX may read it. In the case of <i>Tralics</i>, the
situation is: you can (via an argument to the <i>Tralics</i> program) specify that
the sources are encoded using UTF-8 or latin1 (this being the
default). However, if the tex file contains, on the first line
&#8220;utf8-encoded&#8221; UTF-8 encoding will be used, if it contains &#8220;iso-8859-1&#8221;
then latin1 encoding will be used.</p>

<h2 id="uid1872">5.2. New encoding scheme</h2>
<p>Since version 2.9, internal encoding of <i>Tralics</i> is 16bit utf8.
This has two consequences that will be explained here. The first is that some
tables are now much larger. The numeric argument to
<samp>\catcode</samp><a id="uid1873"></a>, <samp>\mathcode</samp><a id="uid1874"></a>, <samp>\lccode</samp><a id="uid1875"></a>, <samp>\uccode</samp><a id="uid1876"></a>,
<samp>\sfcode</samp><a id="uid1877"></a>, <samp>\delcode</samp><a id="uid1878"></a>, which is a character number can now be
anything between 0 and 65535. We also changed the numbers of registers: there
are 1024 instead of 256.</p>
<p>The result of a <samp>^^^^abcd</samp> construct fits on 16bits, hence is
a character, hence can appear in a command name (in the case of a
multicharacter control sequence, it must have category code `letter´; initially
all character with code greater than 128 have category `other´).
In order to save space, a short-verb character must fit on 8bits;
otherwise, its category code will not be properly restored when you undeclare
it (category other will be used).</p>
<p>All characters are valid in math mode. The translation of an ASCII character
may depend on the font, otherwise, it is always <tt class="txt">&lt;mi&gt;</tt>. For instance, in the
case of <samp>$\mathbf\´e$</samp>, expansion of the accent command produces a
8bit character, unaffected by the font change, and the translation is a
<tt class="txt">&lt;mi&gt;</tt> containing the e-acute letter.
Full 21 bit characters are allowed in Math mode. An expression <samp>$x$</samp> is
considered trivial math and translates into a <tt class="txt">&lt;simplemath&gt;</tt> element
only if the character fits on seven bits and has category letter.</p>
<p>The default input and output encoding is latin1, which is no more the internal
encoding. As a consequence, there are two conversion procedures.
We explained above that the input encoding can be given on the first line of
the file. Otherwise a default encoding will be used. This can be explained in
the configuration file. As a consequence, the main input file is read without
conversion, then the configuration file is considered, and then the main input
file is converted; all other files are immediately converted.</p>
<p>On the other hand, a character like <samp>é</samp> is represented as <samp>Ã©</samp> in the
internal tree.
This character will appear, in the output file, in the form
<tt class="txt">&amp;#e9;</tt> if you call <i>Tralics</i> with option <tt>-oe8a</tt> or
<tt>-oe1a</tt>, as <tt class="txt">é</tt> if you call <i>Tralics</i> with option <tt>-oe1</tt> or
<tt class="txt">Ã©</tt> if you call <i>Tralics</i> with option <tt>-oe8</tt>. If the option
contains a, the <span class="sansserif">XML</span> file contains only 7bit ASCII characters; the only
difference between the two options is the encoding declaration. These options
specify also the encoding used for the transcript file.
You can specify it independently with the options <tt>-te8a</tt>,
<tt>-te1a</tt>, <tt>-te8</tt>,
or <tt>-te1</tt>. If the character is too big to fit in the encoding, then the
hat-hat notation is used (see example above).
Because each <span class="sansserif">XML</span> file contains its encoding, a <span class="sansserif">XML</span> processor will handle
the file produced by <i>Tralics</i> independently of the output encoding. Moreover,
whatever the encoding, input or output, you know that <samp>^^^^03b7</samp> is Greek
letter eta.</p>

<h2 id="uid1879">5.3. Changing the input encoding</h2>
<p>We mentioned in the previous section that whenever <i>Tralics</i> reads a file,
it converts its content, according to the current encoding (that can be given
at the start of the file, using ASCII characters), with an exception for the
main input file. The situation is a bit more complex:
configuration files, tcf files, bibliography data files, and
TeX files opened by <samp>\openin</samp> use a fixed encoding; other source files
use a variable encoding.</p>
<p>The default encoding is stored in
<samp>\input@encoding@default</samp><a id="uid1880"></a>. The default
value is one, but can be changed via an option to the program (utf8 or latin1
select encoding 0 or 1 respectively).</p>
<p>The current encoding is stored in
<samp>\input@encoding</samp><a id="uid1881"></a>. This is an attribute of the
current input file, it can be changed at any time. The new encoding is used
when <i>Tralics</i> needs to read a new line in order to fetch the next
token. Nothing special is done in the case of <samp>\read</samp>.</p>
<p>Whenever a file is opened, its initial encoding is computed. If the file has a
fixed encoding, then all lines are immediately converted, otherwise lines are
converted when needed. If the first line of the file contains the string
<samp>utf8-encoded</samp>, then encoding 0 is assumed, if the line contains
<samp>iso-8859-1</samp>, then encoding 1 is assumed, and if the line contains
<samp>tralics-encoding:NN</samp> where NN is a sequence of one or two digits forming
a number less than 34, then encoding NN is assumed. There are other
heuristics. For instance, if <samp>%&amp;TEX encoding = UTF-8</samp> appears near the
start of the file, then encoding 0 is assumed. In all other cases, the
default encoding is assumed.</p>
<p>In the current version of <i>Tralics</i>, there are 34 possible encodings.
Encoding number 0 is UTF8; this is an encoding where an ASCII character is
represented by a single byte (with the same value as the character), and other
characters use a variable number (between 1 and 4) of bytes. In encodings like
UTF16, a character is represented by more than one byte. There is currently no
support for such encodings yet. Stated otherwise, we assume that character C
is represented by a byte B, and the encoding specifies the value C at position
B. Encoding 1 is latin1 (also known as iso-8859-1), it has B=C. For the 32
remaining encodings, it is possible to specify, for each byte B, the
associated character C (default is B). Trying to set the current or default
encoding to a value outside the range 0-33 is ignored; trying to modify
an encoding outside the range 2-33 raises an <i>Illegal encoding</i>
error, and invalid byte value gives <i>Illegal encoding position</i> error.
In case of an illegal character value (negative, zero, 65536 or more), the
byte value is used instead. The magic command is
<samp>\input@encoding@val</samp><a id="uid1882"></a>; it reads an encoding, a
byte and a value.
In the example that follows we change
the encoding number 2 so that <samp>\FOO</samp> is read as <samp>\foo</samp>:</p>
<pre class="latex-code"><span class="prenumber">1</span> \input@encoding@val 2 `O =`o
<span class="prenumber">2</span> \input@encoding@val 2 `F =`f
<span class="prenumber">3</span> \let\foo\bar
<span class="prenumber">4</span> \showthe\input@encoding@val 2 `O
<span class="prenumber">5</span> \input@encoding=2
<span class="prenumber">6</span> \show\FOO
<span class="prenumber">7</span> \showthe\input@encoding@val 2 `O
<span class="prenumber">8</span> \showthe\input@encoding
<span class="prenumber">9</span> \input@encoding@default=0
<span class="prenumber">10</span> \showthe\input@encoding@default
<span class="prenumber">11</span> \input@encoding=1
</pre>
<p>This example shows three commands in read or write mode: when the command is
prefixed by <samp>\showthe</samp> it read a value from memory and prints it on the
terminal, otherwise a number is scanned and written in memory. The equals
signs before the number is optional. No less than 13 integers are scanned,
some are given as an explicit integer, some as a character code.
We assume that, for encoding 2, all characters map to themselves.
Since <samp>\FOO</samp> is read as <samp>\foo</samp>, the <samp>\show</samp> command should print
<samp>\bar</samp>, on lines 4 and 7 you see the value stored of encoding 2
for the character O (first upper case, then lower case), this is twice 111.
Other values shown are 2 and 0.</p>
<p>We describe from now on the content of the <span class="sansserif">inputenc</span> package.
You load it by saying
<samp>\usepackage</samp> <samp>[foo,bar]</samp> <samp>{inputenc}</samp>. The effect of this
command is the following. First, a symbol name is defined for each of the 23
known encoding, for instance utf8 for UTF-8 (encoding 0),
latin1 for latin1 (encoding 1), etc.
The command <samp>\inputencodingname</samp><a id="uid1883"></a> holds the current input coding name,
and <samp>\encoding@value</samp> converts this to an integer.
The command <samp>\inputencoding</samp><a id="uid1884"></a> can be used to change the
encoding. It is defined as:</p>
<pre class="latex-code"><span class="prenumber">12</span> \def\inputencoding#1{%
<span class="prenumber">13</span>   \the\inpenc@prehook  %% pre-hook
<span class="prenumber">14</span>   \edef\inputencodingname{#1}%
<span class="prenumber">15</span>   \input@encoding=\encoding@value{\inputencodingname}%
<span class="prenumber">16</span>   \the\inpenc@posthook} %% post-hook
</pre>
<p class="nofirst noindent">There are two hooks (token lists) that do nothing, added here for
compatibility with the LaTeX package. You can use them to output as
messages, such as: switching from encoding A to encoding B (the initial value
of the encoding name is <samp>\relax</samp>, this can be used by the pre-hook).</p>
<p>The options, foo and bar in the example,
should be valid names. The last name becomes the current and default encoding.
As mentioned above, the current encoding applies to an input file, and there
is no reason to change the encoding of the package file. Hence, the following
is executed:</p>
<pre class="latex-code"><span class="prenumber">17</span>   \input@encoding@default\encoding@value{bar}%
<span class="prenumber">18</span>   \AtBeginDocument{\inputencoding{bar}}
</pre>
<p>If the options are, for instance ansinew and applemac, the tables associated to
these encodings are defined; some other tables might also be defined, but you
should not rely on this (of course, latin1 and utf8, can be used anywhere,
because they are builtin). The package contains</p>
<pre class="latex-code"><span class="prenumber">19</span> \edef\io@enc{\encoding@value{latin9}}
<span class="prenumber">20</span> \DeclareInputText{164}{"20AC}
<span class="prenumber">21</span> \DeclareInputText{166}{"160}
<span class="prenumber">22</span> \DeclareInputText{168}{"161}
<span class="prenumber">23</span> \DeclareInputText{180}{"17D}
<span class="prenumber">24</span> \DeclareInputText{184}{"17E}
<span class="prenumber">25</span> \DeclareInputText{188}{"152}
<span class="prenumber">26</span> \DeclareInputText{189}{"153}
<span class="prenumber">27</span> \DeclareInputText{190}{"178}
</pre>
<p>The code above defines the latin9 (iso-8859-15) encoding. It is very
like latin1, but defines the Euro sign at position 164.
Defining 256 characters per encoding using this method is inefficient.
For this reason you can see</p>
<pre class="latex-code"><span class="prenumber">28</span> \input@encoding@val \encoding@value{latin2} -96 160
<span class="prenumber">29</span> 160 "104 "306 "141 164 "13D "15A 167
</pre>
<p class="nofirst noindent">As explained above, the command on the start of the line reads 3 integers: an
encoding value (here, the encoding of latin2), a byte position and a character
value. The byte position must a number between 0 and 255. Here we use
an extension: If a negative number minus N has been read,
followed by A such that the sum of A and N is at most 256, then N values will
be read, and stored at position A and following (here N is 96, and we have
shown only the first eight values).</p>

<h2 id="uid1885">5.4. Characters and Accents</h2>
<p>There are some commands that put an accent over a letter.
You can say <samp>a\accent 98 cde</samp><a id="uid1886"></a>, this works in TeX,
but not in <i>Tralics</i>: you will get an error,
<i>Unimplemented command \accent</i>. The number 98 is read,
and converted to an integer. The Unicode character will be used; thus the
translated result is `abcde´.</p>
<p>You can say <samp>\a´e</samp><a id="uid1887"></a>. <a id="uid1888" href="#note62" title="This is an apostrophe, character U+0027, ascii 39. The Tralics translation could be acute accent, Un..."><small>(note: </small>&#10163;<small>)</small></a>This is a command introduced by LaTeX so as to
allow accents inside a tabbing. Some care must be taken. If you say
<samp>\a{par}{b}</samp> in LaTeX, you get an error of the form:
<i>Paragraph ended before \@changed@cmd was complete</i>.
The <i>Tralics</i> error message is: <i>wanted a single token as argument to
\a</i>. If you say <samp>\a\foo12</samp>, there is a single token, and the
error is: <i>Bad syntax of \a,
argument is \foo</i>. In fact, the token after <samp>\a</samp> must be a
valid accent character. After that <samp>\a´</samp> is handled exactly like <samp>\´</samp>.
You can say `<samp>\= U</samp>´, the space after the command is
ignored. You cannot say `<samp>\={ U}</samp>´, the space is not removed,
this is an error. In fact, the argument list
of the accent command should contain exactly one token (exception: double
accents will be explained later). This token should be a character, with code
between 0 and 128. Hence <samp>\´Ê</samp> is wrong, you must say
<samp>\´{\^E}}</samp>
if you want &#7870;. The message is <i>Error in accent, command =
\´; Cannot put this accent on non 7-bit character É.</i>
If the token <samp>\i</samp> is given<a id="uid1889"></a>, it will be replaced by
<samp>i</samp>, so that <samp>\&#8221;</samp><samp>\i</samp> and <samp>\&#8220;i</samp> produce the same result.
You can say <samp>\=</samp><samp>\AE</samp>, <samp>\=</samp><samp>\ae</samp>, <samp>\´</samp><samp>\AE</samp>, <samp>\´</samp><samp>\ae</samp>,
<samp>\´</samp><samp>\AA</samp>, <samp>\´</samp><samp>\aa</samp>, <samp>\´</samp><samp>\O</samp>,
<samp>\´</samp><samp>\o</samp>. The result looks like &#482;&#483;&#508;&#509;&#506;&#507;&#510;&#511;.</p>
<p>You can put an accent on a letter only in the case where this gives a
Unicode character. In the case of <samp>\c{a}</samp> and
<samp>\c{\=a}</samp>, the error message is
the same: <i>Error in accent, command = \c;
Cannot put this accent on letter a</i>.
Table <a href="#uid1890">1</a>
indicates on which letters you can put an accent. See the html page
<a href="http://www-sop.inria.fr/apics/tralics/doc-chars.html">http://www-sop.inria.fr/apics/tralics/doc-chars.html</a>
for a list of some glyphs.</p>
<div class="hc"><table align="center" style="caption-side:bottom; border-collapse: collapse; border-width:1px;" id="uid1890"><caption><strong>Table 1. </strong><i>All possible accents</i>.
You can put an accent on any letter,
except Q. You can put accents on non-letters, for instance \ae, see
text. Some characters accept two accents. In general, you can put an accent
on a lower case letter, an upper case letter. There is one exception: you
cannot put a dot over a lower case I, because there is already a dot. For h,
j, t w, and y, there are accents that apply only to lowercase letters.</caption><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;">A</td>
<td style="text-align:center;border-bottom:solid 1px;">B</td>
<td style="text-align:center;border-bottom:solid 1px;">C</td>
<td style="text-align:center;border-bottom:solid 1px;">D</td>
<td style="text-align:center;border-bottom:solid 1px;">E</td>
<td style="text-align:center;border-bottom:solid 1px;">F</td>
<td style="text-align:center;border-bottom:solid 1px;">G</td>
<td style="text-align:center;border-bottom:solid 1px;">H</td>
<td style="text-align:center;border-bottom:solid 1px;">I</td>
<td style="text-align:center;border-bottom:solid 1px;">J</td>
<td style="text-align:center;border-bottom:solid 1px;">K</td>
<td style="text-align:center;border-bottom:solid 1px;">L</td>
<td style="text-align:center;border-bottom:solid 1px;">M</td>
<td style="text-align:center;border-bottom:solid 1px;">N</td>
<td style="text-align:center;border-bottom:solid 1px;">O</td>
<td style="text-align:center;border-bottom:solid 1px;">P</td>
<td style="text-align:center;border-bottom:solid 1px;">Q</td>
<td style="text-align:center;border-bottom:solid 1px;">R</td>
<td style="text-align:center;border-bottom:solid 1px;">S</td>
<td style="text-align:center;border-bottom:solid 1px;">T</td>
<td style="text-align:center;border-bottom:solid 1px;">U</td>
<td style="text-align:center;border-bottom:solid 1px;">V</td>
<td style="text-align:center;border-bottom:solid 1px;">W</td>
<td style="text-align:center;border-bottom:solid 1px;">X</td>
<td style="text-align:center;border-bottom:solid 1px;">Y</td>
<td style="text-align:center;border-right:solid 1px;border-bottom:solid 1px;">Z</td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\^</samp></big></td>
<td style="text-align:center;">Ââ</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#264;&#265;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">Êê</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#284;&#285;</td>
<td style="text-align:center;">&#292;&#293;</td>
<td style="text-align:center;">Îî</td>
<td style="text-align:center;">&#308;&#309;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">Ôô</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#348;&#349;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">Ûû</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#372;&#373;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#374;&#375;</td>
<td style="text-align:center;border-right:solid 1px;">&#7824;&#7825;</td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\´</samp> </big></td>
<td style="text-align:center;">Áá</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#262;&#263;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">Éé</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#500;&#501;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">Íí</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7728;&#7729;</td>
<td style="text-align:center;">&#313;&#314;</td>
<td style="text-align:center;">&#7742;&#7743;</td>
<td style="text-align:center;">&#323;&#324;</td>
<td style="text-align:center;">Óó</td>
<td style="text-align:center;">&#7764;&#7765;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#340;&#341;</td>
<td style="text-align:center;">&#346;&#347;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">Úú</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7810;&#7811;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">Ýý</td>
<td style="text-align:center;border-right:solid 1px;">&#377;&#378;</td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\`</samp></big></td>
<td style="text-align:center;">Àà</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">Èè</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">Ìì</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#504;&#505;</td>
<td style="text-align:center;">Òò</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">Ùù</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7808;&#7809;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7922;&#7923;</td>
<td style="text-align:center;border-right:solid 1px;"></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\&#8221;</samp> </big></td>
<td style="text-align:center;">Ää</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">Ëë</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7718;&#7719;</td>
<td style="text-align:center;">Ïï</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">Öö</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7831;</td>
<td style="text-align:center;">Üü</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7812;&#7813;</td>
<td style="text-align:center;">&#7820;&#7821;</td>
<td style="text-align:center;">&#376;ÿ</td>
<td style="text-align:center;border-right:solid 1px;"></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\c</samp></big></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">Çç</td>
<td style="text-align:center;">&#7696;&#7697;</td>
<td style="text-align:center;">&#552;&#553;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#290;&#291;</td>
<td style="text-align:center;">&#7720;&#7721;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#310;&#311;</td>
<td style="text-align:center;">&#315;&#316;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#325;c n</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#342;&#343;</td>
<td style="text-align:center;">&#350;&#351;</td>
<td style="text-align:center;">&#354;&#355;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;border-right:solid 1px;"></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\u</samp></big></td>
<td style="text-align:center;">&#258;&#259;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#276;&#277;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#286;&#287;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#300;&#305;i</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#334;&#335;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#364;&#365;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;border-right:solid 1px;"></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\v</samp></big></td>
<td style="text-align:center;">&#461;&#462;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#268;&#269;</td>
<td style="text-align:center;">&#270;&#271;</td>
<td style="text-align:center;">&#282;&#283;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#486;&#487;</td>
<td style="text-align:center;">&#542;&#543;</td>
<td style="text-align:center;">&#463;&#464;</td>
<td style="text-align:center;">&#496;</td>
<td style="text-align:center;">&#488;&#489;</td>
<td style="text-align:center;">&#317;&#318;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#327;&#328;</td>
<td style="text-align:center;">&#465;&#466;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#344;&#345;</td>
<td style="text-align:center;">&#352;&#353;</td>
<td style="text-align:center;">&#356;&#357;</td>
<td style="text-align:center;">&#467;&#468;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;border-right:solid 1px;">&#381;&#382;</td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\~</samp></big></td>
<td style="text-align:center;">Ãã</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7868;&#7869;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#296;&#297;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">Ññ</td>
<td style="text-align:center;">Õõ</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#360;&#361;</td>
<td style="text-align:center;">&#7804;&#7805;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7928;&#7929;</td>
<td style="text-align:center;border-right:solid 1px;"></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\H</samp></big></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#336;&#337;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#368;&#369;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;border-right:solid 1px;"></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\k</samp> </big></td>
<td style="text-align:center;">&#260;&#261;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#280;&#281;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#302;&#303;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#490;&#491;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#370;&#371;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;border-right:solid 1px;"></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\.</samp></big></td>
<td style="text-align:center;">&#550;&#551;</td>
<td style="text-align:center;">&#7682;&#7683;</td>
<td style="text-align:center;">&#266;&#267;</td>
<td style="text-align:center;">&#7690;&#7691;</td>
<td style="text-align:center;">&#278;&#279;</td>
<td style="text-align:center;">&#7710;&#7711;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7714;&#7715;</td>
<td style="text-align:center;">&#304;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#319;&#320;</td>
<td style="text-align:center;">&#7744;&#7745;</td>
<td style="text-align:center;">&#7748;&#7749;</td>
<td style="text-align:center;">&#558;&#559;</td>
<td style="text-align:center;">&#7766;&#7767;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7768;&#7769;</td>
<td style="text-align:center;">&#7776;&#7777;</td>
<td style="text-align:center;">&#7786;&#7787;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7814;&#7815;</td>
<td style="text-align:center;">&#7818;&#7819;</td>
<td style="text-align:center;">&#7822;&#7823;</td>
<td style="text-align:center;border-right:solid 1px;">&#379;&#380;</td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\=</samp></big></td>
<td style="text-align:center;">&#256;&#257;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#274;&#275;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7712;&#7713;</td>
<td style="text-align:center;">&#294;&#295;</td>
<td style="text-align:center;">&#298;&#299;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#332;&#333;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#358;&#359;</td>
<td style="text-align:center;">&#362;&#363;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#562;&#563;</td>
<td style="text-align:center;border-right:solid 1px;"></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\r</samp></big></td>
<td style="text-align:center;">Åå</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#366;&#367;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7832;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7833;</td>
<td style="text-align:center;border-right:solid 1px;"></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\b</samp></big></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7686;&#7687;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7694;&#7695;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7830;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7732;&#7733;</td>
<td style="text-align:center;">&#7738;&#7739;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7752;&#7753;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7774;&#7775;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7790;&#7791;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;border-right:solid 1px;">&#7828;&#7829;</td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\d</samp></big></td>
<td style="text-align:center;">&#7840;&#7841;</td>
<td style="text-align:center;">&#7684;&#7685;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7692;&#7693;</td>
<td style="text-align:center;">&#7864;&#7865;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7716;&#7717;</td>
<td style="text-align:center;">&#7882;&#7883;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7730;&#7731;</td>
<td style="text-align:center;">&#7734;&#7735;</td>
<td style="text-align:center;">&#7746;&#7747;</td>
<td style="text-align:center;">&#7750;&#7751;</td>
<td style="text-align:center;">&#7884;&#7885;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7770;&#7771;</td>
<td style="text-align:center;">&#7778;&#7779;</td>
<td style="text-align:center;">&#7788;&#7789;</td>
<td style="text-align:center;">&#7908;&#7909;</td>
<td style="text-align:center;">&#7806;&#7807;</td>
<td style="text-align:center;">&#7816;&#7817;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7924;&#7925;</td>
<td style="text-align:center;border-right:solid 1px;">&#7826;&#7827;</td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\f</samp></big></td>
<td style="text-align:center;">&#514;&#515;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#518;&#519;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#522;&#523;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#526;&#527;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#530;&#531;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#534;&#535;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;border-right:solid 1px;"></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\C</samp></big></td>
<td style="text-align:center;">&#512;&#513;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#516;&#517;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#520;&#521;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#524;&#525;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#528;&#529;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#532;&#533;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;border-right:solid 1px;"></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\T</samp></big></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7706;&#7707;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7724;&#7725;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7796;&#7797;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;border-right:solid 1px;"></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\V</samp></big></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7698;&#7699;</td>
<td style="text-align:center;">&#7704;&#7705;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7740;&#7741;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7754;&#7755;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;">&#7792;&#7793;</td>
<td style="text-align:center;">&#7798;&#7799;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;border-right:solid 1px;"></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big><samp>\D</samp></big></td>
<td style="text-align:center;">&#7680;&#7681;</td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;"></td>
<td style="text-align:center;border-right:solid 1px;"></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;border-bottom:solid 1px;"><big><samp>\h</samp></big></td>
<td style="text-align:center;border-bottom:solid 1px;">&#7842;&#7843;</td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;">&#7866;&#7867;</td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;">&#7880;&#7881;</td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;">&#7886;&#7887;</td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;">&#7910;&#7911;</td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;"></td>
<td style="text-align:center;border-bottom:solid 1px;">&#7926;&#7927;</td>
<td style="text-align:center;border-right:solid 1px;border-bottom:solid 1px;"></td>
</tr></table></div>
<p>Some accents are not standard. Examples:</p>
<ul>
<li id="uid1891"><p class="nofirst noindent"><samp>\^a</samp><a id="uid1892"></a> gives â,</p>
</li>
<li id="uid1893"><p class="nofirst noindent"><samp>\´ a</samp><a id="uid1894"></a> gives á,</p>
</li>
<li id="uid1895"><p class="nofirst noindent"><samp>\` a</samp><a id="uid1896"></a> gives à,</p>
</li>
<li id="uid1897"><p class="nofirst noindent"><samp>\" a</samp><a id="uid1898"></a> gives ä,</p>
</li>
<li id="uid1899"><p class="nofirst noindent"><samp>\c c</samp><a id="uid1900"></a> gives ç,</p>
</li>
<li id="uid1901"><p class="nofirst noindent"><samp>\u a</samp><a id="uid1902"></a> gives &#259;,</p>
</li>
<li id="uid1903"><p class="nofirst noindent"><samp>\v a</samp><a id="uid1904"></a> gives &#462;,</p>
</li>
<li id="uid1905"><p class="nofirst noindent"><samp>\~ a</samp><a id="uid1906"></a> gives ã,</p>
</li>
<li id="uid1907"><p class="nofirst noindent"><samp>\H o</samp><a id="uid1908"></a> gives &#337;, it is redefined in the case of double
accents,</p>
</li>
<li id="uid1909"><p class="nofirst noindent"><samp>\k a</samp><a id="uid1910"></a> gives &#261;,</p>
</li>
<li id="uid1911"><p class="nofirst noindent"><samp>\. a</samp><a id="uid1912"></a> gives &#551;,</p>
</li>
<li id="uid1913"><p class="nofirst noindent"><samp>\= a</samp><a id="uid1914"></a> gives &#257;,</p>
</li>
<li id="uid1915"><p class="nofirst noindent"><samp>\r a</samp><a id="uid1916"></a> gives å,</p>
</li>
<li id="uid1917"><p class="nofirst noindent"><samp>\b b</samp><a id="uid1918"></a> gives &#7687;,</p>
</li>
<li id="uid1919"><p class="nofirst noindent"><samp>\d a</samp><a id="uid1920"></a> gives &#7841;,</p>
</li>
<li id="uid1921"><p class="nofirst noindent"><samp>\f a</samp><a id="uid1922"></a> gives an inverted breve accent over a,</p>
</li>
<li id="uid1923"><p class="nofirst noindent"><samp>\C a</samp><a id="uid1924"></a> gives a double grave accent on a,</p>
</li>
<li id="uid1925"><p class="nofirst noindent"><samp>\T e</samp><a id="uid1926"></a> gives a tilde under e,</p>
</li>
<li id="uid1927"><p class="nofirst noindent"><samp>\V d</samp><a id="uid1928"></a> gives a circumflex below d,</p>
</li>
<li id="uid1929"><p class="nofirst noindent"><samp>\D a</samp><a id="uid1930"></a> gives a ring below a,</p>
</li>
<li id="uid1931"><p class="nofirst noindent"><samp>\h a</samp><a id="uid1932"></a> gives a hook over a.</p>
</li></ul>
<p>If in the table you see `I´ instead of `x´, this means that the accent applies
only on capital I. If you see h, j, t, w or y, this applies only to the lower
case letter. Otherwise the accent applies to both upper case letter and lower
case letter.</p>
<p>There is a possibility to put double accents (for Vietnamese, for instance).
The following
ones are recognized, for upper and lower case letters, the order of the
accents is
irrelevant. Inside braces, there is an accent command, optional spaces, and a
character (maybe enclosed in braces).</p>
<pre class="latex-code">\"{\=U} \"{\=A} \"{\=O} \"{\'U} \"{\'I} \"{\`U} \.{\=A} \.{\=O}
\={\~ O} \k{\=O} \'{\~U} \'{\O} \'{\=O} \'{\=E} \'{\.S} \c{\' C}
\'{\^A} \'{\^O} \'{\^E} \`{\=O} \`{\=E} \d{\=L} \d{\=R}
\`{\^ A} \`{\^ E} \H{\'U} \H{\'O} \H{\`U} \H{\`O} \H{\h U} \H{\h O}
\H{\~U} \H{\~O} \H{\d U} \H{\d O} \d{\^A} \d{\^O} \d{\^E} \~{\^A}
\~{\^O} \~{\^E} \h{\^A} \h{\^O} \h{\^E} \u{\'A} \u{\`A} \u{\h A}
\u{\~A} \u{\d A} \~{\" O} \^{\'O} \^{\`O} \u{\c E} \.{\v S} \.{\d S}
</pre>
<p>This is the translation.</p>
<pre class="xml-code">&amp;#x1E7A; &amp;#x1DE; &amp;#x22A; &amp;#x1D7; &amp;#x1E2E; &amp;#x1DB; &amp;#x1E0; &amp;#x230;
&amp;#x22C; &amp;#x1EC; &amp;#x1E78; &amp;#x1FE; &amp;#x1E52; &amp;#x1E16; &amp;#x1E64; &amp;#x1E08;
&amp;#x1EA4; &amp;#x1ED0; &amp;#x1EBE; &amp;#x1E50; &amp;#x1E14; &amp;#x1E38; &amp;#x1E5C;
&amp;#x1EA6; &amp;#x1EC0; &amp;#x1EE8; &amp;#x1EDA; &amp;#x1EEA; &amp;#x1EDC; &amp;#x1EEC; &amp;#x1EDE;
&amp;#x1EEE; &amp;#x1EE0; &amp;#x1EF0; &amp;#x1EE2; &amp;#x1EAC; &amp;#x1ED8; &amp;#x1EC6; &amp;#x1EAA;
&amp;#x1ED6; &amp;#x1EC4; &amp;#x1EA8; &amp;#x1ED4; &amp;#x1EC2; &amp;#x1EAE; &amp;#x1EB0; &amp;#x1EB2;
&amp;#x1EB4; &amp;#x1EB6; &amp;#x1E4E; &amp;#x1ED0; &amp;#x1ED2; &amp;#x1E1C; &amp;#x1E66; &amp;#x1E68;
</pre>
<table style="caption-side:bottom" width="80%" id="uid1933"><caption><strong>Figure 2. </strong>Some characters</caption><tbody align="center"><tr><td><img src="img1.png" alt="img1" /></td></tr></tbody></table>
<p>You can see a representation on figure <a href="#uid1933">2</a>. We show here
the <span class="sansserif">HTML</span> output for these characters.
&#7802; &#478; &#554; &#471; &#7726; &#475; &#480; &#560;
&#556; &#492; &#7800; &#510; &#7762; &#7702; &#7780; &#7688;
&#7844; &#7888; &#7870; &#7760; &#7700; &#7736; &#7772;
&#7846; &#7872; &#7912; &#7898; &#7914; &#7900; &#7916; &#7902;
&#7918; &#7904; &#7920; &#7906; &#7852; &#7896; &#7878; &#7850;
&#7894; &#7876; &#7848; &#7892; &#7874; &#7854; &#7856; &#7858;
&#7860; &#7862; &#7758; &#7888; &#7890; &#7708; &#7782; &#7784;
&#7803; &#479; &#555; &#472; &#7727; &#476; &#481; &#561;
&#557; &#493; &#7801; &#511; &#7763; &#7703; &#7781; &#7689;
&#7845; &#7889; &#7871; &#7761; &#7701; &#7737; &#7773;
&#7847; &#7873; &#7913; &#7899; &#7915; &#7901; &#7917; &#7903;
&#7919; &#7905; &#7921; &#7907; &#7853; &#7897; &#7879; &#7851;
&#7895; &#7877; &#7849; &#7893; &#7875; &#7855; &#7857; &#7859;
&#7861; &#7863; &#7759; &#7889; &#7891; &#7709; &#7783; &#7785;.
The first character in the list is: latin capital letter u with macron and
diaeresis, the second one is latin capital letter a with diaeresis and macron.
The order of accents is not the same. For simplicity, in <i>Tralics</i>, this is
irrelevant. You can notice that the LaTeX output is strange.
First, we have defined <samp>\h</samp> to be a no-op. For the figure, we used the
following code:</p>
<pre class="latex-code">\newcommand\hook@above[1]{%
 \leavevmode\setbox0\hbox{#1}\dimen@\ht0 \advance\dimen@.5ex
 \rlap{\raise\dimen@\hbox{\kern2pt\char11}}#1}
</pre>
<p class="nofirst noindent">This code works, provided that the font has, at position 11, something that
looks like a hook (for the T1 encoding, this is a cedilla). In LaTeX you
cannot put a <samp>\"</samp> accent on <samp>\=U</samp>. No error is signaled, it is just that TeX puts the accent before the accentee in case the accentee is not a character,
instead of putting it above<a id="uid1934" href="#note63" title="See the book, chapter 25"><small>(note: </small>&#10163;<small>)</small></a>.
You can say <samp>\"{\´U}</samp> because <samp>\´U</samp> is a character in the
T1 encoding.
The <samp>\mathaccent</samp><a id="uid1935"></a> command has not these
limitations<a id="uid1936" href="#note64" title="See the book, chapter 26"><small>(note: </small>&#10163;<small>)</small></a>.
The first character of the figure was composed via</p>
<pre class="latex-code">\UnicodeCharacter{x1E7A}{\ensuremath{\ddot{\mbox{\=U}}}}
</pre>
<p>In German, the umlaut character has a special meaning. The following example
shows what can be input. See the babel documentation for details.</p>
<pre class="latex-code">\language=2
"a"o"u"e"i"""A"O"U"I"E
"s"z"S"Z"c"C"f"F"l"L"m"M"n"N"p"P"r"R"t"T
"""-"~"|"="`"'"&lt;"&gt;
</pre>
<p class="nofirst noindent">and the <i>Tralics</i> translation.</p>
<pre class="xml-code">äöüëïÄÖÜÏË
ßßSSSZckCKffFFllLLmmMMnnNNppPPrrRRttTT
--&amp;#x0201E;&amp;#x0201D«»
</pre>
<p>The previous hack does not apply if the double quote character has category
code 11 (letter), is in an URL, or in a file name to be read (for instance,
via <samp>\includegraphics</samp>).</p>
<p>The translation of the dash character is the following. If this character
appears in an URL or while reading a file name, it is left unchanged. If
its category code is 11 (letter), usually inside a verbatim environment, its
translation is a dash followed by a <samp>\textnospace</samp>, unless you invoke
<i>Tralics</i> with the <tt>-nozerowidthspace</tt> switch, case where the translation is a
single hyphen. Otherwise, a test is made for a ligature: three hyphens in a
row produce <tt class="txt">&amp;#x2014;</tt> (mdash), and two hyphens produce <tt class="txt">&amp;#x2013;</tt> (ndash).</p>
<p>The characters: <samp>:;!?«»</samp> are handled normally if inside an URL, when
translating a filename, when their category code is 11 (letter, typically,
inside a verbatim), or when the current language is not French. The
translation of <samp>«</samp> is an opening guillemet with some space after it.
If the character that follows
is (after expansion), a normal space, or a ~, or a <samp>\,</samp>, it will be
discarded. The translation of <samp>»</samp> is a space plus the character. If the
previous character is a space, it will be removed. (TeX has a primitive
<samp>\unhskip</samp> that can remove a space; the <i>Tralics</i> equivalent works in usual
cases). The other four punctuation characters are handled like a closing
guillemet. In any case, the space added by these characters is a non-breaking
one.</p>
<p>The characters <samp>`´&lt;&gt;</samp> behave in a special manner, in the same case as the
guillemets. In fact, if they are doubled, French guillemets will be used
instead. Thus <samp>&lt;&lt;foo&gt;&gt;</samp> and
<samp>``foo''</samp> and <samp>«foo»</samp> behave the same,
if the current language is French. Otherwise, a <samp>\textnospace</samp> will be added
after the character, in the same way as for a dash, namely outside an URL,
file name, but if the category code is 11 (letter), and the magic switch has
not been given. Example:</p>
<pre class="latex-code">\language = 0
test ligatures: &lt;&lt;&gt;&gt;``''-- et --- !?:;
\language=1
test ligatures: &lt;&lt;&gt;&gt;``''-- et --- !?:;
test ligatures:\verb=&lt;&lt;&gt;&gt;``''-- et --- !?:;=
</pre>
<p>This is the translation</p>
<pre class="xml-code">test ligatures: &amp;lt;&amp;lt;&amp;gt;&amp;gt;``''&amp;#x2013; et &amp;#x2014; !?:;
test ligatures : «  »«  »&amp;#x2013; et &amp;#x2014; ! ? : ;
test ligatures :&lt;hi rend='tt'&gt;&amp;lt;&amp;#x200B;&amp;lt;&amp;#x200B;
     &amp;gt;&amp;#x200B;&amp;gt;&amp;#x200B;`&amp;#x200B;`&amp;#x200B;'&amp;#x200B;'&amp;#x200B;-&amp;#x200B;
     -&amp;#x200B; et -&amp;#x200B;-&amp;#x200B;-&amp;#x200B; !?:;&lt;/hi&gt;
</pre>
<p class="nofirst noindent">Conversion into <span class="sansserif">HTML</span> gives
test ligatures: &lt;&lt;&gt;&gt;&#8220;&#8221;&#8211; et &#8212; !?:;
test ligatures : «  »&#8220;&#8221;&#8211; et &#8212; ! ? : ;
test ligatures :<tt>&lt;&lt;&gt;&gt;``''-- et --- !?:;</tt>.</p>
<p>The translation of the apostrophe depends on a flag. If <i>Tralics</i> is called
with the switch <tt>-nostraightquotes</tt>, the translation is the same as
<samp>\textasciiacute</samp>, the character U+B4, otherwise it is the quote character
U+27. The character is handled normally if inside an URL, when
translating a filename, when their category code is 11 (letter, typically,
inside a verbatim). This is the translation of the same example as above, whith
options <tt>-nostraightquotes</tt> and <tt>-nozerowidthspace</tt>. We added
option <tt>-oe1a</tt>, this shows nobreak space as <tt class="txt">&amp;#xA0;</tt>.</p>
<pre class="xml-code">test ligatures: &amp;lt;&amp;lt;&amp;gt;&amp;gt;``&amp;#xB4;&amp;#xB4;&amp;#x2013; et &amp;#x2014; !?:;
test ligatures&amp;#xA0;: &amp;#xAB;&amp;#xA0;&amp;#xA0;&amp;#xBB;&amp;#xAB;&amp;#xA0;&amp;#xA0;
  &amp;#xBB;&amp;#x2013; et &amp;#x2014;&amp;#xA0;!&amp;#xA0;?&amp;#xA0;:&amp;#xA0;;
test ligatures&amp;#xA0;:&lt;hi rend='tt'&gt;&amp;lt;&amp;lt;&amp;gt;&amp;gt;``''--&amp;#xA0;et
  &amp;#xA0;---&amp;#xA0;!?:;&lt;/hi&gt;
</pre>
<p>The <span class="sansserif">soul</span> package provides some commands.
Example;
<samp>\ul</samp><a id="uid1937"></a> gives <span style="text-decoration:underline">test for ul</span>,
<samp>\so</samp><a id="uid1938"></a> gives <span style="letter-spacing:0.1em">test for so</span>,
<samp>\st</samp><a id="uid1939"></a> gives <span style="text-decoration:line-through">test for st</span>,
<samp>\caps</samp><a id="uid1940"></a> gives <span style="letter-spacing:0.1em">test for caps</span>,
<samp>\hl</samp><a id="uid1941"></a> gives <span style="background:red">test for hl</span>.</p>

<h2 id="uid1942">5.5. Verbatim material</h2>
<p>We have seen a little example of verbatim code above. It shows that some
<tt class="txt">&amp;#x200B;</tt> characters are
inserted, this is so that, if the <span class="sansserif">XML</span> file is read, a double dash will not
be interpreted as an en-dash. What the <samp>\verb</samp> command produces is a sequence
of characters, whose category codes are 12, except for some, that are of
category 11, namely <samp>`´-&lt;&gt;~&amp;:;?!«»</samp>. You can compare this with
the LaTeX code, shown
in section <a href="#uid1037" title="A nontrivial command \verb">2.12</a>: the <samp>\@noligs</samp> command makes some characters of
category code 13, the associated action is: output the character, with a zero
kern in front. There is an exception: the space character is replaced by the
<samp>\nobreakspace</samp> token, but this can be changed.</p>
<p>You can say <samp>\verb*+x y+</samp> or <samp>\verb+ x y+</samp>.
All characters between the two plus
signs are collected. Any character can be used instead of the plus sign
(Try <samp>\verb*abca</samp> and <samp>\verb =a= !</samp>). In the case where a star is
given, spaces are
replaced by <samp>\textvisiblespace</samp><a id="uid1943"></a>,
otherwise by <samp>\nobreakspace</samp><a id="uid1944"></a>.
You can say <samp>\DefineShortVerb</samp><samp>\+</samp><a id="uid1945"></a>, after that
<samp>+foo+</samp> is the same as <samp>\verb+foo+</samp>. Note that the command must be
followed by something like `<samp>\+</samp>´ or `<samp>\*</samp>´, i.e., a macro whose name is
formed of a single character.
You can say
<samp>\UndefineShortVerb</samp><samp>\+</samp><a id="uid1946"></a>,
this will undo the previous command. The syntax is the same. If the character
fits on 8 bits, the old category code is restored; otherwise, it is set to 12
(other). Note: assume that the input encoding is latin1, but you declare
<samp>^^^^abcd</samp> as a short verb. When <i>Tralics</i> sees the four
hats, it replaces these 8 bytes by a single character, say <span class="math"><i>C</i></span>, and enters
verbatim mode until finding character <span class="math"><i>C</i></span>. Since this character does not exist
in the current environment, it cannot be found directly; since we are in
verbatim mode, it cannot be found using the four-hat construction. For this
reason an error is signalled when the end of line is reached (an implicit <span class="math"><i>C</i></span>
character is inserted, so that next line will be translated normally).</p>
<p>In the case where `<samp>+</samp>´ is a short verb character, you can say
<samp>\SaveVerb{foo}+\bar+</samp><a id="uid1947"></a>.
This has as effect to remember in a
private command all tokens that <samp>+\bar+</samp> gathers. When you say
<samp>\UseVerb</samp><samp>{foo}</samp>, these tokens are re-inserted in the input stream.<a id="uid1948"></a>
Example:</p>
<pre class="latex-code">\DefineShortVerb\+
\SaveVerb{foo}+\bar +
\UndefineShortVerb\+
\UseVerb{foo}
</pre>
<p class="nofirst noindent">The transcript file will contain, for the <samp>\UseVerb</samp> command the following
line.</p>
<pre class="log-code">\savedverb@foo -&gt;\verbprefix {\verbatimfont \bar\nobreakspace }
</pre>
<p class="nofirst noindent">Here, the <samp>\</samp> before `<samp>b</samp>´ is not a command delimiter,
for otherwise there would have
been a space after <samp>\bar</samp>. Note: another explanation is that the `<samp>b</samp>´
is not of category code 11, so that the command is <samp>\b</samp>; exercise: find all
interpretations of this line.</p>
<p>There are various packages that provide a <samp>verbatim</samp>-like environment.
In <i>Tralics</i>, you can define your own via</p>
<pre class="latex-code">\DefineVerbatimEnvironment{MyVerbatim}{Verbatim}{xx=yy}
</pre>
<p class="nofirst noindent">This defines <samp>MyVerbatim</samp> to be an environment that behaves like
<samp>Verbatim</samp>, that is an extension of the basic <samp>verbatim</samp> environnment
that takes some optional parameters (here, the default value of xx is yy).
The end of a verbatim environment is defined as a line that contains optional
spaces, the <samp>\end</samp> token, optional spaces, the name of the environment
enclosed in braces. Additional characters on the current line
are assumed to be after the verbatim environment.</p>
<p>In the case of a verbatim environment, all characters on the line
are gathered (final spaces disappear, as usual), with category codes as
explained above. If this gives an empty list, a no-break space character is
added<a id="uid1949" href="#note65" title="This is because empty paragraphs are generally removed. With this hack, an empty verbatim line does ..."><small>(note: </small>&#10163;<small>)</small></a>.
As is the case of <samp>\verb</samp>, the <samp>\verbatimfont</samp> command
is prepended.<a id="uid1950"></a> This is defined to be <samp>\tt</samp>.
Moreover, <samp>\verbatimprefix</samp><a id="uid1951"></a> is also added in front of
the token list. In the case of the <samp>\verb</samp> command, there is
<samp>\verbprefix</samp><a id="uid1952"></a> instead. These two commands are defined as
<samp>\@empty</samp>. You can redefine them. Each line is followed by <samp>\par</samp> and
<samp>\noindent</samp>. If the environment is followed by an empty line, or a
<samp>\par</samp> command, this command is removed, as well as the last <samp>\indent</samp>.
Example that shows use of the prefix commands:</p>
<pre class="latex-code">\DefineShortVerb{\|}
\def\verbatimfont#1{{#1}}
\def\verbprefix#1{A#1A}
\def\verbatimprefix#1{B#1B}
Test: \verb+foo+ and |bar|
\UndefineShortVerb{\|}
\begin{verbatim}
line1
line2
\end{verbatim}
</pre>
<p>The translation is:</p>
<pre class="xml-code">&lt;p&gt;Test: AfooA and AbarA&lt;/p&gt;
&lt;p noindent='true'&gt;Bline1B&lt;/p&gt;
&lt;p noindent='true'&gt;Bline2B&lt;/p&gt;
&lt;p noindent='true'&gt;&lt;/p&gt;
</pre>
<p>The Verbatim<a id="uid1953"></a> environment is an extension of the
verbatim<a id="uid1954"></a> environment. There is an optional argument,
an association list. If you say `numbers=true´, then lines will be numbered
(instead of `true´, you can say `left´ or `right´, or anything, the value is
ignored).
If you say `counter=17´, then lines will be numbered, using counter 17,
if you say `counter=foo´, and `foo´ is a counter name,
then lines will be numbered, using counter foo.
If you say `firstnumber=N´, where N is a number, then lines will be numbered
starting from N; if you say `firstnumber=last´, then lines will be numbered
incrementing the previous value. The default counter is <samp>FancyVerbLine</samp>.
Other features defined by the fancyvrb package have not yet been
implemented.</p>
<p>If a line number M is given, the following piece of code is inserted before
the verbatim line: <samp>{\verbatimnumberfont{M}}\space</samp>. The funny command is
<a id="uid1955"></a> <samp>\let</samp> equal to <samp>\small</samp> at the start of the
run. The number is incremented for each line.</p>
<p>Characters after <samp>\begin{Verbatim}</samp>, but on the same line, are ignored.
The same is true if an optional argument is given: all characters that
follow the closing bracket of the optional argument are ignored.
The opening bracket is only looked for on the current line
(unless the end of line character is commented out).</p>
<pre class="latex-code">\begin{Verbatim}                   [numbers=true]
TEST
\end{Verbatim}
and without
\begin{Verbatim}
[ok]TEST
\end{Verbatim}
\begin{Verbatim} %
[ok] this is handled as comment
TEST
\end{Verbatim}
 
\def\verbatimfont#1{{\it #1}}
\def\verbatimnumberfont{\large}
\tracingall
\count3=4
\begin{Verbatim}[counter=3]
5,one line
\end{Verbatim}
\begin{Verbatim}[counter=03]
6,one line
\end{Verbatim}
\newcounter{vbcounter}
\setcounter{vbcounter}8
\begin{Verbatim}[counter=vbcounter]
9,one line
\end{Verbatim}
\begin{Verbatim}[counter=vbcounter]
10,one line
\end{Verbatim}
</pre>
<p>This is the translation.</p>
<pre class="xml-code">&lt;p noindent='true'&gt;&lt;hi rend='small1'&gt;1&lt;/hi&gt; &lt;hi rend='tt'&gt;TEST&lt;/hi&gt;&lt;/p&gt;
&lt;p noindent='true'&gt;and without&lt;/p&gt;
&lt;p noindent='true'&gt;&lt;hi rend='tt'&gt;[ok]TEST&lt;/hi&gt;&lt;/p&gt;
&lt;p noindent='true'&gt;&lt;/p&gt;
&lt;p noindent='true'&gt;&lt;hi rend='tt'&gt;TEST&lt;/hi&gt;&lt;/p&gt;
&lt;p noindent='true'&gt;&lt;hi rend='large1'&gt;5&lt;/hi&gt; &lt;hi rend='it'&gt;5&lt;/hi&gt;,one line&lt;/p&gt;
&lt;p noindent='true'&gt;&lt;hi rend='large1'&gt;6&lt;/hi&gt; &lt;hi rend='it'&gt;6&lt;/hi&gt;,one line&lt;/p&gt;
&lt;p noindent='true'&gt;&lt;/p&gt;
&lt;p noindent='true'&gt;&lt;hi rend='large1'&gt;9&lt;/hi&gt; &lt;hi rend='it'&gt;9&lt;/hi&gt;,one line&lt;/p&gt;
&lt;p noindent='true'&gt;&lt;hi rend='large1'&gt;10&lt;/hi&gt; &lt;hi rend='it'&gt;1&lt;/hi&gt;0,one line&lt;/p&gt;
&lt;p noindent='true'&gt;&lt;/p&gt;
</pre>
<p>Two additional keywords have been added. In order to be compatible, you should
add the following code to the TeX document.</p>
<pre class="latex-code">\csname define@key\endcsname{FV}{style}{}
\csname define@key\endcsname{FV}{pre}{}
</pre>
<p class="nofirst noindent">If you say <samp>style=foo</samp>, then the token <samp>\FV@style@foo</samp> is added
in front of the token list generated by the verbatim environment.
If you say <samp>pre=bar</samp>, then
<samp>\FV@pre@bar</samp> is added before the token list (and before the style
token mentioned above), and <samp>\FV@post@bar</samp> is inserted near the end
(to be precise: before the last <samp>\par</samp> or <samp>\par</samp><samp>\noindent</samp>.
For a case like this</p>
<pre class="latex-code">\begin{Verbatim}[pre=pre,style=latex,numbers=true]
first line
second line
\end{Verbatim}
third line
</pre>
<p class="nofirst noindent">the tokens gathered by the verbatim environment, shown in the transcript file
in verbose mode, and re-indented in order to make the structure easy to
recognise, are</p>
<pre class="log-code">{Verbatim tokens:
 \FV@pre@pre \FV@style@latex
  \par \noindent {\verbatimnumberfont {1}}
      \verbatimprefix {\verbatimfont first\nobreakspace line}
  \par \noindent {\verbatimnumberfont {2}}
      \verbatimprefix {\verbatimfont second\nobreakspace line}
 \FV@post@pre
 \par \noindent }
</pre>
<p>Assume that the following definitions are given</p>
<pre class="latex-code">\def\FV@pre@pre{\begin{xmlelement*}{pre}}
\def\FV@post@pre{\end{xmlelement*}}
\def\FV@style@xml{\XMLaddatt{class}{xml-code}}
%\def\verbatimnumberfont#1{\xbox{vbnumber}{#1}}
</pre>
<p class="nofirst noindent">Then the translation is</p>
<pre class="xml-code">&lt;pre class='latex-code'&gt;
&lt;p noindent='true'&gt;
     &lt;hi rend='small'&gt;1&lt;/hi&gt;
     &lt;hi rend='tt'&gt;first&amp;nbsp;line&lt;/hi&gt;&lt;/p&gt;^^J
&lt;p noindent='true'&gt;
     &lt;hi rend='small'&gt;2&lt;/hi&gt;
     &lt;hi rend='tt'&gt;second&amp;nbsp;line&lt;/hi&gt;&lt;/p&gt;^^J
&lt;/pre&gt;&lt;p noindent='true'&gt;third line^^J
&lt;/p&gt;
</pre>
<p class="nofirst noindent">Note: We have re-indented a little bit the code, and marked newline
characters by <samp>^^J</samp>. As you can see, each verbatim line gives exactly
one line in the <span class="sansserif">XML</span> output, and this line is formed of a <tt class="txt">&lt;p&gt;</tt> element.
If you apply a style sheet with the following definition<a id="uid1956"></a></p>
<pre class="xml-code">&lt;xsl:template match="p"&gt;
  &lt;xsl:choose&gt;
    &lt;xsl:when test="parent::pre"&gt;
      &lt;xsl:apply-templates/&gt;
    &lt;/xsl:when&gt;
    &lt;xsl:otherwise&gt;
      &lt;p&gt;
        &lt;xsl:if test="@noindent = 'true'"&gt;
          &lt;xsl:attribute name="class"&gt;nofirst noindent&lt;/xsl:attribute&gt;
        &lt;/xsl:if&gt;
        &lt;xsl:apply-templates/&gt;
      &lt;/p&gt;
    &lt;/xsl:otherwise&gt;
  &lt;/xsl:choose&gt;
&lt;/xsl:template&gt;
</pre>
<p class="nofirst noindent">then <tt class="txt">&lt;p&gt;</tt> elements are discarded in a <tt class="txt">&lt;pre&gt;</tt>, and some action is done in
case of noindented paragraphs. If moreover the translation of <tt class="txt">&lt;pre&gt;</tt>
is defined by the following code</p>
<pre class="xml-code">&lt;xsl:template match="pre"&gt;
  &lt;pre&gt;
    &lt;xsl:attribute name="class"&gt;
      &lt;xsl:value-of select="@class"/&gt;
    &lt;/xsl:attribute&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/pre&gt;
  &lt;xsl:text&gt;&amp;#x0A;&lt;/xsl:text&gt;
&lt;/xsl:template&gt;
</pre>
<p>we get finally<a id="uid1957"></a></p>
<pre class="xml-code">&lt;pre class="latex-code"&gt;&lt;small&gt;1&lt;/small&gt; &lt;tt&gt;first line&lt;/tt&gt;
&lt;small&gt;2&lt;/small&gt; &lt;tt&gt;second line&lt;/tt&gt;
&lt;/pre&gt;
&lt;p class="nofirst noindent"&gt;third line&lt;/p&gt;
</pre>
<p>This is not valid HTML, since <tt class="txt">&lt;small&gt;</tt> is forbidden in a <tt class="txt">&lt;pre&gt;</tt>.
We can modify the style sheet so that if <tt class="txt">&lt;hi&gt;</tt> is in a <tt class="txt">&lt;pre&gt;</tt>, then a
special action is taken in the case rend=´small´; we can also remove the
useless <tt class="txt">&lt;tt&gt;</tt>. A better solution: we uncomment the definition of
<samp>\verbatimnumberfont</samp>. This will have as effect that verbatim line numbers
will be in a <tt class="txt">&lt;vbnumber&gt;</tt> element, and we can apply the following
transformation.</p>
<pre class="xml-code">&lt;xsl:template match="vbnumber"&gt;
  &lt;span class='prenumber'&gt;
    &lt;xsl:apply-templates/&gt;
  &lt;/span&gt;
&lt;/xsl:template&gt;
</pre>
<p class="nofirst noindent">Thus, the <span class="sansserif">HTML</span> code will be</p>
<pre class="xml-code">&lt;pre class="latex-code"&gt;&lt;span class="prenumber"&gt;1&lt;/span&gt; first line
&lt;span class="prenumber"&gt;2&lt;/span&gt; second line
&lt;/pre&gt;
&lt;p class="nofirst noindent"&gt;third line&lt;/p&gt;
</pre>
<p class="nofirst noindent">This document was converted into <span class="sansserif">HTML</span> using the techniques shown here.
The style sheet changes the background color of the <tt class="txt">&lt;pre&gt;</tt> element,
according to its class, and the background of the <tt class="txt">&lt;span&gt;</tt> to the background
of the page.</p>
<p>Note how the `style´ option of the verbatim environment gives a `class´
attribute in <span class="sansserif">HTML</span> document. If you say<a id="uid1958"></a></p>
<pre class="latex-code">\DefineVerbatimEnvironment{verbatim}{Verbatim}
{listparameters={\topsep0pt },pre=pre}
</pre>
<p class="nofirst noindent">then <samp>verbatim</samp> behaves like <samp>Verbatim</samp>, said otherwise,
an optional argument is scanned. Moreover, the list on the second line
will be put in <samp>\verbatim@hook</samp>; whenever a verbatim environment of type
`Something´ is read, the value of the command <samp>\Something@hook</samp>
is considered (this should be undefined or a command that takes no argument),
and the tokens are added to the optional argument, before other arguments.</p>
<p>You can say <samp>\numberedverbatim</samp><a id="uid1959"></a>
or <samp>\unnumberedverbatim</samp><a id="uid1960"></a>. After that, verbatim
environments will be automatically numbered or not. This does not apply to
Verbatim environments.</p>
<p>There is a command <samp>\fvset</samp><a id="uid1961"></a> that takes an associated list as
argument. If it contains `showspaces=true´ or `showspaces=false´, this changes
how spaces are interpreted in a verbatim environment or command (except for
<samp>\verb*</samp>, case where the space is always visible).</p>

<h2 id="uid1962">5.6. Case change</h2>
<p>There are different commands for changing the case of letters. For instance,
the translation of<a id="uid1963"></a></p>
<pre class="latex-code">\uppercase{Einstéin: $E=mc^2$}
\lowercase{Einstéin: $E=mc^2$}
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;p&gt;EINSTÉIN: &lt;formula type='inline'&gt;
&lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
&lt;mrow&gt;&lt;mi&gt;E&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;M&lt;/mi&gt;&lt;msup&gt;&lt;mi&gt;C&lt;/mi&gt; &lt;mn&gt;2&lt;/mn&gt; &lt;/msup&gt;
&lt;/mrow&gt;&lt;/math&gt;&lt;/formula&gt;
einstéin: &lt;formula type='inline'&gt;
&lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
&lt;mrow&gt;&lt;mi&gt;e&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;m&lt;/mi&gt;&lt;msup&gt;&lt;mi&gt;c&lt;/mi&gt; &lt;mn&gt;2&lt;/mn&gt; &lt;/msup&gt;
&lt;/mrow&gt;&lt;/math&gt;&lt;/formula&gt;
&lt;/p&gt;
</pre>
<p>There are two tables that control these conversions: the lc-table and the
uc-table. If the lc value of a character is non-zero, it´s the lowercase
equivalent of the character; otherwise, the character is left unchanged by
<samp>\lowercase</samp>. The same is true for the uc-table. You can use <samp>\lccode</samp>
and <samp>\uccode</samp> for changing these tables. They are initialized like this:
for all integers <span class="math"><i>x</i></span> with value between `a´ and `z´, and between `à´ and `ÿ´,
the uc value is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>-</mo><mn>32</mn></mrow></math></span>, the lc value is <span class="math"><i>x</i></span>, the same holds for <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>-</mo><mn>32</mn></mrow></math></span>. There
are four exceptions: the pair 215, 247, this is multiplication and division
sign, and the pair 223, 255 this is ß and ÿ. On the other hand, we used
the pair 255, 376 (for ÿ and &#376;).</p>
<p>You can use the two commands <samp>\MakeUppercase</samp><a id="uid1964"></a>
and <samp>\MakeLowercase</samp><a id="uid1965"></a>. These commands have a regular
syntax (in the example that follows, the <samp>\expandafter</samp> would be useless
for <samp>\lowercase</samp>). They convert letters, as for <samp>\uppercase</samp> and
<samp>\lowercase</samp>, plus some commands that define some characters. This example
shows the list of all the recognised commands.
<a id="uid1966"></a></p>
<pre class="latex-code">\def\foo{foo}
\def\List{{abcABCéÉ\foo
     \oe\OE\o\O\ae\AE\dh\DH\dj\DJ\l\L\ng\NG\ss\SS\th\TH}}
\expandafter\MakeUppercase\List
\expandafter\MakeLowercase\List
</pre>
<p class="nofirst noindent">The translation is</p>
<pre class="xml-code">ABCABCÉÉfoo&amp;#x152;&amp;#x152;ØØÆÆÐÐ&amp;#x110;&amp;#x110;&amp;#x141;&amp;#x141;&amp;#x14A;&amp;#x14A;SSSSÞÞ
abcabcééfoo&amp;#x153;&amp;#x153;øøææðð&amp;#x111;&amp;#x111;&amp;#x142;&amp;#x142;&amp;#x14B;&amp;#x14B;ßßþþ
</pre>
<p class="nofirst noindent">This gives


ABCABCÉÉFOO&#338;&#338;ØØÆÆÐÐ&#272;&#272;&#321;&#321;&#330;&#330;SSSSÞÞ and
abcabcééfoo&#339;&#339;øøææðð&#273;&#273;&#322;&#322;&#331;&#331;ßßþþ.</p>
<p>Since <i>Tralics</i> version 2.9, all commands listed above expand to characters,
that have a non-trivial uc/lc pair. Hence, you can say:<a id="uid1967"></a></p>
<pre class="latex-code">\def\foo{foo}
\edef\List{{abcABCéÉ\"y\"Y\foo
     \ij\IJ\oe\OE\o\O\ae\AE\dh\DH\dj\DJ\l\L\ng\NG\ss\SS\th\TH}}
\expandafter\uppercase\List
\expandafter\lowercase\List
</pre>
<p class="nofirst noindent">This gives


ABCABCÉÉ&#376;&#376;FOO&#306;&#306;&#338;&#338;ØØÆÆÐÐ&#272;&#272;&#321;&#321;&#330;&#330;ßSSÞÞ, and
abcabcééÿÿfoo&#307;&#307;&#339;&#339;øøææðð&#273;&#273;&#322;&#322;&#331;&#331;ßSSþþ.</p>

<h2 id="uid1968">5.7. Simple commands</h2>
<p>We consider here some commands that take no arguments. Unless told otherwise,
they are not allowed in math mode.
A new paragraph is started (via <samp>\leavevmode</samp>) in vertical mode.</p>
<ul>
<li id="uid1969"><p class="nofirst noindent"><samp>\#</samp><a id="uid1970"></a> translates to #, character U+23, ok in math mode.</p>
</li>
<li id="uid1971"><p class="nofirst noindent"><samp>\-</samp><a id="uid1972"></a> is <samp>\discretionary</samp><samp>{-}</samp><samp>{}</samp><samp>{}</samp> in LaTeX, empty in <i>Tralics</i>.</p>
</li>
<li id="uid1973"><p class="nofirst noindent"><samp>\AA</samp><a id="uid1974"></a> and <samp>\aa</samp><a id="uid1975"></a> translate to Å and å,
characters U+C5 and U+E5, ok in math mode, accepts some accents on it.</p>
</li>
<li id="uid1976"><p class="nofirst noindent"><samp>\AE</samp><a id="uid1977"></a> and <samp>\ae</samp><a id="uid1978"></a> translate to Æ and æ,
characters U+C6 and U+E6, ok in math mode, accepts some accents on it.</p>
</li>
<li id="uid1979"><p class="nofirst noindent"><samp>\dag</samp><a id="uid1980"></a> translates to &#8224;, character U+2020.
This is the same character as produced by the math only command <samp>\dagger</samp>,
or the alternate name <samp>\textdagger</samp>.</p>
</li>
<li id="uid1981"><p class="nofirst noindent"><samp>\ddag</samp><a id="uid1982"></a> translates to &#8225;, character U+2021.
This is the same character as produced by the math only command <samp>\ddagger</samp>.</p>
</li>
<li id="uid1983"><p class="nofirst noindent"><samp>\DH</samp><a id="uid1984"></a> and <samp>\dh</samp><a id="uid1985"></a> translate to Ð and ð,
characters U+D0 and U+F0, ok in math mode.</p>
</li>
<li id="uid1986"><p class="nofirst noindent"><samp>\DJ</samp><a id="uid1987"></a> and <samp>\dj</samp><a id="uid1988"></a> translates to &#272; and &#273;,
characters U+110 and U+111.</p>
</li>
<li id="uid1989"><p class="nofirst noindent"><samp>\endguillemets</samp><a id="uid1990"></a> expands to »,
character U+BB. Is the same as <samp>\guillemotright</samp>. You should use this as
the environment <samp>guillemets</samp>.</p>
</li>
<li id="uid1991"><p class="nofirst noindent"><samp>\fg</samp><a id="uid1992"></a> translates to »; this is U+A0 (no-break space) followed by U+BB.</p>
</li>
<li id="uid1993"><p class="nofirst noindent"><samp>\guillemets</samp><a id="uid1994"></a> expands to «.
Is the same as <samp>\guillemotleft</samp>. You should use this as
the environment <samp>guillemets</samp>.</p>
</li>
<li id="uid1995"><p class="nofirst noindent"><samp>\ieme</samp><a id="uid1996"></a> is the same as
<samp>\textsuperscript{e}\xspace</samp>.
Something like <samp>3\ieme</samp> should typeset as 3<sup>e</sup>.<a id="uid1997" href="#note66" title="In a previous version the translation was an entity, named &amp;ieme, defined by the Raweb. Same remark ..."><small>(note: </small>&#10163;<small>)</small></a></p>
</li>
<li id="uid1998"><p class="nofirst noindent"><samp>\iemes</samp><a id="uid1999"></a> is the same as
<samp>\textsuperscript{es}\xspace</samp>.
Something like <samp>3\iemes</samp> should typeset as 3<sup>es</sup>.</p>
</li>
<li id="uid2000"><p class="nofirst noindent"><samp>\ier</samp><a id="uid2001"></a> is the same as
<samp>\textsuperscript{er}\xspace</samp>.
Something like <samp>1\ier</samp> should typeset as 1<sup>er</sup>.</p>
</li>
<li id="uid2002"><p class="nofirst noindent"><samp>\iers</samp><a id="uid2003"></a> is the same as
<samp>\textsuperscript{ers}\xspace</samp>.
Something like <samp>1\iers</samp> should typeset as 1<sup>ers</sup>.</p>
</li>
<li id="uid2004"><p class="nofirst noindent"><samp>\iere</samp><a id="uid2005"></a> is the same as
<samp>\textsuperscript{re}\xspace</samp>.
Something like <samp>1\iere</samp> should typeset as 1<sup>re</sup>.</p>
</li>
<li id="uid2006"><p class="nofirst noindent"><samp>\ieres</samp><a id="uid2007"></a> is the same as
<samp>\textsuperscript{res}\xspace</samp>.
Something like <samp>1\ieres</samp> should typeset as 1<sup>res</sup>.</p>
</li>
<li id="uid2008"><p class="nofirst noindent"><samp>\LaTeX</samp><a id="uid2009"></a> translates to <tt class="txt">&lt;LaTeX/&gt;</tt>.</p>
</li>
<li id="uid2010"><p class="nofirst noindent"><samp>\No</samp><a id="uid2011"></a> and <samp>\Numero</samp><a id="uid2012"></a>
is the same as
<samp>N\textsuperscript{o}\xspace</samp>.
This should render as N<sup>o</sup>.</p>
</li>
<li id="uid2013"><p class="nofirst noindent"><samp>\no</samp><a id="uid2014"></a> and <samp>\numero</samp><a id="uid2015"></a>
is the same as <samp>n\textsuperscript{o}\xspace</samp>.
This should render as n<sup>o</sup>.</p>
</li>
<li id="uid2016"><p class="nofirst noindent"><samp>\O</samp><a id="uid2017"></a> and <samp>\o</samp><a id="uid2018"></a> translates to Ø and ø,
characters U+D8 and U+F8, ok in math mode, accepts some accents.</p>
</li>
<li id="uid2019"><p class="nofirst noindent"><samp>\og</samp><a id="uid2020"></a> translates to «;
this is U+AB followed by U+A0 (no-break space).</p>
</li>
<li id="uid2021"><p class="nofirst noindent"><samp>\P</samp><a id="uid2022"></a> translates to ¶, this is character U+B6.
This is like <samp>\textparagraph</samp>, but allowed in math mode.</p>
</li>
<li id="uid2023"><p class="nofirst noindent"><samp>\S</samp><a id="uid2024"></a> translates to §, this is character U+A7.
This is like <samp>\textsection</samp>, but allowed in math mode.</p>
</li>
<li id="uid2025"><p class="nofirst noindent"><samp>\slash</samp><a id="uid2026"></a> translates to /. No penalty is added.</p>
</li>
<li id="uid2027"><p class="nofirst noindent"><samp>\SS</samp><a id="uid2028"></a> and <samp>\ss</samp><a id="uid2029"></a> translate to SS and ß.</p>
</li>
<li id="uid2030"><p class="nofirst noindent"><samp>\TeX</samp><a id="uid2031"></a> translates to <tt class="txt">&lt;TeX/&gt;</tt>.</p>
</li>
<li id="uid2032"><p class="nofirst noindent"><samp>\TH</samp><a id="uid2033"></a> and <samp>\th</samp><a id="uid2034"></a> translate to Þ and þ,
characters U+DE and U+FE, ok in math mode.</p>
</li></ul>
<p>The following commands all start with `text´. They are forbidden in math mode.</p>
<ul>
<li id="uid2035"><p class="nofirst noindent"><samp>\textasciiacutex</samp><a id="uid2036"></a> translates as the Unicode
character U+2032; this is known as `prime´. It is not the same as
U+27, apostrophe, or U+B4 acute accent, or U+2B9, modifier letter prime.</p>
</li>
<li id="uid2037"><p class="nofirst noindent"><samp>\textasciicircum</samp><a id="uid2038"></a> translates to
&#8963;, character U+2303 .</p>
</li>
<li id="uid2039"><p class="nofirst noindent"><samp>\textasciigrave</samp><a id="uid2040"></a> translates to
&#8245;, character U+2035.</p>
</li>
<li id="uid2041"><p class="nofirst noindent"><samp>\textbackslash</samp><a id="uid2042"></a> translates to \,
character U+5C.</p>
</li>
<li id="uid2043"><p class="nofirst noindent"><samp>\textdollar</samp><a id="uid2044"></a> translates to $,
character U+24.</p>
</li>
<li id="uid2045"><p class="nofirst noindent"><samp>\textnospace</samp><a id="uid2046"></a> translates to U+200B (zero width
space). We use this as a mark to inhibit ligatures in verbatim mode.</p>
</li>
<li id="uid2047"><p class="nofirst noindent"><samp>\textvisiblespace</samp><a id="uid2048"></a> translates as
&#9251;, character U+2423.</p>
</li></ul>
<p>The following commands are accepted in text and math mode.</p>
<ul>
<li id="uid2049"><p class="nofirst noindent"><samp>\&#9251;</samp> (backslash followed by space, carriage return,
newline, tabulation) translates as a space (a <tt class="txt">&lt;mspace&gt;</tt> of width 6pt in
math mode).</p>
</li>
<li id="uid2050"><p class="nofirst noindent"><samp>\!</samp><a id="uid2051"></a> has empty translation in text.
This is defined by LaTeX as minus <samp>\thinmuskip</samp>, math only. Produces
a <tt class="txt">&lt;mspace&gt;</tt> of width -1/6em in math mode.</p>
</li>
<li id="uid2052"><p class="nofirst noindent"><samp>\,</samp><a id="uid2053"></a> translates as <tt class="txt">&amp;nbsp;</tt>, same as a tilde in text,
a <tt class="txt">&lt;mspace&gt;</tt> of width 1/6em in math mode.
This is defined in LaTeX as a mskip of width <samp>\thinmuskip</samp> in math mode,
and <samp>\thinspace</samp> otherwise.</p>
</li>
<li id="uid2054"><p class="nofirst noindent"><samp>\$</samp><a id="uid2055"></a> translates as $.</p>
</li>
<li id="uid2056"><p class="nofirst noindent"><samp>\%</samp><a id="uid2057"></a> translates as %.</p>
</li>
<li id="uid2058"><p class="nofirst noindent"><samp>\&amp;</samp><a id="uid2059"></a> translates as &amp;, in fact as <tt class="txt">&amp;amp;</tt>;</p>
</li>
<li id="uid2060"><p class="nofirst noindent"><samp>\_</samp><a id="uid2061"></a> translates as _.</p>
</li>
<li id="uid2062"><p class="nofirst noindent"><samp>\dots</samp><a id="uid2063"></a> translates as `...´.</p>
</li>
<li id="uid2064"><p class="nofirst noindent"><samp>\flat</samp><a id="uid2065"></a> translates as <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mo xmlns:xlink="http://www.w3.org/1999/xlink">&#9837;</mo></math></span>.</p>
</li>
<li id="uid2066"><p class="nofirst noindent"><samp>\i</samp><a id="uid2067"></a> translates as &#305;, character U+111.</p>
</li>
<li id="uid2068"><p class="nofirst noindent"><samp>\j</samp><a id="uid2069"></a> translates as j, this is a normal j.</p>
</li>
<li id="uid2070"><p class="nofirst noindent"><samp>\ldots</samp><a id="uid2071"></a> translates as `...´.</p>
</li>
<li id="uid2072"><p class="nofirst noindent"><samp>\natural</samp><a id="uid2073"></a> translates as <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mo xmlns:xlink="http://www.w3.org/1999/xlink">&#9838;</mo></math></span>.</p>
</li>
<li id="uid2074"><p class="nofirst noindent"><samp>\quad</samp><a id="uid2075"></a> translates as <tt class="txt">&amp;nbsp;</tt><tt class="txt">&amp;nbsp;</tt><tt class="txt">&amp;nbsp;</tt> (a <tt class="txt">&lt;mspace&gt;</tt> of width 1em in math mode).</p>
</li>
<li id="uid2076"><p class="nofirst noindent"><samp>\qquad</samp><a id="uid2077"></a> is the same as <samp>\quad</samp><samp>\quad</samp>
(a <tt class="txt">&lt;mspace&gt;</tt> of width 2em in math mode).</p>
</li>
<li id="uid2078"><p class="nofirst noindent"><samp>\sharp</samp><a id="uid2079"></a> translates as <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mo xmlns:xlink="http://www.w3.org/1999/xlink">&#9839;</mo></math></span>.</p>
</li>
<li id="uid2080"><p class="nofirst noindent"><samp>\}</samp><a id="uid2081"></a> translates as }.</p>
</li>
<li id="uid2082"><p class="nofirst noindent"><samp>\{</samp><a id="uid2083"></a> translates as {.</p>
</li>
<li id="uid2084"><p class="nofirst noindent"><samp>\nobreakspace</samp><a id="uid2085"></a> translates as <tt class="txt">&amp;#xA0;</tt>
(a <tt class="txt">&lt;mspace&gt;</tt> of width 10/3pt in math mode).</p>
</li></ul>
<p>Following commands expand to a Unicode Character.</p>
<ul>
<li id="uid2086"><p class="nofirst noindent"><samp>\textless</samp><a id="uid2087"></a> translates as &lt;, character U+3C.</p>
</li>
<li id="uid2088"><p class="nofirst noindent"><samp>\textgreater</samp><a id="uid2089"></a> translates as &gt;, chracter U+3E.</p>
</li>
<li id="uid2090"><p class="nofirst noindent"><samp>\textunderscore</samp><a id="uid2091"></a> translates as _, character U+5F.</p>
</li>
<li id="uid2092"><p class="nofirst noindent"><samp>\textbraceleft</samp><a id="uid2093"></a> translates as {, character U+7B.</p>
</li>
<li id="uid2094"><p class="nofirst noindent"><samp>\textbraceright</samp><a id="uid2095"></a> translates as }, character U+7D.</p>
</li>
<li id="uid2096"><p class="nofirst noindent"><samp>\textasciitilde</samp><a id="uid2097"></a> translates as ~, character U+7E.</p>
</li>
<li id="uid2098"><p class="nofirst noindent"><samp>\textdiv</samp><a id="uid2099"></a> translates as ÷, character U+F7.</p>
</li>
<li id="uid2100"><p class="nofirst noindent"><samp>\texttimes</samp><a id="uid2101"></a> translates as ×, character U+D7.</p>
</li>
<li id="uid2102"><p class="nofirst noindent"><samp>\textexclamdown</samp><a id="uid2103"></a> translates as ¡, character U+A1.</p>
</li>
<li id="uid2104"><p class="nofirst noindent"><samp>\textcent</samp><a id="uid2105"></a> translates as ¢, character U+A2.</p>
</li>
<li id="uid2106"><p class="nofirst noindent"><samp>\textsterling</samp><a id="uid2107"></a> translates as £, character U+A3.</p>
</li>
<li id="uid2108"><p class="nofirst noindent"><samp>\pounds</samp><a id="uid2109"></a> translates also as £, character U+A3.</p>
</li>
<li id="uid2110"><p class="nofirst noindent"><samp>\textcurrency</samp><a id="uid2111"></a> translates as ¤, character U+A4.</p>
</li>
<li id="uid2112"><p class="nofirst noindent"><samp>\textyen</samp><a id="uid2113"></a> translates as ¥, character U+A5.</p>
</li>
<li id="uid2114"><p class="nofirst noindent"><samp>\textbrokenbar</samp><a id="uid2115"></a> translates as ¦, character U+A6.</p>
</li>
<li id="uid2116"><p class="nofirst noindent"><samp>\textasciidieresis</samp><a id="uid2117"></a> translates to
¨, character U+A8.</p>
</li>
<li id="uid2118"><p class="nofirst noindent"><samp>\textsection</samp><a id="uid2119"></a> translates as §, character U+A7.</p>
</li>
<li id="uid2120"><p class="nofirst noindent"><samp>\copyright</samp><a id="uid2121"></a> translates to ©, character U+A9.</p>
</li>
<li id="uid2122"><p class="nofirst noindent"><samp>\textcopyright</samp><a id="uid2123"></a> translates also as ©.</p>
</li>
<li id="uid2124"><p class="nofirst noindent"><samp>\textordfeminine</samp><a id="uid2125"></a> translates as ª, character U+AA.</p>
</li>
<li id="uid2126"><p class="nofirst noindent"><samp>\guillemotleft</samp><a id="uid2127"></a> translates to «,
character U+AB.</p>
</li>
<li id="uid2128"><p class="nofirst noindent"><samp>\textlnot</samp><a id="uid2129"></a> translates to ¬, character U+AC.</p>
</li>
<li id="uid2130"><p class="nofirst noindent"><samp>\textsofthyphen</samp><a id="uid2131"></a>, translates as soft-hyphen,
Unicode character U+AD, (discretionary hyphen).</p>
</li>
<li id="uid2132"><p class="nofirst noindent"><samp>\textregistered</samp><a id="uid2133"></a> translates as ®, character U+AE.</p>
</li>
<li id="uid2134"><p class="nofirst noindent"><samp>\textasciimacron</samp><a id="uid2135"></a> translates as ¯, character U+AF.</p>
</li>
<li id="uid2136"><p class="nofirst noindent"><samp>\textdegree</samp><a id="uid2137"></a> translates as °, character U+B0.</p>
</li>
<li id="uid2138"><p class="nofirst noindent"><samp>\textpm</samp><a id="uid2139"></a> translates as ±, character U+B1.</p>
</li>
<li id="uid2140"><p class="nofirst noindent"><samp>\texttwosuperior</samp><a id="uid2141"></a> translates as
², character U+B2.</p>
</li>
<li id="uid2142"><p class="nofirst noindent"><samp>\textthreesuperior</samp><a id="uid2143"></a> translates as
³, character U+B3.</p>
</li>
<li id="uid2144"><p class="nofirst noindent"><samp>\textasciiacute</samp><a id="uid2145"></a> translates as
´, character U+B4.</p>
</li>
<li id="uid2146"><p class="nofirst noindent"><samp>\textmu</samp><a id="uid2147"></a> translates to µ, character U+B5.</p>
</li>
<li id="uid2148"><p class="nofirst noindent"><samp>\textparagraph</samp><a id="uid2149"></a> translates to ¶, character U+B6.</p>
</li>
<li id="uid2150"><p class="nofirst noindent"><samp>\textpilcrow</samp><a id="uid2151"></a> translates to ¶, character U+B6.
In LaTeX, the translation is not the same as <samp>\P</samp>;</p>
</li>
<li id="uid2152"><p class="nofirst noindent"><samp>\textperiodcentered</samp><a id="uid2153"></a> translates to ·,
character U+B7.</p>
</li>
<li id="uid2154"><p class="nofirst noindent"><samp>\textasciicedilla</samp><a id="uid2155"></a> translates to
a cedilla, ¸, character U+B8.</p>
</li>
<li id="uid2156"><p class="nofirst noindent"><samp>\textonesuperior</samp><a id="uid2157"></a> translates to
¹, character U+B9.</p>
</li>
<li id="uid2158"><p class="nofirst noindent"><samp>\textordmasculine</samp><a id="uid2159"></a> translates to º,
character U+BA.</p>
</li>
<li id="uid2160"><p class="nofirst noindent"><samp>\guillemotright</samp><a id="uid2161"></a> translates to »,
this is character U+BB.</p>
</li>
<li id="uid2162"><p class="nofirst noindent"><samp>\textonequarter</samp><a id="uid2163"></a> translates to ¼, character U+BC.</p>
</li>
<li id="uid2164"><p class="nofirst noindent"><samp>\textonehalf</samp><a id="uid2165"></a> translates to ½, character U+BD.</p>
</li>
<li id="uid2166"><p class="nofirst noindent"><samp>\textthreequarters</samp><a id="uid2167"></a> translates to ¾,
character U+BE.</p>
</li>
<li id="uid2168"><p class="nofirst noindent"><samp>\textquestiondown</samp><a id="uid2169"></a> translates to ¿,
character U+BF.</p>
</li>
<li id="uid2170"><p class="nofirst noindent"><samp>\textflorin</samp><a id="uid2171"></a> translates to &#402;, character U+192.</p>
</li>
<li id="uid2172"><p class="nofirst noindent"><samp>\textasciibreve</samp><a id="uid2173"></a> translates as &#774;, Unicode U+306.</p>
</li>
<li id="uid2174"><p class="nofirst noindent"><samp>\textasciicaron</samp><a id="uid2175"></a> translates as &#780;, Unicode U+30C.</p>
</li>
<li id="uid2176"><p class="nofirst noindent"><samp>\textbaht</samp><a id="uid2177"></a> translates to &#3647;, character U+E3F.</p>
</li>
<li id="uid2178"><p class="nofirst noindent"><samp>\textendash</samp><a id="uid2179"></a> translates as &#8211;, Unicode U+2013.</p>
</li>
<li id="uid2180"><p class="nofirst noindent"><samp>\textemdash</samp><a id="uid2181"></a> translates as &#8212;, Unicode U+2014.</p>
</li>
<li id="uid2182"><p class="nofirst noindent"><samp>\textbardbl</samp><a id="uid2183"></a> translates as &#8214;, Unicode U+2016.</p>
</li>
<li id="uid2184"><p class="nofirst noindent"><samp>\textquoteleft</samp><a id="uid2185"></a> translates as &#8216;, Unicode U+2018.</p>
</li>
<li id="uid2186"><p class="nofirst noindent"><samp>\textquoteright</samp><a id="uid2187"></a> translates as &#8217;, Unicode U+2019.</p>
</li>
<li id="uid2188"><p class="nofirst noindent"><samp>\textdagger</samp><a id="uid2189"></a> translates to &#8224;, character U+2020.</p>
</li>
<li id="uid2190"><p class="nofirst noindent"><samp>\textdaggerdbl</samp><a id="uid2191"></a> translates to &#8225;, character U+2021.</p>
</li>
<li id="uid2192"><p class="nofirst noindent"><samp>\textbullet</samp><a id="uid2193"></a> translates to &#8226;, character U+2022.</p>
</li>
<li id="uid2194"><p class="nofirst noindent"><samp>\textellipsis</samp><a id="uid2195"></a> translates as &#8230;, Unicode U+2026.</p>
</li>
<li id="uid2196"><p class="nofirst noindent"><samp>\textquotedblleft</samp><a id="uid2197"></a> translates as &#8220;,
Unicode U+201C.</p>
</li>
<li id="uid2198"><p class="nofirst noindent"><samp>\textquotedblright</samp><a id="uid2199"></a> translates as &#8221;,
Unicode U+201D.</p>
</li>
<li id="uid2200"><p class="nofirst noindent"><samp>\textperthousand</samp><a id="uid2201"></a> translates to &#8240;,
character U+2030.</p>
</li>
<li id="uid2202"><p class="nofirst noindent"><samp>\textpertenthousand</samp><a id="uid2203"></a> translates to
&#8241;, character U+2031.</p>
</li>
<li id="uid2204"><p class="nofirst noindent"><samp>\textacutedbl</samp><a id="uid2205"></a> translates as &#8243;, character U+2033.</p>
</li>
<li id="uid2206"><p class="nofirst noindent"><samp>\textgravedbl</samp><a id="uid2207"></a> translates to &#8246;, character U+2036.</p>
</li>
<li id="uid2208"><p class="nofirst noindent"><samp>\textreferencemark</samp><a id="uid2209"></a> translates to
&#8251;, character U+203B.</p>
</li>
<li id="uid2210"><p class="nofirst noindent"><samp>\textinterrobang</samp><a id="uid2211"></a> translates to &#8253;,
character U+203D.</p>
</li>
<li id="uid2212"><p class="nofirst noindent"><samp>\textfractionsolidus</samp><a id="uid2213"></a> translates as &#8260;,
Unicode U+2044.</p>
</li>
<li id="uid2214"><p class="nofirst noindent"><samp>\textlquill</samp><a id="uid2215"></a> translates to &#8261;, character U+2045.</p>
</li>
<li id="uid2216"><p class="nofirst noindent"><samp>\textrquill</samp><a id="uid2217"></a> translates to &#8262;, character U+2046.</p>
</li>
<li id="uid2218"><p class="nofirst noindent"><samp>\textcolonmonetary</samp><a id="uid2219"></a> translates to &#8353;, character U+20A1.</p>
</li>
<li id="uid2220"><p class="nofirst noindent"><samp>\textfrenchfranc</samp><a id="uid2221"></a> translates to the symbol of
the French Franc (not used any more), character
U+20A3, &#8355;.</p>
</li>
<li id="uid2222"><p class="nofirst noindent"><samp>\textlira</samp><a id="uid2223"></a> translates to &#8356;, character U+20A4.</p>
</li>
<li id="uid2224"><p class="nofirst noindent"><samp>\textnaira</samp><a id="uid2225"></a> translates to &#8358;, character U+20A6.</p>
</li>
<li id="uid2226"><p class="nofirst noindent"><samp>\textwon</samp><a id="uid2227"></a> translates as &#8361;, character U+20A9.</p>
</li>
<li id="uid2228"><p class="nofirst noindent"><samp>\textdong</samp><a id="uid2229"></a> translates to &#8363;, character U+20AB.</p>
</li>
<li id="uid2230"><p class="nofirst noindent"><samp>\texteuro</samp><a id="uid2231"></a> translates to &#8364;, character U+20AC.</p>
</li>
<li id="uid2232"><p class="nofirst noindent"><samp>\textpeso</samp><a id="uid2233"></a> translates to &#8369;, character U+20B1.</p>
</li>
<li id="uid2234"><p class="nofirst noindent"><samp>\textcelsius</samp><a id="uid2235"></a> translates to &#8451;, character U+2103.</p>
</li>
<li id="uid2236"><p class="nofirst noindent"><samp>\textnumero</samp><a id="uid2237"></a> translates to &#8470;, character U+2116.</p>
</li>
<li id="uid2238"><p class="nofirst noindent"><samp>\textcircledP</samp><a id="uid2239"></a> translates to &#8471;, character U+2117.</p>
</li>
<li id="uid2240"><p class="nofirst noindent"><samp>\textrecipe</samp><a id="uid2241"></a> translates to &#8478;, character U+211E.</p>
</li>
<li id="uid2242"><p class="nofirst noindent"><samp>\textservicemark</samp><a id="uid2243"></a> translates to &#8480;,
character U+2120.</p>
</li>
<li id="uid2244"><p class="nofirst noindent"><samp>\texttrademark</samp><a id="uid2245"></a> translates as &#8482;, character U+2122.</p>
</li>
<li id="uid2246"><p class="nofirst noindent"><samp>\textohm</samp><a id="uid2247"></a> translates to &#8486;, character U+2126.</p>
</li>
<li id="uid2248"><p class="nofirst noindent"><samp>\textmho</samp><a id="uid2249"></a> translates to &#8487;, character U+2127.</p>
</li>
<li id="uid2250"><p class="nofirst noindent"><samp>\textestimated</samp><a id="uid2251"></a> translates to &#8494;,
character U+212E.</p>
</li>
<li id="uid2252"><p class="nofirst noindent"><samp>\textleftarrow</samp><a id="uid2253"></a> translates to &#8592;, character U+2190.</p>
</li>
<li id="uid2254"><p class="nofirst noindent"><samp>\textuparrow</samp><a id="uid2255"></a> translates to &#8593;, character U+2191.</p>
</li>
<li id="uid2256"><p class="nofirst noindent"><samp>\textrightarrow</samp><a id="uid2257"></a> translates to &#8594;, character U+2192.</p>
</li>
<li id="uid2258"><p class="nofirst noindent"><samp>\textdownarrow</samp><a id="uid2259"></a> translates to &#8595;, character U+2193.</p>
</li>
<li id="uid2260"><p class="nofirst noindent"><samp>\textsurd</samp><a id="uid2261"></a> translates to &#8730;, Unicode U+221A.</p>
</li>
<li id="uid2262"><p class="nofirst noindent"><samp>\textopenbullet</samp><a id="uid2263"></a> translates to &#9702;, Unicode U+25E6.</p>
</li>
<li id="uid2264"><p class="nofirst noindent"><samp>\textbigcircle</samp><a id="uid2265"></a> translates to &#9711;, Unicode U+25EF.</p>
</li>
<li id="uid2266"><p class="nofirst noindent"><samp>\textmusicalnote</samp><a id="uid2267"></a> translates to &#9834;, Unicode U+266A.</p>
</li>
<li id="uid2268"><p class="nofirst noindent"><samp>\textlangle</samp><a id="uid2269"></a> translates to &#12296;, Unicode U+3008.</p>
</li>
<li id="uid2270"><p class="nofirst noindent"><samp>\textrangle</samp><a id="uid2271"></a> translates to &#12297;, Unicode U+3009.</p>
</li>
<li id="uid2272"><p class="nofirst noindent"><samp>\texttwelveudash</samp><a id="uid2273"></a> translates as &#8212;.</p>
</li>
<li id="uid2274"><p class="nofirst noindent"><samp>\textthreequartersemdash</samp><a id="uid2275"></a> translates as
&#8212;.</p>
</li>
<li id="uid2276"><p class="nofirst noindent"><samp>\textasteriskcentered</samp><a id="uid2277"></a> translates as &#8270;.</p>
</li>
<li id="uid2278"><p class="nofirst noindent"><samp>\textquotesingle</samp><a id="uid2279"></a> translates as '.</p>
</li>
<li id="uid2280"><p class="nofirst noindent"><samp>\textquotestraightbase</samp><a id="uid2281"></a> is not yet implemented.</p>
</li>
<li id="uid2282"><p class="nofirst noindent"><samp>\textquotestraightdblbase</samp><a id="uid2283"></a> is not yet implemented.</p>
</li>
<li id="uid2284"><p class="nofirst noindent"><samp>\textlbrackdbl</samp><a id="uid2285"></a> is not yet implemented.</p>
</li>
<li id="uid2286"><p class="nofirst noindent"><samp>\textrbrackdbl</samp><a id="uid2287"></a> is not yet implemented.</p>
</li>
<li id="uid2288"><p class="nofirst noindent"><samp>\textcompwordmark</samp><a id="uid2289"></a> is not yet implemented.</p>
</li>
<li id="uid2290"><p class="nofirst noindent"><samp>\texttildelow</samp><a id="uid2291"></a> is not yet implemented.</p>
</li>
<li id="uid2292"><p class="nofirst noindent"><samp>\textcentoldstyle</samp><a id="uid2293"></a> is not yet implemented.</p>
</li>
<li id="uid2294"><p class="nofirst noindent"><samp>\textdollardoldstyle</samp><a id="uid2295"></a> is not yet implemented.</p>
</li>
<li id="uid2296"><p class="nofirst noindent"><samp>\textcopyleft</samp><a id="uid2297"></a> is not yet implemented.</p>
</li>
<li id="uid2298"><p class="nofirst noindent"><samp>\textzerooldstyle</samp><a id="uid2299"></a> is not yet implemented.</p>
</li>
<li id="uid2300"><p class="nofirst noindent"><samp>\textoneoldstyle</samp><a id="uid2301"></a> is not yet implemented.</p>
</li>
<li id="uid2302"><p class="nofirst noindent"><samp>\texttwooldstyle</samp><a id="uid2303"></a> is not yet implemented.</p>
</li>
<li id="uid2304"><p class="nofirst noindent"><samp>\textthreeoldstyle</samp><a id="uid2305"></a> is not yet implemented.</p>
</li>
<li id="uid2306"><p class="nofirst noindent"><samp>\textfouroldstyle</samp><a id="uid2307"></a> is not yet implemented.</p>
</li>
<li id="uid2308"><p class="nofirst noindent"><samp>\textfiveoldstyle</samp><a id="uid2309"></a> is not yet implemented.</p>
</li>
<li id="uid2310"><p class="nofirst noindent"><samp>\textsixoldstyle</samp><a id="uid2311"></a> is not yet implemented.</p>
</li>
<li id="uid2312"><p class="nofirst noindent"><samp>\textsevenoldstyle</samp><a id="uid2313"></a> is not yet implemented.</p>
</li>
<li id="uid2314"><p class="nofirst noindent"><samp>\texteightoldstyle</samp><a id="uid2315"></a> is not yet implemented.</p>
</li>
<li id="uid2316"><p class="nofirst noindent"><samp>\textnineoldstyle</samp><a id="uid2317"></a> is not yet implemented.</p>
</li>
<li id="uid2318"><p class="nofirst noindent"><samp>\textcapitalcompwordmark</samp><a id="uid2319"></a> is not yet implemented.</p>
</li>
<li id="uid2320"><p class="nofirst noindent"><samp>\textguarani</samp><a id="uid2321"></a> is not yet implemented.</p>
</li>
<li id="uid2322"><p class="nofirst noindent"><samp>\textinterrobangdown</samp><a id="uid2323"></a> is not yet implemented.</p>
</li>
<li id="uid2324"><p class="nofirst noindent"><samp>\textdiscount</samp><a id="uid2325"></a> is not yet implemented.</p>
</li>
<li id="uid2326"><p class="nofirst noindent"><samp>\textascendercompwordmark</samp><a id="uid2327"></a> is not yet implemented.</p>
</li>
<li id="uid2328"><p class="nofirst noindent"><samp>\textdblhyphen</samp><a id="uid2329"></a> is not yet implemented.</p>
</li>
<li id="uid2330"><p class="nofirst noindent"><samp>\textleaf</samp><a id="uid2331"></a> is not yet implemented.</p>
</li>
<li id="uid2332"><p class="nofirst noindent"><samp>\textdied</samp><a id="uid2333"></a> is not yet implemented.</p>
</li>
<li id="uid2334"><p class="nofirst noindent"><samp>\textdivorced</samp><a id="uid2335"></a> is not yet implemented.</p>
</li>
<li id="uid2336"><p class="nofirst noindent"><samp>\textborn</samp><a id="uid2337"></a> is not yet implemented.</p>
</li>
<li id="uid2338"><p class="nofirst noindent"><samp>\textmarried</samp><a id="uid2339"></a> is not yet implemented.</p>
</li>
<li id="uid2340"><p class="nofirst noindent"><samp>\textblank</samp><a id="uid2341"></a> is not yet implemented.</p>
</li></ul>

<h2 id="uid2342">5.8. The fp package</h2>
<h3 id="uid2343">5.8.1. Introduction</h3>
<p>This is an implementation in C++ of the package by Michael Mehlich. It
implements fixed point arithmetics in TeX. Each number is formed by a sign,
then 18 digits before the point and 18 digits after the point. Since
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mn>10</mn> <mn>9</mn> </msup><mo>&#8804;</mo><msup><mn>2</mn> <mn>30</mn> </msup></mrow></math></span>, four 32bits integers are sufficient. In the code, we shall
sometimes write a number as</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>=</mo><munderover><mo>&#8721;</mo> <mrow><mi>i</mi><mo>=</mo><mo>-</mo><mn>6</mn></mrow> <mn>5</mn> </munderover><msub><mi>b</mi> <mi>i</mi> </msub><msup><mi>B</mi> <mi>i</mi> </msup><mo>=</mo><msup><mn>10</mn> <mrow><mo>-</mo><mn>18</mn></mrow> </msup><mrow><mo>(</mo><munderover><mo>&#8721;</mo> <mrow><mi>i</mi><mo>=</mo><mn>0</mn></mrow> <mn>11</mn> </munderover><msub><mi>c</mi> <mi>i</mi> </msub><msup><mi>B</mi> <mi>i</mi> </msup><mo>)</mo></mrow></mrow></math></div>
<p class="nofirst noindent">where <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>B</mi><mo>=</mo><mn>1000</mn></mrow></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>b</mi> <mi>i</mi> </msub></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>c</mi> <mi>i</mi> </msub></math></span> are integers between 0 and 999. This requires
12 integers, instead of 4, but is useful for internal operations.
You can say</p>
<pre class="latex-code">\FPadd\foo{10}{3.5}
\FPmul\xbar\foo\foo
</pre>
<p class="nofirst noindent">This will put 13.5 in <samp>\foo</samp> and 282.5 in <samp>\xbar</samp>. In verbose mode, you
will see that the transcript file contains lines of the form:</p>
<pre class="log-code">{\FPadd}
{\FP@add}
{FPread for \FP@add=+10.}
{FPread for \FP@add=+3.5}
</pre>
<p class="nofirst noindent">In reality, the first input line is converted into</p>
<pre class="latex-code">\FP@add\foo10..\relax3.5..\relax
</pre>
<p class="nofirst noindent">Most commands follow this scheme. There are some exceptions. You can use
<samp>\FPprint</samp><a id="uid2344"></a>. This takes one argument and prints (typesets)
it. The algorithm is a bit strange: if the argument list is empty, the result
is 0. If the argument is 123, or more generally a list of tokens, where the
first has category code 12 (other), then nothing happens, the arguments is
translated normally. If the argument is `foo´, the result is `13.5´. More
generally, if the first item is a character not of category code 12, the
command behaves like <samp>\csname</samp>. Don´t try constructions like
<samp>\FPprint</samp><samp>{$x^2$}</samp>. You can say
<samp>\FPset</samp><samp>{gee}</samp><samp>{foo}</samp><a id="uid2345"></a>. The second
argument is handled as for <samp>\FPprint</samp>. The first argument should be a command
name, or a sequence of characters that becomes a command name via
<samp>\csname</samp>. The effect of the command is the same as <samp>\def</samp><samp>\gee</samp><samp>{13.5}</samp>.</p>
<p>The general mechanism for a command like <samp>\FPadd</samp> or <samp>\FPsincos</samp> is to
call intermediary commands like <samp>\FP@add</samp> or <samp>\FP@sincos</samp>. These read
some command names (these must be definable, no check is make, as for
<samp>\let</samp>), then parse numerical arguments, compute results and store the
results in the commands. The result is always normalized: trailing zeroes are
removed as well as leading zeroes (but at least one digit is returned before
the point). If the number is negative a sign is added. A special case is when
the result is boolean. In this case the syntax has the form</p>
<pre class="latex-code">\FPiflt{0.21}{0.20} Wrong\else Correct\fi
</pre>
<p class="nofirst noindent">As a side effect, <samp>\ifFPtest</samp><a id="uid2346"></a> is made equivalent to
<samp>\iftrue</samp> or <samp>\iffalse</samp>. The following line is valid in <i>Tralics</i>,
it gives an error in LaTeX.</p>
<pre class="latex-code">\iffalse  \FPiflt{0.21}{0.20} \bad\else \badagain\fi \fi
</pre>
<p>Numbers are read as follows: We assume that <samp>\FP@add</samp> sees a string that
contains two dots and a <samp>\relax</samp>, see above. This means that you lose if
the argument of the user command contains a <samp>\relax</samp>. Otherwise, we have a
list A, a dot, a list B, a dot, a list C, then <samp>\relax</samp>. As you can see
from the <samp>\FPmul</samp><samp>\xbar</samp><samp>\foo</samp><samp>\foo</samp> example, these quantities are obtained by
expanding the argument (here <samp>\foo</samp>) in a <samp>\edef</samp>. For some reason
quantities <samp>\A</samp> and <samp>\B</samp> are expanded again. In a case like</p>
<pre class="latex-code">\FPadd\foo{\noexpand\noexpand\noexpand\V}{12}
</pre>
<p class="nofirst noindent">this gives <samp>\V</samp> after expansion, this is wrong. In a case like</p>
<pre class="latex-code">\def\V{10.2}
\FPadd\foo{\noexpand\V.4}{12}
</pre>
<p class="nofirst noindent">expansion of A is 10.2, this is equally wrong: After expansion, there should
remain only digits in A and B; there can be an optional sign at the start of
A: any combination of + and - characters is OK. Note that C, as well as all
digits after a space in A or B are ignored. Thus, the following two lines
are valid for <i>Tralics</i>, invalid in the TeX case.</p>
<pre class="latex-code">\def\V{10 .2}
\FPadd\foo{\noexpand\V.4}{12}
\FPadd\foo{\V.4}{12}
</pre>

<h3 id="uid2347">5.8.2. The list of all commands</h3>
<p>In the list that follows, <samp>\C</samp>, <samp>\Ca</samp>, <samp>\Cb</samp> are command names,
and <samp>\V</samp>, <samp>\Va</samp>, <samp>\Vb</samp> are values.</p>
<ul>
<li id="uid2348"><p class="nofirst noindent"><samp>\FPident</samp><a id="uid2349"></a><samp>\C</samp><samp>\V</samp>. This is the identity; it
copies <samp>\V</samp> in <samp>\C</samp>.</p>
</li>
<li id="uid2350"><p class="nofirst noindent"><samp>\FPclip</samp><a id="uid2351"></a><samp>\C</samp><samp>\V</samp>. This puts in <samp>\C</samp> the
number <samp>\V</samp>. In the TeX version, trailing zeroes are not removed by
default. The
<samp>\FPclip</samp> command has as function to removed them. In <i>Tralics</i> this is a
no-op.</p>
</li>
<li id="uid2352"><p class="nofirst noindent"><samp>\FPprint</samp><a id="uid2353"></a><samp>\V</samp>. See description above. This
typesets <samp>\V</samp>.</p>
</li>
<li id="uid2354"><p class="nofirst noindent"><samp>\FPset</samp><a id="uid2355"></a><samp>\C</samp><samp>\V</samp>. See description above. This
copies <samp>\V</samp> in <samp>\C</samp>.</p>
</li>
<li id="uid2356"><p class="nofirst noindent"><samp>\FPneg</samp><a id="uid2357"></a><samp>\C</samp><samp>\V</samp>. This
copies the opposite of <samp>\V</samp> in <samp>\C</samp>.</p>
</li>
<li id="uid2358"><p class="nofirst noindent"><samp>\FPsgn</samp><a id="uid2359"></a><samp>\C</samp><samp>\V</samp>. This
copies the sign of <samp>\V</samp>, that can be <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>+</mo><mn>1</mn></mrow></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>-</mo><mn>1</mn></mrow></math></span> or 0, in <samp>\C</samp>.</p>
</li>
<li id="uid2360"><p class="nofirst noindent"><samp>\FPabs</samp><a id="uid2361"></a><samp>\C</samp><samp>\V</samp>. This puts in <samp>\C</samp> the absolute
value of the number <samp>\V</samp>.</p>
</li>
<li id="uid2362"><p class="nofirst noindent"><samp>\FPadd</samp><a id="uid2363"></a><samp>\C</samp><samp>\Va</samp><samp>\Vb</samp>. This computes the sum
of <samp>\Va</samp> and <samp>\Vb</samp> and stores the result in <samp>\C</samp>.</p>
</li>
<li id="uid2364"><p class="nofirst noindent"><samp>\FPsub</samp><a id="uid2365"></a><samp>\C</samp><samp>\Va</samp><samp>\Vb</samp>. This computes the
difference of <samp>\Va</samp> and <samp>\Vb</samp> and stores the result in <samp>\C</samp>.</p>
</li>
<li id="uid2366"><p class="nofirst noindent"><samp>\FPmul</samp><a id="uid2367"></a><samp>\C</samp><samp>\Va</samp><samp>\Vb</samp>. This computes the
product of <samp>\Va</samp> and <samp>\Vb</samp> and stores the result in <samp>\C</samp>.
The TeX code is beautiful:</p>
<div class="hc">
<pre class="latex-code">   \FP@@mul vv                                  \relax\FP@saveshift%
   \FP@@mul vu uv                               \relax\FP@saveshift%
   \FP@@mul uu vt tv                            \relax\FP@saveshift%
   \FP@@mul ut tu vz zv                         \relax\FP@saveshift%
   \FP@@mul tt zu uz rv vr                      \relax\FP@saveshift%
   \FP@@mul zt tz ur ru vq qv                   \relax\FP@saveshift%
   \FP@@mul zz rt tr uq qu vp pv                \relax\FP@saveshift%
   \FP@@mul zr rz tq qt up pu vo ov             \relax\FP@saveshift%
   \FP@@mul rr qz zq tp pt uo ou vn nv          \relax\FP@saveshift%
   \FP@@mul rq qr zp pz to ot un nu vm mv       \relax\FP@saveshift%
   \FP@@mul qq rp pr zo oz tn nt um mu vl lv    \relax\FP@saveshift%
   \FP@@mul qp pq ro or zn nz tm mt ul lu kv vk \relax\FP@saveshift%
   \FP@@mul pp oq qo rn nr zm mz tl lt ku uk    \relax\FP@saveshift%
   \FP@@mul op po nq qn rm mr zl lz tk kt       \relax\FP@saveshift%
   \FP@@mul oo pn np mq qm rl lr kz zk          \relax\FP@saveshift%
   \FP@@mul no on mp pm lq ql kr rk             \relax\FP@saveshift%
   \FP@@mul nn mo om pl lp qk kq                \relax\FP@saveshift%
   \FP@@mul mn nm lo ok pk kp                   \relax\FP@saveshift%
   \FP@@mul mm ln nl ko ok                      \relax\FP@saveshift%
   \FP@@mul lm ml kn nk                         \relax\FP@saveshift%
   \FP@@mul ll km mk                            \relax\FP@saveshift%
   \FP@@mul kl lk                               \relax\FP@saveshift%
   \FP@@mul kk                                  \relax\FP@saveshift%
</pre>
</div>
<p><i>Tralics</i> uses the same idea: we write each number as <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>&#8721;</mo><msub><mi>b</mi> <mi>i</mi> </msub><msup><mi>B</mi> <mi>i</mi> </msup></mrow></math></span> and
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>&#8721;</mo><msub><mi>c</mi> <mi>i</mi> </msub><msup><mi>B</mi> <mi>i</mi> </msup></mrow></math></span>, then compute the sum of <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msub><mi>b</mi> <mi>i</mi> </msub><msub><mi>c</mi> <mi>j</mi> </msub><msup><mi>B</mi> <mrow><mi>i</mi><mo>+</mo><mi>j</mi></mrow> </msup></mrow></math></span>. 144 additions and
multiplications are required. One can do better, using Karatsuba´s method, but
there is an additional cost for finding the <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>b</mi> <mi>i</mi> </msub></math></span> and merging at the end. This
cost is 22 multiplications and divisions. The result is a number with 72 decimal
digits. An overflow is signaled in case there are more than 18 decimals before
the point. Last digits are silently ignored.</p>
</li>
<li id="uid2369"><p class="nofirst noindent"><samp>\FPdiv</samp><a id="uid2370"></a><samp>\C</samp><samp>\Va</samp><samp>\Vb</samp>. This computes the
quotient of <samp>\Va</samp> and <samp>\Vb</samp> and stores the result in <samp>\C</samp>.
Division is much harder than multiplication. Given <span class="math"><i>x</i></span> and <span class="math"><i>y</i></span>, if</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>X</mi><mo>=</mo><msup><mn>10</mn> <mi>n</mi> </msup><mi>x</mi><mspace width="2.em"></mspace><mi>Y</mi><mo>=</mo><msup><mn>10</mn> <mi>m</mi> </msup><mi>y</mi><mspace width="2.em"></mspace><mi>q</mi><mo>=</mo><mi>Q</mi><msup><mn>10</mn> <mrow><mi>m</mi><mo>-</mo><mi>n</mi></mrow> </msup></mrow></math></div>
<p class="nofirst noindent">then</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>X</mi><mo>=</mo><mi>Q</mi><mi>Y</mi><mo>&#8660;</mo><mi>x</mi><mo>=</mo><mi>q</mi><mi>y</mi></mrow></math></div>
<p>We chose <span class="math"><i>n</i></span> and <span class="math"><i>m</i></span> as large as possible, then compute the quotient <span class="math"><i>Q</i></span> of
<span class="math"><i>X</i></span> and <span class="math"><i>Y</i></span>. The quotient <span class="math"><i>q</i></span> is then obtained by shifting. By construction <span class="math"><i>Q</i></span>
is between 10 and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>1</mn><mo>/</mo><mn>10</mn></mrow></math></span>, shifting may underflow (this gives 0), or
overflow (this is an error). When we compute the quotient of <span class="math"><i>X</i></span> by <span class="math"><i>Y</i></span>, we
can multiply both numbers by <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mn>10</mn> <mn>18</mn> </msup></math></span>, said otherwise, consider them as
integers. Write <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>Q</mi><mo>=</mo><mo>&#8721;</mo><msub><mi>a</mi> <mi>k</mi> </msub><msup><mn>10</mn> <mrow><mo>-</mo><mi>k</mi></mrow> </msup></mrow></math></span>. Only indices <span class="math"><i>k</i></span> with <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>k</mi><mo>&#8805;</mo><mn>0</mn></mrow></math></span> are
needed. In the case <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msub><mi>a</mi> <mn>0</mn> </msub><mo>=</mo><mn>0</mn></mrow></math></span>, we know <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msub><mi>a</mi> <mn>1</mn> </msub><mo>&#8800;</mo><mn>0</mn></mrow></math></span>. Write <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mn>10</mn> <mi>k</mi> </msup><mi>Q</mi><mo>=</mo><msubsup><mi>Q</mi> <mi>k</mi> <mo>'</mo> </msubsup><mo>+</mo><msubsup><mi>Q</mi> <mi>k</mi> <mrow><mo>'</mo><mo>'</mo></mrow> </msubsup></mrow></math></span>,
where <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msubsup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>Q</mi> <mi>k</mi> <mo>'</mo> </msubsup></math></span> is an integer, and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msubsup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>Q</mi> <mi>k</mi> <mrow><mo>'</mo><mo>'</mo></mrow> </msubsup></math></span> is between 0 and 1. Write</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>X</mi><mo>-</mo><msup><mn>10</mn> <mrow><mo>-</mo><mi>k</mi></mrow> </msup><mi>Y</mi><mo>·</mo><msubsup><mi>Q</mi> <mi>k</mi> <mo>'</mo> </msubsup><mo>=</mo><msubsup><mi>Q</mi> <mi>k</mi> <mrow><mo>'</mo><mo>'</mo></mrow> </msubsup><mrow><mo>(</mo><msup><mn>10</mn> <mrow><mo>-</mo><mi>k</mi></mrow> </msup><mi>Y</mi><mo>)</mo></mrow></mrow></math></div>
<p class="nofirst noindent">Let <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msubsup><mi>Y</mi> <mi>k</mi> <mo>'</mo> </msubsup><mo>=</mo><msup><mn>10</mn> <mrow><mo>-</mo><mi>k</mi></mrow> </msup><mi>Y</mi></mrow></math></span>. This quantity appears twice above. Let
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msubsup><mi>X</mi> <mi>k</mi> <mo>'</mo> </msubsup><mo>=</mo><mi>X</mi><mo>-</mo><msubsup><mi>Y</mi> <mi>k</mi> <mo>'</mo> </msubsup><msubsup><mi>Q</mi> <mi>k</mi> <mo>'</mo> </msubsup></mrow></math></span>. We have <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msubsup><mi>X</mi> <mi>k</mi> <mo>'</mo> </msubsup><mo>=</mo><msubsup><mi>Q</mi> <mi>k</mi> <mrow><mo>'</mo><mo>'</mo></mrow> </msubsup><msubsup><mi>Y</mi> <mi>k</mi> <mo>'</mo> </msubsup></mrow></math></span>. The algorithm is then: replace
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msubsup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>X</mi> <mi>k</mi> <mo>'</mo> </msubsup></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msubsup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>Y</mi> <mi>k</mi> <mo>'</mo> </msubsup></math></span> by their integer parts. Multiply <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msubsup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>X</mi> <mi>k</mi> <mo>'</mo> </msubsup></math></span> by 10, find <span class="math"><i>n</i></span>
the largest integer such that <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>n</mi><msubsup><mi>Y</mi> <mi>k</mi> <mo>'</mo> </msubsup><mo>&#8804;</mo><mn>10</mn><msubsup><mi>X</mi> <mi>k</mi> <mo>'</mo> </msubsup></mrow></math></span>. This is the next digit in the
quotient. Replace <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msubsup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>X</mi> <mi>k</mi> <mo>'</mo> </msubsup></math></span> by <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>10</mn><msubsup><mi>X</mi> <mi>k</mi> <mo>'</mo> </msubsup><mo>-</mo><mi>n</mi><msubsup><mi>Y</mi> <mi>k</mi> <mo>'</mo> </msubsup></mrow></math></span>, divide <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msubsup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>Y</mi> <mi>k</mi> <mo>'</mo> </msubsup></math></span> by 10. The procedure
stops when <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msubsup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>Y</mi> <mi>k</mi> <mo>'</mo> </msubsup></math></span> becomes zero. For instance, if we compute the inverse of the
inverse of <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mrow></mrow><mi>&#960;</mi></mrow></math></span>, we find a number whose last digits are 243 instead of
238. On the other hand, if we divide 10 by <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>10</mn><mo>/</mo><mi>&#960;</mi></mrow></math></span>, we get all correct digits
(this is because we lose a digit when we shift).</p>
</li>
<li id="uid2371"><p class="nofirst noindent"><samp>\FPmin</samp><a id="uid2372"></a><samp>\C</samp><samp>\Va</samp><samp>\Vb</samp>. This puts in <samp>\C</samp>
the smallest of the two values <samp>\Va</samp> and <samp>\Vb</samp>.</p>
</li>
<li id="uid2373"><p class="nofirst noindent"><samp>\FPmax</samp><a id="uid2374"></a><samp>\C</samp><samp>\Va</samp><samp>\Vb</samp>. This puts in <samp>\C</samp>
the largest of the two values <samp>\Va</samp> and <samp>\Vb</samp>.</p>
</li>
<li id="uid2375"><p class="nofirst noindent"><samp>\FPtruncate</samp><a id="uid2376"></a><samp>\C</samp><samp>\V</samp><samp>\I</samp>. This
truncates <samp>\V</samp> to <samp>\I</samp> digits and puts the result in <samp>\C</samp>.</p>
</li>
<li id="uid2377"><p class="nofirst noindent"><samp>\FPround</samp><a id="uid2378"></a><samp>\C</samp><samp>\V</samp><samp>\I</samp>. This
rounds <samp>\V</samp> to <samp>\I</samp> digits and puts the result in <samp>\C</samp>. For the two
commands <samp>\FPtruncate</samp> and <samp>\FPround</samp>, the last argument has to be an
integer. It is an error if this is a negative integer. Nothing happens if
the integer is larger than 18. Truncating <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mrow></mrow><mi>&#960;</mi></mrow></math></span> to 4 digits gives <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>3</mn><mo>.</mo><mn>1415</mn></mrow></math></span>,
rounding gives <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>3</mn><mo>.</mo><mn>1416</mn></mrow></math></span>. Rounding 1.25 to 1 digit gives 1.3. Rounding <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>-</mo><mi>X</mi></mrow></math></span>
gives the opposite of rounding <span class="math"><i>X</i></span>. No overflow is signaled: rounding
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mn>10</mn> <mn>18</mn> </msup><mo>-</mo><mi>&#1013;</mi></mrow></math></span> may give <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mn>10</mn> <mn>18</mn> </msup></math></span>.</p>
</li>
<li id="uid2379"><p class="nofirst noindent"><samp>\FPiflt</samp><a id="uid2380"></a><samp>\Va</samp><samp>\Vb</samp>,
<samp>\FPifgt</samp><a id="uid2381"></a><samp>\Va</samp><samp>\Vb</samp>,
<samp>\FPifeq</samp><a id="uid2382"></a><samp>\Va</samp><samp>\Vb</samp>.
These three commands compare two values and set the boolean <samp>\ifFPtest</samp> to
<samp>\iftrue</samp> in the case <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>&lt;</mo><mi>b</mi></mrow></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>&gt;</mo><mi>b</mi></mrow></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>=</mo><mi>b</mi></mrow></math></span> respectively, to
<samp>\iffalse</samp> otherwise. This command is then executed. It is a conditional,
so that a <samp>\fi</samp> is required, and an <samp>\else</samp> is allowed.</p>
</li>
<li id="uid2383"><p class="nofirst noindent"><samp>\FPifneg</samp><a id="uid2384"></a><samp>\V</samp>,
<samp>\FPifpos</samp><a id="uid2385"></a><samp>\V</samp>,
<samp>\FPifzero</samp><a id="uid2386"></a><samp>\V</samp>,
<samp>\FPifint</samp><a id="uid2387"></a><samp>\V</samp>.
Four commands that test if the argument <span class="math"><i>a</i></span> satisfies <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>&lt;</mo><mn>0</mn></mrow></math></span>, or <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>&gt;</mo><mn>0</mn></mrow></math></span> or <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>=</mo><mn>0</mn></mrow></math></span>
or <span class="math"><i>a</i></span> integer. The command <samp>\ifFPtest</samp> is set and executed as above.</p>
</li>
<li id="uid2388"><p class="nofirst noindent"><samp>\FPe</samp><a id="uid2389"></a><samp>\C</samp>. This put the number <span class="math"><i>e</i></span> in <samp>\C</samp>.</p>
</li>
<li id="uid2390"><p class="nofirst noindent"><samp>\FPseed</samp><a id="uid2391"></a><samp>\V</samp>. This is a counter that contains the
seed used by the random number generator.</p>
</li>
<li id="uid2392"><p class="nofirst noindent"><samp>\FPrand</samp><a id="uid2393"></a><samp>\C</samp>. This puts in the command a random
number. The algorithm is that of Lewis, Goodman &amp; Miller (1969). Let
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>q</mi><mo>=</mo><mn>127773</mn></mrow></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>m</mi><mo>=</mo><mn>2147483647</mn></mrow></math></span>. Write <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>m</mi><mo>=</mo><mi>A</mi><mi>q</mi><mo>+</mo><mi>B</mi></mrow></math></span>, with <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>A</mi><mo>=</mo><mn>16807</mn></mrow></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>B</mi><mo>=</mo><mn>2836</mn></mrow></math></span>. If
<span class="math"><i>s</i></span> is the seed, <span class="math"><i>a</i></span> and <span class="math"><i>b</i></span> the quotient and remainder of <span class="math"><i>s</i></span> by <span class="math"><i>q</i></span>,
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>w</mi><mo>=</mo><mi>A</mi><mi>b</mi><mo>-</mo><mi>B</mi><mi>a</mi></mrow></math></span> if this is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>&#8805;</mo><mn>0</mn></mrow></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>w</mi><mo>=</mo><mi>A</mi><mi>b</mi><mo>-</mo><mi>B</mi><mi>a</mi><mo>+</mo><mi>m</mi></mrow></math></span> otherwise. Then <span class="math"><i>w</i></span> is the
remainder of <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>A</mi><mi>s</mi></mrow></math></span> by <span class="math"><i>m</i></span>. This is the new seed. The random number is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>w</mi><mo>/</mo><mi>m</mi></mrow></math></span>.</p>
</li>
<li id="uid2394"><p class="nofirst noindent"><samp>\FPpascal</samp><a id="uid2395"></a><samp>\C</samp><samp>\I</samp>. The last argument must be
an integer, between 1 and 63. The result is one row of the Pascal triangle.
For instance <samp>\FPpascal</samp><samp>\foo</samp><samp>{5}</samp> stores in <samp>\foo</samp> the token list
<samp>[1.,5.,10.,10.,5.,1.]</samp>.</p>
</li>
<li id="uid2396"><p class="nofirst noindent"><samp>\FPexp</samp><a id="uid2397"></a><samp>\C</samp><samp>\V</samp>. This puts in <samp>\C</samp> the
exponential of the number <samp>\V</samp>. The command uses the relation</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo form="prefix">exp</mo><mo>(</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>)</mo><mo>=</mo><mo form="prefix">exp</mo><mo>(</mo><mi>a</mi><mo>)</mo><mo>·</mo><mo form="prefix">exp</mo><mo>(</mo><mi>b</mi><mo>)</mo></mrow></math></div>
<p class="nofirst noindent">The argument <span class="math"><i>x</i></span> is written as <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>=</mo><mi>a</mi><mo>+</mo><mi>b</mi></mrow></math></span>, where <span class="math"><i>a</i></span> is an integer, and <span class="math"><i>b</i></span> is
between 0 and 1 in magnitude (same sign as <span class="math"><i>x</i></span>). The quantity <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo form="prefix">exp</mo><mo>(</mo><mi>a</mi><mo>)</mo></mrow></math></span> is
precomputed (if <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>&#8805;</mo><mn>42</mn></mrow></math></span>, we have an overflow, if <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>&#8804;</mo><mo>-</mo><mn>43</mn></mrow></math></span>, we have an
underflow, and the result is zero). The other factor is computed as</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo form="prefix">exp</mo><mrow><mo>(</mo><mi>b</mi><mo>)</mo></mrow><mo>=</mo><mo>&#8721;</mo><msup><mi>b</mi> <mi>n</mi> </msup><mo>/</mo><mi>n</mi><mo>!</mo><mo>=</mo><mo>&#8721;</mo><msub><mi>X</mi> <mi>k</mi> </msub></mrow></math></div>
<p class="nofirst noindent">Here <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>X</mi> <mrow><mi>k</mi><mo>+</mo><mn>1</mn></mrow> </msub></math></span> is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>X</mi> <mi>k</mi> </msub></math></span> multiplied by <span class="math"><i>b</i></span>, divided by <span class="math"><i>k</i></span>. The division by <span class="math"><i>k</i></span>
uses a special algorithm (if the digits in base 1000 of the numbers are <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>c</mi> <mi>i</mi> </msub></math></span>,
dividing <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>&#8721;</mo><msub><mi>c</mi> <mi>i</mi> </msub><msup><mi>B</mi> <mi>i</mi> </msup></mrow></math></span> by a number <span class="math"><i>k</i></span> is trivial, provided <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>k</mi><mo>&lt;</mo><mn>1000</mn></mrow></math></span>).
We compute terms as long as <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>X</mi> <mi>k</mi> </msub></math></span> is no zero.</p>
</li>
<li id="uid2398"><p class="nofirst noindent"><samp>\FPln</samp><a id="uid2399"></a><samp>\C</samp><samp>\V</samp>. This puts in <samp>\C</samp> the
logarithm of the number <samp>\V</samp>. The command uses the relation</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo form="prefix">log</mo><mo>(</mo><mi>a</mi><mo>·</mo><mi>b</mi><mo>)</mo><mo>=</mo><mo form="prefix">log</mo><mo>(</mo><mi>a</mi><mo>)</mo><mo>+</mo><mo form="prefix">log</mo><mo>(</mo><mi>b</mi><mo>)</mo></mrow></math></div>
<p class="nofirst noindent">Here we use for <span class="math"><i>a</i></span> a power of ten, so that our number is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mi>b</mi></mrow></math></span>, with <span class="math"><i>b</i></span>
between 1 and 10, then a power of two so that it is between 1 and 2. The
logarithms of these quantities are precomputed. Let <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>y</mi><mo>=</mo><mo>(</mo><mi>x</mi><mo>-</mo><mn>1</mn><mo>)</mo><mo>/</mo><mo>(</mo><mi>x</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow></math></span>. If
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>1</mn><mo>&#8804;</mo><mi>x</mi><mo>&#8804;</mo><mn>2</mn></mrow></math></span> then <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>0</mn><mo>&#8804;</mo><mi>y</mi><mo>&#8804;</mo><mn>1</mn><mo>/</mo><mn>3</mn></mrow></math></span>. Let</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>f</mi><mrow><mo>(</mo><mi>y</mi><mo>)</mo></mrow><mo>=</mo><mn>2</mn><mo>&#8721;</mo><msup><mi>y</mi> <mrow><mn>2</mn><mi>k</mi><mo>+</mo><mn>1</mn></mrow> </msup><mo>/</mo><mrow><mo>(</mo><mn>2</mn><mi>k</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow><mo>=</mo><mn>2</mn><mo>&#8721;</mo><msub><mi>X</mi> <mi>k</mi> </msub></mrow></math></div>
<p class="nofirst noindent">We have <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>f</mi> <mo>'</mo> </msup><mrow><mo>(</mo><mi>y</mi><mo>)</mo></mrow><mo>=</mo><mn>2</mn><mo>&#8721;</mo><msup><mi>y</mi> <mrow><mn>2</mn><mi>k</mi></mrow> </msup><mo>=</mo><mn>2</mn><mo>/</mo><mrow><mo>(</mo><mn>1</mn><mo>-</mo><msup><mi>y</mi> <mn>2</mn> </msup><mo>)</mo></mrow></mrow></math></span>. If we consider <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>f</mi><mo>(</mo><mi>y</mi><mo>)</mo></mrow></math></span> as a function of
<span class="math"><i>x</i></span>, say <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>g</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow></math></span>, its derivative is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>1</mn><mo>/</mo><mi>x</mi></mrow></math></span>, so that <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>g</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow></math></span> is the logarithm of
<span class="math"><i>x</i></span>. We compute <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>X</mi> <mi>k</mi> </msub></math></span> as <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msub><mi>Y</mi> <mi>k</mi> </msub><mo>/</mo><mrow><mo>(</mo><mn>2</mn><mi>k</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow></mrow></math></span>, division as above, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msub><mi>Y</mi> <mrow><mi>k</mi><mo>+</mo><mn>1</mn></mrow> </msub><mo>=</mo><mi>z</mi><msub><mi>Y</mi> <mi>k</mi> </msub></mrow></math></span>,
where <span class="math"><i>z</i></span> is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mi>y</mi> <mn>2</mn> </msup></math></span>. This gives, for the number <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mi xmlns:xlink="http://www.w3.org/1999/xlink">&#960;</mi></math></span> with 18 digits
a logarithm of 1.144729885849400161 (last digits should be 173).
For the exponential, we get
23.140692632779268882 (last digits should be 8995). The error is larger,
because we multiply two truncated numbers.</p>
</li>
<li id="uid2400"><p class="nofirst noindent"><samp>\FPpow</samp><a id="uid2401"></a><samp>\C</samp><samp>\Va</samp><samp>\Vb</samp>. This puts in <samp>\C</samp>
the first value raised to the power the second value.</p>
</li>
<li id="uid2402"><p class="nofirst noindent"><samp>\FProot</samp><a id="uid2403"></a><samp>\C</samp><samp>\Va</samp><samp>\Vb</samp>. This puts in <samp>\C</samp>
the first value raised to the power the inverse of the second value. This use</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>a</mi> <mi>b</mi> </msup><mo>=</mo><mo form="prefix">exp</mo><mrow><mo>(</mo><mi>b</mi><mo>·</mo><mo form="prefix">log</mo><mi>a</mi><mo>)</mo></mrow><mspace width="2.em"></mspace><mroot><mi>a</mi> <mi>b</mi></mroot><mo>=</mo><mo form="prefix">exp</mo><mrow><mo>(</mo><mo form="prefix">log</mo><mi>a</mi><mo>/</mo><mi>b</mi><mo>)</mo></mrow></mrow></math></div>
<p class="nofirst noindent">If we compute <samp>\FPpow</samp><samp>\foo</samp><samp>{4}</samp><samp>{2}</samp>, we get <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>16</mn><mo>-</mo><mn>99</mn><mo>·</mo><msup><mn>10</mn> <mrow><mo>-</mo><mn>18</mn></mrow> </msup></mrow></math></span> and
<samp>\FProot</samp><samp>\foo</samp><samp>{16}</samp><samp>{2}</samp> gives <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>4</mn><mo>-</mo><mn>51</mn><mo>·</mo><msup><mn>10</mn> <mrow><mo>-</mo><mn>18</mn></mrow> </msup></mrow></math></span>. Other examples:
For some numbers, we have computed the square and fourth root. We have then
squared the result (or squared twice) and computed the difference with the
initial number.</p>
<table align="center" style="caption-side:bottom; border-collapse: collapse; border-width:1px;"><tr><td style="text-align:left;"><span class="math"><i>x</i></span></td>
<td style="text-align:center;">70000</td>
<td style="text-align:center;">7000</td>
<td style="text-align:center;">700</td>
<td style="text-align:center;">70</td>
<td style="text-align:center;">7</td>
<td style="text-align:center;">0.7</td>
<td style="text-align:center;">0.07</td>
<td style="text-align:center;">0.007</td>
<td style="text-align:center;">0.0007</td>
</tr><tr><td style="text-align:left;"><span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mn>10</mn> <mrow><mo>-</mo><mn>18</mn></mrow> </msup><mrow><mo>(</mo><mi>x</mi><mo>-</mo><msup><mrow><mo>(</mo><msqrt><mi>x</mi></msqrt><mo>)</mo></mrow> <mn>2</mn> </msup><mo>)</mo></mrow></mrow></math></span></td>
<td style="text-align:center;">1629349</td>
<td style="text-align:center;">171653</td>
<td style="text-align:center;">17569</td>
<td style="text-align:center;">1871</td>
<td style="text-align:center;">157</td>
<td style="text-align:center;">14</td>
<td style="text-align:center;">2</td>
<td style="text-align:center;">1</td>
<td style="text-align:center;">1</td>
</tr><tr><td style="text-align:left;"><span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mn>10</mn> <mrow><mo>-</mo><mn>18</mn></mrow> </msup><mrow><mo>(</mo><mi>x</mi><mo>-</mo><msup><mrow><mo>(</mo><mroot><mi>x</mi> <mn>4</mn></mroot><mo>)</mo></mrow> <mn>4</mn> </msup><mo>)</mo></mrow></mrow></math></span></td>
<td style="text-align:center;">2515666</td>
<td style="text-align:center;">297486</td>
<td style="text-align:center;">27306</td>
<td style="text-align:center;">2222</td>
<td style="text-align:center;">247</td>
<td style="text-align:center;">7</td>
<td style="text-align:center;">2</td>
<td style="text-align:center;">1</td>
<td style="text-align:center;">1</td>
</tr></table>
</li>
<li id="uid2404"><p class="nofirst noindent"><samp>\FPsin</samp><a id="uid2405"></a><samp>\C</samp><samp>\V</samp>,
<samp>\FPcos</samp><a id="uid2406"></a><samp>\C</samp><samp>\V</samp>,
<samp>\FPtan</samp><a id="uid2407"></a><samp>\C</samp><samp>\V</samp>,
<samp>\FPcot</samp><a id="uid2408"></a><samp>\C</samp><samp>\V</samp>,
These functions compute the trigonometric functions of a value <span class="math"><i>v</i></span>.
The tangent is the quotient of the sine and the cosine, the cotangent is the
quotient with arguments reversed.</p>
</li>
<li id="uid2409"><p class="nofirst noindent"><samp>\FPsincos</samp><a id="uid2410"></a><samp>\Ca</samp><samp>\Cb</samp><samp>\V</samp>,
<samp>\FPtancot</samp><a id="uid2411"></a><samp>\Ca</samp><samp>\Cb</samp><samp>\V</samp>.
The <samp>\FPsincos</samp> takes two commands: the sine will be
put in the first, the cosine in the second. The command <samp>\FPtancot</samp> stores
the tangent and the cotangent.</p>
<p>The first step is to reduce the argument modulo <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn><mi>&#960;</mi></mrow></math></span>. The same algorithm as
for the division is used (however <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn><mi>&#960;</mi></mrow></math></span> is computed with 36 digits, so that
the result is more precise that a division via FP commands). The second step
is to reduce modulo <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>&#960;</mi><mo>/</mo><mn>2</mn></mrow></math></span>. This is done according to the following table,
where <span class="math"><i>S</i></span> and <span class="math"><i>C</i></span> and the sine and cosine of <span class="math"><i>y</i></span>.</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mtable xmlns:xlink="http://www.w3.org/1999/xlink"><mtr><mtd><mi>x</mi></mtd><mtd><mi>y</mi></mtd><mtd><mrow><mo form="prefix">sin</mo><mi>x</mi></mrow></mtd><mtd><mrow><mo form="prefix">cos</mo><mi>x</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>0</mn><mo>&#8804;</mo><mi>x</mi><mo>&#8804;</mo><mi>&#960;</mi><mo>/</mo><mn>4</mn></mrow></mtd><mtd><mi>x</mi></mtd><mtd><mi>S</mi></mtd><mtd><mi>C</mi></mtd></mtr><mtr><mtd><mrow><mi>&#960;</mi><mo>/</mo><mn>4</mn><mo>&#8804;</mo><mi>x</mi><mo>&#8804;</mo><mi>&#960;</mi><mo>/</mo><mn>2</mn></mrow></mtd><mtd><mrow><mi>&#960;</mi><mo>/</mo><mn>2</mn><mo>-</mo><mi>x</mi></mrow></mtd><mtd><mi>C</mi></mtd><mtd><mi>S</mi></mtd></mtr><mtr><mtd><mrow><mi>&#960;</mi><mo>/</mo><mn>2</mn><mo>&#8804;</mo><mi>x</mi><mo>&#8804;</mo><mn>3</mn><mi>&#960;</mi><mo>/</mo><mn>4</mn></mrow></mtd><mtd><mrow><mi>x</mi><mo>-</mo><mi>&#960;</mi><mo>/</mo><mn>2</mn></mrow></mtd><mtd><mi>C</mi></mtd><mtd><mrow><mo>-</mo><mi>S</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>3</mn><mi>&#960;</mi><mo>/</mo><mn>4</mn><mo>&#8804;</mo><mi>x</mi><mo>&#8804;</mo><mi>&#960;</mi></mrow></mtd><mtd><mrow><mi>&#960;</mi><mo>/</mo><mn>2</mn><mo>-</mo><mi>x</mi></mrow></mtd><mtd><mi>S</mi></mtd><mtd><mrow><mo>-</mo><mi>C</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>&#960;</mi><mo>&#8804;</mo><mi>x</mi><mo>&#8804;</mo><mn>5</mn><mi>&#960;</mi><mo>/</mo><mn>4</mn></mrow></mtd><mtd><mrow><mi>x</mi><mo>-</mo><mi>&#960;</mi></mrow></mtd><mtd><mrow><mo>-</mo><mi>S</mi></mrow></mtd><mtd><mrow><mo>-</mo><mi>C</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>5</mn><mi>&#960;</mi><mo>/</mo><mn>4</mn><mo>&#8804;</mo><mi>x</mi><mo>&#8804;</mo><mn>3</mn><mi>&#960;</mi><mo>/</mo><mn>2</mn></mrow></mtd><mtd><mrow><mn>3</mn><mi>&#960;</mi><mo>/</mo><mn>2</mn><mo>-</mo><mi>x</mi></mrow></mtd><mtd><mrow><mo>-</mo><mi>C</mi></mrow></mtd><mtd><mrow><mo>-</mo><mi>S</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>3</mn><mi>&#960;</mi><mo>/</mo><mn>2</mn><mo>&#8804;</mo><mi>x</mi><mo>&#8804;</mo><mn>7</mn><mi>&#960;</mi><mo>/</mo><mn>4</mn></mrow></mtd><mtd><mrow><mi>x</mi><mo>-</mo><mn>3</mn><mi>&#960;</mi><mo>/</mo><mn>2</mn></mrow></mtd><mtd><mrow><mo>-</mo><mi>C</mi></mrow></mtd><mtd><mi>S</mi></mtd></mtr><mtr><mtd><mrow><mn>7</mn><mi>&#960;</mi><mo>/</mo><mn>4</mn><mo>&#8804;</mo><mi>x</mi><mo>&#8804;</mo><mn>3</mn><mi>&#960;</mi></mrow></mtd><mtd><mrow><mn>2</mn><mi>&#960;</mi><mo>-</mo><mi>x</mi></mrow></mtd><mtd><mrow><mo>-</mo><mi>S</mi></mrow></mtd><mtd><mi>C</mi></mtd></mtr></mtable></math></div>
<p class="nofirst noindent">The quantities C and S are computed via the obvious formulas</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo form="prefix">sin</mo><mi>y</mi><mo>=</mo><mo>&#8721;</mo><msup><mrow><mo>(</mo><mo>-</mo><mn>1</mn><mo>)</mo></mrow> <mi>n</mi> </msup><msup><mi>y</mi> <mrow><mn>2</mn><mi>n</mi><mo>+</mo><mn>1</mn></mrow> </msup><mo>/</mo><mrow><mo>(</mo><mn>2</mn><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow><mo>!</mo><mspace width="1.em"></mspace><mo form="prefix">cos</mo><mi>y</mi><mo>=</mo><mo>&#8721;</mo><msup><mrow><mo>(</mo><mo>-</mo><mn>1</mn><mo>)</mo></mrow> <mi>n</mi> </msup><msup><mi>y</mi> <mrow><mn>2</mn><mi>n</mi></mrow> </msup><mo>/</mo><mrow><mo>(</mo><mn>2</mn><mi>n</mi><mo>)</mo></mrow><mo>!</mo><mo>.</mo></mrow></math></div>
<p class="nofirst noindent">The following piece of code can be used to test:</p>
<pre class="latex-code">\def\T#1{
\FPsin\fooA{#1}\FPcos\fooB{#1}
\FPmul\fooA\fooA\fooA
\FPmul\fooB\fooB\fooB
\FPadd\foo\fooA\fooB\FPadd\foo\foo{-1}
\show\foo}
</pre>
<p class="nofirst noindent">If the argument is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn><mi>x</mi><mo>/</mo><mn>10</mn></mrow></math></span>, <span class="math"><i>x</i></span> integer, between 0 and 30, this procedure
gives numbers with magnitude at most <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>3</mn><mo>·</mo><msup><mn>10</mn> <mrow><mo>-</mo><mn>18</mn></mrow> </msup></mrow></math></span>.</p>
</li>
<li id="uid2412"><p class="nofirst noindent"><samp>\FParcsin</samp><a id="uid2413"></a><samp>\C</samp><samp>\V</samp>,
<samp>\FParccos</samp><a id="uid2414"></a><samp>\C</samp><samp>\V</samp>,
<samp>\FParcsincos</samp><a id="uid2415"></a><samp>\Ca</samp><samp>\Cb</samp><samp>\V</samp>.
These commands compute the inverse sine, cosine, or both of an argument.
The inverse sign is between <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>-</mo><mi>&#960;</mi><mo>/</mo><mn>2</mn></mrow></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>&#960;</mi><mo>/</mo><mn>2</mn></mrow></math></span>, the inverse cosine is between
0 and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mi xmlns:xlink="http://www.w3.org/1999/xlink">&#960;</mi></math></span>. It is an error if the argument is not between <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>-</mo><mn>1</mn></mrow></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>+</mo><mn>1</mn></mrow></math></span>.
Consider</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>f</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mo>=</mo><mo>&#8721;</mo><msup><mi>x</mi> <mrow><mn>2</mn><mi>k</mi><mo>+</mo><mn>1</mn></mrow> </msup><msub><mi>a</mi> <mi>k</mi> </msub><mo>/</mo><mrow><mo>(</mo><mn>2</mn><mi>k</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow><mspace width="2.em"></mspace><msub><mi>a</mi> <mi>k</mi> </msub><mo>=</mo><msub><mi>a</mi> <mrow><mi>k</mi><mo>-</mo><mn>1</mn></mrow> </msub><mrow><mo>(</mo><mn>2</mn><mi>k</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>/</mo><mn>2</mn><mi>k</mi><mo>.</mo></mrow></math></div>
<p class="nofirst noindent">We have <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>f</mi> <mo>'</mo> </msup><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mo>=</mo><mo>&#8721;</mo><msub><mi>a</mi> <mi>k</mi> </msub><msup><mi>x</mi> <mrow><mn>2</mn><mi>k</mi></mrow> </msup></mrow></math></span>. Since <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msub><mi>a</mi> <mi>k</mi> </msub><mo>=</mo><mrow><mo>(</mo><mn>2</mn><mi>k</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mo>!</mo><mo>/</mo><mi>k</mi><mo>!</mo><msup><mn>2</mn> <mi>k</mi> </msup></mrow></math></span>, we have
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>f</mi> <mo>'</mo> </msup><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mo>=</mo><msup><mrow><mo>(</mo><mn>1</mn><mo>-</mo><msup><mi>x</mi> <mn>2</mn> </msup><mo>)</mo></mrow> <mrow><mo>-</mo><mn>1</mn><mo>/</mo><mn>2</mn></mrow> </msup></mrow></math></span>, so that <span class="math"><i>f</i></span> is inverse sine. If <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>n</mi><mo>=</mo><mn>2</mn><mi>k</mi><mo>-</mo><mn>1</mn></mrow></math></span>, we have to
compute <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>n</mi><mo>/</mo><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow></math></span>, this uses a hack. If <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>&#8804;</mo><msqrt><mn>2</mn></msqrt><mo>/</mo><mn>2</mn></mrow></math></span>, we compute <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow></math></span>,
otherwise <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>f</mi><mo>(</mo><mi>y</mi><mo>)</mo></mrow></math></span> with <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>y</mi><mo>=</mo><msqrt><mrow><mn>1</mn><mo>-</mo><msup><mi>x</mi> <mn>2</mn> </msup></mrow></msqrt></mrow></math></span>. This is the inverse cosine of <span class="math"><i>x</i></span>.
The square root is computed exactly, it is not an approximation via logarithms
and exponentials. When we compute, for <span class="math"><i>x</i></span> integer between 0 and 30, the
inverse cosine of the cosine of <span class="math"><i>x</i></span>, we get an error at most <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>24</mn><mo>·</mo><msup><mn>10</mn> <mrow><mo>-</mo><mn>18</mn></mrow> </msup></mrow></math></span>. The error reaches its maximum and changes sign near <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>&#960;</mi><mo>/</mo><mn>4</mn></mrow></math></span> and
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>3</mn><mi>&#960;</mi><mo>/</mo><mn>4</mn></mrow></math></span>.</p>
</li>
<li id="uid2416"><p class="nofirst noindent"><samp>\FPtan</samp><a id="uid2417"></a><samp>\C</samp><samp>\V</samp>,
<samp>\FPcot</samp><a id="uid2418"></a><samp>\C</samp><samp>\V</samp>,
<samp>\FPtancot</samp><a id="uid2419"></a><samp>\Ca</samp><samp>\Cb</samp><samp>\V</samp>.
These commands compute the inverse tangent, or cotangent or both of the
argument. For the inverse tangent the result is between <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>-</mo><mi>&#960;</mi><mo>/</mo><mn>2</mn></mrow></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>&#960;</mi><mo>/</mo><mn>2</mn></mrow></math></span>.
For the inverse cotangent the result is between 0 and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mi xmlns:xlink="http://www.w3.org/1999/xlink">&#960;</mi></math></span>.
Since <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo form="prefix">tan</mo><mo>(</mo><mi>&#960;</mi><mo>/</mo><mn>2</mn><mo>-</mo><mi>t</mi><mo>)</mo><mo>=</mo><mn>1</mn><mo>/</mo><mo form="prefix">tan</mo><mi>t</mi></mrow></math></span>, we can assume that the argument is less than
one. In the case <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>&#8805;</mo><mn>8</mn><mo>/</mo><mn>9</mn></mrow></math></span>, we use the following:</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>y</mi><mo>=</mo><mstyle scriptlevel="0" displaystyle="true"><mfrac><mrow><mn>5</mn><mo>-</mo><mn>4</mn><msup><mi>x</mi> <mn>2</mn> </msup></mrow> <mn>9</mn></mfrac></mstyle><mspace width="2.em"></mspace><mstyle scriptlevel="0" displaystyle="true"><mfrac><mn>1</mn> <msqrt><mrow><mn>1</mn><mo>+</mo><msup><mi>x</mi> <mn>2</mn> </msup></mrow></msqrt></mfrac></mstyle><mo>=</mo><mstyle scriptlevel="0" displaystyle="true"><mfrac><mrow><mn>2</mn><mo>/</mo><mn>3</mn></mrow> <msqrt><mrow><mn>1</mn><mo>-</mo><mi>y</mi></mrow></msqrt></mfrac></mstyle><mo>.</mo></mrow></math></div>
<p class="nofirst noindent">If <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>=</mo><mo form="prefix">tan</mo><mi>t</mi></mrow></math></span>, then <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>1</mn><mo>/</mo><msqrt><mrow><mn>1</mn><mo>+</mo><msup><mi>x</mi> <mn>2</mn> </msup></mrow></msqrt><mo>=</mo><mo form="prefix">cos</mo><mi>t</mi></mrow></math></span>. We compute this, then the inverse
cosine. For <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>1</mn><mo>/</mo><msqrt><mrow><mn>1</mn><mo>-</mo><mi>y</mi></mrow></msqrt></mrow></math></span>, we use a variant of the formula shown above:
We write <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>(</mo><mn>2</mn><mi>k</mi><mo>-</mo><mn>1</mn><mo>)</mo><mo>/</mo><mo>(</mo><mn>2</mn><mi>k</mi><mo>)</mo><mo>=</mo><mn>1</mn><mo>-</mo><mn>1</mn><mo>/</mo><mo>(</mo><mn>2</mn><mi>k</mi><mo>)</mo></mrow></math></span>, and we compute <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>1</mn><mo>/</mo><mo>(</mo><mn>2</mn><mi>k</mi><mo>)</mo></mrow></math></span> via normal
division. In the case <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>&#8804;</mo><mn>8</mn><mo>/</mo><mn>9</mn></mrow></math></span>, we use the formula</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo form="prefix">arctan</mo><mi>x</mi><mo>=</mo><mi>x</mi><mo>-</mo><msup><mi>x</mi> <mn>3</mn> </msup><mo>/</mo><mn>3</mn><mo>+</mo><msup><mi>x</mi> <mn>5</mn> </msup><mo>/</mo><mn>5</mn><mo>-</mo><msup><mi>x</mi> <mn>7</mn> </msup><mo>/</mo><mn>7</mn><mo>+</mo><mo>...</mo></mrow></math></div>
</li>
<li id="uid2420"><p class="nofirst noindent"><samp>\FPlsolve</samp><a id="uid2421"></a><samp>\Ca</samp><samp>\Va</samp><samp>\Vb</samp>. Assume that the
arguments are <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>1</mn> </msub></math></span>, and <span class="math"><i>A</i></span>, <span class="math"><i>B</i></span>. This solves the equation</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>A</mi><mi>x</mi><mo>+</mo><mi>B</mi><mo>=</mo><mn>0</mn></mrow></math></div>
<p class="nofirst noindent">and puts the result in <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>1</mn> </msub></math></span>. In <i>Tralics</i>, you will find the number of
solutions in <samp>\count0</samp>. In the case of an equation of degree one, the
result is trivial: <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>=</mo><mo>-</mo><mi>B</mi><mo>/</mo><mi>A</mi></mrow></math></span>.</p>
</li>
<li id="uid2422"><p class="nofirst noindent"><samp>\FPqsolve</samp><a id="uid2423"></a><samp>\Ca</samp><samp>\Cb</samp><samp>\Va</samp><samp>\Vb</samp><samp>\Vc</samp>. Assume
that the arguments are <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>1</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>2</mn> </msub></math></span>, and <span class="math"><i>A</i></span>, <span class="math"><i>B</i></span>, <span class="math"><i>C</i></span>.
This solves the equation</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>A</mi><msup><mi>x</mi> <mn>2</mn> </msup><mo>+</mo><mi>B</mi><mi>x</mi><mo>+</mo><mi>C</mi><mo>=</mo><mn>0</mn></mrow></math></div>
<p class="nofirst noindent">and puts the result in <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>1</mn> </msub></math></span>, and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>2</mn> </msub></math></span>.
In <i>Tralics</i>, you will find the number of solutions in <samp>\count0</samp>. A special
case is when <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>A</mi><mo>=</mo><mn>0</mn></mrow></math></span>, the equation is of degree one. Otherwise, we replace <span class="math"><i>B</i></span>
by <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>B</mi><mo>/</mo><mi>A</mi></mrow></math></span> and <span class="math"><i>C</i></span> by <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>C</mi><mo>/</mo><mi>A</mi></mrow></math></span>. We replace <span class="math"><i>B</i></span> by <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>B</mi><mo>/</mo><mn>2</mn></mrow></math></span>. Thus, the equation to be
solved is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>x</mi> <mn>2</mn> </msup><mo>+</mo><mn>2</mn><mi>B</mi><mi>x</mi><mo>+</mo><mi>C</mi><mo>=</mo><mn>0</mn></mrow></math></span>. Let <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>&#916;</mi><mo>=</mo><msup><mi>B</mi> <mn>2</mn> </msup><mo>-</mo><mi>C</mi></mrow></math></span>. If <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>&#916;</mi><mo>&lt;</mo><mn>0</mn></mrow></math></span>, there is no
solution. Otherwise, the solutions are <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msub><mi>x</mi> <mn>2</mn> </msub><mo>=</mo><mo>-</mo><mrow><mo>(</mo><mo>±</mo><msqrt><mi>&#916;</mi></msqrt><mo>+</mo><mi>B</mi><mo>)</mo></mrow></mrow></math></span>, and
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msub><mi>x</mi> <mn>1</mn> </msub><mo>=</mo><mi>C</mi><mo>/</mo><msub><mi>x</mi> <mn>2</mn> </msub></mrow></math></span>. Here the sign of the square root is the same as <span class="math"><i>B</i></span>.</p>
</li>
<li id="uid2424"><p class="nofirst noindent"><samp>\FPcsolve</samp><a id="uid2425"></a><samp>\Ca</samp><samp>\Cb</samp><samp>\Cc</samp><samp>\Va</samp><samp>\Vb</samp><samp>\Vc</samp><samp>\Vd</samp>. Assume
that the arguments are <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>1</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>2</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>3</mn> </msub></math></span>, and <span class="math"><i>A</i></span>, <span class="math"><i>B</i></span>, <span class="math"><i>C</i></span>, <span class="math"><i>D</i></span>.
This solves the equation</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>A</mi><msup><mi>x</mi> <mn>3</mn> </msup><mo>+</mo><mi>B</mi><msup><mi>x</mi> <mn>2</mn> </msup><mo>+</mo><mi>C</mi><mi>x</mi><mo>+</mo><mi>D</mi><mo>=</mo><mn>0</mn></mrow></math></div>
<p class="nofirst noindent">and puts the result in <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>1</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>2</mn> </msub></math></span>, and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>3</mn> </msub></math></span>.
In <i>Tralics</i>, you will find the number of
solutions in <samp>\count0</samp>.
A special case is when <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>A</mi><mo>=</mo><mn>0</mn></mrow></math></span>, this is an equation of degree 2. Otherwise, let
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>D</mi> <mo>'</mo> </msup><mo>=</mo><mrow><mo>(</mo><mi>D</mi><mo>/</mo><mi>A</mi><mo>)</mo></mrow><mo>/</mo><mn>2</mn></mrow></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>T</mi><mo>=</mo><mo>-</mo><mi>B</mi><mo>/</mo><mo>(</mo><mn>3</mn><mi>A</mi><mo>)</mo></mrow></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>p</mi><mo>=</mo><mi>C</mi><mo>/</mo><mrow><mo>(</mo><mn>3</mn><mi>A</mi><mo>)</mo></mrow><mo>-</mo><msup><mi>T</mi> <mn>2</mn> </msup></mrow></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>q</mi><mo>=</mo><mo>-</mo><mrow><mo>(</mo><mi>B</mi><mi>C</mi><mo>)</mo></mrow><mo>/</mo><mrow><mo>(</mo><mn>6</mn><msup><mi>A</mi> <mn>2</mn> </msup><mo>)</mo></mrow><mo>+</mo><mi>D</mi><mo>-</mo><msup><mi>T</mi> <mn>3</mn> </msup></mrow></math></span>. Let
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>&#948;</mi><mo>=</mo><msup><mi>p</mi> <mn>3</mn> </msup><mo>-</mo><msup><mi>q</mi> <mn>2</mn> </msup></mrow></math></span>. If <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>&#948;</mi><mo>&gt;</mo><mn>0</mn></mrow></math></span>, there is a single solution. Let <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>u</mi><mo>=</mo><msqrt><mi>&#948;</mi></msqrt><mo>-</mo><mi>q</mi></mrow></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>v</mi><mo>=</mo><mo>-</mo><mo>(</mo><msqrt><mi>&#948;</mi></msqrt><mo>+</mo><mi>q</mi><mo>)</mo></mrow></math></span>. The solution is</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi><mo>=</mo><mroot><mi>u</mi> <mn>3</mn></mroot><mo>+</mo><mroot><mi>v</mi> <mn>3</mn></mroot><mo>+</mo><mi>T</mi><mo>.</mo></mrow></math></div>
<p class="nofirst noindent">Otherwise, let <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>R</mi><mo>=</mo><mo>±</mo><msqrt><mrow><mo>|</mo><mi>p</mi><mo>|</mo></mrow></msqrt></mrow></math></span>, with the same sign as <span class="math"><i>q</i></span>.
Let <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>s</mi><mo>=</mo><mo form="prefix">arccos</mo><mo>(</mo><mi>q</mi><mo>/</mo><msup><mi>R</mi> <mn>3</mn> </msup><mo>)</mo><mo>/</mo><mn>3</mn></mrow></math></span>, and</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msub><mi>r</mi> <mn>1</mn> </msub><mo>=</mo><mo>-</mo><mo form="prefix">cos</mo><mrow><mo>(</mo><mi>s</mi><mo>)</mo></mrow><mspace width="1.em"></mspace><msub><mi>r</mi> <mn>2</mn> </msub><mo>=</mo><mo form="prefix">cos</mo><mrow><mo>(</mo><mi>&#960;</mi><mo>/</mo><mn>3</mn><mo>-</mo><mi>s</mi><mo>)</mo></mrow><mspace width="1.em"></mspace><msub><mi>r</mi> <mn>3</mn> </msub><mo>=</mo><mo form="prefix">cos</mo><mrow><mo>(</mo><mi>&#960;</mi><mo>/</mo><mn>3</mn><mo>+</mo><mi>s</mi><mo>)</mo></mrow><mo>.</mo></mrow></math></div>
<p class="nofirst noindent">The solutions are <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msub><mi>x</mi> <mi>i</mi> </msub><mo>=</mo><mn>2</mn><mi>R</mi><msub><mi>r</mi> <mi>i</mi> </msub><mo>+</mo><mi>T</mi></mrow></math></span>.
The implementation of the formulas are a bit different than in the initial
TeX version, so that numerically, there can be some small differences.</p>
</li>
<li id="uid2426"><p class="nofirst noindent"><samp>\FPqqsolve</samp><a id="uid2427"></a><samp>\Ca</samp><samp>\Cb</samp><samp>\Cc</samp><samp>\Cd</samp>
<samp>\Va</samp><samp>\Vb</samp><samp>\Vc</samp><samp>\Vd</samp><samp>\Ve</samp>. Assume
that the arguments are <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>1</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>2</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>3</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>4</mn> </msub></math></span> and <span class="math"><i>A</i></span>, <span class="math"><i>B</i></span>, <span class="math"><i>C</i></span>, <span class="math"><i>D</i></span>, <span class="math"><i>E</i></span>.
This solves the equation</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>A</mi><msup><mi>x</mi> <mn>4</mn> </msup><mo>+</mo><mi>B</mi><msup><mi>x</mi> <mn>3</mn> </msup><mo>+</mo><mi>C</mi><msup><mi>x</mi> <mn>2</mn> </msup><mo>+</mo><mi>D</mi><mi>x</mi><mo>+</mo><mi>E</mi><mo>=</mo><mn>0</mn></mrow></math></div>
<p class="nofirst noindent">and puts the result in <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>1</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>2</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>3</mn> </msub></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>x</mi> <mn>4</mn> </msub></math></span>.
In <i>Tralics</i>, you will find the number of
solutions in <samp>\count0</samp>. We can assume <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>A</mi><mo>&#8800;</mo><mn>0</mn></mrow></math></span>, otherwise this is an
equation of degree 3. Then we divide by <span class="math"><i>A</i></span>, and assume <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>A</mi><mo>=</mo><mn>1</mn></mrow></math></span>. A special case
is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>D</mi><mo>=</mo><mn>0</mn></mrow></math></span>, i.e. <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>A</mi><msup><mi>y</mi> <mn>2</mn> </msup><mo>+</mo><mi>C</mi><mi>y</mi><mo>+</mo><mi>E</mi><mo>=</mo><mn>0</mn></mrow></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>x</mi> <mn>2</mn> </msup><mo>=</mo><mi>y</mi></mrow></math></span>. We first find <span class="math"><i>y</i></span>. For each positive
solution, we take the square root. A second special case is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>A</mi><mo>=</mo><mi>E</mi></mrow></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>B</mi><mo>=</mo><mi>D</mi></mrow></math></span>. This
is</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>x</mi> <mn>4</mn> </msup><mo>+</mo><mi>B</mi><msup><mi>x</mi> <mn>3</mn> </msup><mo>+</mo><mi>C</mi><msup><mi>x</mi> <mn>2</mn> </msup><mo>+</mo><mi>B</mi><mi>x</mi><mo>+</mo><mn>1</mn><mo>=</mo><mn>0</mn><mo>.</mo></mrow></math></div>
<p class="nofirst noindent">If <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>u</mi><mo>=</mo><mi>x</mi><mo>+</mo><mn>1</mn><mo>/</mo><mi>x</mi></mrow></math></span>, we get <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>u</mi> <mn>2</mn> </msup><mo>+</mo><mi>B</mi><mi>u</mi><mo>+</mo><mrow><mo>(</mo><mi>C</mi><mo>-</mo><mn>2</mn><mo>)</mo></mrow><mo>=</mo><mn>0</mn></mrow></math></span>. We solve this equation. For each
solution <span class="math"><i>u</i></span> we solve <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>x</mi> <mn>2</mn> </msup><mo>-</mo><mi>u</mi><mi>x</mi><mo>+</mo><mn>1</mn><mo>=</mo><mn>0</mn></mrow></math></span>. In the general case, we consider</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>B</mi> <mo>'</mo> </msup><mo>=</mo><mi>B</mi><mo>/</mo><mn>4</mn><mo>,</mo><mspace width="3.33333pt"></mspace><mi>T</mi><mo>=</mo><mo>-</mo><msup><mi>B</mi> <mo>'</mo> </msup><mo>,</mo><mspace width="3.33333pt"></mspace><msup><mi>E</mi> <mo>'</mo> </msup><mo>=</mo><mi>E</mi><mo>-</mo><msup><mi>B</mi> <mo>'</mo> </msup><mi>D</mi><mo>+</mo><mi>C</mi><msup><mi>B</mi> <mrow><mo>'</mo><mn>2</mn></mrow> </msup><mo>-</mo><mn>3</mn><msup><mi>B</mi> <mrow><mo>'</mo><mn>4</mn></mrow> </msup><mo>,</mo><mspace width="3.33333pt"></mspace><msup><mi>D</mi> <mo>'</mo> </msup><mo>=</mo><mi>D</mi><mo>-</mo><mn>2</mn><msup><mi>B</mi> <mo>'</mo> </msup><msup><mi>C</mi> <mo>'</mo> </msup><mo>+</mo><mn>8</mn><msup><mi>B</mi> <mrow><mo>'</mo><mn>3</mn></mrow> </msup><mo>,</mo><mspace width="3.33333pt"></mspace><msup><mi>C</mi> <mo>'</mo> </msup><mo>=</mo><mi>C</mi><mo>-</mo><mn>6</mn><msup><mi>B</mi> <mrow><mo>'</mo><mn>2</mn></mrow> </msup></mrow></math></div>
<p class="nofirst noindent">The effect is to shift the roots by <span class="math"><i>T</i></span>. If</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>x</mi> <mn>4</mn> </msup><mo>+</mo><msup><mi>C</mi> <mo>'</mo> </msup><msup><mi>x</mi> <mn>2</mn> </msup><mo>+</mo><msup><mi>D</mi> <mo>'</mo> </msup><mi>x</mi><mo>+</mo><msup><mi>E</mi> <mo>'</mo> </msup><mo>=</mo><mn>0</mn></mrow></math></div>
<p class="nofirst noindent">has roots <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>r</mi> <mi>i</mi> </msub></math></span>, then the initial equation has roots <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msub><mi>x</mi> <mi>i</mi> </msub><mo>=</mo><msub><mi>r</mi> <mi>i</mi> </msub><mo>+</mo><mi>T</mi></mrow></math></span>.
Consider</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>P</mi><mo>=</mo><mrow><mo>(</mo><msup><mi>x</mi> <mn>2</mn> </msup><mo>+</mo><msup><mi>s</mi> <mo>'</mo> </msup><mo>/</mo><mn>2</mn><mo>+</mo><mi>r</mi><mo>-</mo><mi>D</mi><mo>/</mo><msup><mi>s</mi> <mo>'</mo> </msup><mo>)</mo></mrow><mrow><mo>(</mo><msup><mi>x</mi> <mn>2</mn> </msup><mo>-</mo><msup><mi>s</mi> <mo>'</mo> </msup><mo>/</mo><mn>2</mn><mo>+</mo><mi>r</mi><mo>+</mo><mi>D</mi><mo>/</mo><msup><mi>s</mi> <mo>'</mo> </msup><mo>)</mo></mrow><mo>.</mo></mrow></math></div>
<p class="nofirst noindent">This is the original polynomial if <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>C</mi><mo>=</mo><mn>2</mn><mi>r</mi><mo>-</mo><msup><mi>s</mi> <mrow><mo>'</mo><mn>2</mn></mrow> </msup><mo>/</mo><mn>4</mn></mrow></math></span> and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>E</mi><mo>=</mo><msup><mi>r</mi> <mn>2</mn> </msup><mo>-</mo><msup><mi>D</mi> <mn>2</mn> </msup><mo>/</mo><msup><mi>s</mi> <mrow><mo>'</mo><mn>2</mn></mrow> </msup></mrow></math></span>. Let
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>s</mi><mo>=</mo><mn>8</mn><mi>r</mi><mo>-</mo><mn>4</mn><mi>C</mi></mrow></math></span>. The first equation is true if <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><msup><mi>s</mi> <mrow><mo>'</mo><mn>2</mn></mrow> </msup><mo>=</mo><mi>s</mi></mrow></math></span>. We must have <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>s</mi><mo>&gt;</mo><mn>0</mn></mrow></math></span>. The
second relation says that <span class="math"><i>r</i></span> must be a solution of</p>
<div class="mathdisplay"><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>8</mn><msup><mi>y</mi> <mn>3</mn> </msup><mo>-</mo><mn>4</mn><mi>C</mi><msup><mi>y</mi> <mn>2</mn> </msup><mo>-</mo><mn>8</mn><mi>E</mi><mi>y</mi><mo>+</mo><mn>4</mn><mi>C</mi><mi>E</mi><mo>-</mo><msup><mi>D</mi> <mn>2</mn> </msup><mo>=</mo><mn>0</mn><mo>.</mo></mrow></math></div>
<p class="nofirst noindent">This is called the resolvant. This, we solve this equation, compute the three
roots, chose one with <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>s</mi><mo>&gt;</mo><mn>0</mn></mrow></math></span> (if this is not possible the initial equation has
no real root). After that <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>P</mi><mo>=</mo><mn>0</mn></mrow></math></span> becomes two equations of degree two.</p>
</li></ul>

<h3 id="uid2428">5.8.3. Alternate syntax</h3>
<p>The command <samp>\FPupn</samp><a id="uid2429"></a> implements a postfix language that allows you to
write shorter code. Here is an example</p>
<pre class="latex-code">\FPupn\foo{7 20 2 sub 100 2000 - add +}
      \testeq\foo{1925.}
\FPupn\foo{20 2 div 100 2000 / add 3 mul 2 *}
      \testeq\foo{180.}
\def\mthree{-3}%there is no unary minus in this language
\FPupn\foo{ 3 abs mthree abs 3 sgn 10 * mthree sgn 100 * + + +}
      \testeq\foo{-84.}
\FPupn\foo{2 3 min 400 500 max +}
      \testeq\foo{502.}
\FPupn\foo{12.43745678 2 round 12.35745678 2 trunc -}
      \testeq\foo{-0.09}
\FPupn\foo{e 1.2  exp + 2.3 ln + 3 4 pow + 5 6 root +}
      \testeq\foo{72.302276955235951659}
\FPupn\foo{pi 0.7 - sin cos sincos - tan cot tancot +}
      \testeq\foo{-2.894412996263821897}
\FPupn\foo{0.3 arcsin 0.1 * arccos 0.1 * arcsincos -
           arctan arccot arctancot -}
      \testeq\foo{0.751779218345560029}
\FPupn\foo{3.4 seed random}
       \testeq\foo{0.000023479107778276}
\FPupn\foo{1.1 2.3 3.4 pop swap copy add sub}
      \testeq\foo{0.1}
</pre>
<p class="nofirst noindent">The <samp>\testeq</samp> command can be used to test the code. It is an error if
the two arguments are not the same. Some comments. Consider the last
expression. We put 1.1, 2.3 and 3.4 on the stack. After that we pop an
item. After that we swap. The stack holds 1.1 (top stack), followed by
2.3. Then we duplicate the top stack. Then we add. The topstack is now
2.2. After subtraction, we get 0.1. If you say `<samp>2 3 -</samp>´, the result is 1,
because - and sub use arguments in a different order. The same is true for /
and div. Note the order of <samp>10 2 pow</samp>, this gives 1024. If strange words are
seen, like `mthree´, they are replaced by <samp>\mthree</samp>. Note that `e´ and `pi´
are predefined.</p>
<p>If you don´t like postfix language, you can use <samp>\FPeval</samp><a id="uid2430"></a>.
Here are some examples.</p>
<pre class="latex-code">\FPeval\foo{1000-100-10-1}
   \testeq\foo{889.}
\FPeval\foo{1000+100+10+1}
   \testeq\foo{1111.}
\FPeval\foo{1000-100+10+1}
   \testeq\foo{911.}
\FPeval\foo{1000+100-10+1}
   \testeq\foo{1091.}
\FPeval\xfoo{(20 - 2) + (2000-100) + 7}
   \testeq\xfoo{1925.}
\FPeval\xfoo{(20/2 + 2000/100)*3*2}
   \testeq\xfoo{180.}
\FPeval\foo{210/2/3/5}
   \testeq\foo{7.}
\FPeval\foo{210*2/3/5}
   \testeq\foo{28.}
\FPeval\foo{210/2*3/5}
   \testeq\foo{63.}
\FPeval\foo{210/2/3*5}
   \testeq\foo{175.}
\FPeval\foo{210*2*3/5}
   \testeq\foo{252.}
\FPeval\foo{210*2/3*5}
   \testeq\foo{700.}
\FPeval\foo{210/2*3*5}
   \testeq\foo{1575.}
\FPeval\xfoo{abs(3) + abs(-3) + (sgn(3)* 10) + (sgn(-3) * 100)}
   \testeq\xfoo{-84.}
\FPeval\xfoo{min(2:3) + max(400,500)}
   \testeq\xfoo{502.}
\FPeval\xfoo{round(12.43745678,2) -  trunc(12.35745678, 2)}
   \testeq\xfoo{0.09}
\FPeval\xfoo{e + exp(1.2)  + ln(2.3) + pow(3, 4) + root(5, 6)}
   \testeq\xfoo{72.302276955235951659}
\FPeval\xfooa{sin(cos(sin(0.7 - pi))) - cos(cos(sin(0.7 - pi)))}
\FPeval\xfoo{tan (cot(tan(xfooa))) + cot(cot(tan(xfooa)))}
   \testeq\xfoo{-2.894412996263821897}
\FPeval\xfooa{arcsin (arccos (arcsin(0.3)*0.1)*0.1) -
               arccos (arccos (arcsin(0.3)*0.1)*0.1)}
\FPeval\xfoo{arctan(arccot(arctan(xfooa))) - arccot(arccot(arctan(xfooa)))}
   \testeq\xfoo{0.751779218345560029}
\FPeval\foo{2+3*4+5*3^2}
   \testeq\foo{58.999999999999998665}
\FPeval\foo{3^2*5+4*3+2+1}
   \testeq\foo{59.999999999999998665}
\FPeval\foo{(+3+4)*(-5-6)}
   \testeq\foo{-77.}
</pre>
<p>If you wonder what happens, you can look the transcript file. You can see
something like:</p>
<pre class="log-code">{\FPeval}
{FPpostfix 1  2  3  mul add  400 500  max  sin 4  pow add}
{\FP@upn}
{FPupcmd ??}
{FPupcmd ??}
{FPupcmd ??}
{FPupcmd mul}
{FPread for \FP@upn=+3.}
{FPread for \FP@upn=+2.}
{FPupcmd add}
{FPread for \FP@upn=+6.}
{FPread for \FP@upn=+1.}
{FPupcmd ??}
{FPupcmd ??}
{FPupcmd max}
{FPread for \FP@upn=+500.}
{FPread for \FP@upn=+400.}
{FPupcmd sin}
{FPread for \FP@upn=+500.}
{FPupcmd ??}
{FPupcmd pow}
{FPread for \FP@upn=+4.}
{FPread for \FP@upn=-0.467771805322476126}
{FPupcmd add}
{FPread for \FP@upn=+0.522845423476396576}
{FPread for \FP@upn=+7.}
{FPread for \FP@upn=+7.522845423476396576}
</pre>
<p class="nofirst noindent">The second line is the expression converted from infix to postfix.
Each `??´ represents a string that does not start with a letter. This is
generally a number.</p>

<h2 id="uid2431">5.9. Action before translation</h2>
<p>Normally, translation applies only to what is between <samp>\begin{document}</samp> and
<samp>\end{document}</samp>. This is a very special environment, in fact, it leaves the
semantics stack pointer unchanged. There are two hooks. You can say<a id="uid2432"></a></p>
<pre class="latex-code">\AtBeginDocument{\foo}
\AtEndDocument{\xbar}
</pre>
<p class="nofirst noindent">These commands remember the
tokens in a special list, that is inserted in the input stream when
<samp>\begin{document}</samp> or <samp>\end{document}</samp> is seen. After that, the meaning of the command
changes: it becomes `evaluate now´, more precisely <samp>\@firstofone</samp>. The last
action in the begin-document hook is to change the definition again, so that
an error may be signaled, for instance <i>Can be used only in
preamble: \AtBeginDocument</i>. On the other hand, the <samp>\end{document}</samp>
command inserts a special marker that closes every open file, thus stopping
translation at the end of the hook (the bibliography is translated after
that). The command <samp>\@onlypreamble</samp><a id="uid2433"></a> takes as argument a command name
and adds it to the list of commands that become invalid after the preamble.</p>
<p>Before the begin of
the document, you can use commands of the form <a id="uid2434"></a></p>
<pre class="latex-code">\documentclass[doc-opt]{doc-class}
\usepackage[pack-opt]{pack-name}
</pre>
<p class="nofirst noindent">There are some differences with LaTeX, see next section.
If `doc-opt´ contains `useallsizes´ this is the same as
if a line in the configuration file has said to use all font sizes.
If it contains `french´ or `english´, this defines the default language.</p>
<p>Before version 2.9, the name or options of the class could indicate the
top-level section; for instance, book assumed `leadingpart´ and report assumed
`leadingchapter´; these keywords are no more recognised. You have to say
<samp>\toplevelsection</samp><a id="uid2435"></a><samp>{\part}</samp> in the class file if you want it
to be `part´. The default is `part´ for a book, `chapter´ for a report,
`section´ otherwise.
If the top-level section is part, chapter, or section, the
translation of <samp>\subsection</samp> is, respectively, a <tt class="txt">&lt;div3&gt;</tt>, <tt class="txt">&lt;div2&gt;</tt> or
<tt class="txt">&lt;div1&gt;</tt> element. Moreover, an attribute pair <span class="sansserif">chapters</span>=`true´ or
<span class="sansserif">part</span>=`true´ is added to the main element, so that a post-processor can
decide that <tt class="txt">&lt;div1&gt;</tt> is subsection, section or chapter.</p>
<p>If the packages `calc´<a id="uid2436"></a>, `fp´<a id="uid2437"></a> or
`fancyhdr´<a id="uid2438"></a> are loaded, then the meaning of some
command changes, as explained elsewhere. If the `babel´<a id="uid2439"></a>
package is
loaded, the following languages are recognized: english, american, british,
canadian, UKenglish, USenglish (these have number 0), french, francais,
frenchb, acadian, canadien (these have number 1) austrian, german, germanb,
naustrian, ngerman (these have number 2). The first language in the list is
the default language. If a package is named `french´<a id="uid2440"></a> or
`frenchle´<a id="uid2441"></a> or `german´<a id="uid2442"></a>, the
default language is
also set. The default language can be used in the attribute list of the main
document element. Setting the default language also set the current language
(value of <samp>\language</samp><a id="uid2443"></a>).</p>
<p>Note that the current version of the babel package accepts 63 options, which
are language names, and if you specify an option not in the list, for instance
`foo´, then <span class="sansserif">foo.ldf</span> is loaded if possible, so that the number of
options could be greater. There are three other options that are recognised by
certain languages and whose purpose is to make some characters active. We have
shown in section <a href="#uid1885" title="Characters and Accents">5.4</a> how <i>Tralics</i> handles double quotes in German.
For instance, in spanish, if option `activeacute´ is given then <samp>´a</samp> is a
shorthand for <samp>\´a</samp>, and this applies to 12 other characters. In
catalan, you can also use option `activegrave´, this makes <samp>`a</samp> a shorthand
for <samp>\`a</samp>, it applies only to A, E and O. Finally option
`KeepShorthandsActive´ controls whether shorthands are activated by default.
The `french´ package no longer exists, there are two versions `frenchpro´
(commercial) and `frenchle´ (free); there are two versions of the for German,
`german´ and `ngerman´. All features of these packages can be found in babel
(with possibly differences in the syntax). These packages have no options.</p>
<p>The `calc´ and `fancyhdr´ packages have no options. The `fp´ package has two
options, `debug´ and `nomessages´ that are ignored by <i>Tralics</i>.</p>
<p>The standard configuration file contains lines like these:</p>
<pre class="latex-code">  on package loaded calc CALC = "true"
  on package loaded foo/bar FOO1 = "true"
  on package loaded *foo/bar FOO2 = "true"
  on package loaded foo/*bar FOO3 = "true"
  on package loaded *foo/*bar FOO4 = "true"
</pre>
<p class="nofirst noindent">You can also say</p>
<pre class="latex-code">  on_package_loaded calc CALC = "true"
  on_package_option calc CALC = "true"
  on_class_option article CALC = "true"
  on class option */* CALC = "*+"
</pre>
<p class="nofirst noindent">Before version 2.8, these lines of codes provoked some actions. They are now
ignored. You should use classes and packages instead.</p>

<h2 id="uid2444">5.10. Classes and packages</h2>
<p>We explain in this section how <i>Tralics</i> implements package and classes.</p>
<p>Assume that we have a file named <span class="sansserif">myclass.clt</span>, whose content is
given here and will be explained later:</p>
<pre class="latex-code"><span class="prenumber">1</span> \ProvidesClass{mypackage}[2006/08/19 v1.0 myclass document class for Tralics]
<span class="prenumber">2</span> \NeedsTeXFormat{LaTeX2e}[1995/12/01]
<span class="prenumber">3</span> \DeclareOption{a}{\typeout{option A}}
<span class="prenumber">4</span> \DeclareOption{b}{\typeout{option B}}
<span class="prenumber">5</span> \DeclareOption{d}{\typeout{option D}}
<span class="prenumber">6</span> \AtEndOfClass{\typeout{End of class}}
<span class="prenumber">7</span> \typeout{Before execute options}
<span class="prenumber">8</span> \ExecuteOptions{a}
<span class="prenumber">9</span> \ProcessOptions\relax
<span class="prenumber">10</span> \endinput
</pre>
<p class="nofirst noindent">and a file named <span class="sansserif">mypack.plt</span>,
containing this single line:</p>
<pre class="latex-code"><span class="prenumber">11</span> \ProvidesPackage{mypack}[2006/10/10 My package]
</pre>
<p class="nofirst noindent">a file named <span class="sansserif">mypack1.plt</span> with</p>
<pre class="latex-code">\ProvidesPackage{mypack1}[2006/10/10 My package]
\typeout{Loading file mypack1}
\DeclareOption{x}{}
\DeclareOption{y}{}
\DeclareOption{z}{}
\ProcessOptions \relax
\endinput
</pre>
<p class="nofirst noindent">and finally a file named <span class="sansserif">mypack2.plt</span></p>
<pre class="latex-code"><span class="prenumber">12</span> \ProvidesPackage{mypack2}[2006/10/10 My package]
<span class="prenumber">13</span> \DeclareOption{e}{\typeout{Option E}}
<span class="prenumber">14</span>  
<span class="prenumber">15</span> \@ifpackageloaded{mypack}
<span class="prenumber">16</span>   {\typeout{Seen package mypack}}
<span class="prenumber">17</span>   {\typeout{Package mypack missing}}
<span class="prenumber">18</span>  
<span class="prenumber">19</span> \@ifpackagelater{mypack}{2006/11/11}
<span class="prenumber">20</span>   {\typeout{Seen good package mypack}}
<span class="prenumber">21</span>   {\typeout{Package mypack obsolete}}
<span class="prenumber">22</span>  
<span class="prenumber">23</span> \@ifpackagewith{mypack1}{x}
<span class="prenumber">24</span>   {\typeout{Seen mypack with x}}
<span class="prenumber">25</span>   {}
<span class="prenumber">26</span> \@ifpackagewith{mypack1}{x,y}
<span class="prenumber">27</span>   {\typeout{Seen mypack with x and y}}
<span class="prenumber">28</span>   {}
<span class="prenumber">29</span> \@ifpackagewith{mypack1}{x,y,z}
<span class="prenumber">30</span>   {\typeout{Seen mypack with x, y and z}}
<span class="prenumber">31</span>   {}
<span class="prenumber">32</span>  
<span class="prenumber">33</span> \ProcessOptions\relax
<span class="prenumber">34</span> \endinput
</pre>
<p>Assume that we have a source document containing the following lines</p>
<pre class="latex-code"><span class="prenumber">35</span> \AtBeginDocument{\typeout{Begin Document}}
<span class="prenumber">36</span> \documentclass[a,b,c,e]{myclass}[2007/03/05]
<span class="prenumber">37</span> \typeout{In preamble}
<span class="prenumber">38</span> \usepackage{mypack}
<span class="prenumber">39</span> \usepackage[y,x,w]{mypack1}
<span class="prenumber">40</span> \usepackage{mypack2}[2000/00/00]
<span class="prenumber">41</span> \usepackage[y,x,w]{mypack1}
<span class="prenumber">42</span> \usepackage[aa,bb]{mypack1}
<span class="prenumber">43</span>  
<span class="prenumber">44</span> \begin{document}
<span class="prenumber">45</span> Text
<span class="prenumber">46</span> \end{document}
</pre>
<p>When <i>Tralics</i> translates the document above, you will see</p>
<pre class="log-code"><span class="prenumber">47</span> This is tralics  2.11.7, a LaTeX to XML translator
<span class="prenumber">48</span> Copyright INRIA/MIAOU/APICS 2002-2008, Jos\'e Grimm
<span class="prenumber">49</span> Licensed under the CeCILL Free Software Licensing Agreement
<span class="prenumber">50</span> Starting translation of file toto.tex.
<span class="prenumber">51</span> Warning: class myclass claims to be mypackage.
<span class="prenumber">52</span> Document class: mypackage 2006/08/19 v1.0 myclass document class for Tralics
<span class="prenumber">53</span> Before execute options
<span class="prenumber">54</span> option A
<span class="prenumber">55</span> option A
<span class="prenumber">56</span> option B
<span class="prenumber">57</span> Warning: You have requested, on line 3, version
<span class="prenumber">58</span> `2007/03/05' of class myclass,
<span class="prenumber">59</span> but only version
<span class="prenumber">60</span> `2006/08/19 v1.0 myclass document class for Tralics' is available
<span class="prenumber">61</span> End of class
<span class="prenumber">62</span> In preamble
<span class="prenumber">63</span> Loading file mypack1
<span class="prenumber">64</span> Unknown option `w' for package `mypack1'
<span class="prenumber">65</span> Seen package mypack
<span class="prenumber">66</span> Package mypack obsolete
<span class="prenumber">67</span> Seen mypack with x
<span class="prenumber">68</span> Seen mypack with x and y
<span class="prenumber">69</span> Option E
<span class="prenumber">70</span> Option clash in \usepackage mypack1
<span class="prenumber">71</span> Old options: y,x,w.
<span class="prenumber">72</span> New options: aa,bb.
<span class="prenumber">73</span> Tralics Warning: Unused global option:
<span class="prenumber">74</span>     c.
<span class="prenumber">75</span> Begin Document
</pre>
<p>The <samp>\documentclass</samp><a id="uid2445"></a> command has three arguments, an optional one,
that defines the class options, a required one that defines the class name,
and an optional one that indicates a date. <i>Tralics</i> reads 8 digits, with some
separators, but LaTeX is a bit more exigent, four digits for the year, two
digits for the month, two for the year, with slashses as separator, see above.</p>
<p>Evaluating the command is complicated. In fact, <i>Tralics</i> reads the file with
extension `.clt´ (instead of `.cls´), in either the current directory or the
directory containing other configuration files, compares dates, and evaluates
options. The behavior of <samp>\usepackage</samp><a id="uid2446"></a> is similar. There are two
differences. The first is that the mandatory argument of <samp>\usepackage</samp> can
contain a comma-separated list of files; the second is that class options
that are not used by the class can be used by packages. These options are
called <i>global options</i>.</p>
<p>The <samp>\usepackage</samp>
command must be used after <samp>\documentclass</samp>, before <samp>\begin{document}</samp>,
there is a synonym <samp>\RequirePackage</samp><a id="uid2447"></a> that can be used before the
documentclass (this subltety is not implemented in <i>Tralics</i>, both commands
are always defined the same). There is also <samp>\LoadClass</samp><a id="uid2448"></a>; this behaves
like <samp>\documentclass</samp>, with some exceptions: for instance, the options of
this command are not global options; there has to be a single
<samp>\documentclass</samp> (LaTeX has additional requirements).</p>
<p>The two commands <samp>\LoadClassWithOptions</samp><a id="uid2449"></a> and
<samp>\RequirePackageWithOptions</samp><a id="uid2450"></a> behave the same as the commands without
the `WithOptions´ but they take only two arguments: you give only a file name
and maybe a date, you do not give options, because current options are used.
Finally, <samp>\InputClass</samp><a id="uid2451"></a> is a command defined by <i>Tralics</i>, that behaves
like <samp>\input</samp>, but: the file (with extension
<span class="sansserif">.clt</span>) is looked at in the same place
as class files, and it can contain option declarations that apply to the
current class (outside a class or package, you cannot declare options).</p>
<p>The class file should contain an
identification line. This is like line 1 above, starting with the command
<samp>\ProvidesClass</samp><a id="uid2452"></a>. You can also use <samp>\ProvidesPackage</samp><a id="uid2453"></a>, the
behavior is the same. You can also use <samp>\ProvidesFile</samp><a id="uid2454"></a>; in this case
the identification line is printed on the transcript file, nothing more
happens. In the case of the two other commands, the line is printed on the
transcript file (in the case of a class, on the terminal as well, see
transcript, line 52), and the
date is parsed and remembered. The argument of the command should be the same
as the file name, or else a warning is printed (line 51).</p>
<p>You can use the commands <samp>\AtEndOfPackage</samp><a id="uid2455"></a> or
<samp>\AtEndOfClass</samp><a id="uid2456"></a>. These commands take an argument, whose content is
added to the list of commands to be executed at the end of the class or
package. In fact, when the end of file is seen, <i>Tralics</i> will insert and
evaluate these tokens (example line 61); moreover a warning will be issued if
there are options and the package does not process them (either via
<samp>\ProcessOptions</samp> or via <samp>\PassOptionToPackage</samp>).
Finally, a warning will be issued if the class or package is obsolete, i.e.,
earlier than the date argument of the usepackage or documentclass command
(lines 57 to 60).</p>
<p>The commands <samp>\@ifclassloaded</samp><a id="uid2457"></a>
or <samp>\@ifpackageloaded</samp><a id="uid2458"></a>
take three arguments, P, A and B; they evaluate the token list A in case
the class or package P is loaded, the token list B otherwise (example line 65).
The commands <samp>\@ifclasslater</samp><a id="uid2459"></a>
or <samp>\@ifpackagelater</samp><a id="uid2460"></a>
take four arguments, P, D, A and B; they evaluate the token list A in case
the class or package P is loaded with a date more recent than D, the token list
B otherwise (example line 66).
The commands <samp>\@ifclasswith</samp><a id="uid2461"></a>
or <samp>\@ifpackagewith</samp><a id="uid2462"></a>
take four arguments, P, L, A and B; they evaluate the token list A in case
the class or package P is loaded with options L, the token list
B otherwise (example line 67, 68). The order of elements in L is irrelevant,
the test is true if the package has been loaded with additional options.</p>
<p>The two commands <samp>\PassOptionToClass</samp><a id="uid2463"></a> and
<samp>\PassOptionToPackage</samp><a id="uid2464"></a> take two arguments: an option list and a class
name (or a package name), they add the options to the list of options of the
package (this is uselesss if the class or package is not loaded later).</p>
<p>The command <samp>\DeclareOption</samp><a id="uid2465"></a> takes two arguments A and B, where A is
an option name and B a token list, the action associated to the option. If the
option is processed, this list is evaluated. The command
<samp>\ExecuteOptions</samp><a id="uid2466"></a> takes a list of options as argument, and processes
them in the given order (it processes only options defined in the current
file). In the transcript given above, line 54 is the result of such an action.
The command <samp>\ProcessOptions</samp><a id="uid2467"></a> executes all options relevant to the
current file. In the example, we have four class options, a, b, c, and e. The
class defines a, b, and d, you see the result on lines 55 and 56. Nothing
special happens for an option like d that is defined in the class but never
referenced. Undefined package options generally provoke a warning (line 64).
Unused class options (like c and e) become global options. In fact, option e is
defined in `mypack2´, see transcript line 69. Thus, we have a single unused
global option (see lines 73 and 74). Note the order of evaluation:
if a star follows <samp>\ProcessOptions</samp>, the order is defined by the user (main
document) otherwise by the system (class or package). The LaTeX documentation claims that reading this star may provoke expansion of commands
that follows<a id="uid2468" href="#note67" title="This seems untrue, it might depend on the version of , so that you should use an explicit star"><small>(note: </small>&#10163;<small>)</small></a>, hence advises to use
<samp>\relax</samp> in the case where no star is given.</p>
<p>If you say <samp>\DeclareOption*</samp><samp>{\foo}</samp>, the <samp>\foo</samp> command is
applied to every options not secified elsewhere. The name of the option will
be in <samp>\CurrentOption</samp><a id="uid2469"></a>. You can use <samp>\OptionNotUsed</samp><a id="uid2470"></a> if you
want to say that an option is not used. The command
<samp>\NeedsTeXFormat</samp><a id="uid2471"></a> takes a normal argument and an optional argument,
but <i>Tralics</i> does nothing with them. The command
<samp>\default@ds</samp><a id="uid2472"></a> is an alias for
<samp>\OptionNotUsed</samp>. You should not use it.</p>
<p>We give now an extract of the transcript file. Notice that, usually, the optional
date argument of the <samp>\usepackage</samp> command is omitted, and <i>Tralics</i> reads
the start of the next line in order to see if it is there. For instance, the
first token on input line 6 is read in order to see if it is an open bracket
(transcript line 118, 119). The command is evaluated later (transcript line
130). Note that <i>Tralics</i> restores a variable, <tt>cur_file_pos</tt>, this is the
index of the current file in the list of packages or classes; it is zero
outside a class or package. You can also see that the category code of the
`<samp>@</samp>´ character is set to 11 (letter) at the start of the file, and
restored later.</p>
<p>Read carefully lines 99 to 102. In non-verbose mode, only line 101 is printed.
This line
says that options a, b, a, and b are executed. In fact, if the package
defines options A and B, uses options a and b, and we have global options x, y,
there is a first pass; we mark
all options from the list A, B that are in the list a, b, x, y (see transcript,
lines 99 and 100, or 145, 146); when an option is marked, its code is put in
the todo list, and its code is removed. As a side effect, options are executed
only once (on the other hand <samp>\ExecuteOptions</samp> leaves the option
unchanged, so that the code may be executed more than once; once options are
processed, executing them is a no-op).
If you say <samp>\ProcessOptions*</samp>, the
loop is on the global option list x, y, options are marked if they are in A, B.
There is then a second pass on the list a, b.
If the element is in the list A, B, it will be executed (in the case where is
no star in the command, the option has already been used; otherwise it
will be added to the to-do list; notice how this defines the order of
evaluation of the options). If the element is not in the list, a fall back
behaviour is used; if <samp>\DeclareOption*</samp> <samp>{\foo}</samp> has been issued,
then then <samp>\def</samp> <samp>\CurrentOption</samp><a id="uid2473"></a> <samp>{a}</samp> <samp>\foo</samp> will be
added to the to-do list. Otherwise a warning is printed in the case of a
package (see line 147), the option is added to the list of global options
otherwise. The todo list is executed at the end of this second loop.</p>
<pre class="log-code"><span class="prenumber">76</span> [3] \documentclass[a,b,c,e]{myclass}[2007/03/05]
<span class="prenumber">77</span> {\documentclass}
<span class="prenumber">78</span> ++ file myclass.clt exists.
<span class="prenumber">79</span> ++ Input stack ++ 1 myclass.clt
<span class="prenumber">80</span> ++ Made @ a letter
<span class="prenumber">81</span> ++ Opened file myclass.clt; it has 15 lines
<span class="prenumber">82</span> [1]
<span class="prenumber">83</span> [2] \ProvidesClass{mypackage}[2006/08/19 v1.0 myclass document class for Tralics]
<span class="prenumber">84</span> Warning: class myclass claims to be mypackage.
<span class="prenumber">85</span> Document class: mypackage 2006/08/19 v1.0 myclass document class for Tralics
<span class="prenumber">86</span> [3] \NeedsTeXFormat{LaTeX2e}[1995/12/01]
<span class="prenumber">87</span> [4]
<span class="prenumber">88</span> [5] \DeclareOption{a}{\typeout{option A}}
<span class="prenumber">89</span> [6] \DeclareOption{b}{\typeout{option B}}
<span class="prenumber">90</span> [7] \DeclareOption{d}{\typeout{option D}}
<span class="prenumber">91</span> [8] \AtEndOfClass{\typeout{End of class}}
<span class="prenumber">92</span> [9] \typeout{Before execute options}
<span class="prenumber">93</span> Before execute options
<span class="prenumber">94</span> [10] \ExecuteOptions{a}
<span class="prenumber">95</span> {Options to execute-&gt;a}
<span class="prenumber">96</span> {Options code to execute-&gt;\typeout{option A}}
<span class="prenumber">97</span> option A
<span class="prenumber">98</span> [11] \ProcessOptions\relax
<span class="prenumber">99</span> Marking option a
<span class="prenumber">100</span> Marking option b
<span class="prenumber">101</span> {Options to execute-&gt;a,b,a,b}
<span class="prenumber">102</span> {Options code to execute-&gt;\typeout{option A}\typeout{option B}}
<span class="prenumber">103</span> option A
<span class="prenumber">104</span> option B
<span class="prenumber">105</span> [12] \endinput
<span class="prenumber">106</span> ++ End of file myclass.clt
<span class="prenumber">107</span> ++ Catcode of @ restored to 12
<span class="prenumber">108</span> Warning: You have requested, on line 3, version
<span class="prenumber">109</span> `2007/03/05' of class myclass,
<span class="prenumber">110</span> but only version
<span class="prenumber">111</span> `2006/08/19 v1.0 myclass document class for Tralics' is available
<span class="prenumber">112</span> ++ cur_file_pos restored to 0
<span class="prenumber">113</span> ++ Input stack -- 1 myclass.clt
<span class="prenumber">114</span> {\typeout}
<span class="prenumber">115</span> End of class
<span class="prenumber">116</span> [4] \typeout{In preamble}
<span class="prenumber">117</span> In preamble
<span class="prenumber">118</span> [5] \usepackage{mypack}
<span class="prenumber">119</span> [6] \usepackage[y,x,w]{mypack1}
<span class="prenumber">120</span> ++ file mypack.plt exists.
<span class="prenumber">121</span> ++ Input stack ++ 1 mypack.plt
<span class="prenumber">122</span> ++ Made @ a letter
<span class="prenumber">123</span> ++ Opened file mypack.plt; it has 1 lines
<span class="prenumber">124</span> [1] \ProvidesPackage{mypack}[2006/10/10 My package]
<span class="prenumber">125</span> Package: mypack 2006/10/10 My package
<span class="prenumber">126</span> ++ End of file mypack.plt
<span class="prenumber">127</span> ++ Catcode of @ restored to 12
<span class="prenumber">128</span> ++ cur_file_pos restored to 0
<span class="prenumber">129</span> ++ Input stack -- 1 mypack.plt
<span class="prenumber">130</span> {\usepackage}
<span class="prenumber">131</span> [7] \usepackage{mypack2}[2000/00/00]
<span class="prenumber">132</span> ++ file mypack1.plt exists.
<span class="prenumber">133</span> ++ Input stack ++ 1 mypack1.plt
<span class="prenumber">134</span> ....
<span class="prenumber">135</span> {\usepackage}
<span class="prenumber">136</span> ++ file mypack2.plt exists.
<span class="prenumber">137</span> ++ Input stack ++ 1 mypack2.plt
<span class="prenumber">138</span> ++ Made @ a letter
<span class="prenumber">139</span> ++ Opened file mypack2.plt; it has 27 lines
<span class="prenumber">140</span> ...
<span class="prenumber">141</span> [9] \usepackage[aa,bb]{mypack1}
<span class="prenumber">142</span> {\usepackage}
<span class="prenumber">143</span> [10]
<span class="prenumber">144</span> Option clash in \usepackage mypack1
<span class="prenumber">145</span> Old options: y,x,w.
<span class="prenumber">146</span> New options: aa,bb.
<span class="prenumber">147</span> {\par}
<span class="prenumber">148</span> [11] \begin{document}
<span class="prenumber">149</span> {\begin}
<span class="prenumber">150</span> {\begin document}
<span class="prenumber">151</span> +stack: level + 2 for environment
<span class="prenumber">152</span> {\document}
<span class="prenumber">153</span> +stack: ending environment document; resuming document.
<span class="prenumber">154</span> +stack: level - 2 for environment
<span class="prenumber">155</span> +stack: level set to 1
<span class="prenumber">156</span> ++ Input stack ++ 1 (AtBeginDocument hook)
<span class="prenumber">157</span> [1] \let\do\noexpand\ignorespaces
<span class="prenumber">158</span> ++ End of virtual file.
<span class="prenumber">159</span> ++ cur_file_pos restored to 0
<span class="prenumber">160</span> ++ Input stack -- 1 (AtBeginDocument hook)
<span class="prenumber">161</span> LaTeX Warning: Unused global option(s):
<span class="prenumber">162</span>     c.
<span class="prenumber">163</span> atbegindocumenthook= \typeout{Begin Document}\let\AtBeginDocument
<span class="prenumber">164</span>     \@notprerr\let\do\noexpand\ignorespaces
</pre>
<p>No error is signaled if the class or package does not exist. If you compile
the example below with <i>Tralics</i>, no error is signaled, if you compile with
LaTeX, the following errors are signaled:</p>
<ul>
<li id="uid2474"><p class="nofirst noindent">on line 4, <i>Unknown option `foo´ for package `calc´</i>;</p>
</li>
<li id="uid2475"><p class="nofirst noindent">on line 5, <i>File `xcalc.sty´ not found</i>, and you are asked for
an alternate file name, with default extension .sty;</p>
</li>
<li id="uid2476"><p class="nofirst noindent">on line 5, <i>Unknown option `a´ for package `xcalc´</i>;</p>
</li>
<li id="uid2477"><p class="nofirst noindent">on line 5, <i>Unknown option `b´ for package `xcalc´</i>;</p>
</li>
<li id="uid2478"><p class="nofirst noindent">on line 8, <i>Undefined control sequence \xbad</i>;</p>
</li>
<li id="uid2479"><p class="nofirst noindent">on line 9, <i>Undefined control sequence \ybad</i>.</p>
</li></ul>
<pre class="latex-code"><span class="prenumber">1</span> \documentclass{article}
<span class="prenumber">2</span>  
<span class="prenumber">3</span> \usepackage[foo]{calc}
<span class="prenumber">4</span> \usepackage[a,b]{xcalc}
<span class="prenumber">5</span> \usepackage[a]{xcalc}
<span class="prenumber">6</span> \makeatletter
<span class="prenumber">7</span> \@ifpackagewith{calc}{foo}{}{\bad}
<span class="prenumber">8</span> \@ifpackagelater{calc}{2005/12/12}{}{\xbad}
<span class="prenumber">9</span> \@ifpackageloaded{xcalc}{\ybad}{}
<span class="prenumber">10</span> \@ifpackagelater{xcalc}{2000/01/02}{\zbad}{}
<span class="prenumber">11</span> \@ifpackagewith{xcalc}{a}{}{\tbad}
<span class="prenumber">12</span> \begin{document}
<span class="prenumber">13</span> \end{document}
</pre>
<p>Note that <samp>\usepackage</samp> takes an optional argument, not given here, so that
the first four errors are signaled after looking ahead for one token, they
correspond to commands on line 3 and 4.
In the case of <i>Tralics</i>, if a package is not found, the <samp>\usepackage</samp>
declaration is ignored, this explains why <samp>\ybad</samp> is not called;
no error is signaled for unknown options;
however, the options are remembered, so that the second <samp>\usepackage</samp>
will not try to load the file again, but checks the options. Builtin packages
(calc, fp, fancyhdr, babel, french, frenchle, german) behave in a special
way. If no `plt´ file is found, they are remembered in the table with
2006/01/01 as date; since the calc package is v4.1b, dated 1998/07/07, this
explains why <i>Tralics</i> and LaTeX disagree when asked whether or not the
package is older than december 2005. On the other hand, the default date of a
file is 0000/00/00, so that an inexistant package is never later than a
non-null date; the same is true for a package that does not
provide a date, or before the identification of the package is evaluated;
thus <samp>\zbad</samp> is not called.</p>
<p>The <span class="sansserif">xkeyval</span> package is an extension to <span class="sansserif">keyval</span>. It provides
three extensions, that can be used in a package or a class:</p>
<pre class="latex-code">\DeclareOptionX{opF}{\def\opF{#1}}
\DeclareOptionX{Cw}{}
\ExecuteOptionsX{keya,keyb=1}
\ProcessOptionsX \relax
</pre>
<p>The main document can start with</p>
<pre class="latex-code">\documentclass[Cu,Cv,Cw,foo=E,opF={\foobar,gee},unused,Unused=U]{article}
\usepackage[opA,opB=C,epW=5,opC=\foo,opE]{testkeyval}
</pre>
<p class="nofirst noindent">Let´s make the following assumptions: the testkeyval package defines
all keys used in the execute optionsX command, and most of the keys used in
the usepackage declaration. You will see the following</p>
<pre class="latex-code">xkeyval: Unknown option `epW=5'
xkeyval: Unknown option `opE'
</pre>
<p class="nofirst noindent">We have shown above that the package defines opF and Cw; these are global
class options. The package sees option oF with value, formed a a brace,
a command, a comma, three characters, and a closing brace. You will see</p>
<pre class="latex-code">Tralics Warning: Unused global options
   unused,Unused=U.
</pre>
<p class="nofirst noindent">This mechanism is neither fully compatible with pure LaTeX, nor with the
xkeyval extension, but should work in all practical cases.</p>

<h2 id="uid2480">5.11. Expandable commands</h2>
<p>We give here the list of all expandable commands, and some examples.
Missing in this list are: some commands defined in the next section, all
commands defined via <samp>\def</samp> in the C++ code, see section <a href="#uid3817" title="Bootstrap code">6.13</a>.</p>
<ul>
<li id="uid2481"><p class="nofirst noindent"><samp>\a</samp><a id="uid2482"></a>, and all commands described in section <a href="#uid1885" title="Characters and Accents">5.4</a>.
Here is a little dialog that shows expansion:</p>
<pre class="latex-code">&gt; \expandafter\def\expandafter\foo\expandafter{\a'e}
&gt; \show\foo
\foo=macro: -&gt;\'e.
&gt; \edef\foo{\a'e}
&gt; \show\foo
\foo=macro: -&gt;é.
&gt; \edef\foo{\aa}
&gt; \show\foo
\foo=macro: -&gt;å.
</pre>

</li>
<li id="uid2483"><p class="nofirst noindent"><samp>\aa</samp> and some special characters. Commands whose effect is to
produce a character in the <span class="sansserif">XML</span> result, on which an accent can be put, are
expanded. In a near future, more commands could be implemented in this way.</p>
</li>
<li id="uid2484"><p class="nofirst noindent"><samp>\@firstofone</samp>, <samp>\@firstoftwo</samp>, <samp>\@secondoftwo</samp>.<a id="uid2485"></a>
These commands read one or two arguments, and
return the first or the second.</p>
<pre class="latex-code">&gt; \makeatletter
&gt; \expandafter\def\expandafter\foo\expandafter{\@firstofone{{1}}}
&gt; \show\foo
\foo=macro: -&gt;{1}.
&gt; \expandafter\def\expandafter\foo\expandafter{\@firstoftwo{{1}}{{2}}}
&gt; \show\foo
\foo=macro: -&gt;{1}.
&gt; \expandafter\def\expandafter\foo\expandafter{\@secondoftwo{{1}}{{2}}}
&gt; \show\foo
\foo=macro: -&gt;{2}.
</pre>
</li>
<li id="uid2486"><p class="nofirst noindent"><samp>\topmark</samp><a id="uid2487"></a>, <samp>\firstmark</samp><a id="uid2488"></a>,
<samp>\botmark</samp><a id="uid2489"></a>,
<samp>\splitfirstmark</samp><a id="uid2490"></a>,
<samp>\splitbotmark</samp><a id="uid2491"></a>. The expansion is empty, because <i>Tralics</i> does not
create pages.</p>
</li>
<li id="uid2492"><p class="nofirst noindent"><samp>\topmarks</samp><a id="uid2493"></a>, <samp>\firstmarks</samp><a id="uid2494"></a>,
<samp>\botmarks</samp><a id="uid2495"></a>,
<samp>\splitfirstmarks</samp><a id="uid2496"></a>,
<samp>\splitbotmarks</samp><a id="uid2497"></a>. These are extensions introduced by &#1013;-TeX; an integer
is read, expansion is empty.</p>
</li>
<li id="uid2498"><p class="nofirst noindent"><samp>\detokenize</samp><a id="uid2499"></a>, <samp>\unexpanded</samp><a id="uid2500"></a>. These commands are
introduced by &#1013;-TeX, and explained in section <a href="#uid3749" title="Extensions">6.12</a>. These
commands behave like <samp>\the</samp>, in that the resulting token list is not
expanded, even in a <samp>\edef</samp> or <samp>\write</samp>.</p>
</li>
<li id="uid2501"><p class="nofirst noindent"><samp>\xspace</samp><a id="uid2502"></a>. This command reads a token. It may insert
a space unless a) the token is a character of category code 12,
and one of <samp>.,!?:;/´)-</samp>, b) the token is an open brace, a close brace,
or c) a space or <tt>\ </tt>.</p>
</li>
<li id="uid2503"><p class="nofirst noindent"><samp>\[</samp><a id="uid2504"></a>, <samp>\[</samp><a id="uid2505"></a> <samp>\(</samp><a id="uid2506"></a>, <samp>\)</samp><a id="uid2507"></a>.
Expansion is one or two dollar tokens.</p>
</li>
<li id="uid2508"><p class="nofirst noindent"><samp>\noexpand</samp><a id="uid2509"></a>, <samp>\expandafter</samp><a id="uid2510"></a>, <samp>\csname</samp><a id="uid2511"></a>,
<samp>\the</samp>: The behaviour is the same
as that of TeX.</p>
</li>
<li id="uid2512"><p class="nofirst noindent"><samp>\number</samp><a id="uid2513"></a>, <samp>\romannumeral</samp><a id="uid2514"></a>,
<samp>\string</samp><a id="uid2515"></a>, <samp>\meaning</samp><a id="uid2516"></a>, <samp>\fontname</samp><a id="uid2517"></a>,
<samp>\jobname</samp><a id="uid2518"></a>.
The expansion of these macros is a list of characters, implemented in
<i>Tralics</i> the same as in TeX.</p>
</li>
<li id="uid2519"><p class="nofirst noindent"><samp>\tralicsversion</samp><a id="uid2520"></a>, <samp>\eTeXrevision</samp><a id="uid2521"></a>,
<samp>\Romannumeral</samp><a id="uid2522"></a>,
<samp>\@arabic</samp><a id="uid2523"></a>,
Extensions to the list above, the first two commands return a character string
indicating the current version of <i>Tralics</i>, or the subversion of &#1013;-TeX (note
that the version number is a read-only integer), <samp>\Romannumeral</samp> produces
uppercase roman digits, <samp>\@arabic</samp> is the same as in LaTeX: the following code gives 5V.</p>
<pre class="latex-code">\makeatletter
\count0=3
\count4=5
\@arabic{\count0}4
\Romannumeral\count4
</pre>
</li>
<li id="uid2524"><p class="nofirst noindent"><samp>\if</samp><a id="uid2525"></a>, <samp>\ifcat</samp><a id="uid2526"></a>, <samp>\ifnum</samp><a id="uid2527"></a>, <samp>\ifdim</samp><a id="uid2528"></a>,
<samp>\ifodd</samp><a id="uid2529"></a>, <samp>\ifvmode</samp><a id="uid2530"></a>, <samp>\ifhmode</samp><a id="uid2531"></a>, <samp>\ifmmode</samp><a id="uid2532"></a>,
<samp>\ifinner</samp><a id="uid2533"></a>,<samp>\ifvoid</samp><a id="uid2534"></a>, <samp>\ifhbox</samp><a id="uid2535"></a>, <samp>\ifvbox</samp><a id="uid2536"></a>,
<samp>\ifx</samp><a id="uid2537"></a>, <samp>\ifeof</samp><a id="uid2538"></a>, <samp>\iftrue</samp><a id="uid2539"></a>, <samp>\iffalse</samp><a id="uid2540"></a>,
<samp>\ifcase</samp><a id="uid2541"></a>: conditionals.</p>
</li>
<li id="uid2542"><p class="nofirst noindent"><samp>\fi</samp><a id="uid2543"></a>, <samp>\or</samp><a id="uid2544"></a>, <samp>\else</samp><a id="uid2545"></a>: More conditionals.</p>
</li>
<li id="uid2546"><p class="nofirst noindent"><samp>\ifdefined</samp><a id="uid2547"></a>, <samp>\iffontchar</samp><a id="uid2548"></a>, <samp>\ifcsname</samp><a id="uid2549"></a>:
&#1013;-TeX additional conditionals.</p>
</li>
<li id="uid2550"><p class="nofirst noindent"><samp>\unless</samp><a id="uid2551"></a>. The next unexpanded token must be a boolean
conditional (not <samp>\ifcase</samp>); the truth value of that conditional is
reversed.</p>
</li>
<li id="uid2552"><p class="nofirst noindent"><samp>\@afterfi</samp>, <samp>\@afterelsefi</samp><a id="uid2553"></a>: These commands can be used in a
if-then-else structure, they terminate the condition and re-insert the
interesting tokens.</p>
</li>
<li id="uid2554"><p class="nofirst noindent"><samp>\input</samp><a id="uid2555"></a>, <samp>\endinput</samp><a id="uid2556"></a>. The expansion of these macros is
empty, but they change the list of tokens to be considered later.</p>
</li>
<li id="uid2557"><p class="nofirst noindent"><samp>\useverb</samp><a id="uid2558"></a> is an extension of the verbatim package.</p>
</li>
<li id="uid2559"><p class="nofirst noindent"><samp>\@car</samp>, <samp>\@cdr</samp><a id="uid2560"></a>:
these give access to first or rest of a list terminated by <samp>\@nil</samp>.</p>
<pre class="latex-code">&gt; \edef\foo{\expandafter\@car\@cdr123\@nil\@nil}
&gt; \show\foo
\foo=macro: -&gt;2.
</pre>

</li>
<li id="uid2561"><p class="nofirst noindent"><samp>\zap@space</samp><a id="uid2562"></a> removes spaces in a list (see example
below for how the list is terminated).</p>
</li>
<li id="uid2563"><p class="nofirst noindent"><samp>\strip@prefix</samp><a id="uid2564"></a> reads all characters up to a
greater then sign, see example below.</p>
</li>
<li id="uid2565"><p class="nofirst noindent"><a id="uid2566"></a> <samp>\hexnumber@</samp> reads a number, assumed to be
between 0 and 15, and returns a base 16 digit.</p>
<pre class="latex-code">&gt; \edef\foo{\zap@space 12 34 56 \@empty}
&gt; \show\foo
\foo=macro: -&gt;123456.
\let\E\expandafter
&gt; \E\def\E\xfoo\E{\strip@prefix ab&gt;cd}
&gt; \show\xfoo
\xfoo=macro: -&gt;cd.
&gt; \E\E\E\def\E\E\E\xfoo\E\E\E{\E\strip@prefix\meaning \foo}
&gt; \show\xfoo
\xfoo=macro: -&gt;123456.
&gt; \edef\foo{\hexnumber@{\numexpr 2*6\relax}}
&gt; \show\foo
\foo=macro: -&gt;C.
</pre>
</li>
<li id="uid2567"><p class="nofirst noindent"><samp>\@iftempty</samp><a id="uid2568"></a>,
<samp>\@ifbempty</samp><a id="uid2569"></a>. These commands, provided by
<i>Tralics</i>, take three
arguments, A, B and C. They expand to B if A is empty, to C otherwise.
For the second command, blank spaces are removed. The command <samp>\@zifempty</samp>
defined below is the easy way to test that the argument is empty; if the argument is a token
list that starts with an at-sign (of category 11), the test is true, and part
of the argument is evaluated. The command <samp>\@xifempty</samp> is a bit more
complicated: it uses an additional command, so that an argument consisting of
spaces only is passed as empty, thus the behavior is the same as <samp>\@ifbempty</samp>.
This command comes from the class
<span class="sansserif">amsart</span>. In order to use these commands with a normal at-sign, we
changed the name.</p>
<pre class="latex-code">\makeatletter
\let\@xp=\expandafter
\long\def\@zifempty#1{\ifx @#1@\@xp\@firstoftwo\else\@xp\@secondoftwo\fi}
\long\def\@yifempty#1{\@xifempty#1@@..\@nil}
\long\def\@xifempty#1#2@#3#4#5\@nil{%
  \ifx#3#4\@xp\@firstoftwo\else\@xp\@secondoftwo\fi}
\let\ifempty\@iftempty\let\yifempty\@yifempty\let\bifempty\@ifbempty
\let\zifempty\@zifempty
\makeatother
</pre>
<p>The following piece of code produces two identical lines.</p>
<pre class="latex-code">\def\First#1#2{#1}
\def\Second#1#2{#2}
\def\w\ww{}
Ifempty \ifempty{}{1}{2}\ifempty{ }{1}{2}\ifempty{\w}{1}{2}%
\yifempty{}{1}{2}\yifempty{ }{1}{2}\yifempty{\w}{1}{2}%
\bifempty{}{1}{2}\bifempty{ }{1}{2}\bifempty{\w}{1}{2}%
\zifempty{}{1}{2}\zifempty{ }{1}{2}\zifempty{\w}{1}{2}%
\ifempty{}{\First}{\Second}{1}{2}%
\ifempty{ }{\First}{\Second}{1}{2}%
\ifempty{\w}{\First}{\Second}{1}{2}%
\yifempty{}{\First}{\Second}{1}{2}%
\yifempty{ }{\First}{\Second}{1}{2}%
\yifempty{\w}{\First}{\Second}{1}{2}%
\bifempty{}{\First}{\Second}{1}{2}%
\bifempty{ }{\First}{\Second}{1}{2}%
\bifempty{\w}{\First}{\Second}{1}{2}%
\zifempty{}{\First}{\Second}{1}{2}%
\zifempty{ }{\First}{\Second}{1}{2}%
\zifempty{\w}{\First}{\Second}{1}{2} %
\yifempty{x@22}{4}{2}%
\yifempty{xy@22}{4}{2}%
\yifempty{xy@22@33}{4}{2}%
.
\if\ifempty{}{1}{2}1\else\uerror\fi
\if\ifempty{\w}{1}{2}2\else\uerror\fi
\if\yifempty{}{1}{2}1\else\uerror\fi
\if\yifempty{\w}{1}{2}2\else\uerror\fi
\if\bifempty{}{1}{2}1\else\uerror\fi
\if\bifempty{\w}{1}{2}2\else\uerror\fi
\if\bifempty{ }{1}{2}1\else\uerror\fi
\if\yifempty{ }{1}{2}1\else\uerror\fi
\count\bifempty{\w}{1}{2}=1
\count\ifempty{\w}{1}{2}=1
\count\yifempty{\w}{1}{2}=1
\count\zifempty{\w}{1}{2}=1
Ifempty 122112112122122112112122 222.
</pre>
</li></ul>

<h2 id="uid2570">5.12. Other expandable commands</h2>
<p>Not all commands defined here can be expanded, see the list at the end of
Chapter 2. Essentially, this describes the ifthen package, the calc package,
the newtheorem mechanism, and some input-output commands.</p>
<ul>
<li id="uid2571"><p class="nofirst noindent"><samp>\@iwhilenum</samp>, <samp>\@iwhiledim</samp>, and
<samp>\@iwhilesw</samp><a id="uid2572"></a> are internal
commands for implementing the next three commands; should not be used.</p>
</li>
<li id="uid2573"><p class="nofirst noindent"><samp>\@whilenum</samp><a id="uid2574"></a>,
<samp>\@whiledim</samp><a id="uid2575"></a>,
<samp>\@whilesw</samp><a id="uid2576"></a>,
<samp>\whiledo</samp><a id="uid2577"></a>.
Consider the following example,</p>
<pre class="latex-code">\newcounter{ca}\newcounter{cb}
\newcommand{\printgcd}[2]{%
  \setcounter{ca}{#1}\setcounter{cb}{#2}%
  Gcd(#1,\,#2) =
  \whiledo{\not\(\value{ca}=\value{cb}\)}%
    {\ifthenelse{\value{ca}&gt;\value{cb}}%
      {\addtocounter{ca}{-\value{cb}}}%
      {\addtocounter{cb}{-\value{ca}}}%
    gcd(\arabic{ca},\,\arabic{cb}) = }%
  \arabic{ca}.}
</pre>
<p>This works only if the package <span class="sansserif">ifthen</span> is loaded. It should produce
(we have inserted some <samp>\allowbreak</samp> commands in order to allow linebreaks
in the very big formula):

Gcd(144, 272) =
gcd <!--PASS THROUGH allowbreak-->(144, <!--PASS THROUGH allowbreak-->128) = gcd <!--PASS THROUGH allowbreak-->(16, <!--PASS THROUGH allowbreak-->128) = gcd <!--PASS THROUGH allowbreak-->(16, <!--PASS THROUGH allowbreak-->112) = gcd <!--PASS THROUGH allowbreak-->(16, <!--PASS THROUGH allowbreak-->96) = gcd <!--PASS THROUGH allowbreak-->(16, <!--PASS THROUGH allowbreak-->80) = gcd <!--PASS THROUGH allowbreak-->(16, <!--PASS THROUGH allowbreak-->64) = gcd <!--PASS THROUGH allowbreak-->(16, <!--PASS THROUGH allowbreak-->48) = gcd <!--PASS THROUGH allowbreak-->(16, <!--PASS THROUGH allowbreak-->32) = gcd <!--PASS THROUGH allowbreak-->(16, <!--PASS THROUGH allowbreak-->16) = 16.</p>
<p>The <span class="sansserif">ifthen</span> package implements <samp>\whiledo</samp><a id="uid2578"></a> in terms of
the LaTeX command <samp>\@whilesw</samp>. The <i>Tralics</i> implementation
of <samp>\whiledo</samp> is: read arguments A and B. Evaluate A as the first argument
of <samp>\ifthenelse</samp>.
If false terminate. Otherwise, the expansion is <samp>B\whiledo A{B}</samp>.
Using one version or the other produces the same result.</p>
<pre class="latex-code">\makeatletter
\newif\if@whiledo
\long\def\whiledo#1#2{%
  \ifthenelse{#1}%
    {\@whiledotrue
     \@whilesw\if@whiledo\fi
       {#2%
        \ifthenelse{#1}\@whiledotrue\@whiledofalse}}%
    {}%
  }
</pre>
<p>This is the same code, without the <span class="sansserif">ifthen</span> package.</p>
<pre class="latex-code">\newif\iftest
\newcommand{\printgcd}[2]{%
  \setcounter{ca}{#1}\setcounter{cb}{#2}%
  \testtrue
  \@whilesw\iftest gcd(\arabic{ca},\arabic{cb}) = \fi{%
   \ifnum\value{ca}=\value{cb}\testfalse\else
    \ifnum\value{ca}&gt;\value{cb}%
      \addtocounter{ca}{-\value{cb}}\else
      \addtocounter{cb}{-\value{ca}}\fi
\fi}%
  \arabic{ca}.}
</pre>
<p>We propose now a method that uses <samp>\@whilenum</samp>. We start with two commands
that put in <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>(</mo><mi>c</mi><mo>,</mo><mi>d</mi><mo>)</mo></mrow></math></span> the numbers <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>(</mo><mi>a</mi><mo>,</mo><mi>b</mi><mo>)</mo></mrow></math></span>, in some order,
starting with the smallest.
We consider also a function that takes the integers, puts then in length
registers.</p>
<pre class="latex-code">\newlength\cC\newlength\cD
\newcounter{cc}\newcounter{cd}
\def\assigncounter{%
 \ifnum\value{ca}&lt;\value{cb}%
  \setcounter{cc}{\value{ca}}%
  \setcounter{cd}{\value{cb}}%
 \else
  \setcounter{cc}{\value{cb}}%
  \setcounter{cd}{\value{ca}}%
  \fi}
\def\assignlength{%
 \ifnum\value{ca}&lt;\value{cb}%
  \setlength\cC{\value{ca}sp}%
  \setlength\cD{\value{cb}sp}%
 \else
  \setlength\cC{\value{cb}sp}%
  \setlength\cD{\value{ca}sp}%
  \fi}
</pre>
<p>This puts <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>(</mo><mi>c</mi><mo>,</mo><mi>c</mi><mo>-</mo><mi>d</mi><mo>)</mo></mrow></math></span> in <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>(</mo><mi>a</mi><mo>,</mo><mi>b</mi><mo>)</mo></mrow></math></span>.</p>
<pre class="latex-code">\def\subtractcounter{%
 \setcounter{cb}{\value{cd}}%
 \setcounter{ca}{\value{cc}}%
 \addtocounter{cb}{-\value{cc}}}%
\def\subtractlength{%
 \setcounter{cb}{\cD}%
 \setcounter{ca}{\cC}%
 \addtocounter{cb}{-\cC}}%
</pre>
<p>Computing the gcd is now obvious: it suffices
to call assign and subtract, until <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>c</mi><mo>=</mo><mi>d</mi></mrow></math></span> (this will happen), because the
procedures leave the gcd invariant.</p>
<pre class="latex-code">\let\printgcd\relax
\newcommand{\printgcd}[2]{%
  \setcounter{ca}{#1}\setcounter{cb}{#2}%
  \assigncounter
  \@whilenum \value{cc}&lt;\value{cd} Gcd(\arabic{cc},\arabic{cd}) = \do{%
     \subtractcounter\assigncounter}%
  \arabic{ca}.}
\printgcd{144}{272}
</pre>
<p>The same with dimensions</p>
<pre class="latex-code">\let\printgcd\relax
\newcommand{\printgcd}[2]{%
  \setcounter{ca}{#1}\setcounter{cb}{#2}%
  \assignlength
  \@whiledim \cC&lt;\cD Xgcd(\arabic{ca},\arabic{cb}) = \do{%
     \subtractlength\assignlength}%
  \arabic{ca}.}
\printgcd{144}{272}
</pre>
<p>In verbose mode, the transcript file of <i>Tralics</i> will contain lines of the
form shown here. It indicates the expansion of <samp>\@whilenum</samp>
and the internal command <samp>\@iwhilenum</samp><a id="uid2579"></a> associated to it.</p>
<pre class="log-code">\@whilenum&lt;- \ifnum \value {cc}&lt;\value {cd} Gcd(\arabic {cc},\arabic {cd}) =
\relax \subtractcounter \assigncounter \relax \@iwhilenum {\value {cc}&lt;\value
{cd} Gcd(\arabic {cc},\arabic {cd}) = \relax \subtractcounter \assigncounter
\relax }\fi
 
\@iwhilenum&lt;- \ifnum \value {cc}&lt;\value {cd} Gcd(\arabic {cc},\arabic {cd}) =
\relax \subtractcounter \assigncounter \relax \expandafter \@iwhilenum \else
\expandafter \@gobble \fi {\value {cc}&lt;\value {cd} Gcd(\arabic {cc},\arabic
{cd}) = \relax \subtractcounter \assigncounter \relax }
</pre>
<p>This looks like the following (in the case of <samp>\@whiledim</samp>, there is no
<samp>\relax</samp> after `ETC´, so that the code is compatible with LaTeX).</p>
<pre class="latex-code">\@whilenum&lt;- \ifnum TEST ACTION \relax ETC \relax
             \@iwhilenum {TEST ACTION \relax ETC \relax }\fi
 
\@iwhilenum&lt;- \ifnum TEST ACTION \relax ETC \relax
   \expandafter \@iwhilenum \else \expandafter \@gobble \fi
   {TEST ACTION \relax ETC \relax }
</pre>
<p class="nofirst noindent">We can simplify this further to the following.</p>
<pre class="latex-code">\@whilenum&lt;- \ifnum CODE \@iwhilenum {CODE}\fi
\@iwhilenum&lt;- \ifnum CODE
   \expandafter \@iwhilenum \else \expandafter \@gobble \fi  {CODE}
</pre>
<p class="nofirst noindent">You can see that, if the test is true, the first <samp>\expandafter</samp> token is
evaluated; as a consequence, everything between <samp>\else</samp> and <samp>\fi</samp> is
removed and we are left with <samp>\@iwhilenum</samp> followed by <samp>{CODE}</samp>; if the
test is false the <samp>\fi</samp> is expanded first, so that <samp>\@gobble</samp> sees the
code to gobble.</p>
</li>
<li id="uid2580"><p class="nofirst noindent"><samp>\loop</samp><a id="uid2581"></a>. This is the command described in the TeX book.
The implementation is less tricky. The following example should give
0291817161514131211101908070605040302010</p>
<pre class="latex-code">\count0=0
\def\foo{}
\def\xbar#1#2{\xdef\foo{#2#1\foo}}
\loop \advance\count0by1 \edef\xx{\ifnum\count0&lt;10 0\fi\the\count0 }%
\expandafter\xbar\xx \ifnum\count0&lt;20 \repeat
\foo
</pre>
</li>
<li id="uid2582"><p class="nofirst noindent"><samp>\setlength</samp><a id="uid2583"></a>. This command takes two argument, say <samp>\foo</samp> and
`<samp>bar</samp>´. The expansion is <samp>\foo bar\relax</samp>, unless the <span class="sansserif">calc</span>
package is loaded, case where the result is
<samp>\calc{\foo}{bar}</samp>.</p>
</li>
<li id="uid2584"><p class="nofirst noindent"><samp>\addtolength</samp><a id="uid2585"></a>. This command takes two argument, say <samp>\foo</samp>
and `<samp>bar</samp>´. The expansion is <samp>\advance\foo bar\relax</samp>,
unless the <span class="sansserif">calc</span> package is loaded, case where the result is
<samp>\calc{\advance\foo}{bar}</samp>. <i>Tralics</i> tests that the
first argument is a single token; an error is signaled
if this is <samp>\skip</samp><samp>\footins</samp>, although this is a valid length.</p>
</li>
<li id="uid2586"><p class="nofirst noindent"><samp>\setcounter</samp><a id="uid2587"></a>. This command takes two arguments, say `<samp>foo</samp>´ and
`<samp>bar</samp>´. The expansion is <samp>\global\c@foo bar\relax</samp>, unless the
<span class="sansserif">calc</span> package is loaded, case where the result is
<samp>\calc{\global\c@foo}{bar}</samp>.</p>
</li>
<li id="uid2588"><p class="nofirst noindent"><samp>\addtocounter</samp><a id="uid2589"></a>. This command takes two arguments, say `<samp>foo</samp>´
and `<samp>bar</samp>´. The expansion is
<samp>\global\advance\c@foo bar\relax</samp>, unless the
<span class="sansserif">calc</span> package is loaded, case where the result is
<samp>\calc{\global\advance\c@foo}{bar}</samp>. For these last two commands, <i>Tralics</i> tests that the first argument is a counter. For instance, if the first
argument is <samp>\bar</samp>, you get
<i>Invalid token \bar found in counter name.</i></p>
</li>
<li id="uid2590"><p class="nofirst noindent"><samp>\widthof</samp><a id="uid2591"></a>, <samp>\heightof</samp><a id="uid2592"></a>, <samp>\depthof</samp><a id="uid2593"></a>: These
commands take an argument, typeset it in a box, and return the dimension of
the box. Not implemented in <i>Tralics</i>.</p>
</li>
<li id="uid2594"><p class="nofirst noindent"><samp>\ratio</samp><a id="uid2595"></a>. This command is defined by the <span class="sansserif">calc</span> package
to be used as <samp>x/\ratio{u}{v}</samp> or <samp>x*\ratio{u}{v}</samp>. Arguments <span class="math"><i>u</i></span> and <span class="math"><i>v</i></span> are
dimensions, interpreted by the <samp>\calc</samp> function. The expression that comes
before the operator is divided by <span class="math"><i>u</i></span> and multiplied by <span class="math"><i>v</i></span> (or the
contrary). In <i>Tralics</i>, the quotient is computed with 6 digits; this is not
exactly the same algorithm as in LaTeX.</p>
</li>
<li id="uid2596"><p class="nofirst noindent"><samp>\real</samp><a id="uid2597"></a>. This command is defined by the <span class="sansserif">calc</span> package
to be used as <samp>x*\real{u}</samp> or <samp>x/\real{u}</samp>.
The argument <span class="math"><i>u</i></span> should be a real
number as in `1.5´.</p>
</li>
<li id="uid2598"><p class="nofirst noindent"><samp>\calc</samp><a id="uid2599"></a>. Examples of the calc package are given in section
<a href="#uid774" title="Counters">2.7</a>. The rules are the following: the <samp>\calc</samp> command (a
private command), takes two arguments; the first argument is a token list of
the form <samp>\global</samp><samp>\advance</samp><samp>\count0</samp>. Said otherwise, a variable,
preceded by optional prefixes. The variable must be something that reads an
integer, a dimension, or glue. The second argument is evaluated and put in
the variable (or added to the variable); assignment can be global. A primitive
is either a parenthesized expression, a call to <samp>\widthof</samp>, or the result
of the command scanint, scandim or scanglue (whichever is used depends on the
type of the variable). As a result, if a command like
<samp>\setcounter</samp><samp>{foo}</samp><samp>{bar}</samp>
is valid without the <span class="sansserif">calc</span>, it remains valid with it, and the
interpretation is the same. Moreover, expressions like <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>+</mo><mi>b</mi></mrow></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>-</mo><mi>b</mi></mrow></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>/</mo><mi>b</mi></mrow></math></span> and
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>*</mo><mi>b</mi></mrow></math></span> can be used, instead of <samp>\advance</samp>, <samp>\multiply</samp> or <samp>\divide</samp>.
In the case of multiplication or division, the second argument must be an
integer; as an extension, it can be <samp>\real</samp> or <samp>\ratio</samp>, as explained
above, in this last case, the <i>Tralics</i> result may differ slightly from the
LaTeX value.</p>
</li>
<li id="uid2600"><p class="nofirst noindent"><samp>\newboolean</samp><a id="uid2601"></a>, <samp>\provideboolean</samp><a id="uid2602"></a>.
These two commands take as argument a character string, for instance `<samp>foo</samp>´
and behave like <samp>\newif</samp><samp>\iffoo</samp>. Nothing happens for
<samp>\provideboolean</samp> if
the command <samp>\iffoo</samp> exists, but an error is signaled by <samp>\newboolean</samp>.</p>
</li>
<li id="uid2603"><p class="nofirst noindent"><samp>\setboolean</samp><a id="uid2604"></a>. This command takes two arguments. The second
argument should be, after translation, and modulo the case, `<samp>true</samp>´ or
`<samp>false</samp>´. If the first argument is `<samp>foo</samp>´, then <samp>\footrue</samp> is executed,
otherwise <samp>\foofalse</samp> is executed. This works well if the command has been
defined by <samp>\newboolean</samp><samp>{foo}</samp>.</p>
</li>
<li id="uid2605"><p class="nofirst noindent"><samp>\boolean</samp><a id="uid2606"></a>. This can be used only in an
`<samp>ifthenelse</samp>´ test. It takes an argument, say `<samp>foo</samp>´.
The test is true if
<samp>\iffoo</samp> is <samp>\iftrue</samp>, false otherwise.
This works as expected if <samp>\setboolean</samp> has been used to set the value of
`<samp>foo</samp>´.</p>
</li>
<li id="uid2607"><p class="nofirst noindent"><samp>\equal</samp><a id="uid2608"></a>. This can be used only in an
`<samp>ifthenelse</samp>´ test. It takes two arguments, puts them in commands, say
<samp>\tmpa</samp>, and <samp>\tmpb</samp>, expands then via <samp>\edef</samp>, and compares the
result via <samp>\ifx</samp>. The result can be true of false.</p>
</li>
<li id="uid2609"><p class="nofirst noindent"><samp>\isodd</samp><a id="uid2610"></a>. This can be used only in an
`<samp>ifthenelse</samp>´ test. It takes an argument, say `<samp>foo</samp>´. The test is true if
the argument is an odd number as seen by <samp>\ifodd</samp>. There are no such hacks
as in the LaTeX version.</p>
</li>
<li id="uid2611"><p class="nofirst noindent"><samp>\isundefined</samp><a id="uid2612"></a>. This can be used only in an
`<samp>ifthenelse</samp>´ test. It takes an argument, say <samp>\foo</samp>. The test is true if
it is undefined (if the argument contains more than one token, only the first
one is considered).</p>
</li>
<li id="uid2613"><p class="nofirst noindent"><samp>\lengthtest</samp><a id="uid2614"></a>. This can be used only in an
`<samp>ifthenelse</samp>´ test. It takes an argument, say `<samp>1cm=2cm</samp>´.
The test is true if <samp>\ifdim</samp> interprets this as true.</p>
</li>
<li id="uid2615"><p class="nofirst noindent"><samp>\not</samp><a id="uid2616"></a>, <samp>\and</samp><a id="uid2617"></a>, <samp>\or</samp><a id="uid2618"></a>,
<samp>\NOT</samp><a id="uid2619"></a>, <samp>\AND</samp><a id="uid2620"></a>, <samp>\OR</samp><a id="uid2621"></a>. These can be used only in an
`<samp>ifthenelse</samp>´ test as boolean connectors (but could be used elsewhere with a
different meaning). If you say <samp>\not</samp> <samp>\foo</samp> <samp>\and</samp> <samp>\not</samp>
<samp>\not</samp> <samp>\bar</samp>, the condition is true if <samp>\foo</samp> is false and
<samp>\bar</samp> is true. Note that if <samp>\foo</samp> is found true, the condition is
false, whatever follows <samp>\and</samp>, and this is not evaluated. In the same
fashion, if what precedes <samp>\or</samp> is true, what follows is not evaluated.</p>
</li>
<li id="uid2622"><p class="nofirst noindent"><samp>\(</samp>, <samp>\)</samp>. This can be used to change the order of evaluation. For
instance <samp>\not</samp> <samp>\(</samp> <samp>\foo</samp> <samp>\and</samp> <samp>\bar</samp><samp>\)</samp> negates foo-and-bar.</p>
</li>
<li id="uid2623"><p class="nofirst noindent"><samp>\ifthenelse</samp><a id="uid2624"></a>. This takes three arguments. The first is
evaluated using the command explained above.
If true, the expansion is the second argument, otherwise the third.
In a case like <samp>\ifthenelse</samp><samp>{1=3}</samp><samp>{Y}</samp><samp>{N}</samp>, the argument is
evaluated as in <samp>\ifnum</samp>.</p>
</li>
<li id="uid2625"><p class="nofirst noindent"><samp>\theorembodyfont</samp><a id="uid2626"></a>. This is a command that remembers its
argument for use with theorems. Default value is empty.</p>
</li>
<li id="uid2627"><p class="nofirst noindent"><samp>\theoremstyle</samp><a id="uid2628"></a>. This is a command that remembers its
argument for use with theorems. Default value is `<samp>plain</samp>´.</p>
</li>
<li id="uid2629"><p class="nofirst noindent"><samp>\theoremheaderfont</samp><a id="uid2630"></a>. This is a command that remembers its
argument for use with theorems. Default value is <samp>\bfseries</samp>.</p>
</li>
<li id="uid2631"><p class="nofirst noindent"><samp>\newtheorem</samp><a id="uid2632"></a>. The implementation is as described in the
first edition of <a href="#bid4" title="Goossens, Mittelbach, Samarin1993">[2]</a>. An example can be found on page <a href="#uid3542">&#10043;</a>.
Implementation uses the reserved commands
<samp>\@begintheorem</samp><a id="uid2633"></a>,
<samp>\@endtheorem</samp><a id="uid2634"></a>,
<samp>\@xbegintheorem</samp><a id="uid2635"></a>.
We comment here a part of the trace:</p>
<pre class="log-code"><span class="prenumber">1</span> [8] \theorembodyfont{\sl}
<span class="prenumber">2</span> [9] \theoremstyle{break}
</pre>
<p class="nofirst noindent">This is our first theorem. It defines an environment <samp>Cor</samp>. For some reason,
<samp>\theCor</samp> is set to <samp>\relax</samp>.</p>
<pre class="log-code"><span class="prenumber">3</span> [10] \newtheorem{Cor}{Corollary}  \relax
<span class="prenumber">4</span> {\newtheorem}
<span class="prenumber">5</span> {\newtheorem Cor}
<span class="prenumber">6</span> {\let \endCor \@endtheorem}
<span class="prenumber">7</span> {\let \theCor \relax}
<span class="prenumber">8</span> {\def \Cor -&gt;\@begintheorem {Corollary}\theCor {\sl }{Cor}{Cor}{break}}
</pre>
<p class="nofirst noindent">Here you see that a counter <samp>Cor</samp> is defined.</p>
<pre class="log-code"><span class="prenumber">9</span> {\countdef \c@Cor=\count24}
<span class="prenumber">10</span> {\def \theCor -&gt;\arabic {Cor}}
</pre>
<p class="nofirst noindent">Here we see that an optional argument can be used after the name.
The counter <samp>Exa</samp> depends on the counter <samp>section</samp>, and <samp>\theExa</samp>
uses <samp>\thesection</samp>.</p>
<pre class="log-code"><span class="prenumber">11</span> [14] \newtheorem{Exa}{Example}[section]
<span class="prenumber">12</span> {\newtheorem}
<span class="prenumber">13</span> {\newtheorem Exa}
<span class="prenumber">14</span> {\let \endExa \@endtheorem}
<span class="prenumber">15</span> {\let \theExa \relax}
<span class="prenumber">16</span> {\def \Exa -&gt;\@begintheorem {Example}\theExa {\sl }{Exa}{Exa}{plain}}
<span class="prenumber">17</span> {\countdef \c@Exa=\count25}
<span class="prenumber">18</span> {newcounter_opt}
<span class="prenumber">19</span> {newcounter_opt-&gt;\cl@section}
<span class="prenumber">20</span> \cl@section -&gt;\@elt {subsection}
<span class="prenumber">21</span> {\def \theExa -&gt;\thesection .\arabic {Exa}}
</pre>
<p class="nofirst noindent">Here we have an optional argument before the name. There is no counter <samp>Lem</samp>,
but <samp>\theLem</samp> is <samp>\theCor</samp>.</p>
<pre class="log-code"><span class="prenumber">22</span> [17] \newtheorem{Lem}[Cor]{lemma}
<span class="prenumber">23</span> {\newtheorem}
<span class="prenumber">24</span> {\newtheorem Lem}
<span class="prenumber">25</span> {\let \endLem \@endtheorem}
<span class="prenumber">26</span> {\let \theLem \relax}
<span class="prenumber">27</span> {\def \Lem -&gt;\@begintheorem {lemma}\theLem {\sl }{Lem}{Cor}{marginbreak}}
<span class="prenumber">28</span> {\def \theLem -&gt;\theCor }
</pre>
<p>This is now the use of one theorem. We have a command that reads 6 arguments,
plus the text.</p>
<pre class="log-code"><span class="prenumber">29</span> [23] \begin{Cor}
<span class="prenumber">30</span> {\begin}
<span class="prenumber">31</span> {\begin Cor}
<span class="prenumber">32</span> +stack: level + 2 for environment
<span class="prenumber">33</span> \Cor -&gt;\@begintheorem {Corollary}\theCor {\sl }{Cor}{Cor}{break}
<span class="prenumber">34</span> {\@begintheorem}
<span class="prenumber">35</span> [24]  This is a sentence typeset in the theorem environment \Lenv{Cor}.
<span class="prenumber">36</span> {Push theorem 1}
</pre>
<p>We first increment the counter (argument 5).</p>
<pre class="log-code"><span class="prenumber">37</span> \refstepcounter-&gt;\global \advance \c@Cor 1\relax {\let \@elt \@stpelt \cl@Cor }
<span class="prenumber">38</span> {\global}
<span class="prenumber">39</span> {\global\advance}
<span class="prenumber">40</span> +scanint for \c@Cor-&gt;1
<span class="prenumber">41</span> ...
</pre>
<p>This produces `Corollary 1´ from arguments 1 and 2.
A part of the transcript file has been removed, but you get the idea.
The <samp>\scshape</samp> comes from <samp>\theoremheaderfont</samp>.</p>
<pre class="log-code"><span class="prenumber">42</span> +stack: level + 3 for brace
<span class="prenumber">43</span> {\scshape}
<span class="prenumber">44</span> {font change \scshape}
<span class="prenumber">45</span> {begin-group character {}
<span class="prenumber">46</span> \theCor -&gt;\arabic {Cor}
<span class="prenumber">47</span> \arabic-&gt;\number \c@Cor
<span class="prenumber">48</span> +scanint for \number-&gt;1
<span class="prenumber">49</span> {Text:Corollary 1 }
<span class="prenumber">50</span> {font restore }
<span class="prenumber">51</span> +stack: level - 3 for brace
</pre>
<p>What follows is easy: the body is typeset using argument 3.</p>
<pre class="log-code"><span class="prenumber">52</span> {\sl}
<span class="prenumber">53</span> {font change \slshape}
<span class="prenumber">54</span> Character sequence: This is a sentence typeset in the theorem environment .
<span class="prenumber">55</span> ...
</pre>
<p>If the configuration file defines <samp>xml_theorem_name</samp>, the translation is not
the same, because the meaning of <samp>\@begintheorem</samp> has changed.</p>
<pre class="log-code"><span class="prenumber">56</span> [23] \begin{Cor}
<span class="prenumber">57</span> {\begin}
<span class="prenumber">58</span> {\begin Cor}
<span class="prenumber">59</span> +stack: level + 2 for environment
<span class="prenumber">60</span> \Cor -&gt;\@begintheorem {Corollary}\theCor {\sl }{Cor}{Cor}{break}
<span class="prenumber">61</span> {\@begintheorem}
<span class="prenumber">62</span> [24]  This is a sentence typeset in the theorem environment \Lenv{Cor}.
<span class="prenumber">63</span> {Push theorem 1}
</pre>
<p>Arguments 1, 4 and 6 are grabbed, and put in an element or attributes.
Note: arguments 5 and 6 are identical.</p>
<pre class="log-code"><span class="prenumber">64</span> {Push Head 2}
<span class="prenumber">65</span> Character sequence: Corollary.
<span class="prenumber">66</span> {Text:Corollary}
<span class="prenumber">67</span> {Pop 2: document_v theorem_v Head_t}
<span class="prenumber">68</span> {Push argument 2}
<span class="prenumber">69</span> Character sequence: Cor.
<span class="prenumber">70</span> {Text:Cor}
<span class="prenumber">71</span> {Pop 2: document_v theorem_v argument_t}
<span class="prenumber">72</span> {Push argument 2}
<span class="prenumber">73</span> Character sequence: break.
<span class="prenumber">74</span> {Text:break}
<span class="prenumber">75</span> {Pop 2: document_v theorem_v argument_t}
</pre>
<p>The counter is always incremented.</p>
<pre class="log-code"><span class="prenumber">76</span> \refstepcounter-&gt;\global \advance \c@Cor 1\relax {\let \@elt \@stpelt \cl@Cor }
</pre>
<p>End is as usual.</p>
<pre class="log-code"><span class="prenumber">77</span> {Push p 2}
<span class="prenumber">78</span> Character sequence: This is a sentence typeset in the theorem environment .
</pre>

</li>
<li id="uid2636"><p class="nofirst noindent"><samp>\begin{filecontents}</samp><samp>{name}</samp> ...<samp>\end{filecontents}</samp>.<a id="uid2637"></a>. The content of the environment is
printed verbatim on the file <samp>name</samp>, unless the file exists.
The file starts with a header, of the form</p>
<pre class="latex-code">%% LaTeX2e file `openinaux.tex' utf8-encoded
%% generated by the `filecontents' environment
%% from source `txt9' on 2006/09/06.
</pre>
<p class="nofirst noindent">In the example that follows, we use the starred version, in which case the
header is omitted. This gives a file with 6 lines and 30 characters. We shall
use it in the <samp>\read</samp> example below, where it is important that no header
be added. You can notice that the first line says that the file is UTF-8
encoded; this may be necessary in the case where the non-ascii characters
are copied, because the encoding cannot be changed.</p>
<pre class="latex-code"><span class="prenumber">1</span> \begin{filecontents*}{openinaux.tex}
<span class="prenumber">2</span> abc
<span class="prenumber">3</span>  
<span class="prenumber">4</span> \a \b {\c
<span class="prenumber">5</span> {} \d} \e
<span class="prenumber">6</span> 123
<span class="prenumber">7</span>  
<span class="prenumber">8</span> \end{filecontents*}
</pre>
<p class="nofirst noindent">The name of the environment can also be <samp>filecontents+</samp>. In the case the
header is omitted as before; moreover the file is only created virtually; this
means that no file is created on the disk; moreover, if <i>Tralics</i> reads a
filem it first checks the list of virtual files, before scanning the disk.
The philosophy is the following: the environment is a sort of provide-package:
this allows me to distribute a TeX file that uses an experimental package,
included in the source. This explains why the environment can be used only in
the preamble of the document. On the other hand, some <i>Tralics</i> test files use
some dummy packages (that provide no interesting feature), provided by this
environment, and it is important that the new package be used.</p>
</li>
<li id="uid2638"><p class="nofirst noindent"><samp>\openin</samp><a id="uid2639"></a>. This command reads a small integer, an optional
equals sign, and a file name, this is a sequence of characters not
containing a space. It reads the content of the file. If the filename if
`foo´, and no file named <span class="sansserif">foo</span> exists, then <span class="sansserif">foo.tex</span> is
tried. You can read the content via <samp>\read</samp>. If the file is not found,
empty, or completely read, it is marked as `closed´.</p>
</li>
<li id="uid2640"><p class="nofirst noindent"><samp>\closein</samp><a id="uid2641"></a>. This command reads an integer, and closes the channel
associated to the number.</p>
</li>
<li id="uid2642"><p class="nofirst noindent"><samp>\ifeof</samp><a id="uid2643"></a>. This command reads an integer, and checks if the
channel is opened for reading.</p>
</li>
<li id="uid2644"><p class="nofirst noindent"><samp>\read</samp><a id="uid2645"></a>. This command reads an integer, the keyword `<samp>to</samp>´ and a
command name. After that, it reads a line (more than one line can be read,
because the result is always balanced according to braces), and puts in the
command. The line is read from the file associated to the number, unless it
is closed, case where it is read from the terminal. We give here an
example:</p>
<pre class="latex-code">{
\openin 5=openinaux
\endlinechar=-1
\ifeof5 \badifeofatentry\fi
\read 5 to \foo\show\foo
\read 5 to \foo\show\foo
\read 5 to \foo\show\foo
\global\read 5 to \foo
\closein5\relax
\ifeof5\else\badifeofatexit\fi
}\show\foo
\ifeof3\else \badifeofnonexists\fi
</pre>
<p class="nofirst noindent">The transcript file contains the following lines. One purpose of the group
opened here is to keep the modification to the endline character local.</p>
<pre class="log-code"><span class="prenumber">1</span> [15] {
<span class="prenumber">2</span> {begin-group character {}
<span class="prenumber">3</span> +stack: level + 2 for brace
</pre>
<p class="nofirst noindent">This shows the <samp>\openin</samp> command. You can see that the file was
<span class="sansserif">openinaux.tex</span>, it contains six lines. Even in non-verbose mode,
the transcript file contains a line <i>file foo (does/does not) exist</i>
whenever a file is tested for existence.</p>
<pre class="log-code"><span class="prenumber">4</span> [16] \openin 5=openinaux
<span class="prenumber">5</span> {\openin}
<span class="prenumber">6</span> +scanint for \openin-&gt;5
<span class="prenumber">7</span> ++ file openinaux does not exist
<span class="prenumber">8</span> ++ file openinaux.tex exists
<span class="prenumber">9</span> ++ Opened file openinaux.tex; it has 6 lines
</pre>
<p class="nofirst noindent">The <samp>\endlinecharacter</samp> command specifies the value of the character that
should be inserted at the end of every line read from a file. An out-of-range
value means that no character should be inserted.</p>
<pre class="log-code"><span class="prenumber">10</span> [17] \endlinechar=-1
<span class="prenumber">11</span> {\endlinechar}
<span class="prenumber">12</span> +scanint for \endlinechar-&gt;-1
</pre>
<p class="nofirst noindent">This is a test of <samp>\ifeof</samp>; the test should be `false´ if the file has been
read.</p>
<pre class="log-code"><span class="prenumber">13</span> [18] \ifeof5 \badifeofatentry\fi
<span class="prenumber">14</span> +\ifeof1
<span class="prenumber">15</span> +scanint for \ifeof-&gt;5
<span class="prenumber">16</span> +iftest1 false
<span class="prenumber">17</span> +\fi1
</pre>
<p class="nofirst noindent">The first line of the file contains `abc´. Thus, <samp>\foo</samp> should contain
these letters, plus the endline character (there is no endline character here).
<i>Tralics</i> maintains in a special
stack positions in all active file, so that each <samp>\read</samp> pushes and pops
an item on this stack. When a package or a class file is read, some
information (the options) is stored in a table, at location <span class="math"><i>N</i></span>, for some
positive number <span class="math"><i>N</i></span>, in all other cases the number is zero. You see here that
this number is reset to zero.</p>
<pre class="log-code"><span class="prenumber">18</span> [19] \read 5 to \foo\show\foo
<span class="prenumber">19</span> {\read}
<span class="prenumber">20</span> +scanint for \read-&gt;5
<span class="prenumber">21</span> ++ Input stack ++ 1 openinaux.tex
<span class="prenumber">22</span> ++ cur_file_pos restored to 0
<span class="prenumber">23</span> ++ Input stack -- 1 openinaux.tex
<span class="prenumber">24</span> {\show}
<span class="prenumber">25</span> \foo=macro: -&gt;abc.
</pre>
<p class="nofirst noindent">The second line of the file is empty. If we did not change the value of
<samp>\endlinechar</samp>, we would have seen <samp>\par</samp> here.</p>
<pre class="log-code"><span class="prenumber">26</span> [20] \read 5 to \foo\show\foo
<span class="prenumber">27</span> {\read}
<span class="prenumber">28</span> +scanint for \read-&gt;5
<span class="prenumber">29</span> ++ Input stack ++ 1 openinaux.tex
<span class="prenumber">30</span> ++ cur_file_pos restored to 0
<span class="prenumber">31</span> ++ Input stack -- 1 openinaux.tex
<span class="prenumber">32</span> {\show}
<span class="prenumber">33</span> \foo=macro: -&gt;.
</pre>
<p class="nofirst noindent">The third line contains <samp>\a \b {\c</samp>, this is incomplete, so that
line 4, containing <samp>{} \d} \e</samp> must also be read.</p>
<pre class="log-code"><span class="prenumber">34</span> [21] \read 5 to \foo\show\foo
<span class="prenumber">35</span> {\read}
<span class="prenumber">36</span> +scanint for \read-&gt;5
<span class="prenumber">37</span> ++ Input stack ++ 1 openinaux.tex
<span class="prenumber">38</span> ++ cur_file_pos restored to 0
<span class="prenumber">39</span> ++ Input stack -- 1 openinaux.tex
<span class="prenumber">40</span> {\show}
<span class="prenumber">41</span> \foo=macro: -&gt;\a \b {\c {} \d } \e .
</pre>
<p class="nofirst noindent">This is to show that <samp>\global</samp><a id="uid2646"></a> applies to <samp>\read</samp>: the command
<samp>\foo</samp> is globally defined.</p>
<pre class="log-code"><span class="prenumber">42</span> [22] \global\read 5 to \foo
<span class="prenumber">43</span> {\global}
<span class="prenumber">44</span> {\global\read}
<span class="prenumber">45</span> +scanint for \read-&gt;5
<span class="prenumber">46</span> ++ Input stack ++ 1 openinaux.tex
<span class="prenumber">47</span> ++ cur_file_pos restored to 0
<span class="prenumber">48</span> ++ Input stack -- 1 openinaux.tex
</pre>
<p class="nofirst noindent">We close the file. Since the end-of-line character is inactive, it cannot be
used as a terminator for the number 5, thus the <samp>\relax</samp><a id="uid2647"></a>.</p>
<pre class="log-code"><span class="prenumber">49</span> [23] \closein5\relax
<span class="prenumber">50</span> {\closein}
<span class="prenumber">51</span> +scanint for \closein-&gt;5
<span class="prenumber">52</span> ++ End of file openinaux.tex
<span class="prenumber">53</span> {\relax}
</pre>
<p class="nofirst noindent">Here we check that the file is effectively closed. The <samp>\relax</samp> is
automatically inserted because the <samp>\else</samp> is seen before the number 5 has
been completely read (the <samp>\else</samp> is re-inserted).</p>
<pre class="log-code"><span class="prenumber">54</span> [24] \ifeof5\else\badifeofatexit\fi
<span class="prenumber">55</span> +\ifeof2
<span class="prenumber">56</span> +\else2
<span class="prenumber">57</span> +scanint for \ifeof-&gt;5
<span class="prenumber">58</span> +iftest2 true
<span class="prenumber">59</span> {\relax}
<span class="prenumber">60</span> +\else2
<span class="prenumber">61</span> +\fi2
</pre>
<p class="nofirst noindent">Here you can see what happens at the end of the group: the end-line character
is restored, but <samp>\foo</samp> is retained.</p>
<pre class="log-code"><span class="prenumber">62</span> [25] }\show\foo
<span class="prenumber">63</span> {end-group character }}
<span class="prenumber">64</span> +stack: retaining \foo
<span class="prenumber">65</span> +stack: restoring integer value 13 for \endlinechar
<span class="prenumber">66</span> +stack: level - 2 for brace
<span class="prenumber">67</span> {\show}
<span class="prenumber">68</span> \foo=macro: -&gt;123.
</pre>

</li>
<li id="uid2648"><p class="nofirst noindent"><samp>\openout</samp><a id="uid2649"></a>. This command reads a small integer (between 0 and 15), an optional
equals sign, and a file name, this is a sequence of characters not
containing a space. It opens the file for writing. In TeX, this is an
extension, and can be prefixed by <samp>\immediate</samp>; in <i>Tralics</i>, the action
is always immediate.</p>
</li>
<li id="uid2650"><p class="nofirst noindent"><samp>\closeout</samp><a id="uid2651"></a>. This command reads a small integer, and closes the
channel with this number. No error is signaled if the integer is not in
the range 0-15. In TeX, this is an
extension, and can be prefixed by <samp>\immediate</samp>; in <i>Tralics</i>, the action
is always immediate. If you write something on a file, and do not close it,
it is unclear what is saved on the disk when <i>Tralics</i> quits.</p>
</li>
<li id="uid2652"><p class="nofirst noindent"><samp>\write</samp><a id="uid2653"></a>. This command reads an integer <span class="math"><i>N</i></span>, and a token list and
writes the argument, after full expansion, to the stream. If <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>N</mi><mo>&lt;</mo><mn>0</mn></mrow></math></span>, this is
the transcript file; if <span class="math"><i>N</i></span> is a valid channel, to which a file is
associated via <samp>\openout</samp>, printing will go there; otherwise to the
terminal and transcript file. A special case is when the <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>N</mi><mo>=</mo><mn>18</mn></mrow></math></span> and the
`shell-escape´ switch has been given: in this case, the command is evaluated
by a shell. We use the same encoding as for the terminal and transcript file
for non-ASCII characters.</p>
<p>Here is an example. Note how we inhibit expansion of commands. Note also that
each <samp>\write</samp> command produces a single line; but newline characters can be
added via <samp>^^J</samp>.</p>
<pre class="latex-code">\immediate\openout 6=tout.tex
\immediate\write6{\def\noexpand\foo{\noexpand\endinput}}
\immediate\write6{\noexpand\foo^^J\noexpand\bar}
\immediate \closeout6 \relax
\input{tout}
</pre>
<p class="nofirst noindent">This is part of the transcript file. It shows that the file has 3 lines, a
first line that defines <samp>\foo</samp>, a line with <samp>\foo</samp> and <samp>\bar</samp>. Since
<samp>\foo</samp> is <samp>\endinput</samp><a id="uid2654"></a>, the line with <samp>\bar</samp> is not read.</p>
<pre class="log-code"><span class="prenumber">1</span> [12] \input{tout}
<span class="prenumber">2</span> {\input}
<span class="prenumber">3</span> {Push argument 1}
<span class="prenumber">4</span> Character sequence: tout.
<span class="prenumber">5</span> {Text:tout}
<span class="prenumber">6</span> {Pop 1: document_v argument_v}
<span class="prenumber">7</span> {\input tout}
<span class="prenumber">8</span> ++ Opened file tout.tex; it has 3 lines
<span class="prenumber">9</span> [1] \def \foo {\endinput }
<span class="prenumber">10</span> {\def}
<span class="prenumber">11</span> {\def \foo -&gt;\endinput }
<span class="prenumber">12</span> [2] \foo
<span class="prenumber">13</span> \foo -&gt;\endinput
<span class="prenumber">14</span> {\endinput}
<span class="prenumber">15</span> ++ End of file tout.tex
</pre>
</li>
<li id="uid2655"><p class="nofirst noindent"><samp>\IfFileExists</samp><a id="uid2656"></a>. This command takes three arguments, say <span class="math"><i>A</i></span>,
<span class="math"><i>B</i></span>, and <span class="math"><i>C</i></span>. The quantity <span class="math"><i>A</i></span> must be a character string after translation.
If there is a file with name <span class="math"><i>A</i></span>, the test is true. Otherwise, if there is a
file with name `<span class="math"><i>A</i></span>.tex´, the test is true. Otherwise, it is false. If the
test is true, the expansion is `B´, otherwise `C´.</p>
</li>
<li id="uid2657"><p class="nofirst noindent"><samp>\InputIfFileExists</samp><a id="uid2658"></a>.
This command takes three arguments, say <span class="math"><i>A</i></span>, <span class="math"><i>B</i></span>, <span class="math"><i>C</i></span>. The
behavior is like <samp>\IfFileExists</samp> <samp>{A}</samp> <samp>{B\Input{A}}</samp>
<samp>{C}</samp>.
The procedure is a bit optimised: first all arguments are read; then the
existence of the file is checked. If the file does exist, it is opened; this
has as consequence that all unread characters on the current line are saved on
a special stack, they will be read again at the end of the current file. Then
one of the token lists <span class="math"><i>B</i></span> or <span class="math"><i>C</i></span> is inserted into the list of unread tokens.</p>
<p>You can put a star after the name of the command.
This will have as a consequence that the character `@´ is a letter while
reading the content of the file. Its old category code will be restored.</p>
</li>
<li id="uid2659"><p class="nofirst noindent"><samp>\include</samp><a id="uid2660"></a>. This command takes one argument, otherwise behaves
like <samp>\input</samp>.</p>
</li>
<li id="uid2661"><p class="nofirst noindent"><samp>\input</samp><a id="uid2662"></a>. This command reads a filename as in <samp>\openin</samp> or
<samp>\openout</samp>. It is redefined by LaTeX to accept an argument.
`<samp>\input foo\input{bar}</samp>´ is valid. In the first case, tokens are read and
expanded until either a space, a non-expandable token, or <samp>\input</samp> is found.</p>
</li>
<li id="uid2663"><p class="nofirst noindent"><samp>\Input</samp><a id="uid2664"></a>. Like the LaTeX version of <samp>\input</samp>, but an
optional star can be used after the name of the command. Note that
<samp>\input*foo</samp> opens file `*foo´ while <samp>\Input*foo</samp> complains
about missing braces in the argument and opens file `f´. If a star is given,
the @ sign character is of category code 11 while reading the file
(LaTeX uses <samp>\@pushfilename</samp> and <samp>\@popfilename</samp> for managing, among
others, the category code of @ while reading packages, <i>Tralics</i> uses this
command).</p>
</li>
<li id="uid2665"><p class="nofirst noindent"><samp>\endinput</samp><a id="uid2666"></a>. This command has as effect to close the current
file (in <i>Tralics</i>, the file is read once and for all, closing the file means
ignoring all unprocessed lines).
Here is an example. This assumes that there are
no files <span class="sansserif">nohope</span>, <span class="sansserif">nohope.tex</span> neither <span class="sansserif">X.tex</span>,
but a file <span class="sansserif">taux2.tex</span> that contains a call to <samp>\mytypeout</samp>.</p>
<pre class="latex-code">{
\IfFileExists{nohope}{\errmessage{bad1}}{}
\IfFileExists{\jobname}{}{\errmessage{bad2}}
\IfFileExists{X.tex}{\errmessage{bad3}}{}
\def\bad{\errmessage{BAD}}\let\ybad\bad
\def\mytypeout#1{\def\bad{\xbad}}
\def\foo{\ifx\bad\ybad\else\let\xbad\relax\fi\let\bad\ybad}
\def\IIFE#1{\InputIfFileExists{#1}{}{}}
\IIFE{taux2}\IIFE{nohope}\foo\IIFE{taux2}
\bad
}
</pre>
<p class="nofirst noindent">We can define <span class="sansserif">taux2.tex</span> by the following code</p>
<pre class="latex-code">\begin{filecontents}{taux2.tex}
% aux file  for testing tralics
% this file contains nothing useful
\mytypeout{in file taux2.tex}
\endinput
The file should finish with a \endinput, but not on the last line.
\end{filecontents}
</pre>
<p>Assume now that <span class="sansserif">taux1.tex</span> contains</p>
<pre class="latex-code">% aux file  for testing tralics
% this file contains nothing useful
\mytypeout{in file taux1.tex}
\input taux2
% the file should finish with a comment
</pre>
<p class="nofirst noindent">The following lines should work:</p>
<pre class="latex-code">\let\mytypeout\typeout
\ifnum \tracingcommands=0 \def\mytypeout{\write -1 }\fi
\input taux1.tex\input taux2.tex
\input{taux1.tex}\input{taux2.tex}
\def\foo{\input taux1 \input taux2 }
\foo
</pre>
<p class="nofirst noindent">The transcript file contains lines like the following. Note the special
<samp>\relax</samp> token inserted by the second <samp>\input</samp> if the first is scanning
its arguments (remember: <samp>\input</samp> is expandable).</p>
<pre class="log-code">[2380] \input taux1.tex\input taux2.tex
{\input}
{insert \relax for \input}
{\input taux1.tex}
++ file taux1.tex exists
++ Input stack ++ 1 taux1.tex
++ Opened file taux1.tex; it has 5 lines
</pre>
<p class="nofirst noindent">Later on, at the end if the first file, we can see that the unread tokens are
read in the right order (first the <samp>\relax</samp>, then the <samp>\input</samp> and
finally the unread characters <samp>taux2.tex</samp>).</p>
<pre class="log-code">++ End of file taux1.tex
++ cur_file_pos restored to 0
++ Input stack -- 1 taux1.tex
{\relax}
{\input}
{\input taux2.tex}
</pre>
</li></ul>

<h2 id="uid2667">5.13. Other non-expandable commands</h2>
<ul>
<li id="uid2668"><p class="nofirst noindent"><samp>\ignorespaces</samp><a id="uid2669"></a>. Tokens are fully expanded, until a non-space
character is seen. Spaces are ignored.</p>
</li>
<li id="uid2670"><p class="nofirst noindent"><samp>\mark</samp><a id="uid2671"></a>. An expanded token list is read, the result is discarded.</p>
</li>
<li id="uid2672"><p class="nofirst noindent"><samp>\penalty</samp><a id="uid2673"></a>. An integer is read, but nothing happens.</p>
</li>
<li id="uid2674"><p class="nofirst noindent"><samp>\lastkern</samp><a id="uid2675"></a>, <samp>\lastpenalty</samp><a id="uid2676"></a>, <samp>\lastskip</samp><a id="uid2677"></a>.
Since <i>Tralics</i> does not insert kerns, penalties, or glue in the boxes, it is not
possible to fetch the last such quantity. In TeX  you can get an error of the
form <i>You can´t use `\lastpenalty´ in vertical mode</i>. In<i>Tralics</i> the message is: <i>Read only variable \lastpenalty</i>. You can use
<samp>\the</samp> to access the variable, but the result is zero (depending on the
command, this is an integer, a dimension, or glue).</p>
</li>
<li id="uid2678"><p class="nofirst noindent"><samp>\unpenalty</samp><a id="uid2679"></a>, <samp>\unkern</samp><a id="uid2680"></a>, <samp>\unskip</samp><a id="uid2681"></a>.
These are assumed to remove the last penalty, kern or glue. They are defined
as a no-op.</p>
</li>
<li id="uid2682"><p class="nofirst noindent"><samp>\shipout</samp><a id="uid2683"></a>. This reads a box number and signals an error
<i>\shipout is undefined</i>.</p>
</li>
<li id="uid2684"><p class="nofirst noindent"><samp>\setlanguage</samp><a id="uid2685"></a>. This command reads an integer and does nothing.</p>
</li>
<li id="uid2686"><p class="nofirst noindent"><samp>\@@end</samp><a id="uid2687"></a>. This command can be used to stop
translation. It closes all files. The end-document hooks are not applied.</p>
</li>
<li id="uid2688"><p class="nofirst noindent"><samp>\message</samp><a id="uid2689"></a>. This is like <samp>\write-1</samp>. The argument is expanded
and printed.</p>
</li>
<li id="uid2690"><p class="nofirst noindent"><samp>\typeout</samp><a id="uid2691"></a>. This is like <samp>\write17</samp>. The argument is expanded
and printed on the terminal and the transcript file.</p>
</li>
<li id="uid2692"><p class="nofirst noindent"><samp>\errmessage</samp><a id="uid2693"></a>. This is as above, but an error is signaled. For
instance <samp>\errmessage</samp> <samp>{This</samp> <samp>\iftrue</samp> <samp>can</samp> <samp>\else</samp>
<samp>cannot</samp> <samp>\fi</samp> <samp>happen}</samp>
will give: <i>Error signaled at line 1: This can happen</i>.</p>
</li>
<li id="uid2694"><p class="nofirst noindent"><samp>\noboundary</samp><a id="uid2695"></a>. Unimplemented.</p>
</li>
<li id="uid2696"><p class="nofirst noindent"><samp>\insert</samp><a id="uid2697"></a><samp>{arg}</samp>. Unimplemented, an error is signaled.</p>
</li>
<li id="uid2698"><p class="nofirst noindent"><samp>\vadjust</samp><a id="uid2699"></a>. Unimplemented, an error is signaled.</p>
</li>
<li id="uid2700"><p class="nofirst noindent"><samp>\unhbox</samp><a id="uid2701"></a>, <samp>\unvbox</samp><a id="uid2702"></a>, <samp>\unhcopy</samp><a id="uid2703"></a>,
<samp>\unvcopy</samp><a id="uid2704"></a>. These commands read a box number, say N.
The <samp>\unhbox</samp> command calls <samp>\leavevmode</samp> (in LaTeX, <samp>\leavevmode</samp>
uses <samp>\unhcopy</samp>). A copy of the box register <span class="math"><i>N</i></span> is put on the main
tree. In the case of <samp>\unhbox</samp> and <samp>\unvbox</samp>, the box is cleared.</p>
</li>
<li id="uid2705"><p class="nofirst noindent"><samp>\centering</samp><a id="uid2706"></a>. This command changes the current value of the
internal centering number, and adds an attribute to the current
paragraph (the numbers mean normal, centered, flush left, flush right,
quoted).</p>
</li>
<li id="uid2707"><p class="nofirst noindent"><samp>\nocentering</samp><a id="uid2708"></a>. This sets the internal centering number to
`normal´. The next paragraph will not have a centering attribute.</p>
</li>
<li id="uid2709"><p class="nofirst noindent"><samp>\href</samp><a id="uid2710"></a>. The command takes two arguments, say `foo´ and
`bar´. The translation is an <tt class="txt">&lt;xref&gt;</tt> element, containing <samp>\bar</samp>, with
an attribute <span class="sansserif">url</span>, with value foo. The tilde character can be
inserted in the first argument using <samp>\~</samp> (in the second
argument, it produces an accent).</p>
</li>
<li id="uid2711"><p class="nofirst noindent"><samp>\htmladdnormallink</samp><a id="uid2712"></a>, <samp>\Href</samp><a id="uid2713"></a>.
Like <samp>\href</samp>, but the order of arguments is changed.</p>
</li>
<li id="uid2714"><p class="nofirst noindent"><samp>\htmladdnormallinkfoot</samp><a id="uid2715"></a>.
Like the previous (but the link is not placed in a footnote).</p>
</li>
<li id="uid2716"><p class="nofirst noindent"><samp>\url</samp><a id="uid2717"></a>. This takes one argument. Normally
<samp>\url</samp><samp>{foo}</samp> is the same as <samp>\href</samp><samp>{foo}</samp><samp>{foo}</samp>.
However, the element is translated using the value of <samp>\urlfont</samp>, which is
empty by default. In a construction like
<samp>\href</samp><samp>{foo}</samp><samp>{\url{bar}}</samp>,
the <samp>\url</samp> command does nothing, as well as in the
case <samp>\url</samp><samp>{\rrrt{foo}}</samp>. Characters tilde, underscore and
sharp sign in the argument are handled as ordinary characters.</p>
</li>
<li id="uid2718"><p class="nofirst noindent"><samp>\rrrt</samp><a id="uid2719"></a>. This command takes one argument.
Its translation is <samp>\url</samp><samp>{prefix/foo.html}</samp>, if the argument is foo, where the
prefix is `http://www.inria.fr/rrrt´. This was useful for the Raweb, but
since 2006, no new documents are put on that server.</p>
</li>
<li id="uid2720"><p class="nofirst noindent"><samp>\caption</samp><a id="uid2721"></a>. This command takes an optional argument and a
required argument. The optional argument is ignored. The result is a
<tt class="txt">&lt;caption&gt;</tt> element. It can contain paragraphs. An implicit
<samp>\nocentering</samp> command is executed.</p>
</li>
<li id="uid2722"><p class="nofirst noindent"><samp>\footnote</samp><a id="uid2723"></a>. This command takes one argument.
The result is a <tt class="txt">&lt;note&gt;</tt> element. It can contain paragraphs. An implicit
<samp>\nocentering</samp> command is executed. If the result contains a single
<tt class="txt">&lt;p&gt;</tt> element, the <tt class="txt">&lt;p&gt;</tt> will be replaced by its content (unless in
hack mode).</p>
</li>
<li id="uid2724"><p class="nofirst noindent"><samp>\thanks</samp><a id="uid2725"></a> can be used to attach a footnote to an author on a
title page; is the same as <samp>\footnote</samp> in <i>Tralics</i>.</p>
</li>
<li id="uid2726"><p class="nofirst noindent"><samp>\anchor</samp><a id="uid2727"></a>. 
Translation is an empty <tt class="txt">&lt;anchor&gt;</tt> element that can
be used as target of a <samp>\label</samp>.</p>
<p>If you say <samp>\label</samp><samp>{xx}</samp> followed by <samp>\ref</samp><samp>{xx}</samp>, there
will be a link from the ref to the anchor. The question is: how to implement
this? there is no notion of anchor in TeX, the only possibility is to use the
<samp>\special</samp> command, a whatsit, that is interpreted by dvi processors.
In <i>Tralics</i>, an
anchor is an element that has an attribute <span class="sansserif">id</span> with some value, and the
link is a <tt class="txt">&lt;ref&gt;</tt> element whose <span class="sansserif">target</span> attribute is this value; in
<span class="sansserif">HTML</span>, a link is a <tt class="txt">&lt;a&gt;</tt> element with a <span class="sansserif">href</span> attribute, and an
anchor is <tt class="txt">&lt;a&gt;</tt> element with a <span class="sansserif">name</span> attribute, or any element with
an <span class="sansserif">id</span> attribute <span class="sansserif">id</span>.</p>
<p>In LaTeX, an anchor is defined by a number and a page, but the hyperref
package makes this more complicated; for the label associated to the current
section, we have five values, the number, the page, the title of the section,
an identifier `section.5.12´ and an empty list. These quantities are written
in the aux file, and read again. The command <samp>\refstepcounter</samp>
defines (locally) <samp>\@currentlabel</samp>, and this contains the number used
above. The page number is computed when the whatsit is effectively written in
the dvi. In the pdf version, if you click on the number, you will go to the
page containing the anchor, i.e., the title of the section.</p>
<p>This mechanism is different in <i>Tralics</i>, because we store only one quantity,
not two or five. We assume that section numbers, equation numbers, etc., are
computed by the <span class="sansserif">XML</span> processor (thus, there is no need for two passes and an
auxiliary file). A potential anchor is defined for each section, equation,
footnote, etc., this is the same as the action of <samp>\refstepcounter</samp>.
When a document
like this one is converted from <span class="sansserif">XML</span> to <span class="sansserif">HTML</span>, the style sheet can compute
the equation number, section number, etc., depending on the type of the anchor.<a id="uid2728" href="#note68" title="Dummy footnote here"><small>(note: </small>&#10163;<small>)</small></a>
If a precise location is needed, you can use <samp>\pageref</samp>, a command that was
not originally accepted by <i>Tralics</i>, since no page number is constructed.
If you want to refer, in the <span class="sansserif">XML</span> version, to a precise point, you must also
add an anchor at the right place, using <samp>\anchor</samp>.
<a id="uid2729"></a>
Here are some examples: a link to this item <a href="#uid2727">&#10043;</a> (<i>Tralics</i> adds an
anchor to each item, in LaTeX, this works only for enumerations, in fact,
environments that increment a counter),
a link to this anchor <a href="#uid2729">&#10043;</a> (defined in the non-LaTeX version at the
start of this sentence), a link to the footnote <a href="#uid2728" title="Dummy footnote here">68</a>,
a citation <a href="#bid3" title="Knuth1984">[4]</a>, and a reference to a section <a href="#uid2667" title="Other non-expandable commands">5.13</a>;
and two uses of <samp>\pageref</samp>: <a href="#uid2727">&#10043;</a> and <a href="#uid2667" title="Other non-expandable commands">5.13</a>. In this
case, the anchors are the same, but not the page numbers, this is strange.</p>
</li>
<li id="uid2730"><p class="nofirst noindent"><samp>\label</samp><a id="uid2731"></a>. This command takes an argument, and defines it as the
name of an anchor to be used by <samp>\ref</samp>. The anchor is an <span class="sansserif">id</span>
attribute of the element associated to a
section command, a footnote, an item in an enumeration, a formula, a figure,
etc. The translation is empty.</p>
</li>
<li id="uid2732"><p class="nofirst noindent"><samp>\eqref</samp><a id="uid2733"></a>. Like <samp>\ref</samp>, but parentheses are put around the
reference.</p>
</li>
<li id="uid2734"><p class="nofirst noindent"><samp>\ref</samp><a id="uid2735"></a>. This takes an argument, that must be defined bay
<samp>\label</samp>. The translation is a <tt class="txt">&lt;ref&gt;</tt> element.</p>
</li>
<li id="uid2736"><p class="nofirst noindent"><samp>\pageref</samp><a id="uid2737"></a>. Like <samp>\ref</samp>, but the element has an attribute
<span class="sansserif">rend</span> with value `page´.</p>
</li>
<li id="uid2738"><p class="nofirst noindent"><samp>\part</samp><a id="uid2739"></a>, <samp>\chapter</samp><a id="uid2740"></a>,
<samp>\section</samp><a id="uid2741"></a>, <samp>\subsection</samp><a id="uid2742"></a>, <samp>\subsubsection</samp><a id="uid2743"></a>
<samp>\paragraph</samp><a id="uid2744"></a>, <samp>\subparagraph</samp><a id="uid2745"></a>. To each command is assigned an
integer between 0 and 6. It is decremented by 1 if the leading section is
`chapter´, by 2 if it is `section´ (negative numbers are replaced by 0). If
this gives <span class="math"><i>N</i></span>, the result is a <tt class="txt">&lt;divN&gt;</tt> element. The command takes an
argument, the title, that is translated in a <tt class="txt">&lt;head&gt;</tt> element. Before the
title, an optional argument is ignored. The title is
printed in the terminal if this is at highest level.
A section can be the target of a <samp>\label</samp>. The element will have
the attribute pair <span class="sansserif">rend</span>=´nonumber´, in the case of a starred section
(i.e. if either a star has been given after the command name, or in case of
<samp>\chapter</samp> in <samp>\frontmatter</samp> or <samp>\backmatter</samp>).</p>
</li>
<li id="uid2746"><p class="nofirst noindent"><samp>\endsec</samp><a id="uid2747"></a>. This command takes an argument. Nothing happens if it
is empty. If the first argument is one of the 7 section commands described
above, it will be terminated; more precisely, if this section command has
number <span class="math"><i>N</i></span>, then all divisions with number <span class="math"><i>N</i></span> and greater will be
terminated.</p>
</li>
<li id="uid2748"><p class="nofirst noindent"><samp>\mainmatter</samp><a id="uid2749"></a>, <samp>\frontmatter</samp><a id="uid2750"></a>,
<samp>\backmatter</samp><a id="uid2751"></a>. Translation is an element with the same name,
one of <tt class="txt">&lt;mainmatter&gt;</tt>,
<tt class="txt">&lt;frontmatter&gt;</tt>, <tt class="txt">&lt;backmatter&gt;</tt>. Using these commands sets a global
variable that says whether or not chapters have a default star. These commands
execute <samp>\endsec</samp><samp>\part</samp>. In LaTeX, some additional actions are
performed (like: start a new page, change pagenumbering, etc).
No counter is modified. Example:</p>
<pre class="latex-code">\mainmatter
\section{A}\subsection{B}
\paragraph{C} x \label{a1}
\paragraph{D}  \label{a2}x\label{a3}
\endsec{\subsection}
\paragraph{E} x\footnote{x\label{a4}}
\endsec{\part}
\paragraph{F} x
\ref{a1} \ref{a2}\ref{a3}\ref{a4}
\section{G}
\paragraph{H} x
\backmatter
\chapter{I} y
</pre>
<p class="nofirst noindent">In the configuration file, we have given alternate names for all elements.
The book class is used, so that <samp>\section</samp> is a div2.
When translating, <i>Tralics</i> prints
<i>Translating section command div2: A</i>, then
<i>Translating section command div2: G</i>, then
<i>Translating section command div1: I</i>. After that, it will not print
section titles anymore (however, all titles are printed in the transcript file).
Translation is</p>
<pre class="xml-code">&lt;MainMatter&gt;
  &lt;Section id='uid1'&gt;&lt;Head&gt;A&lt;/Head&gt;
    &lt;Subsection id='uid2'&gt;&lt;Head&gt;B&lt;/Head&gt;
      &lt;Paragraph id='uid3'&gt;&lt;Head&gt;C&lt;/Head&gt;
        &lt;p&gt;x&lt;/p&gt;
      &lt;/Paragraph&gt;
      &lt;Paragraph id='uid4'&gt;&lt;Head&gt;D&lt;/Head&gt;
        &lt;p&gt;x&lt;/p&gt;
      &lt;/Paragraph&gt;
    &lt;/Subsection&gt;
    &lt;Paragraph id='uid5'&gt;&lt;Head&gt;E&lt;/Head&gt;
      &lt;p&gt;x&lt;Footnote id='uid6' Place='as a note'&gt;&lt;p&gt;x&lt;/p&gt;
              &lt;/Footnote&gt;&lt;/p&gt;
    &lt;/Paragraph&gt;
  &lt;/Section&gt;
  &lt;Paragraph id='uid7'&gt;&lt;Head&gt;F&lt;/Head&gt;
    &lt;p&gt;x &lt;ref target='uid3'/&gt;
      &lt;ref target='uid4'/&gt;&lt;ref target='uid4'/&gt;&lt;ref target='uid6'/&gt;
    &lt;/p&gt;
  &lt;/Paragraph&gt;
  &lt;Section id='uid8'&gt;&lt;Head&gt;G&lt;/Head&gt;
    &lt;Paragraph id='uid9'&gt;&lt;Head&gt;H&lt;/Head&gt;
      &lt;p&gt;x&lt;/p&gt;
    &lt;/Paragraph&gt;
  &lt;/Section&gt;
&lt;/MainMatter&gt;
&lt;BackMatter&gt;
  &lt;Chapter id='uid10' rend='nonumber'&gt;&lt;Head&gt;I&lt;/Head&gt;
    &lt;p&gt;y&lt;/p&gt;
...
</pre>
</li>
<li id="uid2752"><p class="nofirst noindent"><samp>\aparaitre</samp><a id="uid2753"></a>, <samp>\toappear</samp><a id="uid2754"></a>.
These two commands are for the Raweb. They translate as `à paraître´ (with the
correct spelling) or `to appear´, depending on the current language.</p>
</li>
<li id="uid2755"><p class="nofirst noindent"><samp>\xmllatex</samp><a id="uid2756"></a>. This is a command that takes two arguments, and
ignores the second. In the first, commands are replaced by their names.
For instance <samp>\xmllatex</samp><samp>{\&amp;\#x25;}</samp><samp>{etc}</samp> translates as <tt class="txt">&amp;#x25;</tt>.
Normally, the translation of <samp>\&amp;</samp> is <tt class="txt">&amp;amp;</tt>.</p>
</li>
<li id="uid2757"><p class="nofirst noindent"><samp>\xmlelt</samp><a id="uid2758"></a>. This commands takes two arguments, say foo and
bar. The translation is a <tt class="txt">&lt;foo&gt;</tt> element containing the translation of
bar. The command calls <samp>\leavevmode</samp>.</p>
</li>
<li id="uid2759"><p class="nofirst noindent"><samp>\xmlemptyelt</samp><a id="uid2760"></a>. This commands takes one argument, say foo.
The translation is an empty <tt class="txt">&lt;foo/&gt;</tt> element (in fact a string that prints
like an element, you cannot add attributes to it).
The command does not call <samp>\leavevmode</samp>.</p>
</li>
<li id="uid2761"><p class="nofirst noindent"><samp>\xbox</samp><a id="uid2762"></a>. This commands takes two arguments, say foo and
bar. The translation is a <tt class="txt">&lt;foo&gt;</tt> element containing the translation of
bar. This command behaves like <samp>\hbox</samp>, in that it does not read the
second argument, so that category code changes are allowed.
The token list <samp>\everyxbox</samp><a id="uid2763"></a> is inserted in the input stream after the
first argument and opening brace of the second one have been read.</p>
</li>
<li id="uid2764"><p class="nofirst noindent"><samp>\vbox</samp><a id="uid2765"></a>, <samp>\hbox</samp><a id="uid2766"></a>. These commands read their argument as
described in the TeX book, but specification arguments are ignored;
the result is an unnamed <span class="sansserif">XML</span> element.
The token list <samp>\everyvbox</samp><a id="uid2767"></a> or <samp>\everyhbox</samp><a id="uid2768"></a> is inserted in the
input stream after the opening brace has been read.</p>
</li>
<li id="uid2769"><p class="nofirst noindent"><samp>\leaders</samp><a id="uid2770"></a>, <samp>\cleaders</samp><a id="uid2771"></a>, <samp>\xleaders</samp><a id="uid2772"></a>.
These commands read a box or a rule, that is supposed to be followed by
some glue. Two non trivial
examples are (TeXbook exercise 21.7 and 21.8)</p>
<pre class="latex-code">\null\nobreak\leaders\hrule\hskip10pt plus1filll\ \par
$$\hbox to 2.5in{\cleaders
  \vbox to .5in{\cleaders\hbox{\TeX}\vfil}\hfil}$$
</pre>
<p class="nofirst noindent">Let´s explain the second example first. We have vertical and horizontal
leaders; the result is rectangle of size 2.5 times 0.5 inches containing
four rows and nine columns of the TeX logo. The size occupied by the logos
is defined by the size of the glue; in this example, the glue is <samp>\vfil</samp>, or
<samp>\hfil</samp>, the size of which is the size of the box, as computed by
TeX when the box is packaged; in the example, the size of the box is
explicit. Due to limitations of MathML, when <i>Tralics</i> sees a box in math
mode, it signals an error for every non-character in the box; for this reason
the example will not compile, and we give below the translation without the
dollar signs. As explained above, <i>Tralics</i> reads the width of the box, but
ignores it; in the same manner, it is unable to compute the size of the logo,
thus cannot know how many copies to insert.</p>
<p>The first example is interesting: the idea is to create a rule, that has at
least ten points, reaches the right margin (as a consequence the size of the
rule is known only when the current paragraph is split into lines).
For this reason, the glue
specification is: ten point plus enough to go to fill the line. The non
trivial point is that the last line of a paragraph does in general non reach
the right margin:
this is because TeX adds <samp>\parfillskip</samp> glue, so that a filll with three
Ls is required; moreover, since a end-of-paragraph is generally obtained by a blank
line, and the end-of-line character of the line before the blank one produces
some glue, TeX inserts <samp>\unhskip</samp>, even if the end-of-paragraph is given
by an explicit <samp>\par</samp>; this one can remove the
leader glue, so that a backslash-space is inserted in the example.
For all these reasons, implementing leaders properly is nearly impossible; the
leader command interpreter of <i>Tralics</i> does not read the glue that follows
(and you will never see an error like <i>Leaders not followed by proper
glue</i>). The translation given here shows that translation of glue commands
could be better.</p>
<pre class="xml-code">&lt;leaders&gt;&lt;rule depth='0.0pt' height='0.4pt'/&gt;&lt;/leaders&gt;
    &lt;p&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&lt;/p&gt;
&lt;cleaders&gt;&lt;cleaders&gt;&lt;TeX/&gt;&lt;/cleaders&gt;&lt;vfil/&gt;&lt;/cleaders&gt;&lt;hfil/&gt;
</pre>
</li>
<li id="uid2773"><p class="nofirst noindent"><samp>\moveleft</samp><a id="uid2774"></a>, <samp>\moveright</samp><a id="uid2775"></a>. These commands read a
dimension and a box; but the box is not moved. Compare with <samp>\raise</samp> and
<samp>\lower</samp>.</p>
</li>
<li id="uid2776"><p class="nofirst noindent"><samp>\vtop</samp><a id="uid2777"></a>. This is the same as <samp>\vbox</samp>.</p>
</li>
<li id="uid2778"><p class="nofirst noindent"><samp>\vsplit</samp><a id="uid2779"></a>. You can say <samp>\vsplit0 to 3cm</samp>. The result is the same
as <samp>\copy0</samp>.</p>
</li>
<li id="uid2780"><p class="nofirst noindent"><samp>\lastbox</samp><a id="uid2781"></a>. This returns the last element on the stack, unless
the top-stack is a character, case where the result is the empty
box. Example:</p>
<pre class="latex-code">\def\dupbox{\setbox0=\lastbox \copy0 \box0 }
\xbox{foo}{ok} and \dupbox; \xbox{bar}{ok}\dupbox.
</pre>
<p class="nofirst noindent">The translation is:</p>
<pre class="xml-code">&lt;foo&gt;ok&lt;/foo&gt;&lt;p&gt;and ; &lt;bar&gt;ok&lt;/bar&gt;&lt;bar&gt;ok&lt;/bar&gt;.
</pre>
</li>
<li id="uid2782"><p class="nofirst noindent"><samp>\begin{rawxml}</samp> ...<samp>\end{rawxml}</samp>. This is like a verbatim
environment, but special characters like <samp>&amp;</samp> and <samp>&lt;</samp> are not escaped. For
instance</p>
<pre class="latex-code">let\verbatimfont\relax
\begin{verbatim}
{\let\rm\bf \bf totoé}
&lt;!--this is a comment --&gt;
&amp;Dollar; not &amp;Equals; &amp;Euro;
  \end{verbatim}
% See comment below
\begin{rawxml}
{\let\rm\bf \bf totoé}
&lt;!--this is a comment --&gt;
&amp;Dollar; not &amp;Equals; &amp;Euro;
\end{rawxml}
</pre>
<p class="nofirst noindent">translates (with the `nozerowidthspace´ switch) to</p>
<pre class="xml-code">&lt;p noindent='true'&gt;&lt;hi rend='tt'
      &gt;{\let\rm\bf&amp;#xa0;\bf&amp;#xa0;toto&amp;#xe9;}&lt;/hi&gt;&lt;/p&gt;
&lt;p noindent='true'&gt;&lt;hi rend='tt'
      &gt;&amp;lt;!--this&amp;#xa0;is&amp;#xa0;a&amp;#xa0;comment&amp;#xa0;--&amp;gt;&lt;/hi&gt;&lt;/p&gt;
&lt;p noindent='true'&gt;&lt;hi rend='tt'&gt;&amp;amp;Dollar;&amp;#xa0;not&amp;#xa0;&amp;amp;
Equals;&amp;#xa0;&amp;amp;Euro;&lt;/hi&gt;&lt;/p&gt;
&lt;p noindent='true'&gt;{\let\rm\bf \bf toto&amp;#xe0;}
&lt;!--this is a comment --&gt;
&amp;Dollar; not &amp;Equals; &amp;Euro;&lt;/p&gt;
</pre>
</li>
<li id="uid2783"><p class="nofirst noindent"><samp>\begin{xmlelement}</samp> ... <samp>\end{xmlelement}</samp>. Like <samp>\xbox</samp>, but this is
an environment.<a id="uid2784"></a>
You can put a star after the name of the environment. The effect is the
following. If no star is used, then horizontal mode is entered before
creating the element. Otherwise, the element just created is typeset in
vertical mode. If a `+´ sign is used instead of `*´,
then <samp>\leavevmode</samp> is called, translation starts in vertical
mode. For instance</p>
<pre class="latex-code">\begin{xmlelement}{foo1} A  \end{xmlelement}\par
\begin{xmlelement*}{foo2} B  \end{xmlelement*}\par
\begin{xmlelement+}{foo3} C  \end{xmlelement+}\par
</pre>
<p class="nofirst noindent">translates as</p>
<pre class="xml-code">&lt;p&gt; &lt;foo1&gt;   A &lt;/foo1&gt;  &lt;/p&gt;
    &lt;foo2&gt;&lt;p&gt;B &lt;/p&gt; &lt;/foo2&gt;
&lt;p&gt; &lt;foo3&gt;&lt;p&gt;C &lt;/p&gt;&lt;/foo3&gt;&lt;/p&gt;
</pre>
</li>
<li id="uid2785"><p class="nofirst noindent"><samp>\AddAttToCurrent</samp><a id="uid2786"></a>. This command takes two arguments, and
constructs an attribute pair that will be added to the current element.</p>
</li>
<li id="uid2787"><p class="nofirst noindent"><samp>\AddAttToLast</samp><a id="uid2788"></a>. This command takes two arguments, and
constructs an attribute pair that will be added to the last created element.</p>
</li>
<li id="uid2789"><p class="nofirst noindent"><samp>\addattributestodocument</samp><a id="uid2790"></a>. This command takes two arguments,
and constructs an attribute pair that will be added to the main document
element.
This is an example:</p>
<pre class="latex-code">\begin{xmlelement}{foo}
\begin{xmlelement}{subelt1}
texte1
\end{xmlelement}
\begin{xmlelement}{subelt2}
texte2
\end{xmlelement}
\AddAttToLast{sb2-att}{value1}%
\AddAttToLast{sb3-att}{}%
\AddAttToCurrent{foo-att}{att-value''}%
\end{xmlelement}
</pre>
<p class="nofirst noindent">The translation is</p>
<pre class="xml-code">&lt;foo foo-att='att-value&amp;apos;&amp;apos;'&gt;&lt;subelt1&gt;texte1
&lt;/subelt1&gt;
&lt;subelt2 sb3-att='' sb2-att='value1'&gt;texte2
&lt;/subelt2&gt;
&lt;/foo&gt;
</pre>
<p class="nofirst noindent">The commands described above can be followed by a `*´. In that case, an
existing attribute will be overwritten. Example:</p>
<pre class="latex-code">\AddAttToCurrent{x}{1} % ignored
\AddAttToCurrent{y}{2} % ok
\AddAttToCurrent*{x}{3} % ok
\AddAttToCurrent{y}{4} % ignored
</pre>
</li>
<li id="uid2791"><p class="nofirst noindent"><samp>\XMLaddatt</samp><a id="uid2792"></a>. This command takes an optional star, an optional
integer, and two arguments, and constructs an attribute pair that will be
added to the element defined by the number. If no number is given, the current
element is used. The main <span class="sansserif">XML</span> element has id number one,
the bibliography has number three, the table of contents has number four,
the index has number five. You can add an attribute to these elements before
their creation (for instance in a package).
Never use number two.</p>
<p>The following example shows usage.</p>
<pre class="latex-code">{\everyxbox{Vest}
\setbox0=\xbox{foo}{1\xbox{bar}{2} %
   \XMLaddatt[\the\XMLlastid]{x}{1}%
   \XMLaddatt[\the\XMLcurrentid]{y}{2}%
   \XMLaddatt{y}{22}3}
\showbox0
}
{\everyxbox{West}
\setbox0=\xbox{foo}{1\xbox{bar}{2} %
   \XMLaddatt*[\the\XMLlastid]{x}{1}%
   \XMLaddatt*[\the\XMLcurrentid]{y}{2}%
   \XMLaddatt*{y}{4}3}
\showbox0
}
</pre>
<p class="nofirst noindent">it should print</p>
<pre class="xml-code">&lt;foo y='2'&gt;Vest1&lt;bar x='1'&gt;Vest2&lt;/bar&gt; 3&lt;/foo&gt;
&lt;foo y='4'&gt;West1&lt;bar x='1'&gt;West2&lt;/bar&gt; 3&lt;/foo&gt;
</pre>
</li>
<li id="uid2793"><p class="nofirst noindent"><samp>\begin{glossaire}</samp> ...<samp>\end{glossaire}</samp><a id="uid2794"></a>
This is a command for the raweb. It contains <samp>\glo</samp><a id="uid2795"></a> commands.</p>
</li>
<li id="uid2796"><p class="nofirst noindent"><samp>\usecounter</samp><a id="uid2797"></a>. An error is signaled if the argument is not the
name of a counter. Otherwise this becomes the counter to be used by the
current list. It is reset to zero.</p>
</li>
<li id="uid2798"><p class="nofirst noindent"><samp>\labelitemi</samp><a id="uid2799"></a>, <samp>\labelitemii</samp><a id="uid2800"></a>, <samp>\labelitemiii</samp><a id="uid2801"></a>,
<samp>\labelitemiv</samp><a id="uid2802"></a>. This is used by LaTeX as default value of optional
argument of <samp>\item</samp> in an itemize environment. Not used by <i>Tralics</i>.</p>
</li>
<li id="uid2803"><p class="nofirst noindent"><samp>\begin{itemize}</samp>, <samp>\begin{description}</samp>, <samp>\begin{enumerate}</samp>,
<samp>\begin{list}</samp><a id="uid2804"></a>.
These commands behave as in LaTeX. The semantics
changed in version 2.8. A counter may be used, via
<samp>\usecounter</samp>. This is <samp>enumi</samp><a id="uid2805"></a>,
<samp>enumii</samp><a id="uid2806"></a>, <samp>enumiii</samp><a id="uid2807"></a>,
<samp>enumiv</samp><a id="uid2808"></a>, depending on the enumeration level
(the last counter is used in case the nesting level is too high). No
counter is used in other cases.
If the environment is <samp>list</samp>, then two
argument are read. The first argument is put in <samp>\@itemlabel</samp><a id="uid2809"></a>, the second
is read again, and evaluated. It might contain a call to <samp>\usecounter</samp>.
If the environment is not <samp>list</samp>, then <samp>\@itemlabel</samp> is relax.
The translation is <tt class="txt">&lt;list&gt;</tt> element, with an attribute
<span class="sansserif">rend</span>=´simple´. It could be description or enumerate. In the case of
<samp>list</samp>, it is description, but this can be changed in a configuration
file. The second argument of the environment could also change the value of
the attribute.</p>
<p>We give here an example, to be used later.
The first argument of the list environment explains how to typeset the value
of the counter. The second argument uses <samp>\usecounter</samp>. The outer list
environment saves/restores its counter into the <samp>exx</samp> counter.</p>
<pre class="latex-code">\newcounter{exx}
\newcounter{xnumi}
\newcounter{xnumii}
\def\exe{\begin{list}{\thexnumi}{\usecounter{xnumi}%
   \setcounter{xnumi}{\value{exx}}}}
\def\endexe{\setcounter{exx}{\value{xnumi}}\end{list}}
\def\xlist{\begin{list}{\thexnumi.\alph{xnumii}}{\usecounter{xnumii}}}
\def\endxlist{\end{list}}
</pre>
</li>
<li id="uid2810"><p class="nofirst noindent"><samp>\item</samp><a id="uid2811"></a>, <samp>\@item</samp><a id="uid2812"></a>.
This command takes an optional argument, that will
produce a <tt class="txt">&lt;label&gt;</tt> element. What follows <samp>\item</samp> is translated in a
<tt class="txt">&lt;item&gt;</tt> element. The end of the element is defined by a following item
or the end of the list (thus, you should use this command only in a list).</p>
<p>In the case where <samp>\usecounter</samp> has defined a counter for the current list,
it will be globally incremented. If no optional argument is given, but if
<samp>\@itemlabel</samp><a id="uid2813"></a> is not <samp>\relax</samp>, the value of this command (which had better be a
user-defined command without argument) is used instead. It will be translated
in a group. This means that in a case like <samp>\item[{\bf x}]</samp>,
only <samp>x</samp> is in bold face. The translation is something like
<tt class="txt">&lt;label&gt;foo&lt;/label&gt;</tt>. In the case of <samp>\item</samp>, this is added to the <span class="sansserif">XML</span> tree before the <tt class="txt">&lt;item&gt;</tt> element. In the case of <samp>\@item</samp>, the content is
added as attribute label to the item element (font changes are forbidden in a
case like that). Example</p>
<pre class="latex-code">\makeatletter\let\item\@item\makeatother
\begin{exe}
\item a
\item b
\end{exe}
\begin{exe}
\item c
\begin{xlist}
\item c1\label{xx}
\item c2
\end{xlist}
\item d
\end{exe}
</pre>
<p>Translation is given here.</p>
<pre class="xml-code">&lt;list type='description'&gt;
&lt;item id='uid1' label='1'&gt;&lt;p noindent='true'&gt;a&lt;/p&gt;
&lt;/item&gt;
&lt;item id='uid2' label='2'&gt;&lt;p noindent='true'&gt;b&lt;/p&gt;
&lt;/item&gt;&lt;/list&gt;
&lt;list type='description'&gt;
&lt;item id='uid3' label='3'&gt;&lt;p noindent='true'&gt;c&lt;/p&gt;
&lt;list type='description'&gt;
&lt;item id='uid4' label='3.a'&gt;&lt;p noindent='true'&gt;c1&lt;/p&gt;
&lt;/item&gt;
&lt;item id='uid5' label='3.b'&gt;&lt;p noindent='true'&gt;c2&lt;/p&gt;
&lt;/item&gt;&lt;/list&gt;
&lt;/item&gt;
&lt;item id='uid6' label='4'&gt;&lt;p noindent='true'&gt;d&lt;/p&gt;
&lt;/item&gt;&lt;/list&gt;
</pre>
<p>If you make a reference to label xx, this will
produce a link to the element with id <samp>uid4</samp>. It is very easy to associate
some text (say 3.a) to this reference: just take the label of the element. If
the example had used the original <samp>\item</samp> command, this would have been
harder. For this reason, if the configuration file says
<tt>alternate_item=&#8220;true&#8221;</tt>, the <samp>\let</samp> assignment shown above is
automatically done. Original definition can be found in
<samp>\@@item</samp><a id="uid2814"></a>.
The raweb <span class="sansserif">DTD</span> says that an item label
should be an element that comes before the <tt class="txt">&lt;item&gt;</tt>, and the style sheet
uses this construct.
The style sheet for converting this document to <span class="sansserif">HTML</span> assumes on the other hand that labels are attributes.</p>
</li>
<li id="uid2815"><p class="nofirst noindent"><samp>\lhead</samp><a id="uid2816"></a>, <samp>\rhead</samp><a id="uid2817"></a>, <samp>\chead</samp><a id="uid2818"></a>, <samp>\cfoot</samp><a id="uid2819"></a>,
<samp>\lfoot</samp><a id="uid2820"></a>, <samp>\rfoot</samp><a id="uid2821"></a>. These commands are available only if
the <span class="sansserif">fancyhdr</span> package is loaded. They take an optional argument, say
A, and a required
argument, say B. The default value of A is B. The result is the same as
<samp>\@IF</samp><samp>{elh}</samp><samp>{A}</samp> followed by
<samp>\@IF</samp><samp>{olh}</samp><samp>{B}</samp>, where `lh´ must be replaced by the first
two characters of the command.
Here <samp>\@IF</samp> is a pseudo-command described below.</p>
</li>
<li id="uid2822"><p class="nofirst noindent"><samp>\fancyhead</samp><a id="uid2823"></a>, <samp>\fancyfoot</samp><a id="uid2824"></a>, <samp>\fancyhf</samp><a id="uid2825"></a>.
These commands are available only if the <span class="sansserif">fancyhdr</span> package is loaded.
They take two
arguments, an optional one x, and a required argument y. The argument x is a
sequence of letters, separated by commas. In each sequence, only letters e,
o, l, c, r, h, and f are considered. If none of e or o are given, both are
added; if none of l, c, r and given, all three are added; for
<samp>\fancyhead</samp>, h is added, for <samp>\fancyfoot</samp>, f is added; if none of h
or f are given, both are added. After that we consider all sequences XYZ,
where X is one of e, o, Y is one of l, c, r, Z is one one h, f, the letters
being in the list so completed (at least one sequence matches). For each match
we call <samp>\@IF</samp><samp>{XYZ}</samp><samp>{y}</samp>.
Here <samp>\@IF</samp> is a pseudo-command described below.</p>
</li>
<li id="uid2826"><p class="nofirst noindent"><samp>\@IF</samp>. This is a pseudo command, that takes two arguments, say x
and y. The translation is <samp>\fancyinternal</samp> <samp>{x}</samp> <samp>{</samp><samp>\let</samp>
<samp>\thepage</samp> <samp>\inert@thepage</samp> y<samp>}</samp>.</p>
</li>
<li id="uid2827"><p class="nofirst noindent"><samp>\inert@thepage</samp>. The translation is <tt class="txt">&lt;thepage/&gt;</tt>.</p>
</li>
<li id="uid2828"><p class="nofirst noindent"><samp>\fancyplain</samp><a id="uid2829"></a>. Not yet implemented. It takes two arguments, that
are conditionally evaluated, depending on whether this is a &#8220;plain&#8221; page
or not.</p>
</li>
<li id="uid2830"><p class="nofirst noindent"><samp>\fancyinternal</samp><a id="uid2831"></a>. The command takes two arguments x and y.
It constructs a <tt class="txt">&lt;headings&gt;</tt> element, containing y, with an attribute
<span class="sansserif">type</span> with value x. Example:</p>
<pre class="latex-code">\newcommand\rightmark{\xmlemptyelt{rightmark}}
\newcommand\leftmark{\xmlemptyelt{leftmark}}
\newcommand\fancyplain[2]{#2}
\lhead[\fancyplain{}{\bf\thepage}]{\fancyplain{}{\sl\rightmark}}
\rhead[\fancyplain{}{\sl\leftmark}]{\fancyplain{}{\bf\thepage}}
\cfoot[\fancyplain{\bf\thepage}{}]{\fancyplain{\bf\thepage}{}}
\chead{}\lfoot{}\rfoot{}
</pre>
<p class="nofirst noindent">The translation is</p>
<pre class="xml-code">&lt;headings type='olh'&gt;&lt;hi rend='slanted'&gt;&lt;rightmark/&gt;&lt;/hi&gt;&lt;/headings&gt;
&lt;headings type='elh'&gt;&lt;hi rend='bold'&gt;&lt;thepage/&gt;&lt;/hi&gt;&lt;/headings&gt;
&lt;headings type='orh'&gt;&lt;hi rend='bold'&gt;&lt;thepage/&gt;&lt;/hi&gt;&lt;/headings&gt;
&lt;headings type='erh'&gt;&lt;hi rend='slanted'&gt;&lt;leftmark/&gt;&lt;/hi&gt;&lt;/headings&gt;
&lt;headings type='ocf'/&gt;
&lt;headings type='ecf'/&gt;
&lt;headings type='och'/&gt;
&lt;headings type='ech'/&gt;
&lt;headings type='olf'/&gt;
&lt;headings type='elf'/&gt;
&lt;headings type='orf'/&gt;
&lt;headings type='erf'/&gt;
</pre>

</li>
<li id="uid2832"><p class="nofirst noindent"><samp>\@ifundefined</samp><a id="uid2833"></a>. The command takes three
arguments. The first argument should be a sequence of letters, for instance
`foo´. If <samp>\foo</samp> is undefined, the expansion of the command is the
value of the first argument, otherwise, the value of the second. Note:
<samp>\csname</samp> is used to construct the command, so that `undefined´ is the
same as being <samp>\relax</samp>.
If the first argument is <samp>\par</samp>, an error is signaled, of the form
<i>Invalid token \par found while scanning command for \@ifundefined.</i> If the argument is <samp>\xpar</samp>, the error is <i>Undefined
command \xpar</i>, and <samp>\relax</samp> gives: <i>Invalid token \relax
found while scanning command for \@ifundefined</i>. Note that <i>Tralics</i> may
complain with an extra <samp>\endcsname</samp>.</p>
<p>As an example, this should give 2.</p>
<pre class="latex-code">\makeatletter
\def\Foo{foo}\def\Bar{bar}
\@ifundefined{\Foo}{\@ifundefined{\Bar}{1}{2}}{3}
</pre>

</li>
<li id="uid2834"><p class="nofirst noindent"><samp>\epsfbox</samp><a id="uid2835"></a>, <samp>\epsffile</samp><a id="uid2836"></a>. These command do exactly the
same thing. They take one
argument, say X.
It behaves as <samp>\includegraphics</samp><samp>[Y]</samp><samp>{X}</samp><samp>Z</samp>,
where Y contains `width=w´ and `height=h´, where w and h are the values of
<samp>\epsfxsize</samp> and <samp>\epsfysize</samp>, provided they are not zero, and Z is the
code that sets these values to zero.</p>
</li>
<li id="uid2837"><p class="nofirst noindent"><samp>\psfig</samp><a id="uid2838"></a>, <samp>\epsfig</samp><a id="uid2839"></a>. The command takes an argument,
which is an association list. It must contain file=X, or figure=X.
If Y is the remaining of the list, the command is equivalent to
<samp>\includegraphics</samp><samp>[Y]</samp><samp>{X}</samp>.</p>
</li>
<li id="uid2840"><p class="nofirst noindent"><samp>\includegraphics</samp><a id="uid2841"></a>. The command takes an optional argument and a
required argument. The optional argument is an association list,
with names can be clip, angle, height, width, scale. The required argument is
a file name. There is no difference between `foo´, `foo.ps´ and `foo.eps´. Not
more than one dot is allowed in the file name.
See examples section <a href="#uid3955" title="Images">6.15</a>.</p>
</li>
<li id="uid2842"><p class="nofirst noindent"><samp>\lsc</samp><a id="uid2843"></a>, <samp>\fsc</samp><a id="uid2844"></a>. These commands are like <samp>\textsc</samp>.</p>
</li>
<li id="uid2845"><p class="nofirst noindent"><samp>\@ifstar</samp><a id="uid2846"></a> The command takes two arguments.
After that, it looks at the next character (ignoring spaces). If the character
is a star, it is read, the expansion is the first argument, otherwise the second. The
following code produces B1A2.</p>
<pre class="latex-code">\makeatletter
\def\foo{\@ifstar{A}{B}}
\foo1\foo*2
</pre>

</li>
<li id="uid2847"><p class="nofirst noindent"><samp>\@ifnextchar</samp><a id="uid2848"></a>.
The command takes three arguments,
a character token, say w, and two commands say A and B. After that, it looks
at the next character (ignoring spaces). If the character is w,
the expansion is A, else B. The character is not read.
The following should produce: `With opt AABBWithout opt CC´.</p>
<pre class="latex-code">\makeatletter
\def\ifbracket{\@ifnextchar[}
\makeatother
\def\wopt{\ifbracket\xwopt\ywopt}
\def\xwopt[#1]#2{With opt #1#2}
\def\ywopt#1{Without opt #1}
\wopt[AA]{BB}\wopt{CC}
</pre>

</li>
<li id="uid2849"><p class="nofirst noindent"><samp>\batchmode</samp><a id="uid2850"></a>, <samp>\nonstopmode</samp><a id="uid2851"></a>, <samp>\scrollmode</samp><a id="uid2852"></a>,
<samp>\errorstopmode</samp><a id="uid2853"></a>. These commands do nothing in <i>Tralics</i>, because the
only supported mode is `batchmode´. In TeX, they change an internal variable,
so that they can be preceded by the prefix <samp>\global</samp>.</p>
</li>
<li id="uid2854"><p class="nofirst noindent"><samp>\@gobble</samp><a id="uid2855"></a>,
<samp>\@gobbletwo</samp><a id="uid2856"></a>.
These commands read one or two argument. The result is empty.</p>
</li>
<li id="uid2857"><p class="nofirst noindent"><samp>\discretionary</samp><a id="uid2858"></a>. This command reads two arguments but does
nothing with it. In TeX, there is a third argument, that is typeset.</p>
</li>
<li id="uid2859"><p class="nofirst noindent"><samp>\HTMLset</samp><a id="uid2860"></a> (Raweb only command).
This command reads two arguments but does nothing with them.</p>
</li>
<li id="uid2861"><p class="nofirst noindent"><samp>\RAlabel</samp><a id="uid2862"></a> (Raweb only command).
This command reads one argument but does nothing with it.</p>
</li>
<li id="uid2863"><p class="nofirst noindent"><samp>\special</samp><a id="uid2864"></a>, <samp>\patterns</samp><a id="uid2865"></a>, <samp>\hyphenation</samp><a id="uid2866"></a>.
These command read one argument but do nothing with it.</p>
</li>
<li id="uid2867"><p class="nofirst noindent"><samp>\protect</samp><a id="uid2868"></a> behaves like <samp>\relax</samp>.</p>
</li>
<li id="uid2869"><p class="nofirst noindent"><samp>\htmlimage</samp><a id="uid2870"></a> was once defined in the kernel (is now is the html
package).</p>
</li>
<li id="uid2871"><p class="nofirst noindent"><samp>\centerline</samp><a id="uid2872"></a>, <samp>\leftline</samp><a id="uid2873"></a>, <samp>\rightline</samp><a id="uid2874"></a>: these
commands reads an argument, typeset it, and return a
<tt class="txt">&lt;line&gt;</tt> element with an attribute (left, right, center).</p>
</li>
<li id="uid2875"><p class="nofirst noindent"><samp>\clearpage</samp><a id="uid2876"></a>, <samp>\cleardoublepage</samp><a id="uid2877"></a>, <samp>\allowbreak</samp><a id="uid2878"></a>:
an empty element is returned.</p>
</li>
<li id="uid2879"><p class="nofirst noindent"><samp>\sloppy</samp><a id="uid2880"></a>, <samp>\subitem</samp><a id="uid2881"></a>, <samp>\immediate</samp><a id="uid2882"></a>,
<samp>\break</samp><a id="uid2883"></a>, <samp>\nobreak</samp><a id="uid2884"></a>,
<samp>\@</samp><a id="uid2885"></a>, <samp>\/</samp><a id="uid2886"></a>,
These command are currentlty defined as doing nothing.</p>
</li>
<li id="uid2887"><p class="nofirst noindent"><samp>\begin{latexonly}</samp> ...<samp>\end{latexonly}</samp><a id="uid2888"></a>,
<samp>\begin{xmlonly}</samp> ...<samp>\end{xmlonly}</samp><a id="uid2889"></a>,</p>
<p class="nofirst noindent"><samp>\begin{subequations}</samp> ...<samp>\end{subequations}</samp>.<a id="uid2890"></a>
The environment is ignored, not the content.</p>
</li>
<li id="uid2891"><p class="nofirst noindent"><samp>\begin{htmlonly}</samp> ...<samp>\end{htmlonly}</samp><a id="uid2892"></a>,
<samp>\begin{comment}</samp> ...<samp>\end{comment}</samp><a id="uid2893"></a>,</p>
<p class="nofirst noindent"><samp>\begin{rawhtml}</samp> ...<samp>\end{rawhtml}</samp><a id="uid2894"></a>,
<samp>\begin{LaTeXonly}</samp> ...<samp>\end{LaTeXonly}</samp><a id="uid2895"></a>,
The environment is ignored, the content also.</p>
</li>
<li id="uid2896"><p class="nofirst noindent"><samp>\centering</samp><a id="uid2897"></a>, <samp>\raggedright</samp><a id="uid2898"></a>, <samp>\raggedleft</samp><a id="uid2899"></a>.
These commands are associated to the environments:
`center´<a id="uid2900"></a>, `flushleft´<a id="uid2901"></a>, `flushright´<a id="uid2902"></a>. There are two other environments
`quote´<a id="uid2903"></a> and `quotation´<a id="uid2904"></a>. This gives an
integer with values between 1 and 5,
the normal value being 0. Whenever a new paragraph is started, the value of
the integer considered. It is is non-zero, an attribute is added (for instance
<span class="sansserif">rend</span>=´center´).
If you say <samp>\begin{center}</samp>, this will terminate the current paragraph (and
the next one will be centered). If you say <samp>\end{center}</samp>, this will
terminate the current paragraph (and the next one will not be centered). If
you say <samp>\centering</samp>, this will add an attribute to the current paragraph.</p>
</li>
<li id="uid2905"><p class="nofirst noindent"><samp>\error</samp><a id="uid2906"></a>. This command takes an argument and signals an error.</p>
</li>
<li id="uid2907"><p class="nofirst noindent"><samp>\ClassError</samp><a id="uid2908"></a>, <samp>\ClassErrorNoLine</samp><a id="uid2909"></a>,
<samp>\PackageError</samp><a id="uid2910"></a>, <samp>\PackageErrorNoLine</samp><a id="uid2911"></a>, <samp>\GenericError</samp><a id="uid2912"></a>
<samp>\ClassInfo</samp><a id="uid2913"></a>, <samp>\PackageInfo</samp><a id="uid2914"></a>, <samp>\GenericInfo</samp><a id="uid2915"></a>,
<samp>\ClassWarning</samp><a id="uid2916"></a>, <samp>\ClassWarningNoLine</samp><a id="uid2917"></a>,  <samp>\PackageWarning</samp><a id="uid2918"></a>, <samp>\PackageWarningNoLine</samp><a id="uid2919"></a>,
<samp>\GenericWarning</samp><a id="uid2920"></a>,
<samp>\@latex@error</samp>,  <samp>\@latex@warning</samp>, <samp>\@latex@warning@no@line</samp>,
<samp>\@latex@info</samp>, <samp>\@latex@info@no@line</samp>. All these commands
take an error message (that could be a warning, or some other piece of
information), in which <samp>\MessageBreak</samp><a id="uid2921"></a> is interpreted as a special
new line character. The first argument can be a package or class
name, or some generic prefix.
Information is printed on the transcript
file only, errors and warnings and also printed on the terminal.
The last two arguments of GenericError are ignored, and the last arguments of
other errors commands are ignored (these are generally of the form: see the
class or package for explanation, and written by LaTeX, on the terminal when
the user asks for help).
<i>Tralics</i> automatically adds the current line and file information,
unless the adequate prefix is given (or, as a special case, if the last item
in the message is <samp>\@gobble</samp>). Here is an example</p>
<pre class="latex-code">\PackageError{mypack}{you cannot use the command\MessageBreak
\string\foobar\space here}{unused}
\PackageWarning{mypack}{you should not use the command\MessageBreak
\string\foobar\space here}{unused}
</pre>
<p class="nofirst noindent">The lines printed on the terminal will be</p>
<pre class="log-code">Error signaled at line 78 of file xx.tex:
Package mypack Error: you cannot use the command
(mypack)              \foobar here.
Package mypack Warning: you should not use the command
(mypack)                \foobar here at line 80 of file xx.tex.
</pre>
</li>
<li id="uid2922"><p class="nofirst noindent"><samp>\@notprerr</samp><a id="uid2923"></a>. After
<samp>\let</samp><samp>\foo</samp><samp>\@notprerr</samp>, the command <samp>\foo</samp>
will produce the <i>Can be used only in preamble: \foo</i> error.</p>
</li>
<li id="uid2924"><p class="nofirst noindent"><samp>\hrule</samp><a id="uid2925"></a>, <samp>\vrule</samp><a id="uid2926"></a>. These commands are implemented
identically in <i>Tralics</i>. They produce a <tt class="txt">&lt;rule&gt;</tt> element.
For a hrule, the default height is 0.4pt, the default depth is 0pt, for a
vrule the default width is 0.4pt. You can give the height, depth, width
arguments in any order, more than once.
For instance</p>
<pre class="latex-code">\hrule   \hrule width 15pt height 2pt
\vrule \vrule height 2pt depth 4pt
</pre>
<p class="nofirst noindent">translates as</p>
<pre class="xml-code">&lt;rule depth='0.0pt' height='0.4pt'/&gt;
&lt;rule width='15.0pt' depth='0.0pt' height='2.0pt'/&gt;
&lt;rule width='0.4pt'/&gt;
&lt;rule width='0.4pt' depth='4.0pt' height='2.0pt'/&gt;
</pre>

</li>
<li id="uid2927"><p class="nofirst noindent"><samp>\mkern</samp><a id="uid2928"></a>. There is no difference between
<samp>\kern10pt</samp> and <samp>\mkern18mu</samp>. Is ignored outside math mode.</p>
</li>
<li id="uid2929"><p class="nofirst noindent"><samp>\ding</samp><a id="uid2930"></a>.
You can use the <samp>\ding</samp> command in order to access one character of the
Zapf Dingbats fonts. The command takes one argument, an integer (it is parsed
by the scanint routine, <samp>\ding{`\A}</samp> is as valid
as <samp>\char`\A</samp>). If the number is between 33 and 126, or between 161 and 239, or
between 241 and 254, then you get one of the characters listed
on the <i>Tralics</i> Web page. Otherwise, the translation is bad! Hence</p>
<pre class="latex-code">\newcount\CT
\CT=33 \loop \ding\CT, \advance\CT by1   \ifnum\CT&lt;127 \repeat
\CT=161 \loop \ding\CT, \advance\CT by1   \ifnum\CT&lt;255 \repeat
</pre>
<p class="nofirst noindent">gives
&#9985;, &#9986;, &#9987;, &#9988;, &#9742;, &#9990;, &#9991;, &#9992;, &#9993;, &#9755;, &#9758;, &#9996;, &#9997;, &#9998;, &#9999;, &#10000;, &#10001;, &#10002;, &#10003;, &#10004;, &#10005;, &#10006;, &#10007;, &#10008;, &#10009;, &#10010;, &#10011;, &#10012;, &#10013;, &#10014;, &#10015;, &#10016;, &#10017;, &#10018;, &#10019;, &#10020;, &#10021;, &#10022;, &#10023;, &#9733;, &#10025;, &#10026;, &#10027;, &#10028;, &#10029;, &#10030;, &#10031;, &#10032;, &#10033;, &#10034;, &#10035;, &#10036;, &#10037;, &#10038;, &#10039;, &#10040;, &#10041;, &#10042;, &#10043;, &#10044;, &#10045;, &#10046;, &#10047;, &#10048;, &#10049;, &#10050;, &#10051;, &#10052;, &#10053;, &#10054;, &#10055;, &#10056;, &#10057;, &#10058;, &#10059;, &#9679;, &#10061;, &#9632;, &#10063;, &#10064;, &#10065;, &#10066;, &#9650;, &#9660;, &#9670;, &#10070;, &#9687;, &#10072;, &#10073;, &#10074;, &#10075;, &#10076;, &#10077;, &#10078;, &#10081;, &#10082;, &#10083;, &#10084;, &#10085;, &#10086;, &#10087;, &#9827;, &#9830;, &#9829;, &#9824;, &#9312;, &#9313;, &#9314;, &#9315;, &#9316;, &#9317;, &#9318;, &#9319;, &#9320;, &#9321;, &#10102;, &#10103;, &#10104;, &#10105;, &#10106;, &#10107;, &#10108;, &#10109;, &#10110;, &#10111;, &#10112;, &#10113;, &#10114;, &#10115;, &#10116;, &#10117;, &#10118;, &#10119;, &#10120;, &#10121;, &#10122;, &#10123;, &#10124;, &#10125;, &#10126;, &#10127;, &#10128;, &#10129;, &#10130;, &#10131;, &#10132;, &#8594;, &#8596;, &#8597;, &#10136;, &#10137;, &#10138;, &#10139;, &#10140;, &#10141;, &#10142;, &#10143;, &#10144;, &#10145;, &#10146;, &#10147;, &#10148;, &#10149;, &#10150;, &#10151;, &#10152;, &#10153;, &#10154;, &#10155;, &#10156;, &#10157;, &#10158;, &#10159;, bad!, &#10161;, &#10162;, &#10163;, &#10164;, &#10165;, &#10166;, &#10167;, &#10168;, &#10169;, &#10170;, &#10171;, &#10172;, &#10173;, &#10174;, nice, isn´t it?</p>
</li></ul>

<h2 id="uid2931">5.14. Special commands</h2>
<p>We introduced the command <samp>\@reevaluate</samp><a id="uid2932"></a>.
It takes three arguments A, B and C, and applies A and B on C.
The important point here
is that C is read as text (not tokenized), so that category code changes are
allowed.
There is a starred version, in which A, B, C are environments. In fact,
arguments A and B are environment names, and C is the content of the current
environment (see example for how to use it).</p>
<p>With the following definitions</p>
<pre class="latex-code">\makeatletter
\notrivialmath=1
\def\foo#1{x#1x}
\def\xbar{\catcode`\$=12\catcode`\^=12 \ybar}
\def\ybar#1{y#1y}
\newenvironment{wbar}{\catcode`\$=12\catcode`\^=12w}{w}
\newcommand\Fct{\@reevaluate\foo\xbar}
\newenvironment{Env}{\@reevaluate*{center}{wbar}}{}
</pre>
<p class="nofirst noindent">the translation of</p>
<pre class="latex-code">{\Fct{$1^{er}$}}
\begin{Env}$3^{eme}$ \end{Env}
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;p&gt;x1&lt;hi rend='sup'&gt;er&lt;/hi&gt;xy$1^er$y&lt;/p&gt;
&lt;p rend='center'&gt;3&lt;hi rend='sup'&gt;e&lt;/hi&gt;&lt;/p&gt;
&lt;p&gt;w$3^eme$ w&lt;/p&gt;
</pre>
<p>This is a part of the transcript file showing the expansion of the command.</p>
<pre class="log-code">[11] {\Fct{$1^{er}$}}
{begin-group character}
+stack: level + 2 for brace
\Fct -&gt;\@reevaluate \foo \xbar
{\@reevaluate}
{Reeval: \foo{$1^{er}$}%
\xbar{$1^{er}$}%
}
</pre>
<p>This shows the expansion in the case of a starred command. Note that the
current environment is terminated; then everything up to <samp>\end{whatever}</samp> is
read.</p>
<pre class="log-code">[12] \begin{Env}$3^{eme}$ \end{Env}
{\begin}
{\begin Env}
+stack: level + 2 for environment
\Env -&gt;\@reevaluate *{center}{wbar}
{\@reevaluate}
+stack: ending environment Env; resuming document.
+stack: level - 2 for environment
{Reeval: \begin{center}$3^{eme}$ \end{center}%
\begin{wbar}$3^{eme}$ \end{wbar}%
}
</pre>

<h2 id="uid2933">5.15. Trees</h2>
<p>We explain here some commands from the <span class="sansserif">tree-dvips</span> package by Emma
Pease. A tree is defined by some nodes and connectors. Each node has a name,
whose scope is limited to the current page (<i>Tralics</i> does no validity test
for the names). A connector can be attached to the top, bottom, left or right
of a node (abreviation is one character of `<samp>tblr</samp>´), or a corner (two
letter, one of `<samp>tb</samp>´ followed by one of `<samp>lr</samp>´).</p>
<ul>
<li id="uid2934"><p class="nofirst noindent"><samp>\node</samp><a id="uid2935"></a><samp>{N}</samp><samp>{V}</samp> creates a <tt class="txt">&lt;node&gt;</tt> element,
whose content is the translation of V, with a <span class="sansserif">name</span> attribute N.</p>
</li>
<li id="uid2936"><p class="nofirst noindent"><samp>\nodepoint</samp><a id="uid2937"></a><samp>{N}</samp><samp>[h]</samp><samp>[v]</samp> creates an
empty <tt class="txt">&lt;node&gt;</tt>, with a <span class="sansserif">name</span> attribute N. It has optional
attributes <span class="sansserif">xpos</span> and <span class="sansserif">ypos</span>, with value h and v.</p>
</li>
<li id="uid2938"><p class="nofirst noindent"><samp>\nodeconnect</samp><a id="uid2939"></a><samp>[f]</samp><samp>{F}</samp><samp>[t]</samp><samp>{T}</samp>
creates a <tt class="txt">&lt;nodeconnect&gt;</tt> element, with attribute <span class="sansserif">nameA</span> equal to F,
attribute <span class="sansserif">nameB</span> equal to T, attributes <span class="sansserif">posA</span> and <span class="sansserif">posB</span>
equal to f and t. These must be positions; if omitted, or invalid syntax, then
`<samp>t</samp>´ and `<samp>b</samp>´ are used (bottom of first node is connected to
top of second node).</p>
</li>
<li id="uid2940"><p class="nofirst noindent"><samp>\anodeconnect</samp><a id="uid2941"></a>. Same as above, but the element is named
<tt class="txt">&lt;anodeconnect&gt;</tt> (it has an arrow from the first node to the second).</p>
</li>
<li id="uid2942"><p class="nofirst noindent"><samp>\barnodeconnect</samp><a id="uid2943"></a><samp>[d]</samp><samp>{F}</samp><samp>{T}</samp> creates
a <tt class="txt">&lt;barnodeconnect&gt;</tt> element, with attribute <span class="sansserif">nameA</span> equal to F,
attribute <span class="sansserif">nameB</span> equal to T, attribute <span class="sansserif">depth</span> equal to d; this
should be a dimension (not tested by <i>Tralics</i>).</p>
</li>
<li id="uid2944"><p class="nofirst noindent"><samp>\abarnodeconnect</samp><a id="uid2945"></a>. Same as above, but the element is named
<tt class="txt">&lt;abarnodeconnect&gt;</tt> (it has an arrow from the first node to the second).</p>
</li>
<li id="uid2946"><p class="nofirst noindent"><samp>\nodecurve</samp><a id="uid2947"></a><samp>[f]</samp><samp>{F}</samp><samp>[t]</samp><samp>{T}</samp><samp>{d1}</samp><samp>[d2]</samp> is like <samp>\nodeconnect</samp>, but produces a
<tt class="txt">&lt;nodecurve&gt;</tt> element, with two additional attributes <span class="sansserif">depthA</span> and
<span class="sansserif">depthB</span>, containing the value of d1 and d2 (default value of d2 is d1).</p>
</li>
<li id="uid2948"><p class="nofirst noindent"><samp>\anodecurve</samp><a id="uid2949"></a>. Same as above, but the element is named
<tt class="txt">&lt;anodecurve&gt;</tt>.</p>
</li>
<li id="uid2950"><p class="nofirst noindent"><samp>\nodetriangle</samp><a id="uid2951"></a><samp>{F}</samp><samp>{T}</samp> creates a
<tt class="txt">&lt;nodetriangle&gt;</tt> element, with the two names.</p>
</li>
<li id="uid2952"><p class="nofirst noindent"><samp>\nodebox</samp><a id="uid2953"></a><samp>{T}</samp> creates a <tt class="txt">&lt;nodebox&gt;</tt> element,
with a single name, it adds a decoration to the node.</p>
</li>
<li id="uid2954"><p class="nofirst noindent"><samp>\nodeoval</samp><a id="uid2955"></a><samp>{T}</samp> creates a <tt class="txt">&lt;nodeoval&gt;</tt> element,
with a single name, it adds a decoration to the node.</p>
</li>
<li id="uid2956"><p class="nofirst noindent"><samp>\nodecircle</samp><a id="uid2957"></a><samp>[d]</samp><samp>{T}</samp> creates a
<tt class="txt">&lt;nodecircle&gt;</tt> element, with a single name, and attribute <span class="sansserif">depth</span>
with value d; it adds a decoration to the node.</p>
</li></ul>
<p>For instance</p>
<pre class="latex-code">\node{a}{Value of node A}
\nodepoint{b} \nodepoint{c}[3pt]\nodepoint{d}[4pt][5pt]
\nodeconnect{a}{b}
\nodeconnect[tl]{a}[r]{c}
\anodeconnect{a}{b}
\anodeconnect[tl]{a}[r]{c}
\barnodeconnect[3pt]{a}{d}
\nodecurve{a}{b}{2pt} ?
\nodecurve[l]{a}[r]{b}{2pt}[3pt]
\nodetriangle{a}{b}
\nodebox{a}
\nodeoval{a}
\nodecircle[3pt]{a}
</pre>
<p>Translation</p>
<pre class="xml-code">&lt;node name='a'&gt;Value of node A&lt;/node&gt;
&lt;node name='b'/&gt;
&lt;node xpos='3pt' name='c'/&gt;&lt;node ypos='5pt' xpos='4pt' name='d'/&gt;
&lt;nodeconnect nameA='a' nameB='b' posA='b' posB='t'/&gt;
&lt;nodeconnect nameA='a' nameB='c' posA='tl' posB='r'/&gt;
&lt;anodeconnect nameA='a' nameB='b' posA='b' posB='t'/&gt;
&lt;anodeconnect nameA='a' nameB='c' posA='tl' posB='r'/&gt;
&lt;barnodeconnect nameA='a' nameB='d' depth='3pt'/&gt;
&lt;nodecurve nameA='a' nameB='b' posA='b' posB='t' depthB='2pt' depthA='2pt'/&gt;?
&lt;nodecurve nameA='a' nameB='b' posA='l' posB='r' depthB='3pt' depthA='2pt'/&gt;
&lt;nodetriangle nameB='b' nameA='a'/&gt;
&lt;nodebox nameA='a'/&gt;
&lt;nodeoval nameA='a'/&gt;
&lt;nodecircle nameA='a' depth='3pt'/&gt;
</pre>

<h2 id="uid2958">5.16. Linguistic macros</h2>
<p>The <span class="sansserif">gb4e</span> package allows you to input the following (extract of the
thesis of C. Romero)</p>
<pre class="latex-code">\begin{exe}
\ex \label{agen1}
\gll ... \th et hit er {\bf \textit{ahte}}.\\
     ... that OBJ-it already PRET-possessed.\\
\glt \textit{... that (he) already owned it.} (CMLAMBX1,31.377)
 
\ex \label{agen2}
\gll ... the love that men to hym {\bf \textit{owen}}.\\
     ... the love that SUBJ-men to OBJ-him PRES-owe.\\
\glt \textit{... the love that men owe him.} (CMCTPARS,313.C2.1087)
\end{exe}
</pre>
<p class="nofirst noindent">The <samp>exe</samp><a id="uid2959"></a> environment is used for numbered examples;
it is implemented as a <samp>list</samp> environment, the <samp>\ex</samp><a id="uid2960"></a> command
behaves like <samp>\item</samp> (each item is numbered, the item number is saved is a
global counter). The TeX source of the package (as used by <i>Tralics</i>) can be
found in the distribution. The non-trivial part in the example above is the
<samp>\gll</samp> command. It takes three lines of text (there is also <samp>\glll</samp> that
takes four lines), the first line is a sequence of words (here in old English),
the second line another sequence (translated literally, with possible
annotations), and the last line is the translation of the whole, with a
bibliographic reference. Words in the first two lines are vertically aligned.
The algorithm (by Marcel R. van der Goot) is the following; the list is
split into words (a space acts as a word separator), each word is typeset
via:</p>
<pre class="latex-code">\hbox{#2\strut#3 }% adds space
</pre>
<p class="nofirst noindent">where #3 is the
word, and #2 is <samp>\eachwordone</samp><a id="uid2961"></a> for the first line,
<samp>\eachwordtwo</samp><a id="uid2962"></a> for the second line, and
<samp>\eachwordthree</samp><a id="uid2963"></a> for the third line (case of <samp>\glll</samp>). These
commands default to <samp>\rm</samp>.
The words are put in a list (a <samp>\vbox</samp>, argument #1) like this</p>
<pre class="latex-code">\setbox#1=\vbox{\hbox{XXX}\unvbox#1}
</pre>
<p class="nofirst noindent">After that, the two or three lists are merged (the code uses
<samp>\unvbox</samp> and <samp>\lastbox</samp> in order to get the next element of the list).
The command <samp>\vtop</samp> is used to put two words one above the other, and these
boxes are merged together using the following code</p>
<pre class="latex-code">\setbox\gline=\hbox{\unhbox\gline \hskip\glossglue \vtop{XXX}}
</pre>
<p class="nofirst noindent">The glue betweeen the boxes is 0pt plus 2pt minus 1pt (remember that each hbox
is terminated by some glue). The <i>Tralics</i> implementation is the following.
There are two commands <samp>\cgloss@gll</samp><a id="uid2964"></a>
and <samp>\cgloss@glll</samp><a id="uid2965"></a> written in C++, and the
package renames them to <samp>\gll</samp><a id="uid2966"></a> and <samp>\glll</samp><a id="uid2967"></a>. It is not clear
what the translation should be (a list of boxes containing boxes?) In the
current implementation, we use a table. This means that the resulting <span class="sansserif">XML</span> is
easy to interpret; the only drawback is that we loose linebreaks (from the
<samp>\glossglue</samp>). This is the translation of the example.</p>
<pre class="xml-code">&lt;list type='description'&gt;
&lt;item id='uid1692' label='650'&gt;
&lt;table rend='inline'&gt;&lt;row&gt;&lt;cell halign='left'&gt;...&lt;/cell&gt;
&lt;cell halign='left'&gt;þet&lt;/cell&gt;
&lt;cell halign='left'&gt;hit&lt;/cell&gt;
&lt;cell halign='left'&gt;er&lt;/cell&gt;
&lt;cell halign='left'&gt;&lt;hi rend='bold'/&gt;&lt;hi rend='it'&gt;
    &lt;hi rend='bold'&gt;ahte&lt;/hi&gt;&lt;/hi&gt;&lt;hi rend='bold'/&gt;.&lt;/cell&gt;
&lt;/row&gt;&lt;row&gt;&lt;cell halign='left'&gt;...&lt;/cell&gt;
&lt;cell halign='left'&gt;that&lt;/cell&gt;
&lt;cell halign='left'&gt;OBJ-it&lt;/cell&gt;
&lt;cell halign='left'&gt;already&lt;/cell&gt;
&lt;cell halign='left'&gt;PRET-possessed.&lt;/cell&gt;
&lt;/row&gt;&lt;/table&gt;
&lt;p noindent='true'&gt;&lt;hi rend='it'&gt;... that (he) already owned it.&lt;/hi&gt;
     (CMLAMBX1,31.377)&lt;/p&gt;
&lt;/item&gt;
&lt;item id='uid1693' label='651'&gt;
&lt;table rend='inline'&gt;&lt;row&gt;&lt;cell halign='left'&gt;...&lt;/cell&gt;
&lt;cell halign='left'&gt;the&lt;/cell&gt;
&lt;cell halign='left'&gt;love&lt;/cell&gt;
&lt;cell halign='left'&gt;that&lt;/cell&gt;
&lt;cell halign='left'&gt;men&lt;/cell&gt;
&lt;cell halign='left'&gt;to&lt;/cell&gt;
&lt;cell halign='left'&gt;hym&lt;/cell&gt;
&lt;cell halign='left'&gt;&lt;hi rend='bold'/&gt;&lt;hi rend='it'&gt;
        &lt;hi rend='bold'&gt;owen&lt;/hi&gt;&lt;/hi&gt;&lt;hi rend='bold'/&gt;.&lt;/cell&gt;
&lt;/row&gt;&lt;row&gt;&lt;cell halign='left'&gt;...&lt;/cell&gt;
&lt;cell halign='left'&gt;the&lt;/cell&gt;
&lt;cell halign='left'&gt;love&lt;/cell&gt;
&lt;cell halign='left'&gt;that&lt;/cell&gt;
&lt;cell halign='left'&gt;SUBJ-men&lt;/cell&gt;
&lt;cell halign='left'&gt;to&lt;/cell&gt;
&lt;cell halign='left'&gt;OBJ-him&lt;/cell&gt;
&lt;cell halign='left'&gt;PRES-owe.&lt;/cell&gt;
&lt;/row&gt;&lt;/table&gt;
&lt;p noindent='true'&gt;&lt;hi rend='it'&gt;... the love that men owe him.&lt;/hi&gt;
     (CMCTPARS,313.C2.1087)&lt;/p&gt;
&lt;/item&gt;&lt;/list&gt;
</pre>

<h2 id="uid2968">5.17. Special parsing rules</h2>
<p>In the TeXbook, chapter 24, you will find the definition of &lt;general
text&gt;. This rule explains that TeX expects a brace-delimited list of tokens,
where the starting brace can be either a character, or a token like
<samp>\bgroup</samp>; it can be preceded by optional spaces and <samp>\relax</samp>
tokens. We give here a list of all cases where this rule can be applied.</p>
<ul>
<li id="uid2969"><p class="nofirst noindent">(old behaviour)
The procedure that scans a math subformula skips over optional
<samp>\relax</samp> commands, and if the token found is not a character (it can be a
generalized character like <samp>\mathchar</samp>), it uses this rule. As a result,
in the case of <samp>$a_\par b$</samp>, you get a missing opening brace error,
and in the case of <samp>$a\par$</samp>, this rule is not applied, you get a
missing dollar error (this dollar marks the end of the formula.)
In a case like <samp>$a_\relax b$</samp>, <i>Tralics</i> removes the <samp>\relax</samp>
token before attaching the subscript to the kernel, so that the TeX hack is
useless (no missing brace/dollar error is signaled, but <i>Tralics</i> may signal a
<i>Bad math expression</i> involving a <samp>\par</samp> cmd).</p>
</li>
<li id="uid2970"><p class="nofirst noindent">In no-mathml mode, if a token, say <samp>\foo</samp> has the same meaning as
<samp>\relax</samp>, it will eppear under its name in the result. An expression like
<samp>$a_\foo b$</samp> is valid, so that relax tokens are removed lately.</p>
</li>
<li id="uid2971"><p class="nofirst noindent">In orderto simplify error recovry, <samp>\par</samp> tokens are forbidden in
math mode; moreover a closing delimiter is added (in the example above, it
is a dollar sign that terminates the formula, and a second error will be
signaled later)</p>
</li>
<li id="uid2972"><p class="nofirst noindent">The procedure that scans the four arguments of <samp>\mathchoice</samp> uses
this rule.
You can say <samp>\sqrt</samp><samp>\relax</samp><samp>{x}</samp> or
<samp>$a^</samp><samp>\relax</samp><samp>{b}</samp><samp>$</samp>, and the <samp>\relax</samp> is ignored.
Replacing <samp>\relax</samp> by <samp>\par</samp> gives a missing brace error. Not that
<samp>\relax</samp> is allowed even in the case where the argument is not delimited by
braces, such as in <samp>$a_\relax b$</samp>.</p>
</li>
<li id="uid2973"><p class="nofirst noindent">The rule applies for commands that produce an accent, like <samp>\bar</samp>;
it does not apply for commands like <samp>\frac</samp>; so that
<samp>\frac</samp><samp>\A</samp><samp>\B</samp> constructs a fration with <samp>\A</samp> as numeratr, and
<samp>\B</samp> as denominator.</p>
</li>
<li id="uid2974"><p class="nofirst noindent"><samp>\discretionary</samp><a id="uid2975"></a>. Quoting Knuth
&#8220;The routine that scans the four mlists of a <samp>\mathchoice</samp> is very
much like the routine that builds discretionary nodes.&#8221; <i>Tralics</i> ignores
first two arguments and translates the last one inside a group. See example
below.</p>
</li>
<li id="uid2976"><p class="nofirst noindent"><samp>\hyphenation</samp><a id="uid2977"></a>, <samp>\patterns</samp><a id="uid2978"></a>, <samp>\special</samp><a id="uid2979"></a>.
Argument is ignored by <i>Tralics</i>. The rule applies.</p>
</li>
<li id="uid2980"><p class="nofirst noindent"><samp>\insert</samp><a id="uid2981"></a>, <samp>\vadjust</samp><a id="uid2982"></a>. These commands are not
implemented by <i>Tralics</i>. This means that an error is signaled.
However, arguments are scanned as in plain TeX; this means that a register
number must be given for <samp>\insert</samp>. No error is signaled if this number is
255.</p>
</li>
<li id="uid2983"><p class="nofirst noindent">In the case of <samp>\hbox</samp> or <samp>\vbox</samp>,
there can be some keywords (read and ignored by <i>Tralics</i>). The content of the
box is defined by this rule.</p>
</li>
<li id="uid2984"><p class="nofirst noindent">Scanning of <samp>\noalign</samp> uses this rule. This is not implemented.</p>
</li>
<li id="uid2985"><p class="nofirst noindent">This rule is used when TeX uses the tokens from <samp>\output</samp>.
Not implemented in <i>Tralics</i>.</p>
</li>
<li id="uid2986"><p class="nofirst noindent">This rule is used when scanning the token list of <samp>\uppercase</samp>,
<samp>\lowercase</samp>, <samp>\message</samp>, <samp>\write</samp>.</p>
<p>Examples.</p>
<pre class="latex-code">{DISC:\discretionary \relax{1}\relax{2}\relax \bgroup \bf 3}\relax{4}}
\hyphenation\relax\bgroup12}3\patterns\relax\bgroup 45}6
\insert14\relax{\bf A}B\vadjust\relax{\bf C}D
</pre>
<p>Translation</p>
<pre class="xml-code">&lt;p&gt;DISC:&lt;hi rend='bold'&gt;3&lt;/hi&gt;4
36
&lt;hi rend='bold'&gt;A&lt;/hi&gt;B&lt;hi rend='bold'&gt;C&lt;/hi&gt;D&lt;/p&gt;
</pre>

</li></ul>

<h1 id="cid6">6. Running Tralics</h1>
<h2 id="uid2987">6.1. Introduction</h2>
<p>There is a number of ways to alter the translation of your TeX document.
One solution consists in using a <span class="sansserif">ult</span> file: this is a TeX file
that <i>Tralics</i> loads automatically before the main source. The file has the same name as the
main source, with a different extension, and is in the same directory.</p>
<p>All other configuration files are searched in a list of directories (default
being <span class="sansserif">confdir</span>). There are four such types: file with extensions
<span class="sansserif">clt</span> and <span class="sansserif">plt</span> are TeX files, that contains code
associated to classes and packages (the u in <span class="sansserif">ult</span> stands for user,
the other letters are for LaTeX and <i>Tralics</i>).</p>
<p>The file <span class="sansserif">.tralics_rc</span> is known as the default configuration file,
its use is considered obsolete. Configuration files of this kind consist in a
sequence of subfiles, and a rule for choosing a <i>Type</i>, that is, either a
subfile or an external file, for instance <span class="sansserif">ra2007.tcf</span>. The suffix
tcf stands for <i>Tralics</i> configuration file, there structure and use is
explained here. The default value for the Type is the current document class.
In the description of command line arguments below, some options are marked
`Raweb only´, this means that they are meaningful only when the Type
(after removal of trailing digits) is ra.</p>
<p>The tcf file
defines the DOCTYPE: this is the second line of the <span class="sansserif">XML</span> output; if the
doctype is foo+bar.dtd, this means that the dtd file is <span class="sansserif">bar.dtd</span>
and the root element is <tt class="txt">&lt;foo&gt;</tt>. The DOCTYPE can also be given as a command
line argument or in the TeX source using a special syntax.</p>
<p>The tcf file may contain a sequence of assignments. Some of them control
the attributes of the root element, but in general they alter the name of <span class="sansserif">XML</span> elements and attributes. These names can also be given as command line
argument, or in the TeX source.</p>
<p>The tcf file may contain some TeX code. In fact, the file <span class="sansserif">ra.tcf</span>
contains code that ought to be in <span class="sansserif">ra.clt</span>, and exists only for
historical reasons.</p>
<p>Finally, a tcf file can contain a TitlePage block: this is a description of
how commands like <samp>\maketitle</samp> can be translated using meta-data (title,
author, keywords, etc) defined earlier.</p>

<h2 id="uid2988">6.2. The command line arguments</h2>
<p>If you call <i>Tralics</i> without arguments, you will see something like</p>
<pre class="latex-code">This is tralics 2.11.7, a LaTeX to XML translator, running on macarthur
Copyright INRIA/MIAOU/APICS 2002-2008, Jos\'e Grimm
Licensed under the CeCILL Free Software Licensing Agreement
Say tralics --help to get some help
</pre>
<p class="nofirst noindent">In any case, the first three lines are printed. The version number may vary;
we shall describe here the behavior of version 2.12 (released in April 2008).
Command line arguments are read and interpreted from left to right.
If an argument does not start with a hyphen, it is the name of the source
file (only one input file is accepted); otherwise it is called an
option. Some option names are shown with a hyphen, it is optional
(in fact, dashes and underscores are ignored in option names),
so that `<tt>-help</tt>´ and `<tt>--help</tt>´ are synonyms.
Some options take no argument, for
instance <tt>-version</tt> (whose effect is to print the version number and
quit); others, for instance <tt>-input-file</tt>, take an argument. The
argument is the character string that follows, preceded
by an optional equals sign. Example</p>
<pre class="latex-code">tralics -foo = bar gee     #1
tralics -foo= bar gee
tralics -foo =bar gee
tralics -foo=bar gee       #4
tralics -foo = "bar gee"   #5
tralics -foo = bar\ gee
tralics -foo  bar\ gee
tralics -foo = " bar gee"  #8
tralics -foo = \ bar\ gee
tralics -foo  \ bar\ gee
tralics "-foo = bar gee"   #11
tralics -foo\ =\ bar\ gee\
</pre>
<p>We assume here that a command line interpreter (usually called a shell) reads
the line you type, converts it in character strings, finds the executable
program associated to the first string, and calls it with all these strings
as arguments. There are five arguments on the first line (the first argument
is the name of the program, it is currently ignored). We assume here that spaces
can be inserted into an argument by either enclosing the string in quotes, or
by escaping the space with a backslash, and that characters after a sharp sign
are ignored. Assume that <tt>-foo</tt> is a <i>Tralics</i> option that takes a
value; then the previous line are interpreted as follows.</p>
<p>The first three examples are similar but for spaces around the equals sign.
Cases 1 and 4 are equivalent, the argument of <tt>-foo</tt> is <tt>bar</tt>,
and there is a second option <tt>gee</tt>. In case 2, the argument of
<tt>-foo</tt> is empty, and there are two options <tt>bar</tt>,
<tt>gee</tt>. In case 3, the optional equals sign is omitted, hence the
argument is <tt>=bar</tt>, and there is a second option. Thus you should
either put no space or two spaces surrounding the equals sign.</p>
<p>Remaining examples show what happens if you put spaces in the argument.
In cases 5, 6 and 7, the argument is bar-space-gee. In cases 8, 9, 10
it is space-bar-space-gee.
Lines 11 and 12 are the same, except for the trailing space. Since
<i>Tralics</i> removes spaces before and after the equals sign, the argument
is bar-space-gee (plus space in the last case).</p>
<p>Here is the list of all options, in alphabetic order.</p>
<ul>
<li id="uid2989"><p class="nofirst noindent"><tt>all</tt><a id="uid2990"></a> (Raweb only) is obsolete and not described
anymore.</p>
</li>
<li id="uid2991"><p class="nofirst noindent"><tt>check</tt><a id="uid2992"></a> (Raweb only) can be used to check the
document for the Raweb semantics. No translation is started. In 2007, we
removed the preprocessor and its checks, and this option becomes an error
it can only be used if the year of the document (that matches the
document class) is 2006 at most. Option is ignored in 2008.</p>
</li>
<li id="uid2993"><p class="nofirst noindent"><tt>confdir</tt>=<b>prefix</b><a id="uid2994"></a>
specifies an alternate location for configuration files (with extension tcf,
ult, plt, and clt). If you specify A, B, and C, in this order, then <i>Tralics</i> checks C, B, A, D in this order (where D is a default value).</p>
</li>
<li id="uid2995"><p class="nofirst noindent"><tt>config</tt>=<b>SomeFile</b><a id="uid2996"></a>:
configuration file is SomeFile.
You can use `config-file´<a id="uid2997"></a> instead of `config´.</p>
</li>
<li id="uid2998"><p class="nofirst noindent"><tt>default-class</tt>=<b>MyClass</b><a id="uid2999"></a>.
Assume that you compile a file that has <samp>\documentclass</samp><samp>{foo}</samp>;
in this case, <i>Tralics</i> tries to read the file <span class="sansserif">foo.clt</span>. No error is
signaled if the file cannot be opened. If this option is used,
then <span class="sansserif">MyClass.clt</span> is loaded if it exists; the command
<samp>\CurrentClass</samp> will hold the name of the document class (here foo), so that
<span class="sansserif">MyClass.clt</span> knows how it was called.</p>
</li>
<li id="uid3000"><p class="nofirst noindent"><tt>dir</tt>=<b>path</b><a id="uid3001"></a> (Raweb only); path will be
the &#8220;raweb dir&#8221;, the directory
containing lots of stuff for the Raweb mode. In particular, it contains
a subdirectory <tt>confdir</tt><a id="uid3002" href="#note69" title="Was src in previous versions"><small>(note: </small>&#10163;<small>)</small></a> with
the configuration file. If this option is not used, the value of the shell
variable <tt>TRALICSDIR</tt> will be used instead. Is obsolete in 2008,
option <tt>confdir</tt> should be instead.</p>
</li>
<li id="uid3003"><p class="nofirst noindent"><tt>distinguish-refer-in-rabib</tt>=<b>x</b>
<a id="uid3004"></a> sets a special flag.
The value can be yes, no, true, false, otherwise it is ignored. Default is yes.
The flag indicates whether, for the Raweb, the refer bibliography database
should be considered a normal file, or a subfile of the year database.</p>
</li>
<li id="uid3005"><p class="nofirst noindent"><tt>doc-type</tt>=<b>A-B</b><a id="uid3006"></a>
This specifies the DOCTYPE of the
resulting <span class="sansserif">XML</span> document. Here A is the name of the root element, B is the
<span class="sansserif">DTD</span> file, these two names are separated by a space, a dash, a comma or a
plus sign.</p>
</li>
<li id="uid3007"><p class="nofirst noindent"><tt>entnames</tt>=<b>yes/no</b><a id="uid3008"></a> applies to
some commands like <samp>\alpha</samp> that translate as `<tt class="txt">&amp;alpha;</tt>´ or
`<tt class="txt">&amp;#x3B1;</tt>´ (before version 2.9, it applied also to
text commands like the eurosign, that are now represented
internally as a Unicode character). Default
is yes: the <span class="sansserif">XML</span> resulting document contains a name rather than a number.</p>
</li>
<li id="uid3009"><p class="nofirst noindent"><tt>etex</tt><a id="uid3010"></a> enables &#1013;-TeX extensions. This is the
default. Option <tt>noetex</tt> disables these extensions.</p>
</li>
<li id="uid3011"><p class="nofirst noindent"><tt>external-prog</tt>=<b>pgm</b><a id="uid3012"></a> (Raweb only)
tells <i>Tralics</i> to use pgm instead of `rahandler.pl´ as interpreter for the
Raweb actions defined by the xmlXXX switches.</p>
</li>
<li id="uid3013"><p class="nofirst noindent"><tt>hack-notitle</tt><a id="uid3014"></a> (Raweb only). <i>Tralics</i> may replace <samp>\section</samp><samp>{}</samp> (sectioning command with empty argument)
by <samp>\section</samp><samp>{Introduction}</samp> (same command with a dummy name).
This is implied in raweb mode until 2006. The option was withdrawn in 2007:
using it has no effect on the translation. You should never use a sectioning
command with an empty argument.</p>
</li>
<li id="uid3015"><p class="nofirst noindent"><tt>find-words</tt><a id="uid3016"></a> asks for printing
on the file <span class="sansserif">words</span> the list of all
words of the <span class="sansserif">XML</span> tree.</p>
</li>
<li id="uid3017"><p class="nofirst noindent"><tt>help</tt> prints the list of all options.</p>
</li>
<li id="uid3018"><p class="nofirst noindent"><tt>input-dir</tt>=<b>dir</b>
specifies where source files are to be found. This is a colon separated
list of directories. Current directory is defined by an empty slot, or a
single dot; it will be added to the end of the list, unless present.</p>
</li>
<li id="uid3019"><p class="nofirst noindent"><tt>input-path</tt>=<b>dir</b><a id="uid3020"></a>
is the same as input-dir.</p>
</li>
<li id="uid3021"><p class="nofirst noindent"><tt>input-file</tt>=<b>foo</b><a id="uid3022"></a> specifies the
source to be foo (extension <span class="sansserif">.tex</span> is added if needed).</p>
</li>
<li id="uid3023"><p class="nofirst noindent"><tt>interactivebib</tt><a id="uid3024"></a>: withdrawn in version 2.9.</p>
</li>
<li id="uid3025"><p class="nofirst noindent"><tt>interactivemath</tt><a id="uid3026"></a>: special mode, where
no input file is required, expressions are read from the terminal. The
translation of every
math expression is printed on the terminal. The value of <samp>\jobname</samp> will
be `texput´ (so that the <span class="sansserif">XML</span> result is in <span class="sansserif">texput.xml</span>, the
transcript file is <span class="sansserif">texput.log</span>).</p>
</li>
<li id="uid3027"><p class="nofirst noindent"><tt>latin1</tt><a id="uid3028"></a>: source files are assumed
to be latin1 encoded, unless the first line of a file contains
`utf8-encoded´
(if `utf8´ and `latin1´ are given, the last option wins, if none is given
latin1 is assumed).</p>
</li>
<li id="uid3029"><p class="nofirst noindent"><tt>leftquote</tt>=<b>num</b><a id="uid3030"></a>
specifies translation of the left quote (or backquote) to be character number
num; see below under rightquote.</p>
</li>
<li id="uid3031"><p class="nofirst noindent"><tt>log-file</tt> = <b>myfile</b>.<a id="uid3032"></a>
This tells <i>Tralics</i> to put all messages and warnings in <span class="sansserif">myfile</span>
(extension
<span class="sansserif">.log</span> added if not given). The file can be in the directory
specified by the output-dir option.</p>
</li>
<li id="uid3033"><p class="nofirst noindent"><tt>math-variant</tt><a id="uid3034"></a>:
By default, or if you say `no-math-variant´,
a math character in a font, for instance <samp>$\mathcal A$</samp>
translates into <tt class="txt">&lt;mi&gt;</tt><tt class="txt">&amp;#x1D49C;</tt><tt class="txt">&lt;/mi&gt;</tt> or
<tt class="txt">&lt;mi&gt;</tt><tt class="txt">&amp;Ascr;</tt><tt class="txt">&lt;/mi&gt;</tt>, a character from Unicode plane one.
Using this option changes the translation to be an ASCII character with a math
variant property, hence
<samp>$\mathfrak B$</samp> gives <tt class="txt">&lt;mi mathvariant=´fraktur´&gt;</tt>
B<tt class="txt">&lt;/mi&gt;</tt>.</p>
</li>
<li id="uid3035"><p class="nofirst noindent"><tt>no-bib-year-error</tt><a id="uid3036"></a> (Raweb only):
no error
is signaled for a bibliography reference with missing or wrong year.</p>
</li>
<li id="uid3037"><p class="nofirst noindent"><tt>no-bib-year-modify</tt><a id="uid3038"></a> (Raweb only):
no special hacks are applied if an entry is wrongly marked `refer´ (otherwise,
the entry is moved to another category)</p>
</li>
<li id="uid3039"><p class="nofirst noindent"><tt>no-config</tt><a id="uid3040"></a>: no configuration file
will be used.</p>
</li>
<li id="uid3041"><p class="nofirst noindent"><tt>no-entnames</tt><a id="uid3042"></a> is the same as `-entnames=no´.</p>
</li>
<li id="uid3043"><p class="nofirst noindent"><tt>no-etex</tt><a id="uid3044"></a> disables &#1013;-TeX extensions.</p>
</li>
<li id="uid3045"><p class="nofirst noindent"><tt>no-mathml</tt><a id="uid3046"></a> sets
the <samp>\@nomathml</samp> counter to minus one; default is zero.</p>
</li>
<li id="uid3047"><p class="nofirst noindent"><tt>no-math-variant</tt><a id="uid3048"></a> is the converse of
`mathvariant´ described above.</p>
</li>
<li id="uid3049"><p class="nofirst noindent"><tt>no-trivialmath</tt><a id="uid3050"></a> sets the
<samp>\notrivialmath</samp> counter to 0 (default is 1), thus
even trivial
math formulas such as <samp>$0$</samp> are translated as a <tt class="txt">&lt;formula&gt;</tt> element.</p>
</li>
<li id="uid3051"><p class="nofirst noindent"><tt>no-undef-mac</tt><a id="uid3052"></a>:
no error is signaled when you use an undefined command like
<samp>\foo</samp>. Instead, the command is automatically defined to be <samp>\foo</samp>.</p>
</li>
<li id="uid3053"><p class="nofirst noindent"><tt>no-straight-quotes</tt><a id="uid3054"></a>:
the apostrophe translates into character U+B4, as <samp>\textasciiacute</samp>. However,
the normal value is used in verbatim mode, when reading a file name, in an
URL, or in a construct like <samp>\char</samp>.</p>
</li>
<li id="uid3055"><p class="nofirst noindent"><tt>no-xml-error</tt><a id="uid3056"></a> inhibits insertion of
<tt class="txt">&lt;error&gt;</tt> elements in the <span class="sansserif">XML</span> tree.
By default, an error element containing (at least the current line number)
is added to the tree, for every error.</p>
</li>
<li id="uid3057"><p class="nofirst noindent"><tt>no-zerowidth-elt</tt><a id="uid3058"></a> controls what should
be inserted in a verbatim string in order to inhibit ligatures when
converting XML to Pdf. For this purpose the zero-width space character,
namely <tt class="txt">&amp;#x200B;</tt>, is used. This character appears sometimes as a
normal-width space in a HTML file. For this reason, an element <tt class="txt">&lt;zws/&gt;</tt> is
used; it can be replaced by a style sheet according to its destination: a
special marker for Pdf, nothing for <span class="sansserif">HTML</span>. The default translation is an
element, but using the flag changes it to a character.</p>
</li>
<li id="uid3059"><p class="nofirst noindent"><tt>no-zerowidth-space</tt><a id="uid3060"></a> inhibits
insertion of a special marker in a case like <samp>\verb+--+</samp>.</p>
</li>
<li id="uid3061"><p class="nofirst noindent"><tt>oe8</tt>, <tt>oe1</tt>, <tt>oe8a</tt>, or <tt>oe1a</tt><a id="uid3062"></a> specify the
output encoding (used in the <span class="sansserif">XML</span> file), one of UTF8 or latin1.
If the letter a is given, then all non-7 bits characters are
printed as character references. Thus, the only difference between
option oe8a and oe1a is the <span class="sansserif">XML</span> header line. Default encoding is oe1.</p>
</li>
<li id="uid3063"><p class="nofirst noindent"><tt>output-dir</tt><a id="uid3064"></a> = <b>mydir</b>
specifies the directory in which output files are to be stored (this concerns
the main <span class="sansserif">XML</span> file, the transcript file, and other files).</p>
</li>
<li id="uid3065"><p class="nofirst noindent"><tt>output-file</tt><a id="uid3066"></a> = <b>myfile</b>
tells <i>Tralics</i> to put the result in <span class="sansserif">myfile</span> (extension
<span class="sansserif">.xml</span> added if not given).
In the case of the Raweb, this option is ignored.</p>
</li>
<li id="uid3067"><p class="nofirst noindent"><tt>param</tt> = <b>foo=bar</b><a id="uid3068"></a>:
`foo="bar"´ is virtually added at the end of the configuration file.
The equals sign can be replaced by a space.</p>
</li>
<li id="uid3069"><p class="nofirst noindent"><tt>ps</tt><a id="uid3070"></a> (Raweb only): <i>Tralics</i> creates
a file `foo.tex´ from the file `foo2006.tex´, calls LaTeX, then dvips in
order to produce a PostScript file. The document class of the new file is
`raweb.cls´ instead of `raweb2006.cls´. This option exists for compatibility,
and may be withdrawn. This is the only case where no <span class="sansserif">XML</span> file is created.</p>
</li>
<li id="uid3071"><p class="nofirst noindent"><tt>ra-debug</tt><a id="uid3072"></a> (Raweb only):
parsing of the Raweb source continues after the first error.</p>
</li>
<li id="uid3073"><p class="nofirst noindent"><tt>rightquote</tt>=<b>num</b><a id="uid3074"></a> defines the translation of
the right quote (or apostrophe). The problem is the following: the default
translation of the left and right quote are often wrong; but you cannot make
these characters active, because the scanner assumes that they are of
category 12. The behaviour is the following: in verbatim mode,
(as well as in URLs) these characters behave normally; if doubled
translation is U+201C and U+201D. Otherwise
you can change the translation. If you say <tt>-leftquote=2018</tt> and
<tt>-rightquote=2019</tt> then characters U+2018 and U+2019 are used. Only
base16 digits are allowed; the value should be a number between 1 and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn> <mn>16</mn> </msup></math></span>
(otherwise default value is used).</p>
</li>
<li id="uid3075"><p class="nofirst noindent"><tt>shell-escape</tt><a id="uid3076"></a> makes
<samp>\write18{rm \jobname.tex}</samp> remove the file you are translating.</p>
</li>
<li id="uid3077"><p class="nofirst noindent"><tt>silent</tt><a id="uid3078"></a> make the program silent
(less lines are printed on the terminal).</p>
</li>
<li id="uid3079"><p class="nofirst noindent"><tt>te8</tt>, <tt>te1</tt>, <tt>te8a</tt>, or
<tt>te1a</tt><a id="uid3080"></a> specify the
encoding used in transcript files. In the case of te8 or te8a, characters are
printed using UTF-8 format; in the case of te1 or te1a, characters are
printed using latin1 encoding. Characters are printed using the
<samp>^^^^abcd</samp> notation in case:
the value if greater than 255, and one of -te8a, -te1a is given, or
the character is not in proper range (32-126 plus 160-155) and te1 is given,
the character is smaller then 32. Note: horizontal tabulation, line-feed and
carriage-return do not use the hat-hat notation. Default value is the output
encoding (option oe8, etc.).</p>
</li>
<li id="uid3081"><p class="nofirst noindent"><tt>tpa-status</tt>=<b>flag</b><a id="uid3082"></a> controls what
is to be translated if the configuration file specifies a titlepage
(see for instance the `titlepage.html´ document on the Web).
If the value is `all´, then
the whole document is translated; if the value is `title´, only the titlepage
is translated; if the value is `config´, action depends on the configuration
file.
Otherwise, translation stops in case of an error, continues otherwise.
Only the first character of the value is tested. Capital letters are allowed.</p>
</li>
<li id="uid3083"><p class="nofirst noindent"><tt>trivialmath</tt>=<b>N</b><a id="uid3084"></a> sets
the <samp>\notrivialmath</samp> counter to N (default is 1). Thus
trivial math formulas such as <samp>$\alpha$</samp> are translated as non-math.</p>
</li>
<li id="uid3085"><p class="nofirst noindent"><tt>type</tt>=<b>mytype</b><a id="uid3086"></a> specifies the configuration
file to use.
If you say `<tt>tralics -type ra hello</tt>´,
this will read the <span class="sansserif">ra.tcf</span> file, and you will
enter Raweb mode, and this is wrong because the name of the file contains
no year. If you say `<tt>tralics -type article miaou2003</tt>´, you are not
in Raweb mode, the preprocessor is not called, and 157 strange errors are
signaled because of different reasons. If you say `<tt>tralics -type ra
miaou2007</tt>´, the compilation will fail because <span class="sansserif">ra.tcf</span> was
designed for year 2006 and <span class="sansserif">ra2007.tcf</span> should be used instead.
If you say `<tt>tralics -type ra2007 miaou2003</tt>´, compilation fails
because the tcf file contains an instruction declaring <samp>\declaretopics</samp> to be
ignored, and this declaration is declared illegal by the raweb checker.</p>
</li>
<li id="uid3087"><p class="nofirst noindent"><tt>use-quotes</tt><a id="uid3088"></a> has as effect to convert
double quotes into a pair of single quotes, either left quotes, or
right quotes, that in turn can be replaced by other characters (for instance
French guillemets).</p>
</li>
<li id="uid3089"><p class="nofirst noindent"><tt>utf8</tt><a id="uid3090"></a>: sources files are assumed to be
UTF-8 encoded, unless the first line of a file contains `iso-8859-1´.</p>
</li>
<li id="uid3091"><p class="nofirst noindent"><tt>utf8output</tt><a id="uid3092"></a> is equivalent to
options `oe8´ and `te8´.</p>
</li>
<li id="uid3093"><p class="nofirst noindent"><tt>v</tt> and <tt>verbose</tt><a id="uid3094"></a> make the program rather
verbose (it prints a lot of lines in the transcript file).
The equivalent of the command <samp>\tracingall</samp> is executed.</p>
</li>
<li id="uid3095"><p class="nofirst noindent"><tt>V</tt> or <tt>verbose-doc</tt><a id="uid3096"></a>: the program is
rather verbose (see option v above), but only when <samp>\begin{document}</samp> is seen.
The equivalent of the command <samp>\tracingall</samp> is then executed.</p>
</li>
<li id="uid3097"><p class="nofirst noindent"><tt>version</tt><a id="uid3098"></a>: the program stops after
printing the banner.</p>
</li>
<li id="uid3099"><p class="nofirst noindent"><tt>xml</tt><a id="uid3100"></a>,
<tt>xmlfo</tt><a id="uid3101"></a>,
<tt>xmlhtml</tt><a id="uid3102"></a>,
<tt>xmllint</tt><a id="uid3103"></a>,
<tt>xmltex</tt><a id="uid3104"></a>,
<tt>xmlall</tt><a id="uid3105"></a> (Raweb only). These options
are incompatible with `check´ and `ps´. They ask <i>Tralics</i> to produce
an <span class="sansserif">XML</span> file, and maybe more (a <span class="sansserif">HTML</span> file in the case xmlhtml,
a FO file in the case xmlfo, a postscript file in the case xmltex)
and check the validity of the translation against the Raweb <span class="sansserif">DTD</span> (case xmllint).</p>
</li>
<li id="uid3106"><p class="nofirst noindent"><tt>year</tt>=<b>nb</b><a id="uid3107"></a>
(Raweb only) specifies
the default year (year 2005 starts at May, 1st, because people start
writing the Raweb2004 in September 2004, and everything should be finished
by March 2005).</p>
</li></ul>
<p>Example. Assume that we have a file, named <span class="sansserif">xii.tex</span>, containing</p>
<pre class="latex-code">\let~\catcode~`76~`A13~`F1~`j00~`P2jdefA71F~`7113jdefPALLF
PA''FwPA;;FPAZZFLaLPA//71F71iPAHHFLPAzzFenPASSFthP;A$$FevP
A@@FfPARR717273F737271P;ADDFRgniPAWW71FPATTFvePA**FstRsamP
AGGFRruoPAqq71.72.F717271PAYY7172F727171PA??Fi*LmPA&amp;&amp;71jfi
Fjfi71PAVVFjbigskipRPWGAUU71727374 75,76Fjpar71727375Djifx
:76jelse&amp;U76jfiPLAKK7172F71l7271PAXX71FVLnOSeL71SLRyadR@oL
RrhC?yLRurtKFeLPFovPgaTLtReRomL;PABB71 72,73:Fjif.73.jelse
B73:jfiXF71PU71 72,73:PWs;AMM71F71diPAJJFRdriPAQQFRsreLPAI
I71Fo71dPA!!FRgiePBt'el@ lTLqdrYmu.Q.,Ke;vz vzLqpip.Q.,tz;
;Lql.IrsZ.eap,qn.i. i.eLlMaesLdRcna,;!;h htLqm.MRasZ.ilk,%
s$;z zLqs'.ansZ.Ymi,/sx ;LYegseZRyal,@i;@ TLRlogdLrDsW,@;G
LcYlaDLbJsW,SWXJW ree @rzchLhzsW,;WERcesInW qt.'oL.Rtrul;e
doTsW,Wk;Rri@stW aHAHHFndZPpqar.tridgeLinZpe.LtYer.W,:jbye
</pre>
<p>If you call <i>Tralics</i>, with the option `find-words´, you can see that the
<span class="sansserif">XML</span> file contains once drumming and drummers, twice piping and pipers,
3 times leaping and lords, 4 times dancing and ladies, 5 times
milking and maids, 6 times swimming and swans, 7 times laying and
geese, 8 times rings and gold, 9 times calling and birds, 10 times
hens and french, 11 times doves, turtle and `and´,
12 times
tree, pear, in, partridge, me, to, gave, love, true, my, christmas, of, day,
the, on. There are 45 words with a single letter.
The words:
twelve, eleven, ten, nine, eight, seven, six, five, four, three, two, appear <span class="math"><i>x</i></span>
times, where <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>13</mn><mo>-</mo><mi>x</mi></mrow></math></span> is the value of the word. The words
first, second, third, fourth, fifth,
sixth, seventh, eighth, ninth, tenth, eleventh, twelfth appear once.
Amazing isn´t it? The file was written by D. Carlisle, it is available on the
CTAN. This is not really a LaTeX file, so that some features cannot be
applied (for instance, there is no at-begin-document hook).
The <samp>\bye</samp><a id="uid3108"></a> command was implemented in <i>Tralics</i> for this example to
compile without error.</p>

<h2 id="uid3109">6.3. Configuration files</h2>
<p>A configuration file is a way to alter the translation, using a special
syntax. It contains some rules that define a <i>Type</i> and some <i>tcf</i>
blocks, where a tcf block is identical to the content of a <i>tcf</i> file,
and a Type is the name of a tcf file (tcf stands for <i>Tralics</i> configuration
file).
The Type can be given as a command line argument, or in the main source,
provided that the following magic line appears near the beginning of
the document (the tcf file name is between quotes):</p>
<pre class="latex-code">% Tralics configuration file 'test0.tcf'
</pre>
<p>A tcf file may contain some blocks: for instance, a TitlePage block,
described later, or a Command block, that contains LaTeX commands inserted at
the start of the document; it contains also assignments of various types. In
particular, it contains the Document Type used in the <span class="sansserif">XML</span> output. As already
mentioned, the Document Type information can be given as a command line
argument; it may also be given in the main source file, if a magic like
the following appears near the start of the document (the <span class="sansserif">DTD</span> is
<span class="sansserif">classes.dtd</span>, with <tt class="txt">&lt;book&gt;</tt> as root element):</p>
<pre class="latex-code">% Tralics DOCTYPE = book classes.dtd
</pre>
<p>We explain here the default configuration file (that has little use anymore),
the old default configuration file (in use before 2006), the tcf file for the
Raweb, a tcf and plt file for Research Reports (we will show how the same
document can be compiled in two different ways).</p>
<h3 id="uid3110">6.3.1. The standard configuration file</h3>
<p>We give here the content of the standard configuration file.
As you can see, there are lots of comments. There is one assignment, this is a
rule that says that the Type to use is the document class of the input file.
There is a block that says that if this Type is report, book, article,
minimal, and if no tcf file is found for this Type, then <span class="sansserif">std.tcf</span>
should be used instead; this block says also that torture1 and torture2 are
aliases for torture (used only for debugging). Finally, there is a block
defining <span class="sansserif">std.tcf</span>:
it says that the Doctype to use is <span class="sansserif">classes.dtd</span>, and the root element
is <tt class="txt">&lt;std&gt;</tt>.</p>
<p>Lines 2 and 3 were modified: we added the letter `x´ after the dollar
sign, for otherwise RCS would replace the identification of the original file
by the identification of the LaTeX file.</p>
<pre class="latex-code"># This is a configuration file for tralics.
# $xId: tralics_rc,v 2.24 2006/07/24 08:23:17 grimm Exp $
## tralics ident rc=standard $xRevision: 2.24 $
 
# Copyright Inria. Jos\'e Grimm. Apics. 2004/2005 2006
# This file is part of Tralics.
 
% Some comments: comments start with % or #
 
% this means: take the documentclass value as type name
Type = \documentclass
 
## First type defined is the default. Since version 2.8,  there is only
## one type.
 
BeginType std#      standard latex classes
  DocType = std classes.dtd
End
 
BeginAlias
  torture torture1 torture2
  std report book article minimal
End
</pre>
<p>Comments: If no configuration file is found, default rules apply.
In particular, the default Type is the document class, and if no tcf file is
found, the DocType to use is unknown from unknown.dtd, unless
it is a standard LaTeX class, case where std from classes.dtd is used.
This means that the standard configuration file has become useless.</p>

<h3 id="uid3111">6.3.2. The old configuration file</h3>
<p>We shall describe here the old configuration file,
used before the notion of tcf files was invented.</p>
<p>Lines starting with a sharp sign or percent sign are comment lines
(ignored). Some lines start with `Begin´, and others
with `End´. To each Begin, there should be an associated End. Blocks can be
nested. Characters after
`End´ are ignored, so that you can say `BeginFoo´ followed by `EndBar´,
although it is not recommended. All other lines should be comment lines,
empty, or indented.</p>
<p>Note the `x´ after the dollar sign; it does not appear in the source file,
(see comment in the previous subsection). The third line is a bit special:
when <i>Tralics</i> loads the file, it prints the revision number on the terminal.</p>
<pre class="latex-code"><span class="prenumber">1</span> # This is a configuration file for tralics.
<span class="prenumber">2</span> # $xId: tralics_rc,v 2.15 2005/08/02 09:22:56 grimm Exp $
<span class="prenumber">3</span> ## tralics ident rc=standard $xRevision: 2.15 $
</pre>
<p>This is the Copyright notice. In the current version, the semantics of the RA
is in the ra.tcf file (described later).</p>
<pre class="latex-code"><span class="prenumber">4</span> # Copyright Inria. José Grimm. Apics. 2004/2005
<span class="prenumber">5</span> # This file is part of Tralics.
<span class="prenumber">6</span> # (See the file COPYING in the Tralics main directory)
<span class="prenumber">7</span> # If you modify this file, by changing the semantics of type RA,
<span class="prenumber">8</span> # please remove the `standard' on the `tralics ident' line above,
<span class="prenumber">9</span> # or replace it by `non-standard'.
<span class="prenumber">10</span>  
<span class="prenumber">11</span> % Some comments: comments start with % or #
</pre>
<p>A configuration file is split into main sections, one for each type. We start
with the RA, or raweb.</p>
<pre class="latex-code"><span class="prenumber">12</span> ## configuration for the RA (Inria's Activity Report)
<span class="prenumber">13</span> ## First type defined is the default
<span class="prenumber">14</span>  
<span class="prenumber">15</span> BeginType RA     % Case RA
<span class="prenumber">16</span>   DocType = raweb raweb3.dtd
<span class="prenumber">17</span>   DocAttrib = year \specialyear
<span class="prenumber">18</span>   DocAttrib = creator \tralics
</pre>
<p>This comment explains how to parametrize some element or attribute names
that were built-in in a
previous version of <i>Tralics</i>. We shall see later how
<span class="sansserif">Language</span><a id="uid3112"></a> can be used
(default value is `language´), the same for <span class="sansserif">lang_en</span><a id="uid3113"></a> and
<span class="sansserif">lang_fr</span><a id="uid3114"></a> that have `english´ and `french´ as default value.
Translation of a <samp>\caption</samp> produces an element <tt class="txt">&lt;caption&gt;</tt>, whose name
will be changed to <tt class="txt">&lt;head&gt;</tt> by the post-processor of figures (it will be
left unchanged if the caption is not in a figure or a table). The variable
<span class="sansserif">xml_caption_name</span><a id="uid3115"></a> can be used to change the
first name, and <span class="sansserif">xml_scaption_name</span><a id="uid3116"></a> can be
used to change the second
name. The title of a `topics´ (defined by <samp>\declaretopics</samp>) is in a
<tt class="txt">&lt;t_title&gt;</tt> element, the name can be changed by
<span class="sansserif">xml_topic_title</span><a id="uid3117"></a>. A reference to a topic uses
the <span class="sansserif">num</span> attribute; this attribute name can be changed by
<span class="sansserif">att_topic_num</span><a id="uid3118"></a>.
The identification of an
Inria Team is in <tt class="txt">&lt;accueil&gt;</tt>, this can be changed via
<span class="sansserif">xml_accueil_name</span>. It is
formed of a long name in <tt class="txt">&lt;projetdeveloppe&gt;</tt> and a short name
in <tt class="txt">&lt;projet&gt;</tt>, the name of these elements can be changed via
<a id="uid3119"></a>
<span class="sansserif">xml_project_name</span> or the `expanded´ version.
The section with the composition of the team is <tt class="txt">&lt;composition&gt;</tt>, its name
can be changed by <span class="sansserif">xml_composition_ra_name</span>
<a id="uid3120"></a>.</p>
<pre class="latex-code"><span class="prenumber">19</span>   #(new)
<span class="prenumber">20</span> #  Language = "xml:lang"
<span class="prenumber">21</span> #  lang_en =  "en"
<span class="prenumber">22</span> #  xml_scaption_name= "caption"
<span class="prenumber">23</span> # xml_topic_title=""
<span class="prenumber">24</span> #  xml_project_name = "title"
<span class="prenumber">25</span> #  xml_expanded_project_name = "longtitle"
<span class="prenumber">26</span> #  xml_accueil_name = "identification"
<span class="prenumber">27</span> #  xml_composition_ra_name = "team"
<span class="prenumber">28</span> #  att_topic_num = "id"
</pre>
<p>Processing of the Raweb needs converting the <span class="sansserif">XML</span> output of <i>Tralics</i> into
XSL/Format, <span class="sansserif">HTML</span>, etc., via some external commands like `xsltproc´, `latex´, etc.
Originally, <i>Tralics</i> was in charge of these commands, and the configuration
file explains how to call these tools. These lines are not needed anymore.</p>
<pre class="latex-code"><span class="prenumber">29</span>   makefo="xsltproc --catalogs -o %A.fo %B %C";
<span class="prenumber">30</span>   makehtml = "xsltproc --catalogs  %B %C";
<span class="prenumber">31</span>   call_lint = "xmllint --catalogs --valid  --noout %C"
<span class="prenumber">32</span>   makepdf = "pdflatex -interaction=nonstopmode %w"
<span class="prenumber">33</span>   %makedvi = "latex -interaction=nonstopmode %w"
<span class="prenumber">34</span>   % makedvi et dvips pour marie-pierre
<span class="prenumber">35</span>   %dvitops = "dvips %w.dvi -o %w.ps"
<span class="prenumber">36</span>   %makedvi = "latex -interaction=nonstopmode %w"
<span class="prenumber">37</span>   generatedvi = "latex -interaction=nonstopmode %t"
<span class="prenumber">38</span>   % old latex: "latex \\nonstopmode\\input{%t}"
<span class="prenumber">39</span>   generateps = "dvips %t.dvi -o %t.ps"
</pre>
<p>This defines the list of valid Raweb sections, themes and URs (research
units).
If you change these lines please:
a) remove the `standard´ on line 3, or b) make sure that it matches the
official list, or c) make sure that this remains a private copy.
A star after a section name says that topics are not allowed<a id="uid3121" href="#note70" title="This is new in version 2.5 (pl7)"><small>(note: </small>&#10163;<small>)</small></a>.</p>
<pre class="latex-code"><span class="prenumber">40</span> #these are new in version 2.0
<span class="prenumber">41</span>   theme_vals = "com cog num sym bio"
<span class="prenumber">42</span>   section_vals = "composition*/presentation*/fondements/domaine/logiciels/"
<span class="prenumber">43</span>   section_vals = "+resultats/contrats*/international*/diffusion*/"
<span class="prenumber">44</span>   ur_vals = "Rocquencourt//Sophia/Sophia Antipolis/Rennes//Lorraine//";
<span class="prenumber">45</span>   ur_vals = "+RhoneAlpes/Rhône-Alpes/Futurs//"
</pre>
<p>Due to some inertia, people continue using the obsolete environment.
We make sure an error is signaled.</p>
<pre class="latex-code"><span class="prenumber">46</span> BeginCommands
<span class="prenumber">47</span>  \newenvironment{body}{\obsoleteEnvBody The body environment is %
<span class="prenumber">48</span>      obsolete since 2003}
<span class="prenumber">49</span>    {End of obsolete environment body}
<span class="prenumber">50</span>  \newenvironment{abstract}{\obsoleteEnvAbstract The abstract %
<span class="prenumber">51</span>     environment is obsolete since 2003}
<span class="prenumber">52</span>   {End of obsolete environment abstract}
<span class="prenumber">53</span> EndCommands
<span class="prenumber">54</span>  
<span class="prenumber">55</span> End
</pre>
<p>This is an example of titlepage environment; it will be discussed later.
In fact, we shall give below the content of the <span class="sansserif">RR.tcf</span> file, it is
identical.</p>
<pre class="latex-code"><span class="prenumber">56</span> ## configuration for the RR (Research Report of Inria)
<span class="prenumber">57</span> ## not yet complete
<span class="prenumber">58</span>  
<span class="prenumber">59</span> BeginType RR#      Case RR
<span class="prenumber">60</span> ...
</pre>

<pre class="latex-code"><span class="prenumber">89</span> EndType
</pre>
<p>A short definition for standard classes.</p>
<pre class="latex-code"><span class="prenumber">90</span> BeginType std#      standard latex classes
<span class="prenumber">91</span>   DocType = std classes.dtd
<span class="prenumber">92</span>   xml_biblio = "bibliography"
<span class="prenumber">93</span> End
</pre>
<p>Some aliases.</p>
<pre class="latex-code"><span class="prenumber">94</span> # (types Article and slides are not defined, hence this is useless)
<span class="prenumber">95</span>  
<span class="prenumber">96</span> BeginAlias
<span class="prenumber">97</span>   Article report
<span class="prenumber">98</span>   slides inriaslides foiltex
<span class="prenumber">99</span> End
</pre>
<p>This command has to be outside any block.</p>
<pre class="latex-code"><span class="prenumber">100</span> % this means: take the documentclass value as type name
<span class="prenumber">101</span> Type = \documentclass
</pre>
<p>More aliases. Note that toto matches RR (first in list)
and report matches std (because `unknown´ is undefined).</p>
<pre class="latex-code"><span class="prenumber">105</span> BeginAlias
<span class="prenumber">106</span>   RR toto# ra2001
<span class="prenumber">107</span>   RA ra toto ra2001x%etc
<span class="prenumber">108</span>   torture torture1 torture2
<span class="prenumber">109</span>   unknown report
<span class="prenumber">110</span>   std report book article minimal
<span class="prenumber">111</span> End
</pre>
<p class="nofirst noindent">For fun.</p>
<pre class="latex-code"><span class="prenumber">112</span> ## an empty type
<span class="prenumber">113</span> BeginType MP
<span class="prenumber">114</span> EndType
</pre>
<p>This is used for testing <i>Tralics</i>.</p>
<pre class="latex-code"><span class="prenumber">115</span> BeginType torture
<span class="prenumber">116</span>   DocAttrib = creator \tralics
<span class="prenumber">117</span>   DocType  = ramain raweb.dtd
<span class="prenumber">118</span>   on package loaded calc CALC = "true"
<span class="prenumber">119</span>   on package loaded foo/bar FOO1 = "true"
<span class="prenumber">120</span>   on package loaded *foo/bar FOO2 = "true"
<span class="prenumber">121</span>   on package loaded foo/*bar FOO3 = "true"
<span class="prenumber">122</span>   on package loaded *foo/*bar FOO4 = "true"
<span class="prenumber">123</span>   url_font = "\large "
<span class="prenumber">124</span>   no_footnote_hack = "false"
<span class="prenumber">125</span>   on class loaded calc CALC="true"
<span class="prenumber">126</span>  
<span class="prenumber">127</span>   use_font_elt = "true"
<span class="prenumber">128</span>   xml_font_small = "font-small"
</pre>
<p>A bunch of declarations omitted here. The list of all options is given later,
in <span class="sansserif">test.tcf</span>.</p>
<pre class="latex-code"><span class="prenumber">154</span>   xml_underline_name = "font-underline"
<span class="prenumber">155</span>  
<span class="prenumber">156</span> BeginCommands
<span class="prenumber">157</span>   % These commands are inserted verbatim in the file
<span class="prenumber">158</span>   \def\recurse{\recurse\recurse}
<span class="prenumber">159</span> EndCommands
<span class="prenumber">160</span> EndType
</pre>
<p>This may be used for typesetting a bibliography, exactly like the Raweb.</p>
<pre class="latex-code"><span class="prenumber">161</span> BeginType rabib     % Case RA
<span class="prenumber">162</span>   DocType = raweb raweb3.dtd
<span class="prenumber">163</span>   DocAttrib = year \specialyear
<span class="prenumber">164</span>   DocAttrib = creator \tralics
<span class="prenumber">165</span>  
<span class="prenumber">166</span> BeginCommands
<span class="prenumber">167</span>   % These commands are inserted verbatim in the file
<span class="prenumber">168</span>   \newcommand\usebib[2]{\bibliography{#1#2,#1_foot#2+foot,#1_refer#2+refer}}
<span class="prenumber">169</span> EndCommands
<span class="prenumber">170</span> EndType
</pre>

<h3 id="uid3122">6.3.3. The ra.tcf file</h3>
<p>This is the tcf file used for the Raweb2006.
Read carefully the copyright notice.</p>
<pre class="latex-code"><span class="prenumber">1</span> # This is a configuration file for tralics, for the Raweb
<span class="prenumber">2</span> # $xId: ra.tcf,v 2.3 2006/07/25 16:29:39 grimm Exp $
<span class="prenumber">3</span> ## tralics ident rc=standard-ra $xRevision: 2.3 $
<span class="prenumber">4</span>  
<span class="prenumber">5</span>  
<span class="prenumber">6</span> # This file is part of Tralics.
<span class="prenumber">7</span> # Copyright Inria. Jos\'e Grimm. Apics. 2004/2005, 2006
<span class="prenumber">8</span> # (See the file COPYING in the Tralics main directory)
<span class="prenumber">9</span> # If you modify this file, by changing the semantics of the RA,
<span class="prenumber">10</span> # please remove the `standard-ra' on the `tralics ident' line above,
<span class="prenumber">11</span> # or replace it by `non-standard'.
</pre>
<p>A tcf file is a like the configuration file, but it applies to a single type
of document; for this reason, there is no need to explain how the type is
computed (no `Type´ declaration), neither to what type a block applies (there
is no `BeginType´ block). These three lines are the same as before.
Note that the 2007 <span class="sansserif">DTD</span> is raweb7.dtd.</p>
<pre class="latex-code"><span class="prenumber">12</span>   DocType = raweb raweb3.dtd
<span class="prenumber">13</span>   DocAttrib = year \specialyear
<span class="prenumber">14</span>   DocAttrib = creator \tralics
</pre>
<p>These line are as before, without commented out lines.</p>
<pre class="latex-code"><span class="prenumber">15</span>   makefo="xsltproc --catalogs -o %A.fo %B %C";
<span class="prenumber">16</span>   makehtml = "xsltproc --catalogs  %B %C";
<span class="prenumber">17</span>   call_lint = "xmllint --catalogs --valid  --noout %C"
<span class="prenumber">18</span>   makepdf = "pdflatex -interaction=nonstopmode %w"
<span class="prenumber">19</span>   generatedvi = "latex -interaction=nonstopmode %t"
<span class="prenumber">20</span>   generateps = "dvips %t.dvi -o %t.ps"
</pre>
<p>This values are the same as those shown above.</p>
<pre class="latex-code"><span class="prenumber">21</span>   theme_vals = "com cog num sym bio"
<span class="prenumber">22</span>   ur_vals = "Rocquencourt//Sophia/Sophia Antipolis/Rennes//Lorraine//";
<span class="prenumber">23</span>   ur_vals = "+RhoneAlpes/Rh\^one-Alpes/Futurs//"
</pre>
<p>In 2006, section_vals has the same value as shown above; in 2007
it is replaced by the following lines.</p>
<pre class="latex-code"><span class="prenumber">24</span>   fullsection_vals = "/composition/Team/presentation/Overall Objectives/\
<span class="prenumber">25</span>      fondements/Scientific Foundations/domaine/Application Domains/\
<span class="prenumber">26</span>      logiciels/Software/resultats/New Results/\
<span class="prenumber">27</span>      contrats/Contracts and Grants with Industry/\
<span class="prenumber">28</span>      international/Other Grants and Activities/diffusion/Dissemination"
</pre>
<p>New in 2006 are the two lists <tt>affiliation_vals</tt> and
<tt>profession_vals</tt>. The
syntax is the same as for other lists. The value given here is an example;
the real names are in French.</p>
<pre class="latex-code"><span class="prenumber">29</span>   affiliation_vals ="Inria//Cnrs//University//ForeignUniversity//"
<span class="prenumber">30</span>   affiliation_vals ="+Public//Other//"
<span class="prenumber">31</span>   profession_vals = "Scientist//Assistant//Technical//PHD//"
<span class="prenumber">32</span>   profession_vals = "+PostDoc//StudentIntern//Other//"
</pre>
<p>We have the same obsolete environments as before. Moreover, we declare that
<samp>\keywords</samp><a id="uid3123"></a> is the same as <samp>\motscle</samp><a id="uid3124"></a>; this is needed because we
removed the <samp>\keywords</samp> command (for the Raweb, this is an environment,
using it as a command will fail in a very strange manner).</p>
<pre class="latex-code"><span class="prenumber">33</span> BeginCommands
<span class="prenumber">34</span>  \let\keywords\motscle
<span class="prenumber">35</span>  \newenvironment{body}{\obsoleteEnvBody The body environment is %
<span class="prenumber">36</span>      obsolete since 2003}
<span class="prenumber">37</span>    {End of obsolete environment body}
<span class="prenumber">38</span>  \newenvironment{abstract}{\obsoleteEnvAbstract The abstract %
<span class="prenumber">39</span>      environment is obsolete since 2003}
<span class="prenumber">40</span>   {End of obsolete environment abstract}
<span class="prenumber">41</span> EndCommands
</pre>
<p>This is the command block for the ra2007. The last line does not appear in the
file, but is automatically added in Raweb mode; the command uses the values
saved by <samp>\theme</samp>, <samp>\UR</samp>
and its aliases, <samp>\project</samp> and its alias, <samp>\isproject</samp>.
Some are defined as doing nothing (like <samp>\maketitle</samp>,
<samp>\loadbiblio</samp>, <samp>\declaretopic</samp>, <samp>\TeamHasHdr</samp>). The <samp>\module</samp>
command is redefined: if the last argument is empty, a default value is used
instead.</p>
<pre class="latex-code"><span class="prenumber">42</span> BeginCommands
<span class="prenumber">43</span>  \makeatletter
<span class="prenumber">44</span>  \def\declaretopic#1#2{} %% obsolete in 2007
<span class="prenumber">45</span>  \def\TeamHasHdr#1{} %% temporary
<span class="prenumber">46</span>  \def\theme#1{\def\ra@theme{#1}}
<span class="prenumber">47</span>  \def\UR#1{\def\ra@UR{#1}}
<span class="prenumber">48</span>  \def\isproject#1{\def\ra@isproject{#1}}
<span class="prenumber">49</span>  \let\ResearchCenterList\UR
<span class="prenumber">50</span>  \let\ResearchCentreList\UR
<span class="prenumber">51</span>  \def\projet#1#2#3{\def\ra@proj@a{#1}\def\ra@proj@b{#2}\def\ra@proj@c{#3}}
<span class="prenumber">52</span>  \let\project\projet
<span class="prenumber">53</span>  \def\moduleref#1#2#3{\ref{mod:#3}}
<span class="prenumber">54</span>  \let\oldmodule\module %% Compatibility
<span class="prenumber">55</span>  \renewcommand\module[4][]{\oldmodule{#2}{#3}{\@ifbempty{#4}{(Sans Titre)}{#4}}}
<span class="prenumber">56</span> \let\htmladdnormallinkfoot\@@href@foot
<span class="prenumber">57</span> \let\htmladdnormallink\@@href
<span class="prenumber">58</span>  \makeatother
<span class="prenumber">59</span>  \let\maketitle\relax
<span class="prenumber">60</span>  \let\loadbiblio\relax
<span class="prenumber">61</span>  \let\keywords\motscle
<span class="prenumber">62</span> %%% \AtBeginDocument{\rawebstartdocument} %%% pseudo line
<span class="prenumber">63</span> EndCommands
</pre>
<p>New in 2008 is the following list. The argument of the catperso environment
must be one of XX, YY, ZZ, interpreted as xx, YY and zz. If the declaration is
omitted, there is no restriction on the argument. Whether or not there will be
such a restriction in the file <span class="sansserif">ra2008.tcf</span> is still undecided.</p>
<pre class="latex-code"><span class="prenumber">64</span> catperso_vals = "XX/xx/YY//ZZ/zz"
</pre>

<h3 id="uid3125">6.3.4. The RR.tcf file</h3>
<p>We indicate here the content of the RR.tcf file, it defines commands for the
title page of a Research Report.</p>
<pre class="latex-code"><span class="prenumber">1</span> ## tralics ident rc=RR.tcf $Revision: 1.29 $
<span class="prenumber">2</span> ## configuration for the RR (Research Report of Inria)
<span class="prenumber">3</span>  
<span class="prenumber">4</span>  
<span class="prenumber">5</span>   DocType = rr raweb.dtd
<span class="prenumber">6</span> BeginTitlePage
<span class="prenumber">7</span>   \makeRR &lt;RRstart&gt; "" "type = 'RR'"
<span class="prenumber">8</span>   alias \makeRT "" "type = 'RT'"
<span class="prenumber">9</span>  
<span class="prenumber">10</span>   &lt;UR&gt; -
<span class="prenumber">11</span>   \URSophia ?+&lt;UR&gt;
<span class="prenumber">12</span>   \URRocquencourt ?+&lt;UR&gt;
<span class="prenumber">13</span>   alias \URRocq
<span class="prenumber">14</span>   \Paris ?&lt;UR&gt; &lt;Rocquencourt&gt;
<span class="prenumber">15</span>   \URRhoneAlpes ?+&lt;UR&gt;
<span class="prenumber">16</span>   \URRennes ?+&lt;UR&gt;
<span class="prenumber">17</span>   \URLorraine ?+&lt;UR&gt;
<span class="prenumber">18</span>   \URFuturs ?+&lt;UR&gt;
<span class="prenumber">19</span>  
<span class="prenumber">20</span>   \RRtitle q&lt;title&gt; "pas de titre"
<span class="prenumber">21</span>   \RRetitle q&lt;etitle&gt;  "no title"
<span class="prenumber">22</span>   \RRprojet &lt;projet&gt; "pas de projet"
<span class="prenumber">23</span>   \motcle &lt;motcle&gt; "pas de motcle"
<span class="prenumber">24</span>   \keyword &lt;keyword&gt;  "no keywords"
<span class="prenumber">25</span>   \RRresume p&lt;resume&gt; "pas de resume"
<span class="prenumber">26</span>   \RRabstract p&lt;abstract&gt; "no abstract"
<span class="prenumber">27</span>   \RRauthor + &lt;author&gt; &lt;auth&gt; "Pas d'auteurs"
<span class="prenumber">28</span>   \RRdate &lt;date&gt; "\monthyearvalfr"
<span class="prenumber">29</span>   \RRNo &lt;RRnumber&gt; "????"
<span class="prenumber">30</span>  
<span class="prenumber">31</span>   \RRtheme &lt;&gt;  +"pas de theme" % CES
<span class="prenumber">32</span>   &lt;Theme&gt; -                    % E
<span class="prenumber">33</span>   \THNum ?+&lt;Theme&gt;             % CE
<span class="prenumber">34</span>   \THCog ?+&lt;Theme&gt;             % CE
<span class="prenumber">35</span>   \THCom ?+&lt;Theme&gt;             % CE
<span class="prenumber">36</span>   \THBio ?+&lt;Theme&gt;             % CE
<span class="prenumber">37</span>   \THSym ?+&lt;Theme&gt;             % CE
<span class="prenumber">38</span>  
<span class="prenumber">39</span> %%  \myself \RRauthor "grimm"  % CCS
<span class="prenumber">40</span> %%  \cmdp &lt;cmdp&gt; +"nodefault"  % CES
<span class="prenumber">41</span> %%  \cmda &lt;cmdA&gt; A"\cmdAval"   % CES
<span class="prenumber">42</span> %%  \cmdb &lt;cmdB&gt; B"\cmdBval"   % CES
<span class="prenumber">43</span> %%  \cmdc &lt;cmdC&gt; C"\cmdCval"   % CES
<span class="prenumber">44</span>  
<span class="prenumber">45</span> End
<span class="prenumber">46</span>  
<span class="prenumber">47</span> BeginCommands
<span class="prenumber">48</span>   \let\RRstyisuseful\relax
<span class="prenumber">49</span> End
</pre>

<h3 id="uid3126">6.3.5. The RR.plt file</h3>
<p>We indicate here the content of the RR.plt file, it also defines commands for
the title page of a Research Report. This is a TeX file, loaded whenever the
package `RR´ is used. Note that, if the RR.tcf file is loaded, the line 48
above defined a command that is checked on line 4 below, so that the file is
ignored. We shall explain later how these two files can be used.</p>
<pre class="latex-code"><span class="prenumber">1</span> % -*- latex -*-
<span class="prenumber">2</span> \ProvidesPackage{RR}[2006/10/03 v1.1  Inria RR for Tralics]
<span class="prenumber">3</span>  
<span class="prenumber">4</span> \ifx\RRstyisuseful\relax\endinput\fi
<span class="prenumber">5</span>  
<span class="prenumber">6</span> \newcommand\RRtitle[1]{{\let\\\ \xbox{ftitle}{#1}}}
<span class="prenumber">7</span> \newcommand\RRetitle[1]{{\let\\\ \xbox{title}{#1}}}
<span class="prenumber">8</span> \newcommand\RRauthor[1]{\xbox{author}{#1}}
<span class="prenumber">9</span> \newcommand\RRprojet[1]{\xbox{inria-team}{#1}}
<span class="prenumber">10</span> \newcommand\RRdate[1]{\xbox{date}{#1}}
<span class="prenumber">11</span> \newcommand\RRNo[1]{\xbox{rrnumber}{#1}}
<span class="prenumber">12</span> \newcommand\RRtheme[1]{\xbox{theme}{#1}}
<span class="prenumber">13</span> \newcommand\keyword[1]{\xbox{keyword}{#1}}
<span class="prenumber">14</span> \newcommand\motcle[1]{\xbox{motcle}{#1}}
<span class="prenumber">15</span> \newcommand\THNum{THnum}
<span class="prenumber">16</span> \newcommand\THCom{THcom}
<span class="prenumber">17</span> \newcommand\THCog{THcog}
<span class="prenumber">18</span> \newcommand\THSym{THsym}
<span class="prenumber">19</span> \newcommand\THBio{THbio}
<span class="prenumber">20</span> \newcommand\URSophia{\xbox{location}{Sophia Antipolis}}
<span class="prenumber">21</span> \newcommand\URLorraine{\xbox{location}{Lorraine}}
<span class="prenumber">22</span> \newcommand\URRennes{\xbox{location}{Rennes}}
<span class="prenumber">23</span> \newcommand\URRhoneAlpes{\xbox{location}{Rhône-Alpes}}
<span class="prenumber">24</span> \newcommand\URRocq{\xbox{location}{Rocquencourt}}
<span class="prenumber">25</span> \newcommand\URFuturs{\xbox{location}{Futurs}}
<span class="prenumber">26</span> \newcommand\RRresume[1]{\begin{xmlelement*}{resume}#1\end{xmlelement*}}
<span class="prenumber">27</span> \newcommand\RRabstract[1]{\begin{xmlelement*}{abstract}#1\end{xmlelement*}}
<span class="prenumber">28</span>  
<span class="prenumber">29</span> \let\makeRT\relax
<span class="prenumber">30</span> \let\makeRR\relax
</pre>

<h3 id="uid3127">6.3.6. Sample files</h3>
<p>The <i>Tralics</i> distribution comes with a bunch of test files.
There are two directories: the Test directory contains source files, and the
Modele directory contains the translation. In particular, the file
<span class="sansserif">tpa2.tex</span> explains how to use a tcf file to change the names of most
<span class="sansserif">XML</span> elements.</p>

<h2 id="uid3128">6.4. The action before translation</h2>
<p>As explained at the start of the Chapter, <i>Tralics</i> first reads all options.
Some of them are marked `Raweb only´; this means that they are not
used, unless the Type is ra (i.e. you are translating the Raweb, see next
section); this section describes how the Type is computed.</p>
<p>Unless <i>Tralics</i> is called with option <tt>interactive-math</tt>, an input file name is
required. The program is aborted if more than one input name is given.
It must be the name of a TeX file:
an extension <span class="sansserif">tex</span> is added if needed, so that <span class="sansserif">foo</span> and
<span class="sansserif">foo.tex</span> are the same. As an exception <span class="sansserif">foo.xml</span>
is also equivalent to <span class="sansserif">foo.tex</span>. We consider two examples, the
<span class="sansserif">xii.tex</span> shown above, and the following LaTeX file
<span class="sansserif">hello1.tex</span>:</p>
<pre class="latex-code">\documentclass{article}
\begin{document}
Hello, world!
\end{document}
</pre>

<h3 id="uid3129">6.4.1. Files and Paths</h3>
<p>The standard way to use <i>Tralics</i> is to type `tralics filename´ in a
terminal, example:</p>
<pre class="latex-code">grimm@macarthur$ tralics hello1
This is tralics 2.12, a LaTeX to XML translator, running on macarthur
...
Output written on hello1.xml (179 bytes).
No error found.
(For more information, see transcript file hello1.log)
grimm@macarthur$ ls hello1*
hello1.log      hello1.tex      hello1.xml
</pre>
<p class="nofirst noindent">The <tt>ls</tt> command shows the source, the result of the translation
and the transcript file. If the file <span class="sansserif">hello1.ult</span> were present, it
would be been read by <i>Tralics</i>, and if the source were a bit more complicated
the files <span class="sansserif">hello1.img</span> and <span class="sansserif">hello1_.bbl</span> might have been
created. All these files are in the same directory, and this paragraph
explains what you can do if input or output files are elsewhere.</p>
<p>Consider now a graphical interface to <i>Tralics</i>, where you drag and
drop the TeX source; in such a case there is no shell anymore, hence no
current directory; what <i>Tralics</i> gets is an absolute path name (that may be of
the form /users/somebody/somewhere). In early versions, such
an absolute path was a fatal error. Currently, only Unix-like pathnames
are implemented.</p>
<p>Consider now a system, like the Raweb, where the <span class="sansserif">XML</span> file produced by
<i>Tralics</i> is converted to another <span class="sansserif">XML</span> file (with a different DTD), and
further processed. Thus a great number of files are created, and managing all
these becomes uneasy. As the example below shows, you can ask <i>Tralics</i> to put
the files it creates in another directory, you can chose the name of the
<span class="sansserif">XML</span> output (so that <i>Tralics</i> can create <span class="sansserif">foo-t.xml</span> from
<span class="sansserif">foo.tex</span>, and this file can be processed again into
<span class="sansserif">foo.xml</span>), and you can also chose the name of the transcript file.</p>
<pre class="latex-code">grimm@macarthur$ tralics hello1 -o h2 -logfile=h3 -output_dir=../Test
This is tralics 2.12, a LaTeX to XML translator, running on macarthur
...
Output written on ../Test/h2.xml (179 bytes).
No error found.
(For more information, see transcript file ../Test/h3.log)
</pre>
<p>The input path is a colon separated list of directories. For instance
`<samp>../foo/A:/bar/B/::gee:</samp>´ contains five elements, two of them being empty.
The empty slot represents the current directory, it will be added at the end
if omitted. The current directory may also be given as a single dot. A final
slash is silently removed. In this example, the path means: search in
subdirectory A of the sibling directory foo, then if the subdirectory B of
the directory bar that is is at the root, then in the current directory, then
in the subdirectory gee of the current directory, then in the current
directory again; this rule does not apply if a file starts with a dot or a
slash.</p>
<p>A special case is when the main input file name starts with a dot or a
slash, for instance <span class="sansserif">/usr/grimm/home/hello</span> or
<span class="sansserif">./Test/hello.tex</span>.
In this case, the name is split into pieces. One piece is the entry name, say
<tt>hello</tt>, another one is the directory name (everything before the
final slash), and the last part is the extension (here <tt>.tex</tt>).
If no output directory is given on the command line, the directory of the
input file is used. In the same fashion</p>
<p>You can also specify the name of the transcript file;
By default, this is the entry name. If for instance you use
<span class="sansserif">/foo/bar</span>, then input file will be <span class="sansserif">/foo/bar.tex</span>
and the transcript file will be <span class="sansserif">/foo/bar.log</span>; you may change
the name of the transcript file, so as to get <span class="sansserif">/foo/myfile.log</span>;
you may change the directory of the transcript file, so as to get
<span class="sansserif">/mydir/bar.log</span>; you may change both.</p>
<p>Consider again the case where the input is <span class="sansserif">/foo/bar</span>.
If no input path is given, then <i>Tralics</i> behaves as if the file was bar,
and the input path was `<samp>foo:</samp>´. This has as consequence that, if bar
inputs another file, say bar1, it is first searched in the same directory as
bar, and then in the current directory. Moreover, if no output directory is
specified, files written by bar are put in this directory, thus can be read
again. If the user gives an input path, it will be left unchanged, and the
input path is not considered for the main path. Example: Directories foo and
foo1 contain files bar and bar1; bar inputs bar1, input path contains foo1. If
the main file is /foo/bar, it will input /foo1/bar1. If the input path
contains both foo and foo1, and the main file is bar, you will get either
/foo/bar and /foo/bar1 or /foo1/bar and /foo1/bar1, depending on the
order.</p>

<h3 id="uid3130">6.4.2. Finding the configuration</h3>
<p>There are some options that tell <i>Tralics</i> not to produce an <span class="sansserif">XML</span> file, we
shall not explain them. Thus, after parsing all arguments, <i>Tralics</i> reads the
complete source (main input file). It opens the transcript file, and
print on the terminal a line like <i>Starting translation of file
hello1.tex</i>. The transcript file will contain a bit more information, namely</p>
<pre class="log-code">Transcript file of tralics 2.12 for file hello1.tex
Copyright INRIA/MIAOU/APICS 2002-2008, Jos\'e Grimm
Tralics is licensed under the CeCILL Free Software Licensing Agreement
Start compilation: 2008/04/19 18:27:18
OS: Apple, machine macarthur
Starting translation of file hello1.tex.
Using iso-8859-1 encoding (idem transcript).
Left quote is ` right quote is '
Input path (../FO:../Test:)
++ Input encoding is 1 for ../Test/hello1.tex
</pre>
<p>After that, <i>Tralics</i> reads the configuration file. You can use the
<tt>-noconfig</tt> option, this inhibits reading a configuration file.
In this case the transcript file contains</p>
<pre class="log-code">No configuration file.
No type in configuration file
Seen \documentclass article
Potential type is article
Using some default type
dtd is std from classes.dtd (standard mode)
OK with the configuration file, dealing with the TeX file...
</pre>
<p class="nofirst noindent">The first line says that no configuration file is considered, so that an empty
one will be used instead. The TeX source is scanned for a document class.
If this is a standard one (book, article, report, minimal, the DTD is
std from classes.dtd, otherwise unknown from unknown. Consider now the same
file, without the <tt>-noconfig</tt> option. We get</p>
<pre class="log-code">++ file .tralics_rc does not exist.
++ file ../confdir/.tralics_rc exists.
Configuration file identification: standard $ Revision: 2.24 $
Read configuration file ../confdir/.tralics_rc.
Configuration file has type \documentclass
Seen \documentclass article
Potential type is article
Defined type: std
++ file article.tcf does not exist.
++ file ../confdir/article.tcf does not exist.
Alias torture does not match article
Potential type article aliased to std
Using type std
dtd is std from classes.dtd (standard mode)
</pre>
<p class="nofirst noindent">There are some lines starting with a double plus sign. Whenever <i>Tralics</i> searches if a file exists, it will print such in line in the transcript
file. The first two lines that do not start with a double plus are also
printed on the terminal (this is an easy way to check that that right
configuration file has been seen). The standard configuration file says that
they Type is the document class (here article). This is a true type, provided
that it is defined, and the configuration file does not define it. It could be
defined in <span class="sansserif">article.tcf</span>. But you can see that there is no such file.
As a consequence, the behavior is the same as if no configuration file has been
given.</p>
<p>This is what happens if the option <tt>config=rabib</tt> is given</p>
<pre class="log-code">Trying config file from user specs: rabib.tcf
++ file ../confdir/rabib.tcf exists.
Configuration file identification: rabib.tcf $ Revision: 2.2 $
Read configuration file ../confdir/rabib.tcf.
Using tcf type rabib
dtd is raweb from raweb3.dtd (standard mode)
</pre>
<p class="nofirst noindent">You can notice that a tcf file is being searched in the confdir directory.
If the name starts with a slash or a dot, no extension is added, and the file
is not searched in the configuration path. Assume that the source file
contains a line of the form</p>
<pre class="latex-code">% Tralics configuration file 'test0.tcf'
</pre>
<p class="nofirst noindent">and you neither specify a configuration file, nor inhibit loading one.
Then you will get</p>
<pre class="log-code">Trying config file from source file `test0'
++ file test0.tcf does not exist.
++ file ../confdir/test0.tcf exists.
Read configuration file ../confdir/test0.tcf.
Using tcf type test
catperso_vals: AA -&gt; BB
catperso_vals: CC -&gt; CC
catperso_vals: XX -&gt; xx
dtd is unknown from unknown.dtd (standard mode)
</pre>
<p class="nofirst noindent">As you can see, tcf extension is added, and the file is searched in the
current directory first, then in the configuration path.</p>
<p>You can call <i>Tralics</i> with option <tt>type=rabib</tt>. This just says that
the name of the tcf file should be rabib, instead of the document class; it is
thus useless if the name of the tcf file to use has been given as shown above.
It can be useful in the case of a plain TeX file, that has no document
class. In the example that follows, we say that the type is ra12.</p>
<pre class="log-code">++ file .tralics_rc does not exist.
++ file ../confdir/.tralics_rc exists.
Configuration file identification: standard $ Revision: 2.24 $
Read configuration file ../confdir/.tralics_rc.
Configuration file has type \documentclass
Seen \documentclass article
Potential type is ra12
++ file ra12.tcf does not exist.
++ file ../confdir/ra12.tcf does not exist.
++ file ra.tcf does not exist.
++ file ../confdir/ra.tcf exists.
Configuration file identification: standard-ra $ Revision: 2.3 $
Read tcf file ../confdir/ra.tcf
Using type ra
...
dtd is raweb from raweb3.dtd (mode RAWEB2007)
</pre>
<p class="nofirst noindent">Note that no file <span class="sansserif">ra12.tcf</span> was found, and <span class="sansserif">ra.tcf</span>
was used searched for. As a consequence, the effective type is ra, and Raweb mode
is entered; this is an error, since current file is not a ra file.
In fact, you will be faced to
<i>Fatal error: Input file name must be team name followed by 2007</i>.
Note that you can compile a file named <span class="sansserif">foo2006</span> in Raweb mode, as long as this matches the year option (if used) and the document class
is ra2006.</p>

<h3 id="uid3131">6.4.3. Old behaviour</h3>
<p>The algorithm is the following.</p>
<ol>
<li id="uid3132"><p class="nofirst noindent">If you say <tt>tralics -noconfig</tt>, then no configuration file is read at all.</p>
</li>
<li id="uid3133"><p class="nofirst noindent">If you say <tt>tralics -configfile=foo</tt>, then <i>Tralics</i> will print
<i>Trying config file from user specs</i>, and try to use this file.</p>
</li>
<li id="uid3134"><p class="nofirst noindent">If you say <tt>tralics -configfile=foo.tcf</tt>, then <i>Tralics</i> will
print the same as above; it will also search the file in the `confdir´
directory.</p>
</li>
<li id="uid3135"><p class="nofirst noindent">If the source file contains
`<samp>% tralics configuration file 'foobar'</samp>´, then <i>Tralics</i> will print
<i>Trying config file from source file</i>, and try to use this file.
In case of failure, and if the name `foobar´ contains no dot, the suffix .tcf
is added, and the next rule is applied.</p>
</li>
<li id="uid3136"><p class="nofirst noindent">If the source file contains
`<samp>% tralics configuration file 'foobar.tcf'</samp>´, then <i>Tralics</i> will print the same as above; it will also search the file in the `confdir´
directory.</p>
</li>
<li id="uid3137"><p class="nofirst noindent">The default configuration file is named <span class="sansserif">.tralics_rc</span> (or
<span class="sansserif">tralics_rc</span> on Windows). The current directory is looked at
first, then the tralicsdir, finally the home directory.</p>
</li>
<li id="uid3138"><p class="nofirst noindent">If you say <tt>tralics -dir TOTO</tt>, then
<span class="sansserif">TOTO/src/.tralics_rc</span> is the second try.</p>
</li>
<li id="uid3139"><p class="nofirst noindent">The home directory, or its <span class="sansserif">src</span> subdirectory, is searched
next. (Depending on the operating system, this can fail, because there is no
standard way of defining the home directory of the user).</p>
</li>
<li id="uid3140"><p class="nofirst noindent">If you set the shell variable <tt>TRALICSDIR</tt> to <span class="sansserif">somedir</span>,
or <tt>RAWEBDIR</tt> to <span class="sansserif">somedir</span>, then
<span class="sansserif">somedir/src</span><!--PASS THROUGH allowbreak--><span class="sansserif">/.tralics_rc</span> is the last try. If neither variable is
set, then some default location will be used.</p>
</li></ol>
<ul>
<li id="uid3141"><p class="nofirst noindent">If a configuration file has been given on the command line, but not
found according to rules 2 and 3, then no configuration file will be used.</p>
</li>
<li id="uid3142"><p class="nofirst noindent">For rules 4 and 5, only the first hundred lines of the source file are
considered, the line must start with a percent character; you can use an
upper case T in the string &#8220;tralics&#8221;; the configuration file name is
delimited by single quotes; the line can hold additional characters that are
ignored.</p>
</li>
<li id="uid3143"><p class="nofirst noindent">If a configuration file has been given in the source file, but not found
according to rules 4 and 5, then the default configuration file will be
used.</p>
</li>
<li id="uid3144"><p class="nofirst noindent">In the case of rules 3 and 5, a tcf file is looked at, say
<span class="sansserif">foo.tcf</span>. It
is first searched in the current directory, then in all directories
specified by the <tt>confdir</tt> options, then in a default directory. For
instance, if you say <tt>tralics -confdir=mydir/</tt> (final slash
optional), the second try would be <span class="sansserif">mydir/foo.tcf</span>. If this file is
not found, a default location, for instance <span class="sansserif">../confdir/foo.tcf</span>,
is tried. If you specify dir1 then dir2, then
the order will be: current directory, dir2, dir1, default directory.</p>
</li></ul>
<p>In current version, rules 4, 7, 8 and 9 have been removed.</p>

<h3 id="uid3145">6.4.4. Preparing the translation</h3>
<p>Let´s consider again file hello1, compiled with option type=rabib.
The transcript file contains the following lines.</p>
<pre class="log-code">OK with the configuration file, dealing with the TeX file...
There are 4 lines
Starting translation
\notrivialmath=1
{\countdef \count@=\count255}
</pre>
<p>After that, there is a bunch of lines of the form `countdef x=y´, and in
verbose mode, the bootstrap code, as explained later.
The meaning of the last line shown here is: all bootstrap
lines have been correctly read.</p>
<pre class="log-code">{changing \countref395332=0 into \countref395332=1}
[1] %% Begin bootstrap commands for latex
[2] \@flushglue = 0pt plus 1fil
...
[47] %% End bootstrap commands for latex
++ Input stack empty at end of file
</pre>
<p>Our configuration file contains a block of TeX code. The transcript file
shows them</p>
<pre class="log-code">[19]   % These commands are inserted verbatim in the file
[20] \newcommand\usebib[2]{\bibliography{#1#2,#1_foot#2+foot,#1_refer#2+refer}}
</pre>
<p>Our configuration file contains also</p>
<pre class="latex-code">DocAttrib = variable "va'&amp;quot;lue"
DocAttrib =Foo \World
DocAttrib =A \specialyear
DocAttrib =B  \tralics
DocAttrib =C  \today
</pre>
<p>The effect is to add an attribute to the main element.
The normal syntax is: <tt>DocAttrib = foo &#8220;bar&#8221;</tt>. The attribute name must
contain only ASCII letters, the value can consist of any character. An
apostrophe is replaced by <tt class="txt">&amp;apos;</tt>, double quotes must be given as
<tt class="txt">&amp;quot;</tt>, as well as some other special characters.
Using a command name instead of a string means that the value of the
command should be used. The value <samp>\tralics</samp> is replaced by a string
of the form `Tralics version 2.9´, and
<samp>\specialyear</samp> is replaced by
the year as used by the Raweb (the current year, in general). The command
<samp>\Word</samp> is undefined, and an error is signaled.</p>
<p>Before translating the document, the ult file is checked first.
Here, the star says that the @ character should be of category letter while
loading the file, and the plus sign says that the file should be searched in
the same directory as the main file, and not elsewhere. We finish by showing
the class file is found.</p>
<pre class="log-code">[1] \InputIfFileExists*+{hello1.ult}{}{}
++ file hello1.ult does not exist.
[1] \documentclass{article}
[2] \begin{document}
++ file article.clt does not exist.
++ file ../confdir/article.clt exists.
</pre>

<h2 id="uid3146">6.5. Translating the Raweb</h2>
<p>Raweb mode is entered if a configuration file is found that says that the type
to use is `RA´ or `ra´. The document class should be ra97, ra98, or, for later
years, ra1999. The example has ra2003. This must match the name of the input
file, which is <span class="sansserif">miaou2003</span>. The document can be translated in one of
three
versions: first, you may try latex, this gives <span class="sansserif">miaou2003.dvi</span>; then
we have a mode in which <span class="sansserif">miaou2003.tex</span> is converted into
<span class="sansserif">miaou.tex</span>, and <tt>latex</tt> can produce
<span class="sansserif">miaou.dvi</span>. Finally,
<i>Tralics</i> may produce <span class="sansserif">miaou.xml</span>, and this can be compiled into
<span class="sansserif">wmiaou.dvi</span>.</p>
<p>Historically, we had a Perl script for the conversion, this was extended to a
translator, then re-written in C++. You could edit the script and change it
(for instance, if a non-standard name for the LaTeX executable is needed).
Since <i>Tralics</i> is nowadays a binary file, you cannot edit it. For this reason
the configuration file contains some lines (see old configuration file, lines
29 to 39) that can be modified. These are copied into <span class="sansserif">user_param.pl</span>
and, after <i>Tralics</i> has produced a <span class="sansserif">XML</span> file, it calls an external program
(defined by the `externalprog´ switch, default being <span class="sansserif">rahandler.pl</span>).
If the current year (2003 in the example below) is 2007 or more, simplified ra
mode is entered, not postprocessor is called, and no file
<span class="sansserif">user_param.pl</span> is created. Here is an example:</p>
<pre><span class="prenumber">1</span> $::makefo='xsltproc --catalogs -o %A.fo %B %C';
<span class="prenumber">2</span> $::makehtml='xsltproc --catalogs  %B %C';
<span class="prenumber">3</span> $::checkxml='xmllint --catalogs --valid  --noout %C';
<span class="prenumber">4</span> $::makepdf='pdflatex -interaction=nonstopmode %w';
<span class="prenumber">5</span> $::makedvi='';
<span class="prenumber">6</span> $::dvitops='';
<span class="prenumber">7</span> $::generate_dvi='latex -interaction=nonstopmode %t';
<span class="prenumber">8</span> $::generate_ps='dvips %t.dvi -o %t.ps';
<span class="prenumber">9</span> $::raweb_dir='/user/grimm/home/cvs/raweb';
<span class="prenumber">10</span> $::raweb_dir_src='/user/grimm/home/cvs/raweb/src/';
<span class="prenumber">11</span> $::ra_year='2003';
<span class="prenumber">12</span> $::no_year='miaou';
<span class="prenumber">13</span> $::tex_file='miaou';
<span class="prenumber">14</span> $::todo_fo=0;
<span class="prenumber">15</span> $::todo_html=0;
<span class="prenumber">16</span> $::todo_tex=0;
<span class="prenumber">17</span> $::todo_lint=0;
<span class="prenumber">18</span> $::todo_ps=0;
<span class="prenumber">19</span> $::todo_xml=1;
<span class="prenumber">20</span> 1;
</pre>
<p>Here is an example of a source file, valid in 2003.</p>
<pre class="latex-code"><span class="prenumber">1</span> \documentclass{ra2003}
<span class="prenumber">2</span> \theme{Num}
<span class="prenumber">3</span> \isproject{YES} % \isproject{OUI} works also
<span class="prenumber">4</span> \projet{MIAOU}{Miaou}{Mathématiques et Informatique de
<span class="prenumber">5</span>    l'Automatique et de l'Optimisation pour l'Utilisateur}
<span class="prenumber">6</span> \def\foo{bar}
<span class="prenumber">7</span> \UR{\URSophia\URFuturs}
<span class="prenumber">8</span> \declaretopic{abc}{Topic abc}
<span class="prenumber">9</span> \declaretopic{def}{Topic def}
<span class="prenumber">10</span> \begin{document}
<span class="prenumber">11</span> \maketitle
<span class="prenumber">12</span> ...
<span class="prenumber">13</span> \begin{module}{composition}{en-tete}{}
<span class="prenumber">14</span> \begin{catperso}{Head of project team}
<span class="prenumber">15</span> \pers{Laurent}{Baratchart}[DR INRIA]
<span class="prenumber">16</span> \end{catperso}
<span class="prenumber">17</span> \end{module}
<span class="prenumber">18</span> \begin{module}{diffusion}{dif-conf}{Conferences and workshops}
<span class="prenumber">19</span> \begin{glossaire}\glo{A}{B\par C}\glo{A1}{B1\par C1}\end{glossaire}
<span class="prenumber">20</span> \begin{participants}
<span class="prenumber">21</span> \pers{Laurent}{Baratchart},
<span class="prenumber">22</span> \pers{José}{Grimm}
<span class="prenumber">23</span> \end{participants}
<span class="prenumber">24</span> \begin{motscle}
<span class="prenumber">25</span> meromorphic approximation, frequency-domain identification,
<span class="prenumber">26</span> extremal problems
<span class="prenumber">27</span> \end{motscle}
<span class="prenumber">28</span> \end{module}
<span class="prenumber">29</span> \loadbiblio
<span class="prenumber">30</span> \end{document}
</pre>
<p>This is what <i>Tralics</i> prints, for the full <span class="sansserif">miaou2003</span> document, in
verbose mode</p>
<pre class="latex-code">This is tralics 2.5 (pl7), a LaTeX to XML translator
Copyright INRIA/MIAOU/APICS 2002-2005, Jos\'e Grimm
Licensed under the CeCILL Free Software Licensing Agreement
Starting xml processing for miaou2003.
Configuration file identification: standard $ Revision: 2.14 $
Read configuration file /user/grimm/home/cvs/tralics/.tralics_rc.
</pre>
<p class="nofirst noindent">The lines that follow show the assignments from the configuration file.
Note that the year in the mode reflects the compilation data, not the year in
the source file.</p>
<pre class="latex-code">makefo=xsltproc --catalogs -o %A.fo %B %C
makehtml=xsltproc --catalogs  %B %C
makepdf=pdflatex -interaction=nonstopmode %w
generatedvi=latex -interaction=nonstopmode %t
generateps=dvips %t.dvi -o %t.ps
theme_vals=com cog num sym bio
dtd is raweb from raweb3.dtd (mode RAWEB2005)
</pre>
<p class="nofirst noindent">Following lines are specific to the Raweb. You can see a summary of all the
tests done by the program that converts <span class="sansserif">miaou2003.tex</span> to
<span class="sansserif">miaou.tex</span>. The statistics (number of environments, keywords, etc)
are computed by a preprocessor, that has been removed in 2007.</p>
<pre class="latex-code">Ok with the config file, dealing with the TeX file...
Activity report for MIAOU (Miaou)
Mathématiques et Informatique de l'Automatique et de l'Optimisation pour l'Utilisateur
There are 138 environments
Checked 15 keyword env with 60 keywords (52 unique)
Checked 8 catperso and 31 participant(es) envs with 146 \pers
There were 2 topics
Sections (and # of modules): 1(1) 2(1) 3(2) 4(6) 5(5) 6(13) 7(4) 8(5) 9(3).
</pre>
<p class="nofirst noindent">Whenever a section or a chapter is translated, a line is printed on the
terminal. There is a complaint at the end, about a lonely module without
title. A title is invented, namely `(Sans Titre)´. A non-trivial task for the
post-processor is to remove it (it should not appear on the <span class="sansserif">HTML</span> pages).
In 2007, this has become an error.</p>
<pre class="latex-code">Translating section composition
Translating section presentation
Translating section fondements
Translating section domaine
Translating section logiciels
Translating section resultats
Translating section contrats
Translating section international
Translating section diffusion
Bib stats: seen 57 entries
Seen 64 bibliographic entries
(SansTitre) Only one module seen in the section
Problem with sans titre 1
There was 1 NoTitle not handled
</pre>
<p class="nofirst noindent"><i>Tralics</i> prints now statistics.</p>
<pre class="latex-code">Used 1756 commands
Math stats : formulas 503, non trivial kernels 299, cells 10227,
   special 1 trivial 149, \mbox 5 large 0 small 118.
List stats: short 0 inc 10 alloc 43456
Buffer realloc 41 string 15750 size 610086; merge 7
Macros created 80 deleted 0
Save stack +1582 -1582
Attribute list search 7539(1494) found 3154 in 5616 elements (1401 after boot)
Number of ref 92, of used labels 36, of defined labels 73, of ext. ref. 19
Modules with 24, without 16, sections with 9, without 15
There were 6 images.
Output written on miaou.xml (250758 bytes).
No error found.
(For more information, see transcript file miaou2003.log)
</pre>
<p class="nofirst noindent">Here you can see the call to the post-processor.</p>
<pre class="latex-code">rahandler.pl v2.12, (C) 2004 INRIA, José Grimm, projet APICS
Postprocessor did nothing
</pre>
<p>Since 2006, the syntax of the <samp>\pers</samp> command in a `catperso´ environment
has changed. Example:</p>
<pre class="latex-code">\begin{catperso}{Category test}
\pers{Jean}{Dupond}{Scientist}{Inria}
\pers{Jean}{Dupont}{Assistant}{Cnrs}[][yes]
\pers{Jean}{Durand}{Technical}{University}[][]
\pers{Jean}{Durant}{PHD}{ForeignUniversity}[with a T]
\pers{Jean}{Dumas}{PostDoc}{Public}[with a S]
\pers{Jean}{Dumat}{StudentIntern}{Other}[bla bla ][no]
\pers{Jean}{Dumont}{ Other }{Other}[bla bla ][no]
\end{catperso}
</pre>
<p>Here are the commands specific to the Raweb:</p>
<ul>
<li id="uid3147"><p class="nofirst noindent">The document class should be `ra2003´ (the number must match the suffix
of the file name). The document should start with <samp>\maketitle</samp> (see line
11) and end with <samp>\loadbiblio</samp>, see line 29. These commands are set to
<samp>\relax</samp> by the translator.</p>
</li>
<li id="uid3148"><p class="nofirst noindent">Some commands can be placed before <samp>\begin{document}</samp>. They will be
evaluated in order. Then all commands outside a `module´ environment are
executed (modules may be re-ordered)<a id="uid3149" href="#note71" title="This re-ordering mechanism has been removed in 2007"><small>(note: </small>&#10163;<small>)</small></a>.
Strange results can be obtained... so
that it is better not to put anything between modules.</p>
</li>
<li id="uid3150"><p class="nofirst noindent">You use <samp>\project</samp><a id="uid3151"></a>, or <samp>\projet</samp><a id="uid3152"></a>, with three arguments.
The first argument is the name of the Team. After converting to lower case
letters, this must be the name of the file. The second argument can be empty
(in this case the name of the Team is used). Any LaTeX command is allowed
(remember: this is the official name of the Team). Then comes the long name
(see example, lines 4-5).</p>
</li>
<li id="uid3153"><p class="nofirst noindent">You use <samp>\theme</samp><a id="uid3154"></a> to specify the theme. The argument must be one
of those defined by the configuration file. The case is irrelevant. See
example, line 2.</p>
</li>
<li id="uid3155"><p class="nofirst noindent">You use <samp>\isproject</samp><a id="uid3156"></a>, to say whether this is a &#8220;Project&#8221; or
not (an argument that starts with y, Y, o or O is true). See example, line 3.
Note that the Miaou team has been dissolved on 12/31/2003, and replaced by
Apics, a team that had not the status of &#8220;project&#8221; until 01-01-2005.</p>
</li>
<li id="uid3157"><p class="nofirst noindent">The command <samp>\localisation</samp><a id="uid3158"></a> is obsolete.</p>
</li>
<li id="uid3159"><p class="nofirst noindent">You use <samp>\UR</samp><a id="uid3160"></a> for explaining in which UR the team is
localized. Line 7 gives an example of a team in `Sophia´ and `Futurs´. The
list of valid URs are defined by the configuration file (see example, lines
45, 46). The `UR´ prefix is not in the configuration file.
The translator will
see a single command, instead of all these four; in the example it is:</p>
<pre class="latex-code">\RAstartprojet{num}{1}{Miaou}{Mathématiques et Informatique de l'Automatique
et de l'Optimisation pour l'Utilisateur}{Sophia Antipolis --- Futurs}
</pre>
</li>
<li id="uid3161"><p class="nofirst noindent">You can use <samp>\declaretopic</samp><a id="uid3162"></a><a id="uid3163" href="#note72" title="It is ignored since 2007"><small>(note: </small>&#10163;<small>)</small></a>. At most ten topics can be
declared. The first argument will be replaced by a unique id. For
instance, the translator will see the following, instead of lines 8 and 9.</p>
<pre class="latex-code">{\declaretopic{1}{Topic abc}\declaretopic{2}{Topic def}}
</pre>

</li>
<li id="uid3164"><p class="nofirst noindent">You can use the module<a id="uid3165"></a> environment. Modules cannot be
nested. A module is the equivalent of a <samp>\section</samp>, so that you cannot
use the <samp>\section</samp> command; you can use <samp>\subsection</samp>. The first
argument of the environment is the section name. It can be empty, meaning
the same section as the previous module.
The list of valid sections is defined by the configuration file. The first
section cannot have more then one module. A module can have an optional
argument (before the section name), a topic reference (the translator will see
the numeric value)<a id="uid3166" href="#note73" title="It is ignored since 2007"><small>(note: </small>&#10163;<small>)</small></a>.
This is ignored, in the case a star follows the section name
in the configuration file<a id="uid3167" href="#note74" title="Feature introduced in version 2.5 (pl7)"><small>(note: </small>&#10163;<small>)</small></a>. Then comes the module
name and the module title. The module name must be unique, and consists only in
letters, digits, and dashes. The module title should not be empty
(module in the `composition´ section are special; this is an awful hack,
because the translator does not know which section is the composition section.)
The translator will see</p>
<pre class="latex-code">\begin{module}{MIAOU}{1}{en-tete}{module1}{module\textit{title}!}
... \end{module}
</pre>
<p class="nofirst noindent">Here `MIAOU´ is the name of the team, `1´ the section number, and `module1´
the unique identifier associated to the module.</p>
</li>
<li id="uid3168"><p class="nofirst noindent">You can use the `catperso´<a id="uid3169"></a> environment, only in a module in section
one. You can use `participants´ in other sections. These environments
contain <samp>\pers</samp> commands (separated by commas in a `participants´).</p>
</li>
<li id="uid3170"><p class="nofirst noindent">You can use <samp>\pers</samp> only as indicated above. The program checks a lot
a things<a id="uid3171" href="#note75" title="Most of them removed since 2007"><small>(note: </small>&#10163;<small>)</small></a>.
Between the first name and the last name, there can be an optional
argument, a particle. After the last name, there can be an optional
argument. For 2006: after the last name is a mandatory argument that must
match the `profession_vals´ defined by the configuration file, a second
mandatory argument that must match the `affiliation_vals´ defined by the
configuration file, an optional argument, a second optional argument that
says if the person has a <i>habilitation</i> or equivalent. The example
shown above is invalid (official keywords are in French).</p>
</li>
<li id="uid3172"><p class="nofirst noindent">You should not use the `abstract´ and `body´ environments.</p>
</li>
<li id="uid3173"><p class="nofirst noindent">You can use the `motscle´<a id="uid3174"></a> environments for keywords.</p>
</li>
<li id="uid3175"><p class="nofirst noindent">You can use a glossary (see line 19).</p>
</li>
<li id="uid3176"><p class="nofirst noindent">You can use <samp>\moduleref</samp> for a reference to a module.<a id="uid3177" href="#note76" title="This is an obsolescent command; it may one day become obsolete"><small>(note: </small>&#10163;<small>)</small></a></p>
<p>As a consequence, each module has an implicit label; the statistics shown
above say that, of the 73 labels defined, only 36 were used; in fact, 40 of
them were implicit.</p>
</li>
<li id="uid3178"><p class="nofirst noindent">The environments `glossaire´<a id="uid3179"></a>,
`moreinfo´<a id="uid3180"></a>, `participants´<a id="uid3181"></a> and
`keywords´<a id="uid3182"></a>
are designed for modules only. The statistics say :
<i>Modules with 24, without 16, sections with 9, without 15</i>. You have to
interpret this as: there are 24 modules and 9 other
sectioning commands (like <samp>\subsection</samp>) with such an information;
there is a total of 40 modules (in accordance with <i>Sections (and # of modules): 1(1) 2(1) 3(2)
4(6) 5(5) 6(13) 7(4) 8(5) 9(3)</i>).</p>
</li></ul>
<p>More information is available on the Web page.</p>
<p>The following commands can be used in any document, but they are specific to
the Raweb.</p>
<ul>
<li id="uid3183"><p class="nofirst noindent"><samp>\RAstartprojet</samp><a id="uid3184"></a><samp>{a}</samp><samp>{b}</samp><samp>{c}</samp><samp>{d}</samp><samp>{e}</samp>. The
translation is a <tt class="txt">&lt;accueil&gt;</tt> element. You should not use this command,
because its translation depends on parameters that are not arguments.</p>
</li>
<li id="uid3185"><p class="nofirst noindent"><samp>\begin{RAsection}</samp><samp>{domaine}</samp> ...<samp>\end{RAsection}</samp><a id="uid3186"></a>.
The translation
is a <tt class="txt">&lt;domaine&gt;</tt> element; it can be the target of a <samp>\ref</samp>, if a
<samp>\label</samp> is used, it can also be the target of a <samp>\moduleref</samp>, but this
is a bad idea, because the section may disappear, if the Raweb is viewed as a
sequence of topics. The first argument can be any character sequence.
Note: This is automatically generated, it should not
appear in a Raweb source, otherwise the result is not conforming to the
Raweb <span class="sansserif">DTD</span>.</p>
</li>
<li id="uid3187"><p class="nofirst noindent"><samp>\begin{module}</samp><samp>{MIAOU}</samp><samp>{9}</samp><samp>{dif-conf}</samp><samp>{module28}</samp><samp>{Some title}</samp> ...<samp>\end{module}</samp></p>
<p class="nofirst noindent">The syntax is a bit different from what is in the input source. The
translation is</p>
<pre class="xml-code">&lt;module id='uid75' html='module28'&gt;&lt;head&gt;Some title&lt;/head&gt;...
</pre>
<p class="nofirst noindent">A module can be the target of a <samp>\ref</samp>, or a <samp>\moduleref</samp> via its name
(in the example `dif-conf´). The name does not appear in the <span class="sansserif">XML</span> result.
The value
`module28´ is computed by the preprocessor. The first two arguments are
ignored.</p>
</li>
<li id="uid3188"><p class="nofirst noindent"><samp>\begin{participants}</samp> ...<samp>\end{participants}</samp>.
<a id="uid3189"></a>
<a id="uid3190"></a>The name of the environment can be `participantes´, the final S can be omitted. The
translation is an element with the same name. Locally <samp>\par</samp> is redefined
to do nothing. No text is allowed. If you look at the example, the comma at
the end of line 21 is necessary, but should not be translated.</p>
</li>
<li id="uid3191"><p class="nofirst noindent"><samp>\begin{catperso}</samp><samp>{title}</samp> ...<samp>\end{catperso}</samp>.
<a id="uid3192"></a>This is like `participants´, but it takes an argument. No
commas should be given here. The configuration file may impose restrictions on
the value of the title.</p>
</li>
<li id="uid3193"><p class="nofirst noindent"><samp>\declaretopic</samp><a id="uid3194"></a><samp>{a}</samp><samp>{b}</samp>.
The translation is a <tt class="txt">&lt;topic&gt;</tt>
element, with attribute <span class="sansserif">num</span> equal to <samp>a</samp>, containing an element
<tt class="txt">&lt;t_titre&gt;</tt> containing the translation of <samp>b</samp>.</p>
</li>
<li id="uid3195"><p class="nofirst noindent"><samp>\begin{moreinfo}</samp> ...<samp>\end{moreinfo}</samp>. The translation is a
<tt class="txt">&lt;moreinfo&gt;</tt> element. Paragraphs are allowed.</p>
</li>
<li id="uid3196"><p class="nofirst noindent"><samp>\moduleref</samp><a id="uid3197"></a><samp>[y]</samp><samp>{t}</samp><samp>{s}</samp><samp>{m}</samp>.
Argument <samp>y</samp> is optional; only empty
values are allowed. Argument <samp>t</samp> is unused (this must be the name of the
team in uppercase letters). If <samp>m</samp> is empty, this is reference to section
<samp>s</samp>, otherwise to module <samp>m</samp>.</p>
</li>
<li id="uid3198"><p class="nofirst noindent"><samp>\pers</samp><a id="uid3199"></a>. There are two variants, <samp>\persA</samp> and <samp>\persB</samp>.
The <samp>\persA</samp> command (used outside a `catperso´ environment)
takes two arguments, first name and last name, with an
optional argument between them (a particle), and an optional argument after
the name (info).
The particle is merged with the last name (it exists only for
historical reasons). If the last name contains a footnote, it is moved to the
info argument. After that, we have three arguments. Initial and final spaces
are removed. The command <samp>\@persA</samp> is called on these.</p>
</li>
<li id="uid3200"><p class="nofirst noindent"><samp>\persB</samp><a id="uid3201"></a> is the variant used, since 2006, in a `catperso´
environment.
The syntax is: a required argument, the first name of the person, an optional
argument, the particle, a required argument, the last name of the person, a
required argument, the professional category of the person, a required
argument, the organization of the person, an optional argument, the info
field, and an optional argument, the HDR flag. Example <samp>\pers</samp>
<samp>{Rose}</samp> <samp>{Dieng-Kuntz}</samp> <samp>{Scientist}</samp> <samp>{Inria}</samp>
<samp>[Chevalier de la légion d´honneur]</samp> <samp>[yes]</samp>. The process
is the same as for a normal <samp>\persA</samp>: The particle is merged with the last
name (it exists only for historical reasons). If the last name contains a
footnote, it is moved to the info argument. After that, we have six
arguments. Initial
and final spaces are removed. The function <samp>\@persB</samp> is called on these.</p>
</li>
<li id="uid3202"><p class="nofirst noindent"><samp>\@persA</samp><samp>{First}</samp><samp>{Last}</samp><samp>{Info}</samp><a id="uid3203"></a>.
Initial and final spaces are removed from the arguments. An optional comma
after the <samp>\persA</samp> command is removed. The result is a <tt class="txt">&lt;pers&gt;</tt> element
with two attributes nom and prenom that contain the first and last names, the
value of the element being the info argument.
The command is only allowed in a `catperso´ or `participants´ environment.
For instance</p>
<pre class="latex-code">\begin{catperso}{List of Very Important Persons}
\makeatletter
\def\@persA#1#2#3{\xbox{pers}{\xbox{firstname}{#1}%
 \xbox{lastname}{#2}\xbox{info}{#3}}}
\let\pers\persA
\pers{Jean}[de la]{Fontaine}
\pers{Donald}{Knuth}[author of \TeX]
\pers{Leslie}{Lamport}
\end{catperso}
</pre>
<p class="nofirst noindent">translates as</p>
<pre class="xml-code">&lt;catperso&gt;&lt;head&gt;List of Very Important Persons&lt;/head&gt;
&lt;pers&gt;&lt;firstname&gt;Jean&lt;/firstname&gt;&lt;lastname&gt;de la Fontaine&lt;/lastname&gt;
   &lt;info/&gt;&lt;/pers&gt;
&lt;pers&gt;&lt;firstname&gt;Donald&lt;/firstname&gt;&lt;lastname&gt;Knuth&lt;/lastname&gt;
   &lt;info&gt;author of &lt;TeX/&gt;&lt;/info&gt;&lt;/pers&gt;
&lt;pers&gt;&lt;firstname&gt;Leslie&lt;/firstname&gt;&lt;lastname&gt;Lamport&lt;/lastname&gt;
  &lt;info/&gt;&lt;/pers&gt;
&lt;/catperso&gt;
</pre>
</li>
<li id="uid3204"><p class="nofirst noindent"><samp>\@persB</samp><a id="uid3205"></a>.
The command takes six arguments, it does all checks required
by the Raweb.
The command is only allowed in a `catperso´ environment.</p>
<p>You can redefine it. Example</p>
<pre class="latex-code">\begin{catperso}{List of Very Important Persons 2}
\makeatletter
\def\@persB#1#2#3#4#5#6{\xbox{pers}{\xbox{firstname}{#1}\xbox{lastname}{#2}%
\xbox{main-interest}{#3}\xbox{nationality}{#4}\xbox{info}{#5}\xbox{hdr}{#6}}}
\pers{Jean}[de la]{Fontaine}{Tales}{French}[][phd]
\pers{Donald}{Knuth}{Math}{American}[ author of \TeX]
\pers{Leslie}{Lamport }{Computer Science}{American}
\end{catperso}
</pre>
<p class="nofirst noindent">Translation</p>
<pre class="xml-code">&lt;catperso&gt;&lt;head&gt;List of Very Important Persons 2&lt;/head&gt;
&lt;pers&gt;&lt;firstname&gt;Jean&lt;/firstname&gt;&lt;lastname&gt;de la Fontaine&lt;/lastname&gt;
   &lt;main-interest&gt;Tales&lt;/main-interest&gt;
   &lt;nationality&gt;French&lt;/nationality&gt;&lt;info/&gt;&lt;hdr&gt;phd&lt;/hdr&gt;&lt;/pers&gt;
&lt;pers&gt;&lt;firstname&gt;Donald&lt;/firstname&gt;&lt;lastname&gt;Knuth&lt;/lastname&gt;
     &lt;main-interest&gt;Math&lt;/main-interest&gt;&lt;nationality&gt;American&lt;/nationality&gt;
     &lt;info&gt;author of &lt;TeX/&gt;&lt;/info&gt;&lt;hdr/&gt;&lt;/pers&gt;
&lt;pers&gt;&lt;firstname&gt;Leslie&lt;/firstname&gt;&lt;lastname&gt;Lamport&lt;/lastname&gt;
   &lt;main-interest&gt;Computer Science&lt;/main-interest&gt;
   &lt;nationality&gt;American&lt;/nationality&gt;&lt;info/&gt;&lt;hdr/&gt;
&lt;/pers&gt;
&lt;/catperso&gt;
</pre>

</li></ul>

<h2 id="uid3206">6.6. Tracing commands</h2>
<p>In some cases, TeX or <i>Tralics</i> produce wrong results, incomprehensible
error messages, and so on. In these cases, you must use specialized commands
to see what happens. Since the internal structure of TeX is not the same
as <i>Tralics</i>, the results in the transcript file may be different.</p>
<p>We have explained the command <samp>\show</samp><a id="uid3207"></a>: it prints the meaning of a
command (useful for a user defined command) and <samp>\showthe</samp><a id="uid3208"></a> (this
shows the value of a variable, counter, a token list, etc). We have also
mentioned that <samp>\showbox</samp><a id="uid3209"></a> prints the content of a TeX box or <span class="sansserif">XML</span> element. There is a command <samp>\showlists</samp><a id="uid3210"></a>; its effect is to indicate
the global context; this is not implemented in <i>Tralics</i>. The typical example
is from the TeXbook. Given the test file:</p>
<pre class="latex-code">\tracingcommands=1
\hbox{
$
\vbox{
\noindent$$
x\showlists
$$}$}\bye
</pre>
<p class="nofirst noindent">This is the result of the <samp>\showlists</samp> command.</p>
<pre class="log-code">### display math mode entered at line 5
\mathord
.\fam1 x
### internal vertical mode entered at line 4
prevdepth ignored
### math mode entered at line 3
### restricted horizontal mode entered at line 2
\glue 3.33333 plus 1.66666 minus 1.11111
spacefactor 1000
### vertical mode entered at line 0
prevdepth ignored
</pre>
<p class="nofirst noindent">This example does not compile in <i>Tralics</i>: you cannot put a <samp>\vbox</samp> in a
math formula. You cannot put a display math formula in a formula.</p>
<p>TeX provides 9 commands of the form <samp>\tracingXXXX</samp> described earlier.
Each variable defines an integer (in general, positive means verbose). There
is a command <samp>\tracingall</samp><a id="uid3211"></a> that turns everything on. In <i>Tralics</i>, it
sets <samp>\tracingmacros</samp><a id="uid3212"></a>, <samp>\tracingoutput</samp><a id="uid3213"></a>,
<samp>\tracingcommands</samp><a id="uid3214"></a> and <samp>\tracingrestores</samp><a id="uid3215"></a> to 1.
Only these variables are useful in <i>Tralics</i> (the command
<samp>\tracingmath</samp><a id="uid3216"></a> is new in version 2.11, it controls the math printing).
For instance,
<samp>\tracingonline</samp><a id="uid3217"></a> controls whether or not anything is printed on the
terminal; for <i>Tralics</i>, debugging information is only printed on the
transcript file. Variables like <samp>\tracingparagraphs</samp><a id="uid3218"></a> and
<samp>\tracingpages</samp><a id="uid3219"></a> show line-break and page-break calculations, performed
by TeX but not by <i>Tralics</i>. The command <samp>\tracingoutput</samp><a id="uid3220"></a> shows boxes
when they are shipped out (in <i>Tralics</i>, the whole <span class="sansserif">XML</span> tree is printed at the
end; if the command is positive, lines are printed, whenever used by the
scanner), <samp>\tracinglostchars</samp><a id="uid3221"></a> indicates all characters not found in
the fonts (<i>Tralics</i> never looks at font properties).</p>
<p>The command
<samp>\tracingstats</samp><a id="uid3222"></a> indicates that TeX should gather all statistical
information available; in <i>Tralics</i>, statistics are always computed; if you
call it with the `silent´ switch, statistics are not printed on the
terminal. Note that the `verbose´ switch calls <samp>\tracingall</samp>.</p>
<p>There are three remaining commands: <samp>\tracingmacros</samp><a id="uid3223"></a> is used whenever
a user command is expanded, <samp>\tracingrestores</samp><a id="uid3224"></a> whenever things are
popped from the save stack, and finally, <samp>\tracingcommands</samp><a id="uid3225"></a> for all other
commands. Let´s start with the example given on page <a href="#uid124" title="Defining new commands">2.1</a>.
This is what you see if <samp>\tracingoutput</samp> is positive:</p>
<pre class="log-code">[4] \def\foo#1{\xbar#1}
[5] \def\xbar#1{{\itshape #1}}
[6] \foo{12}
</pre>
<p class="nofirst noindent">It shows the input.
This is what you see if <samp>\tracingmacros</samp> is positive:</p>
<pre class="log-code">\foo #1-&gt;\xbar #1
#1&lt;-12
\xbar #1-&gt;{\itshape #1}
#1&lt;-1
</pre>
<p class="nofirst noindent">This is what you see if <samp>\tracingrestores</samp> is positive:</p>
<pre class="log-code">+stack: level + 2 for brace
{Push p 1}
{font restore }
+stack: level - 2 for brace
</pre>
<p class="nofirst noindent">This is now what you see if <samp>\tracingcommands</samp> is positive:
As you can see, some commands produce more than one line in the transcript
file. For instance, a line is printed for <samp>\def</samp> when the command is seen,
another one when the whole definition is read.</p>
<pre class="log-code">{\def}
{\def \foo #1-&gt;\xbar #1}
{\def}
{\def \xbar #1-&gt;{\itshape #1}}
{begin-group character {}
{\itshape}
{font change \itshape}
Character sequence: 1.
{end-group character }}
{Text:1}
Character sequence: 2 .
{Text:2
}
</pre>
<p>This is the start of the trace on page <a href="#uid141" title="Defining commands in LaTeX">2.2</a>:</p>
<pre class="log-code">[61] \begin{x}a b c \end{x}
{\begin}
{\begin x}
+stack: level + 3 for environment
</pre>
<p class="nofirst noindent">What you can see is that <samp>\begin</samp> produces three lines, the second line
holds the name of the environment; the last line explains that the stack
pointer was changed from 2 to 3; the system remembers that the change comes
from an environment, so a closing brace of a <samp>\endgroup</samp> command is
illegal. Later on, the trace says:</p>
<pre class="log-code">Character sequence: ZbAY c .
{\end}
{Text:ZbAY c }
{\end x}
\endx -&gt;by\end {y}ay
</pre>
<p class="nofirst noindent">In TeX, instead of the first line, you would have seen:</p>
<pre class="log-code">{the letter Z}
{blank space  }
{the letter c}
{blank space  }
</pre>
<p class="nofirst noindent"><i>Tralics</i> shows all characters it translates; it puts them on a single line.
The character sequence is printed on the transcript file, because the command
<samp>\end</samp> wants to be logged. After that, we have a line that contains `Text´
in braces. The text is added to the current <span class="sansserif">XML</span> element; a line is printed
whenever the buffer is flushed. The buffer is flushed here because it might be
used by the internal routine that scans the argument of <samp>\end</samp>.
The transcript file contains also:</p>
<pre class="log-code">Character sequence: ay.
{\endgroup (for env)}
{Text:ay}
+stack: ending environment x; resuming document.
+stack: level - 3 for environment
Character sequence:  .
</pre>
<p class="nofirst noindent">Normally, each line of the form `level +3´, is followed by a line `level -3´,
after that the current level is 2. The last line contains
<i>Character sequence</i>, followed by a colon, a space, some characters, a
period. Instead of `some characters´, you see only a space, it could be any
character token with the category code of a space. In our case,
it is the new line character that marks the end of the
line. If the example is followed by an empty line, you will see:</p>
<pre class="log-code">[62]
{\par}
{Text:
}
</pre>
<p class="nofirst noindent">What you see here is: open brace, <i>Text</i>, colon, some text, close brace.
Here `some text´ is the space above, shown as a new line character. What the
<samp>\par</samp> command does is: a) flush the buffer, so that the text is printed,
b) remove space at end of paragraph, c) terminate the element and unwind the
<span class="sansserif">XML</span> stack. The next line shows this `pop´. The integer 1 is the number of
elements on the stack after the pop; you see the content of the stack, just
before it is popped, in case the topstack is wrong. After the underscore,
there is a suffix that indicates the mode (here <samp>p_v</samp> means that vertical
mode will be entered after the pop).</p>
<pre class="log-code">{Pop 1: document_v p_v}
</pre>
<p>This is an example from page <a href="#uid181" title="Some small examples">2.3</a>:</p>
<pre class="log-code">\E -&gt;\expandafter
{\expandafter \E \E}
\E -&gt;\expandafter
\E -&gt;\expandafter
{\expandafter \expandafter \def}
{\expandafter \def \toto}
\toto -&gt;\titi !
{\def}
{\def \titi !-&gt;7}
</pre>
<p class="nofirst noindent">This shows that <samp>\expandafter</samp><samp>\foo</samp><samp>\bar</samp> shows all three
tokens. This can be interesting if these tokens come from the expansion of
other tokens. For instance, in a case like this</p>
<pre class="latex-code">\def\y{yy}
\def\foo{\textit\y}
\expandafter\expandafter\foo
</pre>
<p class="nofirst noindent">it is interesting to know that <samp>\y</samp> is expanded before <samp>\textit</samp>.</p>
<p>The next one is from page <a href="#uid766" title="Using the variables">2.6</a>.</p>
<pre class="log-code">[346] \skip\count0=2pt plus \parindent \relax
{\skip}
+scanint for \count-&gt;0
+scanint for \skip-&gt;1
+scanint for \skip-&gt;2
+scandimen for \skip-&gt;2.0pt
+scandimen for \skip-&gt;3.0pt
{scanglue 2.0pt plus 3.0pt}
{\relax}
</pre>
<p class="nofirst noindent">In TeX, there is a big recursive function that converts characters
into integers, dimensions and glue. The interesting point is the following:
We have two commands <samp>\skip</samp> and <samp>\relax</samp>. The purpose of <samp>\relax</samp> is
to stop scanning the glue, because an optional `minus´ term.
You will not see <samp>\parindent</samp> nor <samp>\count</samp>. The TeX output, in this
case, consists of two lines. <i>Tralics</i> offers 6 more lines. The last line
holds the glue that is effectively read and put in the register. There are
three calls to the internal function `scanint´, the first is the number of the
count register, the second is the number of the skip register, the last is
the integer part of the dimension. There are two calls to the internal routine
`scandimen´, one for each component of the glue (the shrink component is
omitted, hence not read).</p>
<p>The next example comes from page <a href="#uid766" title="Using the variables">2.6</a>.</p>
<pre class="log-code"><span class="prenumber">1</span> [3506] \count0=2\ifnum\count0=\count13\fi4
<span class="prenumber">2</span> {\count}
<span class="prenumber">3</span> +scanint for \count-&gt;0
<span class="prenumber">4</span> +\ifnum3532
<span class="prenumber">5</span> +scanint for \count-&gt;0
<span class="prenumber">6</span> +scanint for \ifnum-&gt;7
<span class="prenumber">7</span> +\fi3532
<span class="prenumber">8</span> +scanint for \count-&gt;13
<span class="prenumber">9</span> +scanint for \ifnum-&gt;7
<span class="prenumber">10</span> +iftest3532 true
<span class="prenumber">11</span> +scanint for \count-&gt;2
<span class="prenumber">12</span> {\relax}
<span class="prenumber">13</span> +\fi3532
<span class="prenumber">14</span> Character sequence: 4 .
</pre>
<p class="nofirst noindent">We have already explained that `scanint´ is used to read something in
case of assignment; as you can see, the procedure is also called in the case
of a conditional. This example is a bit strange. Let´s explain what
happens. A line of characters is read (see line L1), tokens are constructed,
expanded and evaluated. The evaluator sees a first token, printed on line L2.
This matches the rule: &lt;simple assignment&gt;, in fact, the first clause,
which is &lt;variable assignment&gt;, that is defined as
&lt;integer variable&gt; &lt;equals&gt; &lt;number&gt;, and the first term
is <samp>\count</samp>&lt;8-bit number&gt;. There are two calls to `scanint´, the
first with a range check. In order to makes things
easier to understand, we have given an index to each call, like <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>1</mn> </msub></math></span>, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>2</mn> </msub></math></span>, etc.</p>
<p>The job of <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>1</mn> </msub></math></span> is easy: there is one digit, printed on L3. The equals
character is the first unread character. It is an &lt;equals&gt;.
After the equals sign an integer is read, via <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>2</mn> </msub></math></span>. This sees the digit 2,
then the conditional <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>I</mi> <mn>3532</mn> </msub></math></span>. This number was computed by <i>Tralics</i>, it is
printed on line L4 to make debug easier. The <samp>\ifnum</samp> command reads two
numbers, and a character between them, and compares the numbers.
First number is read via <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>3</mn> </msub></math></span>. In fact, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>3</mn> </msub></math></span>
sees <samp>\count</samp> and calls <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>4</mn> </msub></math></span>. Procedure <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>4</mn> </msub></math></span> sees the number 0, followed
by an equals sign. It prints that value on line L5. Now <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>3</mn> </msub></math></span> knows that its
value is in <samp>\count0</samp>, this is 7, printed on line L6. After that,
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>I</mi> <mn>3532</mn> </msub></math></span> has a first number 7, and sees the equal sign, and reads the second
number via <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>5</mn> </msub></math></span>. This sees <samp>\count</samp> and reads a number via <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>6</mn> </msub></math></span>. This
reads 13. Then comes <samp>\fi</samp>. The <samp>\fi</samp> command prints line L7
on the transcript file. This terminates <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>I</mi> <mn>3532</mn> </msub></math></span>. This is not possible: our
conditional is still reading the second number. As a consequence, two tokens
are pushed back, a <samp>\fi</samp> and a <samp>\relax</samp>, in this order: the <samp>\relax</samp>
is read again first. This terminates expansion of the <samp>\fi</samp>.</p>
<p>Our procedure <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>6</mn> </msub></math></span> is programmed to fully
expand tokens, and read them as long as digits are seen (even if the result
overflows). It is unaware of the
fate of the <samp>\fi</samp> token. All it knows is that the first unexpandable token
after the digit 3 is <samp>\relax</samp>.
Thus, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>6</mn> </msub></math></span> has finished its jobs: the value is 13, printed on line L8.
Then <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>5</mn> </msub></math></span> knows its result: the value is <samp>\count13</samp>, hence 7, printed on
line L9. After that, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>I</mi> <mn>3532</mn> </msub></math></span>
has two numbers, they are the same, the test is true, as can been seen on line
L10. Normal expansion resumes;
however the condition stack has a marker that tells that the next <samp>\fi</samp> or
<samp>\else</samp> matches <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>I</mi> <mn>3532</mn> </msub></math></span>. If the test had been false, the expansion of
the test would have read, at high speed, all tokens up to the next <samp>\fi</samp> or
<samp>\else</samp>. There are four unread tokens: a <samp>\relax</samp>, a <samp>\fi</samp>, the digit
4, and the newline character.
Remember <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>2</mn> </msub></math></span>: this is a procedure that has
read a digit, and wonders what follows. It does not care how complicated the
task of `expand´ may be. It just wants a non-expandable token. In fact, the
current token is <samp>\relax</samp>. Thus, <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msub xmlns:xlink="http://www.w3.org/1999/xlink"><mi>S</mi> <mn>2</mn> </msub></math></span> knows it has read all digits; it
prints the result of the transcript file L11. As a consequence, 2 is stored in
<samp>\count0</samp>. The <samp>\relax</samp> token does nothing (let´s hope nobody has
redefined it), see line L12. The conditional is terminated because of the
inserted <samp>\fi</samp>
token, line L13. After the last character on the line is translated, a new
line is read, and a line of the form L1 will be printed; before a line is
added to the transcript file, the internal buffer is flushed, this explains
line L14.
Note that the following sequence provokes an error in TeX(if both counters
are equal)</p>
<pre class="latex-code">\edef\FOO{\ifnum\count1=\count13\fi}
\expandafter\def\FOO{2x}
</pre>
<p class="nofirst noindent">It is accepted by <i>Tralics</i>. As a consequence, the special <samp>\relax</samp> token
inserted by TeX always behaves like <samp>\relax</samp>.</p>
<p>When <i>Tralics</i> sees a <samp>\else</samp> in a true condition, it reads everything at
high speed, until finding the matching <samp>\fi</samp>; the example below shows the
trace in such a case.</p>
<pre class="log-code"><span class="prenumber">1</span> [1] \iftrue \else \ifcat 11\ifx ab \else \fi \ifnum1=2 \else \fi \fi\fi
<span class="prenumber">2</span> +\iftrue1
<span class="prenumber">3</span> +iftest1 true
<span class="prenumber">4</span> +\else1
<span class="prenumber">5</span> +\ifcat1(+1)
<span class="prenumber">6</span> +\ifx1(+2)
<span class="prenumber">7</span> +\else1(+2)
<span class="prenumber">8</span> +\fi1(+2)
<span class="prenumber">9</span> +\ifnum1(+2)
<span class="prenumber">10</span> +\else1(+2)
<span class="prenumber">11</span> +\fi1(+2)
<span class="prenumber">12</span> +\fi1(+1)
<span class="prenumber">13</span> +\fi1
</pre>

<h2 id="uid3226">6.7. Pictures and friends</h2>
<p>We explain here the translation of some commands related to the picture
environment. The syntax is unusual. In some cases, a pair of integers or a
pair of real numbers are read. These numbers are multiplied by the value of
the current unit of length, and the <span class="sansserif">XML</span> file contains these values, in pt,
without the unit. The default value of <samp>\unitlength</samp><a id="uid3227"></a> is 1pt.
For instance</p>
<pre class="latex-code">\setlength{\unitlength}{3pt}
\def\ten{10}
\put(\ten,\ten.2){x}
</pre>
<p class="nofirst noindent">translates as <tt class="txt">&lt;pic-put xpos=´30´ ypos=´30.59999´&gt;x&lt;/pic-put&gt;</tt>.
As the example shows, arithmetic on scaled integers is exact, but `10.2´
cannot be represented exactly. In some cases, arguments are converted to
attributes, and errors can be signaled.
In the case `<samp>\put(1.2.3,4) {}</samp>&#8221;, you will see <i>Missing unit (replaced by
pt) {Character . of catcode 12}</i>, followed by three
other errors. In the case of `<samp>\makebox(1,2)[$\alpha$]{x}</samp>´ the error is
<i>unexpected element formula</i>. Without the dollar signs, an error is
signaled, the math formula is discarded, a second error is signaled with
<i>unexpected element error</i>. If you invoke <i>Tralics</i> with
`-noxmlerror´, the first error produces no <tt class="txt">&lt;error&gt;</tt> element, so that there
is only one error.</p>
<ul>
<li id="uid3228"><p class="nofirst noindent"><samp>\begin{picture}</samp><samp>(A,B)(C,D)</samp> ...<samp>\end{picture}</samp>.<a id="uid3229"></a>
The first two arguments are required, the other ones are optional.
Normally, there should be no text in the environment, the mode is neither
horizontal not vertical, <samp>\par</samp> commands are forbidden. Example:</p>
<pre class="latex-code">\begin{picture}(1,2)
\begin{picture}(3,4)(5,6)
  1=1
\end{picture}
\end{picture}
</pre>
<p class="nofirst noindent">This translates as</p>
<pre class="xml-code">&lt;picture width='1' height='2'&gt;
   &lt;picture xpos='5' ypos='6' width='3' height='4'&gt;
     1=1
   &lt;/picture&gt;
&lt;/picture&gt;
</pre>

</li>
<li id="uid3230"><p class="nofirst noindent"><samp>\fboxrule</samp><a id="uid3231"></a>, <samp>\fboxsep</samp><a id="uid3232"></a>. These two dimensions are defined
by LaTeX, unused by <i>Tralics</i>. Default values: 0pt and 3pt.</p>
</li>
<li id="uid3233"><p class="nofirst noindent"><samp>\makebox</samp><a id="uid3234"></a><samp>(A,B)[x]</samp><samp>{y}</samp>. This translates the value <span class="math"><i>y</i></span>, inside a
group (as is the case for all `box´ commands that follow). The result is
<tt class="txt">&lt;pic-framebox&gt;</tt> element, with attributes <span class="sansserif">width</span>=`A´,
<span class="sansserif">height</span>=`B´, and <span class="sansserif">position</span>=`x´.</p>
</li>
<li id="uid3235"><p class="nofirst noindent"><samp>\framebox</samp><a id="uid3236"></a><samp>(A,B)[x]</samp><samp>{y}</samp>. Same as <samp>\makebox</samp> above, but the
attribute <span class="sansserif">framed</span> is set to true. As an example, the translation of</p>
<pre class="latex-code">\makebox(1,2)[l]{\it x}
\makebox(1,2){\it x}
\framebox(1,2)[l]{\it x}
\framebox(1,2){\it x}
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;pic-framebox width='1' height='2' position='l'&gt;
    &lt;hi rend='it'&gt;x&lt;/hi&gt;&lt;/pic-framebox&gt;
&lt;pic-framebox width='1' height='2'&gt;
    &lt;hi rend='it'&gt;x&lt;/hi&gt;&lt;/pic-framebox&gt;
&lt;pic-framebox width='1' height='2' position='l' framed='true'&gt;
    &lt;hi rend='it'&gt;x&lt;/hi&gt;&lt;/pic-framebox&gt;
&lt;pic-framebox width='1' height='2' framed='true'&gt;
    &lt;hi rend='it'&gt;x&lt;/hi&gt;&lt;/pic-framebox&gt;
</pre>
</li>
<li id="uid3237"><p class="nofirst noindent"><samp>\makebox</samp><a id="uid3238"></a><samp>[w][x]</samp><samp>{y}</samp>. See alternate syntax above. The first
argument must be a dimension, it is the width of the box; its value is
currently ignored. The second
argument must be one character of `lrcs´. A paragraph is started if
necessary. The result is a <tt class="txt">&lt;mbox&gt;</tt> element, containing the translation of
<span class="math"><i>y</i></span>, unless either the box
contains only a <tt class="txt">&lt;figure&gt;</tt>, or if it contains only text (characters, and
font changes), case where the result is <span class="math"><i>y</i></span>.</p>
</li>
<li id="uid3239"><p class="nofirst noindent"><samp>\mbox</samp><a id="uid3240"></a><samp>{y}</samp>. This is exactly like <samp>\makebox</samp>, with a
simple syntax. For instance:</p>
<pre class="latex-code">\makebox{\it x} \mbox{\it x}
\makebox[2cm]{y\it x}
\makebox[2cm][l]{\it x}
\makebox{$x$} \mbox{$x$}
\makebox{\xbox{foo}{bar}} \mbox{\xbox{foo}{bar}}
\makebox{\includegraphics{x}}\mbox{\includegraphics{x}}
</pre>
<p class="nofirst noindent">translates as</p>
<pre class="xml-code">&lt;hi rend='it'&gt;x&lt;/hi&gt; &lt;hi rend='it'&gt;x&lt;/hi&gt;
&lt;mbox&gt;y&lt;hi rend='it'&gt;x&lt;/hi&gt;&lt;/mbox&gt;
&lt;mbox position='l'&gt;&lt;hi rend='it'&gt;x&lt;/hi&gt;&lt;/mbox&gt;
&lt;mbox&gt;&lt;formula type='inline'&gt;&lt;simplemath&gt;x&lt;/simplemath&gt;&lt;/formula&gt;&lt;/mbox&gt;
&lt;mbox&gt;&lt;formula type='inline'&gt;&lt;simplemath&gt;x&lt;/simplemath&gt;&lt;/formula&gt;&lt;/mbox&gt;
&lt;mbox&gt;&lt;foo&gt;bar&lt;/foo&gt;&lt;/mbox&gt; &lt;mbox&gt;&lt;foo&gt;bar&lt;/foo&gt;&lt;/mbox&gt;
&lt;figure rend='inline' file='x'/&gt;&lt;figure rend='inline' file='x'/&gt;
</pre>

</li>
<li id="uid3241"><p class="nofirst noindent"><samp>\framebox</samp><a id="uid3242"></a><samp>[w][x]</samp><samp>{y}</samp>. This is like <samp>\makebox</samp>, but the
result is a <tt class="txt">&lt;fbox&gt;</tt>, instead of <tt class="txt">&lt;mbox&gt;</tt>, with attribute <span class="sansserif">rend</span>
=`boxed´. In the case where the content is a <tt class="txt">&lt;figure&gt;</tt>, then no box is
created but the attribute <span class="sansserif">framed</span> is added to the figure.</p>
</li>
<li id="uid3243"><p class="nofirst noindent"><samp>\fbox</samp><a id="uid3244"></a><samp>{y}</samp>. Like <samp>\framebox</samp>, with a simple syntax. For
instance</p>
<pre class="latex-code">\framebox{\it x} \fbox{\it x}
\framebox[2cm]{y\it x}
\framebox[2pt][l]{\it x}
\framebox{$x$} \fbox{$x$}
\framebox{\xbox{foo}{bar}} \fbox{\xbox{foo}{bar}}
\framebox{\includegraphics{x}} \fbox{\includegraphics{x}}
</pre>
<p class="nofirst noindent">translates as</p>
<pre class="xml-code">&lt;fbox rend='boxed'&gt;&lt;hi rend='it'&gt;x&lt;/hi&gt;&lt;/fbox&gt;
&lt;fbox rend='boxed'&gt;&lt;hi rend='it'&gt;x&lt;/hi&gt;&lt;/fbox&gt;
&lt;fbox width='56.9055pt' rend='boxed'&gt;y&lt;hi rend='it'&gt;x&lt;/hi&gt;&lt;/fbox&gt;
&lt;fbox width='2.0pt' position='l' rend='boxed'&gt;&lt;hi rend='it'&gt;x&lt;/hi&gt;&lt;/fbox&gt;
&lt;fbox rend='boxed'&gt;&lt;formula type='inline'&gt;&lt;simplemath&gt;x&lt;/simplemath&gt;
  &lt;/formula&gt;&lt;/fbox&gt;
&lt;fbox rend='boxed'&gt;&lt;formula type='inline'&gt;&lt;simplemath&gt;x&lt;/simplemath&gt;
   &lt;/formula&gt;&lt;/fbox&gt;
&lt;fbox rend='boxed'&gt;&lt;foo&gt;bar&lt;/foo&gt;&lt;/fbox&gt;
&lt;fbox rend='boxed'&gt;&lt;foo&gt;bar&lt;/foo&gt;&lt;/fbox&gt;
&lt;figure framed='true' rend='inline' file='x'/&gt;
&lt;figure framed='true' rend='inline' file='x'/&gt;
</pre>

</li>
<li id="uid3245"><p class="nofirst noindent"><samp>\scalebox</samp><a id="uid3246"></a><samp>{x}</samp><samp>{y}</samp>.
The translation is a <tt class="txt">&lt;scalebox&gt;</tt> containing <span class="math"><i>y</i></span>, with a <span class="sansserif">scale</span>
attribute whose value is <span class="math"><i>x</i></span>.</p>
</li>
<li id="uid3247"><p class="nofirst noindent"><samp>\rotatebox</samp><a id="uid3248"></a><samp>{x}</samp><samp>{y}</samp>.
The translation is a <tt class="txt">&lt;pic-rotatebox&gt;</tt> containing <span class="math"><i>y</i></span>, with a <span class="sansserif">angle</span>
attribute whose value is <span class="math"><i>x</i></span>.</p>
</li>
<li id="uid3249"><p class="nofirst noindent"><samp>\dashbox</samp><a id="uid3250"></a><samp>{A}</samp><samp>(B,C)[d]</samp><samp>{y}</samp>.
The translation is a <tt class="txt">&lt;pic-dashbox&gt;</tt> containing <span class="math"><i>y</i></span>, with a <span class="sansserif">position</span>
attribute whose value is <span class="math"><i>d</i></span>. The three values A, B and C are numbers, affected
by the unit length. They produce attributes <span class="sansserif">dashdim</span>, <span class="sansserif">width</span>
and <span class="sansserif">height</span>. Example:</p>
<pre class="latex-code">\setlength\unitlength{2pt}
\scalebox{3}{\it x}
\rotatebox{90}{\it x}
\dashbox{1.2}(2,3)[l]{\it x}
\dashbox{1.2}(2,3){\it x}
</pre>
<p class="nofirst noindent">The translation is</p>
<pre class="xml-code">&lt;scalebox scale='3'&gt;&lt;hi rend='it'&gt;x&lt;/hi&gt;&lt;/scalebox&gt;
&lt;pic-rotatebox angle='90'&gt;&lt;hi rend='it'&gt;x&lt;/hi&gt;&lt;/pic-rotatebox&gt;
&lt;pic-dashbox dashdim='2.4' width='4' height='6' position='l'&gt;
  &lt;hi rend='it'&gt;x&lt;/hi&gt;&lt;/pic-dashbox&gt;
&lt;pic-dashbox dashdim='2.4' width='4' height='6'&gt;
  &lt;hi rend='it'&gt;x&lt;/hi&gt;&lt;/pic-dashbox&gt;
</pre>

</li>
<li id="uid3251"><p class="nofirst noindent"><samp>\begin{minipage}</samp><samp>[x][y][z][t]</samp><samp>{dim}</samp> ...<samp>\end{minipage}</samp>.<a id="uid3252"></a>
Optional arguments <span class="math"><i>y</i></span> and <span class="math"><i>t</i></span> are ignored. Arguments <span class="math"><i>x</i></span> and <span class="math"><i>z</i></span> should define
vertical position. The last argument is a glue. Note: the translation starts
in vertical mode. The command <samp>\nocentering</samp><a id="uid3253"></a> is called.</p>
</li>
<li id="uid3254"><p class="nofirst noindent"><samp>\parbox</samp><a id="uid3255"></a><samp>[x][y][z]</samp><samp>{dim}</samp><samp>{y}</samp>. This should be the non-environment
version of `minipage´, but it is much more primitive. It behaves like
<samp>\hbox</samp> and <samp>\xbox</samp> for argument parsing.
Example</p>
<pre class="latex-code">\begin{center}
a
\begin{minipage}{2cm} a \end{minipage}
\begin{minipage}[c][l][b][r]{2cm plus 3pt} a \end{minipage}
\end{center}
\parbox[foo][bar][gee]{2cmPlus3mm}{some \it box content}.
</pre>
<p class="nofirst noindent">The translation is</p>
<pre class="xml-code">&lt;p rend='center'&gt;a
&lt;minipage width='56.9055pt'&gt;&lt;p&gt;a &lt;/p&gt;&lt;/minipage&gt;
&lt;minipage inner-pos='b' pos='c' width='56.9055pt'&gt;&lt;p&gt;a &lt;/p&gt;&lt;/minipage&gt;&lt;/p&gt;
some &lt;hi rend='it'&gt;box content&lt;/hi&gt;&lt;p&gt;.&lt;/p&gt;
</pre>

</li>
<li id="uid3256"><p class="nofirst noindent"><samp>\bezier</samp><a id="uid3257"></a><samp>{N}</samp><samp>(A,B)(C,D)(E,F)</samp>. The first argument must be an
integer, others are real numbers, affected by <samp>\unitlengh</samp>.
The result is a <tt class="txt">&lt;pic-bezier&gt;</tt> element.</p>
</li>
<li id="uid3258"><p class="nofirst noindent"><samp>\qbezier</samp><a id="uid3259"></a><samp>[N](A,B)(C,D)(E,F)</samp>. As above, but the first argument
is optional. A Bezier curve is defined by three points, you must give the
coordinates. In the first implementation, you had to specify the number of
intermediate points used for plotting. For instance</p>
<pre class="latex-code">\bezier{10}(1,2)(3,4)(5,6)
\qbezier(1,2)(3,4)(5,6)
\qbezier[10](1,2)(3,4)(5,6)
</pre>
<p class="nofirst noindent">translates as</p>
<pre class="xml-code">&lt;pic-bezier a1='1' a2='2' b1='3' b2='4' c1='5' c2='6' repeat='10'/&gt;
&lt;pic-bezier a1='1' a2='2' b1='3' b2='4' c1='5' c2='6'/&gt;
&lt;pic-bezier a1='1' a2='2' b1='3' b2='4' c1='5' c2='6' repeat='10'/&gt;
</pre>

</li>
<li id="uid3260"><p class="nofirst noindent"><samp>\put</samp><a id="uid3261"></a><samp>(A,B)</samp><samp>{x}</samp>. The translation is a <tt class="txt">&lt;pic-put&gt;</tt> element
containing the translation of <span class="math"><i>x</i></span>, with attributes <span class="sansserif">xpos</span> and
<span class="sansserif">ypos</span> that come from <span class="math"><i>A</i></span> and <span class="math"><i>B</i></span>.</p>
</li>
<li id="uid3262"><p class="nofirst noindent"><samp>\xscale</samp><a id="uid3263"></a>, <samp>\yscale</samp><a id="uid3264"></a>, <samp>\xscaley</samp><a id="uid3265"></a>,
<samp>\yscalex</samp><a id="uid3266"></a>. These are user defined commands, that should contain
real numbers. The default values are 1, 1, 0, and 0.</p>
</li>
<li id="uid3267"><p class="nofirst noindent"><samp>\scaleput</samp><a id="uid3268"></a><samp>(A,B)</samp><samp>{x}</samp>. The translation is a <tt class="txt">&lt;pic-scaleput&gt;</tt>.
It is like <samp>\put</samp>, but current scale values are put in the element. For
instance the translation of</p>
<pre class="latex-code">\setlength\unitlength{2pt}
\put(1,2){x}
\def\xscale{2.0}\def\yscale{3.0}\def\xscaley{4}\def\yscalex{0.5}
\scaleput(1,2){x}
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;pic-put xpos='2' ypos='4'&gt;x&lt;/pic-put&gt;
&lt;pic-scaleput xpos='2' ypos='4'
  xscale='2.0' yscale='3.0' xscaley='4' yscalex='0.5'&gt;x&lt;/pic-scaleput&gt;
</pre>

</li>
<li id="uid3269"><p class="nofirst noindent"><samp>\multiput</samp><a id="uid3270"></a><samp>(A,B)(a,b)</samp><samp>{n}</samp><samp>{x}</samp>.
The translation is a <tt class="txt">&lt;pic-multiput&gt;</tt> element, with all the arguments as
attributes.
If the command is
followed by a star, then <span class="math"><i>n</i></span> calls of <samp>\put</samp> are evaluated, with the
same argument <span class="math"><i>x</i></span>, but at positions <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>(</mo><mi>A</mi><mo>+</mo><mi>k</mi><mi>a</mi><mo>,</mo><mi>B</mi><mo>+</mo><mi>k</mi><mi>b</mi><mo>)</mo></mrow></math></span> instead of <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mo>(</mo><mi>A</mi><mo>,</mo><mi>B</mi><mo>)</mo></mrow></math></span>.
See example of the little car on figure <a href="#uid3747">4</a>; the ruler was
constructed with <samp>\multiput</samp>, a star is used for the figures.</p>
</li>
<li id="uid3271"><p class="nofirst noindent"><samp>\frame</samp><a id="uid3272"></a><samp>{x}</samp>. This translates as <tt class="txt">&lt;pic-frame&gt;</tt> with the value
of <span class="math"><i>x</i></span>.</p>
</li>
<li id="uid3273"><p class="nofirst noindent"><samp>\oval</samp><a id="uid3274"></a><samp>(A,B)[c]</samp>. This translates as <tt class="txt">&lt;pic-oval/&gt;</tt> with some
attributes, <span class="sansserif">xpos</span>, <span class="sansserif">ypos</span>, <span class="sansserif">spec</span>.</p>
</li>
<li id="uid3275"><p class="nofirst noindent"><samp>\line</samp><a id="uid3276"></a><samp>(A,B){c}</samp>. This translates as <tt class="txt">&lt;pic-line/&gt;</tt>.
The first two arguments have to be integers. Only small values are recognized
by LaTeX. The last argument is a real number.
Attributes are <span class="sansserif">xdir</span>, <span class="sansserif">ydir</span>, <span class="sansserif">width</span>.</p>
</li>
<li id="uid3277"><p class="nofirst noindent"><samp>\vector</samp><a id="uid3278"></a><samp>(A,B){c}</samp>. This translates as <tt class="txt">&lt;pic-vector/&gt;</tt>. Same
comments as above. Example.</p>
<pre class="latex-code">\setlength\unitlength{2pt}
\oval(2,3) \oval(2,3)[4]
\frame{x}
\line(2,3){12.2} \vector(2,3){12.2}
</pre>
<p class="nofirst noindent">The translation is</p>
<pre class="xml-code">&lt;pic-oval xpos='4' ypos='6'/&gt;
&lt;pic-oval xpos='4' ypos='6' specs='4'/&gt;
&lt;pic-frame&gt;x&lt;/pic-frame&gt;
&lt;pic-line xdir='2' ydir='3' width='24.4'/&gt;
&lt;pic-vector xdir='2' ydir='3' width='24.4'/&gt;
</pre>

</li>
<li id="uid3279"><p class="nofirst noindent"><samp>\thicklines</samp><a id="uid3280"></a>. The translation is <tt class="txt">&lt;pic-thicklines/&gt;</tt>.</p>
</li>
<li id="uid3281"><p class="nofirst noindent"><samp>\thinlines</samp><a id="uid3282"></a>. The translation is <tt class="txt">&lt;pic-thinlines/&gt;</tt>.</p>
</li>
<li id="uid3283"><p class="nofirst noindent"><samp>\linethickness</samp><a id="uid3284"></a><samp>{x}</samp>. The translation is
<tt class="txt">&lt;pic-linethickness&gt;</tt> with attribute <span class="sansserif">size</span>.</p>
</li>
<li id="uid3285"><p class="nofirst noindent"><samp>\arc</samp><a id="uid3286"></a><samp>[n](A,B){c}</samp>. The translation is an empty <tt class="txt">&lt;pic-arc&gt;</tt>
with attributes <span class="sansserif">nbsymb</span>, <span class="sansserif">angle</span>, <span class="sansserif">xpos</span>, <span class="sansserif">ypos</span>
(and also <span class="sansserif">unit-length</span>).</p>
</li>
<li id="uid3287"><p class="nofirst noindent"><samp>\bigcircle</samp><a id="uid3288"></a><samp>[n]</samp><samp>{c}</samp>. The translation is an empty
<tt class="txt">&lt;pic-bigcircle&gt;</tt> element with attributes <span class="sansserif">nbsymb</span>, <span class="sansserif">size</span>,
(and also <span class="sansserif">unit-length</span>).</p>
</li>
<li id="uid3289"><p class="nofirst noindent"><samp>\circle</samp><a id="uid3290"></a><samp>{c}</samp>. The translation is an empty <tt class="txt">&lt;pic-circle&gt;</tt>.
For instance</p>
<pre class="latex-code">\setlength\unitlength{2pt}
\arc[17](2,3){40} \arc(2,3){40}
\bigcircle[17]{40} \bigcircle{40}
\circle{40}
</pre>
<p class="nofirst noindent">translates to</p>
<pre class="xml-code">&lt;pic-arc angle='40' xpos='4' ypos='6' unit-length='2' nbsymb='17'/&gt;
&lt;pic-arc angle='40' xpos='4' ypos='6' unit-length='2'/&gt;
&lt;pic-bigcircle size='40' unit-length='2' nbsymb='17'/&gt;
&lt;pic-bigcircle size='40' unit-length='2'/&gt;
&lt;pic-circle size='80'/&gt;
</pre>

</li>
<li id="uid3291"><p class="nofirst noindent"><samp>\curve</samp><a id="uid3292"></a><samp>[n](A1,B1)(A2,B2)(A3,B3),...,(An,Bn)</samp>.</p>
<p class="nofirst noindent"><samp>\closecurve</samp><a id="uid3293"></a><samp>[n](A1,B1)(A2,B2)(A3,B3),...,(An,Bn)</samp>.</p>
<p class="nofirst noindent"><samp>\tagcurve</samp><a id="uid3294"></a><samp>[n](A1,B1)(A2,B2)(A3,B3),...,(An,Bn)</samp>.
These produces curves.</p>
</li>
<li id="uid3295"><p class="nofirst noindent"><samp>\dashline</samp><a id="uid3296"></a><samp>[A]{B}[C](A1,B1)(A2,B2)(A3,B3),...,(An,Bn)</samp>.</p>
<p class="nofirst noindent"><samp>\dottedline</samp><a id="uid3297"></a><samp>[A]{B}[C](A1,B1)(A2,B2)(A3,B3),...,(An,Bn)</samp>.</p>
<p class="nofirst noindent"><samp>\drawline</samp><a id="uid3298"></a><samp>[A][C](A1,B1)(A2,B2)(A3,B3),...,(An,Bn)</samp>.
These produce dashes. Example:</p>
<pre class="latex-code">\setlength\unitlength{2pt}
\curve[12](1,2)(3,4)(4,5)(7,8)
\tagcurve[12](1,2)(3,4)(4,5)(7,8)
\closecurve[12](1,2)(3,4)(4,5)(7,8)
\curve(1,2)(3,4)(4,5)(7,8)
\tagcurve(1,2)(3,4)(4,5)(7,8)
\closecurve(1,2)(3,4)(4,5)(7,8)
\dashline[12]{13}[14](1,2)(3,4)(4,5)(7,8)
\dottedline[12]{13}[14](1,2)(3,4)(4,5)(7,8)
\drawline[12][14](1,2)(3,4)(4,5)(7,8)
</pre>
<p class="nofirst noindent">The translation is</p>
<pre class="xml-code">&lt;pic-curve unit-length='2' nbsymb='12'&gt;1,2&lt;/pic-curve&gt;&lt;p&gt;(3,4)(4,5)(7,8)
&lt;pic-tagcurve unit-length='2' nbsymb='12'&gt;1,2&lt;/pic-tagcurve&gt;(3,4)(4,5)(7,8)
&lt;pic-closecurve unit-length='2' nbsymb='12'&gt;1,2&lt;/pic-closecurve&gt;(3,4)(4,5)(7,8)
&lt;pic-curve unit-length='2'&gt;1,2&lt;/pic-curve&gt;(3,4)(4,5)(7,8)
&lt;pic-tagcurve unit-length='2'&gt;1,2&lt;/pic-tagcurve&gt;(3,4)(4,5)(7,8)
&lt;pic-closecurve unit-length='2'&gt;1,2&lt;/pic-closecurve&gt;(3,4)(4,5)(7,8)
&lt;dashline arg3='14' arg2='13' arg1='12'&gt;
   &lt;point xpos='2' ypos='4'/&gt;&lt;point xpos='6' ypos='8'/&gt;
   &lt;point xpos='8' ypos='10'/&gt;&lt;point xpos='14' ypos='16'/&gt;&lt;/dashline&gt;
&lt;dottedline arg3='14' arg2='13' arg1='12'&gt;&lt;point xpos='2' ypos='4'/&gt;
   &lt;point xpos='6' ypos='8'/&gt;&lt;point xpos='8' ypos='10'/&gt;
   &lt;point xpos='14' ypos='16'/&gt;&lt;/dottedline&gt;
&lt;drawline arg3='14' arg1='12'&gt;&lt;point xpos='2' ypos='4'/&gt;
   &lt;point xpos='6' ypos='8'/&gt;&lt;point xpos='8' ypos='10'/&gt;
&lt;point xpos='14' ypos='16'/&gt;&lt;/drawline&gt;
</pre>
</li></ul>

<h2 id="uid3299">6.8. The title page</h2>
<p>Consider the following document fragment. Note the spellings of the commands
<samp>\keyword</samp><a id="uid3300"></a> and <samp>\motcle</samp><a id="uid3301"></a>, this is not the same as for the
environments of the Raweb.</p>
<pre class="latex-code"><span class="prenumber">1</span> \documentclass[a4paper]{report}
<span class="prenumber">2</span> \usepackage{RR}
<span class="prenumber">3</span>  
<span class="prenumber">4</span> \providecommand\Tralics{\xbox{Tralics}{}}
<span class="prenumber">5</span> \def\XML{XML}
<span class="prenumber">6</span>  
<span class="prenumber">7</span> \RRtitle{Tralics, a \LaTeX\ to XML translator\\Partie I}
<span class="prenumber">8</span> \RRetitle{Tralics, a \LaTeX\ to XML translator\\Part I}
<span class="prenumber">9</span> \RRauthor{José Grimm\thanks{Email: Jose.Grimm@sophia.inria.fr}}
<span class="prenumber">10</span>  
<span class="prenumber">11</span> \RRprojet{Apics}
<span class="prenumber">12</span> \RRtheme{\THNum}
<span class="prenumber">13</span>  
<span class="prenumber">14</span> \RRresume{
<span class="prenumber">15</span> Dans cet article\par nous décrivons le logiciel \Tralics,\par...}
<span class="prenumber">16</span> \RRabstract{
<span class="prenumber">17</span> In this paper we describe \Tralics, a \LaTeX\ to \XML\ translator.}
<span class="prenumber">18</span>  
<span class="prenumber">19</span> \RRdate{Aout 2005}
<span class="prenumber">20</span> \URSophia
<span class="prenumber">21</span> \motcle{Latex, XML, HTML, MathML, Perl, PostScript, Pdf}
<span class="prenumber">22</span> \keyword{Latex, XML, HTML, MathML, Perl, PostScript, Pdf}
<span class="prenumber">23</span>  
<span class="prenumber">24</span> \begin{document}
<span class="prenumber">25</span> \makeRR
<span class="prenumber">26</span> text
</pre>
<p>This is translated by <i>Tralics</i> as follows.</p>
<pre class="xml-code">&lt;?xml version='1.0' encoding='iso-8859-1'?&gt;
&lt;!DOCTYPE std SYSTEM 'classes.dtd'&gt;
&lt;!-- Translated from latex by tralics 2.9, date: 2006/10/03--&gt;
&lt;std chapters='true'&gt;
&lt;ftitle&gt;Tralics, a &lt;LaTeX/&gt; to XML translator Partie I&lt;/ftitle&gt;
&lt;title&gt;Tralics, a &lt;LaTeX/&gt; to XML translator Part I&lt;/title&gt;
&lt;author&gt;José Grimm&lt;note id='uid1' place='foot'&gt;Email:
Jose.Grimm@sophia.inria.fr&lt;/note&gt;&lt;/author&gt;&lt;inria-team&gt;Apics&lt;/inria-team&gt;
&lt;theme&gt;THnum&lt;/theme&gt;&lt;resume&gt;&lt;p&gt;Dans cet article&lt;/p&gt;
&lt;p&gt;nous décrivons le logiciel &lt;Tralics/&gt;,&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;&lt;/resume&gt;
&lt;abstract&gt;&lt;p&gt;In this paper we describe &lt;Tralics/&gt;, a &lt;LaTeX/&gt; to XML
translator.&lt;/p&gt;&lt;/abstract&gt;
&lt;date&gt;Aout 2005&lt;/date&gt;&lt;location&gt;Sophia Antipolis&lt;/location&gt;
&lt;motcle&gt;Latex, XML, HTML, MathML, Perl, PostScript,
Pdf&lt;/motcle&gt;&lt;keyword&gt;Latex, XML, HTML,  MathML, Perl, PostScript,
Pdf&lt;/keyword&gt;&lt;p&gt;text&lt;/p&gt;
&lt;/std&gt;
</pre>
<p class="nofirst noindent">The document you are reading here is a technical report (it has <samp>\makeRT</samp>
instead of <samp>\makeRR</samp>, but it uses the same commands starting with `RR´, they
are defined in the file <span class="sansserif">RR.sty</span>, and <i>Tralics</i> (since version 2.9)
uses some equivalents from the file <span class="sansserif">RR.plt</span>.
This was translated to <span class="sansserif">XML</span> then <span class="sansserif">HTML</span> (may be you are reading the <span class="sansserif">HTML</span> version).</p>
<p>Since year 2006, Inria´s research reports are to be put on
HAL<a id="uid3302" href="#note77" title="HAL-INRIA is an environment for self-archiving of scientific publications and providing free access ..."><small>(note: </small>&#10163;<small>)</small></a>; before that, they were stored on Inria´s Web
server. The meta-data were generated automatically:
the author sends to the &#8220;gescap&#8221; mailing list the beginning of the document,
up to the magic command <samp>\makeRR</samp>; this is translated by <i>Tralics</i> (that
does not care about missing <samp>\end{document}</samp>); a post-processor extracts
the <tt class="txt">&lt;RRstart&gt;</tt> element from the <span class="sansserif">XML</span> result, and converts it to <span class="sansserif">HTML</span>.</p>
<p>Let´s compile the same file as above with the command
<tt>tralics tptest.tex -type RR</tt>.</p>
<pre class="xml-code">&lt;?xml version='1.0' encoding='iso-8859-1'?&gt;
&lt;!DOCTYPE rr SYSTEM 'raweb.dtd'&gt;
&lt;!-- Translated from latex by tralics 2.9, date: 2006/10/03--&gt;
&lt;rr type='RR' chapters='true'&gt;
&lt;RRstart&gt;&lt;UR&gt;
&lt;URSophia/&gt;
&lt;/UR&gt;
&lt;title&gt;Tralics, a &lt;LaTeX/&gt; to XML translator Partie I&lt;/title&gt;
&lt;etitle&gt;Tralics, a &lt;LaTeX/&gt; to XML translator Part I&lt;/etitle&gt;
&lt;projet&gt;Apics&lt;/projet&gt;
&lt;motcle&gt;Latex, XML, HTML, MathML, Perl, PostScript, Pdf&lt;/motcle&gt;
&lt;keyword&gt;Latex, XML, HTML, MathML, Perl, PostScript, Pdf&lt;/keyword&gt;
&lt;resume&gt;&lt;p&gt;
Dans cet article&lt;/p&gt;
&lt;p&gt;nous décrivons le logiciel &lt;Tralics/&gt;,&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;&lt;/resume&gt;
&lt;abstract&gt;&lt;p&gt;
In this paper we describe &lt;Tralics/&gt;, a &lt;LaTeX/&gt; to XML translator.&lt;/p&gt;&lt;/abstract&gt;
&lt;author&gt;&lt;auth&gt;José Grimm&lt;note id='uid1' place='foot'&gt;
   Email: Jose.Grimm@sophia.inria.fr&lt;/note&gt;&lt;/auth&gt;
&lt;/author&gt;
&lt;date&gt;Aout 2005&lt;/date&gt;
&lt;RRnumber&gt;????&lt;/RRnumber&gt;
&lt;Theme&gt;
&lt;THNum/&gt;
&lt;/Theme&gt;
&lt;/RRstart&gt;
&lt;p&gt;text&lt;/p&gt;
&lt;/rr&gt;
</pre>
<p>We have shown above the content of the files <span class="sansserif">RR.plt</span> and
<span class="sansserif">RR.tcf</span>. One file ends with <samp>\let</samp> <samp>\RRstyisuseful</samp> <samp>\relax</samp>
and the other starts with <samp>\ifx</samp> <samp>\RRstyisuseful</samp> <samp>\relax</samp>
<samp>\endinput</samp> <samp>\fi</samp>. As a result, if you load the tcf file,
the content of the plt file is discarded.</p>
<p>The syntax in the TitlePage part of a configuration file is the following:
each line has some fields, that can be of type A
(the word `alias´, or `action´ or `execute´) or type C (a command, a backslash followed by some
letters), or E (an element name, delimited by less-than and greater-than) or S
(a string, delimited by a double quote). Before each field, you can put one or
two modifiers. Only the second and the third fields can have a
modifier. More details can be found on the web page.
The following combinations are recognized.</p>
<dl>
<dt id="uid3303">(CESS)</dt><dd><p class="nofirst noindent">as in <samp>\makeRR &lt;RRstart&gt; "" &#8220;type = ´RR´&#8221;</samp>.
This declaration has to be the first in the list. It can be given only once.
No modifiers are allowed. It defines a command <samp>\makeRR</samp>,
that can be used only once in the document, after <samp>\begin{document}</samp>.</p>
<p>The effect is to insert the <tt class="txt">&lt;RRstart&gt;</tt> element into the <span class="sansserif">XML</span> tree,
after some checks (that may produce an error).
In what follows, we shall call it the TPA element. This element is formed of
other elements defined by the titlepage info, the names of these elements
are statically defined, their content is dynamic (i.e., the names depends
on the configuration file, the content on the TeX document).
The first string is a list of attributes added to the TPA element and the
second string is a list of attributes added to the document element.
In our example, the first string is empty.</p>
<p>In the case where one of the attributes of the second string has the
value `only title page´, then <samp>\endinput</samp> is evaluated just after the
Titlepage command. This means that everything after the titlepage command is
ignored. This is useful if you want to extract the titlepage information from
a document, without converting the whole document.</p>
</dd>
<dt id="uid3304">(AESS)</dt><dd><p class="nofirst noindent">as in <samp>alias "" &#8220;type = ´RT´&#8221;</samp>.
This declaration is valid only after a CESS declaration
(or after another AESS declaration). It defines a command <samp>\makeRT</samp>
that can be used instead of <samp>\makeRR</samp> (only one of these commands can
be used). The result is the same; however it can use different attributes.
(Same remark as above for special attribute values in the second string).
In what follows, the <samp>\TPA</samp> command means one of the commands defined by
this rule or the preceding one.</p>
</dd>
<dt id="uid3305">(CEES)</dt><dd><p class="nofirst noindent">as in <samp>\RRauthor + &lt;author&gt; &lt;auth&gt; &#8220;Pas d´auteurs&#8221;</samp>.
Note that the plus sign is required before the <tt class="txt">&lt;author&gt;</tt> element.
This declaration has as side effect that the TPA element will contain a
<tt class="txt">&lt;author&gt;</tt> element, formed of a number of <tt class="txt">&lt;auth&gt;</tt> elements.
Initially there is only one, initialized with `Pas d´auteurs´.</p>
<p>The declaration has another effect, it defines a command <samp>\RRauthor</samp>,
that has to be used before the <samp>\TPA</samp> command. It takes one argument, and
creates a <tt class="txt">&lt;auth&gt;</tt> element whose content is the translation of the
argument. This element is added to the end of the <tt class="txt">&lt;author&gt;</tt> element.
The command can be used more than once, in the case there are multiple
authors.
Note that the default value is removed in case at least one value is given.</p>
</dd>
<dt id="uid3306">(CCS)</dt><dd><p class="nofirst noindent">as in <samp>\myself \RRauthor &#8220;JG&#8221;</samp>.
The effect is the same as <samp>\def\myself{\RRauthor{JG}}</samp>.
However, the string argument is not translated, it is taken verbatim.</p>
</dd>
<dt id="uid3307">(AC)</dt><dd><p class="nofirst noindent">as in <samp>alias \URRocq</samp>.
This makes <samp>\URrocq</samp> an alias for the command defined on the previous line.
Aliasing is achieved via <samp>\let</samp>.</p>
</dd>
<dt id="uid3308">(E)</dt><dd><p class="nofirst noindent">as in <samp>&lt;UR&gt; -</samp>. The dash after the element is required.
Another example can be <samp>&lt;sUR</samp> <samp>fr=´unité</samp> <samp>de</samp> <samp>recherche´</samp>
<samp>en=´research</samp> <samp>unit´&gt;</samp> <samp>-</samp>.
In this second example, we have an element named <tt class="txt">&lt;sUR&gt;</tt>, that has two
attributes. The effect is to put, in the <span class="sansserif">XML</span> result, this element
(with its attributes), and its content is a list of items declared in
the configuration file (the list can be empty).</p>
</dd>
<dt id="uid3309">(CE)</dt><dd><p class="nofirst noindent">as in <samp>\URSophia ?+&lt;UR&gt;</samp> or
<samp>\URFuturs ?+&lt;UR d=´true´&gt;</samp>.
This has as effect to define a command, here <samp>\URSophia</samp> or
<samp>\URFuturs</samp>, that takes no argument, whose effect is to insert, to the
element <tt class="txt">&lt;UR&gt;</tt> (that must be defined by a previous rule), an empty
element, whose name is <tt class="txt">&lt;URSophia&gt;</tt>, and that has the attributes of
<tt class="txt">&lt;UR&gt;</tt>.</p>
</dd>
<dt id="uid3310">(CEE)</dt><dd><p class="nofirst noindent">as in <samp>\Paris ?&lt;UR&gt; &lt;Rocquencourt&gt;</samp>.
The effect is to define a command <samp>\Paris</samp>, that behaves like
<samp>\URsophia</samp>, but the element
created is <tt class="txt">&lt;Rocquencourt&gt;</tt> instead of one named <tt class="txt">&lt;Paris&gt;</tt>.</p>
</dd>
<dt id="uid3311">(S)</dt><dd><p class="nofirst noindent">A character string is inserted verbatim. Note that less-than signs
are not converted to entities like <tt class="txt">&amp;lt;</tt>.</p>
</dd>
<dt id="uid3312">(AC)</dt><dd><p class="nofirst noindent">as in <samp>execute \foo</samp> or <samp>action \foo</samp>.
The expression <samp>\xbox</samp><samp>{}</samp><samp>{\foo}</samp> is translated.
The resulting box is added to the <span class="sansserif">XML</span> tree.</p>
</dd>
<dt id="uid3313">(CES)</dt><dd><p class="nofirst noindent">as <samp>\RRtitle &lt;title&gt; &#8220;pas de titre&#8221;</samp>. This is the generic command.
The element can have the modifiers p, q, e or E, and the value can have the
modifiers +ABC. The effect is to define a command <samp>\RRtitle</samp>
(or an environment `RRtitle´ if the E modifier has been given), that can be
used only before the <samp>\TPA</samp> command. The argument of the command
(or the content of the environment) is translated, put in a <tt class="txt">&lt;title&gt;</tt>
element, and added to the TPA element.</p>
<p>If no modifier is given for the element, paragraphs are forbidden in the
argument. If you want to use paragraphs (either <samp>\par</samp> or <samp>\\</samp>)
you must use the P modifier (lower-case letter). In the same fashion, a
lower
case E means environment without paragraphs, an upper case E means
environment with paragraphs. If the q modifier is given, paragraphs are
forbidden, but you can use <samp>\\</samp>, which is ignored.
(In fact, the command reads an optional star, an optional argument, and the
result is replaced by a space). Note
that, in this document, there is a <samp>\\</samp> in the title, that appears as
a space in the page headings. This is done by redefining <samp>\\</samp> to <samp>\space</samp>,
so that optional arguments are not taken into account. There is a dirty hack
in <i>Tralics</i>.</p>
<p>If no modifier is given for the value, then <tt class="txt">&lt;title&gt;pas de titre&lt;/title&gt;</tt>
is added to the TPA element in case the command is never used.</p>
<p>Near the end of the titlepage example, we define <samp>\cmdp</samp>, <samp>\cmdA</samp>,
<samp>\cmdB</samp>, and <samp>\cmdC</samp> in a similar fashion, but add a modifier before
the value.
None of these commands is used in the TeX file; if you uncomment them,
you can observe the following facts.</p>
<ul>
<li id="uid3314"><p class="nofirst noindent"><i>Tralics</i> complains with: <i>Error signaled at line 25 of file
tptest.tex:
No value given for command \cmdp</i>.
In fact, when <i>Tralics</i> sees the
<samp>\makeRR</samp> command, it notices that <samp>\cmdp</samp> has not been called
and complains, because the plus-sign modifier means: this value is
required.</p>
</li>
<li id="uid3315"><p class="nofirst noindent">In the case where the modifier is one of A, B or C,
then the default value is a LaTeX command (in fact, a list of
characters, that may be interpreted as a set of LaTeX commands, and must
be translated). <i>Tralics</i> removes the double quotes, and inserts the
characters in one of its buffers, or converts the string into a token list
that is
appended to the input token list.
The non trivial point is: when is the command evaluated?</p>
</li>
<li id="uid3316"><p class="nofirst noindent">In thee case of `A´ modifier, the command is evaluated just before the
<samp>\documentclass</samp> command. There may be other lines
that are not in the TeX source file that are evaluated there.</p>
</li>
<li id="uid3317"><p class="nofirst noindent">In the case of `B´ modifier, the command is evaluated at
begin-document. More precisely <samp>\cmdb</samp><samp>{\cmdBval}</samp> is
tokenised, and the result is added to the token list maintained by
<samp>\AtBeginDocument</samp>.</p>
</li>
<li id="uid3318"><p class="nofirst noindent">In the case of `C´ modifier, the command is evaluated when the TPA
command is seen. The important point is that category codes in effect at
this moment will be used to convert the string into a sequence of tokens.</p>
</li></ul>
</dd></dl>
<p>There is special trick for the case where the name of the element
associated to the command is empty. Assume that the configuration file
contains <samp>\RRtheme &lt;&gt; +&#8220;pas de theme&#8221;</samp>.
In the case where the user does not use <samp>\RRtheme</samp>,
an error will be signaled, and the text will appear in the resulting <span class="sansserif">XML</span>.
If the user says <samp>\RRtheme</samp><samp>{foo}</samp>, then <i>Tralics</i> remembers the use and issues
no complain. Moreover, it reads the argument, and pushes <samp>foo\par</samp>
in the input stream (the reason why <samp>\par</samp> is executed is to make sure that
<i>Tralics</i> remains in vertical mode).</p>

<h2 id="uid3319">6.9. Array and Tables</h2>
<p>We describe here the implementation of the arrays in <i>Tralics</i>. One has to
distinguish between `table´<a id="uid3320"></a> which is an environment in which
you can put some objects (in general tables) with a caption; like the
`figure´<a id="uid3321"></a> environment, this generates a floating object. On
the other hand, the `array´<a id="uid3322"></a> and `tabular´<a id="uid3323"></a>
environments can be used to create a table: the first one is designed for math
only, the second for non-math material. Math tables are described in the
chapter about mathematics. There is currently no difference between
`figure´, `figure*´ and `wrapfigure´<a id="uid3324"></a>.</p>
<p>Example</p>
<pre class="latex-code">\begin{table}
\begin{tabular}{c} x \\y \end{tabular}
\caption{My caption}
\label{tl}
\end{table}
\begin{tabular}{c} \ref{tl} \end{tabular}
</pre>
<p class="nofirst noindent">The translation is a follows. As you can see, both objects have the same
name. If the table contains a tabular, only one <span class="sansserif">XML</span> object is created.</p>
<pre class="xml-code">&lt;table id='uid1'&gt;
  &lt;head&gt;My caption&lt;/head&gt;
  &lt;row&gt;&lt;cell halign='center'&gt;x&lt;/cell&gt;&lt;/row&gt;
  &lt;row&gt;&lt;cell halign='center'&gt;y&lt;/cell&gt;&lt;/row&gt;
&lt;/table&gt;
&lt;p&gt;&lt;table rend='inline'&gt;&lt;row&gt;&lt;cell halign='center'&gt;&lt;ref target='uid1'/&gt;&lt;/cell&gt;
&lt;/row&gt;&lt;/table&gt;&lt;/p&gt;
</pre>

<h3 id="uid3325">6.9.1. The tabular environment </h3>
<p>You can say <samp>\begin{tabular}</samp> <samp>[pos]</samp> <samp>{cols}</samp> ...<samp>\end{tabular}</samp> or
<samp>\begin{tabular*}</samp><samp>{width}</samp> <samp>[pos]</samp> <samp>{cols}</samp> ...<samp>\end{tabular*}</samp>.
In both cases, the result is a <tt class="txt">&lt;table&gt;</tt> element. This element has a
<span class="sansserif">vpos</span> attribute whose value is t, b or c, provided that the optional
<samp>[pos]</samp> argument is one of <samp>[t]</samp>, <samp>[b]</samp> or
<samp>[c]</samp>. The element has a <span class="sansserif">width</span> attribute
with value <tt class="txt">xx</tt>, provided that the `tabular*´ environment has been used and the
first argument evaluates to <samp>xx</samp> as a dimension. The resulting element consists
of some <tt class="txt">&lt;row&gt;</tt> elements, each of which contains some <tt class="txt">&lt;cell&gt;</tt> elements.
A more complicated example:</p>
<pre class="latex-code">\begin{tabular*}{10pc}[b]{lrc}
\hline
a&amp;b&amp;c\\[2pt]
\multicolumn{1}{l}{A}&amp;B&amp;C\\\hline
\end{tabular*}
</pre>
<p class="nofirst noindent">The translation here shows that the name of elements and attributes can be
changed.</p>
<pre class="xml-code">&lt;Table VPos='b' TableWidth='120.0pt' rend='inline'&gt;
  &lt;Row SpaceAfter='2.0pt' TopBorder='true'&gt;
     &lt;Cell Align='Cleft'&gt;a&lt;/Cell&gt;
     &lt;Cell Align='Cright'&gt;b&lt;/Cell&gt;
     &lt;Cell Align='Ccenter'&gt;c&lt;/Cell&gt;
  &lt;/Row&gt;
  &lt;Row BottomBorder='true'&gt;
     &lt;Cell Align='Cleft' Cols='1'&gt;A&lt;/Cell&gt;
     &lt;Cell Align='Cright'&gt;B&lt;/Cell&gt;
     &lt;Cell Align='Ccenter'&gt;C&lt;/Cell&gt;
  &lt;/Row&gt;
&lt;/Table&gt;
</pre>

<h3 id="uid3326">6.9.2. Interpreting the preamble</h3>
<p>This is an example of halign from the TeXbook<img src="textable.png" alt="textable.png" /></p>
<p>The preamble of the array is the quantity marked `<samp>{cols}</samp>´ in the description
above. This is a specification for columns. It specifies how the columns
should be formatted. In standard LaTeX, you cannot use more columns than
specified; in <i>Tralics</i>, this is not relevant. The TeX primitive is called
<samp>\halign</samp>, and LaTeX has to construct a preamble that matches the
requirements of TeX; it is very difficult to implement the TeX algorithm,
so that we make no attempt to implement the commands. This is an example</p>
<pre class="latex-code">\vbox{\offinterlineskip
\hrule
\halign{&amp;\vrule#&amp;
\strut \quad\hfil#\quad\cr
height2pt &amp;\omit&amp;&amp;\omit&amp;\cr
&amp;Year\hfil&amp;&amp;Word Population&amp;\cr
height2pt &amp;\omit&amp;&amp;\omit&amp;\cr
\noalign{\hrule}
\noalign{\vskip 2pt}
\noalign{\hrule}
height2pt &amp;\omit&amp;&amp;\omit&amp;\cr
&amp;8000BC&amp;&amp;5,000,000&amp;\cr
&amp;50AD&amp;&amp;200,000,000&amp;\cr
&amp;1650AD&amp;&amp;500,000,000&amp;\cr
&amp;1850AD&amp;&amp;1,000,000,000&amp;\cr
&amp;1945AD&amp;&amp;2,300,000,000&amp;\cr
&amp;1980AD&amp;&amp;4,400,000,000&amp;\cr
height2pt &amp;\omit&amp;&amp;\omit&amp;\cr}\hrule}
</pre>
<p class="nofirst noindent">The table has 5 columns, of the form ABABA, because the preamble has the form
<samp>&amp;A&amp;B\cr</samp>, the first <samp>&amp;</samp> marks repetition. Both templates
A and B are formed of a &#9001;u&#9002; part, then <samp>#</samp>, then a &#9001;v&#9002; part.
In the table, the <samp>#</samp>
means: &#8220;stick the text of each column entry in this place&#8221;.
In the case of A, this is almost always empty. In some
cases, it is `height2pt´, case where the values of B are <samp>\omit</samp>. Here
<samp>\omit</samp> says that &#9001;u&#9002; and &#9001;v&#9002; should be omitted; the important point
is that the <samp>\strut</samp> be omitted. This gives additional vertical space, of
exactly 2pt; other rows have (at least) the vertical size of a
<samp>\strut</samp>. Very often row are too narrow; LaTeX has a command
<samp>\arraystretch</samp> that controls this. Note
that A is <samp>\vrule#</samp> and <samp>\vrule</samp> is a command that accepts an optional
argument. Note how horizontal rules are inserted in the table.</p>
<p>As the previous example shows, there are three standard column types: c, l and
r (centered, left-aligned, right-aligned). A TeX preamble like
<samp>\quad\hfil#\quad</samp> corresponds to `r´ (instead of <samp>\quad</samp>, LaTeX uses
some default intercolumn space that can be modified). You can also say
<samp>p{dim}</samp>. This should typeset the column in a
<samp>\parbox[t]{dim}</samp>. This feature is not implemented: the argument
is ignored, and <samp>p</samp> is replaced by <samp>c</samp>. Note:
<samp>\parbox</samp><a id="uid3327"></a> currently ignores its argument in <i>Tralics</i>.</p>
<p>The <span class="sansserif">array.sty</span> package adds two options that take a dimension as argument: `m´ and `b´. The `b´ option
is like the `p´ option, but bottom-aligned. The `m´ option should be used only
in math mode (i.e. for the array environment, and not tabular). In <i>Tralics</i>,
there is no difference between `b´, `m´ and `p´.</p>
<p>There is a <samp>@{text}</samp> option. It inserts `text´ in every row, where `text´ is
processed in math mode in the `array´ environment and in LR mode in the
`tabular´ and `tabular*´ environments. Such an expression suppresses the space
that LaTeX normally inserts between columns. For instance, an array
specification like <samp>{l@{\hspace{1cm}}l}</samp> says that the two columns of text
should be separated by exactly one centimeter. A specification like
<samp>{@{}c@{}}</samp> says that no additional space should be added neither of the left
not the right of the column. An <samp>\extracolsep</samp><samp>{wd}</samp> command can be used
inside such an expression. It causes an extra space to appear to the left of
all subsequent columns. Note that <samp>\extracolsep</samp> expands to <samp>\tabskip</samp>;
this TeX primitive is not implemented in <i>Tralics</i>. In fact, <i>Tralics</i> ignores an `@´ and its argument.</p>
<p>You can use a | for specifying a vertical rule. However, in <i>Tralics</i> you cannot use double or triple rules. Sorry. There is also a <samp>!{...}</samp>
options that is not implemented.</p>
<p>Every specification (`l´, `r´, `c´, `p´, `b´, `m´) can be preceded by a
<samp>&gt;{xx}</samp> declaration,
and followed by a <samp>&lt;{yy}</samp> declaration. In case of multiple declarations, the
last will be executed first. Said otherwise,
<samp>&gt;{3}&gt;{b}c&lt;{a}&lt;{z}</samp> is the same as
<samp>&gt;{b3}c&lt;{za}</samp>. The effect is to insert `b3´ before the cell
in the current position, and `za´ after the cell.
See the last tabular in table <a href="#uid3333">2</a>. This corresponds to &#9001;u&#9002; and
&#9001;v&#9002; parts of a TeX array. Note that the cell is finished when a token
is sensed that indicates either a new cell, a new row or the end of the
array. Technically, this means a <samp>&amp;</samp>, a <samp>\\</samp>, or an <samp>\end</samp> (the end of the
environment). A special marker is pushed back after the `za´. This is a special
endtemplate token in the case of a cell, and a <samp>\cr</samp> in the case of
<samp>\\</samp>. You should not use <samp>\cr</samp><a id="uid3328"></a> or <samp>\crcr</samp><a id="uid3329"></a> outside an array
defined by <samp>\halign</samp> (this is not
yet implemented). You must be careful that the `za´ (more generally, the
&#9001;v&#9002; part) does not
contain something that reads the special end marker. For instance
<samp>\def\x#1{}\halign{#\x&amp;#\cr 1&amp;2\cr}</samp>
is an error.
Finally, <samp>*{N}{text}</samp> can be used instead of N occurrences of `text´.</p>
<p>Note. At the end of Chapter 22 of the TeXbook, Knuth gives an example of a
table where the preamble is <samp>\centerline{#}</samp>. Such a construction
cannot be done in <i>Tralics</i>, since a specification of the form
<samp>&gt;{\centerline}</samp><!--PASS THROUGH allowbreak--><samp>c&lt;{}</samp> would transform into
<samp>\centerline?#?</samp> and question marks cannot be replaced by braces;
you could try <samp>&gt;{\expandafter</samp><!--PASS THROUGH allowbreak--><samp>\centerline?}</samp> and replace the question mark by something that
expands to an open brace but contains as many open braces as closing ones, for
instance <samp>\expandafter</samp> <samp>{</samp><samp>\iffalse</samp><samp>}</samp><samp>\fi</samp>.
However, it is not possible to put in the
<samp>&lt;{?}</samp> part something that the parser considers as a closing brace followed by
some other text (otherwise, this closing brace would terminate parsing of the
<samp>&lt;{?}</samp> part).</p>
<p>Knuth says that an entry of the form <samp>a}b{c</samp> is legitimate, with
respect to this template. This cannot be the case in <i>Tralics</i>, but it would
be valid for a template like <samp>&gt;{\bgroup\bf}c&lt;{\egroup}</samp>.
This justifies that a table has to be terminated by <samp>\cr</samp> or <samp>\crcr</samp>.
In the case of <i>Tralics</i>, this is not needed.</p>

<h3 id="uid3330">6.9.3. New column types</h3>
<p>You can add new column types to the list of existing one,
using <samp>\newcolumntype</samp><a id="uid3331"></a>, with as argument a letter. For instance:</p>
<pre class="latex-code">\newcolumntype{C}{&gt;{$}c&lt;{$}}
\newcolumntype{L}{&gt;{$}l&lt;{$}}
\newcolumntype{R}{&gt;{$}r&lt;{$}}
\newcolumntype{d}[1]{&gt;{\rightdots{#1}}r&lt;{\endrightdots}}
\newcolumntype{X}{CLR}
\begin{tabular}{*{3}{|c|}d{23}X}
\end{tabular}
</pre>
<p>In this case, the transcript file will contains (line breaks added before `r´)</p>
<pre class="log-code">{Push tabular 2}
array preamble at start: |c||c||c|d{23}X
array preamble after X: |c||c||c|d{23}CLR
array preamble after d: |c||c||c|&gt;{\rightdots {23}}
                              r&lt;{\endrightdots }CLR
array preamble after C: |c||c||c|&gt;{\rightdots {23}}
                              r&lt;{\endrightdots }&gt;{$}c&lt;{$}LR
array preamble after L: |c||c||c|&gt;{\rightdots {23}}
                              r&lt;{\endrightdots }&gt;{$}c&lt;{$}&gt;{$}l&lt;{$}R
array preamble after R: |c||c||c|&gt;{\rightdots {23}}
                              r&lt;{\endrightdots }&gt;{$}c&lt;{$}&gt;{$}l&lt;{$}&gt;{$}r&lt;{$}
array preamble parse: | c | | c | | c | &gt;&gt;{}
                              r &lt;&lt;{} &gt;&gt;{} c &lt;&lt;{} &gt;&gt;{} l &lt;&lt;{} &gt;&gt;{} r &lt;&lt;{}
</pre>
<p class="nofirst noindent">Whenever a tabular is seen, optional arguments are read, and then the first
argument is handled. In a first pass, <samp>*</samp> is evaluated. This gives the lines
marked `at start´.
After that, the preamble contains, at toplevel (outside braces) two characters
`d´ and `X´ that are defined to be new column types. These are evaluated one
after the other (the order is irrelevant, here alphabetic order is used so
that X is expanded first). Since the expansion was non trivial, a second try
is made. Note that only a finite numbers of tries are executed. In case of
recursion, strange things can happen. Note how you can use commands with
arguments (here `d´ takes one argument, it is `23´).</p>
<p>The table is empty, on purpose, because there are two undefined macros,
moreover, because, in the current version of <i>Tralics</i>, dollar signs have to be
explicit, and not hidden in a <samp>&gt;{}...&lt;{}</samp> construction.</p>

<h3 id="uid3332">6.9.4. Another example</h3>
<p>We consider here the following new column types. As you can see, one of them
is the character <samp>+</samp>, another is the character <samp>_</samp>. The fact that these
characters have special catcodes is irrelevant (they cannot be of catcode 1
and 2, because this would interfere with brace matching, and they cannot be of
catcode 10, because space characters should be ignored in the preamble).</p>
<pre class="latex-code">\newcolumntype{L} {&gt;{\large\bfseries 2}l &lt;{y}|}
\newcolumntype{+} {&gt;{B}l &lt;{D}|}
\newcolumntype{_}{rlc&lt;{x}}
\newcolumntype{x}{&gt;{b}c&lt;{a}}
</pre>

<p>Consider the four following tables</p>
<pre class="latex-code">\begin{tabular*}{339pt}[b]{*{4}{_c|}}
a1&amp;a2&amp;a3&amp;a4  &amp; b1&amp;b2&amp;b3&amp;b4 &amp; c1&amp;c2&amp;c3&amp;c4&amp; d1&amp;d2&amp;d3&amp;d4\\
Wa1&amp;Wa2&amp;Wa3&amp;Wa4  &amp; Wb1&amp;Wb2&amp;Wb3&amp;Wb4 &amp; Wc1&amp;Wc2&amp;Wc3&amp;Wc4&amp; Wd1&amp;Wd2&amp;Wd3&amp;Wd4\\
\end{tabular*}
 
\begin{tabular}{|ll|rr|cc|}
\hline a&amp;b&amp;c&amp;d&amp;e&amp;f\\
aaa&amp;bbb&amp;ccc&amp;ddd&amp;eee&amp;fff\\
\hline
A&amp;\multicolumn{3}{+}{C}&amp;E&amp;F\\
\multicolumn{2}{|l}{ab}&amp;c&amp;d&amp;e&amp;f\\
\cline{1-3}\cline{6-6}
aaa&amp;bbb&amp;ccc&amp;ddd  &amp;eee&amp;fff\\\hline
\end{tabular}
 
\begin{tabular} {| &gt;{\large 1}c &lt;{x}| L &gt; {\large\itshape 3}c &lt;{z}|}
\hline A&amp;B&amp;C\\\hline 100&amp;10 &amp;1\\\hline
\end{tabular}
 
\begin{tabular} {| &gt;{\large 1}c &lt;{x}| L &gt; {\large\itshape 3}x &lt;{z}|}
\hline A&amp;B&amp;C\\\hline 100&amp;10 &amp;1
\end{tabular}
</pre>
<div class="hc" id="uid3333"><p><strong>Table 2. </strong>Some LaTeX tables</p><table align="center" style="caption-side:bottom; border-collapse: collapse; border-width:1px;"><tr><td style="text-align:right;">a1</td>
<td style="text-align:left;">a2</td>
<td style="text-align:center;">a3x</td>
<td style="text-align:center;border-right:solid 1px;">a4</td>
<td style="text-align:left;">b1</td>
<td style="text-align:center;">b2x</td>
<td style="text-align:center;border-right:solid 1px;">b3</td>
<td style="text-align:right;">b4</td>
<td style="text-align:left;">c1</td>
<td style="text-align:center;">c2x</td>
<td style="text-align:center;border-right:solid 1px;">c3</td>
<td style="text-align:right;">c4</td>
<td style="text-align:left;">d1</td>
<td style="text-align:center;">d2x</td>
<td style="text-align:center;border-right:solid 1px;">d3</td>
<td>d4</td>
</tr><tr><td style="text-align:right;">Wa1</td>
<td style="text-align:left;">Wa2</td>
<td style="text-align:center;">Wa3x</td>
<td style="text-align:center;border-right:solid 1px;">Wa4</td>
<td style="text-align:left;">Wb1</td>
<td style="text-align:center;">Wb2x</td>
<td style="text-align:center;border-right:solid 1px;">Wb3</td>
<td style="text-align:right;">Wb4</td>
<td style="text-align:left;">Wc1</td>
<td style="text-align:center;">Wc2x</td>
<td style="text-align:center;border-right:solid 1px;">Wc3</td>
<td style="text-align:right;">Wc4</td>
<td style="text-align:left;">Wd1</td>
<td style="text-align:center;">Wd2x</td>
<td style="text-align:center;border-right:solid 1px;">Wd3</td>
<td>Wd4</td>
</tr></table><table align="center" style="caption-side:bottom; border-collapse: collapse; border-width:1px;"><tr><td style="text-align:left;border-left:solid 1px;border-top:solid 1px;">a</td>
<td style="text-align:left;border-right:solid 1px;border-top:solid 1px;">b</td>
<td style="text-align:right;border-top:solid 1px;">c</td>
<td style="text-align:right;border-right:solid 1px;border-top:solid 1px;">d</td>
<td style="text-align:center;border-top:solid 1px;">e</td>
<td style="text-align:center;border-right:solid 1px;border-top:solid 1px;">f</td>
</tr><tr><td style="text-align:left;border-left:solid 1px;border-bottom:solid 1px;">aaa</td>
<td style="text-align:left;border-right:solid 1px;border-bottom:solid 1px;">bbb</td>
<td style="text-align:right;border-bottom:solid 1px;">ccc</td>
<td style="text-align:right;border-right:solid 1px;border-bottom:solid 1px;">ddd</td>
<td style="text-align:center;border-bottom:solid 1px;">eee</td>
<td style="text-align:center;border-right:solid 1px;border-bottom:solid 1px;">fff</td>
</tr><tr><td style="text-align:left;border-left:solid 1px;">A</td>
<td style="text-align:left;border-right:solid 1px;" colspan="3">BCD</td>
<td style="text-align:center;">E</td>
<td style="text-align:center;border-right:solid 1px;">F</td>
</tr><tr><td style="text-align:left;border-left:solid 1px;border-bottom:solid 1px;" colspan="2">ab</td>
<td style="text-align:right;border-bottom:solid 1px;">c</td>
<td style="text-align:right;border-right:solid 1px;">d</td>
<td style="text-align:center;">e</td>
<td style="text-align:center;border-right:solid 1px;border-bottom:solid 1px;">f</td>
</tr><tr><td style="text-align:left;border-left:solid 1px;border-bottom:solid 1px;">aaa</td>
<td style="text-align:left;border-right:solid 1px;border-bottom:solid 1px;">bbb</td>
<td style="text-align:right;border-bottom:solid 1px;">ccc</td>
<td style="text-align:right;border-right:solid 1px;border-bottom:solid 1px;">ddd</td>
<td style="text-align:center;border-bottom:solid 1px;">eee</td>
<td style="text-align:center;border-right:solid 1px;border-bottom:solid 1px;">fff</td>
</tr></table><table align="center" style="caption-side:bottom; border-collapse: collapse; border-width:1px;"><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;border-bottom:solid 1px;border-top:solid 1px;"><big>1Ax</big></td>
<td style="text-align:left;border-right:solid 1px;border-bottom:solid 1px;border-top:solid 1px;"><big></big><big><b>2By</b></big></td>
<td style="text-align:center;border-right:solid 1px;border-bottom:solid 1px;border-top:solid 1px;"><big></big><big><i>3Cz</i></big></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;border-bottom:solid 1px;"><big>1100x</big></td>
<td style="text-align:left;border-right:solid 1px;border-bottom:solid 1px;"><big></big><big><b>210y</b></big></td>
<td style="text-align:center;border-right:solid 1px;border-bottom:solid 1px;"><big></big><big><i>31z</i></big></td>
</tr></table><table align="center" style="caption-side:bottom; border-collapse: collapse; border-width:1px;"><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;border-bottom:solid 1px;border-top:solid 1px;"><big>1Ax</big></td>
<td style="text-align:left;border-right:solid 1px;border-bottom:solid 1px;border-top:solid 1px;"><big></big><big><b>2By</b></big></td>
<td style="text-align:center;border-right:solid 1px;border-bottom:solid 1px;border-top:solid 1px;">b<big></big><big><i>3Cza</i></big></td>
</tr><tr><td style="text-align:center;border-right:solid 1px;border-left:solid 1px;"><big>1100x</big></td>
<td style="text-align:left;border-right:solid 1px;"><big></big><big><b>210y</b></big></td>
<td style="text-align:center;border-right:solid 1px;">b<big></big><big><i>31za</i></big></td>
</tr></table></div>
<p>You can see the LaTeX result on table <a href="#uid3333">2</a>. We had to change the
<samp>\tabcolsep</samp> of the first table to 0, otherwise, it is two wide.
Specifying 0pt as width gives the following warning :
<i>Overfull \hbox (339.38422pt too wide) in alignment</i>, from this we
deduced that 339pt could be a good value, specifying 340 gives an underful box.
The
<span class="sansserif">XML</span> translation can be found on the Web page. In order to explain what
happens, we consider an example:</p>
<pre class="latex-code">\begin{tabular*}{10pc}[b]{l&gt;{x}r&lt;{y}c}
\hline
a&amp;b&amp;c\\[2pt]
a&amp;\omit b&amp;c\\
\multicolumn{1}{l}{A}&amp;B&amp;C\\\hline
\end{tabular*}
</pre>
<p>We explain now the translation. Line numbers refer to the transcript file
given below. We do not show the start of the job (initialization). The command
<samp>\par</samp> is redefined to do nothing. It is restored on line 107.</p>
<ul>
<li id="uid3334"><p class="nofirst noindent">A first procedure is used to start a row. See example, lines 1, 35, 63,
101. It can take an argument,
that explains that some vertical spacing should be added between
rows, this is the case for line 35.
Tokens are read and expanded. Spaces are ignored. If the command that
comes next is <samp>\hline</samp><a id="uid3335"></a>, for instance lines 1 and 101,
we add a bottom-border attribute to the
previous row (if we are about to start the first row, we mark this as
top-border for the current row). If the command is <samp>\cline</samp><a id="uid3336"></a>, see
syntax above, we try to add a bottom-border attribute to some cells
(this is not shown on the example). This
could fail, because cells can span more than one column; in this case an row
of empty cells may be added. If the next token is <samp>\end</samp>, we do nothing
(line 101).
Otherwise, we create a new <samp>\row</samp> element (lines 3, 36, and 63) and start a cell.</p>
</li>
<li id="uid3337"><p class="nofirst noindent">When a cell is started, the equivalent of <samp>\begingroup</samp> is
evaluated, and a <samp>\cell</samp> element is started. The example table has 9
cells, started on lines 4, 12, 22, 37, 45, 53, 64, 82, 92. The `Push´ line
indicates that a <tt class="txt">&lt;cell&gt;</tt> element is created, the line that follows show
the <samp>\begingroup</samp> command.
We consider the first non
space token after expansion. This token may be <samp>\omit</samp><a id="uid3338"></a>,
as on line 47. The cell
is marked omitted; otherwise the &#9001;u&#9002; part of the current template is
added. The current token could be <samp>\multicolumn</samp><a id="uid3339"></a>. This is a command
that takes 3 arguments: an integer <span class="math"><i>n</i></span>, a specification <span class="math"><i>c</i></span>, a value <span class="math"><i>v</i></span>.
The example on lines 66 to 69 shows how <span class="math"><i>n</i></span> is read; this might change, LaTeX uses the equivalent of <samp>\setcounter</samp> for parsing the number.
The specification is handled in the same fashion as an array preamble
(lines 70-71), it should
provide only one cell specification. The integer <span class="math"><i>n</i></span> specifies the span, it
will be added as an attribute to the cell, but also used to find the position
of the next cell in the row.</p>
<p>The cell is marked `omit´; in fact, we push in
the current input stream the value of the &#9001;u&#9002; part, &#9001;v&#9002; part and
content (last argument) of <samp>\multicolumn</samp>. Braces are added for some
obscure reason (see lines 72 and 73).</p>
</li>
<li id="uid3340"><p class="nofirst noindent">Translation proceeds as usual, three events may change it.
Assume that we see <samp>&amp;</samp>, as on lines 7, 15, 40, 77, 85. This is only
allowed in a table. A final space in the <span class="sansserif">XML</span> element will be removed.
A <samp>\endtemplate</samp> token is pushed to be read again. It will be read again
on lines 9, 18, 42, 79, and 88. If
the cell on the stack is not marked `omit´ then the &#9001;v&#9002; part of the
template is inserted in the input stream (see lines 17 and 87).</p>
</li>
<li id="uid3341"><p class="nofirst noindent">The translation of <samp>\endtemplate</samp> is trivial: it is an error if not
in a
cell. Otherwise, the current cell is finished, the equivalent of
<samp>\endgroup</samp> is executed, and a new cell is started as above.
On line 10 you can see for instance that the cell and the row are in `array´
mode, the tabular in horizontal mode, the paragraph and the document in
vertical mode.</p>
</li>
<li id="uid3342"><p class="nofirst noindent">Assume that we see <samp>\\</samp>, for instance lines 25, 56, 95.
We have explained the meaning of this command
outside a cell. In any case, an optional argument is read (between the
command and the optional argument can be a space or a newline character, so
that source line 10 is read; see line 58).
The behavior is
like <samp>&amp;</samp>, except that <samp>\cr</samp> is pushed instead of <samp>\endtemplate</samp>.
(in the case of an optional argument, the code is a bit hacked, see line 30).</p>
</li>
<li id="uid3343"><p class="nofirst noindent">The translation of <samp>\cr</samp> is trivial. We have two versions: one that
reads a dimension, and one that does not. On lines 27-29, you can see how
`scanglue´ reads to optional argument to <samp>\\</samp>, on line 31, you see that
`scanint´ reads 1703, this is the address in a table of the string that
represents the glue. The command finishes the cell,
finishes the row, evaluates <samp>\endgroup</samp> and starts a new row.</p>
</li>
<li id="uid3344"><p class="nofirst noindent">The <samp>\end</samp> command, with argument `tabular´<a id="uid3345"></a> or `tabular*´
behaves in a strange manner: If inside a cell, it
behaves like <samp>\\</samp>, except that it does not insert <samp>\endtemplate</samp> but itself with
the argument, then a <samp>\cr</samp>. We have seen that <samp>\cr</samp> starts a new
row. We have seen that no row is started if the token is <samp>\end</samp>. The
magic is that the top-stack contains the `begin´, and a normal `end´ can be
used, instead of a hacked one. In our example, the array is terminated by
<samp>\\</samp><samp>\hline</samp>, so that the end occurs when we are about to start a new row.
In order to show this, we have commented out this line, and re-run the example.
The result can be seen on line 111, a <samp>\cr</samp> is
inserted and evaluated on line 115, the second <samp>\end</samp> is evaluated on line
19.</p>
</li>
<li id="uid3346"><p class="nofirst noindent">The commands <samp>\cr</samp><a id="uid3347"></a>, <samp>\crcr</samp><a id="uid3348"></a>, <samp>\span</samp><a id="uid3349"></a>,
<samp>\halign</samp><a id="uid3350"></a>, <samp>\valign</samp><a id="uid3351"></a>, <samp>\noalign</samp><a id="uid3352"></a>
are not
implemented as described in the TeXbook.</p>
</li></ul>
<p>This is the transcript file.</p>
<pre class="log-code"><span class="prenumber">1</span> [7] \hline
<span class="prenumber">2</span> [8] a&amp;b&amp;c\\[2pt]
<span class="prenumber">3</span> {Push row 3}
<span class="prenumber">4</span> {Push cell 4}
<span class="prenumber">5</span> +stack: level + 3 for cell
<span class="prenumber">6</span> Character sequence: a.
<span class="prenumber">7</span> {alignment tab character &amp;}
<span class="prenumber">8</span> {Text:a}
<span class="prenumber">9</span> {\endtemplate}
<span class="prenumber">10</span> {Pop 4: document_v p_v tabular*_h row_a cell_a}
<span class="prenumber">11</span> +stack: level - 3 for cell
<span class="prenumber">12</span> {Push cell 4}
<span class="prenumber">13</span> +stack: level + 3 for cell
<span class="prenumber">14</span> Character sequence: xb.
<span class="prenumber">15</span> {alignment tab character &amp;}
<span class="prenumber">16</span> {Text:xb}
<span class="prenumber">17</span> Character sequence: y.
<span class="prenumber">18</span> {\endtemplate}
<span class="prenumber">19</span> {Text:y}
<span class="prenumber">20</span> {Pop 4: document_v p_v tabular*_h row_a cell_a}
<span class="prenumber">21</span> +stack: level - 3 for cell
<span class="prenumber">22</span> {Push cell 4}
<span class="prenumber">23</span> +stack: level + 3 for cell
<span class="prenumber">24</span> Character sequence: c.
<span class="prenumber">25</span> {\\}
<span class="prenumber">26</span> {Text:c}
<span class="prenumber">27</span> +scanint for \\-&gt;2
<span class="prenumber">28</span> +scandimen for \\-&gt;2.0pt
<span class="prenumber">29</span> {scanglue 2.0pt}
<span class="prenumber">30</span> {\cr withargs}
<span class="prenumber">31</span> +scanint for \cr withargs-&gt;1703
<span class="prenumber">32</span> {Pop 4: document_v p_v tabular*_h row_a cell_a}
<span class="prenumber">33</span> +stack: level - 3 for cell
<span class="prenumber">34</span> {Pop 3: document_v p_v tabular*_h row_a}
<span class="prenumber">35</span> [9] a&amp;\omit b&amp;c\\
<span class="prenumber">36</span> {Push row 3}
<span class="prenumber">37</span> {Push cell 4}
<span class="prenumber">38</span> +stack: level + 3 for cell
<span class="prenumber">39</span> Character sequence: a.
<span class="prenumber">40</span> {alignment tab character &amp;}
<span class="prenumber">41</span> {Text:a}
<span class="prenumber">42</span> {\endtemplate}
<span class="prenumber">43</span> {Pop 4: document_v p_v tabular*_h row_a cell_a}
<span class="prenumber">44</span> +stack: level - 3 for cell
<span class="prenumber">45</span> {Push cell 4}
<span class="prenumber">46</span> +stack: level + 3 for cell
<span class="prenumber">47</span> Character sequence: b.
<span class="prenumber">48</span> {alignment tab character &amp;}
<span class="prenumber">49</span> {Text:b}
<span class="prenumber">50</span> {\endtemplate}
<span class="prenumber">51</span> {Pop 4: document_v p_v tabular*_h row_a cell_a}
<span class="prenumber">52</span> +stack: level - 3 for cell
<span class="prenumber">53</span> {Push cell 4}
<span class="prenumber">54</span> +stack: level + 3 for cell
<span class="prenumber">55</span> Character sequence: c.
<span class="prenumber">56</span> {\\}
<span class="prenumber">57</span> {Text:c}
<span class="prenumber">58</span> [10] \multicolumn{1}{l}{A}&amp;B&amp;C\\\hline
<span class="prenumber">59</span> {\cr}
<span class="prenumber">60</span> {Pop 4: document_v p_v tabular*_h row_a cell_a}
<span class="prenumber">61</span> +stack: level - 3 for cell
<span class="prenumber">62</span> {Pop 3: document_v p_v tabular*_h row_a}
<span class="prenumber">63</span> {Push row 3}
<span class="prenumber">64</span> {Push cell 4}
<span class="prenumber">65</span> +stack: level + 3 for cell
<span class="prenumber">66</span> {Push argument 5}
<span class="prenumber">67</span> Character sequence: 1.
<span class="prenumber">68</span> {Text:1}
<span class="prenumber">69</span> {Pop 5: document_v p_v tabular*_h row_a cell_a argument_a}
<span class="prenumber">70</span> array preamble at start: l
<span class="prenumber">71</span> array preamble parse: l
<span class="prenumber">72</span> {begin-group character {}
<span class="prenumber">73</span> +stack: level + 4 for brace
<span class="prenumber">74</span> Character sequence: A.
<span class="prenumber">75</span> {end-group character }}
<span class="prenumber">76</span> +stack: level - 4 for brace
<span class="prenumber">77</span> {alignment tab character &amp;}
<span class="prenumber">78</span> {Text:A}
<span class="prenumber">79</span> {\endtemplate}
<span class="prenumber">80</span> {Pop 4: document_v p_v tabular*_h row_a cell_a}
<span class="prenumber">81</span> +stack: level - 3 for cell
<span class="prenumber">82</span> {Push cell 4}
<span class="prenumber">83</span> +stack: level + 3 for cell
<span class="prenumber">84</span> Character sequence: xB.
<span class="prenumber">85</span> {alignment tab character &amp;}
<span class="prenumber">86</span> {Text:xB}
<span class="prenumber">87</span> Character sequence: y.
<span class="prenumber">88</span> {\endtemplate}
<span class="prenumber">89</span> {Text:y}
<span class="prenumber">90</span> {Pop 4: document_v p_v tabular*_h row_a cell_a}
<span class="prenumber">91</span> +stack: level - 3 for cell
<span class="prenumber">92</span> {Push cell 4}
<span class="prenumber">93</span> +stack: level + 3 for cell
<span class="prenumber">94</span> Character sequence: C.
<span class="prenumber">95</span> {\\}
<span class="prenumber">96</span> {Text:C}
<span class="prenumber">97</span> {\cr}
<span class="prenumber">98</span> {Pop 4: document_v p_v tabular*_h row_a cell_a}
<span class="prenumber">99</span> +stack: level - 3 for cell
<span class="prenumber">100</span> {Pop 3: document_v p_v tabular*_h row_a}
<span class="prenumber">101</span> [11] \end{tabular*}
<span class="prenumber">102</span> {\end}
<span class="prenumber">103</span> {\end tabular*}
<span class="prenumber">104</span> {\endtabular*}
<span class="prenumber">105</span> {Pop 2: document_v p_v tabular*_h}
<span class="prenumber">106</span> {\endgroup (for env)}
<span class="prenumber">107</span> +stack: restoring \par=\par
<span class="prenumber">108</span> +stack: ending environment tabular*; resuming document.
<span class="prenumber">109</span> +stack: level - 2 for environment
<span class="prenumber">110</span> Character sequence:  .
</pre>
<p>Alternate version, where the final <samp>\\</samp><samp>\hline</samp> is commented out</p>
<pre class="log-code"><span class="prenumber">111</span> [11] \end{tabular*}
<span class="prenumber">112</span> {\end}
<span class="prenumber">113</span> {Text:C}
<span class="prenumber">114</span> {\end tabular*}
<span class="prenumber">115</span> {\cr}
<span class="prenumber">116</span> {Pop 4: document_v p_v tabular*_h row_a cell_a}
<span class="prenumber">117</span> +stack: level - 3 for cell
<span class="prenumber">118</span> {Pop 3: document_v p_v tabular*_h row_a}
<span class="prenumber">119</span> {\end}
<span class="prenumber">120</span> {\end tabular*}
<span class="prenumber">121</span> {\endtabular*}
</pre>

<h2 id="uid3353">6.10. Actions declared in the configuration file</h2>
<p>An action is defined by a name, an equals sign, and a value. Optional spaces
can be used. The syntax of DocType and DocAttrib is special. In all other
cases, double quotes must delimit the value.
All names contain only letters, digits, and
underscores. If the name has the form <span class="sansserif">att_foo</span>, this changes the value
of attribute `foo´. If the name has the form <span class="sansserif">xml_foo</span>,
it changes the value of element `foo´. In a previous version you had
to give the full name, <span class="sansserif">xml_foo_name</span>. Names of elements and
attributes can be dynamically changed: when you say</p>
<pre class="latex-code">\ChangeElementName{item}{Item}
\ChangeElementName*{rend}{rendering}
\ChangeElementName*{quote}{quotation}
</pre>
<p class="nofirst noindent">this changes the name of element `item´ and attributes `rend´
and `quote´.</p>
<p>In the examples that follow, we shall assume that the file defined in section
<a href="#uid3127" title="Sample files">6.3.6</a> is loaded.</p>
<ul>
<li id="uid3354"><p class="nofirst noindent"><span class="sansserif">makefo</span><a id="uid3355"></a>,
<span class="sansserif">makehtml</span><a id="uid3356"></a>,
<span class="sansserif">checkxml</span><a id="uid3357"></a>,
<span class="sansserif">makepdf</span><a id="uid3358"></a>,
<span class="sansserif">makedvi</span><a id="uid3359"></a>,
<span class="sansserif">dvitops</span><a id="uid3360"></a>,
<span class="sansserif">generatedvi</span><a id="uid3361"></a>,
<span class="sansserif">generateps</span><a id="uid3362"></a>.
These specify actions for the Raweb. For details see the Web page.</p>
</li>
<li id="uid3363"><p class="nofirst noindent"><span class="sansserif">theme_vals</span><a id="uid3364"></a> (Raweb only). This defines the list of
all Inria Themes.</p>
</li>
<li id="uid3365"><p class="nofirst noindent"><span class="sansserif">section_vals</span><a id="uid3366"></a> (Raweb only). This defines the list
of all valid sections in the Raweb.
If the first character is a `+´ sign, the remaining of the line is appended to
the previous value. You must use a slash as separator.</p>
</li>
<li id="uid3367"><p class="nofirst noindent"><span class="sansserif">ur_vals</span><a id="uid3368"></a> (Raweb only). This defines the list
of all valid UR (name and value) in the Raweb.
If the first character is a `+´ sign, the remaining of the line is
appended to the previous value. You must use a slash as separator. After
each name, you must give a value (if empty, the name will be used). Only
letters can be used in the name.</p>
</li>
<li id="uid3369"><p class="nofirst noindent"><span class="sansserif">affiliation_vals</span><a id="uid3370"></a>,
<span class="sansserif">profession_vals</span><a id="uid3371"></a> (Raweb only). Same syntax
as above. These lists specify which values are valid for argument 3 and 4 of
the <samp>\pers</samp> command. The value `Other´ is always valid.</p>
</li>
<li id="uid3372"><p class="nofirst noindent"><span class="sansserif">catperso_vals</span><a id="uid3373"></a>,
(Raweb only). Same syntax
as above. These lists specify which values are valid for argument of
the <samp>\catperso</samp> command. If no such declaration is given, any value is
accepted.</p>
</li>
<li id="uid3374"><p class="nofirst noindent"><span class="sansserif">Language</span><a id="uid3375"></a>. The main element contains an attribute
pair of the form <span class="sansserif">language</span>=´english´. Specifying `Language´ in the
configuration file modifies the name of the attribute.</p>
</li>
<li id="uid3376"><p class="nofirst noindent"><span class="sansserif">lang_fr</span>, <span class="sansserif">lang_en</span><a id="uid3377"></a>. See
above. These two commands can parametrize the value of the attribute. The
attribute pair is added to the main element: just after translation of the
preamble in the Raweb case, by the titlepage command, or in the
at-begin-document hook. The language chosen is the &#8220;default language&#8221;.</p>
</li>
<li id="uid3378"><p class="nofirst noindent"><span class="sansserif">url_font</span><a id="uid3379"></a>.
If you specify a value `\foo´, then
<samp>\def\urlfont{\foo}</samp> will be added to the
document-hook. The command is empty
by default. It is the font used for urls.<a id="uid3380"></a></p>
</li>
<li id="uid3381"><p class="nofirst noindent"><span class="sansserif">distinguish_refer_in_rabib</span><a id="uid3382"></a>
(Raweb only). This overrides the command line argument of the same name.</p>
</li>
<li id="uid3383"><p class="nofirst noindent"><span class="sansserif">entity_names</span><a id="uid3384"></a>.
This overrides the command line option <tt>entnames</tt>.</p>
</li>
<li id="uid3385"><p class="nofirst noindent"><span class="sansserif">bibtex_fields</span><a id="uid3386"></a>. This specifies a list of
additional BibTeX fields that <i>Tralics</i> should read and translate.</p>
</li>
<li id="uid3387"><p class="nofirst noindent"><span class="sansserif">bibtex_extensions</span><a id="uid3388"></a>. This specifies a
list of additional BibTeX entry types that <i>Tralics</i> should read and
translate.</p>
</li>
<li id="uid3389"><p class="nofirst noindent"><span class="sansserif">everyjob</span><a id="uid3390"></a>. If the value is `\foo´, then
<samp>\everyjob={\foo}</samp> will be executed. In fact, this is the last
line of the bootstrap code.
After these lines are translated, the value of the token list
<samp>\everyjob</samp><a id="uid3391"></a> is inserted in the input stream, before the first line of
the input file.</p>
</li>
<li id="uid3392"><p class="nofirst noindent"><span class="sansserif">no_footnote_hack</span><a id="uid3393"></a>. If the value is
`true´, then no hack is applied to footnotes. The translation of</p>
<pre class="latex-code">a\footnote{B}\footnote{C\par D}
</pre>
<p class="nofirst noindent">is<a id="uid3394"></a></p>
<pre class="xml-code">&lt;p&gt;a&lt;note id='uid1' place='foot'&gt;B&lt;/note&gt;
&lt;note id='uid2' place='foot'&gt;&lt;p&gt;C&lt;/p&gt; &lt;p&gt;D&lt;/p&gt;
&lt;/note&gt;&lt;/p&gt;
</pre>
<p class="nofirst noindent">As you can see, if the footnote holds only a single <tt class="txt">&lt;p&gt;</tt> element, it will
be removed. If the switch is true, then all footnotes translate the same.</p>
</li>
<li id="uid3395"><p class="nofirst noindent"><span class="sansserif">xml_footnote_name</span><a id="uid3396"></a>,
<span class="sansserif">att_place</span><a id="uid3397"></a>,
<span class="sansserif">att_foot_position</span><a id="uid3398"></a>.
These assignments explain how to change the name of the <tt class="txt">&lt;note&gt;</tt> element,
the attribute name and the attribute value in `place=´foot´. Thus, the
translation of the example above can be:</p>
<pre class="xml-code">&lt;p&gt;a&lt;Note id='uid12' Place='Inline'&gt;&lt;p&gt;B&lt;/p&gt;
&lt;/Note&gt;&lt;Note id='uid13' Place='Inline'&gt;&lt;p&gt;C&lt;/p&gt;
&lt;p&gt;D&lt;/p&gt;
&lt;/Note&gt;
</pre>

</li>
<li id="uid3399"><p class="nofirst noindent"><span class="sansserif">use_font_elt</span><a id="uid3400"></a>. The default translation of
<samp>{\tiny \textit{A}B}</samp> is<a id="uid3401"></a></p>
<pre class="xml-code">&lt;hi rend='small'&gt;&lt;hi rend='it'&gt;A&lt;/hi&gt;&lt;/hi&gt;&lt;hi rend='small'&gt;B&lt;/hi&gt;
</pre>
<p class="nofirst noindent">If you say `use_font_elt=true´, this changes the translation as follows</p>
<pre class="xml-code">&lt;small&gt;&lt;it&gt;A&lt;/it&gt;&lt;/small&gt;&lt;small&gt;B&lt;/small&gt;
</pre>
<p class="nofirst noindent">We shall see below how to replace `small´ by something else. the method is the
same whether `small´ is the name of a an element or an attribute value.</p>
</li>
<li id="uid3402"><p class="nofirst noindent"><span class="sansserif">use_all_sizes</span><a id="uid3403"></a>. By default, <i>Tralics</i> knows only
three font sizes, normal, smaller, larger. If the switch is true, the
previous example translates to</p>
<pre class="xml-code">&lt;small4&gt;&lt;it&gt;A&lt;/it&gt;&lt;/small4&gt;&lt;small4&gt;B&lt;/small4&gt;
</pre>
<p class="nofirst noindent">or</p>
<pre class="xml-code">&lt;hi rend='small4'&gt;&lt;hi rend='it'&gt;A&lt;/hi&gt;&lt;/hi&gt;&lt;hi rend='small4'&gt;B&lt;/hi&gt;
</pre>

</li>
<li id="uid3404"><p class="nofirst noindent"><span class="sansserif">xml_font_small</span><a id="uid3405"></a>,
<span class="sansserif">xml_font_large</span><a id="uid3406"></a>,
<span class="sansserif">xml_font_normalsize</span><a id="uid3407"></a>.
These elements specify the names of small, large and normal size.
The translation of
<samp>{\tiny a}</samp><samp>{\normalsize b}</samp><samp>{\large c}</samp> can be changed to<a id="uid3408"></a></p>
<pre class="xml-code">&lt;Small&gt;a&lt;/Small&gt;b&lt;Large&gt;c&lt;/Large&gt;
</pre>
<p class="nofirst noindent">Currently, no tag is inserted in the case of <samp>\normalsize</samp>. In some cases,
this is wrong.</p>
</li>
<li id="uid3409"><p class="nofirst noindent"><span class="sansserif">xml_font_small1</span><a id="uid3410"></a>,
<span class="sansserif">xml_font_small2</span><a id="uid3411"></a>,
<span class="sansserif">xml_font_small3</span><a id="uid3412"></a>,
<span class="sansserif">xml_font_small4</span><a id="uid3413"></a>,
<span class="sansserif">xml_font_large1</span><a id="uid3414"></a>,
<span class="sansserif">xml_font_large2</span><a id="uid3415"></a>,
<span class="sansserif">xml_font_large3</span><a id="uid3416"></a>,
<span class="sansserif">xml_font_large4</span><a id="uid3417"></a>,
<span class="sansserif">xml_font_large5</span><a id="uid3418"></a>.</p>
<p class="nofirst noindent">These specify the names of
all font sizes for the case where all sizes are used.
For instance, the translation of
<a id="uid3419"></a></p>
<pre class="latex-code">{\Huge a}{\huge b}{\LARGE c}{\Large d}{\large e}{\normalsize f}{\small
  g}{\footnotesize h}{\scriptsize i}{\tiny j}
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;font-large5&gt;a&lt;/font-large5&gt;&lt;font-large4&gt;b&lt;/font-large4&gt;
&lt;font-large3&gt;c&lt;/font-large3&gt;&lt;font-large2&gt;d&lt;/font-large2&gt;
&lt;font-large1&gt;e&lt;/font-large1&gt;f&lt;font-small1&gt;g&lt;/font-small1&gt;
&lt;font-small2&gt;h&lt;/font-small2&gt;&lt;font-small3&gt;i&lt;/font-small3&gt;
&lt;font-small4&gt;j&lt;/font-small4&gt;
</pre>
<p class="nofirst noindent">It can be changed to</p>
<pre class="xml-code">&lt;hi rend='font-large5'&gt;a&lt;/hi&gt;&lt;hi rend='font-large4'&gt;b&lt;/hi&gt;
&lt;hi rend='font-large3'&gt;c&lt;/hi&gt;&lt;hi rend='font-large2'&gt;d&lt;/hi&gt;
&lt;hi rend='font-large1'&gt;e&lt;/hi&gt;f&lt;hi rend='font-small1'&gt;g&lt;/hi&gt;
&lt;hi rend='font-small2'&gt;h&lt;/hi&gt;&lt;hi rend='font-small3'&gt;i&lt;/hi&gt;
&lt;hi rend='font-small4'&gt;j&lt;/hi&gt;
</pre>
</li>
<li id="uid3420"><p class="nofirst noindent"><span class="sansserif">xml_font_upright</span><a id="uid3421"></a>,
<span class="sansserif">xml_font_it</span><a id="uid3422"></a>,
<span class="sansserif">xml_font_slanted</span><a id="uid3423"></a>,
<span class="sansserif">xml_font_sc</span><a id="uid3424"></a>. These four parameters specify the
shape. The first one is currently unused. The default translation of<a id="uid3425"></a></p>
<pre class="latex-code">{\upshape a}{\itshape b}{\slshape c}{\scshape d}
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">a&lt;hi rend='it'&gt;b&lt;/hi&gt;&lt;hi rend='slanted'&gt;c&lt;/hi&gt;&lt;hi rend='sc'&gt;d&lt;/hi&gt;
</pre>
<p class="nofirst noindent">or (using elements):</p>
<pre class="xml-code">a&lt;it&gt;b&lt;/it&gt;&lt;slanted&gt;c&lt;/slanted&gt;&lt;sc&gt;d&lt;/sc&gt;
</pre>
<p class="nofirst noindent">You can change it to:</p>
<pre class="xml-code">a&lt;font-italic-shape&gt;b&lt;/font-italic-shape&gt;
&lt;font-slanted-shape&gt;c&lt;/font-slanted-shape&gt;
&lt;font-small-caps-shape&gt;d&lt;/font-small-caps-shape&gt;
</pre>

</li>
<li id="uid3426"><p class="nofirst noindent"><span class="sansserif">xml_font_medium</span><a id="uid3427"></a>,
<span class="sansserif">xml_font_bold</span><a id="uid3428"></a>. These two parameters specify the series.
The first is currently unused.</p>
</li>
<li id="uid3429"><p class="nofirst noindent"><span class="sansserif">xml_font_roman</span><a id="uid3430"></a>,
<span class="sansserif">xml_font_tt</span><a id="uid3431"></a>,
<span class="sansserif">xml_font_sansserif</span><a id="uid3432"></a>.
These three parameters specify the family.
The first is currently unused. The translation of<a id="uid3433"></a></p>
<pre class="latex-code">{\mdseries e}{\bfseries f}{\ttfamily h}{\sffamily h}{\rmfamily i}
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">e&lt;hi rend='bold'&gt;f&lt;/hi&gt;&lt;hi rend='tt'&gt;h&lt;/hi&gt;&lt;hi rend='sansserif'&gt;h&lt;/hi&gt;i
</pre>
<p class="nofirst noindent">but you can change it to</p>
<pre class="xml-code">e&lt;bold&gt;f&lt;/bold&gt;&lt;tt&gt;h&lt;/tt&gt;&lt;sansserif&gt;h&lt;/sansserif&gt;i
</pre>
<p class="nofirst noindent">or</p>
<pre class="xml-code">e&lt;font-bold-series&gt;f&lt;/font-bold-series&gt;
&lt;font-typewriter-family&gt;h&lt;/font-typewriter-family&gt;
&lt;font-sansserif-family&gt;h&lt;/font-sansserif-family&gt;i
</pre>

</li>
<li id="uid3434"><p class="nofirst noindent"><span class="sansserif">xml_sup_name</span><a id="uid3435"></a>,
<span class="sansserif">xml_sub_name</span><a id="uid3436"></a>.
These two parameters control the name of superscript and subscripts in text
mode.</p>
</li>
<li id="uid3437"><p class="nofirst noindent"><span class="sansserif">xml_oldstyle_name</span><a id="uid3438"></a>,
<span class="sansserif">xml_overline_name</span><a id="uid3439"></a>,
<span class="sansserif">xml_underline_name</span><a id="uid3440"></a>.
These parameters control the names used for oldstyle numbers, overline and
underline.</p>
</li>
<li id="uid3441"><p class="nofirst noindent"><span class="sansserif">xml_caps_name</span><a id="uid3442"></a>,
<span class="sansserif">xml_ul_name</span><a id="uid3443"></a>,
<span class="sansserif">xml_hl_name</span><a id="uid3444"></a>,
<span class="sansserif">xml_so_name</span><a id="uid3445"></a>,
<span class="sansserif">xml_st_name</span><a id="uid3446"></a>. These control element names and
attributes defined by the <span class="sansserif">soul</span> package.
The translation of<a id="uid3447"></a></p>
<pre class="latex-code">\ul{a}\caps{b}\hl{c}\so{d}\st{e}
\textsuperscript{f}\textsubscript{g}
\oldstylenums{h}\overline{i}\underline{j}
</pre>
<p class="nofirst noindent">is by default</p>
<pre class="xml-code">&lt;hi rend='ul'&gt;a&lt;/hi&gt;&lt;hi rend='caps'&gt;b&lt;/hi&gt;&lt;hi rend='hl'&gt;c&lt;/hi&gt;
&lt;hi rend='so'&gt;d&lt;/hi&gt;&lt;hi rend='st'&gt;e&lt;/hi&gt;
&lt;hi rend='sup'&gt;f&lt;/hi&gt;&lt;hi rend='sub'&gt;g&lt;/hi&gt;
&lt;hi rend='oldstyle'&gt;h&lt;/hi&gt;&lt;hi rend='overline'&gt;i&lt;/hi&gt;
&lt;hi rend='underline'&gt;j&lt;/hi&gt;
</pre>
<p class="nofirst noindent">but can be changed to</p>
<pre class="xml-code">&lt;font-ul&gt;a&lt;/font-ul&gt;&lt;font-caps&gt;b&lt;/font-caps&gt;&lt;font-hl&gt;c&lt;/font-hl&gt;
&lt;font-so&gt;d&lt;/font-so&gt;&lt;font-st&gt;e&lt;/font-st&gt;
&lt;font-super&gt;f&lt;/font-super&gt;&lt;font-sub&gt;g&lt;/font-sub&gt;
&lt;font-oldstyle&gt;h&lt;/font-oldstyle&gt;&lt;font-overline&gt;i&lt;/font-overline&gt;
&lt;font-underline&gt;j&lt;/font-underline
</pre>
</li>
<li id="uid3448"><p class="nofirst noindent"><span class="sansserif">alternate_item</span><a id="uid3449"></a>. If true or false, it
redefines <samp>\item</samp> to <samp>\@item</samp> or <samp>\@@item</samp>. The translation of</p>
<pre class="latex-code">\begin{itemize}
\makeatletter
\@item [A]b
\@@item [A]b
\end{itemize}
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;List type='simple'&gt;
&lt;Item id='uid14' Label='A'&gt;&lt;p Noindent='true'&gt;b&lt;/p&gt;
&lt;/Item&gt;&lt;Label&gt;A&lt;/Label&gt;
&lt;Item id='uid15'&gt;&lt;p Noindent='true'&gt;b&lt;/p&gt;
&lt;/Item&gt;&lt;/List&gt;
</pre>
</li>
<li id="uid3450"><p class="nofirst noindent"><span class="sansserif">xml_labelitem_name</span><a id="uid3451"></a>. This specifies
the name of the element containing the optional argument of an
<samp>\item</samp>. Default value is `label´. If alternate items are used, it
specifies the names of an attribute.</p>
</li>
<li id="uid3452"><p class="nofirst noindent"><span class="sansserif">xml_item_name</span><a id="uid3453"></a>. This specifies the name
of the element containing an <samp>\item</samp>. Default value is `item´.</p>
</li>
<li id="uid3454"><p class="nofirst noindent"><span class="sansserif">xml_list_name</span><a id="uid3455"></a>.
This is the name of the element generated by list environments like
itemize, enumerate and description.</p>
</li>
<li id="uid3456"><p class="nofirst noindent"><span class="sansserif">att_user_list</span><a id="uid3457"></a>. List defined by the
`<samp>list</samp>´ environment are by default of type `description´.
Example</p>
<pre class="latex-code">\begin{list}{}{}
\item[item label] item value
\begin{description}
\item[first item] okok
\item[second item]
\begin{itemize}
\item First
\item Second
\begin{enumerate}
\item some item
\item another one
\end{enumerate}
\end{itemize}
\end{description}
\end{list}
</pre>
<p class="nofirst noindent">This translates by default to</p>
<pre class="xml-code">&lt;list type='description'&gt;&lt;label&gt;item label&lt;/label&gt;
&lt;item id='uid3'&gt;&lt;p noindent='true'&gt;item value&lt;/p&gt;
&lt;list type='description'&gt;&lt;label&gt;first item&lt;/label&gt;
&lt;item id='uid4'&gt;&lt;p noindent='true'&gt;okok&lt;/p&gt;
&lt;/item&gt;&lt;label&gt;second item&lt;/label&gt;
&lt;item id='uid5'&gt;
&lt;list type='simple'&gt;
&lt;item id='uid6'&gt;&lt;p noindent='true'&gt;First&lt;/p&gt;
&lt;/item&gt;
&lt;item id='uid7'&gt;&lt;p noindent='true'&gt;Second&lt;/p&gt;
&lt;list type='ordered'&gt;
&lt;item id='uid8'&gt;&lt;p noindent='true'&gt;some item&lt;/p&gt;
&lt;/item&gt;
&lt;item id='uid9'&gt;&lt;p noindent='true'&gt;another one&lt;/p&gt;
&lt;/item&gt;&lt;/list&gt;
&lt;/item&gt;&lt;/list&gt;
&lt;/item&gt;&lt;/list&gt;
&lt;/item&gt;&lt;/list&gt;
</pre>
<p class="nofirst noindent">It can be changed to:</p>
<pre class="xml-code">&lt;List type='MyList'&gt;
&lt;Item id='uid16' Label='item label'&gt;&lt;p Noindent='true'&gt;item value&lt;/p&gt;
&lt;List type='description'&gt;
&lt;Item id='uid17' Label='first item'&gt;&lt;p Noindent='true'&gt;okok&lt;/p&gt;
&lt;/Item&gt;
&lt;Item id='uid18' Label='second item'&gt;
&lt;List type='simple'&gt;
&lt;Item id='uid19'&gt;&lt;p Noindent='true'&gt;First&lt;/p&gt;
&lt;/Item&gt;
&lt;Item id='uid20'&gt;&lt;p Noindent='true'&gt;Second&lt;/p&gt;
&lt;List type='ordered'&gt;
&lt;Item id='uid21'&gt;&lt;p Noindent='true'&gt;some item&lt;/p&gt;
&lt;/Item&gt;
&lt;Item id='uid22'&gt;&lt;p Noindent='true'&gt;another one&lt;/p&gt;
&lt;/Item&gt;&lt;/List&gt;
&lt;/Item&gt;&lt;/List&gt;
&lt;/Item&gt;&lt;/List&gt;
&lt;/Item&gt;&lt;/List&gt;
</pre>
</li>
<li id="uid3458"><p class="nofirst noindent"><span class="sansserif">xml_gloitem_name</span><a id="uid3459"></a>. This specifies the
name of the element containing the first argument of <samp>\glo</samp>. Default
value is `label´.</p>
</li>
<li id="uid3460"><p class="nofirst noindent"><span class="sansserif">xml_glo_name</span><a id="uid3461"></a>.
This controls the name of the glossary.</p>
</li>
<li id="uid3462"><p class="nofirst noindent"><span class="sansserif">att_gloss_type</span><a id="uid3463"></a>.
In a glossary, a <tt class="txt">&lt;list&gt;</tt> element is created with attribute
<span class="sansserif">type</span>=´gloss´. This variable can be used to change the value of the
attribute. The translation of</p>
<pre class="latex-code">\begin{glossaire}
\glo{aa}{bb}
\glo{cc}{dd}
\end{glossaire}
</pre>
<p class="nofirst noindent">can be</p>
<pre class="xml-code">&lt;List type='Gloss'&gt;
&lt;Head&gt;The famous glossary&lt;/Head&gt;
&lt;Glolabel&gt;aa&lt;/Glolabel&gt;&lt;Item&gt;&lt;p&gt;bb&lt;/p&gt;&lt;/Item&gt;
&lt;Glolabel&gt;cc&lt;/Glolabel&gt;&lt;Item&gt;&lt;p&gt;dd&lt;/p&gt;&lt;/Item&gt;
&lt;/List&gt;
</pre>
</li>
<li id="uid3464"><p class="nofirst noindent"><span class="sansserif">xml_head_name</span><a id="uid3465"></a>.
This is the name of the <tt class="txt">&lt;head&gt;</tt> element in a title.</p>
</li>
<li id="uid3466"><p class="nofirst noindent"><span class="sansserif">att_nonumber</span><a id="uid3467"></a>.
This is the value of the `rend´ attribute for unnumbered sections.</p>
</li>
<li id="uid3468"><p class="nofirst noindent"><span class="sansserif">xml_frontmatter_name</span><a id="uid3469"></a>,
<span class="sansserif">xml_mainmatter_name</span><a id="uid3470"></a>,
<span class="sansserif">xml_backmatter_name</span><a id="uid3471"></a>.
These are the name of elements associated to frontmatter, mainmatter and
backmatter.</p>
</li>
<li id="uid3472"><p class="nofirst noindent"><span class="sansserif">xml_div0_name</span><a id="uid3473"></a>,
<span class="sansserif">xml_div1_name</span><a id="uid3474"></a>,
<span class="sansserif">xml_div2_name</span><a id="uid3475"></a>,
<span class="sansserif">xml_div3_name</span><a id="uid3476"></a>,
<span class="sansserif">xml_div4_name</span><a id="uid3477"></a>,</p>
<p class="nofirst noindent"><span class="sansserif">xml_div5_name</span><a id="uid3478"></a>,
<span class="sansserif">xml_div6_name</span><a id="uid3479"></a>.
This specifies the name of a section. The default translation of
<a id="uid3480"></a>
<a id="uid3481"></a>
<a id="uid3482"></a></p>
<pre class="latex-code">\frontmatter
\chapter{Chapter one}  OK
\mainmatter
\part{First Part of document}
Some text here
\part{Second Part}
\chapter{Chapter two}
\section{Section one}
\subsection{Subsection one}
\subsubsection{Subsubsection one}
\paragraph{First paragraph}
\subparagraph{First sub paragraph}
Normal text\label{a}
\backmatter
We are now in the backmatter.\ref{a}\pageref{a}
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;frontmatter&gt;
&lt;div1 id='uid1' rend='nonumber'&gt;&lt;head&gt;Chapter one&lt;/head&gt;
&lt;p&gt;OK&lt;/p&gt;
&lt;/div1&gt;&lt;/frontmatter&gt;
&lt;mainmatter&gt;
&lt;div0 id='uid2'&gt;&lt;head&gt;First Part of document&lt;/head&gt;
&lt;p&gt;Some text here&lt;/p&gt;
&lt;/div0&gt;
&lt;div0 id='uid3'&gt;&lt;head&gt;Second Part&lt;/head&gt;
&lt;div1 id='uid4'&gt;&lt;head&gt;Chapter two&lt;/head&gt;
&lt;div2 id='uid5'&gt;&lt;head&gt;Section one&lt;/head&gt;
&lt;div3 id='uid6'&gt;&lt;head&gt;Subsection one&lt;/head&gt;
&lt;div4 id='uid7'&gt;&lt;head&gt;Subsubsection one&lt;/head&gt;
&lt;div5 id='uid8'&gt;&lt;head&gt;First paragraph&lt;/head&gt;
&lt;div6 id='uid9'&gt;&lt;head&gt;First sub paragraph&lt;/head&gt;
&lt;p&gt;Normal text&lt;/p&gt;
&lt;/div6&gt;&lt;/div5&gt;&lt;/div4&gt;&lt;/div3&gt;&lt;/div2&gt;&lt;/div1&gt;&lt;/div0&gt;&lt;/mainmatter&gt;
&lt;backmatter&gt;&lt;p&gt;We are now in the backmatter.
&lt;ref target='uid9'/&gt;&lt;ref target='uid9' rend='page'/&gt;&lt;/p&gt;
&lt;/backmatter&gt;
</pre>
<p class="nofirst noindent">but you can use these commands to get:</p>
<pre class="xml-code">&lt;Frontmatter&gt;
&lt;Xdiv1 id='uid1' Rend='NoNumber'&gt;&lt;Head&gt;Chapter one&lt;/Head&gt;
&lt;p&gt;OK&lt;/p&gt;
&lt;/Xdiv1&gt;&lt;/Frontmatter&gt;
&lt;Mainmatter&gt;
&lt;Xdiv0 id='uid2'&gt;&lt;Head&gt;First Part of document&lt;/Head&gt;
&lt;p&gt;Some text here&lt;/p&gt;
&lt;/Xdiv0&gt;
&lt;Xdiv0 id='uid3'&gt;&lt;Head&gt;Second Part&lt;/Head&gt;
&lt;Xdiv1 id='uid4'&gt;&lt;Head&gt;Chapter two&lt;/Head&gt;
&lt;Xdiv2 id='uid5'&gt;&lt;Head&gt;Section one&lt;/Head&gt;
&lt;Xdiv3 id='uid6'&gt;&lt;Head&gt;Subsection one&lt;/Head&gt;
&lt;Xdiv4 id='uid7'&gt;&lt;Head&gt;Subsubsection one&lt;/Head&gt;
&lt;Xdiv5 id='uid8'&gt;&lt;Head&gt;First paragraph&lt;/Head&gt;
&lt;Xdiv6 id='uid9'&gt;&lt;Head&gt;First sub paragraph&lt;/Head&gt;
&lt;p&gt;Normal text&lt;/p&gt;
&lt;/Xdiv6&gt;&lt;/Xdiv5&gt;&lt;/Xdiv4&gt;&lt;/Xdiv3&gt;&lt;/Xdiv2&gt;&lt;/Xdiv1&gt;&lt;/Xdiv0&gt;&lt;/Mainmatter&gt;
&lt;Backmatter&gt;&lt;p&gt;We are now in the backmatter.
&lt;Ref target='uid9'/&gt;&lt;Ref target='uid9' Rend='Page'/&gt;&lt;/p&gt;
&lt;/Backmatter&gt;
</pre>
</li>
<li id="uid3483"><p class="nofirst noindent"><span class="sansserif">xml_fbox_name</span><a id="uid3484"></a>,
<span class="sansserif">xml_scalebox_name</span><a id="uid3485"></a>,
<span class="sansserif">xml_box_name</span><a id="uid3486"></a>.
These control the names of various box commands.</p>
</li>
<li id="uid3487"><p class="nofirst noindent"><span class="sansserif">att_boxed</span><a id="uid3488"></a>.
This is the name of the attributed added by <samp>\fbox</samp><a id="uid3489"></a>, unless it is a
includegraphics.</p>
</li>
<li id="uid3490"><p class="nofirst noindent"><span class="sansserif">att_framed</span><a id="uid3491"></a>.
If a figure is in a <samp>\fbox</samp><a id="uid3492"></a>, it will have <span class="sansserif">framed</span>=´true´. This
changes the name of the attribute.</p>
</li>
<li id="uid3493"><p class="nofirst noindent"><span class="sansserif">att_box_width</span><a id="uid3494"></a>.
Name of <span class="sansserif">width</span> attribute for commands like <samp>\framebox</samp>.</p>
</li>
<li id="uid3495"><p class="nofirst noindent"><span class="sansserif">att_box_scale</span><a id="uid3496"></a>.
This controls the name <span class="sansserif">scale</span> attribute, unless in a figure.
Example
<a id="uid3497"></a></p>
<pre class="latex-code">\fbox{foo}\scalebox{0.3}{foo}\framebox(10,10){foo}\framebox[10pt][11]{foo}
</pre>
<p class="nofirst noindent">translates as</p>
<pre class="xml-code">&lt;fbox rend='boxed'&gt;foo&lt;/fbox&gt;
&lt;scalebox scale='0.3'&gt;foo&lt;/scalebox&gt;
&lt;pic-framebox width='10' height='10' framed='true'&gt;foo&lt;/pic-framebox&gt;
&lt;fbox width='10.0pt' rend='boxed'&gt;foo&lt;/fbox&gt;
</pre>
<p class="nofirst noindent">You can change it to</p>
<pre class="xml-code">&lt;Framebox Rendering='Boxed'&gt;foo&lt;/Framebox&gt;
&lt;Scalebox BoxScale='0.3'&gt;foo&lt;/Scalebox&gt;
&lt;Xbox Width='10' Height='10' Framed='true'&gt;foo&lt;/Xbox&gt;
&lt;Framebox BoxWidth='10.0pt' Rendering='Boxed'&gt;foo&lt;/Framebox&gt;
</pre>
</li>
<li id="uid3498"><p class="nofirst noindent"><span class="sansserif">xml_keywords_name</span><a id="uid3499"></a>.
This is the name of the element generated by `motscle´ environment.
The default value is `keywords´.</p>
</li>
<li id="uid3500"><p class="nofirst noindent"><span class="sansserif">xml_term_name</span><a id="uid3501"></a>.
This is the name of the element used for each keyword.
The default value is `term´. For instance,</p>
<pre class="latex-code">\begin{motscle} first, second,  {(max,+)}\end{motscle}
</pre>
<p class="nofirst noindent">translates to</p>
<pre class="xml-code">&lt;keywords&gt;
&lt;term&gt;first&lt;/term&gt;
&lt;term&gt;second&lt;/term&gt;
&lt;term&gt;(max,+)&lt;/term&gt;
&lt;/keywords&gt;
</pre>
<p class="nofirst noindent">and can be changed to</p>
<pre class="xml-code">&lt;Keywords&gt;
&lt;Term&gt;first&lt;/Term&gt;
&lt;Term&gt;second&lt;/Term&gt;
&lt;Term&gt;(max,+)&lt;/Term&gt;
&lt;/Keywords&gt;
</pre>
</li>
<li id="uid3502"><p class="nofirst noindent"><span class="sansserif">xml_scaption_name</span><a id="uid3503"></a>.
Special caption (outside figure or table).</p>
</li>
<li id="uid3504"><p class="nofirst noindent"><span class="sansserif">xml_mbox_name</span><a id="uid3505"></a>.
This is the name of the element used by the <samp>\mbox</samp>, unless the result is
trivial.</p>
</li>
<li id="uid3506"><p class="nofirst noindent"><span class="sansserif">xml_rotatebox_name</span><a id="uid3507"></a>.
This is the name of the element generated by <samp>\rotatebox</samp><a id="uid3508"></a>.</p>
</li>
<li id="uid3509"><p class="nofirst noindent"><span class="sansserif">att_rotate_angle</span><a id="uid3510"></a>.
This controls the name of the <span class="sansserif">angle</span> attribute in the case of
<samp>\rotatebox</samp><a id="uid3511"></a>.</p>
</li>
<li id="uid3512"><p class="nofirst noindent"><span class="sansserif">xml_subfigure_name</span><a id="uid3513"></a>.
This is the name of the element generated by <samp>\subfigure</samp><a id="uid3514"></a>.
The default value is `subfigure´.</p>
</li>
<li id="uid3515"><p class="nofirst noindent"><span class="sansserif">xml_texte_name</span><a id="uid3516"></a>.
This is the name of the element generated by <samp>\subfigure</samp><a id="uid3517"></a>, containing
the required argument.</p>
</li>
<li id="uid3518"><p class="nofirst noindent"><span class="sansserif">xml_leg_name</span><a id="uid3519"></a>.
This is the name of the element generated by <samp>\subfigure</samp><a id="uid3520"></a>, containing
the optional argument.</p>
<p>For instance, the translation of</p>
<pre class="latex-code">\noindent \mbox{\xbox{a}{b}} \rotatebox{30}{x}
\subfigure[a]{b}
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;p noindent='true'&gt;
   &lt;mbox&gt;&lt;a&gt;b&lt;/a&gt;&lt;/mbox&gt;
   &lt;pic-rotatebox angle='30'&gt;x&lt;/pic-rotatebox&gt;
   &lt;subfigure&gt;&lt;leg&gt;a&lt;/leg&gt;&lt;texte&gt;b&lt;/texte&gt;&lt;/subfigure&gt;
&lt;/p&gt;
</pre>
<p class="nofirst noindent">but can be changed to</p>
<pre class="xml-code">&lt;p Noindent='true'&gt;
   &lt;Xmbox&gt;&lt;a&gt;b&lt;/a&gt;&lt;/Xmbox&gt;
   &lt;Rotatebox Rangle='30'&gt;x&lt;/Rotatebox&gt;
   &lt;Xsubfigure&gt;&lt;Leg&gt;a&lt;/Leg&gt;&lt;Texte&gt;b&lt;/Texte&gt;&lt;/Xsubfigure&gt;
&lt;/p&gt;
</pre>
</li>
<li id="uid3521"><p class="nofirst noindent"><span class="sansserif">xml_topic_name</span><a id="uid3522"></a>,
<span class="sansserif">xml_topic_title</span><a id="uid3523"></a>,
<span class="sansserif">att_topic_num</span><a id="uid3524"></a>.
These are used for topics (Raweb only). The default values for the elements
are `topic´ and `t_titre´, for the attribute it is `num´.</p>
</li>
<li id="uid3525"><p class="nofirst noindent"><span class="sansserif">xml_caption_name</span><a id="uid3526"></a>,
<span class="sansserif">xml_graphics_name</span><a id="uid3527"></a>,
<span class="sansserif">xml_figure_env_name</span><a id="uid3528"></a>,
<span class="sansserif">xml_table_env_name</span><a id="uid3529"></a>,
<span class="sansserif">xml_Table_name</span><a id="uid3530"></a>.
These names are used by some commands and environments. For instance,
consider the following code. Normally, you put a tabular in a table, an image
in a figure (as in B or D), this gives smaller <span class="sansserif">XML</span> objects.</p>
<pre class="latex-code">\begin{tabular}{c}a\end{tabular}
\caption{A}
%
\begin{table}[htbp]
\begin{tabular}{c}a\end{tabular}
\caption{B}
\end{table}
%
\begin{table}[htbp]
\includegraphics{a}
\caption{C}
\end{table}
%
\begin{figure}[htbp]
\includegraphics{a}
\caption{D}
\end{figure}
</pre>
<p class="nofirst noindent">This is the default translation:</p>
<pre class="xml-code">&lt;table rend='inline'&gt;&lt;row&gt;&lt;cell halign='center'&gt;a&lt;/cell&gt;&lt;/row&gt;&lt;/table&gt;
&lt;p&gt;&lt;caption&gt;A&lt;/caption&gt;&lt;/p&gt;
&lt;table rend='display' id='uid10'&gt;&lt;head&gt;B&lt;/head&gt;
   &lt;row&gt;&lt;cell halign='center'&gt;a&lt;/cell&gt;&lt;/row&gt;&lt;/table&gt;
&lt;table rend='display' id='uid11'&gt;&lt;head&gt;C&lt;/head&gt;
   &lt;figure rend='inline' file='a'/&gt;&lt;/table&gt;
&lt;figure file='a' id='uid12'&gt;&lt;head&gt;D&lt;/head&gt;&lt;/figure&gt;
</pre>
<p class="nofirst noindent">This shows how all names can be parametrized.</p>
<pre class="xml-code">&lt;Table Rend='inline'&gt;&lt;Row&gt;&lt;Cell Halign='Center'&gt;a&lt;/Cell&gt;&lt;/Row&gt;&lt;/Table&gt;
 
&lt;p&gt;&lt;SCaption&gt;&lt;p&gt;A&lt;/p&gt;&lt;/SCaption&gt;&lt;/p&gt;
 
&lt;FloatTable Rend='display' id='uid14'&gt;
  &lt;Caption&gt;&lt;p&gt;B&lt;/p&gt;&lt;/Caption&gt;
  &lt;Row&gt;&lt;Cell Halign='Center'&gt;a&lt;/Cell&gt;&lt;/Row&gt;
&lt;/FloatTable&gt;
 
&lt;FloatTable Rend='display' id='uid15'&gt;
 &lt;Caption&gt;&lt;p&gt;C&lt;/p&gt;&lt;/Caption&gt;
 &lt;Figure Rend='inline' File='a'/&gt;
&lt;/FloatTable&gt;
 
&lt;FloatFigure File='a' id='uid16'&gt;
   &lt;Caption&gt;&lt;p&gt;D&lt;/p&gt;&lt;/Caption&gt;
&lt;/FloatFigure&gt;
</pre>
</li>
<li id="uid3531"><p class="nofirst noindent"><span class="sansserif">xml_xref_name</span><a id="uid3532"></a>.
This is the name of the element associated to <samp>\url</samp><a id="uid3533"></a>.</p>
</li>
<li id="uid3534"><p class="nofirst noindent"><span class="sansserif">xml_project_name</span><a id="uid3535"></a>.
This controls the name of the <tt class="txt">&lt;projet&gt;</tt> element.</p>
</li>
<li id="uid3536"><p class="nofirst noindent"><span class="sansserif">xml_accueil_name</span><a id="uid3537"></a>.
This controls the name of the <tt class="txt">&lt;accueil&gt;</tt> element.</p>
</li>
<li id="uid3538"><p class="nofirst noindent"><span class="sansserif">xml_composition_ra_name</span><a id="uid3539"></a>.
This controls the name of the <tt class="txt">&lt;composition&gt;</tt> element. In fact, in Raweb mode, when a environment `RAsection´ is closed, and the argument of the
environment is the value of this variable, then modules inside the element are
replaced by their content.</p>
</li>
<li id="uid3540"><p class="nofirst noindent"><span class="sansserif">xml_xtheorem_name</span><a id="uid3541"></a>.
This controls the theorem names. This is an example of theorems
<a id="uid3542"></a></p>
<pre class="latex-code">\theorembodyfont{\sl}
\theoremstyle{break}
\newtheorem{Cor}{Corollary}
\theoremstyle{plain}
%\newcounter{section}
\setcounter{section}{17}
\newtheorem{Exa}{Example}[section]
{\theorembodyfont{\rmfamily}\newtheorem{Rem}{Remark}}
\theoremstyle{marginbreak}
\newtheorem{Lem}[Cor]{lemma}
\theoremstyle{change}
\theorembodyfont{\small\itshape} \newtheorem{Def}[Cor]{Definition}
\theoremheaderfont{\scshape}
\def\Lenv#1{\texttt{#1}}
 
\begin{Cor}
 This is a sentence typeset in the theorem environment \Lenv{Cor}.
\end{Cor}
\begin{Exa}
 This is a sentence typeset in the theorem environment \Lenv{Exa}.
\end{Exa}
\begin{Rem}
 This is a sentence typeset in the theorem environment \Lenv{Rem}.
\end{Rem}
\begin{Lem}[Ben User]
 This is a sentence typeset in the theorem environment \Lenv{Lem}.
\end{Lem}
\begin{Def}[Very Impressive definition]
 This is a sentence typeset in the theorem environment \Lenv{Def}.
\end{Def}
</pre>
<p class="nofirst noindent">This is the translation:</p>
<pre class="xml-code">&lt;p&gt;&lt;hi rend='sc'&gt;Corollary 1 &lt;/hi&gt;&lt;hi rend='slanted'&gt;This
is a sentence typeset in the theorem environment &lt;/hi&gt;
&lt;hi rend='slanted'&gt;&lt;hi rend='tt'&gt;Cor&lt;/hi&gt;&lt;/hi&gt;&lt;hi rend='slanted'&gt;.&lt;/hi&gt;&lt;/p&gt;
 
&lt;p&gt;&lt;hi rend='sc'&gt;Example 17.1 &lt;/hi&gt;&lt;hi rend='slanted'&gt;This
is a sentence typeset in the theorem environment &lt;/hi&gt;
&lt;hi rend='slanted'&gt;&lt;hi rend='tt'&gt;Exa&lt;/hi&gt;&lt;/hi&gt;&lt;hi rend='slanted'&gt;.&lt;/hi&gt;&lt;/p&gt;
 
&lt;p&gt;&lt;hi rend='sc'&gt;Remark 1 &lt;/hi&gt;This is a sentence typeset in
the theorem environment &lt;hi rend='tt'&gt;Rem&lt;/hi&gt;.&lt;/p&gt;
 
&lt;p&gt;&lt;hi rend='sc'&gt;lemma 2 (Ben User) &lt;/hi&gt;&lt;hi rend='slanted'&gt;
This is a sentence typeset in the theorem environment &lt;/hi&gt;&lt;hi
rend='slanted'&gt;&lt;hi rend='tt'&gt;Lem&lt;/hi&gt;&lt;/hi&gt;&lt;hi rend='slanted'&gt;.&lt;/hi&gt;&lt;/p&gt;
 
&lt;p&gt;&lt;hi rend='sc'&gt;Definition 3 (Very Impressive definition) &lt;/hi&gt;&lt;hi
      rend='small'/&gt;&lt;hi rend='small'&gt;&lt;hi rend='it'&gt;
This is a sentence typeset in the theorem environment &lt;/hi&gt;&lt;/hi&gt;
&lt;hi rend='small'&gt;&lt;hi rend='it'&gt;&lt;hi rend='tt'&gt;Def&lt;/hi&gt;&lt;/hi&gt;&lt;/hi&gt;
&lt;hi rend='small'&gt;&lt;hi rend='it'&gt;.&lt;/hi&gt;&lt;/hi&gt;&lt;/p&gt;
</pre>
<p class="nofirst noindent">This may be changed to:</p>
<pre class="xml-code">&lt;BTheorem id='uid29'&gt;&lt;p&gt;&lt;SC&gt;Corollary 1 &lt;/SC&gt;
&lt;SL&gt;This is a sentence typeset in the theorem environment &lt;/SL&gt;
&lt;SL&gt;&lt;TT&gt;Cor&lt;/TT&gt;&lt;/SL&gt;&lt;SL&gt;.&lt;/SL&gt;&lt;/p&gt;
&lt;/BTheorem&gt;
&lt;BTheorem id='uid30'&gt;&lt;p&gt;&lt;SC&gt;Example 17.1 &lt;/SC&gt;
&lt;SL&gt;This is a sentence typeset in the theorem environment &lt;/SL&gt;
&lt;SL&gt;&lt;TT&gt;Exa&lt;/TT&gt;&lt;/SL&gt;&lt;SL&gt;.&lt;/SL&gt;&lt;/p&gt;
&lt;/BTheorem&gt;
&lt;BTheorem id='uid31'&gt;&lt;p&gt;&lt;SC&gt;Remark 1 &lt;/SC&gt;
This is a sentence typeset in the theorem environment &lt;TT&gt;Rem&lt;/TT&gt;.&lt;/p&gt;
&lt;/BTheorem&gt;
&lt;BTheorem id='uid32'&gt;&lt;p&gt;&lt;SC&gt;lemma 2 (Ben User) &lt;/SC&gt;&lt;SL&gt;
This is a sentence typeset in the theorem environment
&lt;/SL&gt;&lt;SL&gt;&lt;TT&gt;Lem&lt;/TT&gt;&lt;/SL&gt;&lt;SL&gt;.&lt;/SL&gt;&lt;/p&gt;
&lt;/BTheorem&gt;
&lt;BTheorem id='uid33'&gt;&lt;p&gt;&lt;SC&gt;Definition 3 (Very Impressive definition) &lt;/SC&gt;
&lt;Small/&gt;&lt;Small&gt;&lt;IT&gt;
This is a sentence typeset in the theorem environment
&lt;/IT&gt;&lt;/Small&gt;&lt;Small&gt;&lt;IT&gt;&lt;TT&gt;Def&lt;/TT&gt;&lt;/IT&gt;&lt;/Small&gt;&lt;Small&gt;&lt;IT&gt;.&lt;/IT&gt;&lt;/Small&gt;&lt;/p&gt;
&lt;/BTheorem&gt;
</pre>

</li>
<li id="uid3543"><p class="nofirst noindent"><span class="sansserif">xml_theorem_head</span><a id="uid3544"></a>.
This controls the element that contains the optional argument of the theorem,
if the alternate syntax is used (default is <tt class="txt">alt_head</tt>, shown as <tt class="txt">AltHead</tt>
below).</p>
</li>
<li id="uid3545"><p class="nofirst noindent"><span class="sansserif">xml_theorem_name</span><a id="uid3546"></a>.
This is used for theorems. The value of the variable is unused.
Redefining the command changes the meaning of
<samp>\@begintheorem</samp> to <samp>\@xbegintheorem</samp>. As a consequence the translation
of the previous theorem is:</p>
<pre class="xml-code">&lt;BTheorem style='break' type='Cor' id='uid29'&gt;
&lt;Head&gt;Corollary&lt;/Head&gt;
&lt;p&gt;This is a sentence typeset in the theorem environment &lt;TT&gt;Cor&lt;/TT&gt;.&lt;/p&gt;
&lt;/BTheorem&gt;
&lt;BTheorem style='plain' type='Exa' id='uid30'&gt;
&lt;Head&gt;Example&lt;/Head&gt;
&lt;p&gt;This is a sentence typeset in the theorem environment &lt;TT&gt;Exa&lt;/TT&gt;.&lt;/p&gt;
&lt;/BTheorem&gt;
&lt;BTheorem style='plain' type='Rem' id='uid31'&gt;
&lt;Head&gt;Remark&lt;/Head&gt;
&lt;p&gt;This is a sentence typeset in the theorem environment &lt;TT&gt;Rem&lt;/TT&gt;.&lt;/p&gt;
&lt;/BTheorem&gt;
&lt;BTheorem style='marginbreak' type='Lem' id='uid32'&gt;
&lt;Head&gt;lemma&lt;/Head&gt;
&lt;ThHead&gt;Ben User&lt;/ThHead&gt;
&lt;p&gt;This is a sentence typeset in the theorem environment &lt;TT&gt;Lem&lt;/TT&gt;.&lt;/p&gt;
&lt;/BTheorem&gt;
&lt;BTheorem style='change' type='Def' id='uid33'&gt;
&lt;Head&gt;Definition&lt;/Head&gt;
&lt;ThHead&gt;Very Impressive definition&lt;/ThHead&gt;
&lt;p&gt;This is a sentence typeset in the theorem environment &lt;TT&gt;Def&lt;/TT&gt;.&lt;/p&gt;
&lt;/BTheorem&gt;
</pre>
</li>
<li id="uid3547"><p class="nofirst noindent"><span class="sansserif">mfenced_separator_val</span><a id="uid3548"></a>.
If the value of this quantity is `<samp>X</samp>´, then <i>Tralics</i> will add
<span class="sansserif">separators</span> = `X´ to each <tt class="txt">&lt;mfenced&gt;</tt> that are created (except for
fences for arrays, i.e., matrices and the like). The default value is the
empty string. If the value is `NONE´, no attribute will be added. If
the value is `mrow´, no attribute is added, but the <tt class="txt">&lt;mfence&gt;</tt>
elements has a single child, a <tt class="txt">&lt;mrow&gt;</tt> element being inserted, if needed.
Example</p>
<pre class="latex-code">$\left[ a +b \right ] \left(x\right) $
</pre>
<p class="nofirst noindent">This is the translation if the separator is <tt class="txt">&amp;ThinSpace;</tt></p>
<pre class="xml-code">&lt;formula type='inline'&gt;
  &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
    &lt;mrow&gt;
      &lt;mfenced separators='&amp;ThinSpace;' open='[' close=']'&gt;
        &lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;
      &lt;/mfenced&gt;
      &lt;mfenced separators='&amp;ThinSpace;' open='(' close=')'&gt;
        &lt;mi&gt;x&lt;/mi&gt;
      &lt;/mfenced&gt;
    &lt;/mrow&gt;
  &lt;/math&gt;
&lt;/formula&gt;
</pre>
<p>Translation if the value the separator is the empty string (this is the
default behavior). No separator added in case where the <tt class="txt">&lt;mfenced&gt;</tt> element
has a single child.</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
  &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
    &lt;mrow&gt;
      &lt;mfenced separators='' open='[' close=']'&gt;
         &lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;
      &lt;/mfenced&gt;
      &lt;mfenced open='(' close=')'&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mfenced&gt;
    &lt;/mrow&gt;
  &lt;/math&gt;
&lt;/formula&gt;
</pre>
<p>Translation if the value the separator is `mrow´. Here a <tt class="txt">&lt;mrow&gt;</tt>
element is added.</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
  &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
    &lt;mrow&gt;
      &lt;mfenced open='[' close=']'&gt;
        &lt;mrow&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;
      &lt;/mfenced&gt;
      &lt;mfenced open='(' close=')'&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mfenced&gt;
    &lt;/mrow&gt;
  &lt;/math&gt;
&lt;/formula&gt;
</pre>
<p>Translation if the value the separator is `NONE´.
This is the behaviour of <i>Tralics</i> before 2.9.4.</p>
<pre class="xml-code">&lt;formula type='inline'&gt;
  &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
    &lt;mrow&gt;
      &lt;mfenced open='[' close=']'&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mfenced
      &lt;mfenced open='(' close=')'&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mfenced&gt;
    &lt;/mrow&gt;
  &lt;/math&gt;
&lt;/formula&gt;
</pre>
</li>
<li id="uid3549"><p class="nofirst noindent"><span class="sansserif">xml_biblio</span><a id="uid3550"></a>.
This controls the name of the element that contains the bibliography.</p>
</li>
<li id="uid3551"><p class="nofirst noindent"><span class="sansserif">att_box_pos</span><a id="uid3552"></a>.
This controls the name of the <span class="sansserif">pos</span> attribute in a box.</p>
</li>
<li id="uid3553"><p class="nofirst noindent"><span class="sansserif">att_full</span><a id="uid3554"></a>.
If a star follows <samp>\circle</samp><a id="uid3555"></a>, an attribute pair
<span class="sansserif">full</span>=´true´ is added. This controls the attribute name.</p>
</li>
<li id="uid3556"><p class="nofirst noindent"><span class="sansserif">att_table_width</span><a id="uid3557"></a>.
Name of <span class="sansserif">width</span> attribute for a table.</p>
</li>
<li id="uid3558"><p class="nofirst noindent"><span class="sansserif">att_pos</span><a id="uid3559"></a>.
Used by environments like `minipage´, for the horizontal position.</p>
</li>
<li id="uid3560"><p class="nofirst noindent"><span class="sansserif">att_vpos</span><a id="uid3561"></a>.
Used by `minipage´, for the vertical position.</p>
</li>
<li id="uid3562"><p class="nofirst noindent"><span class="sansserif">att_inner_pos</span><a id="uid3563"></a>.
Used by `minipage´, for the third optional argument.</p>
</li>
<li id="uid3564"><p class="nofirst noindent"><span class="sansserif">att_minipage_width</span><a id="uid3565"></a>.
Used by `minipage´, for the mandatory argument.</p>
</li>
<li id="uid3566"><p class="nofirst noindent"><span class="sansserif">xml_figure_name</span><a id="uid3567"></a>.
This controls the name of the element produced by <samp>\includegraphics</samp><a id="uid3568"></a>.</p>
</li>
<li id="uid3569"><p class="nofirst noindent"><span class="sansserif">att_file</span><a id="uid3570"></a>,
<span class="sansserif">att_angle</span><a id="uid3571"></a>,
<span class="sansserif">att_scale</span><a id="uid3572"></a>,
<span class="sansserif">att_clip</span><a id="uid3573"></a>,
<span class="sansserif">att_width</span><a id="uid3574"></a>,
<span class="sansserif">att_height</span><a id="uid3575"></a>.
These control the attribute names set by <samp>\includegraphics</samp><a id="uid3576"></a>.</p>
<p>The translation of</p>
<pre class="latex-code">\fbox{\includegraphics[clip=, angle=90, scale=3, %
       width=10cm, height=3m]{A}}
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;figure framed='true' rend='inline' height='3m' width='10cm'
scale='3' angle='90' clip='true' file='A'/&gt;
</pre>
<p class="nofirst noindent">You can change it to</p>
<pre class="xml-code">&lt;Figure Framed='true' Rend='inline' Height='3m' Width='10cm' Scale='3'
Angle='90' Clip='true' File='A'/&gt;
</pre>
</li>
<li id="uid3577"><p class="nofirst noindent"><span class="sansserif">att_rend</span><a id="uid3578"></a>,
<span class="sansserif">att_fbox_rend</span><a id="uid3579"></a>. These control the name of the
<span class="sansserif">rend</span> attribute (why is `fbox´ a special case ?)</p>
</li>
<li id="uid3580"><p class="nofirst noindent"><span class="sansserif">att_noindent</span><a id="uid3581"></a>.
This is the name of the <span class="sansserif">noindent</span> attribute.</p>
</li>
<li id="uid3582"><p class="nofirst noindent"><span class="sansserif">att_space_before</span><a id="uid3583"></a>.
This is the name of the attribute that indicates space between the current
paragraph and the element before it.</p>
</li>
<li id="uid3584"><p class="nofirst noindent"><span class="sansserif">att_flush_right</span><a id="uid3585"></a>,
<span class="sansserif">att_flush_left</span><a id="uid3586"></a>,
<span class="sansserif">att_quotation</span><a id="uid3587"></a>,
<span class="sansserif">att_quote</span><a id="uid3588"></a>,
<span class="sansserif">att_centering</span><a id="uid3589"></a>.
The five environments <samp>center</samp><a id="uid3590"></a>,
<samp>quote</samp><a id="uid3591"></a>,
<samp>quotation</samp><a id="uid3592"></a>,
<samp>flushleft</samp><a id="uid3593"></a>, and
<samp>flushright</samp><a id="uid3594"></a>
modify (locally) an integer that asks each
<tt class="txt">&lt;p&gt;</tt> to get an attribute <span class="sansserif">rend</span>
with value `flushed-left´, `flushed-right´, `center´ or
`quote´. These environment execute the equivalent of <samp>\par</samp> just after the
<samp>\begin</samp> (before the parameter is changed), and just after the <samp>\end</samp>.
The <samp>\centering</samp><a id="uid3595"></a> command modifies the integer and the attribute list
of the current <tt class="txt">&lt;p&gt;</tt>.
These assignments show how to control the value of the attribute. Example:</p>
<pre class="latex-code">a\\[2pt]b
\begin{center}A\end{center}
\begin{quote}B\end{quote}
\begin{quotation}C\end{quotation}
\begin{flushleft}D\end{flushleft}
\begin{flushright}E\end{flushright}
</pre>
<p class="nofirst noindent">The default translation is</p>
<pre class="xml-code">&lt;p&gt;a&lt;/p&gt;
&lt;p noindent='true' spacebefore='2.0pt'&gt;b&lt;/p&gt;
&lt;p rend='center'&gt;A&lt;/p&gt;
&lt;p rend='quoted'&gt;B&lt;/p&gt;
&lt;p rend='quoted'&gt;C&lt;/p&gt;
&lt;p rend='flushed-left'&gt;D&lt;/p&gt;
&lt;p rend='flushed-right'&gt;E&lt;/p&gt;
</pre>
<p class="nofirst noindent">but you can change it to</p>
<pre class="xml-code">p&gt;a&lt;/p&gt;
&lt;p Noindent='true' Spacebefore='2.0pt'&gt;b&lt;/p&gt;
&lt;p Rend='Center'&gt;A&lt;/p&gt;
&lt;p Rend='Quote'&gt;B&lt;/p&gt;
&lt;p Rend='Quotation'&gt;C&lt;/p&gt;
&lt;p Rend='FlushLeft'&gt;D&lt;/p&gt;
&lt;p Rend='FlushRight'&gt;E&lt;/p&gt;
</pre>
</li>
<li id="uid3596"><p class="nofirst noindent"><span class="sansserif">att_cell_bottomborder</span><a id="uid3597"></a>,
<span class="sansserif">att_cell_leftborder</span><a id="uid3598"></a>,
<span class="sansserif">att_cell_rightborder</span><a id="uid3599"></a>,
<span class="sansserif">att_cell_topborder</span><a id="uid3600"></a>. Specifying a <samp>\hline</samp> in a
table, or vertical rules may add attributes to cells. The name is
<span class="sansserif">left-border</span> etc. The name of the attribute can be changed via these
commands.</p>
</li>
<li id="uid3601"><p class="nofirst noindent"><span class="sansserif">att_row_spaceafter</span><a id="uid3602"></a>,
<span class="sansserif">att_row_spacebefore</span><a id="uid3603"></a>. Inside a table, an
optional
argument to <samp>\\</samp> asks for a space before or after the current row.
This is done by adding a <span class="sansserif">spacebefore</span> and <span class="sansserif">spaceafter</span>
attribute. The name of the attribute can be changed via this variable.
Note: There is no spacebefore in the current version; is this a bug?</p>
</li>
<li id="uid3604"><p class="nofirst noindent"><span class="sansserif">att_cols</span><a id="uid3605"></a>,
<span class="sansserif">att_halign</span><a id="uid3606"></a>,
<span class="sansserif">att_cell_left</span><a id="uid3607"></a>,
<span class="sansserif">att_cell_right</span><a id="uid3608"></a>,
<span class="sansserif">att_cell_center</span><a id="uid3609"></a>.
The translation of a command of the form
<samp>\multicolumn</samp><samp>{1}</samp><samp>{c}</samp><samp>{...}</samp> is a cell,
with attributes <span class="sansserif">halign</span>=`center´ and <span class="sansserif">cols</span>=`1´. These parameters
allow you to change the name of the attribute name or value.</p>
</li>
<li id="uid3610"><p class="nofirst noindent"><span class="sansserif">xml_table_name</span><a id="uid3611"></a>,
<span class="sansserif">xml_row_name</span><a id="uid3612"></a>,
<span class="sansserif">xml_cell_name</span><a id="uid3613"></a>.
These commands allow you to change the names of the elements <tt class="txt">&lt;table&gt;</tt>,
<tt class="txt">&lt;row&gt;</tt> and <tt class="txt">&lt;cell&gt;</tt>.</p>
<p>The default translation of</p>
<pre class="latex-code">\begin{tabular}{|r|l|c}
\hline a&amp;b&amp;\multicolumn{1}{c|}{x}\hline\\[2pt]
\end{tabular}
$\begin{array}{|r|l|}
a&amp;b&amp;\multicolumn{1}{c|}{x}\\[2pt]
\end{array}$
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;table rend='inline'&gt;
  &lt;row spaceafter='2.0pt' top-border='true'&gt;
    &lt;cell right-border='true' halign='right' left-border='true'&gt;a&lt;/cell&gt;
    &lt;cell  right-border='true' halign='left'&gt;b&lt;/cell&gt;
    &lt;cell right-border='true' halign='center' cols='1'&gt;x&lt;/cell&gt;
  &lt;/row&gt;
&lt;/table&gt;
&lt;formula type='inline'&gt;
  &lt;math xmlns='http://www.w3.org/1998/Math/MathML'&gt;
    &lt;mtable&gt;
     &lt;mtr&gt;
       &lt;mtd columnalign='right'&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/mtd&gt;
       &lt;mtd columnalign='left'&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mtd&gt;
       &lt;mtd columnspan='1'&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mtd&gt;
     &lt;/mtr&gt;
    &lt;/mtable&gt;
  &lt;/math&gt;
&lt;/formula&gt;
</pre>
<p class="nofirst noindent">You can parametrize the <tt class="txt">&lt;table&gt;</tt>, using all parameters shown above. Of
course, it has no influence on the <tt class="txt">&lt;mtable&gt;</tt>.</p>
<pre class="xml-code">&lt;Table Rend='Inline'&gt;
  &lt;Row Spaceafter='2.0pt' Topborder='true'&gt;
    &lt;Cell Rightborder='true' Halign='Right' Leftborder='true'&gt;a&lt;/Cell&gt;
    &lt;Cell Rightborder='true' Halign='Left'&gt;b&lt;/Cell&gt;
    &lt;Cell Rightborder='true' Halign='Center' Cols='1'&gt;x&lt;/Cell&gt;
  &lt;/Row&gt;
&lt;/Table&gt;
</pre>
</li>
<li id="uid3614"><p class="nofirst noindent"><span class="sansserif">att_prenom</span><a id="uid3615"></a>,
<span class="sansserif">att_full_first</span><a id="uid3616"></a>,
<span class="sansserif">att_nom</span><a id="uid3617"></a>,
<span class="sansserif">att_particule</span><a id="uid3618"></a>,
<span class="sansserif">att_junior</span><a id="uid3619"></a>,
<span class="sansserif">xml_bpers_name</span><a id="uid3620"></a>. These control typesetting of
<samp>\bpers</samp><a id="uid3621"></a> in a bibliography. The default translation of</p>
<pre class="latex-code">\bpers[E]{A}{B}{C}{D}
</pre>
<p class="nofirst noindent">is</p>
<pre class="xml-code">&lt;bpers prenom='A' part='B' nom='C' junior='D' prenomcomplet='E'/&gt;
</pre>

</li>
<li id="uid3622"><p class="nofirst noindent"><span class="sansserif">xml_pers_name</span><a id="uid3623"></a>. This controls the element name
of the <samp>\pers</samp> command.</p>
</li>
<li id="uid3624"><p class="nofirst noindent"><span class="sansserif">att_affiliation</span><a id="uid3625"></a>,
<span class="sansserif">att_profession</span><a id="uid3626"></a>,
<span class="sansserif">att_HDR</span><a id="uid3627"></a>. These control the attributes of the fields
of the <samp>\pers</samp> command added in 2006 (first name and last name use
<span class="sansserif">att_nom</span> and <span class="sansserif">att_prenom</span>).</p>
</li>
<li id="uid3628"><p class="nofirst noindent"><span class="sansserif">xml_citation_name</span><a id="uid3629"></a>. This is the name
of the element produced by the <samp>\citation</samp> command. Since this command is
assumed to appear only in a bibliography, it cannot be used directly in the
text, thus the calls to <samp>\@setmode</samp> here. Example</p>
<pre class="latex-code">\makeatletter {
\leavevmode\@setmode 4
\citation{A}{cite:B}{bid2}{D}{E}
\bauthors{\bpers {a}{}{c}{d}}
\beditors{\bpers[AA] {a}{b}{c}{d}}
\endcitation
\@setmode 1}\par
</pre>
<p class="nofirst noindent">Translation</p>
<pre class="xml-code">&lt;p&gt;
&lt;Citation from='D' key='A' id='bid2' userid='cite:B' type='E'&gt;
&lt;bauteurs&gt;&lt;Bpers Firstname='a' Lastname='c' Junior='d'/&gt;&lt;/bauteurs&gt;
&lt;bediteur&gt;
  &lt;Bpers Firstname='a'P article='b' Lastname='c' Junior='d' FullFirst='AA'/&gt;
&lt;/bediteur&gt;
&lt;/Citation&gt;&lt;/p&gt;
</pre>

</li>
<li id="uid3630"><p class="nofirst noindent"><span class="sansserif">xml_cit_name</span><a id="uid3631"></a>,
<span class="sansserif">xml_ref_name</span><a id="uid3632"></a>. Translation of <samp>\cite</samp> is a
<tt class="txt">&lt;ref&gt;</tt> in a <tt class="txt">&lt;cit&gt;</tt>; these switches control the element names.</p>
</li>
<li id="uid3633"><p class="nofirst noindent"><span class="sansserif">xml_prenote_name</span><a id="uid3634"></a>,
<span class="sansserif">xml_citetype_name</span><a id="uid3635"></a>. These control elements
defined for the natbib extensions to <samp>\cite</samp>. For instance,</p>
<pre class="latex-code">\def\cite@prenote{cf}
\def\cite@@type{fx}
\cite[p 30]{toto}
</pre>
<p class="nofirst noindent">translates as</p>
<pre class="xml-code">&lt;Cit Prenote='cf' Citetype='fx'&gt;&lt;Ref target='bid0'&gt;p 30&lt;/Ref&gt;&lt;/Cit&gt;
</pre>

</li>
<li id="uid3636"><p class="nofirst noindent"><span class="sansserif">xml_leaders_name</span><a id="uid3637"></a>
<span class="sansserif">xml_cleaders_name</span><a id="uid3638"></a>,
<span class="sansserif">xml_xleaders_name</span><a id="uid3639"></a>. For leaders. Example</p>
<pre class="latex-code">\setbox0\xbox{foo}{bar}
\leaders\copy0\hfil\cleaders\copy0\hfil\xleaders\copy0\hfil
</pre>
<p class="nofirst noindent">Translation is</p>
<pre class="xml-code">&lt;Leaders&gt;&lt;foo&gt;bar&lt;/foo&gt;&lt;/Leaders&gt;&lt;hfil/&gt;
&lt;Cleaders&gt;&lt;foo&gt;bar&lt;/foo&gt;&lt;/Cleaders&gt;&lt;hfil/&gt;
&lt;Xleaders&gt;&lt;foo&gt;bar&lt;/foo&gt;&lt;/Xleaders&gt;&lt;hfil/&gt;
</pre>

</li>
<li id="uid3640"><p class="nofirst noindent"><span class="sansserif">att_page</span><a id="uid3641"></a>. Translation of <samp>\ref</samp> is a ref
element, whose name can be changed as above, translation of <samp>\pageref</samp> is
the same, with a attribute <span class="sansserif">rend</span>, with value `page´, that can be
changed via this flag; for instance we may get</p>
<pre class="xml-code">&lt;Ref target='uid9'/&gt;&lt;Ref target='uid9' Rend='Page'/&gt;
</pre>

</li>
<li id="uid3642"><p class="nofirst noindent"><span class="sansserif">xml_tableofcontents_name</span><a id="uid3643"></a>.
Name of the TOC element.</p>
</li>
<li id="uid3644"><p class="nofirst noindent"><span class="sansserif">xml_texmath_name</span><a id="uid3645"></a>.
Name of the element produced by the trivial math mechanism.</p>
</li>
<li id="uid3646"><p class="nofirst noindent"><span class="sansserif">att_pre_name</span><a id="uid3647"></a>. For verbatim environments.</p>
</li>
<li id="uid3648"><p class="nofirst noindent"><span class="sansserif">xml_anchor_name</span><a id="uid3649"></a>. Name of the anchor
element.</p>
</li>
<li id="uid3650"><p class="nofirst noindent"><span class="sansserif">xml_index_name</span><a id="uid3651"></a>,
<span class="sansserif">xml_theindex_name</span><a id="uid3652"></a>. These variables
indicated the name of the element produced by the <samp>\index</samp> command, and the
name of the index (produced by <samp>\makeindex</samp>).</p>
</li>
<li id="uid3653"><p class="nofirst noindent"><span class="sansserif">att_level</span><a id="uid3654"></a>. An index has a level attribute
(that can be 1, 2 or 3). This controls the name of the attribute.</p>
</li>
<li id="uid3655"><p class="nofirst noindent"><span class="sansserif">att_encap</span><a id="uid3656"></a>. Controls page encapsulation for the
<samp>\index</samp><a id="uid3657"></a> command.
In the following example we have three anchors, because some <samp>\index</samp>
commands are followed by a space (shown as newline in the <span class="sansserif">XML</span> document).</p>
<pre class="latex-code">\noindent Word\index{foo}
\index{foo!a@barb|gee}
\index{foo!b@bara}%
\index{foo}
</pre>
<p class="nofirst noindent">Translation.</p>
<pre class="xml-code">&lt;p Noindent='true'&gt;Word&lt;Anchor id='uid27'/&gt;
&lt;Anchor id='uid28'/&gt;
&lt;Anchor id='uid29'/&gt;&lt;/p&gt;
...
&lt;TheIndex&gt;
  &lt;Index target='uid27 uid29' Level='1'&gt;foo&lt;/Index&gt;
  &lt;Index target='uid28' Level='2' Encap='gee'&gt;barb&lt;/Index&gt;
  &lt;Index target='uid29' Level='2'&gt;bara&lt;/Index&gt;
&lt;/TheIndex&gt;
</pre>
</li>
<li id="uid3658"><p class="nofirst noindent"><span class="sansserif">xml_picture_name</span><a id="uid3659"></a>.
This can be used to change the name of the element created by the `picture´
environment (it is `picture´).</p>
</li>
<li id="uid3660"><p class="nofirst noindent"><span class="sansserif">xml_bezier_name</span><a id="uid3661"></a>.
This specifies the name of the element produced by <samp>\bezier</samp><a id="uid3662"></a>.</p>
</li>
<li id="uid3663"><p class="nofirst noindent"><span class="sansserif">xml_put_name</span><a id="uid3664"></a>.
This specifies the name of the element produced by <samp>\put</samp><a id="uid3665"></a>.</p>
</li>
<li id="uid3666"><p class="nofirst noindent"><span class="sansserif">xml_arc_name</span><a id="uid3667"></a>.
This specifies the name of the element produced by <samp>\arc</samp><a id="uid3668"></a>.</p>
</li>
<li id="uid3669"><p class="nofirst noindent"><span class="sansserif">xml_scaleput_name</span><a id="uid3670"></a>.
This specifies the name of the element produced by <samp>\scaleput</samp><a id="uid3671"></a>.</p>
</li>
<li id="uid3672"><p class="nofirst noindent"><span class="sansserif">xml_multiput_name</span><a id="uid3673"></a>.
This specifies the name of the element produced by <samp>\multiput</samp><a id="uid3674"></a>.</p>
</li>
<li id="uid3675"><p class="nofirst noindent"><span class="sansserif">xml_line_name</span><a id="uid3676"></a>.
This specifies the name of the element produced by <samp>\line</samp><a id="uid3677"></a>.</p>
</li>
<li id="uid3678"><p class="nofirst noindent"><span class="sansserif">xml_lineC_name</span><a id="uid3679"></a>.
This specifies the name of the element produced by <samp>\centerline</samp><a id="uid3680"></a> and
friends.</p>
</li>
<li id="uid3681"><p class="nofirst noindent"><span class="sansserif">xml_vector_name</span><a id="uid3682"></a>.
This specifies the name of the element produced by <samp>\vector</samp><a id="uid3683"></a>.</p>
</li>
<li id="uid3684"><p class="nofirst noindent"><span class="sansserif">xml_oval_name</span><a id="uid3685"></a>.
This specifies the name of the element produced by <samp>\oval</samp><a id="uid3686"></a>.</p>
</li>
<li id="uid3687"><p class="nofirst noindent"><span class="sansserif">xml_dashline_name</span><a id="uid3688"></a>.
This specifies the name of the element produced by <samp>\dashline</samp><a id="uid3689"></a>.</p>
</li>
<li id="uid3690"><p class="nofirst noindent"><span class="sansserif">xml_drawline_name</span><a id="uid3691"></a>.
This specifies the name of the element produced by <samp>\drawline</samp><a id="uid3692"></a>.</p>
</li>
<li id="uid3693"><p class="nofirst noindent"><span class="sansserif">xml_dottedline_name</span><a id="uid3694"></a>.
This specifies the name of the element produced by <samp>\dottedline</samp><a id="uid3695"></a>.</p>
</li>
<li id="uid3696"><p class="nofirst noindent"><span class="sansserif">xml_circle_name</span><a id="uid3697"></a>.
This specifies the name of the element produced by <samp>\circle</samp><a id="uid3698"></a>.</p>
</li>
<li id="uid3699"><p class="nofirst noindent"><span class="sansserif">xml_bigcircle_name</span><a id="uid3700"></a>.
This specifies the name of the element produced by <samp>\bigcircle</samp><a id="uid3701"></a>.</p>
</li>
<li id="uid3702"><p class="nofirst noindent"><span class="sansserif">xml_curve_name</span><a id="uid3703"></a>.
This specifies the name of the element produced by <samp>\curve</samp><a id="uid3704"></a>.</p>
</li>
<li id="uid3705"><p class="nofirst noindent"><span class="sansserif">xml_closecurve_name</span><a id="uid3706"></a>.
This specifies the name of the element produced by <samp>\closecurve</samp><a id="uid3707"></a>.</p>
</li>
<li id="uid3708"><p class="nofirst noindent"><span class="sansserif">xml_tagcurve_name</span><a id="uid3709"></a>.
This specifies the name of the element produced by <samp>\tagcurve</samp><a id="uid3710"></a>.</p>
</li>
<li id="uid3711"><p class="nofirst noindent"><span class="sansserif">xml_thicklines_name</span><a id="uid3712"></a>.
This specifies the name of the element produced by <samp>\thicklines</samp><a id="uid3713"></a>.</p>
</li>
<li id="uid3714"><p class="nofirst noindent"><span class="sansserif">xml_thinlines_name</span><a id="uid3715"></a>.
This specifies the name of the element produced by <samp>\thinlines</samp><a id="uid3716"></a>.</p>
</li>
<li id="uid3717"><p class="nofirst noindent"><span class="sansserif">xml_linethickness_name</span><a id="uid3718"></a>.
This specifies the name produced by <samp>\linethickness</samp><a id="uid3719"></a>.</p>
</li>
<li id="uid3720"><p class="nofirst noindent"><span class="sansserif">att_xpos</span><a id="uid3721"></a>,
<span class="sansserif">att_ypos</span><a id="uid3722"></a>,
<span class="sansserif">att_xdir</span><a id="uid3723"></a>,
<span class="sansserif">att_ydir</span><a id="uid3724"></a>,
<span class="sansserif">att_size</span><a id="uid3725"></a>,
<span class="sansserif">att_dx</span><a id="uid3726"></a>,
<span class="sansserif">att_dy</span><a id="uid3727"></a>,
<span class="sansserif">att_repeat</span><a id="uid3728"></a>.
These attributes are used by some picture commands.</p>
</li>
<li id="uid3729"><p class="nofirst noindent"><span class="sansserif">att_xscale</span><a id="uid3730"></a>,
<span class="sansserif">att_xscaley</span><a id="uid3731"></a>,
<span class="sansserif">att_yscale</span><a id="uid3732"></a>,
<span class="sansserif">att_yscalex</span><a id="uid3733"></a>.
Commands <samp>\xscale</samp><a id="uid3734"></a>, <samp>\xscaley</samp><a id="uid3735"></a>, <samp>\yscale</samp><a id="uid3736"></a>, and
<samp>\yscalex</samp><a id="uid3737"></a> read values and store them somewhere. Whenever needed, they
are put as attribute on the elements. The default name of the argument is the
name of the command, but this can be changed.</p>
</li>
<li id="uid3738"><p class="nofirst noindent"><span class="sansserif">att_curve_nbpts</span><a id="uid3739"></a>.
Commands like <samp>\arc</samp><a id="uid3740"></a>, <samp>\bigcircle</samp><a id="uid3741"></a>, <samp>\closecurve</samp><a id="uid3742"></a>,
<samp>\tagcurve</samp><a id="uid3743"></a>, <samp>\curve</samp><a id="uid3744"></a> take an optional argument, the number of
points. It will be stored in an attribute, named `nbsymb´. This parameter can
change the name of the attribute.</p>
</li>
<li id="uid3745"><p class="nofirst noindent"><span class="sansserif">att_unit_length</span><a id="uid3746"></a>. Inside a picture environment,
the value of <samp>\unitlength</samp> is stored in an attribute named `unit-length´.
It can be changed using this command.</p>
<div class="hc">
<p style="text-align:center"><img src="pic-hole.png" alt="pic-hole.png" />                     <img src="pic-car.png" alt="pic-car.png" />
</p></div>
<p>The example of a picture environment is</p>
<pre class="latex-code">\setlength{\unitlength}{1.8mm}
\begin{picture}(40,30)
  \thicklines
  \multiput(20,5)(20,12){2} {\line(0,-1){2}\line(-5,3){20}}
  \multiput(20,5)(-20,12){2} {\line(5,3){20}}
  \put(20,3){\line(5,3){20}}
  \put(20,3){\line(-5,3){20}}
  \put(0,15){\line(0,1){2}}
  \linethickness{1pt}
  \put(20,5) {
   \renewcommand{\xscale}{1}
   \renewcommand{\xscaley}{-1}
   \renewcommand{\yscale}{0.6}
   \renewcommand{\yscalex}{0.6}
   \scaleput(10,10){\bigcircle{10}}
   \put(0,-2){%
      \scaleput(10,10){\arc(5,0){121}}
      \scaleput(10,10){\arc(5,0){-31}}}}
\end{picture}
</pre>
<p class="nofirst noindent">it is translated as</p>
<pre class="xml-code">&lt;picture width='204.85962' height='153.64471'&gt;
  &lt;pic-thicklines/&gt;
  &lt;pic-multiput xpos='102.42981' ypos='25.60745'
       repeat='2' dx='102.42981' dy='61.45789'&gt;
    &lt;pic-line xdir='0' ydir='-1' width='10.24298'/&gt;
    &lt;pic-line xdir='-5' ydir='3' width='102.42981'/&gt;
  &lt;/pic-multiput&gt;
  &lt;pic-multiput xpos='102.42981' ypos='25.60745'
     repeat='2' dx='-102.42981' dy='61.45789'&gt;
   &lt;pic-line xdir='5' ydir='3' width='102.42981'/&gt;
  &lt;/pic-multiput&gt;
  &lt;pic-put xpos='102.42981' ypos='15.36447'&gt;
    &lt;pic-line xdir='5' ydir='3' width='102.42981'/&gt;&lt;/pic-put&gt;
  &lt;pic-put xpos='102.42981' ypos='15.36447'&gt;
    &lt;pic-line xdir='-5' ydir='3' width='102.42981'/&gt;&lt;/pic-put&gt;
  &lt;pic-put xpos='0' ypos='76.82236'&gt;
    &lt;pic-line xdir='0' ydir='1' width='10.24298'/&gt;&lt;/pic-put&gt;
  &lt;pic-linethickness size='1pt'/&gt;
  &lt;pic-put xpos='102.42981' ypos='25.60745'&gt;
   &lt;pic-scaleput xpos='51.2149' ypos='51.2149'
       xscale='1' yscale='0.6' xscaley='-1' yscalex='0.6'&gt;
    &lt;pic-bigcircle size='10' unit-length='5.12149'/&gt;
   &lt;/pic-scaleput&gt;
   &lt;pic-put xpos='0' ypos='-10.24298'&gt;
     &lt;pic-scaleput xpos='51.2149' ypos='51.2149' xscale='1'
         yscale='0.6' xscaley='-1' yscalex='0.6'&gt;
       &lt;pic-arc angle='121' xpos='25.60745' ypos='0' unit-length='5.12149'/&gt;
     &lt;/pic-scaleput&gt;
     &lt;pic-scaleput xpos='51.2149' ypos='51.2149' xscale='1'
         yscale='0.6' xscaley='-1' yscalex='0.6'&gt;
       &lt;pic-arc angle='-31' xpos='25.60745' ypos='0' unit-length='5.12149'/&gt;
     &lt;/pic-scaleput&gt;
   &lt;/pic-put&gt;
 &lt;/pic-put&gt;
&lt;/picture&gt;
</pre>
<p class="nofirst noindent">You can parametrize it so as to obtain this</p>
<pre class="xml-code">&lt;Xpicture Width='204.85962' Height='153.64471'&gt;
  &lt;Thicklines/&gt;
  &lt;Multiput Xpos='102.42981' Ypos='25.60745'
      Repeat='2'Dx='102.42981' Dy='61.45789'&gt;
    &lt;Xline XDir='0' YDir='-1' Width='10.24298'/&gt;
    &lt;Xline XDir='-5' YDir='3' Width='102.42981'/&gt;
  &lt;/Multiput&gt;
  &lt;Multiput Xpos='102.42981' Ypos='25.60745'
      Repeat='2' Dx='-102.42981' Dy='61.45789'&gt;
    &lt;Xline XDir='5' YDir='3' Width='102.42981'/&gt;
  &lt;/Multiput&gt;
  &lt;Xput Xpos='102.42981' Ypos='15.36447'&gt;
    &lt;Xline XDir='5' YDir='3' Width='102.42981'/&gt;&lt;/Xput&gt;
  &lt;Xput Xpos='102.42981' Ypos='15.36447'&gt;
    &lt;Xline XDir='-5' YDir='3' Width='102.42981'/&gt;&lt;/Xput&gt;
  &lt;Xput Xpos='0' Ypos='76.82236'&gt;
    &lt;Xline XDir='0' YDir='1' Width='10.24298'/&gt;&lt;/Xput&gt;
  &lt;Linethickness Size='1pt'/&gt;
  &lt;Xput Xpos='102.42981' Ypos='25.60745'&gt;
    &lt;Scaleput Xpos='51.2149' Ypos='51.2149'
        Xscale='1' Yscale='0.6' XscaleY='-1' YscaleX='0.6'&gt;
      &lt;Bigcircle Size='10' Unitlength='5.12149'/&gt;
    &lt;/Scaleput&gt;
    &lt;Xput Xpos='0' Ypos='-10.24298'&gt;
      &lt;Scaleput Xpos='51.2149' Ypos='51.2149'
          Xscale='1' Yscale='0.6' XscaleY='-1' YscaleX='0.6'&gt;
        &lt;Arc Angle='121' Xpos='25.60745' Ypos='0' Unitlength='5.12149'/&gt;
      &lt;/Scaleput&gt;
      &lt;Scaleput Xpos='51.2149' Ypos='51.2149'
          Xscale='1' Yscale='0.6' XscaleY='-1' YscaleX='0.6'&gt;
        &lt;Arc Angle='-31' Xpos='25.60745' Ypos='0' Unitlength='5.12149'/&gt;
      &lt;/Scaleput&gt;
    &lt;/Xput&gt;
  &lt;/Xput&gt;
&lt;/Xpicture&gt;
</pre>
<p>A second example:</p>
<pre class="latex-code">\newcounter{cms}
\setlength{\unitlength}{1mm}
\begin{picture}(50,39)
\put(0,7){\makebox(0,0)[bl]{cm}}
\multiput*(10,7)(10,0){5}{%  remove the * for latex
  \addtocounter{cms}{1}\makebox(0,0)[b]{\arabic{cms}}}
\put(15,20){\circle{6}}
\put(30,20){\circle{6}}
\put(15,20){\circle*{2}}
\put(30,20){\circle*{2}}
\put(10,24){\framebox(25,8){car}}
\put(10,32){\vector(-2,1){10}}
\multiput(1,0)(1,0){49}{\line(0,1){2.5}}
\multiput(5,0)(10,0){5}{\line(0,1){3.5}}
\thicklines
\put(0,0){\line(1,0){50}}
\multiput(0,0)(10,0){6}{\line(0,1){5}}
\end{picture}
</pre>
<p>The translation is</p>
<pre class="xml-code">&lt;Xpicture Width='142.26303' Height='110.96516'&gt;
  &lt;Xput Xpos='0' Ypos='19.91682'&gt;
    &lt;Xbox Width='0' Height='0' BPos='bl'&gt;cm&lt;/Xbox&gt;&lt;/Xput&gt;
  &lt;Xput Xpos='28.4526' Ypos='19.91682'&gt;
    &lt;Xbox Width='0' Height='0' BPos='b'&gt;1&lt;/Xbox&gt;&lt;/Xput&gt;
  &lt;Xput Xpos='56.90521' Ypos='19.91682'&gt;
    &lt;Xbox Width='0' Height='0' BPos='b'&gt;2&lt;/Xbox&gt;&lt;/Xput&gt;
  &lt;Xput Xpos='85.35782' Ypos='19.91682'&gt;
    &lt;Xbox Width='0' Height='0' BPos='b'&gt;3&lt;/Xbox&gt;&lt;/Xput&gt;
  &lt;Xput Xpos='113.81042' Ypos='19.91682'&gt;
    &lt;Xbox Width='0' Height='0' BPos='b'&gt;4&lt;/Xbox&gt;&lt;/Xput&gt;
  &lt;Xput Xpos='142.26303' Ypos='19.91682'&gt;
    &lt;Xbox Width='0' Height='0' BPos='b'&gt;5&lt;/Xbox&gt;&lt;/Xput&gt;
  &lt;Xput Xpos='42.67891' Ypos='56.90521'&gt;
    &lt;Xcircle Size='17.07156'/&gt;&lt;/Xput&gt;
  &lt;Xput Xpos='85.35782' Ypos='56.90521'&gt;
    &lt;Xcircle Size='17.07156'/&gt;&lt;/Xput&gt;
  &lt;Xput Xpos='42.67891' Ypos='56.90521'&gt;
    &lt;Xcircle Full='true' Size='5.69052'/&gt;&lt;/Xput&gt;
  &lt;Xput Xpos='85.35782' Ypos='56.90521'&gt;
    &lt;Xcircle Full='true' Size='5.69052'/&gt;&lt;/Xput&gt;
  &lt;Xput Xpos='28.4526' Ypos='68.28625'&gt;
    &lt;Xbox Width='71.13152' Height='22.76208' Framed='true'&gt;car&lt;/Xbox&gt;&lt;/Xput&gt;
  &lt;Xput Xpos='28.4526' Ypos='91.04834'&gt;
    &lt;Xvector XDir='-2' YDir='1' Width='28.4526'/&gt;&lt;/Xput&gt;
  &lt;Multiput Xpos='2.84526' Ypos='0' Repeat='49' Dx='2.84526' Dy='0'&gt;
    &lt;Xline XDir='0' YDir='1' Width='7.11314'/&gt;&lt;/Multiput&gt;
  &lt;Multiput Xpos='14.2263' Ypos='0' Repeat='5' Dx='28.4526' Dy='0'&gt;
    &lt;Xline XDir='0' YDir='1' Width='9.9584'/&gt;&lt;/Multiput&gt;
  &lt;Thicklines/&gt;
  &lt;Xput Xpos='0' Ypos='0'&gt;
    &lt;Xline XDir='1' YDir='0' Width='142.26303'/&gt;&lt;/Xput&gt;
  &lt;Multiput Xpos='0' Ypos='0' Repeat='6' Dx='28.4526' Dy='0'&gt;
    &lt;Xline XDir='0' YDir='1' Width='14.2263'/&gt;&lt;/Multiput&gt;
&lt;/Xpicture&gt;
</pre>

</li></ul>

<h2 id="uid3748">6.11. Trace of titlepage</h2>
<p>This is a part of the transcript file for the titlepage command.</p>
<pre class="log-code"><span class="prenumber">1</span> Defining \makeRR as \TitlePageCmd 0
<span class="prenumber">2</span>    main &lt;RRstart  -- type = 'RR'/&gt;
<span class="prenumber">3</span> Defining \makeRT as \TitlePageCmd 1
<span class="prenumber">4</span>    main &lt;RRstart  -- type = 'RT'/&gt;
<span class="prenumber">5</span> Defining \UR as \TitlePageCmd 2
<span class="prenumber">6</span>    ur_list &lt;UR/&gt;
<span class="prenumber">7</span> Defining \URSophia as \TitlePageCmd 3
<span class="prenumber">8</span>    ur &lt;URSophia/&gt;
<span class="prenumber">9</span> Defining \URRocquencourt as \TitlePageCmd 4
<span class="prenumber">10</span>    ur &lt;URRocquencourt/&gt;
<span class="prenumber">11</span> Defining \URRocq as alias to \URRocquencourt
<span class="prenumber">12</span> Defining \Paris as \TitlePageCmd 6
<span class="prenumber">13</span>    ur &lt;Rocquencourt/&gt;
<span class="prenumber">14</span> Defining \URRhoneAlpes as \TitlePageCmd 7
<span class="prenumber">15</span>    ur &lt;URRhoneAlpes/&gt;
<span class="prenumber">16</span> Defining \URRennes as \TitlePageCmd 8
<span class="prenumber">17</span>    ur &lt;URRennes/&gt;
<span class="prenumber">18</span> Defining \URLorraine as \TitlePageCmd 9
<span class="prenumber">19</span>    ur &lt;URLorraine/&gt;
<span class="prenumber">20</span> Defining \URFuturs as \TitlePageCmd 10
<span class="prenumber">21</span>    ur &lt;URFuturs d='true'/&gt;
<span class="prenumber">22</span> Defining \RRtitle as \TitlePageCmd 11
<span class="prenumber">23</span>    usual &lt;title/&gt; (flags -par)
<span class="prenumber">24</span> Defining \RRetitle as \TitlePageCmd 12
<span class="prenumber">25</span>    usual &lt;etitle/&gt; (flags -par)
<span class="prenumber">26</span> Defining \RRprojet as \TitlePageCmd 13
<span class="prenumber">27</span>    usual &lt;projet/&gt;
<span class="prenumber">28</span> Defining \motcle as \TitlePageCmd 14
<span class="prenumber">29</span>    usual &lt;motcle/&gt;
<span class="prenumber">30</span> Defining \keyword as \TitlePageCmd 15
<span class="prenumber">31</span>    usual &lt;keyword/&gt;
<span class="prenumber">32</span> Defining \RRresume as \TitlePageCmd 16
<span class="prenumber">33</span>    usual &lt;resume/&gt; (flags +par)
<span class="prenumber">34</span> Defining \RRabstract as \TitlePageCmd 17
<span class="prenumber">35</span>    usual &lt;abstract/&gt; (flags +par)
<span class="prenumber">36</span> Defining \RRauthor as \TitlePageCmd 18
<span class="prenumber">37</span>    list &lt;author/&gt; and &lt;auth/&gt;
<span class="prenumber">38</span> Defining \RRdate as \TitlePageCmd 19
<span class="prenumber">39</span>    usual &lt;date/&gt;
<span class="prenumber">40</span> Defining \RRNo as \TitlePageCmd 20
<span class="prenumber">41</span>    usual &lt;RRnumber/&gt;
<span class="prenumber">42</span> Defining \RRtheme as \TitlePageCmd 21
<span class="prenumber">43</span>    usual &lt;/&gt; (flags +list)
<span class="prenumber">44</span> Defining \Theme as \TitlePageCmd 22
<span class="prenumber">45</span>    ur_list &lt;Theme/&gt;
<span class="prenumber">46</span> Defining \THNum as \TitlePageCmd 23
<span class="prenumber">47</span>    ur &lt;THNum/&gt;
<span class="prenumber">48</span> Defining \THCog as \TitlePageCmd 24
<span class="prenumber">49</span>    ur &lt;THCog/&gt;
<span class="prenumber">50</span> Defining \THCom as \TitlePageCmd 25
<span class="prenumber">51</span>    ur &lt;THCom/&gt;
<span class="prenumber">52</span> Defining \THBio as \TitlePageCmd 26
<span class="prenumber">53</span>    ur &lt;THBio/&gt;
<span class="prenumber">54</span> Defining \THSym as \TitlePageCmd 27
<span class="prenumber">55</span>    ur &lt;THSym/&gt;
<span class="prenumber">56</span> Defining \myself as \TitlePageCmd 28
<span class="prenumber">57</span>    list? &lt;grimm/&gt; and &lt;auth/&gt;
<span class="prenumber">58</span> Defining \cmdp as \TitlePageCmd 29
<span class="prenumber">59</span>    usual &lt;cmdp/&gt; (flags +list)
<span class="prenumber">60</span> Defining \cmda as \TitlePageCmd 30
<span class="prenumber">61</span>    usual &lt;cmdA/&gt; (flags +A)
<span class="prenumber">62</span> Defining \cmdb as \TitlePageCmd 31
<span class="prenumber">63</span>    usual &lt;cmdB/&gt; (flags +B)
<span class="prenumber">64</span> [1] \cmdb{\cmdBval}
<span class="prenumber">65</span> ++ End of virtual file.
<span class="prenumber">66</span> Defining \cmdc as \TitlePageCmd 32
<span class="prenumber">67</span>    usual &lt;cmdC/&gt; (flags +C)
<span class="prenumber">68</span> [1] \documentclass[a4paper]{report}
<span class="prenumber">69</span> ...
<span class="prenumber">70</span> [1] \cmda{\cmdAval}
<span class="prenumber">71</span> {(Unknown)}
<span class="prenumber">72</span> {\titlepage 30}
<span class="prenumber">73</span> {\titlepage 30=\cmda}
<span class="prenumber">74</span> {Push cmdA 1}
<span class="prenumber">75</span> Error signaled at line 1 of file tptest.tex:
<span class="prenumber">76</span> Undefined command \cmdAval.
<span class="prenumber">77</span> ...
<span class="prenumber">78</span> [8] \RRetitle{Tralics, a \LaTeX\ to XML translator\\Part I}
<span class="prenumber">79</span> {(Unknown)}
<span class="prenumber">80</span> {\titlepage 12}
<span class="prenumber">81</span> {\titlepage 12=\RRetitle}
<span class="prenumber">82</span> {Push etitle 1}
<span class="prenumber">83</span> ...
<span class="prenumber">84</span> [12] \RRtheme{\THNum}
<span class="prenumber">85</span> {(Unknown)}
<span class="prenumber">86</span> {\titlepage 21}
<span class="prenumber">87</span> {\titlepage 21=\RRtheme}
<span class="prenumber">88</span> {(Unknown)}
<span class="prenumber">89</span> {\titlepage 23}
<span class="prenumber">90</span> {\titlepage 23=\THNum}
<span class="prenumber">91</span> {\par}
<span class="prenumber">92</span> [13]
<span class="prenumber">93</span> ...
<span class="prenumber">94</span> [24] \begin{document}
<span class="prenumber">95</span> {\begin}
<span class="prenumber">96</span> {\begin document}
<span class="prenumber">97</span> +stack: level + 2 for environment
<span class="prenumber">98</span> {\document}
<span class="prenumber">99</span> +stack: ending environment document; resuming document.
<span class="prenumber">100</span> +stack: level - 2 for environment
<span class="prenumber">101</span> +stack: level set to 1
<span class="prenumber">102</span> [1] \let\do\noexpand\ignorespaces
<span class="prenumber">103</span> ++ End of virtual file.
<span class="prenumber">104</span> atbegindocumenthook= \cmdb {\cmdBval }\let \AtBeginDocument \@notprerr \let \do
<span class="prenumber">105</span> \noexpand \ignorespaces
<span class="prenumber">106</span> {(Unknown)}
<span class="prenumber">107</span> {\titlepage 31}
<span class="prenumber">108</span> {\titlepage 31=\cmdb}
<span class="prenumber">109</span> {Push cmdB 1}
<span class="prenumber">110</span> Error signaled at line 24 of file tptest.tex:
<span class="prenumber">111</span> Undefined command \cmdBval.
<span class="prenumber">112</span> {Pop 1: document_v cmdB_t}
<span class="prenumber">113</span> {\let}
<span class="prenumber">114</span> {\let \AtBeginDocument \@notprerr}
<span class="prenumber">115</span> {\let}
<span class="prenumber">116</span> {\let \do \noexpand}
<span class="prenumber">117</span> {\ignorespaces}
<span class="prenumber">118</span> [25] \makeRR
<span class="prenumber">119</span> {(Unknown)}
<span class="prenumber">120</span> {\titlepage 0}
<span class="prenumber">121</span> {\titlepage 0=\makeRR}
<span class="prenumber">122</span> Error signaled at line 25 of file tptest.tex:
<span class="prenumber">123</span> No value given for command \cmdp.
<span class="prenumber">124</span> [1] \cmdc{\cmdCval}
<span class="prenumber">125</span> ++ End of virtual file.
<span class="prenumber">126</span> {(Unknown)}
<span class="prenumber">127</span> {\titlepage 32}
<span class="prenumber">128</span> {\titlepage 32=\cmdc}
<span class="prenumber">129</span> {Push cmdC 1}
<span class="prenumber">130</span> Error signaled at line 25 of file tptest.tex:
<span class="prenumber">131</span> Undefined command \cmdCval.
<span class="prenumber">132</span> {Pop 1: document_v cmdC_t}
<span class="prenumber">133</span> {Push p 1}
<span class="prenumber">134</span> [26] text
<span class="prenumber">135</span> ...
<span class="prenumber">136</span> Output written on tptest.xml (1059 bytes).
<span class="prenumber">137</span> There were 4 errors.
<span class="prenumber">138</span> (For more information, see transcript file tptest.log)
</pre>

<h2 id="uid3749">6.12. Extensions</h2>
<p>We describe here the extensions defined by &#1013;-TeX, and how they are
implemented in <i>Tralics</i>.</p>
<p>Tracing and Diagnostics. When <samp>\tracingcommands</samp><a id="uid3750"></a> has a value of 3 or
more, the commands following a prefix (like <samp>\global</samp>) are shown by &#1013;-TeX;
this is the standard behaviour of <i>Tralics</i>. When <samp>\tracinglostchars</samp><a id="uid3751"></a>
has a value of two or more, missing characters are displayed on the terminal;
no character is lost by <i>Tralics</i>. When <samp>\tracingassigns</samp><a id="uid3752"></a> has a value
of 1 and more, all assignments subject to TeX´s grouping mechanism are
traced. This is set to one by <samp>\tracingall</samp>.
When <samp>\tracingifs</samp><a id="uid3753"></a> has a value of one or more, all conditionals are
traced, together with the starting line and nesting level; not implemented in
<i>Tralics</i>, but it is easy to find the <samp>\if</samp> associated to a <samp>\fi</samp>
because each of them has a serial number.
When <samp>\tracinggroups</samp><a id="uid3754"></a> has a value of 1 or more, the start and end of
each save group is traced, together with the starting line and grouping
level. Not implemented in <i>Tralics</i>, but since version 2.9,
you will see line numbers when a group is started (for instance
<i>+stack: level + 2 for brace entered on line 9</i>) or terminated (as in
<i>+stack: level - 2 for brace from line 9</i>).
When <samp>\tracingnesting</samp><a id="uid3755"></a> has a value of 1 or more, unclosed conditionals
are printed in the transcript file; not implemented in <i>Tralics</i>.
When <samp>\tracingscantokens</samp><a id="uid3756"></a> has a value of one or more, the opening and
closing of pseudo files is recorded as for any another file.</p>
<p>Example. Given the following input</p>
<pre class="latex-code"><span class="prenumber">1</span> \global\count66=12
<span class="prenumber">2</span> {\count66=12  \count66=13}
<span class="prenumber">3</span> \catcode200=12
<span class="prenumber">4</span> \parindent=3pt\parindent=1\parindent\global\parindent=2\parindent
<span class="prenumber">5</span> \parskip=\parindent plus 2pt\parskip=\parskip
<span class="prenumber">6</span> \setbox0\null
<span class="prenumber">7</span> \setbox0\xbox{foo}{bar}
<span class="prenumber">8</span> \everyhbox{abc}\everyhbox{abc}\everyhbox{c}
<span class="prenumber">9</span> \let\foo\relax
<span class="prenumber">10</span> \newcommand*\foo{\relax}\renewcommand\foo{\relax}
<span class="prenumber">11</span> \let\bar\foo
</pre>
<p>We get the following lines in the transcript file.</p>
<pre class="log-code"><span class="prenumber">1</span> [8] \global\count66=12
<span class="prenumber">2</span> {\global}
<span class="prenumber">3</span> {\global\count}
<span class="prenumber">4</span> +scanint for \count-&gt;66
<span class="prenumber">5</span> +scanint for \count-&gt;12
<span class="prenumber">6</span> {globally changing \count66=0 into \count66=12}
<span class="prenumber">7</span> [9] {\count66=12  \count66=13}
<span class="prenumber">8</span> {begin-group character}
<span class="prenumber">9</span> +stack: level + 2 for brace entered on line 9
<span class="prenumber">10</span> {\count}
<span class="prenumber">11</span> +scanint for \count-&gt;66
<span class="prenumber">12</span> +scanint for \count-&gt;12
<span class="prenumber">13</span> {reassigning \count66=12}
<span class="prenumber">14</span> {\count}
<span class="prenumber">15</span> +scanint for \count-&gt;66
<span class="prenumber">16</span> +scanint for \count-&gt;13
<span class="prenumber">17</span> {changing \count66=12 into \count66=13}
<span class="prenumber">18</span> {end-group character}
<span class="prenumber">19</span> +stack: restoring integer value 12 for \count66
<span class="prenumber">20</span> +stack: level - 2 for brace from line 9
<span class="prenumber">21</span> [10] \catcode200=12
<span class="prenumber">22</span> {\catcode}
<span class="prenumber">23</span> +scanint for \catcode-&gt;200
<span class="prenumber">24</span> +scanint for \catcode-&gt;12
<span class="prenumber">25</span> {reassigning \catcode200=12}
<span class="prenumber">26</span> [11] \parindent=3pt\parindent=1\parindent\global\parindent=2\parindent
<span class="prenumber">27</span> {\parindent}
<span class="prenumber">28</span> +scanint for \parindent-&gt;3
<span class="prenumber">29</span> +scandimen for \parindent-&gt;3.0pt
<span class="prenumber">30</span> {changing \parindent=0.0pt into \parindent=3.0pt}
<span class="prenumber">31</span> {\parindent}
<span class="prenumber">32</span> +scanint for \parindent-&gt;1
<span class="prenumber">33</span> +scandimen for \parindent-&gt;3.0pt
<span class="prenumber">34</span> {reassigning \parindent=3.0pt}
<span class="prenumber">35</span> {\global}
<span class="prenumber">36</span> {\global\parindent}
<span class="prenumber">37</span> +scanint for \parindent-&gt;2
<span class="prenumber">38</span> +scandimen for \parindent-&gt;6.0pt
<span class="prenumber">39</span> {globally changing \parindent=3.0pt into \parindent=6.0pt}
<span class="prenumber">40</span> [12] \parskip=\parindent plus 2pt\parskip=\parskip
<span class="prenumber">41</span> {\parskip}
<span class="prenumber">42</span> +scanint for \parskip-&gt;2
<span class="prenumber">43</span> +scandimen for \parskip-&gt;2.0pt
<span class="prenumber">44</span> {scanglue 6.0pt plus 2.0pt}
<span class="prenumber">45</span> {changing \parskip=0.0pt into \parskip=6.0pt plus 2.0pt}
<span class="prenumber">46</span> {\parskip}
<span class="prenumber">47</span> {reassigning \parskip=6.0pt plus 2.0pt}
</pre>
<p>Transcript for boxes and token lists:</p>
<pre class="log-code"><span class="prenumber">1</span> [13] \setbox0\null
<span class="prenumber">2</span> {\setbox}
<span class="prenumber">3</span> \null -&gt;\hbox {}
<span class="prenumber">4</span> +scanint for \setbox-&gt;0
<span class="prenumber">5</span> {Constructing an anonymous box}
<span class="prenumber">6</span> +stack: level + 2 for brace entered on line 13
<span class="prenumber">7</span> {Push hbox 1}
<span class="prenumber">8</span> {end-group character}
<span class="prenumber">9</span> +stack: finish a box of type 0
<span class="prenumber">10</span> {Pop 1: document_v hbox_v}
<span class="prenumber">11</span> +stack: level - 2 for brace from line 13
<span class="prenumber">12</span> {changing \box0=&lt;/&gt; into \box0=}
<span class="prenumber">13</span> [14] \setbox0\xbox{foo}{bar}
<span class="prenumber">14</span> {\setbox}
<span class="prenumber">15</span> +scanint for \setbox-&gt;0
<span class="prenumber">16</span> {Push argument 1}
<span class="prenumber">17</span> Character sequence: foo.
<span class="prenumber">18</span> {Text:foo}
<span class="prenumber">19</span> {Pop 1: document_v argument_v}
<span class="prenumber">20</span> {Constructing a box named foo}
<span class="prenumber">21</span> +stack: level + 2 for brace entered on line 14
<span class="prenumber">22</span> {Push hbox 1}
<span class="prenumber">23</span> Character sequence: bar.
<span class="prenumber">24</span> {end-group character}
<span class="prenumber">25</span> +stack: finish a box of type 0
<span class="prenumber">26</span> {Text:bar}
<span class="prenumber">27</span> {Pop 1: document_v hbox_v}
<span class="prenumber">28</span> +stack: level - 2 for brace from line 14
<span class="prenumber">29</span> {changing \box0= into \box0=&lt;foo&gt;bar&lt;/foo&gt;}
<span class="prenumber">30</span> [15] \everyhbox{abc}\everyhbox{abc}\everyhbox{c}
<span class="prenumber">31</span> {\everyhbox}
<span class="prenumber">32</span> {changing \everyhbox= into \everyhbox=abc}
<span class="prenumber">33</span> {\everyhbox}
<span class="prenumber">34</span> {reassigning \everyhbox=abc}
<span class="prenumber">35</span> {\everyhbox}
<span class="prenumber">36</span> {changing \everyhbox=abc into \everyhbox=c}
</pre>
<p>This is the transcript file for the case of <samp>\def</samp> and friends. Here, two
lines are printed by <samp>\tracingassigns</samp>.</p>
<pre class="log-code"><span class="prenumber">1</span> [16] \let\foo\relax
<span class="prenumber">2</span> {\let}
<span class="prenumber">3</span> {\let \foo \relax}
<span class="prenumber">4</span> {changing \foo=undefined}
<span class="prenumber">5</span> {into \foo = \relax}
<span class="prenumber">6</span> [17] \newcommand*\foo{\relax}\renewcommand\foo{\relax}
<span class="prenumber">7</span> {\newcommand}
<span class="prenumber">8</span> {\newcommand* \foo}
<span class="prenumber">9</span> {changing \foo=\relax}
<span class="prenumber">10</span> {into \foo= macro:-&gt;\relax }
<span class="prenumber">11</span> {\renewcommand}
<span class="prenumber">12</span> {\newcommand \foo}
<span class="prenumber">13</span> {changing \foo=macro:-&gt;\relax }
<span class="prenumber">14</span> {into \foo=\long macro:-&gt;\relax }
<span class="prenumber">15</span> [18] \let\bar\foo
<span class="prenumber">16</span> {\let}
<span class="prenumber">17</span> {\let \bar \foo}
<span class="prenumber">18</span> {changing \bar=macro:-&gt;\mathaccent "7016\relax }
<span class="prenumber">19</span> {into \bar = \long macro:-&gt;\relax }
</pre>
<p>In order to debug conditionals, the variables <samp>\currentiflevel</samp><a id="uid3757"></a>,
<samp>\currentifbranch</samp><a id="uid3758"></a> and also <samp>\currentiftype</samp><a id="uid3759"></a> can be consulted.
The level is the number of currently active conditionals, the branch is 1 if
the `then branch´ is taken, -1 if the `else branch´ is taken, 0 otherwise
(condition not yet evaluated, or out of condition). The type is given in the
following table (if the case of <samp>\unless</samp>, the opposite of this number is
returned).</p>
<table align="center" style="caption-side:bottom; border-collapse: collapse; border-width:1px;"><tr><td style="text-align:left;">1</td>
<td style="text-align:left;"><samp>\if</samp></td>
<td style="text-align:left;">8</td>
<td style="text-align:left;"><samp>\ifmmode</samp>     </td>
<td style="text-align:left;">15</td>
<td style="text-align:left;"><samp>\iftrue</samp></td>
</tr><tr><td style="text-align:left;">2</td>
<td style="text-align:left;"><samp>\ifcat</samp></td>
<td style="text-align:left;">9</td>
<td style="text-align:left;"><samp>\ifinner</samp></td>
<td style="text-align:left;">16</td>
<td style="text-align:left;"><samp>\iffalse</samp></td>
</tr><tr><td style="text-align:left;">3</td>
<td style="text-align:left;"><samp>\ifnum</samp></td>
<td style="text-align:left;">10</td>
<td style="text-align:left;"><samp>\ifvoid</samp></td>
<td style="text-align:left;">17</td>
<td style="text-align:left;"><samp>\ifcase</samp></td>
</tr><tr><td style="text-align:left;">4</td>
<td style="text-align:left;"><samp>\ifdim</samp></td>
<td style="text-align:left;">11</td>
<td style="text-align:left;"><samp>\ifhbox</samp></td>
<td style="text-align:left;">18</td>
<td style="text-align:left;"><samp>\ifdefined</samp></td>
</tr><tr><td style="text-align:left;">5</td>
<td style="text-align:left;"><samp>\ifodd</samp></td>
<td style="text-align:left;">12</td>
<td style="text-align:left;"><samp>\ifvbox</samp></td>
<td style="text-align:left;">19</td>
<td style="text-align:left;"><samp>\ifcsname</samp></td>
</tr><tr><td style="text-align:left;">6</td>
<td style="text-align:left;"><samp>\ifvmode</samp></td>
<td style="text-align:left;">13</td>
<td style="text-align:left;"><samp>\ifx</samp></td>
<td style="text-align:left;">20</td>
<td style="text-align:left;"><samp>\iffontchar</samp></td>
</tr><tr><td style="text-align:left;">7</td>
<td style="text-align:left;"><samp>\ifhmode</samp>    </td>
<td style="text-align:left;">14</td>
<td style="text-align:left;"><samp>\ifeof</samp></td>
</tr></table>
<p>The <samp>\unless</samp><a id="uid3760"></a> command is an extension of &#1013;-TeX; the behavior of
<samp>\unless</samp><samp>\iftrue</samp> is the same as <samp>\iffalse</samp>. This means the
following: This command is expandable; it reads a token; this token must be a
conditional, but not <samp>\ifcase</samp>. The conditional computes a truth value,
which is then negated. Expansion of the command is the same as that of the
conditional, said otherwise, the next token, if the test is true, otherwise
what follows the <samp>\else</samp> or <samp>\fi</samp>.</p>
<p>Example.</p>
<pre class="latex-code">\def\showif{%
\typeout{type \the\currentiftype,
level \the\currentiflevel,
branch \the\currentifbranch.}}
\count3=0
 
\unless\iffalse
\showif
\iffalse\showif\else\showif
\ifnum\count3=\currentifbranch
\showif \fi\fi\fi
</pre>
<p>The following is printed on the terminal.</p>
<pre class="log-code">type -16, level 1, branch 1.
type 16, level 2, branch -1.
type 3, level 3, branch 1.
</pre>
<p>The command <samp>\ifdefined</samp><a id="uid3761"></a> is a conditional; it reads a token and its
truth value is true if this token is defined.
The command <samp>\ifcsname</samp><a id="uid3762"></a> reads and expands all tokens as
<samp>\csname</samp><a id="uid3763"></a>, until finding <samp>\endcsname</samp>. The condition is true if the
token exists and is defined. If the token does not exist, it will not be
created. In LaTeX, <samp>\@ifundefined</samp> call <samp>\csname</samp>, but has as side
effect that the resulting token is never undefined.</p>
<p>The command <samp>\iffontchar</samp><a id="uid3764"></a> is a conditional;
it reads a font identifier, and a character position, and
evaluates to true in the case where this character is defined in the
font. Since
<i>Tralics</i> does not read font metric files, nothing special happens, we pretend
that the character exists, unless the font is the null font. Thus</p>
<pre class="latex-code">\ifdefined \undefined \bad\fi
\ifdefined \par\else\bad \fi
\ifcsname foo bar\endcsname\bad\fi
\ifcsname bar\endcsname\else\bad\fi
\csname foo bar\endcsname\ifcsname foo bar\endcsname\else\bad\fi
\unless\iffontchar\font 32 \bad\fi
\iffontchar\nullfont 32 \bad\fi
</pre>
<p>The command <samp>\protected</samp><a id="uid3765"></a> is a prefix, like <samp>\long</samp>, that applies
to a macro definition. A protected macro is not expanded when building an
expanded token list (for instance in <samp>\edef</samp>).</p>
<p>The command <samp>\scantokens</samp><a id="uid3766"></a> absorbs a list of unexpanded tokens,
converts it into a character string, that is treated as if it were an external
file and starts to read from this pseudo file. Every newline
character<a id="uid3767" href="#note78" title="The &#1013;- document says: current newline character"><small>(note: </small>&#10163;<small>)</small></a> is
interpreted as the start of a new line.</p>
<p>The command <samp>\showgroups</samp><a id="uid3768"></a> shows the current grouping structure.
The read-only integer <samp>\currentgrouplevel</samp><a id="uid3769"></a> returns the current save
group level, and <samp>\currentgrouptype</samp><a id="uid3770"></a> returns a number representing
the type of the
current group. This gives a number between 0 and 16, see the &#1013;-TeX documentation. The values used by <i>Tralics</i> are: 0 is bottom level (no
group), 1 is simple group, 9 is math group, 14 is semi simple group,
18 is environment, 19 is a cell in a table, 20 is a local group (corresponds
to 4 and 5 in &#1013;-TeX), 21 is a title-page group, 17 is impossible.</p>
<p>Example. If we have a file with</p>
<pre class="latex-code">\begin{foo}
\begingroup
{
\begin{tabular}{c}
  \showgroups!
\end{tabular}
\the\currentgrouplevel
\the\currentgrouptype
}
\endgroup
\end{foo}
</pre>
<p class="nofirst noindent">The following is printed by &#1013;-TeX</p>
<pre class="log-code">### simple group (level 10) entered at line 13 ({)
### align group (level 9) entered at line 12 (align entry)
### align group (level 8) entered at line 12 (\halign{)
### vcenter group (level 7) entered at line 12 (\vcenter{)
### math shift group (level 6) entered at line 12 ($)
### hbox group (level 5) entered at line 12 (\hbox{)
### semi simple group (level 4) entered at line 12 (\begingroup)
### simple group (level 3) entered at line 11 ({)
### semi simple group (level 2) entered at line 10 (\begingroup)
### semi simple group (level 1) entered at line 9 (\begingroup)
### bottom level
</pre>
<p class="nofirst noindent">or by <i>Tralics</i></p>
<pre class="log-code">### cell group (level 5) entered at line 13
### environment group (level 4) entered at line 12
### brace group (level 3) entered at line 11
### \begingroup group (level 2) entered at line 10
### environment group (level 1) entered at line 9
### bottom level
</pre>
<p class="nofirst noindent">You may wonder why &#1013;-TeX uses twice as many stack levels as <i>Tralics</i>. This is
because tables are implemented in a different way. For instance, using math
mode for tables is very strange; one might wonder what the current mode is,
when <samp>\tracinggroupd</samp> is seen; the answer is restricted horizontal mode, but
why? If we insert a <samp>\showlist</samp> command, we see</p>
<pre class="log-code">### restricted horizontal mode entered at line 13 []
spacefactor 3000
### restricted horizontal mode entered at line 13 []
spacefactor 0
### internal vertical mode entered at line 12
prevdepth ignored
### internal vertical mode entered at line 12
prevdepth ignored
### math mode entered at line 12
### restricted horizontal mode entered at line 12
spacefactor 1000
### horizontal mode entered at line 12 []
spacefactor 1000
### vertical mode entered at line 0
### current page: []
</pre>
<p>In the same situation, you will see the following lines in the <i>Tralics</i> transcript file. Here, the level is an index in the <span class="sansserif">XML</span> stack, and you can
see that the current mode is `a´ (for array).</p>
<pre class="log-code">level 0 entered at line 0, type document, mode_v:
&lt;std&gt;
&lt;table rend='inline'&gt;&lt;row&gt;&lt;cell/&gt;&lt;/row&gt;&lt;/table&gt;&lt;/std&gt;
level 1 entered at line 12, type tabular, mode_v:
&lt;table rend='inline'&gt;&lt;row&gt;&lt;cell/&gt;&lt;/row&gt;&lt;/table&gt;
level 2 entered at line 13, type row, mode_a:
&lt;row&gt;&lt;cell/&gt;&lt;/row&gt;
level 3 entered at line 13, type cell, mode_a:
&lt;cell/&gt;
</pre>
<p>If you translate the following line in verbose mode</p>
<pre class="latex-code">{\the\currentgrouplevel}
</pre>
<p class="nofirst noindent">you will see the following in the transcript file. The current level outside
the group is one, so that you see it increase to 2; but &#1013;-TeX shows it as
zero, so that the <samp>\the</samp> inside the group expands to one. The reason for
this strange behaviour is that a quantity defined at level zero is never
defined; the level is never zero, so that the <samp>\the</samp> never returns a
negative value.</p>
<pre class="latex-code">[9] {\the\currentgrouplevel}
{begin-group character}
+stack: level + 2 for brace entered on line 9
{\the}
{\the \currentgrouplevel}
\the-&gt;1.
{end-group character}
+stack: level - 2 for brace from line 9
</pre>
<p>The command <samp>\eTeXversion</samp><a id="uid3771"></a> expands to a token list containing the
current &#1013;-TeX revision. The counter <samp>\eTeXversion</samp><a id="uid3772"></a> returns &#1013;-TeX´s
major version number. Thus</p>
<pre class="latex-code">\message{\number\eTeXversion\eTeXrevision}
</pre>
<p class="nofirst noindent">prints something like `2.0´.</p>
<p>The commands <samp>\gluestretchorder</samp><a id="uid3773"></a>, <samp>\glueshrinkorder</samp><a id="uid3774"></a>,
<samp>\gluestretch</samp><a id="uid3775"></a>, <samp>\glueshrink</samp><a id="uid3776"></a> can be used when some internal
quantity is scanned, for instance after <samp>\the</samp>. They read some glue and
return one part of the glue, it can be the stretch order or the shrink order
(an integer between 0 and 3), or the stretch or shrink value (as a dimension).
The commands <samp>\gluetomu</samp><a id="uid3777"></a>, <samp>\mutoglue</samp><a id="uid3778"></a> read and return
some glue. The &#1013;-TeX manual says: glue is converted into muglue and vice
versa by simply equating 1pt with 1mu.
Example: we define here a command, whose value will be used later.</p>
<pre class="latex-code">\muskip0 = 18mu plus 36mu minus 1 fill
\skip0 = 10pt plus 20pt minus 1 fil
\edef\uselater{%
\the\muskip0,%
\the\mutoglue\muskip0,%
\the\skip0,%
\the\gluetomu\skip0,%
\the\mutoglue\gluetomu\skip0,%
\the\glueshrink\skip0,%
\the\gluestretch\skip0,%
\the\glueshrinkorder\skip0,%
\the\gluestretchorder\skip0}
</pre>
<p>The commands <samp>\detokenize</samp><a id="uid3779"></a> and <samp>\unexpanded</samp><a id="uid3780"></a> read a token
list. The second command returns the list unchanged, the first one
detokenizes it; said otherwise the token list is converted into a character
list, of category code 12 (except for space). These
commands behave like <samp>\the</samp>, in that the resulting token list is not
expanded, even in a <samp>\edef</samp> or <samp>\write</samp>. This example shows how
<samp>\unexpanded</samp> works.</p>
<pre class="latex-code">\def\foo{12}\def\equals{&lt;}
\edef\A{\unexpanded{\foo\equals}\foo\relax}
\def\equals{=}
\ifnum\A\else\bad\fi
\def\foo{11}
\ifnum\A\bad\fi
\ifnum\unexpanded{\foo\equals}\foo\relax\else\bad\fi
</pre>
<p>The command <samp>\uselater</samp>, defined above, should compare equal to
<samp>\xoo</samp> defined here<a id="uid3781" href="#note79" title="Guess why the macro is not called \foo"><small>(note: </small>&#10163;<small>)</small></a></p>
<pre class="latex-code">{\let\GDEF\gdef\let\XDEF\xdef\def\S{ }
 \catcode`m=12 \catcode`u=12 \catcode`p=12 \catcode`f=12
 \catcode`i=12  \catcode`l=12 \catcode`n=12 \catcode`i=12 \catcode`s=12
 \catcode`t=12
 \GDEF\MU{mu}\GDEF\PT{pt}\GDEF\FIL{fil}\GDEF\FILL{fill}%
 \GDEF\PLUS{plus}\GDEF\MINUS{minus}
\XDEF\xoo{18.0\MU\S \PLUS\S 36.0\MU\S \MINUS\S 1.0\FILL,%
18.0\PT\S \PLUS\S 36.0\PT\S \MINUS\S 1.0\FILL,%
10.0\PT\S \PLUS\S 20.0\PT\S \MINUS\S 1.0\FIL,%
10.0\MU\S \PLUS\S 20.0\MU\S \MINUS\S 1.0\FIL,%
10.0\PT\S \PLUS\S 20.0\PT\S \MINUS\S 1.0\FIL,%
1.0\PT,20.0\PT,1,0}}
</pre>
<p>Using <samp>\detokenize</samp> makes life easier. The test should be true here.</p>
<pre class="latex-code">\edef\yoo{\detokenize{18.0mu plus 36.0mu minus 1.0fill,%
18.0pt plus 36.0pt minus 1.0fill,%
10.0pt plus 20.0pt minus 1.0fil,%
10.0mu plus 20.0mu minus 1.0fil,%
10.0pt plus 20.0pt minus 1.0fil,%
1.0pt,20.0pt,1,0}}
\ifx\yoo\xoo\else\bad\fi
</pre>
<p>As in the case of &#1013;-TeX, <i>Tralics</i> provides the notion of expressions of type
number, dimen, glue or muglue, that can be used whenever a quantity of that
type is needed. Such an expression is read by the scanning mechanism;
basically scanint and friends are used to read a quantity, and <samp>\multiply</samp>
and friends are used to perform operations. The four commands that can be used
are <samp>\numexpr</samp><a id="uid3782"></a>, <samp>\dimexpr</samp><a id="uid3783"></a>, <samp>\glueexpr</samp><a id="uid3784"></a>
and <samp>\muexpr</samp>. They determine a type <span class="math"><i>t</i></span>, the type of the result, and read
an expression, that is followed by an optional <samp>\relax</samp><a id="uid3785"></a> (that will be
read). When scanning for an operator or the end of an expression, spaces are
discarded. An expression consists of one or more terms of type <span class="math"><i>t</i></span>, that are
added or subtracted. A term of type <span class="math"><i>t</i></span> consists of an initial factor of type
<span class="math"><i>t</i></span>, multiplied or divided by a numeric (integer) factor. Finally, a factor
is either a quantity of type <span class="math"><i>t</i></span>, or a parenthesized expression.
Example.</p>
<pre class="latex-code">\ifdim \dimexpr(2pt-5pt) *\numexpr 3-3*13/5\relax + 34pt/2=32pt
\else\bad\fi
</pre>
<p class="nofirst noindent">Here the <samp>\relax</samp> terminates the <samp>\numexpr</samp>. This is the trace.
You will see <i>expr so far</i> when a term is converted into an expression
(prefix `=´), or after an addition or subtraction (prefix `+´ or `-´).
You will see <i>term so far</i> after a multiplication or division (prefix
´*´ or ´/´) or a scaling (prefix backslash). In the case of <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>a</mi><mo>*</mo><mi>b</mi><mo>/</mo><mi>c</mi></mrow></math></span>, a 64bit
intermediate product is computed.</p>
<pre class="log-code">[8] \ifdim \dimexpr(2pt-5pt) *\numexpr 3-3*13/5\relax + 34pt/2=32pt
+\ifdim1
+scanint for \dimexpr-&gt;2
+scandimen for \dimexpr-&gt;2.0pt
+expr so far for \dimexpr= 2.0pt
+scanint for \dimexpr-&gt;5
+scandimen for \dimexpr-&gt;5.0pt
+expr so far for \dimexpr- -3.0pt
+scanint for \numexpr-&gt;3
+expr so far for \numexpr= 3
+scanint for \numexpr-&gt;3
+scanint for \numexpr-&gt;13
+scanint for \numexpr-&gt;5
+term so far for \numexpr\ 8
+expr so far for \numexpr- -5
+scan for \numexpr= -5
+scanint for \dimexpr-&gt;-5
+term so far for \dimexpr* 15.0pt
+expr so far for \dimexpr= 15.0pt
+scanint for \dimexpr-&gt;34
+scandimen for \dimexpr-&gt;34.0pt
+scanint for \dimexpr-&gt;2
+term so far for \dimexpr/ 17.0pt
+expr so far for \dimexpr+ 32.0pt
+scan for \dimexpr= 32.0pt
+scandimen for \ifdim-&gt;32.0pt
+scanint for \ifdim-&gt;32
+scandimen for \ifdim-&gt;32.0pt
+iftest1 true
</pre>
<p>Note that <samp>3*13/5</samp> is 8-1/5, and this is rounded to 8. In the case of
<samp>\divide</samp>, the result is truncated. All intermediate expressions are
checked for overflow<a id="uid3786" href="#note80" title="Since version 2.12, overflow is checked for all operations"><small>(note: </small>&#10163;<small>)</small></a>, which is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn> <mn>31</mn> </msup></math></span> for an integer, and <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn> <mn>30</mn> </msup></math></span> otherwise
(in magnitude). This means that dimensions and components of glue must be less
than <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn> <mn>14</mn> </msup></math></span> in units of <samp>pt</samp>, <samp>mu</samp> or <samp>fil</samp>.</p>
<p>One important point is that these operations do no side effects, hence can be
used inside an <samp>\edef</samp>. If used out of context, you can see error messages
like <i>You can´t use `\numexpr´ in horizontal mode</i>, (the
messages depends on the current mode), in <i>Tralics</i>, the error is
<i>Read only variable \numexpr</i>, because these operations
are implemented as the value of a read only variable.
Example</p>
<pre class="latex-code">\def\foo#1#2{\number#1
  \ifnum#1&lt;#2, %
  \expandafter\foo
  \expandafter{\number\numexpr#1+1\expandafter}%
  \expandafter{\number#2\expandafter}%
  \fi}
 
\edef\Bar{\foo{7}{13}}
\def\xBar{7, 8, 9, 10, 11, 12, 13}
\ifx\Bar\xBar\else \bad\fi
 
</pre>
<p>The integer <samp>\lastnodetype</samp><a id="uid3787"></a> returns a number indicating the type of
the last node, if any, on the current list. This is not implemented in
<i>Tralics</i>, and the value is always zero.</p>
<p>The <samp>\interactionmode</samp><a id="uid3788"></a> command allows you to get or set the
current interaction mode, an integer between 0 and 3. Setting it is no-op in
<i>Tralics</i> (no error signaled), the value is always zero (this is batchmode in
TeX, which is more or less the only mode of interaction of <i>Tralics</i>).</p>
<p>The commands <samp>\fontcharwd</samp><a id="uid3789"></a>, <samp>\fontcharht</samp><a id="uid3790"></a>,
<samp>\fontchardp</samp><a id="uid3791"></a>, <samp>\fontcharic</samp><a id="uid3792"></a> can be used to get some
information about characters; do not use them to set a value. The command
reads a font identifier, and a character position; if the character does not
exists, the value is zero, otherwise the width, height, depth or italic
correction. In the following example, <i>Tralics</i> shows 0 for the interaction
mode, and 0.0pt for the other values; in &#1013;-TeX, only the italics correction is zero.</p>
<pre class="latex-code">{
 \showthe\interactionmode
 \interactionmode=2
 \showthe\fontcharwd\font`q
 \showthe\fontcharht\font`q
 \showthe\fontchardp\font`q
 \showthe\fontcharic\font`q
}
\showthe\interactionmode
</pre>
<p>The commands <samp>\parshapelength</samp><a id="uid3793"></a>, <samp>\parshapeindent</samp><a id="uid3794"></a>,
read an integer <span class="math"><i>n</i></span>; they return the length or
indentation of the line <span class="math"><i>n</i></span> in the current parshape; the command
<samp>\parshapedimen</samp><a id="uid3795"></a> reads <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn><mi>n</mi></mrow></math></span> or <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn><mi>n</mi><mo>+</mo><mn>1</mn></mrow></math></span>, and returns one of these
quantities, depending on the parity of the argument.
Example: in the following code, the <samp>\bad</samp> macro is not called.</p>
<pre class="latex-code">\parshape 3 1pt 2pt 3pt 4pt 5pt 6pt
\ifnum\parshape         = 3 \else\bad\fi
\ifdim\parshapelength 1 = 2.0pt\else\bad\fi
\ifdim\parshapeindent 2 = 3.0pt\else\bad\fi
\ifdim\parshapedimen 4  = 4.0pt\else\bad\fi
\ifdim\parshapedimen 5  = 5.0pt\else\bad\fi
\ifdim\parshapedimen 6  = 6.0pt\else\bad\fi
\ifdim\parshapedimen 7  = 5.0pt\else\bad\fi
\ifdim\parshapedimen 0  = 0.0pt\else\bad\fi
\parshape 0
\ifdim\parshapedimen 1  = 0.0pt\else\bad\fi
</pre>
<p>The four commands <samp>\interlinepenalties</samp><a id="uid3796"></a>, <samp>\clubpenalties</samp>,
<samp>\widowpenalies</samp>, as well as <samp>\displaywidowpenalties</samp> can be used to get or set
penalties. The values are read, but not used by <i>Tralics</i>. The syntax is the
following. In a set context, an optional equals sign is read, followed by an
integer <span class="math"><i>n</i></span>. If the integer is positive, then <span class="math"><i>n</i></span> integer values are
read and stored, otherwise the table is cleared.
In a get context, an integer <span class="math"><i>n</i></span> is read, and the result is an integer; if <span class="math"><i>n</i></span>
is negative, this is zero, if <span class="math"><i>n</i></span> is zero it is the length of the table, if
<span class="math"><i>n</i></span> is positive it is the value found in the table (or the last value if <span class="math"><i>n</i></span>
is too big).
Example: in the following code, the <samp>\bad</samp> macro is not called.</p>
<pre class="latex-code">\interlinepenalties=3 1 2 3
\clubpenalties=3 11 12 13
\widowpenalties=3 101 102 103
\displaywidowpenalties=3 1001 1002 1003
\widowpenalties= -1
\edef\foo{%
\the\interlinepenalties 1
\the\clubpenalties\interlinepenalties2
\the\displaywidowpenalties -1
\the\displaywidowpenalties 0
\the\displaywidowpenalties 4
\the\widowpenalties 0}
\def\xfoo{1120310030}
\ifx\foo\xfoo\else\bad\fi
</pre>
<p>The command <samp>\showtokens</samp><a id="uid3797"></a> reads a token list, and prints it on the
terminal and transcript file. As the example below shows, the start of the
token list is obtained by expanding tokens and ignoring <samp>\relax</samp> until a
brace (implicit or explicit) is found.</p>
<pre class="latex-code">\showtokens \expandafter{\jobname}
\showtokens \expandafter{\tralicsversion }
</pre>
<p>The command <samp>\readline</samp><a id="uid3798"></a> has the same syntax as <samp>\read</samp>, it is followed by
a channel number, a <samp>to</samp> keyword, and a definable command. It reads a line
from a file, and puts it in the command. The difference is that all characters
are assumed of category code 12, except space that has its standard category
code; only one line is read, since the result is always properly nested.</p>
<p>The command <samp>\everyeof</samp><a id="uid3799"></a> holds a token list, like <samp>\everypar</samp>, that
is inserted at the end of every file, or virtual file.</p>
<p>The counter <samp>\lastlinefit</samp> contains an integer, that is used by &#1013;-TeX to
set the glue in the last line of a paragraph. For each line, the actual space
used by by a glue item of the form 10pt plus 4pt minus 3pt is <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>10</mn><mo>+</mo><mn>4</mn><mi>f</mi></mrow></math></span> or
<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mn>10</mn><mo>-</mo><mn>3</mn><mi>f</mi></mrow></math></span>, depending on whether the natural width is too big or too small. The
last line of a paragraph is generally terminated by an infinite stretchable
glue, so that the glue factor <span class="math"><i>f</i></span> for normal glue is zero. In &#1013;-TeX, you can
use the same factor as the previous line, or an interpolation (<span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mrow xmlns:xlink="http://www.w3.org/1999/xlink"><mi>l</mi><mo>/</mo><mn>1000</mn></mrow></math></span> times
the factor of the previous line), where <span class="math"><i>l</i></span> is the value of <samp>\lastlinefit</samp>,
or 0 if negative, or 1000 if greater than 1000. Not used in <i>Tralics</i>.</p>
<p>The integer quantity <samp>\savinghyphcodes</samp><a id="uid3800"></a>, when positive, tells &#1013;-TeX to store the current <samp>\lccode</samp> table together with the hyphenation table of
the current language. See &#1013;-TeX documentation for why it is useful to store
such a table; not used in <i>Tralics</i>.</p>
<p>When TeX´s page builder transfers material from the `recent contribution´ to
the `page so far´, it discards discardable items preceding the first box or
rule on the page. When &#1013;-TeX´s parameter <samp>\savingdiscards</samp><a id="uid3801"></a> is
positive, these discarded items are stored in a special list; the command
<samp>\pagediscards</samp><a id="uid3802"></a> reinserts these items (and clears the list). The same
holds for <samp>\vsplit</samp>, the command is then <samp>\splitdiscards</samp><a id="uid3803"></a>.</p>
<p>The <samp>\middle</samp><a id="uid3804"></a> command is not implemented in <i>Tralics</i>.
This is a math-only command that reads a delimiter, and should be placed
between <samp>\left</samp> and <samp>\right</samp>, more than one such command can be
used. The height of the delimiter of <samp>\left</samp>, <samp>\right</samp> and <samp>\middle</samp>
is the height of the formula, from <samp>\left</samp> to <samp>\right</samp>.</p>
<p>The six commands <samp>\marks</samp><a id="uid3805"></a>, <samp>\firstmarks</samp><a id="uid3806"></a>, <samp>\topmarks</samp><a id="uid3807"></a>
<samp>\botmarks</samp><a id="uid3808"></a>, <samp>\splitfirstmarks</samp><a id="uid3809"></a>, and <samp>\splitbotmarks</samp><a id="uid3810"></a>
generalise commands like <samp>\mark</samp>, they read an integer <span class="math"><i>N</i></span>, and set a mark
at position <span class="math"><i>N</i></span>, or get the mark at position <span class="math"><i>N</i></span>. No error is signalled if <span class="math"><i>N</i></span>
is out of range.</p>
<p>There is a possibility to type text from, left to right or right to left in
&#1013;-TeX. Not implemented in <i>Tralics</i>. The use of these features is controlled by
the integer <samp>\TeXXeTstate</samp><a id="uid3811"></a>.</p>
<p>The integer <samp>\predisplaydirection</samp><a id="uid3812"></a>
contains the text direction preceding a display.
The commands <samp>\beginL</samp><a id="uid3813"></a>, <samp>\beginR</samp><a id="uid3814"></a>, <samp>\endL</samp><a id="uid3815"></a>,
<samp>\endR</samp><a id="uid3816"></a> mark the start and end of a left-to-right or right-to-left
region.</p>

<h2 id="uid3817">6.13. Bootstrap code</h2>
<p>The transcript file of <i>Tralics</i> contains a line for each use of <samp>\dimendef</samp>
or friends. Here is the list of all standard definitions (for <i>Tralics</i> version 2.12). Note that <samp>\count@</samp><a id="uid3818"></a> is counter 255,
while <samp>\dimen@</samp><a id="uid3819"></a> is dimension 0.
The names (and values) of the commands <samp>\z@</samp><a id="uid3820"></a>,
<samp>\@ne</samp><a id="uid3821"></a>, <samp>\tw@</samp><a id="uid3822"></a>,
<samp>\thr@@</samp><a id="uid3823"></a>,
<samp>\sixt@@n</samp><a id="uid3824"></a>,
<samp>\@cclv</samp><a id="uid3825"></a>,
<samp>\@cclvi</samp><a id="uid3826"></a>,
<samp>\m@ne</samp><a id="uid3827"></a>,
<samp>\@m</samp><a id="uid3828"></a>,
<samp>\@M</samp><a id="uid3829"></a>,
<samp>\@Mi</samp><a id="uid3830"></a>,
<samp>\@Mii</samp><a id="uid3831"></a>,
<samp>\@Miii</samp><a id="uid3832"></a>,
<samp>\@Miv</samp><a id="uid3833"></a>,
<samp>\@MM</samp><a id="uid3834"></a>,
were chosen by Knuth (maybe Lamport).
The values are 0, 1,
2, 3, 16, 255,
256,
-1,
1000,
10000, 10001, 10002, 10003, 10004, and
20000. These numbers were typeset via <samp>\number</samp><samp>\@MM</samp>.</p>
<p>Remember that the internal name of the
LaTeX counter `<samp>enumi</samp>´ is <samp>\c@enumi</samp>.</p>
<pre class="log-code">\trivialmath=1
{\countdef \count@=\count255}
{\countdef \c@page=\count0}
{\dimendef \dimen@=\dimen0}
{\dimendef \dimen@i=\dimen1}
{\dimendef \dimen@ii=\dimen2}
{\dimendef \epsfxsize=\dimen11}
{\dimendef \epsfysize=\dimen12}
{\chardef \@ne=\char1}
{\chardef \tw@=\char2}
{\chardef \thr@@=\char3}
{\chardef \sixt@@n=\char16}
{\chardef \@cclv=\char255}
{\mathchardef \@cclvi=\mathchar256}
{\mathchardef \@m=\mathchar1000}
{\mathchardef \@M=\mathchar10000}
{\mathchardef \@Mi=\mathchar10001}
{\mathchardef \@Mii=\mathchar10002}
{\mathchardef \@Miii=\mathchar10003}
{\mathchardef \@Miv=\mathchar10004}
{\mathchardef \@MM=\mathchar20000}
{\chardef \active=\char13}
{\tokesdef \toks@=\toks0}
{\skipdef \skip@=\skip0}
{\dimendef \z@=\dimen13}
{\dimendef \p@=\dimen14}
{\dimendef \oddsidemargin=\dimen15}
{\dimendef \evensidemargin=\dimen16}
{\dimendef \leftmargin=\dimen17}
{\dimendef \rightmargin=\dimen18}
{\dimendef \leftmargini=\dimen19}
{\dimendef \leftmarginii=\dimen20}
{\dimendef \leftmarginiii=\dimen21}
{\dimendef \leftmarginiv=\dimen22}
{\dimendef \leftmarginv=\dimen23}
{\dimendef \leftmarginvi=\dimen24}
{\dimendef \itemindent=\dimen25}
{\dimendef \labelwidth=\dimen26}
{\dimendef \fboxsep=\dimen27}
{\dimendef \fboxrule=\dimen28}
{\dimendef \arraycolsep=\dimen29}
{\dimendef \tabcolsep=\dimen30}
{\dimendef \arrayrulewidth=\dimen31}
{\dimendef \doublerulesep=\dimen32}
{\dimendef \@tempdima=\dimen33}
{\dimendef \@tempdimb=\dimen34}
{\dimendef \@tempdimc=\dimen35}
{\dimendef \footnotesep=\dimen36}
{\dimendef \topmargin=\dimen37}
{\dimendef \headheight=\dimen38}
{\dimendef \headsep=\dimen39}
{\dimendef \footskip=\dimen40}
{\dimendef \columnsep=\dimen41}
{\dimendef \columnseprule=\dimen42}
{\dimendef \marginparwidth=\dimen43}
{\dimendef \marginparsep=\dimen44}
{\dimendef \marginparpush=\dimen45}
{\dimendef \maxdimen=\dimen46}
{\dimendef \normallineskiplimit=\dimen47}
{\dimendef \jot=\dimen48}
{\dimendef \paperheight=\dimen49}
{\dimendef \paperwidth=\dimen50}
{\skipdef \topsep=\skip11}
{\skipdef \partopsep=\skip12}
{\skipdef \itemsep=\skip13}
{\skipdef \labelsep=\skip14}
{\skipdef \parsep=\skip15}
{\skipdef \fill=\skip16}
{\skipdef \@tempskipa=\skip17}
{\skipdef \@tempskipb=\skip18}
{\skipdef \@flushglue=\skip19}
{\skipdef \listparindent=\skip20}
{\skipdef \hideskip=\skip21}
{\skipdef \z@skip=\skip22}
{\skipdef \normalbaselineskip=\skip23}
{\skipdef \normallineskip=\skip24}
{\skipdef \smallskipamount=\skip25}
{\skipdef \medskipamount=\skip26}
{\skipdef \bigskipamount=\skip27}
{\skipdef \floatsep=\skip28}
{\skipdef \textfloatsep=\skip29}
{\skipdef \intextsep=\skip30}
{\skipdef \dblfloatsep=\skip31}
{\skipdef \dbltextfloatsep=\skip32}
{\countdef \m@ne=\count20}
{\countdef \c@FancyVerbLine=\count21}
{\countdef \c@enumi=\count22}
{\countdef \c@enumii=\count23}
{\countdef \c@enumiii=\count24}
{\countdef \c@enumiv=\count25}
{\countdef \c@footnote=\count26}
{\countdef \c@part=\count27}
{\countdef \c@chapter=\count28}
{\countdef \c@section=\count29}
{\countdef \c@subsection=\count30}
{\countdef \c@subsubsection=\count31}
{\countdef \c@paragraph=\count32}
{\countdef \c@subparagraph=\count33}
{\countdef \c@mpfootnote=\count34}
{\countdef \c@bottomnumber=\count35}
{\countdef \c@topnumber=\count36}
{\countdef \@tempcnta=\count37}
{\countdef \@tempcntb=\count38}
{\countdef \c@totalnumber=\count39}
{\countdef \c@dbltopnumber=\count40}
{\countdef \interfootnotelinepenalty=\count41}
{\countdef \interdisplaylinepenalty=\count42}
{\toksdef \@temptokena=\toks11}
{\chardef \@tempboxa=\char11}
{\chardef \voidb@x=\char12}
</pre>
<p>At the start of the run, some commands are created; we start with commands
that take no argument, whose expansion is formed of characters only.</p>
<ul>
<li id="uid3835"><p class="nofirst noindent"><samp>\lq</samp><a id="uid3836"></a>, <samp>\rq</samp><a id="uid3837"></a> (left and right quotes). Expansion is
`<samp>`</samp>´ and `<samp>'</samp>´.</p>
</li>
<li id="uid3838"><p class="nofirst noindent"><samp>\lbrack</samp><a id="uid3839"></a>, <samp>\rbrack</samp><a id="uid3840"></a> (left and right brackets)
expansion is `<samp>[</samp>´ and `<samp>]</samp>´.</p>
</li>
<li id="uid3841"><p class="nofirst noindent"><samp>\xscale</samp><a id="uid3842"></a>, <samp>\yscale</samp><a id="uid3843"></a>, <samp>\xscaley</samp><a id="uid3844"></a>,
<samp>\yscalex</samp><a id="uid3845"></a>. Expansion is one, one, zero, zero (in fact `<samp>1.0</samp>´
and `<samp>0.0</samp>´).</p>
</li>
<li id="uid3846"><p class="nofirst noindent"><samp>\textfraction</samp><a id="uid3847"></a>, <samp>\floatpagefraction</samp><a id="uid3848"></a>,
<samp>\dblfloatpagefraction</samp><a id="uid3849"></a>,<samp>\bottomfraction</samp><a id="uid3850"></a>,       <!--PASS THROUGH allowbreak--><samp>\dbltopfraction</samp><a id="uid3851"></a>, <samp>\topfraction</samp><a id="uid3852"></a>. Parameters for float
placement. Expansion is 20%, 50%, 50%, 30%, 70%, and 70%, in the form of
`<samp>.7</samp>´ for instance.</p>
</li>
<li id="uid3853"><p class="nofirst noindent"><samp>\@vpt</samp><a id="uid3854"></a>, <samp>\@vipt</samp><a id="uid3855"></a>,
<samp>\@viipt</samp><a id="uid3856"></a>, <samp>\@viiipt</samp><a id="uid3857"></a>,
<samp>\@ixpt</samp><a id="uid3858"></a>, <samp>\@xpt</samp><a id="uid3859"></a>,
<samp>\@xipt</samp><a id="uid3860"></a>, <samp>\@xiipt</samp><a id="uid3861"></a>,
<samp>\@xivpt</samp><a id="uid3862"></a>, <samp>\@xviipt</samp><a id="uid3863"></a>,
<samp>\@xxpt</samp><a id="uid3864"></a>, <samp>\@xxvpt</samp><a id="uid3865"></a>.
Font sizes. Expansion is 5, 6, 7, 8, 9, 10, 10.95, 12, 14.4, 17.28, 20.74 and
24.88.</p>
</li>
<li id="uid3866"><p class="nofirst noindent"><samp>\@height</samp>, <samp>\@depth</samp>, <samp>\@width</samp>, <samp>\@plus</samp>, <samp>\@minus</samp><a id="uid3867"></a>. Expansion is the name of the
command without the at-sign. In the LaTeX kernel, you can see
`<samp>\vskip</samp> <samp>\z@</samp> <samp>\@plus</samp><samp>.2</samp><samp>\p@</samp>´ instead of the more obvious
`<samp>\vskip</samp> <samp>0pt plus 0.2pt</samp>´.</p>
</li>
<li id="uid3868"><p class="nofirst noindent"><samp>\encodingdefault</samp><a id="uid3869"></a>, <samp>\familydefault</samp><a id="uid3870"></a>,
<samp>\seriesdefault</samp><a id="uid3871"></a>, <samp>\shapedefault</samp><a id="uid3872"></a>: This default the current
font as T1+cmr/m/n.</p>
</li>
<li id="uid3873"><p class="nofirst noindent"><samp>\I</samp><a id="uid3874"></a>, <samp>\J</samp><a id="uid3875"></a>. Uppercase version of <samp>\i</samp> and
<samp>\j</samp>. Expansion is I or J.</p>
</li>
<li id="uid3876"><p class="nofirst noindent"><samp>\baselinestretch</samp><a id="uid3877"></a>, <samp>\arraystretch</samp><a id="uid3878"></a>: expansdion is 1.</p>
</li>
<li id="uid3879"><p class="nofirst noindent"><samp>\space</samp><a id="uid3880"></a>, <samp>\thinspace</samp><a id="uid3881"></a>,
<samp>\@headercr</samp><samp>\headercr</samp><a id="uid3882"></a>"@headercr:
Expansion is a single space
character.</p>
</li>
<li id="uid3883"><p class="nofirst noindent"><samp>\refname</samp><a id="uid3884"></a> expands to `Bibliography´.</p>
</li>
<li id="uid3885"><p class="nofirst noindent"><samp>\footcitesep</samp><a id="uid3886"></a>, <samp>\citepunct</samp><a id="uid3887"></a>. Expansion is comma space
for both commands.</p>
</li>
<li id="uid3888"><p class="nofirst noindent"><samp>\fmtname</samp><a id="uid3889"></a> expands to `Tralics´.</p>
</li></ul>
<p>We continue with more complicated commands:</p>
<ul>
<li id="uid3890"><p class="nofirst noindent"><samp>\@spaces</samp><a id="uid3891"></a>. Expansion is four <samp>\space</samp>.</p>
</li>
<li id="uid3892"><p class="nofirst noindent">Space, sharp, underscore, newline, as active characters, are defined to
be equivalent, respectively, to <samp>\space</samp>, <samp>\#</samp>, <samp>\_</samp> and
<samp>\par</samp>.</p>
</li>
<li id="uid3893"><p class="nofirst noindent">An active &amp; character produces &amp;.</p>
</li>
<li id="uid3894"><p class="nofirst noindent">An active form-feed character is an outer <samp>\par</samp>.</p>
</li>
<li id="uid3895"><p class="nofirst noindent">The tilde and no-breakspace (character 160) expand to <samp>\nobreakspace</samp>.</p>
</li>
<li id="uid3896"><p class="nofirst noindent"><samp>\obeyspaces</samp><a id="uid3897"></a> makes the space character active.</p>
</li>
<li id="uid3898"><p class="nofirst noindent"><samp>\@vobeyspaces</samp><a id="uid3899"></a> makes the space
character active, and defines it to be <samp>\nobreakspace</samp>.</p>
</li>
<li id="uid3900"><p class="nofirst noindent"><samp>\obeylines</samp><a id="uid3901"></a> makes newline character active (and defines it to
be <samp>\par</samp>).</p>
</li>
<li id="uid3902"><p class="nofirst noindent">The <samp>sloppypar</samp> environment expands to <samp>\par</samp> in the begin and
end part.</p>
</li>
<li id="uid3903"><p class="nofirst noindent">The command <samp>\hb@xt@</samp><a id="uid3904"></a> is a short hand for
<samp>\hbox to</samp>.</p>
</li>
<li id="uid3905"><p class="nofirst noindent">The <samp>\null</samp><a id="uid3906"></a> command produces an empty box. This is invisible, but
some rules will be applied differently (for instance it can inhibit
ligatures).</p>
</li>
<li id="uid3907"><p class="nofirst noindent"><samp>\labelitemi</samp><a id="uid3908"></a>, <samp>\labelitemii</samp><a id="uid3909"></a>, <samp>\labelitemiii</samp><a id="uid3910"></a>,
and <samp>\labelitemiv</samp><a id="uid3911"></a> produce a bullet, endash, asterisk centered, and
period centered, via <samp>\textbullet</samp>, etc.</p>
</li>
<li id="uid3912"><p class="nofirst noindent">The <samp>guillemets</samp> environment produces <samp>\guillemotleft</samp> and
<samp>\guillemotright</samp></p>
</li>
<li id="uid3913"><p class="nofirst noindent"><samp>\@thirdofthree</samp><a id="uid3914"></a> reads three
arguments, and expands to the last.</p>
</li>
<li id="uid3915"><p class="nofirst noindent"><samp>\@carcube</samp><a id="uid3916"></a> reads three arguments
and returns them. Moreover, it reads and discards all tokens up to
<samp>\@nil</samp>.</p>
</li>
<li id="uid3917"><p class="nofirst noindent">The <samp>\date</samp><a id="uid3918"></a> command takes an argument that LaTeX puts in
<samp>\@date</samp> which is filled with <samp>\today</samp><a id="uid3919"></a>. The <samp>\today</samp> command
is defined in some classes using English month names, and some packages (using
local names). In <i>Tralics</i>, the default is a numeric list like
`<samp>2006/10/12 19:14:59</samp>´ (this is the same string that appears in the
transcript file). The <samp>\date</samp> command produces a <tt class="txt">&lt;date&gt;</tt> element with
the arguments.</p>
</li>
<li id="uid3920"><p class="nofirst noindent">The commands <samp>\markright</samp><a id="uid3921"></a> and <samp>\markboth</samp><a id="uid3922"></a> take one or
two arguments and call <samp>\mark</samp>; since <samp>\mark</samp> does nothing in
<i>Tralics</i>, the implementation is oversimplified; it modifies the command
<samp>\@themark</samp><a id="uid3923"></a>.</p>
</li>
<li id="uid3924"><p class="nofirst noindent"><samp>\mod</samp><a id="uid3925"></a>, <samp>\bmod</samp><a id="uid3926"></a>, <samp>\pmod</samp><a id="uid3927"></a>, <samp>\pod</samp><a id="uid3928"></a> are
commands that take one argument,they are different implementation of the
modulo operator.</p>
</li>
<li id="uid3929"><p class="nofirst noindent">The six following commands <samp>\chaptermark</samp><a id="uid3930"></a>, <samp>\sectionmark</samp><a id="uid3931"></a>,
<samp>\subsectionmark</samp><a id="uid3932"></a>, <samp>\subsubsectionmark</samp><a id="uid3933"></a>,
<samp>\paragraphmark</samp><a id="uid3934"></a>, and <samp>\subparagraphmark</samp><a id="uid3935"></a> are defined by
compatibility with LaTeX to take an argument and ignore it. These commands
are redefined by standard classes<a id="uid3936" href="#note81" title="maybe also indirectly via \pagestyle"><small>(note: </small>&#10163;<small>)</small></a>
and typically call <samp>\markboth</samp> or <samp>\markright</samp>.</p>
</li>
<li id="uid3937"><p class="nofirst noindent">The command <samp>\@addnl</samp><a id="uid3938"></a> inserts a newline in the <span class="sansserif">XML</span> tree.</p>
</li>
<li id="uid3939"><p class="nofirst noindent"><samp>\addto@hook</samp><a id="uid3940"></a> takes two arguments A and B.
First argument is assumed to be a reference to a token list (for instance
<samp>\everypar</samp>). The tokens in the the list B are put at the end of A.</p>
</li>
<li id="uid3941"><p class="nofirst noindent"><samp>\g@addto@macro</samp><a id="uid3942"></a> takes two arguments A and B.
First argument is assumed to be a macro that takes no argument.
The tokens in the the list B are put at the end of A. Assignment is global.</p>
</li>
<li id="uid3943"><p class="nofirst noindent">The command <samp>\@setmode</samp><a id="uid3944"></a> scans an integer.
Values outside the range 0-6 are replaced by 0. Other values
correspond to argument mode (0), or horizontal mode (1), or vertical mode(2),
no mode (3), bibliographic mode (4), array mode (5), mathmode (6). Do not use
this command if you do not understand the consequences. In a case like
<samp>1\@setmode 2 \space3 4 5\par</samp>, there is no space between 1 and
3, because we are vertical mode, horizontal mode is entered when the the digit
3 is seen. In a case like <samp>1\@setmode 4 \space3 4 5\par</samp>
there is no space at all since they
are ignored in bib mode. The <samp>\par</samp> command is ignored as well, so you had
better to add <samp>\@setmode1</samp> or enclose everything in a group.</p>
</li>
<li id="uid3945"><p class="nofirst noindent"><samp>\x@tag</samp> and <samp>\y@tag</samp> are internal macros for equation tags.</p>
</li></ul>
<p>We show here the meaning of <samp>\@sanitize</samp><a id="uid3946"></a>,
<samp>\@nnil</samp><a id="uid3947"></a> and <samp>\do</samp><a id="uid3948"></a>.</p>
<pre class="log-code">\@sanitize=macro: -&gt;\@makeother \ \@makeother \\\@makeother \$\@makeother
   \&amp;\@makeother \#\@makeother \^\@makeother \_\@makeother \%\@makeother \~.
\dospecials=macro: -&gt;\do \ \do \\\do \$\do \&amp;\do \#\do \^\do \_\do \%\do
   \~\do \{\do \}.
\@nnil=macro: -&gt;\@nil .
</pre>
<p>The page<a id="uid3949"></a> counter is <samp>\count0</samp>. We first define <samp>\c@page</samp>,
via <samp>\countdef</samp>, then <samp>\cl@page</samp> to be empty, <samp>\c@page</samp> to be one,
and <samp>\thepage</samp><a id="uid3950"></a> to use arabic numbers; the <samp>\pagenumbering</samp> command
redefines the <samp>\thepage</samp>. The command <samp>\p@page</samp> is not defined because
<samp>\p@foo</samp> is used only for printing the label associated to the counter (if
you want the page number of reference `foo´, use <samp>\pageref</samp><a id="uid3951"></a>).
Note that in
<i>Tralics</i>, the page counter is never modified, <samp>\pageref</samp> is the same as
<samp>\ref</samp>. Consider a reference to the page containing the start of the
verbatim environment we are commenting: <a href="#uid3953">&#10043;</a>. In LaTeX, the
value of <samp>\@currentlabel</samp> is considered, in <i>Tralics</i>, the current anchor is
used instead; this works well for <samp>\ref</samp>. The current label is defined
here:<a href="#uid3817" title="Bootstrap code">6.13</a>, at the start of the section. For the <span class="sansserif">HTML</span> version of
the document, we have cheated a bit. We have added an <samp>\index</samp> command, and
this inserts an anchor after the word `bootstrap´; the label follows the
<samp>\index</samp>. The <samp>\pageref</samp> command uses this label. Note that the
<samp>\anchor</samp><a id="uid3952"></a> command adds an anchor, but this is not defined by LaTeX.
The commands defined here produce a <tt class="txt">&lt;pagestyle&gt;</tt> element.</p>
<pre class="latex-code">  \def\pagenumbering#1{\xmlelt{pagestyle}{\XMLaddatt{numbering}{#1}}}
  \def\pagestyle#1{\xmlelt{pagestyle}{\XMLaddatt{style}{#1}}}
  \def\thispagestyle#1{\xmlelt{pagestyle}{\XMLaddatt{this-style}{#1}}}
</pre>
<p>We show now the remaining of the bootstrap<a id="uid3953"></a>
code. We start with filling some registers.</p>
<pre class="log-code">[1] %% Begin bootstrap commands for latex
[2] \@flushglue = 0pt plus 1fil
[3] \hideskip =-1000pt plus 1fill
[4] \smallskipamount=3pt plus 1pt minus 1pt
[5] \medskipamount=6pt plus 2pt minus 2pt
[6] \bigskipamount=12pt plus 4pt minus 4pt
[7] \z@=0pt\p@=1pt\m@ne=-1 \fboxsep = 3pt %
[8] \c@page=1 \fill = 0pt plus 1fill
[9] \paperheight=297mm\paperwidth=210mm
[10] \jot=3pt\maxdimen=16383.99999pt
</pre>
<p>The two commands defined here take as argument either a character
or a one character command.</p>
<pre class="log-code">[33] \def\@makeother#1{\catcode`#1=12\relax}
[34] \def\@makeactive#1{\catcode`#1=13\relax}
</pre>
<p>Other commands</p>
<pre class="log-code">[11] \def\newfont#1#2{\font#1=#2\relax}
[12] \def\symbol#1{\char #1\relax}
[16] \newenvironment{cases}{\left\{\begin{array}{ll}}{\end{array}\right.}%
[19] \def\stretch#1{\z@ \@plus #1fill\relax}
[20] \theoremstyle{plain}\theoremheaderfont{\bfseries}
[21] \def\@namedef#1{\expandafter\def\csname #1\endcsname}
[22] \def\@nameuse#1{\csname #1\endcsname}
[23] \def\@arabic#1{\number #1}
[24] \def\@roman#1{\romannumeral#1}
[25] \def\@Roman#1{\Romannumeral#1}
[30] \def\LaTeXe{\LaTeX2$\epsilon$}
[32] \def\enspace{\kern.5em }
[35] \def\root#1\of{\@root{#1}}
[40] \def\eqref#1{(\ref{#1})}
[43] \def\on@line{ on input line \the\inputlineno}
[47] %% End bootstrap commands for latex
</pre>

<h2 id="uid3954">6.14. Standard packages</h2>
<p>Version 1 of this document described the status of standard packages for
<i>Tralics</i>2.9. It has been withdrawn. The list of all packages, with
documentation, is be found on the web.</p>

<h2 id="uid3955">6.15. Images</h2>
<p>We give here some examples of the <samp>\includegraphics</samp><a id="uid3956"></a> command.
We consider a file with the following content.
Notice that the clip attribute is set to true if `clip´ appears in the list,
whether or not a value has been given. A colon and an underscore in a file
name is never interpreted. The extension is always removed:</p>
<pre class="latex-code">\let\IC=\includegraphics
\def\FILE{Logo-INRIA-couleur}
\IC[angle=0,width=3cm,clip=]{\FILE}
\IC[angle=20,width=.5\textwidth,height=.3\textheight]{\FILE.ducon}
\IC[angle=0,width=\columnwidth,height=\textheight]{\FILE.foo_bar}
{\language=1 a:c
\IC[angle=0, =foo,,width=3cm,scale=1,scale=2,clip]{../../a_b:c}
}
\framebox{\includegraphics{x_.ps}}
</pre>
<p class="nofirst noindent">We continue with an example of <samp>\epsfbox</samp><a id="uid3957"></a>.</p>
<pre class="latex-code">{
  \setlength\epsfxsize{50pt}
  \setlength\epsfysize{60pt}
  \epsfbox{x.ps}
  \setlength\epsfysize{70pt}
  \epsfbox{x.eps}
  \epsfbox{x.epsf}
}
</pre>
<p><i>Tralics</i> pretends that there are 4 different images. The translation is:</p>
<pre class="xml-code">&lt;figure rend='inline' clip='true' width='3cm' file='Logo-INRIA-couleur'/&gt;
&lt;figure rend='inline' height='6.cm' width='7.5cm'
     angle='20' file='Logo-INRIA-couleur'/&gt;
&lt;figure rend='inline' height='20.cm' width='15.cm'
   file='Logo-INRIA-couleur'/&gt;
a :c
&lt;figure rend='inline' clip='true' scale='2' width='3cm' file='../../a_b:c'/&gt;
&lt;figure framed='true' rend='inline' file='x_'/&gt;&lt;/p&gt;
&lt;figure height='60.0pt' width='50.0pt' rend='inline' file='x'/&gt;
&lt;figure height='70.0pt' rend='inline' file='x'/&gt;
&lt;figure rend='inline' file='x'/&gt;
</pre>
<p>The file `<samp>\jobname</samp>.img´ contains the following. The last number is the
number of times the image was included. The second number explains in which
format the file has been found. Whether or not the image file is found is
irrelevant. The information given in the file is for information only.</p>
<pre class="xml-code"># images info, 1=ps, 2=eps, 4=epsi, 8=epsf, 16=pdf, 32=png, 64=gif
see_image("Logo-INRIA-couleur",1+16,3);
see_image("../../a_b:c",0,1);
see_image("x_",0,1);
see_image("x",0,3);
</pre>

<h2 id="uid3958">6.16. The puzzle</h2>
<p>The only requirements for the <span class="sansserif">xii</span> file is that <samp>~</samp> is
an active character, <samp>\</samp> has category code 0, <samp>%</samp> is a
comment character, the end of line character is as usual. The file modifies
the category code of 7, F, j and P, in such a way that `jdefjx71F71P´ is the
same as `<samp>\def\x#1{#1}</samp>´. This is one way of making the code incomprehensible,
the other is to use commands so that `six´, `geese´ and `laying´ are replaced
by `/sx´, `Yegse´ and `RyalD´. The programs make the letter H active and
defines it via `AHHFLP´. For those who want to write puzzles like this one: is
it possible to avoid doubling the H? Without using all these strange
commands, the file could be written as</p>
<pre class="latex-code">\let~\catcode ~`A13 \defA#1{~`#113\def}
AZZ{}APP{\par}AXX#1{\bigskip On the #1 day of Christmas my true love gave to me}
ABB{PZAZZ{and }a partridge in a pear tree.}
ACC{Ptwo turtle doves}
ADD{Pthree french hens}
AEE{Pfour calling birds}
AFF{Pfive gold rings}
AGG{Psix geese a laying}
AHH{Pseven swans a swimming}
AII{Peight maids a milking}
AJJ{Pnine ladies dancing}
AKK{Pten lords a leaping}
ALL{Peleven pipers piping}
AMM{Ptwelve drummers drumming}
\def\F#1#2#3{}AVV#1\fi{\fi#1}
ATT#1 #2,#3:{\if.#3.\elseT#3:\fiX{#1}\U#1 #2,#3:}
\def\U#1#2#3#4 #5,#6{\F#1#2#3#5\if:#6\elseV\U#6\fi}
Ttwelfth M,eleventh L,tenth K,ninth J,eighth I,seventh H,sixth G,fifth
F,fourth E,third D,second C,first B,:\bye
</pre>
<p class="nofirst noindent">The size of the file is 698 characters (compare to the 767 of the
<span class="sansserif">xii</span> file). Note how the double loop is constructed. The
<span class="sansserif">xii</span> file is made obscure by replacing B, C, D etc., by expression that
have the same expansion, using instead of <samp>\F</samp> a command that uses some
characters (because `nine´ and `ninth´ start with the same letters, etc.) An
interesting point is that we can write a smaller file, with all loops
unrolled, replacing the last 5 lines by the following (this makes a total of
642 characters):</p>
<pre class="latex-code">X{first}BX{second}CBX{third}DCBX{fourth}EDCBX{fifth}FEDCBX{sixth}GFEDCB
X{seventh}HGFEDCBX{eighth}IHGFEDCBX{ninth}JIHGFEDCBX{tenth}KJIHGFEDCB
X{eleventh}LKJIHGFEDCBX{twelfth}MLKJIHGFEDCB\bye
</pre>
<!--PASS THROUGH cleardoublepage-->
<h1 id="bibliography">Bibliography</h1>
<p class="noindent nofirst" id="bid1">[1] <span class="smallcap">David Carlisle, Michel Goossens, Sebastian Rahtz.</span> <i>De XML à PDF avec <tt>xmltex</tt> et PassiveTeX. </i>in « Cahiers Gutenberg », number 35-36, pages 79-114, 2000.</p>
<p class="noindent nofirst" id="bid4">[2] <span class="smallcap">Michel Goossens, Frank Mittelbach, Alexander Samarin.</span> <i>The LaTeX companion. </i>Addison Wesley, 1993.</p>
<p class="noindent nofirst" id="bid2">[3] <span class="smallcap">José Grimm.</span> <i>Outils pour la manipulation du rapport d´activité. </i>Technical report, number RT-0265, Inria, 2002, <a href="http://www.inria.fr/rrrt/rt-0265.html">http://<!--PASS THROUGH allowbreak-->www.<!--PASS THROUGH allowbreak-->inria.<!--PASS THROUGH allowbreak-->fr/<!--PASS THROUGH allowbreak-->rrrt/<!--PASS THROUGH allowbreak-->rt-0265.<!--PASS THROUGH allowbreak-->html</a></p>
<p class="noindent nofirst" id="bid3">[4] <span class="smallcap">Donald E. Knuth.</span> <i>The TeXbook. </i>Addison Wesley, 1984.</p>
<p class="noindent nofirst" id="bid0">[5] <span class="smallcap">Philippe Louarn.</span> <i>Une expérience d´utilisation de LaTeX : le Rapport d´activité de l´INRIA. </i>in « Cahiers Gutenberg », number 0, apr, 1988, pages 17-24.</p>
<p class="noindent nofirst" id="bid5">[6] <span class="smallcap">Frank Mittelbach, Michel Goossens, Johannes Braams, David Carlisle, Chris Rowley.</span> <i>The LaTeX companion, second edition. </i>Addison Wesley, 2004.</p>
<p class="noindent nofirst" id="bid6">[7] <span class="smallcap"> The Unicode Consortium.</span> <i>The Unicode Standard, version 4.0. </i>Addison Wesley, 2003.</p>
<p class="noindent nofirst" id="bid8">[8] <span class="smallcap"> W3C.</span> <i>Extensible Markup Language (XML) 1.1. </i>http://www.w3.org/TR/xml11/, 2004.</p>
<p class="noindent nofirst" id="bid7">[9] <span class="smallcap"> W3C.</span> <i>Extensible Markup Language (XML) 1.0 (Third Edition). </i>http://www.w3.org/TR/REC-xml/, 1998, Third edition published in 2004.</p><h1 id="tableofcontents">Table of Contents</h1><p>
<br /><b>1. <a href="#cid1">Introduction</a></b>
<br />     1.1. <a href="#uid2">A short history of the Raweb</a>
<br />     1.2. <a href="#uid7">Birth of Tralics</a>
<br />     1.3. <a href="#uid11">Main objectives</a>
<br />     1.4. <a href="#uid24">Notes on the distribution</a>
<br />     1.5. <a href="#uid25">An example</a>
<br />     1.6. <a href="#uid42">Some remarks on the <b>Translation</b></a>
<br />     1.7. <a href="#uid62">Category codes and characters</a>
<br />     1.8. <a href="#uid81">Considerations about mathematics</a>
<br />     1.9. <a href="#uid112">Some subtleties of TeX</a>
<br />     1.10. <a href="#uid118">Language options</a>
<br /><b>2. <a href="#cid2">Expansion</a></b>
<br />     2.1. <a href="#uid124">Defining new commands</a>
<br />     2.2. <a href="#uid141">Defining commands in LaTeX</a>
<br />     2.3. <a href="#uid181">Some small examples</a>
<br />     2.4. <a href="#uid241">Variables in TeX</a>
<br />     2.5. <a href="#uid276">All the variables</a>
<br />     2.6. <a href="#uid766">Using the variables</a>
<br />     2.7. <a href="#uid774">Counters</a>
<br />     2.8. <a href="#uid815">Fonts</a>
<br />     2.9. <a href="#uid866">Spaces</a>
<br />     2.10. <a href="#uid919">Conditional expansion</a>
<br />          2.10.1. <a href="#uid922">Constructing commands dynamically</a>
<br />          2.10.2. <a href="#uid924">Iterating over lists</a>
<br />          2.10.3. <a href="#uid925">Mapping a command</a>
<br />          2.10.4. <a href="#uid928">Creating a list via pattern matching</a>
<br />          2.10.5. <a href="#uid938">A variant of the previous problem</a>
<br />          2.10.6. <a href="#uid941">Loops</a>
<br />     2.11. <a href="#uid950">Conditionals in TeX</a>
<br />          2.11.1. <a href="#uid970">Syntax of the conditionals</a>
<br />          2.11.2. <a href="#uid1020">Examples of conditional commands</a>
<br />          2.11.3. <a href="#uid1022">Testing the next token</a>
<br />          2.11.4. <a href="#uid1025">Reading a space</a>
<br />          2.11.5. <a href="#uid1028">Variants of the Map problem</a>
<br />          2.11.6. <a href="#uid1031">More examples</a>
<br />          2.11.7. <a href="#uid1034">Producing N asterisks in a row</a>
<br />     2.12. <a href="#uid1037">A nontrivial command \verb</a>
<br />     2.13. <a href="#uid1053">Expandable tokens</a>
<br /><b>3. <a href="#cid3">Mathematics</a></b>
<br />     3.1. <a href="#uid1175">Introduction</a>
<br />     3.2. <a href="#uid1181">The basic objects</a>
<br />     3.3. <a href="#uid1542">Parsing a math formula</a>
<br />     3.4. <a href="#uid1613">Translation of arrays</a>
<br />     3.5. <a href="#uid1615">Trivial math</a>
<br />     3.6. <a href="#uid1621">Conversion to <span class="sansserif">XML</span></a>
<br />     3.7. <a href="#uid1688">Final math mode hacks</a>
<br />     3.8. <a href="#uid1689">Extensions</a>
<br /><b>4. <a href="#cid4">Translating a bibliography</a></b>
<br />     4.1. <a href="#uid1706">Introduction</a>
<br />     4.2. <a href="#uid1717">Citing a document</a>
<br />     4.3. <a href="#uid1740">Using <i>Tralics</i> instead of BibTeX</a>
<br />     4.4. <a href="#uid1825">The format of a name</a>
<br />     4.5. <a href="#uid1828">Commands for the bbl</a>
<br />     4.6. <a href="#uid1858">Other commands</a>
<br /><b>5. <a href="#cid5">Other commands</a></b>
<br />     5.1. <a href="#uid1866">Character encoding</a>
<br />     5.2. <a href="#uid1872">New encoding scheme</a>
<br />     5.3. <a href="#uid1879">Changing the input encoding</a>
<br />     5.4. <a href="#uid1885">Characters and Accents</a>
<br />     5.5. <a href="#uid1942">Verbatim material</a>
<br />     5.6. <a href="#uid1962">Case change</a>
<br />     5.7. <a href="#uid1968">Simple commands</a>
<br />     5.8. <a href="#uid2342">The fp package</a>
<br />          5.8.1. <a href="#uid2343">Introduction</a>
<br />          5.8.2. <a href="#uid2347">The list of all commands</a>
<br />          5.8.3. <a href="#uid2428">Alternate syntax</a>
<br />     5.9. <a href="#uid2431">Action before translation</a>
<br />     5.10. <a href="#uid2444">Classes and packages</a>
<br />     5.11. <a href="#uid2480">Expandable commands</a>
<br />     5.12. <a href="#uid2570">Other expandable commands</a>
<br />     5.13. <a href="#uid2667">Other non-expandable commands</a>
<br />     5.14. <a href="#uid2931">Special commands</a>
<br />     5.15. <a href="#uid2933">Trees</a>
<br />     5.16. <a href="#uid2958">Linguistic macros</a>
<br />     5.17. <a href="#uid2968">Special parsing rules</a>
<br /><b>6. <a href="#cid6">Running Tralics</a></b>
<br />     6.1. <a href="#uid2987">Introduction</a>
<br />     6.2. <a href="#uid2988">The command line arguments</a>
<br />     6.3. <a href="#uid3109">Configuration files</a>
<br />          6.3.1. <a href="#uid3110">The standard configuration file</a>
<br />          6.3.2. <a href="#uid3111">The old configuration file</a>
<br />          6.3.3. <a href="#uid3122">The ra.tcf file</a>
<br />          6.3.4. <a href="#uid3125">The RR.tcf file</a>
<br />          6.3.5. <a href="#uid3126">The RR.plt file</a>
<br />          6.3.6. <a href="#uid3127">Sample files</a>
<br />     6.4. <a href="#uid3128">The action before translation</a>
<br />          6.4.1. <a href="#uid3129">Files and Paths</a>
<br />          6.4.2. <a href="#uid3130">Finding the configuration</a>
<br />          6.4.3. <a href="#uid3131">Old behaviour</a>
<br />          6.4.4. <a href="#uid3145">Preparing the translation</a>
<br />     6.5. <a href="#uid3146">Translating the Raweb</a>
<br />     6.6. <a href="#uid3206">Tracing commands</a>
<br />     6.7. <a href="#uid3226">Pictures and friends</a>
<br />     6.8. <a href="#uid3299">The title page</a>
<br />     6.9. <a href="#uid3319">Array and Tables</a>
<br />          6.9.1. <a href="#uid3325">The tabular environment </a>
<br />          6.9.2. <a href="#uid3326">Interpreting the preamble</a>
<br />          6.9.3. <a href="#uid3330">New column types</a>
<br />          6.9.4. <a href="#uid3332">Another example</a>
<br />     6.10. <a href="#uid3353">Actions declared in the configuration file</a>
<br />     6.11. <a href="#uid3748">Trace of titlepage</a>
<br />     6.12. <a href="#uid3749">Extensions</a>
<br />     6.13. <a href="#uid3817">Bootstrap code</a>
<br />     6.14. <a href="#uid3954">Standard packages</a>
<br />     6.15. <a href="#uid3955">Images</a>
<br />     6.16. <a href="#uid3958">The puzzle</a>
<br /><a href="#bibliography"><b>Bibliography</b></a>
<br /><a href="#index1"><b>Index</b></a>
</p><h1 id="index1">Index</h1>
<div class="idx1"><samp>\!</samp>: <a href="#uid877">&#10043;</a>, <a href="#uid1240">&#10043;</a>, <a href="#uid2051">&#10043;</a>.</div>

<div class="idx1"><samp>\"</samp>: <a href="#uid1898">&#10043;</a>.</div>

<div class="idx1"><samp>\´</samp>: <a href="#uid1894">&#10043;</a>.</div>

<div class="idx1"><samp>(</samp>: <a href="#uid1206">&#10043;</a>.</div>

<div class="idx1"><samp>\(</samp>: <a href="#uid1179">&#10043;</a>, <a href="#uid2506">&#10043;</a>.</div>

<div class="idx1"><samp>\)</samp>: <a href="#uid1179">&#10043;</a>, <a href="#uid2507">&#10043;</a>.</div>

<div class="idx1"><samp>)</samp>: <a href="#uid1207">&#10043;</a>.</div>

<div class="idx1"><samp>\,</samp>: <a href="#uid1241">&#10043;</a>, <a href="#uid2053">&#10043;</a>.</div>

<div class="idx1"><samp>\-</samp>: <a href="#uid1972">&#10043;</a>.</div>

<div class="idx1"><samp>\.</samp>: <a href="#uid1912">&#10043;</a>.</div>

<div class="idx1"><samp>.</samp>: <a href="#uid1205">&#10043;</a>.</div>

<div class="idx1"><samp>\/</samp>: <a href="#uid2886">&#10043;</a>.</div>

<div class="idx1"><samp>\:</samp>: <a href="#uid874">&#10043;</a>, <a href="#uid1250">&#10043;</a>.</div>

<div class="idx1"><samp>\;</samp>: <a href="#uid876">&#10043;</a>, <a href="#uid1249">&#10043;</a>.</div>

<div class="idx1"><samp>&lt;</samp>: <a href="#uid1203">&#10043;</a>.</div>

<div class="idx1"><samp>\=</samp>: <a href="#uid1914">&#10043;</a>.</div>

<div class="idx1"><samp>\&gt;</samp>: <a href="#uid875">&#10043;</a>, <a href="#uid1251">&#10043;</a>.</div>

<div class="idx1"><samp>&gt;</samp>: <a href="#uid1204">&#10043;</a>.</div>

<div class="idx1"><samp>\@</samp>: <a href="#uid2885">&#10043;</a>.</div>

<div class="idx1"><samp>[</samp>: <a href="#uid1208">&#10043;</a>.</div>

<div class="idx1"><samp>\[</samp>: <a href="#uid1179">&#10043;</a>, <a href="#uid2504">&#10043;</a>, <a href="#uid2505">&#10043;</a>.</div>

<div class="idx1"><samp>\#</samp>: <a href="#uid1970">&#10043;</a>.</div>

<div class="idx1"><samp>#</samp>: <a href="#uid130">&#10043;</a>, <a href="#uid930">&#10043;</a>.</div>

<div class="idx1"><samp>$</samp>: <a href="#uid39">&#10043;</a>, <a href="#uid1178">&#10043;</a>.</div>

<div class="idx1"><samp>%</samp>: <a href="#uid933">&#10043;</a>, <a href="#uid1040">&#10043;</a>.</div>

<div class="idx1"><samp>\%</samp>: <a href="#uid1238">&#10043;</a>, <a href="#uid2057">&#10043;</a>.</div>

<div class="idx1"><samp>\&amp;</samp>: <a href="#uid1239">&#10043;</a>, <a href="#uid2059">&#10043;</a>.</div>

<div class="idx1"><samp>\\</samp>: <a href="#uid869">&#10043;</a>.</div>

<div class="idx1"><samp>\_</samp>: <a href="#uid1248">&#10043;</a>, <a href="#uid2061">&#10043;</a>.</div>

<div class="idx1"><samp>\^</samp>: <a href="#uid1892">&#10043;</a>.</div>

<div class="idx1"><samp>^</samp>: <a href="#uid135">&#10043;</a>, <a href="#uid1869">&#10043;</a>.</div>

<div class="idx1"><samp>\$</samp>: <a href="#uid1237">&#10043;</a>, <a href="#uid2055">&#10043;</a>.</div>

<div class="idx1"><samp>|</samp>: <a href="#uid1210">&#10043;</a>.</div>

<div class="idx1"><samp>\|</samp>: <a href="#uid1489">&#10043;</a>.</div>

<div class="idx1"><samp>~</samp>: <a href="#uid879">&#10043;</a>.</div>

<div class="idx1"><samp>\~</samp>: <a href="#uid1906">&#10043;</a>.</div>

<div class="idx1"><samp>\{</samp>: <a href="#uid1211">&#10043;</a>, <a href="#uid1242">&#10043;</a>, <a href="#uid2083">&#10043;</a>.</div>

<div class="idx1"><samp>\}</samp>: <a href="#uid1212">&#10043;</a>, <a href="#uid1243">&#10043;</a>, <a href="#uid2081">&#10043;</a>.</div>

<div class="idx1"><samp>]</samp>: <a href="#uid1209">&#10043;</a>.</div>

<div class="idx1"><samp>\]</samp>: <a href="#uid1179">&#10043;</a>.</div>

<div class="idx1"><samp>\`</samp>: <a href="#uid1896">&#10043;</a>.</div>

<div class="idx1"><samp>\a</samp>: <a href="#uid1109">&#10043;</a>, <a href="#uid1887">&#10043;</a>, <a href="#uid2482">&#10043;</a>.</div>

<div class="idx1"><samp>\aa</samp>: <a href="#uid1975">&#10043;</a>.</div>

<div class="idx1"><samp>\AA</samp>: <a href="#uid1126">&#10043;</a>, <a href="#uid1974">&#10043;</a>.</div>

<div class="idx1"><samp>\abarnodeconnect</samp>: <a href="#uid2945">&#10043;</a>.</div>

<div class="idx1"><samp>\above</samp>: <a href="#uid1623">&#10043;</a>.</div>

<div class="idx1"><samp>\abovedisplayshortskip</samp>: <a href="#uid294">&#10043;</a>.</div>

<div class="idx1"><samp>\abovedisplayskip</samp>: <a href="#uid290">&#10043;</a>.</div>

<div class="idx1"><samp>\abovewithdelims</samp>: <a href="#uid1623">&#10043;</a>.</div>

<div class="idx1"><samp>\accent</samp>: <a href="#uid58">&#10043;</a>, <a href="#uid1886">&#10043;</a>.</div>

<div class="idx1"><samp>\active</samp>: <a href="#uid31">&#10043;</a>, <a href="#uid187">&#10043;</a>.</div>

<div class="idx1"><samp>\acute</samp>: <a href="#uid1509">&#10043;</a>.</div>

<div class="idx1"><samp>\addattributestodocument</samp>: <a href="#uid2790">&#10043;</a>.</div>

<div class="idx1"><samp>\AddAttToCurrent</samp>: <a href="#uid265">&#10043;</a>, <a href="#uid2786">&#10043;</a>.</div>

<div class="idx1"><samp>\AddAttToLast</samp>: <a href="#uid265">&#10043;</a>, <a href="#uid2788">&#10043;</a>.</div>

<div class="idx1"><samp>\@addnl</samp>: <a href="#uid3938">&#10043;</a>.</div>

<div class="idx1">address (bibtex field): <a href="#uid1760">&#10043;</a>.</div>

<div class="idx1"><samp>\addto@hook</samp>: <a href="#uid3940">&#10043;</a>.</div>

<div class="idx1"><samp>\addtocounter</samp>: <a href="#uid784">&#10043;</a>, <a href="#uid1152">&#10043;</a>, <a href="#uid2589">&#10043;</a>.</div>

<div class="idx1"><samp>\addtolength</samp>: <a href="#uid805">&#10043;</a>, <a href="#uid1157">&#10043;</a>, <a href="#uid2585">&#10043;</a>.</div>

<div class="idx1"><samp>\@addtoreset</samp>: <a href="#uid812">&#10043;</a>.</div>

<div class="idx1"><samp>\adjdemerits</samp>: <a href="#uid410">&#10043;</a>.</div>

<div class="idx1"><samp>\advance</samp>: <a href="#uid273">&#10043;</a>, <a href="#uid800">&#10043;</a>, <a href="#uid942">&#10043;</a>.</div>

<div class="idx1"><samp>\AE</samp>: <a href="#uid1966">&#10043;</a>, <a href="#uid1977">&#10043;</a>.</div>

<div class="idx1"><samp>\ae</samp>: <a href="#uid1966">&#10043;</a>, <a href="#uid1978">&#10043;</a>.</div>

<div class="idx1">affiliation_vals: <a href="#uid3370">&#10043;</a>.</div>

<div class="idx1"><samp>\afterassignment</samp>: <a href="#uid257">&#10043;</a>.</div>

<div class="idx1"><samp>\@afterelsefi</samp>: <a href="#uid1033">&#10043;</a>, <a href="#uid1144">&#10043;</a>, <a href="#uid2553">&#10043;</a>.</div>

<div class="idx1"><samp>\@afterfi</samp>: <a href="#uid1032">&#10043;</a>, <a href="#uid1144">&#10043;</a>, <a href="#uid2553">&#10043;</a>.</div>

<div class="idx1"><samp>\aftergroup</samp>: <a href="#uid1046">&#10043;</a>, <a href="#uid1051">&#10043;</a>.</div>

<div class="idx1"><samp>\aleph</samp>: <a href="#uid1348">&#10043;</a>.</div>

<div class="idx1"><samp>align</samp>: <a href="#uid1183">&#10043;</a>.</div>

<div class="idx1"><samp>aligned</samp>: <a href="#uid1184">&#10043;</a>.</div>

<div class="idx1">all (tralics option): <a href="#uid2990">&#10043;</a>.</div>

<div class="idx1"><samp>\allowbreak</samp>: <a href="#uid2878">&#10043;</a>.</div>

<div class="idx1"><samp>\Alph</samp>: <a href="#uid792">&#10043;</a>, <a href="#uid1163">&#10043;</a>.</div>

<div class="idx1"><samp>\@alph</samp>: <a href="#uid797">&#10043;</a>, <a href="#uid1165">&#10043;</a>.</div>

<div class="idx1"><samp>\alph</samp>: <a href="#uid791">&#10043;</a>, <a href="#uid1162">&#10043;</a>.</div>

<div class="idx1"><samp>\@Alph</samp>: <a href="#uid798">&#10043;</a>, <a href="#uid1166">&#10043;</a>.</div>

<div class="idx1"><samp>\alpha</samp>: <a href="#uid1252">&#10043;</a>.</div>

<div class="idx1">alternate_item: <a href="#uid3449">&#10043;</a>.</div>

<div class="idx1"><samp>\amalg</samp>: <a href="#uid1389">&#10043;</a>.</div>

<div class="idx1"><samp>\anchor</samp>: <a href="#uid2727">&#10043;</a>, <a href="#uid3952">&#10043;</a>.</div>

<div class="idx1"><samp>\AND</samp>: <a href="#uid2620">&#10043;</a>.</div>

<div class="idx1"><samp>\and</samp>: <a href="#uid2617">&#10043;</a>.</div>

<div class="idx1"><samp>\angle</samp>: <a href="#uid1306">&#10043;</a>.</div>

<div class="idx1"><samp>\anodeconnect</samp>: <a href="#uid2941">&#10043;</a>.</div>

<div class="idx1"><samp>\anodecurve</samp>: <a href="#uid2949">&#10043;</a>.</div>

<div class="idx1"><samp>\aparaitre</samp>: <a href="#uid2753">&#10043;</a>.</div>

<div class="idx1"><samp>\approx</samp>: <a href="#uid1436">&#10043;</a>.</div>

<div class="idx1">apr (bibtex field): <a href="#uid1757">&#10043;</a>.</div>

<div class="idx1"><samp>\@arabic</samp>: <a href="#uid794">&#10043;</a>, <a href="#uid1064">&#10043;</a>, <a href="#uid2523">&#10043;</a>.</div>

<div class="idx1"><samp>\arabic</samp>: <a href="#uid788">&#10043;</a>, <a href="#uid1159">&#10043;</a>.</div>

<div class="idx1"><samp>\arc</samp>: <a href="#uid3286">&#10043;</a>, <a href="#uid3668">&#10043;</a>, <a href="#uid3740">&#10043;</a>.</div>

<div class="idx1"><samp>\arccos</samp>: <a href="#uid1327">&#10043;</a>.</div>

<div class="idx1"><samp>\arcsin</samp>: <a href="#uid1328">&#10043;</a>.</div>

<div class="idx1"><samp>\arctan</samp>: <a href="#uid1329">&#10043;</a>.</div>

<div class="idx1"><samp>\arg</samp>: <a href="#uid1330">&#10043;</a>.</div>

<div class="idx1"><samp>array</samp>: <a href="#uid1195">&#10043;</a>, <a href="#uid3322">&#10043;</a>.</div>

<div class="idx1"><samp>\arraycolsep</samp>: <a href="#uid677">&#10043;</a>.</div>

<div class="idx1"><samp>\arrayrulewidth</samp>: <a href="#uid681">&#10043;</a>.</div>

<div class="idx1"><samp>\arraystretch</samp>: <a href="#uid3878">&#10043;</a>.</div>

<div class="idx1">article (bibtex entry type): <a href="#uid1741">&#10043;</a>.</div>

<div class="idx1"><samp>\ast</samp>: <a href="#uid1407">&#10043;</a>.</div>

<div class="idx1"><samp>\asymp</samp>: <a href="#uid1465">&#10043;</a>.</div>

<div class="idx1"><samp>\AtBeginDocument</samp>: <a href="#uid2432">&#10043;</a>.</div>

<div class="idx1"><samp>\AtEndDocument</samp>: <a href="#uid180">&#10043;</a>, <a href="#uid2432">&#10043;</a>.</div>

<div class="idx1"><samp>\AtEndOfClass</samp>: <a href="#uid2456">&#10043;</a>.</div>

<div class="idx1"><samp>\AtEndOfPackage</samp>: <a href="#uid2455">&#10043;</a>.</div>

<div class="idx1"><samp>\atop</samp>: <a href="#uid1623">&#10043;</a>.</div>

<div class="idx1"><samp>\atopwithdelims</samp>: <a href="#uid1623">&#10043;</a>.</div>

<div class="idx1">att_affiliation: <a href="#uid3625">&#10043;</a>.</div>

<div class="idx1">att_angle: <a href="#uid3571">&#10043;</a>.</div>

<div class="idx1">att_box_pos: <a href="#uid3552">&#10043;</a>.</div>

<div class="idx1">att_box_scale: <a href="#uid3496">&#10043;</a>.</div>

<div class="idx1">att_box_width: <a href="#uid3494">&#10043;</a>.</div>

<div class="idx1">att_boxed: <a href="#uid3488">&#10043;</a>.</div>

<div class="idx1">att_cell_bottomborder: <a href="#uid3597">&#10043;</a>.</div>

<div class="idx1">att_cell_center: <a href="#uid3609">&#10043;</a>.</div>

<div class="idx1">att_cell_left: <a href="#uid3607">&#10043;</a>.</div>

<div class="idx1">att_cell_leftborder: <a href="#uid3598">&#10043;</a>.</div>

<div class="idx1">att_cell_right: <a href="#uid3608">&#10043;</a>.</div>

<div class="idx1">att_cell_rightborder: <a href="#uid3599">&#10043;</a>.</div>

<div class="idx1">att_cell_topborder: <a href="#uid3600">&#10043;</a>.</div>

<div class="idx1">att_centering: <a href="#uid3589">&#10043;</a>.</div>

<div class="idx1">att_clip: <a href="#uid3573">&#10043;</a>.</div>

<div class="idx1">att_cols: <a href="#uid3605">&#10043;</a>.</div>

<div class="idx1">att_curve_nbpts: <a href="#uid3739">&#10043;</a>.</div>

<div class="idx1">att_dx: <a href="#uid3726">&#10043;</a>.</div>

<div class="idx1">att_dy: <a href="#uid3727">&#10043;</a>.</div>

<div class="idx1">att_encap: <a href="#uid3656">&#10043;</a>.</div>

<div class="idx1">att_fbox_rend: <a href="#uid3579">&#10043;</a>.</div>

<div class="idx1">att_file: <a href="#uid3570">&#10043;</a>.</div>

<div class="idx1">att_flush_left: <a href="#uid3586">&#10043;</a>.</div>

<div class="idx1">att_flush_right: <a href="#uid3585">&#10043;</a>.</div>

<div class="idx1">att_foot_position: <a href="#uid3398">&#10043;</a>.</div>

<div class="idx1">att_framed: <a href="#uid3491">&#10043;</a>.</div>

<div class="idx1">att_full: <a href="#uid3554">&#10043;</a>.</div>

<div class="idx1">att_full_first: <a href="#uid3616">&#10043;</a>.</div>

<div class="idx1">att_gloss_type: <a href="#uid3463">&#10043;</a>.</div>

<div class="idx1">att_halign: <a href="#uid3606">&#10043;</a>.</div>

<div class="idx1">att_HDR: <a href="#uid3627">&#10043;</a>.</div>

<div class="idx1">att_height: <a href="#uid3575">&#10043;</a>.</div>

<div class="idx1">att_inner_pos: <a href="#uid3563">&#10043;</a>.</div>

<div class="idx1">att_junior: <a href="#uid3619">&#10043;</a>.</div>

<div class="idx1">att_level: <a href="#uid3654">&#10043;</a>.</div>

<div class="idx1">att_minipage_width: <a href="#uid3565">&#10043;</a>.</div>

<div class="idx1">att_noindent: <a href="#uid3581">&#10043;</a>.</div>

<div class="idx1">att_nom: <a href="#uid3617">&#10043;</a>.</div>

<div class="idx1">att_nonumber: <a href="#uid3467">&#10043;</a>.</div>

<div class="idx1">att_page: <a href="#uid3641">&#10043;</a>.</div>

<div class="idx1">att_particule: <a href="#uid3618">&#10043;</a>.</div>

<div class="idx1">att_place: <a href="#uid3397">&#10043;</a>.</div>

<div class="idx1">att_pos: <a href="#uid3559">&#10043;</a>.</div>

<div class="idx1">att_prenom: <a href="#uid3615">&#10043;</a>.</div>

<div class="idx1">att_profession: <a href="#uid3626">&#10043;</a>.</div>

<div class="idx1">att_quotation: <a href="#uid3587">&#10043;</a>.</div>

<div class="idx1">att_quote: <a href="#uid3588">&#10043;</a>.</div>

<div class="idx1">att_rend: <a href="#uid3578">&#10043;</a>.</div>

<div class="idx1">att_repeat: <a href="#uid3728">&#10043;</a>.</div>

<div class="idx1">att_rotate_angle: <a href="#uid3510">&#10043;</a>.</div>

<div class="idx1">att_row_spaceafter: <a href="#uid3602">&#10043;</a>.</div>

<div class="idx1">att_row_spacebefore: <a href="#uid3603">&#10043;</a>.</div>

<div class="idx1">att_scale: <a href="#uid3572">&#10043;</a>.</div>

<div class="idx1">att_size: <a href="#uid3725">&#10043;</a>.</div>

<div class="idx1">att_space_before: <a href="#uid3583">&#10043;</a>.</div>

<div class="idx1">att_table_width: <a href="#uid3557">&#10043;</a>.</div>

<div class="idx1">att_topic_num: <a href="#uid3118">&#10043;</a>, <a href="#uid3524">&#10043;</a>.</div>

<div class="idx1">att_unit_length: <a href="#uid3746">&#10043;</a>.</div>

<div class="idx1">att_user_list: <a href="#uid3457">&#10043;</a>.</div>

<div class="idx1">att_vpos: <a href="#uid3561">&#10043;</a>.</div>

<div class="idx1">att_width: <a href="#uid3574">&#10043;</a>.</div>

<div class="idx1">att_xdir: <a href="#uid3723">&#10043;</a>.</div>

<div class="idx1">att_xpos: <a href="#uid3721">&#10043;</a>.</div>

<div class="idx1">att_xscale: <a href="#uid3730">&#10043;</a>.</div>

<div class="idx1">att_xscaley: <a href="#uid3731">&#10043;</a>.</div>

<div class="idx1">att_ydir: <a href="#uid3724">&#10043;</a>.</div>

<div class="idx1">att_ypos: <a href="#uid3722">&#10043;</a>.</div>

<div class="idx1">att_yscale: <a href="#uid3732">&#10043;</a>.</div>

<div class="idx1">att_yscalex: <a href="#uid3733">&#10043;</a>.</div>

<div class="idx1">aug (bibtex field): <a href="#uid1757">&#10043;</a>.</div>

<div class="idx1">author (bibtex field): <a href="#uid1761">&#10043;</a>.</div>

<div class="idx1"><samp>\b</samp>: <a href="#uid1113">&#10043;</a>, <a href="#uid1918">&#10043;</a>.</div>

<div class="idx1">babel (package): <a href="#uid2439">&#10043;</a>.</div>

<div class="idx1"><samp>\backmatter</samp>: <a href="#uid2751">&#10043;</a>.</div>

<div class="idx1"><samp>\backslash</samp>: <a href="#uid1349">&#10043;</a>.</div>

<div class="idx1"><samp>\badness</samp>: <a href="#uid537">&#10043;</a>.</div>

<div class="idx1"><samp>\bar</samp>: <a href="#uid1517">&#10043;</a>.</div>

<div class="idx1"><samp>\barnodeconnect</samp>: <a href="#uid2943">&#10043;</a>.</div>

<div class="idx1"><samp>\baselineskip</samp>: <a href="#uid286">&#10043;</a>.</div>

<div class="idx1"><samp>\baselinestretch</samp>: <a href="#uid3877">&#10043;</a>.</div>

<div class="idx1"><samp>\batchmode</samp>: <a href="#uid2850">&#10043;</a>.</div>

<div class="idx1"><samp>\bauthors</samp>: <a href="#uid1817">&#10043;</a>, <a href="#uid1853">&#10043;</a>.</div>

<div class="idx1"><samp>\beditors</samp>: <a href="#uid1818">&#10043;</a>, <a href="#uid1854">&#10043;</a>.</div>

<div class="idx1"><samp>\begin</samp>: <a href="#uid153">&#10043;</a>.</div>

<div class="idx1"><samp>\begingroup</samp>: <a href="#uid156">&#10043;</a>, <a href="#uid166">&#10043;</a>.</div>

<div class="idx1"><samp>\beginL</samp>: <a href="#uid3813">&#10043;</a>.</div>

<div class="idx1"><samp>\beginR</samp>: <a href="#uid3814">&#10043;</a>.</div>

<div class="idx1"><samp>\@begintheorem</samp>: <a href="#uid2633">&#10043;</a>.</div>

<div class="idx1"><samp>\belowdisplayshortskip</samp>: <a href="#uid296">&#10043;</a>.</div>

<div class="idx1"><samp>\belowdisplayskip</samp>: <a href="#uid292">&#10043;</a>.</div>

<div class="idx1"><samp>\beta</samp>: <a href="#uid1253">&#10043;</a>.</div>

<div class="idx1"><samp>\bezier</samp>: <a href="#uid3257">&#10043;</a>, <a href="#uid3662">&#10043;</a>.</div>

<div class="idx1"><samp>\bf</samp>: <a href="#uid18">&#10043;</a>, <a href="#uid838">&#10043;</a>, <a href="#uid1560">&#10043;</a>.</div>

<div class="idx1"><samp>\bfseries</samp>: <a href="#uid835">&#10043;</a>, <a href="#uid3433">&#10043;</a>.</div>

<div class="idx1"><samp>\bgroup</samp>: <a href="#uid197">&#10043;</a>, <a href="#uid1041">&#10043;</a>.</div>

<div class="idx1"><samp>\bibitem</samp>: <a href="#uid1739">&#10043;</a>.</div>

<div class="idx1"><samp>\bibliography</samp>: <a href="#uid1859">&#10043;</a>.</div>

<div class="idx1"><samp>\bibliographystyle</samp>: <a href="#uid1863">&#10043;</a>.</div>

<div class="idx1">bibtex_extensions: <a href="#uid3388">&#10043;</a>.</div>

<div class="idx1">bibtex_fields: <a href="#uid3386">&#10043;</a>.</div>

<div class="idx1"><samp>\big</samp>: <a href="#uid109">&#10043;</a>, <a href="#uid1658">&#10043;</a>.</div>

<div class="idx1"><samp>\Big</samp>: <a href="#uid1666">&#10043;</a>.</div>

<div class="idx1"><samp>\bigbreak</samp>: <a href="#uid918">&#10043;</a>.</div>

<div class="idx1"><samp>\bigcap</samp>: <a href="#uid1363">&#10043;</a>.</div>

<div class="idx1"><samp>\bigcirc</samp>: <a href="#uid1404">&#10043;</a>.</div>

<div class="idx1"><samp>\bigcircle</samp>: <a href="#uid3288">&#10043;</a>, <a href="#uid3701">&#10043;</a>, <a href="#uid3741">&#10043;</a>.</div>

<div class="idx1"><samp>\bigcup</samp>: <a href="#uid1364">&#10043;</a>.</div>

<div class="idx1"><samp>\bigg</samp>: <a href="#uid1662">&#10043;</a>.</div>

<div class="idx1"><samp>\Bigg</samp>: <a href="#uid1670">&#10043;</a>.</div>

<div class="idx1"><samp>\biggl</samp>: <a href="#uid1663">&#10043;</a>.</div>

<div class="idx1"><samp>\Biggl</samp>: <a href="#uid1671">&#10043;</a>.</div>

<div class="idx1"><samp>\biggm</samp>: <a href="#uid1664">&#10043;</a>.</div>

<div class="idx1"><samp>\Biggm</samp>: <a href="#uid1672">&#10043;</a>.</div>

<div class="idx1"><samp>\biggr</samp>: <a href="#uid1665">&#10043;</a>.</div>

<div class="idx1"><samp>\Biggr</samp>: <a href="#uid1673">&#10043;</a>.</div>

<div class="idx1"><samp>\bigl</samp>: <a href="#uid1659">&#10043;</a>.</div>

<div class="idx1"><samp>\Bigl</samp>: <a href="#uid1667">&#10043;</a>.</div>

<div class="idx1"><samp>\bigm</samp>: <a href="#uid1660">&#10043;</a>.</div>

<div class="idx1"><samp>\Bigm</samp>: <a href="#uid1668">&#10043;</a>.</div>

<div class="idx1"><samp>\bigodot</samp>: <a href="#uid1370">&#10043;</a>.</div>

<div class="idx1"><samp>\bigoplus</samp>: <a href="#uid1369">&#10043;</a>.</div>

<div class="idx1"><samp>\bigotimes</samp>: <a href="#uid1368">&#10043;</a>.</div>

<div class="idx1"><samp>\Bigr</samp>: <a href="#uid1669">&#10043;</a>.</div>

<div class="idx1"><samp>\bigr</samp>: <a href="#uid1661">&#10043;</a>.</div>

<div class="idx1"><samp>\bigskip</samp>: <a href="#uid893">&#10043;</a>.</div>

<div class="idx1"><samp>\bigskipamount</samp>: <a href="#uid331">&#10043;</a>.</div>

<div class="idx1"><samp>\bigsqcup</samp>: <a href="#uid1372">&#10043;</a>.</div>

<div class="idx1"><samp>\bigtriangledown</samp>: <a href="#uid1377">&#10043;</a>.</div>

<div class="idx1"><samp>\bigtriangleup</samp>: <a href="#uid1376">&#10043;</a>.</div>

<div class="idx1"><samp>\biguplus</samp>: <a href="#uid1362">&#10043;</a>.</div>

<div class="idx1"><samp>\bigvee</samp>: <a href="#uid1360">&#10043;</a>.</div>

<div class="idx1"><samp>\bigwedge</samp>: <a href="#uid1361">&#10043;</a>.</div>

<div class="idx1"><samp>\bindnasrepma</samp>: <a href="#uid1445">&#10043;</a>.</div>

<div class="idx1"><samp>\binom</samp>: <a href="#uid1586">&#10043;</a>, <a href="#uid1625">&#10043;</a>.</div>

<div class="idx1"><samp>\binoppenalty</samp>: <a href="#uid396">&#10043;</a>.</div>

<div class="idx1"><samp>\bm</samp>: <a href="#uid86">&#10043;</a>.</div>

<div class="idx1"><samp>bmatrix</samp>: <a href="#uid1198">&#10043;</a>.</div>

<div class="idx1"><samp>Bmatrix</samp>: <a href="#uid1199">&#10043;</a>.</div>

<div class="idx1"><samp>\bmod</samp>: <a href="#uid3926">&#10043;</a>.</div>

<div class="idx1"><samp>\boldmath</samp>: <a href="#uid82">&#10043;</a>.</div>

<div class="idx1">book (bibtex entry type): <a href="#uid1742">&#10043;</a>.</div>

<div class="idx1">booklet (bibtex entry type): <a href="#uid1743">&#10043;</a>.</div>

<div class="idx1">booktitle (bibtex field): <a href="#uid1762">&#10043;</a>.</div>

<div class="idx1"><samp>\boolean</samp>: <a href="#uid2606">&#10043;</a>.</div>

<div class="idx1">bootstrap code: <a href="#uid3953">&#10043;</a>.</div>

<div class="idx1"><samp>\bot</samp>: <a href="#uid1305">&#10043;</a>.</div>

<div class="idx1"><samp>\botmark</samp>: <a href="#uid1104">&#10043;</a>, <a href="#uid2489">&#10043;</a>.</div>

<div class="idx1"><samp>\botmarks</samp>: <a href="#uid2495">&#10043;</a>, <a href="#uid3808">&#10043;</a>.</div>

<div class="idx1"><samp>\bottom</samp>: <a href="#uid1304">&#10043;</a>.</div>

<div class="idx1"><samp>\bottomfraction</samp>: <a href="#uid3850">&#10043;</a>.</div>

<div class="idx1">bottomnumber (counter): <a href="#uid597">&#10043;</a>.</div>

<div class="idx1"><samp>\bowtie</samp>: <a href="#uid1480">&#10043;</a>.</div>

<div class="idx1"><samp>\box</samp>: <a href="#uid735">&#10043;</a>.</div>

<div class="idx1"><samp>\Box</samp>: <a href="#uid1350">&#10043;</a>.</div>

<div class="idx1"><samp>\boxmaxdepth</samp>: <a href="#uid617">&#10043;</a>.</div>

<div class="idx1">bp (unit): <a href="#uid767">&#10043;</a>.</div>

<div class="idx1"><samp>\bpers</samp>: <a href="#uid1796">&#10043;</a>, <a href="#uid1855">&#10043;</a>, <a href="#uid3621">&#10043;</a>.</div>

<div class="idx1"><samp>\break</samp>: <a href="#uid2883">&#10043;</a>.</div>

<div class="idx1"><samp>\breve</samp>: <a href="#uid1518">&#10043;</a>.</div>

<div class="idx1"><samp>\brokenpenalty</samp>: <a href="#uid394">&#10043;</a>.</div>

<div class="idx1"><samp>\bullet</samp>: <a href="#uid1392">&#10043;</a>.</div>

<div class="idx1"><samp>\bye</samp>: <a href="#uid3108">&#10043;</a>.</div>

<div class="idx1"><samp>\C</samp>: <a href="#uid1116">&#10043;</a>, <a href="#uid1924">&#10043;</a>.</div>

<div class="idx1"><samp>\c</samp>: <a href="#uid1118">&#10043;</a>, <a href="#uid1900">&#10043;</a>.</div>

<div class="idx1"><samp>\cal</samp>: <a href="#uid1547">&#10043;</a>.</div>

<div class="idx1">calc: <a href="#uid807">&#10043;</a>.</div>

<div class="idx1"><samp>\calc</samp>: <a href="#uid2599">&#10043;</a>.</div>

<div class="idx1">calc (package): <a href="#uid2436">&#10043;</a>.</div>

<div class="idx1"><samp>\cap</samp>: <a href="#uid1382">&#10043;</a>.</div>

<div class="idx1"><samp>\caps</samp>: <a href="#uid1940">&#10043;</a>.</div>

<div class="idx1"><samp>\caption</samp>: <a href="#uid2721">&#10043;</a>.</div>

<div class="idx1"><samp>\@car</samp>: <a href="#uid1131">&#10043;</a>, <a href="#uid2560">&#10043;</a>.</div>

<div class="idx1"><samp>\@carcube</samp>: <a href="#uid3916">&#10043;</a>.</div>

<div class="idx1"><samp>cases</samp>: <a href="#uid1202">&#10043;</a>.</div>

<div class="idx1"><samp>\catcode</samp>: <a href="#uid35">&#10043;</a>, <a href="#uid745">&#10043;</a>, <a href="#uid1873">&#10043;</a>.</div>

<div class="idx1"><samp>catperso</samp>: <a href="#uid3169">&#10043;</a>, <a href="#uid3192">&#10043;</a>.</div>

<div class="idx1">catperso_vals: <a href="#uid3373">&#10043;</a>.</div>

<div class="idx1">cc (unit): <a href="#uid767">&#10043;</a>.</div>

<div class="idx1"><samp>\@cclv</samp>: <a href="#uid3825">&#10043;</a>.</div>

<div class="idx1"><samp>\@cclvi</samp>: <a href="#uid3826">&#10043;</a>.</div>

<div class="idx1"><samp>\cdot</samp>: <a href="#uid1406">&#10043;</a>.</div>

<div class="idx1"><samp>\cdots</samp>: <a href="#uid1484">&#10043;</a>.</div>

<div class="idx1"><samp>\@cdr</samp>: <a href="#uid1131">&#10043;</a>, <a href="#uid2560">&#10043;</a>.</div>

<div class="idx1"><samp>center</samp>: <a href="#uid2900">&#10043;</a>, <a href="#uid3590">&#10043;</a>.</div>

<div class="idx1"><samp>\centering</samp>: <a href="#uid2706">&#10043;</a>, <a href="#uid2897">&#10043;</a>, <a href="#uid3595">&#10043;</a>.</div>

<div class="idx1"><samp>\centerline</samp>: <a href="#uid2872">&#10043;</a>, <a href="#uid3680">&#10043;</a>.</div>

<div class="idx1"><samp>\cfoot</samp>: <a href="#uid2819">&#10043;</a>.</div>

<div class="idx1"><samp>\cgloss@gll</samp>: <a href="#uid2964">&#10043;</a>.</div>

<div class="idx1"><samp>\cgloss@glll</samp>: <a href="#uid2965">&#10043;</a>.</div>

<div class="idx1"><samp>\chapter</samp>: <a href="#uid2740">&#10043;</a>, <a href="#uid3480">&#10043;</a>.</div>

<div class="idx1">chapter (bibtex field): <a href="#uid1763">&#10043;</a>.</div>

<div class="idx1">chapter (counter): <a href="#uid584">&#10043;</a>.</div>

<div class="idx1"><samp>\chaptermark</samp>: <a href="#uid3930">&#10043;</a>.</div>

<div class="idx1"><samp>\char</samp>: <a href="#uid60">&#10043;</a>, <a href="#uid61">&#10043;</a>, <a href="#uid72">&#10043;</a>, <a href="#uid1870">&#10043;</a>.</div>

<div class="idx1"><samp>\chardef</samp>: <a href="#uid186">&#10043;</a>.</div>

<div class="idx1"><samp>\chead</samp>: <a href="#uid2818">&#10043;</a>.</div>

<div class="idx1"><samp>\check</samp>: <a href="#uid1519">&#10043;</a>.</div>

<div class="idx1">check (tralics option): <a href="#uid2992">&#10043;</a>.</div>

<div class="idx1"><samp>\CheckCommand</samp>: <a href="#uid150">&#10043;</a>.</div>

<div class="idx1">checkxml (raweb action): <a href="#uid3357">&#10043;</a>.</div>

<div class="idx1"><samp>\chi</samp>: <a href="#uid1273">&#10043;</a>.</div>

<div class="idx1"><samp>\choose</samp>: <a href="#uid1624">&#10043;</a>.</div>

<div class="idx1"><samp>\circ</samp>: <a href="#uid1403">&#10043;</a>.</div>

<div class="idx1"><samp>\circle</samp>: <a href="#uid3290">&#10043;</a>, <a href="#uid3555">&#10043;</a>, <a href="#uid3698">&#10043;</a>.</div>

<div class="idx1"><samp>\citation</samp>: <a href="#uid170">&#10043;</a>, <a href="#uid1795">&#10043;</a>, <a href="#uid1856">&#10043;</a>.</div>

<div class="idx1"><samp>\cite</samp>: <a href="#uid1707">&#10043;</a>, <a href="#uid1722">&#10043;</a>, <a href="#uid1725">&#10043;</a>.</div>

<div class="idx1"><samp>\cite@@type</samp>: <a href="#uid1733">&#10043;</a>.</div>

<div class="idx1"><samp>\cite@one</samp>: <a href="#uid1726">&#10043;</a>, <a href="#uid1731">&#10043;</a>.</div>

<div class="idx1"><samp>\cite@prenote</samp>: <a href="#uid1734">&#10043;</a>.</div>

<div class="idx1"><samp>\cite@type</samp>: <a href="#uid1733">&#10043;</a>.</div>

<div class="idx1"><samp>\citepunct</samp>: <a href="#uid1727">&#10043;</a>, <a href="#uid3887">&#10043;</a>.</div>

<div class="idx1"><samp>\cititem</samp>: <a href="#uid1852">&#10043;</a>.</div>

<div class="idx1"><samp>\ClassError</samp>: <a href="#uid2908">&#10043;</a>.</div>

<div class="idx1"><samp>\ClassErrorNoLine</samp>: <a href="#uid2909">&#10043;</a>.</div>

<div class="idx1"><samp>\ClassInfo</samp>: <a href="#uid2913">&#10043;</a>.</div>

<div class="idx1"><samp>\ClassWarning</samp>: <a href="#uid2916">&#10043;</a>.</div>

<div class="idx1"><samp>\ClassWarningNoLine</samp>: <a href="#uid2917">&#10043;</a>.</div>

<div class="idx1"><samp>\cleaders</samp>: <a href="#uid2771">&#10043;</a>.</div>

<div class="idx1"><samp>\cleardoublepage</samp>: <a href="#uid2877">&#10043;</a>.</div>

<div class="idx1"><samp>\clearpage</samp>: <a href="#uid2876">&#10043;</a>.</div>

<div class="idx1"><samp>\cline</samp>: <a href="#uid3336">&#10043;</a>.</div>

<div class="idx1"><samp>\closecurve</samp>: <a href="#uid3293">&#10043;</a>, <a href="#uid3707">&#10043;</a>, <a href="#uid3742">&#10043;</a>.</div>

<div class="idx1"><samp>\closein</samp>: <a href="#uid2641">&#10043;</a>.</div>

<div class="idx1"><samp>\closeout</samp>: <a href="#uid2651">&#10043;</a>.</div>

<div class="idx1"><samp>\clubpenalty</samp>: <a href="#uid388">&#10043;</a>.</div>

<div class="idx1"><samp>\clubsuit</samp>: <a href="#uid1344">&#10043;</a>.</div>

<div class="idx1"><samp>\cl@xxx</samp>: <a href="#uid778">&#10043;</a>.</div>

<div class="idx1">cm (unit): <a href="#uid767">&#10043;</a>.</div>

<div class="idx1"><samp>\columnsep</samp>: <a href="#uid709">&#10043;</a>.</div>

<div class="idx1"><samp>\columnseprule</samp>: <a href="#uid710">&#10043;</a>.</div>

<div class="idx1"><samp>\columnwidth</samp>: <a href="#uid697">&#10043;</a>.</div>

<div class="idx1"><samp>comment</samp>: <a href="#uid2893">&#10043;</a>.</div>

<div class="idx1">comment (bibtex keyword): <a href="#uid1755">&#10043;</a>.</div>

<div class="idx1">confdir (tralics option): <a href="#uid2994">&#10043;</a>.</div>

<div class="idx1">conference (bibtex entry type): <a href="#uid1744">&#10043;</a>.</div>

<div class="idx1">config (tralics option): <a href="#uid2996">&#10043;</a>.</div>

<div class="idx1">configfile (tralics option): <a href="#uid2997">&#10043;</a>.</div>

<div class="idx1"><samp>\cong</samp>: <a href="#uid1354">&#10043;</a>.</div>

<div class="idx1"><samp>\@cons</samp>: <a href="#uid234">&#10043;</a>.</div>

<div class="idx1"><samp>\coprod</samp>: <a href="#uid1359">&#10043;</a>.</div>

<div class="idx1"><samp>\copy</samp>: <a href="#uid195">&#10043;</a>.</div>

<div class="idx1"><samp>\copyright</samp>: <a href="#uid2121">&#10043;</a>.</div>

<div class="idx1"><samp>\cos</samp>: <a href="#uid1331">&#10043;</a>.</div>

<div class="idx1"><samp>\cosh</samp>: <a href="#uid1332">&#10043;</a>.</div>

<div class="idx1"><samp>\cot</samp>: <a href="#uid1333">&#10043;</a>.</div>

<div class="idx1"><samp>\coth</samp>: <a href="#uid1334">&#10043;</a>.</div>

<div class="idx1"><samp>\count</samp>: <a href="#uid113">&#10043;</a>, <a href="#uid725">&#10043;</a>.</div>

<div class="idx1"><samp>\count@</samp>: <a href="#uid194">&#10043;</a>, <a href="#uid3818">&#10043;</a>.</div>

<div class="idx1"><samp>\countdef</samp>: <a href="#uid189">&#10043;</a>.</div>

<div class="idx1">coursenotes (bibtex entry type): <a href="#uid1745">&#10043;</a>.</div>

<div class="idx1"><samp>\cr</samp>: <a href="#uid3328">&#10043;</a>, <a href="#uid3347">&#10043;</a>.</div>

<div class="idx1"><samp>\crcr</samp>: <a href="#uid3329">&#10043;</a>, <a href="#uid3348">&#10043;</a>.</div>

<div class="idx1">crossref (bibtex field): <a href="#uid1764">&#10043;</a>, <a href="#uid1789">&#10043;</a>.</div>

<div class="idx1"><samp>\csc</samp>: <a href="#uid1335">&#10043;</a>.</div>

<div class="idx1"><samp>\csname</samp>: <a href="#uid125">&#10043;</a>, <a href="#uid144">&#10043;</a>, <a href="#uid203">&#10043;</a>, <a href="#uid222">&#10043;</a>, <a href="#uid230">&#10043;</a>, <a href="#uid812">&#10043;</a>, <a href="#uid923">&#10043;</a>, <a href="#uid1036">&#10043;</a>, <a href="#uid1061">&#10043;</a>, <a href="#uid2511">&#10043;</a>, <a href="#uid3763">&#10043;</a>.</div>

<div class="idx1"><samp>\cup</samp>: <a href="#uid1383">&#10043;</a>.</div>

<div class="idx1"><samp>\currentgrouplevel</samp>: <a href="#uid543">&#10043;</a>, <a href="#uid3769">&#10043;</a>.</div>

<div class="idx1"><samp>\currentgrouptype</samp>: <a href="#uid545">&#10043;</a>, <a href="#uid3770">&#10043;</a>.</div>

<div class="idx1"><samp>\currentifbranch</samp>: <a href="#uid549">&#10043;</a>, <a href="#uid3758">&#10043;</a>.</div>

<div class="idx1"><samp>\currentiflevel</samp>: <a href="#uid547">&#10043;</a>, <a href="#uid3757">&#10043;</a>.</div>

<div class="idx1"><samp>\currentiftype</samp>: <a href="#uid548">&#10043;</a>, <a href="#uid3759">&#10043;</a>.</div>

<div class="idx1"><samp>\CurrentOption</samp>: <a href="#uid2469">&#10043;</a>, <a href="#uid2473">&#10043;</a>.</div>

<div class="idx1"><samp>\curve</samp>: <a href="#uid3292">&#10043;</a>, <a href="#uid3704">&#10043;</a>, <a href="#uid3744">&#10043;</a>.</div>

<div class="idx1"><samp>\c@xxx</samp>: <a href="#uid777">&#10043;</a>.</div>

<div class="idx1"><samp>\d</samp>: <a href="#uid1114">&#10043;</a>, <a href="#uid1920">&#10043;</a>.</div>

<div class="idx1"><samp>\D</samp>: <a href="#uid1122">&#10043;</a>, <a href="#uid1930">&#10043;</a>.</div>

<div class="idx1"><samp>\dag</samp>: <a href="#uid1980">&#10043;</a>.</div>

<div class="idx1"><samp>\dagger</samp>: <a href="#uid1385">&#10043;</a>.</div>

<div class="idx1"><samp>\dashbox</samp>: <a href="#uid3250">&#10043;</a>.</div>

<div class="idx1"><samp>\dashline</samp>: <a href="#uid3296">&#10043;</a>, <a href="#uid3689">&#10043;</a>.</div>

<div class="idx1"><samp>\dashv</samp>: <a href="#uid1418">&#10043;</a>.</div>

<div class="idx1"><samp>\date</samp>: <a href="#uid3918">&#10043;</a>.</div>

<div class="idx1"><samp>\day</samp>: <a href="#uid420">&#10043;</a>.</div>

<div class="idx1"><samp>\dbinom</samp>: <a href="#uid1586">&#10043;</a>.</div>

<div class="idx1"><samp>\dblfloatpagefraction</samp>: <a href="#uid3849">&#10043;</a>.</div>

<div class="idx1"><samp>\dblfloatsep</samp>: <a href="#uid336">&#10043;</a>.</div>

<div class="idx1"><samp>\dbltextfloatsep</samp>: <a href="#uid337">&#10043;</a>.</div>

<div class="idx1"><samp>\dbltopfraction</samp>: <a href="#uid3851">&#10043;</a>.</div>

<div class="idx1">dbltopnumber (counter): <a href="#uid601">&#10043;</a>.</div>

<div class="idx1">dd (unit): <a href="#uid767">&#10043;</a>.</div>

<div class="idx1"><samp>\ddag</samp>: <a href="#uid1982">&#10043;</a>.</div>

<div class="idx1"><samp>\ddagger</samp>: <a href="#uid1386">&#10043;</a>.</div>

<div class="idx1"><samp>\ddddot</samp>: <a href="#uid1512">&#10043;</a>.</div>

<div class="idx1"><samp>\dddot</samp>: <a href="#uid1513">&#10043;</a>.</div>

<div class="idx1"><samp>\ddot</samp>: <a href="#uid1514">&#10043;</a>.</div>

<div class="idx1"><samp>\ddots</samp>: <a href="#uid1487">&#10043;</a>.</div>

<div class="idx1"><samp>\deadcycles</samp>: <a href="#uid762">&#10043;</a>.</div>

<div class="idx1">dec (bibtex field): <a href="#uid1757">&#10043;</a>.</div>

<div class="idx1"><samp>\DeclareMathOperator</samp>: <a href="#uid1695">&#10043;</a>.</div>

<div class="idx1"><samp>\DeclareOption</samp>: <a href="#uid2465">&#10043;</a>.</div>

<div class="idx1"><samp>\DeclareRobustCommand</samp>: <a href="#uid148">&#10043;</a>.</div>

<div class="idx1"><samp>\declaretopic</samp>: <a href="#uid3162">&#10043;</a>, <a href="#uid3194">&#10043;</a>.</div>

<div class="idx1"><samp>\def</samp>: <a href="#uid40">&#10043;</a>.</div>

<div class="idx1">defaultclass (tralics option): <a href="#uid2999">&#10043;</a>.</div>

<div class="idx1"><samp>\default@ds</samp>: <a href="#uid2472">&#10043;</a>.</div>

<div class="idx1"><samp>\defaulthyphenchar</samp>: <a href="#uid476">&#10043;</a>, <a href="#uid816">&#10043;</a>.</div>

<div class="idx1"><samp>\defaultskewchar</samp>: <a href="#uid478">&#10043;</a>, <a href="#uid817">&#10043;</a>.</div>

<div class="idx1"><samp>\DefineShortVerb</samp>: <a href="#uid1945">&#10043;</a>.</div>

<div class="idx1"><samp>\DefineVerbatimEnvironment</samp>: <a href="#uid1958">&#10043;</a>.</div>

<div class="idx1"><samp>\deg</samp>: <a href="#uid1336">&#10043;</a>.</div>

<div class="idx1"><samp>\delcode</samp>: <a href="#uid743">&#10043;</a>, <a href="#uid1878">&#10043;</a>.</div>

<div class="idx1"><samp>\delimiter</samp>: <a href="#uid1700">&#10043;</a>.</div>

<div class="idx1"><samp>\delimiterfactor</samp>: <a href="#uid414">&#10043;</a>.</div>

<div class="idx1"><samp>\delimitershortfall</samp>: <a href="#uid623">&#10043;</a>.</div>

<div class="idx1"><samp>\Delta</samp>: <a href="#uid1283">&#10043;</a>.</div>

<div class="idx1"><samp>\delta</samp>: <a href="#uid1255">&#10043;</a>.</div>

<div class="idx1"><samp>\dendcsname</samp>: <a href="#uid125">&#10043;</a>.</div>

<div class="idx1"><samp>\@depth</samp>: <a href="#uid3867">&#10043;</a>.</div>

<div class="idx1"><samp>\depthof</samp>: <a href="#uid2593">&#10043;</a>.</div>

<div class="idx1"><samp>description</samp>: <a href="#uid2804">&#10043;</a>.</div>

<div class="idx1"><samp>\det</samp>: <a href="#uid1308">&#10043;</a>.</div>

<div class="idx1"><samp>\detokenize</samp>: <a href="#uid2499">&#10043;</a>, <a href="#uid3779">&#10043;</a>.</div>

<div class="idx1"><samp>\dfrac</samp>: <a href="#uid1538">&#10043;</a>, <a href="#uid1685">&#10043;</a>.</div>

<div class="idx1"><samp>\DH</samp>: <a href="#uid1966">&#10043;</a>, <a href="#uid1984">&#10043;</a>.</div>

<div class="idx1"><samp>\dh</samp>: <a href="#uid1966">&#10043;</a>, <a href="#uid1985">&#10043;</a>.</div>

<div class="idx1"><samp>\Diamond</samp>: <a href="#uid1391">&#10043;</a>.</div>

<div class="idx1"><samp>\diamond</samp>: <a href="#uid1390">&#10043;</a>.</div>

<div class="idx1"><samp>\diamondsuit</samp>: <a href="#uid1345">&#10043;</a>.</div>

<div class="idx1"><samp>\dim</samp>: <a href="#uid1318">&#10043;</a>.</div>

<div class="idx1"><samp>\dimen</samp>: <a href="#uid114">&#10043;</a>, <a href="#uid727">&#10043;</a>.</div>

<div class="idx1"><samp>\dimen@</samp>: <a href="#uid806">&#10043;</a>, <a href="#uid3819">&#10043;</a>.</div>

<div class="idx1"><samp>\dimen@i</samp>: <a href="#uid806">&#10043;</a>.</div>

<div class="idx1"><samp>\dimen@ii</samp>: <a href="#uid806">&#10043;</a>.</div>

<div class="idx1"><samp>\dimendef</samp>: <a href="#uid190">&#10043;</a>.</div>

<div class="idx1"><samp>\dimexpr</samp>: <a href="#uid563">&#10043;</a>, <a href="#uid3783">&#10043;</a>.</div>

<div class="idx1"><samp>\ding</samp>: <a href="#uid2930">&#10043;</a>.</div>

<div class="idx1">dir (tralics option): <a href="#uid3001">&#10043;</a>.</div>

<div class="idx1"><samp>\discretionary</samp>: <a href="#uid2858">&#10043;</a>, <a href="#uid2975">&#10043;</a>.</div>

<div class="idx1"><samp>\displayindent</samp>: <a href="#uid633">&#10043;</a>.</div>

<div class="idx1"><samp>\displaylimits</samp>: <a href="#uid1194">&#10043;</a>.</div>

<div class="idx1"><samp>displaymath</samp>: <a href="#uid1189">&#10043;</a>.</div>

<div class="idx1"><samp>\displaystyle</samp>: <a href="#uid104">&#10043;</a>, <a href="#uid1587">&#10043;</a>, <a href="#uid1636">&#10043;</a>.</div>

<div class="idx1"><samp>\displaywidowpenalty</samp>: <a href="#uid392">&#10043;</a>.</div>

<div class="idx1"><samp>\displaywidth</samp>: <a href="#uid631">&#10043;</a>.</div>

<div class="idx1">distinguish_refer_in_rabib (raweb action): <a href="#uid3382">&#10043;</a>.</div>

<div class="idx1">distinguish_refer_in_rabib (tralics option): <a href="#uid3004">&#10043;</a>.</div>

<div class="idx1"><samp>\div</samp>: <a href="#uid1394">&#10043;</a>.</div>

<div class="idx1"><samp>\divide</samp>: <a href="#uid275">&#10043;</a>, <a href="#uid802">&#10043;</a>.</div>

<div class="idx1"><samp>\dj</samp>: <a href="#uid1966">&#10043;</a>, <a href="#uid1988">&#10043;</a>.</div>

<div class="idx1"><samp>\DJ</samp>: <a href="#uid1966">&#10043;</a>, <a href="#uid1987">&#10043;</a>.</div>

<div class="idx1"><samp>\do</samp>: <a href="#uid233">&#10043;</a>, <a href="#uid926">&#10043;</a>, <a href="#uid1042">&#10043;</a>, <a href="#uid3948">&#10043;</a>.</div>

<div class="idx1">doc-type (tralics option): <a href="#uid3006">&#10043;</a>.</div>

<div class="idx1"><samp>document</samp>: <a href="#uid20">&#10043;</a>, <a href="#uid179">&#10043;</a>, <a href="#uid1718">&#10043;</a>, <a href="#uid1758">&#10043;</a>, <a href="#uid1864">&#10043;</a>.</div>

<div class="idx1"><samp>\documentclass</samp>: <a href="#uid19">&#10043;</a>, <a href="#uid2434">&#10043;</a>, <a href="#uid2445">&#10043;</a>.</div>

<div class="idx1">doi (bibtex field): <a href="#uid1765">&#10043;</a>.</div>

<div class="idx1"><samp>\dot</samp>: <a href="#uid1527">&#10043;</a>.</div>

<div class="idx1"><samp>\doteq</samp>: <a href="#uid1440">&#10043;</a>.</div>

<div class="idx1"><samp>\dots</samp>: <a href="#uid1233">&#10043;</a>, <a href="#uid2063">&#10043;</a>.</div>

<div class="idx1"><samp>\dottedline</samp>: <a href="#uid3297">&#10043;</a>, <a href="#uid3695">&#10043;</a>.</div>

<div class="idx1"><samp>\doublehyphendemerits</samp>: <a href="#uid406">&#10043;</a>.</div>

<div class="idx1"><samp>\doublerulewidth</samp>: <a href="#uid683">&#10043;</a>.</div>

<div class="idx1"><samp>\Downarrow</samp>: <a href="#uid1231">&#10043;</a>, <a href="#uid1494">&#10043;</a>.</div>

<div class="idx1"><samp>\downarrow</samp>: <a href="#uid1228">&#10043;</a>, <a href="#uid1492">&#10043;</a>.</div>

<div class="idx1"><samp>\dp</samp>: <a href="#uid741">&#10043;</a>.</div>

<div class="idx1"><samp>\drawline</samp>: <a href="#uid3298">&#10043;</a>, <a href="#uid3692">&#10043;</a>.</div>

<div class="idx1"><samp>\dump</samp>: <a href="#uid44">&#10043;</a>.</div>

<div class="idx1">dvitops (raweb action): <a href="#uid3360">&#10043;</a>.</div>

<div class="idx1"><samp>\eachwordone</samp>: <a href="#uid2961">&#10043;</a>.</div>

<div class="idx1"><samp>\eachwordthree</samp>: <a href="#uid2963">&#10043;</a>.</div>

<div class="idx1"><samp>\eachwordtwo</samp>: <a href="#uid2962">&#10043;</a>.</div>

<div class="idx1"><samp>\edef</samp>: <a href="#uid231">&#10043;</a>, <a href="#uid239">&#10043;</a>, <a href="#uid1014">&#10043;</a>.</div>

<div class="idx1">edition (bibtex field): <a href="#uid1766">&#10043;</a>.</div>

<div class="idx1">editor (bibtex field): <a href="#uid1767">&#10043;</a>.</div>

<div class="idx1"><samp>\egroup</samp>: <a href="#uid197">&#10043;</a>, <a href="#uid1044">&#10043;</a>.</div>

<div class="idx1"><samp>\eject</samp>: <a href="#uid915">&#10043;</a>.</div>

<div class="idx1"><samp>\ell</samp>: <a href="#uid1294">&#10043;</a>.</div>

<div class="idx1"><samp>\else</samp>: <a href="#uid945">&#10043;</a>, <a href="#uid972">&#10043;</a>, <a href="#uid1100">&#10043;</a>, <a href="#uid2545">&#10043;</a>.</div>

<div class="idx1"><samp>\@elt</samp>: <a href="#uid813">&#10043;</a>.</div>

<div class="idx1"><samp>\em</samp>: <a href="#uid850">&#10043;</a>.</div>

<div class="idx1">em (unit): <a href="#uid769">&#10043;</a>.</div>

<div class="idx1"><samp>\emergencystretch</samp>: <a href="#uid643">&#10043;</a>.</div>

<div class="idx1"><samp>\emph</samp>: <a href="#uid27">&#10043;</a>, <a href="#uid851">&#10043;</a>.</div>

<div class="idx1"><samp>\empty</samp>: <a href="#uid1029">&#10043;</a>.</div>

<div class="idx1"><samp>\emptyset</samp>: <a href="#uid1300">&#10043;</a>.</div>

<div class="idx1"><samp>\encodingdefault</samp>: <a href="#uid3869">&#10043;</a>.</div>

<div class="idx1"><samp>\end</samp>: <a href="#uid160">&#10043;</a>, <a href="#uid1049">&#10043;</a>.</div>

<div class="idx1"><samp>\@@end</samp>: <a href="#uid2687">&#10043;</a>.</div>

<div class="idx1"><samp>\endcitation</samp>: <a href="#uid171">&#10043;</a>, <a href="#uid1857">&#10043;</a>.</div>

<div class="idx1"><samp>\endcsname</samp>: <a href="#uid144">&#10043;</a>, <a href="#uid203">&#10043;</a>, <a href="#uid223">&#10043;</a>, <a href="#uid230">&#10043;</a>, <a href="#uid812">&#10043;</a>, <a href="#uid1036">&#10043;</a>, <a href="#uid1061">&#10043;</a>.</div>

<div class="idx1"><samp>\endgraf</samp>: <a href="#uid117">&#10043;</a>, <a href="#uid174">&#10043;</a>.</div>

<div class="idx1"><samp>\endgroup</samp>: <a href="#uid164">&#10043;</a>, <a href="#uid167">&#10043;</a>, <a href="#uid178">&#10043;</a>.</div>

<div class="idx1"><samp>\endguillemets</samp>: <a href="#uid1990">&#10043;</a>.</div>

<div class="idx1"><samp>\endinput</samp>: <a href="#uid169">&#10043;</a>, <a href="#uid1078">&#10043;</a>, <a href="#uid2556">&#10043;</a>, <a href="#uid2654">&#10043;</a>, <a href="#uid2666">&#10043;</a>.</div>

<div class="idx1"><samp>\endL</samp>: <a href="#uid3815">&#10043;</a>.</div>

<div class="idx1"><samp>\endline</samp>: <a href="#uid175">&#10043;</a>.</div>

<div class="idx1"><samp>\endlinechar</samp>: <a href="#uid173">&#10043;</a>, <a href="#uid480">&#10043;</a>, <a href="#uid867">&#10043;</a>, <a href="#uid1006">&#10043;</a>, <a href="#uid1867">&#10043;</a>.</div>

<div class="idx1"><samp>\endR</samp>: <a href="#uid3816">&#10043;</a>.</div>

<div class="idx1"><samp>\endsec</samp>: <a href="#uid172">&#10043;</a>, <a href="#uid2747">&#10043;</a>, <a href="#uid3482">&#10043;</a>.</div>

<div class="idx1"><samp>\@endtheorem</samp>: <a href="#uid2634">&#10043;</a>.</div>

<div class="idx1"><samp>\ensuremath</samp>: <a href="#uid1139">&#10043;</a>, <a href="#uid1571">&#10043;</a>, <a href="#uid1654">&#10043;</a>.</div>

<div class="idx1">entity_names: <a href="#uid3384">&#10043;</a>.</div>

<div class="idx1">entnames (tralics option): <a href="#uid3008">&#10043;</a>.</div>

<div class="idx1"><samp>enumerate</samp>: <a href="#uid2804">&#10043;</a>.</div>

<div class="idx1">enumi (counter): <a href="#uid577">&#10043;</a>, <a href="#uid2805">&#10043;</a>.</div>

<div class="idx1">enumii (counter): <a href="#uid578">&#10043;</a>, <a href="#uid2806">&#10043;</a>.</div>

<div class="idx1">enumiii (counter): <a href="#uid579">&#10043;</a>, <a href="#uid2807">&#10043;</a>.</div>

<div class="idx1">enumiv (counter): <a href="#uid580">&#10043;</a>, <a href="#uid2808">&#10043;</a>.</div>

<div class="idx1"><samp>\epsfbox</samp>: <a href="#uid2835">&#10043;</a>, <a href="#uid3957">&#10043;</a>.</div>

<div class="idx1"><samp>\epsffile</samp>: <a href="#uid2836">&#10043;</a>.</div>

<div class="idx1"><samp>\epsfig</samp>: <a href="#uid2839">&#10043;</a>.</div>

<div class="idx1"><samp>\epsfxsize</samp>: <a href="#uid687">&#10043;</a>.</div>

<div class="idx1"><samp>\epsfysize</samp>: <a href="#uid689">&#10043;</a>.</div>

<div class="idx1"><samp>\epsilon</samp>: <a href="#uid1256">&#10043;</a>.</div>

<div class="idx1"><samp>eqnarray</samp>: <a href="#uid1182">&#10043;</a>.</div>

<div class="idx1"><samp>\eqno</samp>: <a href="#uid1176">&#10043;</a>.</div>

<div class="idx1"><samp>\eqref</samp>: <a href="#uid2733">&#10043;</a>.</div>

<div class="idx1"><samp>\equal</samp>: <a href="#uid1021">&#10043;</a>, <a href="#uid2608">&#10043;</a>.</div>

<div class="idx1"><samp>equation</samp>: <a href="#uid1187">&#10043;</a>.</div>

<div class="idx1"><samp>\equiv</samp>: <a href="#uid1464">&#10043;</a>.</div>

<div class="idx1"><samp>\eres</samp>: <a href="#uid865">&#10043;</a>.</div>

<div class="idx1"><samp>\errhelp</samp>: <a href="#uid372">&#10043;</a>.</div>

<div class="idx1"><samp>\errmessage</samp>: <a href="#uid2693">&#10043;</a>.</div>

<div class="idx1"><samp>\error</samp>: <a href="#uid2906">&#10043;</a>.</div>

<div class="idx1"><samp>\errorcontextlines</samp>: <a href="#uid492">&#10043;</a>.</div>

<div class="idx1"><samp>\errorstopmode</samp>: <a href="#uid2853">&#10043;</a>.</div>

<div class="idx1"><samp>\escapechar</samp>: <a href="#uid206">&#10043;</a>, <a href="#uid474">&#10043;</a>.</div>

<div class="idx1"><samp>\eta</samp>: <a href="#uid1259">&#10043;</a>.</div>

<div class="idx1">etex (tralics option): <a href="#uid3010">&#10043;</a>.</div>

<div class="idx1"><samp>\eTeXrevision</samp>: <a href="#uid2521">&#10043;</a>.</div>

<div class="idx1"><samp>\eTeXversion</samp>: <a href="#uid551">&#10043;</a>, <a href="#uid3771">&#10043;</a>, <a href="#uid3772">&#10043;</a>.</div>

<div class="idx1"><samp>\evensidemargin</samp>: <a href="#uid649">&#10043;</a>.</div>

<div class="idx1"><samp>\everycr</samp>: <a href="#uid370">&#10043;</a>.</div>

<div class="idx1"><samp>\everydisplay</samp>: <a href="#uid360">&#10043;</a>, <a href="#uid1191">&#10043;</a>.</div>

<div class="idx1"><samp>\everyeof</samp>: <a href="#uid374">&#10043;</a>, <a href="#uid3799">&#10043;</a>.</div>

<div class="idx1"><samp>\everyhbox</samp>: <a href="#uid257">&#10043;</a>, <a href="#uid265">&#10043;</a>, <a href="#uid362">&#10043;</a>, <a href="#uid2768">&#10043;</a>.</div>

<div class="idx1"><samp>\everyjob</samp>: <a href="#uid368">&#10043;</a>, <a href="#uid3391">&#10043;</a>.</div>

<div class="idx1">everyjob: <a href="#uid3390">&#10043;</a>.</div>

<div class="idx1"><samp>\everymath</samp>: <a href="#uid358">&#10043;</a>, <a href="#uid1190">&#10043;</a>.</div>

<div class="idx1"><samp>\everypar</samp>: <a href="#uid356">&#10043;</a>.</div>

<div class="idx1"><samp>\everyvbox</samp>: <a href="#uid265">&#10043;</a>, <a href="#uid364">&#10043;</a>, <a href="#uid2767">&#10043;</a>.</div>

<div class="idx1"><samp>\everyxbox</samp>: <a href="#uid265">&#10043;</a>, <a href="#uid366">&#10043;</a>, <a href="#uid2763">&#10043;</a>.</div>

<div class="idx1"><samp>\ex</samp>: <a href="#uid2960">&#10043;</a>.</div>

<div class="idx1">ex (unit): <a href="#uid770">&#10043;</a>.</div>

<div class="idx1"><samp>exe</samp>: <a href="#uid2959">&#10043;</a>.</div>

<div class="idx1"><samp>\ExecuteOptions</samp>: <a href="#uid2466">&#10043;</a>.</div>

<div class="idx1"><samp>\exhyphenpenalty</samp>: <a href="#uid386">&#10043;</a>.</div>

<div class="idx1"><samp>\exists</samp>: <a href="#uid1358">&#10043;</a>.</div>

<div class="idx1"><samp>\exp</samp>: <a href="#uid1319">&#10043;</a>.</div>

<div class="idx1"><samp>\expandafter</samp>: <a href="#uid144">&#10043;</a>, <a href="#uid201">&#10043;</a>, <a href="#uid935">&#10043;</a>, <a href="#uid947">&#10043;</a>, <a href="#uid949">&#10043;</a>, <a href="#uid1050">&#10043;</a>, <a href="#uid1059">&#10043;</a>, <a href="#uid2510">&#10043;</a>.</div>

<div class="idx1">external-prog (tralics option): <a href="#uid3012">&#10043;</a>.</div>

<div class="idx1"><samp>\f</samp>: <a href="#uid1117">&#10043;</a>, <a href="#uid1922">&#10043;</a>.</div>

<div class="idx1"><samp>\fam</samp>: <a href="#uid472">&#10043;</a>, <a href="#uid824">&#10043;</a>, <a href="#uid1698">&#10043;</a>.</div>

<div class="idx1"><samp>\familydefault</samp>: <a href="#uid3870">&#10043;</a>.</div>

<div class="idx1"><samp>\fancyfoot</samp>: <a href="#uid2824">&#10043;</a>.</div>

<div class="idx1">fancyhdr (package): <a href="#uid2438">&#10043;</a>.</div>

<div class="idx1"><samp>\fancyhead</samp>: <a href="#uid2823">&#10043;</a>.</div>

<div class="idx1"><samp>\fancyhf</samp>: <a href="#uid2825">&#10043;</a>.</div>

<div class="idx1"><samp>\fancyinternal</samp>: <a href="#uid2831">&#10043;</a>.</div>

<div class="idx1"><samp>\fancyplain</samp>: <a href="#uid2829">&#10043;</a>.</div>

<div class="idx1">FancyVerbLine (counter): <a href="#uid591">&#10043;</a>.</div>

<div class="idx1"><samp>\fbox</samp>: <a href="#uid3244">&#10043;</a>, <a href="#uid3489">&#10043;</a>, <a href="#uid3492">&#10043;</a>, <a href="#uid3497">&#10043;</a>.</div>

<div class="idx1"><samp>\fboxrule</samp>: <a href="#uid675">&#10043;</a>, <a href="#uid3231">&#10043;</a>.</div>

<div class="idx1"><samp>\fboxsep</samp>: <a href="#uid673">&#10043;</a>, <a href="#uid3232">&#10043;</a>.</div>

<div class="idx1">feb (bibtex field): <a href="#uid1757">&#10043;</a>.</div>

<div class="idx1"><samp>\fg</samp>: <a href="#uid1992">&#10043;</a>.</div>

<div class="idx1"><samp>\fi</samp>: <a href="#uid226">&#10043;</a>, <a href="#uid942">&#10043;</a>, <a href="#uid971">&#10043;</a>, <a href="#uid1098">&#10043;</a>, <a href="#uid2543">&#10043;</a>.</div>

<div class="idx1"><samp>figure</samp>: <a href="#uid3321">&#10043;</a>.</div>

<div class="idx1">fil, fill, fill (unit): <a href="#uid771">&#10043;</a>.</div>

<div class="idx1"><samp>filecontents</samp>: <a href="#uid2637">&#10043;</a>.</div>

<div class="idx1"><samp>\fill</samp>: <a href="#uid327">&#10043;</a>.</div>

<div class="idx1"><samp>\fillbreak</samp>: <a href="#uid913">&#10043;</a>.</div>

<div class="idx1"><samp>\finalhyphendemerits</samp>: <a href="#uid408">&#10043;</a>.</div>

<div class="idx1">findwords (tralics option): <a href="#uid3016">&#10043;</a>.</div>

<div class="idx1"><samp>\firstmark</samp>: <a href="#uid1103">&#10043;</a>, <a href="#uid2488">&#10043;</a>.</div>

<div class="idx1"><samp>\firstmarks</samp>: <a href="#uid2494">&#10043;</a>, <a href="#uid3806">&#10043;</a>.</div>

<div class="idx1"><samp>\@firstofone</samp>: <a href="#uid1129">&#10043;</a>, <a href="#uid2485">&#10043;</a>.</div>

<div class="idx1"><samp>\@firstoftwo</samp>: <a href="#uid1129">&#10043;</a>, <a href="#uid2485">&#10043;</a>.</div>

<div class="idx1"><samp>\flat</samp>: <a href="#uid1247">&#10043;</a>, <a href="#uid2065">&#10043;</a>.</div>

<div class="idx1"><samp>\floatingpenalty</samp>: <a href="#uid468">&#10043;</a>.</div>

<div class="idx1"><samp>\floatpagefraction</samp>: <a href="#uid3848">&#10043;</a>.</div>

<div class="idx1"><samp>\floatsep</samp>: <a href="#uid333">&#10043;</a>.</div>

<div class="idx1"><samp>flushleft</samp>: <a href="#uid2901">&#10043;</a>, <a href="#uid3593">&#10043;</a>.</div>

<div class="idx1"><samp>flushright</samp>: <a href="#uid2902">&#10043;</a>, <a href="#uid3594">&#10043;</a>.</div>

<div class="idx1"><samp>\fmtname</samp>: <a href="#uid3889">&#10043;</a>.</div>

<div class="idx1"><samp>\@fnsymbol</samp>: <a href="#uid799">&#10043;</a>, <a href="#uid1167">&#10043;</a>.</div>

<div class="idx1"><samp>\fnsymbol</samp>: <a href="#uid793">&#10043;</a>, <a href="#uid1164">&#10043;</a>.</div>

<div class="idx1"><samp>\font</samp>: <a href="#uid59">&#10043;</a>, <a href="#uid243">&#10043;</a>.</div>

<div class="idx1"><samp>\fontchardp</samp>: <a href="#uid555">&#10043;</a>, <a href="#uid3791">&#10043;</a>.</div>

<div class="idx1"><samp>\fontcharht</samp>: <a href="#uid554">&#10043;</a>, <a href="#uid3790">&#10043;</a>.</div>

<div class="idx1"><samp>\fontcharic</samp>: <a href="#uid556">&#10043;</a>, <a href="#uid3792">&#10043;</a>.</div>

<div class="idx1"><samp>\fontcharwd</samp>: <a href="#uid553">&#10043;</a>, <a href="#uid3789">&#10043;</a>.</div>

<div class="idx1"><samp>\fontdimen</samp>: <a href="#uid248">&#10043;</a>, <a href="#uid818">&#10043;</a>.</div>

<div class="idx1"><samp>\fontencoding</samp>: <a href="#uid820">&#10043;</a>.</div>

<div class="idx1"><samp>\fontfamily</samp>: <a href="#uid820">&#10043;</a>.</div>

<div class="idx1"><samp>\fontname</samp>: <a href="#uid1070">&#10043;</a>, <a href="#uid2517">&#10043;</a>.</div>

<div class="idx1"><samp>\fontseries</samp>: <a href="#uid820">&#10043;</a>.</div>

<div class="idx1"><samp>\fontshape</samp>: <a href="#uid820">&#10043;</a>.</div>

<div class="idx1"><samp>\fontsize</samp>: <a href="#uid820">&#10043;</a>.</div>

<div class="idx1">foot (bibtex type): <a href="#uid1719">&#10043;</a>, <a href="#uid1791">&#10043;</a>.</div>

<div class="idx1"><samp>\footcite</samp>: <a href="#uid1722">&#10043;</a>.</div>

<div class="idx1"><samp>\footcitepre</samp>: <a href="#uid1728">&#10043;</a>.</div>

<div class="idx1"><samp>\footcitesep</samp>: <a href="#uid1729">&#10043;</a>, <a href="#uid3886">&#10043;</a>.</div>

<div class="idx1"><samp>\footnote</samp>: <a href="#uid2723">&#10043;</a>, <a href="#uid3394">&#10043;</a>.</div>

<div class="idx1">footnote (counter): <a href="#uid593">&#10043;</a>.</div>

<div class="idx1"><samp>\footnotesize</samp>: <a href="#uid857">&#10043;</a>, <a href="#uid3419">&#10043;</a>.</div>

<div class="idx1"><samp>\footskip</samp>: <a href="#uid707">&#10043;</a>.</div>

<div class="idx1"><samp>\forall</samp>: <a href="#uid1357">&#10043;</a>.</div>

<div class="idx1">fp (package): <a href="#uid2437">&#10043;</a>.</div>

<div class="idx1"><samp>\FPabs</samp>: <a href="#uid2361">&#10043;</a>.</div>

<div class="idx1"><samp>\FPadd</samp>: <a href="#uid2363">&#10043;</a>.</div>

<div class="idx1"><samp>\FParccos</samp>: <a href="#uid2414">&#10043;</a>.</div>

<div class="idx1"><samp>\FParcsin</samp>: <a href="#uid2413">&#10043;</a>.</div>

<div class="idx1"><samp>\FParcsincos</samp>: <a href="#uid2415">&#10043;</a>.</div>

<div class="idx1"><samp>\FPclip</samp>: <a href="#uid2351">&#10043;</a>.</div>

<div class="idx1"><samp>\FPcos</samp>: <a href="#uid2406">&#10043;</a>.</div>

<div class="idx1"><samp>\FPcot</samp>: <a href="#uid2408">&#10043;</a>, <a href="#uid2418">&#10043;</a>.</div>

<div class="idx1"><samp>\FPcsolve</samp>: <a href="#uid2425">&#10043;</a>.</div>

<div class="idx1"><samp>\FPdiv</samp>: <a href="#uid2370">&#10043;</a>.</div>

<div class="idx1"><samp>\FPe</samp>: <a href="#uid2389">&#10043;</a>.</div>

<div class="idx1"><samp>\FPeval</samp>: <a href="#uid2430">&#10043;</a>.</div>

<div class="idx1"><samp>\FPexp</samp>: <a href="#uid2397">&#10043;</a>.</div>

<div class="idx1"><samp>\FPifeq</samp>: <a href="#uid2382">&#10043;</a>.</div>

<div class="idx1"><samp>\FPifgt</samp>: <a href="#uid2381">&#10043;</a>.</div>

<div class="idx1"><samp>\FPifint</samp>: <a href="#uid2387">&#10043;</a>.</div>

<div class="idx1"><samp>\FPiflt</samp>: <a href="#uid2380">&#10043;</a>.</div>

<div class="idx1"><samp>\FPifneg</samp>: <a href="#uid2384">&#10043;</a>.</div>

<div class="idx1"><samp>\FPifpos</samp>: <a href="#uid2385">&#10043;</a>.</div>

<div class="idx1"><samp>\FPifzero</samp>: <a href="#uid2386">&#10043;</a>.</div>

<div class="idx1"><samp>\FPindent</samp>: <a href="#uid2349">&#10043;</a>.</div>

<div class="idx1"><samp>\FPln</samp>: <a href="#uid2399">&#10043;</a>.</div>

<div class="idx1"><samp>\FPlsolve</samp>: <a href="#uid2421">&#10043;</a>.</div>

<div class="idx1"><samp>\FPmax</samp>: <a href="#uid2374">&#10043;</a>.</div>

<div class="idx1"><samp>\FPmin</samp>: <a href="#uid2372">&#10043;</a>.</div>

<div class="idx1"><samp>\FPmul</samp>: <a href="#uid2367">&#10043;</a>.</div>

<div class="idx1"><samp>\FPneg</samp>: <a href="#uid2357">&#10043;</a>.</div>

<div class="idx1"><samp>\FPpascal</samp>: <a href="#uid2395">&#10043;</a>.</div>

<div class="idx1"><samp>\FPpow</samp>: <a href="#uid2401">&#10043;</a>.</div>

<div class="idx1"><samp>\FPprint</samp>: <a href="#uid2344">&#10043;</a>, <a href="#uid2353">&#10043;</a>.</div>

<div class="idx1"><samp>\FPqqsolve</samp>: <a href="#uid2427">&#10043;</a>.</div>

<div class="idx1"><samp>\FPqsolve</samp>: <a href="#uid2423">&#10043;</a>.</div>

<div class="idx1"><samp>\FPrand</samp>: <a href="#uid2393">&#10043;</a>.</div>

<div class="idx1"><samp>\FProot</samp>: <a href="#uid2403">&#10043;</a>.</div>

<div class="idx1"><samp>\FPround</samp>: <a href="#uid2378">&#10043;</a>.</div>

<div class="idx1"><samp>\FPseed</samp>: <a href="#uid507">&#10043;</a>, <a href="#uid2391">&#10043;</a>.</div>

<div class="idx1"><samp>\FPset</samp>: <a href="#uid2345">&#10043;</a>, <a href="#uid2355">&#10043;</a>.</div>

<div class="idx1"><samp>\FPsgn</samp>: <a href="#uid2359">&#10043;</a>.</div>

<div class="idx1"><samp>\FPsin</samp>: <a href="#uid2405">&#10043;</a>.</div>

<div class="idx1"><samp>\FPsincos</samp>: <a href="#uid2410">&#10043;</a>.</div>

<div class="idx1"><samp>\FPsub</samp>: <a href="#uid2365">&#10043;</a>.</div>

<div class="idx1"><samp>\FPtan</samp>: <a href="#uid2407">&#10043;</a>, <a href="#uid2417">&#10043;</a>.</div>

<div class="idx1"><samp>\FPtancot</samp>: <a href="#uid2411">&#10043;</a>, <a href="#uid2419">&#10043;</a>.</div>

<div class="idx1"><samp>\FPtruncate</samp>: <a href="#uid2376">&#10043;</a>.</div>

<div class="idx1"><samp>\FPupn</samp>: <a href="#uid2429">&#10043;</a>.</div>

<div class="idx1"><samp>\frac</samp>: <a href="#uid1534">&#10043;</a>, <a href="#uid1583">&#10043;</a>, <a href="#uid1684">&#10043;</a>.</div>

<div class="idx1"><samp>\frame</samp>: <a href="#uid3272">&#10043;</a>.</div>

<div class="idx1"><samp>\framebox</samp>: <a href="#uid3236">&#10043;</a>, <a href="#uid3242">&#10043;</a>, <a href="#uid3497">&#10043;</a>.</div>

<div class="idx1">french (package): <a href="#uid2440">&#10043;</a>.</div>

<div class="idx1">frenchle (package): <a href="#uid2441">&#10043;</a>.</div>

<div class="idx1"><samp>\frontmatter</samp>: <a href="#uid2750">&#10043;</a>.</div>

<div class="idx1"><samp>\frown</samp>: <a href="#uid1479">&#10043;</a>.</div>

<div class="idx1"><samp>\fsc</samp>: <a href="#uid2844">&#10043;</a>.</div>

<div class="idx1"><samp>\futurelet</samp>: <a href="#uid200">&#10043;</a>, <a href="#uid1024">&#10043;</a>.</div>

<div class="idx1"><samp>\fvset</samp>: <a href="#uid1961">&#10043;</a>.</div>

<div class="idx1"><samp>\g@addto@macro</samp>: <a href="#uid3942">&#10043;</a>.</div>

<div class="idx1"><samp>\gamma</samp>: <a href="#uid1254">&#10043;</a>.</div>

<div class="idx1"><samp>\Gamma</samp>: <a href="#uid1282">&#10043;</a>.</div>

<div class="idx1"><samp>\gcd</samp>: <a href="#uid1309">&#10043;</a>.</div>

<div class="idx1"><samp>\gdef</samp>: <a href="#uid149">&#10043;</a>, <a href="#uid1048">&#10043;</a>.</div>

<div class="idx1"><samp>\ge</samp>: <a href="#uid1433">&#10043;</a>.</div>

<div class="idx1">generatedvi (raweb action): <a href="#uid3361">&#10043;</a>.</div>

<div class="idx1">generateps (raweb action): <a href="#uid3362">&#10043;</a>.</div>

<div class="idx1"><samp>\GenericError</samp>: <a href="#uid2912">&#10043;</a>.</div>

<div class="idx1"><samp>\GenericInfo</samp>: <a href="#uid2915">&#10043;</a>.</div>

<div class="idx1"><samp>\GenericWarning</samp>: <a href="#uid2920">&#10043;</a>.</div>

<div class="idx1"><samp>\genfrac</samp>: <a href="#uid1537">&#10043;</a>, <a href="#uid1585">&#10043;</a>, <a href="#uid1687">&#10043;</a>.</div>

<div class="idx1"><samp>\geq</samp>: <a href="#uid1434">&#10043;</a>.</div>

<div class="idx1"><samp>\geqslant</samp>: <a href="#uid1450">&#10043;</a>.</div>

<div class="idx1">german (package): <a href="#uid2442">&#10043;</a>.</div>

<div class="idx1"><samp>\gets</samp>: <a href="#uid1457">&#10043;</a>.</div>

<div class="idx1"><samp>\gg</samp>: <a href="#uid1447">&#10043;</a>.</div>

<div class="idx1"><samp>\gll</samp>: <a href="#uid2966">&#10043;</a>.</div>

<div class="idx1"><samp>\glll</samp>: <a href="#uid2967">&#10043;</a>.</div>

<div class="idx1"><samp>\glo</samp>: <a href="#uid2795">&#10043;</a>.</div>

<div class="idx1"><samp>\global</samp>: <a href="#uid129">&#10043;</a>, <a href="#uid783">&#10043;</a>, <a href="#uid1045">&#10043;</a>, <a href="#uid1052">&#10043;</a>, <a href="#uid2646">&#10043;</a>.</div>

<div class="idx1"><samp>\globaldefs</samp>: <a href="#uid470">&#10043;</a>.</div>

<div class="idx1"><samp>glossaire</samp>: <a href="#uid2794">&#10043;</a>, <a href="#uid3179">&#10043;</a>.</div>

<div class="idx1"><samp>\glue</samp>: <a href="#uid262">&#10043;</a>.</div>

<div class="idx1"><samp>\glueexpr</samp>: <a href="#uid564">&#10043;</a>, <a href="#uid3784">&#10043;</a>.</div>

<div class="idx1"><samp>\glueshrink</samp>: <a href="#uid570">&#10043;</a>, <a href="#uid3776">&#10043;</a>.</div>

<div class="idx1"><samp>\glueshrinkorder</samp>: <a href="#uid568">&#10043;</a>, <a href="#uid3774">&#10043;</a>.</div>

<div class="idx1"><samp>\gluestretch</samp>: <a href="#uid569">&#10043;</a>, <a href="#uid3775">&#10043;</a>.</div>

<div class="idx1"><samp>\gluestretchorder</samp>: <a href="#uid567">&#10043;</a>, <a href="#uid3773">&#10043;</a>.</div>

<div class="idx1"><samp>\gluetomu</samp>: <a href="#uid572">&#10043;</a>, <a href="#uid3777">&#10043;</a>.</div>

<div class="idx1"><samp>\@gobble</samp>: <a href="#uid1133">&#10043;</a>, <a href="#uid2855">&#10043;</a>.</div>

<div class="idx1"><samp>\@gobblefour</samp>: <a href="#uid1133">&#10043;</a>.</div>

<div class="idx1"><samp>\@gobbletwo</samp>: <a href="#uid1133">&#10043;</a>, <a href="#uid2856">&#10043;</a>.</div>

<div class="idx1"><samp>\goodbreak</samp>: <a href="#uid914">&#10043;</a>.</div>

<div class="idx1"><samp>\grave</samp>: <a href="#uid1510">&#10043;</a>.</div>

<div class="idx1"><samp>\gtrless</samp>: <a href="#uid1449">&#10043;</a>.</div>

<div class="idx1"><samp>\guillemets</samp>: <a href="#uid1994">&#10043;</a>.</div>

<div class="idx1"><samp>\guillemotleft</samp>: <a href="#uid122">&#10043;</a>, <a href="#uid2127">&#10043;</a>.</div>

<div class="idx1"><samp>\guillemotright</samp>: <a href="#uid123">&#10043;</a>, <a href="#uid2161">&#10043;</a>.</div>

<div class="idx1"><samp>\h</samp>: <a href="#uid1123">&#10043;</a>, <a href="#uid1932">&#10043;</a>.</div>

<div class="idx1"><samp>\H</samp>: <a href="#uid1111">&#10043;</a>, <a href="#uid1908">&#10043;</a>.</div>

<div class="idx1">hacknotitle (tralics option): <a href="#uid3014">&#10043;</a>.</div>

<div class="idx1"><samp>\halign</samp>: <a href="#uid3350">&#10043;</a>.</div>

<div class="idx1"><samp>\hangafter</samp>: <a href="#uid466">&#10043;</a>.</div>

<div class="idx1"><samp>\hangindent</samp>: <a href="#uid637">&#10043;</a>.</div>

<div class="idx1"><samp>\hat</samp>: <a href="#uid1520">&#10043;</a>.</div>

<div class="idx1"><samp>\hbadness</samp>: <a href="#uid430">&#10043;</a>.</div>

<div class="idx1"><samp>\hbar</samp>: <a href="#uid1293">&#10043;</a>.</div>

<div class="idx1"><samp>\hbox</samp>: <a href="#uid151">&#10043;</a>, <a href="#uid1592">&#10043;</a>, <a href="#uid1629">&#10043;</a>, <a href="#uid1738">&#10043;</a>, <a href="#uid2766">&#10043;</a>.</div>

<div class="idx1"><samp>\hb@xt@</samp>: <a href="#uid3904">&#10043;</a>.</div>

<div class="idx1"><samp>\hdots</samp>: <a href="#uid1485">&#10043;</a>.</div>

<div class="idx1"><samp>\headercr</samp>: <a href="#uid3882">&#10043;</a>.</div>

<div class="idx1"><samp>\headheight</samp>: <a href="#uid704">&#10043;</a>.</div>

<div class="idx1"><samp>\headsep</samp>: <a href="#uid705">&#10043;</a>.</div>

<div class="idx1"><samp>\heartsuit</samp>: <a href="#uid1346">&#10043;</a>.</div>

<div class="idx1"><samp>\@height</samp>: <a href="#uid3867">&#10043;</a>.</div>

<div class="idx1"><samp>\heightof</samp>: <a href="#uid2592">&#10043;</a>.</div>

<div class="idx1"><samp>\hexnumber@</samp>: <a href="#uid1141">&#10043;</a>, <a href="#uid2566">&#10043;</a>.</div>

<div class="idx1"><samp>\hfil</samp>: <a href="#uid885">&#10043;</a>.</div>

<div class="idx1"><samp>\hfill</samp>: <a href="#uid886">&#10043;</a>.</div>

<div class="idx1"><samp>\hfilneg</samp>: <a href="#uid887">&#10043;</a>.</div>

<div class="idx1"><samp>\hfuzz</samp>: <a href="#uid619">&#10043;</a>.</div>

<div class="idx1"><samp>\hideskip</samp>: <a href="#uid339">&#10043;</a>.</div>

<div class="idx1"><samp>\hl</samp>: <a href="#uid1941">&#10043;</a>.</div>

<div class="idx1"><samp>\hline</samp>: <a href="#uid3335">&#10043;</a>.</div>

<div class="idx1"><samp>\hoffset</samp>: <a href="#uid639">&#10043;</a>.</div>

<div class="idx1"><samp>\holdinginserts</samp>: <a href="#uid490">&#10043;</a>.</div>

<div class="idx1"><samp>\hom</samp>: <a href="#uid1320">&#10043;</a>.</div>

<div class="idx1"><samp>\hookleftarrow</samp>: <a href="#uid1473">&#10043;</a>.</div>

<div class="idx1"><samp>\hookrightarrow</samp>: <a href="#uid1472">&#10043;</a>.</div>

<div class="idx1">howpublished (bibtex field): <a href="#uid1768">&#10043;</a>.</div>

<div class="idx1"><samp>\href</samp>: <a href="#uid2710">&#10043;</a>.</div>

<div class="idx1"><samp>\Href</samp>: <a href="#uid2713">&#10043;</a>.</div>

<div class="idx1"><samp>\hrule</samp>: <a href="#uid2925">&#10043;</a>.</div>

<div class="idx1"><samp>\hsize</samp>: <a href="#uid609">&#10043;</a>.</div>

<div class="idx1"><samp>\hskip</samp>: <a href="#uid883">&#10043;</a>, <a href="#uid896">&#10043;</a>, <a href="#uid1606">&#10043;</a>.</div>

<div class="idx1"><samp>\hspace</samp>: <a href="#uid884">&#10043;</a>, <a href="#uid898">&#10043;</a>, <a href="#uid1600">&#10043;</a>, <a href="#uid1634">&#10043;</a>.</div>

<div class="idx1"><samp>\hss</samp>: <a href="#uid888">&#10043;</a>.</div>

<div class="idx1"><samp>\ht</samp>: <a href="#uid739">&#10043;</a>.</div>

<div class="idx1"><samp>\htmladdnormallink</samp>: <a href="#uid2712">&#10043;</a>.</div>

<div class="idx1"><samp>\htmladdnormallinkfoot</samp>: <a href="#uid2715">&#10043;</a>.</div>

<div class="idx1"><samp>\htmlimage</samp>: <a href="#uid2870">&#10043;</a>.</div>

<div class="idx1"><samp>htmlonly</samp>: <a href="#uid2892">&#10043;</a>.</div>

<div class="idx1"><samp>\HTMLset</samp>: <a href="#uid2860">&#10043;</a>.</div>

<div class="idx1"><samp>\Huge</samp>: <a href="#uid864">&#10043;</a>, <a href="#uid3419">&#10043;</a>.</div>

<div class="idx1"><samp>\huge</samp>: <a href="#uid863">&#10043;</a>, <a href="#uid3419">&#10043;</a>.</div>

<div class="idx1"><samp>\hyphenation</samp>: <a href="#uid2866">&#10043;</a>, <a href="#uid2977">&#10043;</a>.</div>

<div class="idx1"><samp>\hyphenchar</samp>: <a href="#uid246">&#10043;</a>, <a href="#uid515">&#10043;</a>.</div>

<div class="idx1"><samp>\hyphenpenalty</samp>: <a href="#uid384">&#10043;</a>.</div>

<div class="idx1"><samp>\I</samp>: <a href="#uid3874">&#10043;</a>.</div>

<div class="idx1"><samp>\i</samp>: <a href="#uid1244">&#10043;</a>, <a href="#uid1889">&#10043;</a>, <a href="#uid2067">&#10043;</a>.</div>

<div class="idx1"><samp>\ieme</samp>: <a href="#uid865">&#10043;</a>, <a href="#uid1996">&#10043;</a>.</div>

<div class="idx1"><samp>\iemes</samp>: <a href="#uid865">&#10043;</a>, <a href="#uid1999">&#10043;</a>.</div>

<div class="idx1"><samp>\ier</samp>: <a href="#uid865">&#10043;</a>, <a href="#uid2001">&#10043;</a>.</div>

<div class="idx1"><samp>\iere</samp>: <a href="#uid865">&#10043;</a>, <a href="#uid2005">&#10043;</a>.</div>

<div class="idx1"><samp>\ieres</samp>: <a href="#uid2007">&#10043;</a>.</div>

<div class="idx1"><samp>\iers</samp>: <a href="#uid865">&#10043;</a>, <a href="#uid2003">&#10043;</a>.</div>

<div class="idx1"><samp>\if</samp>: <a href="#uid976">&#10043;</a>, <a href="#uid1080">&#10043;</a>, <a href="#uid2525">&#10043;</a>.</div>

<div class="idx1"><samp>\@ifbempty</samp>: <a href="#uid2569">&#10043;</a>.</div>

<div class="idx1"><samp>\ifcase</samp>: <a href="#uid975">&#10043;</a>, <a href="#uid1096">&#10043;</a>, <a href="#uid2541">&#10043;</a>.</div>

<div class="idx1"><samp>\ifcat</samp>: <a href="#uid977">&#10043;</a>, <a href="#uid1081">&#10043;</a>, <a href="#uid2526">&#10043;</a>.</div>

<div class="idx1"><samp>\@ifclasslater</samp>: <a href="#uid2459">&#10043;</a>.</div>

<div class="idx1"><samp>\@ifclassloaded</samp>: <a href="#uid2457">&#10043;</a>.</div>

<div class="idx1"><samp>\@ifclasswith</samp>: <a href="#uid2461">&#10043;</a>.</div>

<div class="idx1"><samp>\ifcsname</samp>: <a href="#uid964">&#10043;</a>, <a href="#uid1016">&#10043;</a>, <a href="#uid2549">&#10043;</a>, <a href="#uid3762">&#10043;</a>.</div>

<div class="idx1"><samp>\ifdefined</samp>: <a href="#uid962">&#10043;</a>, <a href="#uid2547">&#10043;</a>, <a href="#uid3761">&#10043;</a>.</div>

<div class="idx1"><samp>\ifdim</samp>: <a href="#uid1002">&#10043;</a>, <a href="#uid1083">&#10043;</a>, <a href="#uid2528">&#10043;</a>.</div>

<div class="idx1"><samp>\ifeof</samp>: <a href="#uid1005">&#10043;</a>, <a href="#uid1093">&#10043;</a>, <a href="#uid2538">&#10043;</a>, <a href="#uid2643">&#10043;</a>.</div>

<div class="idx1"><samp>\iff</samp>: <a href="#uid1467">&#10043;</a>.</div>

<div class="idx1"><samp>\iffalse</samp>: <a href="#uid1000">&#10043;</a>, <a href="#uid1095">&#10043;</a>, <a href="#uid2540">&#10043;</a>.</div>

<div class="idx1"><samp>\IfFileExists</samp>: <a href="#uid2656">&#10043;</a>.</div>

<div class="idx1"><samp>\iffontchar</samp>: <a href="#uid966">&#10043;</a>, <a href="#uid2548">&#10043;</a>, <a href="#uid3764">&#10043;</a>.</div>

<div class="idx1"><samp>\ifFPtest</samp>: <a href="#uid2346">&#10043;</a>.</div>

<div class="idx1"><samp>\ifhbox</samp>: <a href="#uid1008">&#10043;</a>, <a href="#uid1090">&#10043;</a>, <a href="#uid2535">&#10043;</a>.</div>

<div class="idx1"><samp>\ifhmode</samp>: <a href="#uid1012">&#10043;</a>, <a href="#uid1086">&#10043;</a>, <a href="#uid2531">&#10043;</a>.</div>

<div class="idx1"><samp>\ifinner</samp>: <a href="#uid1013">&#10043;</a>, <a href="#uid1088">&#10043;</a>, <a href="#uid2533">&#10043;</a>.</div>

<div class="idx1"><samp>\ifmmode</samp>: <a href="#uid1010">&#10043;</a>, <a href="#uid1087">&#10043;</a>, <a href="#uid2532">&#10043;</a>.</div>

<div class="idx1"><samp>\ifnextchar</samp>: <a href="#uid1023">&#10043;</a>.</div>

<div class="idx1"><samp>\@ifnextchar</samp>: <a href="#uid2848">&#10043;</a>.</div>

<div class="idx1"><samp>\ifnum</samp>: <a href="#uid942">&#10043;</a>, <a href="#uid1001">&#10043;</a>, <a href="#uid1082">&#10043;</a>, <a href="#uid2527">&#10043;</a>.</div>

<div class="idx1"><samp>\ifodd</samp>: <a href="#uid1084">&#10043;</a>, <a href="#uid2529">&#10043;</a>.</div>

<div class="idx1"><samp>\@ifpackagelater</samp>: <a href="#uid2460">&#10043;</a>.</div>

<div class="idx1"><samp>\@ifpackageloaded</samp>: <a href="#uid2458">&#10043;</a>.</div>

<div class="idx1"><samp>\@ifpackagewith</samp>: <a href="#uid2462">&#10043;</a>.</div>

<div class="idx1"><samp>\@ifstar</samp>: <a href="#uid2846">&#10043;</a>.</div>

<div class="idx1"><samp>\@iftempty</samp>: <a href="#uid2568">&#10043;</a>.</div>

<div class="idx1"><samp>\ifthenelse</samp>: <a href="#uid973">&#10043;</a>, <a href="#uid2624">&#10043;</a>.</div>

<div class="idx1"><samp>\iftrue</samp>: <a href="#uid999">&#10043;</a>, <a href="#uid1094">&#10043;</a>, <a href="#uid2539">&#10043;</a>.</div>

<div class="idx1"><samp>\@ifundefined</samp>: <a href="#uid2833">&#10043;</a>.</div>

<div class="idx1"><samp>\ifvbox</samp>: <a href="#uid1009">&#10043;</a>, <a href="#uid1091">&#10043;</a>, <a href="#uid2536">&#10043;</a>.</div>

<div class="idx1"><samp>\ifvmode</samp>: <a href="#uid1011">&#10043;</a>, <a href="#uid1085">&#10043;</a>, <a href="#uid2530">&#10043;</a>.</div>

<div class="idx1"><samp>\ifvoid</samp>: <a href="#uid1007">&#10043;</a>, <a href="#uid1089">&#10043;</a>, <a href="#uid2534">&#10043;</a>.</div>

<div class="idx1"><samp>\ifx</samp>: <a href="#uid199">&#10043;</a>, <a href="#uid1017">&#10043;</a>, <a href="#uid1092">&#10043;</a>, <a href="#uid2537">&#10043;</a>.</div>

<div class="idx1"><samp>\ignorespaces</samp>: <a href="#uid870">&#10043;</a>, <a href="#uid2669">&#10043;</a>.</div>

<div class="idx1"><samp>\IJ</samp>: <a href="#uid1967">&#10043;</a>.</div>

<div class="idx1"><samp>\ij</samp>: <a href="#uid1967">&#10043;</a>.</div>

<div class="idx1"><samp>\Im</samp>: <a href="#uid1297">&#10043;</a>.</div>

<div class="idx1"><samp>\imath</samp>: <a href="#uid1351">&#10043;</a>.</div>

<div class="idx1"><samp>\immediate</samp>: <a href="#uid2882">&#10043;</a>.</div>

<div class="idx1"><samp>\in</samp>: <a href="#uid1410">&#10043;</a>.</div>

<div class="idx1">in (unit): <a href="#uid767">&#10043;</a>.</div>

<div class="idx1">inbook (bibtex entry type): <a href="#uid1746">&#10043;</a>.</div>

<div class="idx1"><samp>\include</samp>: <a href="#uid1077">&#10043;</a>, <a href="#uid2660">&#10043;</a>.</div>

<div class="idx1"><samp>\includegraphics</samp>: <a href="#uid2841">&#10043;</a>, <a href="#uid3568">&#10043;</a>, <a href="#uid3576">&#10043;</a>, <a href="#uid3956">&#10043;</a>.</div>

<div class="idx1">incollection (bibtex entry type): <a href="#uid1747">&#10043;</a>.</div>

<div class="idx1"><samp>\indent</samp>: <a href="#uid903">&#10043;</a>.</div>

<div class="idx1"><samp>\index</samp>: <a href="#uid3657">&#10043;</a>.</div>

<div class="idx1"><samp>\inf</samp>: <a href="#uid1310">&#10043;</a>.</div>

<div class="idx1"><samp>\infty</samp>: <a href="#uid1299">&#10043;</a>.</div>

<div class="idx1"><samp>\injlim</samp>: <a href="#uid1311">&#10043;</a>.</div>

<div class="idx1"><samp>\Input</samp>: <a href="#uid2664">&#10043;</a>.</div>

<div class="idx1"><samp>\input</samp>: <a href="#uid168">&#10043;</a>, <a href="#uid1076">&#10043;</a>, <a href="#uid2555">&#10043;</a>, <a href="#uid2662">&#10043;</a>.</div>

<div class="idx1">input-path (tralics option): <a href="#uid3020">&#10043;</a>.</div>

<div class="idx1"><samp>\input@encoding</samp>: <a href="#uid1881">&#10043;</a>.</div>

<div class="idx1"><samp>\input@encoding@default</samp>: <a href="#uid1880">&#10043;</a>.</div>

<div class="idx1"><samp>\input@encoding@val</samp>: <a href="#uid1882">&#10043;</a>.</div>

<div class="idx1"><samp>\InputClass</samp>: <a href="#uid2451">&#10043;</a>.</div>

<div class="idx1"><samp>\inputencoding</samp>: <a href="#uid1884">&#10043;</a>.</div>

<div class="idx1"><samp>\inputencodingname</samp>: <a href="#uid1883">&#10043;</a>.</div>

<div class="idx1">inputfile (tralics option): <a href="#uid3022">&#10043;</a>.</div>

<div class="idx1"><samp>\InputIfFileExists</samp>: <a href="#uid2658">&#10043;</a>.</div>

<div class="idx1"><samp>\inputlineno</samp>: <a href="#uid535">&#10043;</a>.</div>

<div class="idx1"><samp>\insert</samp>: <a href="#uid2697">&#10043;</a>, <a href="#uid2981">&#10043;</a>.</div>

<div class="idx1"><samp>\insertbibliohere</samp>: <a href="#uid1860">&#10043;</a>.</div>

<div class="idx1"><samp>\insertpenalties</samp>: <a href="#uid460">&#10043;</a>.</div>

<div class="idx1">institution (bibtex field): <a href="#uid1769">&#10043;</a>.</div>

<div class="idx1"><samp>\int</samp>: <a href="#uid89">&#10043;</a>, <a href="#uid1365">&#10043;</a>.</div>

<div class="idx1"><samp>\interactionmode</samp>: <a href="#uid3788">&#10043;</a>.</div>

<div class="idx1">interactivebib (tralics option): <a href="#uid3024">&#10043;</a>.</div>

<div class="idx1">interactivemath (tralics option): <a href="#uid3026">&#10043;</a>.</div>

<div class="idx1"><samp>\interdisplaylinepenalty</samp>: <a href="#uid525">&#10043;</a>.</div>

<div class="idx1"><samp>\interfootnotelinepenalty</samp>: <a href="#uid523">&#10043;</a>.</div>

<div class="idx1"><samp>\interlinepenalties</samp>: <a href="#uid518">&#10043;</a>, <a href="#uid3796">&#10043;</a>.</div>

<div class="idx1"><samp>\interlinepenalty</samp>: <a href="#uid404">&#10043;</a>.</div>

<div class="idx1"><samp>\intertext</samp>: <a href="#uid94">&#10043;</a>.</div>

<div class="idx1"><samp>\intextsep</samp>: <a href="#uid335">&#10043;</a>.</div>

<div class="idx1"><samp>\iota</samp>: <a href="#uid1261">&#10043;</a>.</div>

<div class="idx1">isbn (bibtex field): <a href="#uid1770">&#10043;</a>.</div>

<div class="idx1"><samp>\isdefined</samp>: <a href="#uid1015">&#10043;</a>.</div>

<div class="idx1"><samp>\isodd</samp>: <a href="#uid2610">&#10043;</a>.</div>

<div class="idx1"><samp>\isproject</samp>: <a href="#uid3156">&#10043;</a>.</div>

<div class="idx1">isrn (bibtex field): <a href="#uid1771">&#10043;</a>.</div>

<div class="idx1">issn (bibtex field): <a href="#uid1772">&#10043;</a>.</div>

<div class="idx1"><samp>\isundefined</samp>: <a href="#uid2612">&#10043;</a>.</div>

<div class="idx1"><samp>\it</samp>: <a href="#uid53">&#10043;</a>, <a href="#uid847">&#10043;</a>, <a href="#uid1561">&#10043;</a>.</div>

<div class="idx1"><samp>\@item</samp>: <a href="#uid2812">&#10043;</a>.</div>

<div class="idx1"><samp>\@@item</samp>: <a href="#uid2814">&#10043;</a>.</div>

<div class="idx1"><samp>\item</samp>: <a href="#uid46">&#10043;</a>, <a href="#uid132">&#10043;</a>, <a href="#uid2811">&#10043;</a>.</div>

<div class="idx1"><samp>\itemindent</samp>: <a href="#uid669">&#10043;</a>.</div>

<div class="idx1"><samp>itemize</samp>: <a href="#uid2804">&#10043;</a>.</div>

<div class="idx1"><samp>\@itemlabel</samp>: <a href="#uid2809">&#10043;</a>, <a href="#uid2813">&#10043;</a>.</div>

<div class="idx1"><samp>\itemsep</samp>: <a href="#uid321">&#10043;</a>.</div>

<div class="idx1"><samp>\itshape</samp>: <a href="#uid54">&#10043;</a>, <a href="#uid840">&#10043;</a>, <a href="#uid3425">&#10043;</a>.</div>

<div class="idx1"><samp>\@iwhiledim</samp>: <a href="#uid2572">&#10043;</a>.</div>

<div class="idx1"><samp>\@iwhilenum</samp>: <a href="#uid2572">&#10043;</a>, <a href="#uid2579">&#10043;</a>.</div>

<div class="idx1"><samp>\@iwhilesw</samp>: <a href="#uid2572">&#10043;</a>.</div>

<div class="idx1"><samp>\@ixpt</samp>: <a href="#uid3858">&#10043;</a>.</div>

<div class="idx1"><samp>\J</samp>: <a href="#uid3875">&#10043;</a>.</div>

<div class="idx1"><samp>\j</samp>: <a href="#uid2069">&#10043;</a>.</div>

<div class="idx1">jan (bibtex field): <a href="#uid1757">&#10043;</a>.</div>

<div class="idx1"><samp>\jmath</samp>: <a href="#uid1352">&#10043;</a>.</div>

<div class="idx1"><samp>\jobname</samp>: <a href="#uid1071">&#10043;</a>, <a href="#uid2518">&#10043;</a>.</div>

<div class="idx1"><samp>\Join</samp>: <a href="#uid1477">&#10043;</a>.</div>

<div class="idx1"><samp>\jot</samp>: <a href="#uid721">&#10043;</a>.</div>

<div class="idx1">journal (bibtex field): <a href="#uid1773">&#10043;</a>.</div>

<div class="idx1">jul (bibtex field): <a href="#uid1757">&#10043;</a>.</div>

<div class="idx1">jun (bibtex field): <a href="#uid1757">&#10043;</a>.</div>

<div class="idx1"><samp>\k</samp>: <a href="#uid1110">&#10043;</a>, <a href="#uid1910">&#10043;</a>.</div>

<div class="idx1"><samp>\kappa</samp>: <a href="#uid1262">&#10043;</a>.</div>

<div class="idx1"><samp>\ker</samp>: <a href="#uid1321">&#10043;</a>.</div>

<div class="idx1"><samp>\kern</samp>: <a href="#uid260">&#10043;</a>, <a href="#uid1603">&#10043;</a>.</div>

<div class="idx1">key</div>

<div class="idx2">(bibtex field): <a href="#uid1714">&#10043;</a>, <a href="#uid1774">&#10043;</a>, <a href="#uid1819">&#10043;</a>.</div>

<div class="idx2">cite: <a href="#uid1709">&#10043;</a>.</div>

<div class="idx2">print: <a href="#uid1710">&#10043;</a>, <a href="#uid1712">&#10043;</a>.</div>

<div class="idx2">sort: <a href="#uid1715">&#10043;</a>, <a href="#uid1816">&#10043;</a>.</div>

<div class="idx1"><samp>\keyword</samp>: <a href="#uid3300">&#10043;</a>.</div>

<div class="idx1"><samp>keywords</samp>: <a href="#uid3123">&#10043;</a>, <a href="#uid3182">&#10043;</a>.</div>

<div class="idx1"><samp>\L</samp>: <a href="#uid1966">&#10043;</a>.</div>

<div class="idx1"><samp>\l</samp>: <a href="#uid1966">&#10043;</a>.</div>

<div class="idx1"><samp>\label</samp>: <a href="#uid1569">&#10043;</a>, <a href="#uid2731">&#10043;</a>.</div>

<div class="idx1"><samp>\labelitemi</samp>: <a href="#uid2799">&#10043;</a>, <a href="#uid3908">&#10043;</a>.</div>

<div class="idx1"><samp>\labelitemii</samp>: <a href="#uid2800">&#10043;</a>, <a href="#uid3909">&#10043;</a>.</div>

<div class="idx1"><samp>\labelitemiii</samp>: <a href="#uid2801">&#10043;</a>, <a href="#uid3910">&#10043;</a>.</div>

<div class="idx1"><samp>\labelitemiv</samp>: <a href="#uid2802">&#10043;</a>, <a href="#uid3911">&#10043;</a>.</div>

<div class="idx1"><samp>\labelsep</samp>: <a href="#uid323">&#10043;</a>.</div>

<div class="idx1"><samp>\labelwidth</samp>: <a href="#uid671">&#10043;</a>.</div>

<div class="idx1"><samp>\Lambda</samp>: <a href="#uid1285">&#10043;</a>.</div>

<div class="idx1"><samp>\lambda</samp>: <a href="#uid1263">&#10043;</a>.</div>

<div class="idx1"><samp>\land</samp>: <a href="#uid1379">&#10043;</a>.</div>

<div class="idx1">lang_en: <a href="#uid3113">&#10043;</a>, <a href="#uid3377">&#10043;</a>.</div>

<div class="idx1">lang_fr: <a href="#uid3114">&#10043;</a>, <a href="#uid3377">&#10043;</a>.</div>

<div class="idx1"><samp>\langle</samp>: <a href="#uid1213">&#10043;</a>, <a href="#uid1498">&#10043;</a>.</div>

<div class="idx1">Language: <a href="#uid3112">&#10043;</a>, <a href="#uid3375">&#10043;</a>.</div>

<div class="idx1"><samp>\language</samp>: <a href="#uid484">&#10043;</a>, <a href="#uid2443">&#10043;</a>.</div>

<div class="idx1"><samp>\large</samp>: <a href="#uid860">&#10043;</a>, <a href="#uid3408">&#10043;</a>, <a href="#uid3419">&#10043;</a>.</div>

<div class="idx1"><samp>\Large</samp>: <a href="#uid861">&#10043;</a>, <a href="#uid3419">&#10043;</a>.</div>

<div class="idx1"><samp>\LARGE</samp>: <a href="#uid862">&#10043;</a>, <a href="#uid3419">&#10043;</a>.</div>

<div class="idx1"><samp>\lastbox</samp>: <a href="#uid2781">&#10043;</a>.</div>

<div class="idx1"><samp>\lastkern</samp>: <a href="#uid529">&#10043;</a>, <a href="#uid2675">&#10043;</a>.</div>

<div class="idx1"><samp>\lastlinefit</samp>: <a href="#uid503">&#10043;</a>.</div>

<div class="idx1"><samp>\lastnodetype</samp>: <a href="#uid533">&#10043;</a>, <a href="#uid3787">&#10043;</a>.</div>

<div class="idx1"><samp>\lastpenalty</samp>: <a href="#uid527">&#10043;</a>, <a href="#uid2676">&#10043;</a>.</div>

<div class="idx1"><samp>\lastskip</samp>: <a href="#uid531">&#10043;</a>, <a href="#uid2677">&#10043;</a>.</div>

<div class="idx1"><samp>\LaTeX</samp>: <a href="#uid2009">&#10043;</a>.</div>

<div class="idx1"><samp>LaTeXonly</samp>: <a href="#uid2895">&#10043;</a>.</div>

<div class="idx1"><samp>latexonly</samp>: <a href="#uid2888">&#10043;</a>.</div>

<div class="idx1">latin1 (tralics option): <a href="#uid3028">&#10043;</a>.</div>

<div class="idx1"><samp>\lbrace</samp>: <a href="#uid1215">&#10043;</a>, <a href="#uid1504">&#10043;</a>.</div>

<div class="idx1"><samp>\lbrack</samp>: <a href="#uid3839">&#10043;</a>.</div>

<div class="idx1"><samp>\lccode</samp>: <a href="#uid749">&#10043;</a>, <a href="#uid1875">&#10043;</a>.</div>

<div class="idx1"><samp>\lceil</samp>: <a href="#uid1217">&#10043;</a>, <a href="#uid1505">&#10043;</a>.</div>

<div class="idx1"><samp>\ldots</samp>: <a href="#uid1234">&#10043;</a>, <a href="#uid2071">&#10043;</a>.</div>

<div class="idx1"><samp>\le</samp>: <a href="#uid1431">&#10043;</a>.</div>

<div class="idx1"><samp>\leaders</samp>: <a href="#uid2770">&#10043;</a>.</div>

<div class="idx1"><samp>\leavevmode</samp>: <a href="#uid902">&#10043;</a>, <a href="#uid1732">&#10043;</a>.</div>

<div class="idx1"><samp>\left</samp>: <a href="#uid28">&#10043;</a>, <a href="#uid33">&#10043;</a>, <a href="#uid1574">&#10043;</a>.</div>

<div class="idx1"><samp>\Leftarrow</samp>: <a href="#uid1427">&#10043;</a>.</div>

<div class="idx1"><samp>\leftarrow</samp>: <a href="#uid1455">&#10043;</a>.</div>

<div class="idx1"><samp>\leftharpoondown</samp>: <a href="#uid1469">&#10043;</a>.</div>

<div class="idx1"><samp>\leftharpoonup</samp>: <a href="#uid1468">&#10043;</a>.</div>

<div class="idx1"><samp>\lefthyphenmin</samp>: <a href="#uid486">&#10043;</a>.</div>

<div class="idx1"><samp>\leftline</samp>: <a href="#uid2873">&#10043;</a>.</div>

<div class="idx1"><samp>\leftmargin</samp>: <a href="#uid653">&#10043;</a>.</div>

<div class="idx1"><samp>\leftmargini</samp>: <a href="#uid657">&#10043;</a>.</div>

<div class="idx1"><samp>\leftmarginii</samp>: <a href="#uid659">&#10043;</a>.</div>

<div class="idx1"><samp>\leftmarginiii</samp>: <a href="#uid661">&#10043;</a>.</div>

<div class="idx1"><samp>\leftmarginiv</samp>: <a href="#uid663">&#10043;</a>.</div>

<div class="idx1"><samp>\leftmarginv</samp>: <a href="#uid665">&#10043;</a>.</div>

<div class="idx1"><samp>\leftmarginvi</samp>: <a href="#uid667">&#10043;</a>.</div>

<div class="idx1">leftquote (tralics option): <a href="#uid3030">&#10043;</a>.</div>

<div class="idx1"><samp>\Leftrightarrow</samp>: <a href="#uid1426">&#10043;</a>.</div>

<div class="idx1"><samp>\leftrightarrow</samp>: <a href="#uid1454">&#10043;</a>.</div>

<div class="idx1"><samp>\leftskip</samp>: <a href="#uid298">&#10043;</a>.</div>

<div class="idx1"><samp>\lengthtest</samp>: <a href="#uid2614">&#10043;</a>.</div>

<div class="idx1"><samp>\leq</samp>: <a href="#uid1432">&#10043;</a>.</div>

<div class="idx1"><samp>\leqno</samp>: <a href="#uid1177">&#10043;</a>.</div>

<div class="idx1"><samp>\leqslant</samp>: <a href="#uid1451">&#10043;</a>.</div>

<div class="idx1"><samp>\let</samp>: <a href="#uid196">&#10043;</a>.</div>

<div class="idx1"><samp>\lfloor</samp>: <a href="#uid1221">&#10043;</a>, <a href="#uid1507">&#10043;</a>.</div>

<div class="idx1"><samp>\lfoot</samp>: <a href="#uid2820">&#10043;</a>.</div>

<div class="idx1"><samp>\lg</samp>: <a href="#uid1322">&#10043;</a>.</div>

<div class="idx1"><samp>\lgroup</samp>: <a href="#uid1219">&#10043;</a>, <a href="#uid1502">&#10043;</a>.</div>

<div class="idx1"><samp>\lhead</samp>: <a href="#uid2816">&#10043;</a>.</div>

<div class="idx1"><samp>\lim</samp>: <a href="#uid1323">&#10043;</a>.</div>

<div class="idx1"><samp>\liminf</samp>: <a href="#uid1312">&#10043;</a>.</div>

<div class="idx1"><samp>\limits</samp>: <a href="#uid1192">&#10043;</a>, <a href="#uid1644">&#10043;</a>.</div>

<div class="idx1"><samp>\limsup</samp>: <a href="#uid1313">&#10043;</a>.</div>

<div class="idx1"><samp>\line</samp>: <a href="#uid3276">&#10043;</a>, <a href="#uid3677">&#10043;</a>.</div>

<div class="idx1"><samp>\linebreak</samp>: <a href="#uid912">&#10043;</a>.</div>

<div class="idx1"><samp>\linepenalty</samp>: <a href="#uid382">&#10043;</a>.</div>

<div class="idx1"><samp>\lineskip</samp>: <a href="#uid284">&#10043;</a>.</div>

<div class="idx1"><samp>\lineskiplimit</samp>: <a href="#uid607">&#10043;</a>.</div>

<div class="idx1"><samp>\linethickness</samp>: <a href="#uid3284">&#10043;</a>, <a href="#uid3719">&#10043;</a>.</div>

<div class="idx1"><samp>\linewidth</samp>: <a href="#uid712">&#10043;</a>.</div>

<div class="idx1"><samp>list</samp>: <a href="#uid2804">&#10043;</a>.</div>

<div class="idx1"><samp>\listparindent</samp>: <a href="#uid346">&#10043;</a>.</div>

<div class="idx1"><samp>\ll</samp>: <a href="#uid1448">&#10043;</a>.</div>

<div class="idx1"><samp>\lmoustache</samp>: <a href="#uid1223">&#10043;</a>, <a href="#uid1500">&#10043;</a>.</div>

<div class="idx1"><samp>\ln</samp>: <a href="#uid1324">&#10043;</a>.</div>

<div class="idx1"><samp>\lnot</samp>: <a href="#uid1355">&#10043;</a>.</div>

<div class="idx1"><samp>\LoadClass</samp>: <a href="#uid2448">&#10043;</a>.</div>

<div class="idx1"><samp>\LoadClassWithOptions</samp>: <a href="#uid2449">&#10043;</a>.</div>

<div class="idx1"><samp>\localisation</samp>: <a href="#uid3158">&#10043;</a>.</div>

<div class="idx1"><samp>\log</samp>: <a href="#uid1325">&#10043;</a>.</div>

<div class="idx1">log-file (tralics option): <a href="#uid3032">&#10043;</a>.</div>

<div class="idx1"><samp>\long</samp>: <a href="#uid126">&#10043;</a>, <a href="#uid143">&#10043;</a>, <a href="#uid934">&#10043;</a>.</div>

<div class="idx1"><samp>\longleftarrow</samp>: <a href="#uid1476">&#10043;</a>.</div>

<div class="idx1"><samp>\Longleftarrow</samp>: <a href="#uid1481">&#10043;</a>.</div>

<div class="idx1"><samp>\Longleftrightarrow</samp>: <a href="#uid1483">&#10043;</a>.</div>

<div class="idx1"><samp>\longleftrightarrow</samp>: <a href="#uid1482">&#10043;</a>.</div>

<div class="idx1"><samp>\longmapsto</samp>: <a href="#uid1478">&#10043;</a>.</div>

<div class="idx1"><samp>\longrightarrow</samp>: <a href="#uid1475">&#10043;</a>.</div>

<div class="idx1"><samp>\Longrightarrow</samp>: <a href="#uid1474">&#10043;</a>.</div>

<div class="idx1"><samp>\loop</samp>: <a href="#uid942">&#10043;</a>, <a href="#uid1169">&#10043;</a>, <a href="#uid2581">&#10043;</a>.</div>

<div class="idx1"><samp>\Loop</samp>: <a href="#uid943">&#10043;</a>.</div>

<div class="idx1"><samp>\looseness</samp>: <a href="#uid416">&#10043;</a>.</div>

<div class="idx1"><samp>\lor</samp>: <a href="#uid1381">&#10043;</a>.</div>

<div class="idx1"><samp>\lower</samp>: <a href="#uid1704">&#10043;</a>.</div>

<div class="idx1"><samp>\lowercase</samp>: <a href="#uid1047">&#10043;</a>, <a href="#uid1963">&#10043;</a>.</div>

<div class="idx1"><samp>\lq</samp>: <a href="#uid3836">&#10043;</a>.</div>

<div class="idx1"><samp>\lsc</samp>: <a href="#uid2843">&#10043;</a>.</div>

<div class="idx1"><samp>\@m</samp>: <a href="#uid3828">&#10043;</a>.</div>

<div class="idx1"><samp>\@M</samp>: <a href="#uid3829">&#10043;</a>.</div>

<div class="idx1"><samp>\mag</samp>: <a href="#uid412">&#10043;</a>.</div>

<div class="idx1"><samp>\mainmatter</samp>: <a href="#uid2749">&#10043;</a>.</div>

<div class="idx1"><samp>\makeatletter</samp>: <a href="#uid183">&#10043;</a>.</div>

<div class="idx1"><samp>\makeatother</samp>: <a href="#uid184">&#10043;</a>.</div>

<div class="idx1"><samp>\makebox</samp>: <a href="#uid1596">&#10043;</a>, <a href="#uid3234">&#10043;</a>, <a href="#uid3238">&#10043;</a>.</div>

<div class="idx1">makedvi (raweb action): <a href="#uid3359">&#10043;</a>.</div>

<div class="idx1">makefo (raweb action): <a href="#uid3355">&#10043;</a>.</div>

<div class="idx1">makehtml (raweb action): <a href="#uid3356">&#10043;</a>.</div>

<div class="idx1"><samp>\MakeLowercase</samp>: <a href="#uid1965">&#10043;</a>.</div>

<div class="idx1">makepdf (raweb action): <a href="#uid3358">&#10043;</a>.</div>

<div class="idx1"><samp>\MakeUppercase</samp>: <a href="#uid1964">&#10043;</a>.</div>

<div class="idx1">manual (bibtex entry type): <a href="#uid1748">&#10043;</a>.</div>

<div class="idx1"><samp>\mapsto</samp>: <a href="#uid1460">&#10043;</a>.</div>

<div class="idx1">mar (bibtex field): <a href="#uid1757">&#10043;</a>.</div>

<div class="idx1"><samp>\marginparpush</samp>: <a href="#uid701">&#10043;</a>.</div>

<div class="idx1"><samp>\marginparsep</samp>: <a href="#uid700">&#10043;</a>.</div>

<div class="idx1"><samp>\marginparwidth</samp>: <a href="#uid699">&#10043;</a>.</div>

<div class="idx1"><samp>\mark</samp>: <a href="#uid2671">&#10043;</a>.</div>

<div class="idx1"><samp>\markboth</samp>: <a href="#uid3922">&#10043;</a>.</div>

<div class="idx1"><samp>\markright</samp>: <a href="#uid3921">&#10043;</a>.</div>

<div class="idx1"><samp>\marks</samp>: <a href="#uid3805">&#10043;</a>.</div>

<div class="idx1">mastersthesis (bibtex entry type): <a href="#uid1754">&#10043;</a>.</div>

<div class="idx1">masterthesis (bibtex entry type): <a href="#uid1749">&#10043;</a>.</div>

<div class="idx1"><samp>math</samp>: <a href="#uid1188">&#10043;</a>.</div>

<div class="idx1"><samp>\mathaccent</samp>: <a href="#uid1702">&#10043;</a>, <a href="#uid1935">&#10043;</a>.</div>

<div class="idx1"><samp>\mathattribute</samp>: <a href="#uid1694">&#10043;</a>.</div>

<div class="idx1"><samp>\mathbb</samp>: <a href="#uid87">&#10043;</a>, <a href="#uid1553">&#10043;</a>.</div>

<div class="idx1"><samp>\mathbbm</samp>: <a href="#uid1563">&#10043;</a>.</div>

<div class="idx1"><samp>\mathbf</samp>: <a href="#uid85">&#10043;</a>, <a href="#uid1550">&#10043;</a>.</div>

<div class="idx1"><samp>\mathbin</samp>: <a href="#uid97">&#10043;</a>, <a href="#uid1648">&#10043;</a>.</div>

<div class="idx1"><samp>\mathcal</samp>: <a href="#uid88">&#10043;</a>, <a href="#uid1549">&#10043;</a>.</div>

<div class="idx1"><samp>\mathchar</samp>: <a href="#uid1693">&#10043;</a>.</div>

<div class="idx1"><samp>\mathchardef</samp>: <a href="#uid188">&#10043;</a>, <a href="#uid1697">&#10043;</a>.</div>

<div class="idx1"><samp>\mathchoice</samp>: <a href="#uid111">&#10043;</a>, <a href="#uid1533">&#10043;</a>, <a href="#uid1581">&#10043;</a>, <a href="#uid1682">&#10043;</a>.</div>

<div class="idx1"><samp>\mathclose</samp>: <a href="#uid100">&#10043;</a>, <a href="#uid1651">&#10043;</a>.</div>

<div class="idx1"><samp>\mathcode</samp>: <a href="#uid753">&#10043;</a>, <a href="#uid1699">&#10043;</a>, <a href="#uid1874">&#10043;</a>.</div>

<div class="idx1"><samp>\mathfrak</samp>: <a href="#uid1556">&#10043;</a>.</div>

<div class="idx1"><samp>\mathinner</samp>: <a href="#uid102">&#10043;</a>, <a href="#uid1653">&#10043;</a>.</div>

<div class="idx1"><samp>\mathit</samp>: <a href="#uid1552">&#10043;</a>.</div>

<div class="idx1"><samp>\mathmi</samp>: <a href="#uid1691">&#10043;</a>.</div>

<div class="idx1"><samp>\mathmn</samp>: <a href="#uid1692">&#10043;</a>.</div>

<div class="idx1"><samp>\mathmo</samp>: <a href="#uid1690">&#10043;</a>.</div>

<div class="idx1"><samp>\mathnormal</samp>: <a href="#uid1555">&#10043;</a>.</div>

<div class="idx1"><samp>\mathop</samp>: <a href="#uid96">&#10043;</a>, <a href="#uid1632">&#10043;</a>, <a href="#uid1647">&#10043;</a>.</div>

<div class="idx1"><samp>\mathopen</samp>: <a href="#uid99">&#10043;</a>, <a href="#uid1650">&#10043;</a>.</div>

<div class="idx1"><samp>\mathord</samp>: <a href="#uid95">&#10043;</a>, <a href="#uid1646">&#10043;</a>.</div>

<div class="idx1"><samp>\mathpunct</samp>: <a href="#uid101">&#10043;</a>, <a href="#uid1652">&#10043;</a>.</div>

<div class="idx1"><samp>\mathrel</samp>: <a href="#uid98">&#10043;</a>, <a href="#uid1649">&#10043;</a>.</div>

<div class="idx1"><samp>\mathring</samp>: <a href="#uid1511">&#10043;</a>.</div>

<div class="idx1"><samp>\mathrm</samp>: <a href="#uid1551">&#10043;</a>.</div>

<div class="idx1"><samp>\mathsf</samp>: <a href="#uid1554">&#10043;</a>.</div>

<div class="idx1"><samp>\mathsurround</samp>: <a href="#uid605">&#10043;</a>.</div>

<div class="idx1"><samp>\mathtt</samp>: <a href="#uid1548">&#10043;</a>.</div>

<div class="idx1">mathvariant (tralics option): <a href="#uid3034">&#10043;</a>.</div>

<div class="idx1"><samp>\mathversion</samp>: <a href="#uid84">&#10043;</a>, <a href="#uid520">&#10043;</a>.</div>

<div class="idx1"><samp>\@mathversion</samp>: <a href="#uid520">&#10043;</a>.</div>

<div class="idx1"><samp>matrix</samp>: <a href="#uid1196">&#10043;</a>.</div>

<div class="idx1"><samp>\max</samp>: <a href="#uid1314">&#10043;</a>.</div>

<div class="idx1"><samp>\maxdeadcycles</samp>: <a href="#uid458">&#10043;</a>.</div>

<div class="idx1"><samp>\maxdepth</samp>: <a href="#uid613">&#10043;</a>.</div>

<div class="idx1"><samp>\maxdimen</samp>: <a href="#uid723">&#10043;</a>.</div>

<div class="idx1">may (bibtex field): <a href="#uid1757">&#10043;</a>.</div>

<div class="idx1"><samp>\mbox</samp>: <a href="#uid1594">&#10043;</a>, <a href="#uid1630">&#10043;</a>, <a href="#uid3240">&#10043;</a>.</div>

<div class="idx1"><samp>\mdseries</samp>: <a href="#uid834">&#10043;</a>.</div>

<div class="idx1"><samp>\meaning</samp>: <a href="#uid1069">&#10043;</a>, <a href="#uid2516">&#10043;</a>.</div>

<div class="idx1"><samp>\medbreak</samp>: <a href="#uid917">&#10043;</a>.</div>

<div class="idx1"><samp>\medmuskip</samp>: <a href="#uid317">&#10043;</a>, <a href="#uid873">&#10043;</a>.</div>

<div class="idx1"><samp>\medskip</samp>: <a href="#uid894">&#10043;</a>.</div>

<div class="idx1"><samp>\medskipamount</samp>: <a href="#uid330">&#10043;</a>.</div>

<div class="idx1"><samp>\message</samp>: <a href="#uid2689">&#10043;</a>.</div>

<div class="idx1"><samp>\MessageBreak</samp>: <a href="#uid2921">&#10043;</a>.</div>

<div class="idx1">mfenced_separator_val: <a href="#uid3548">&#10043;</a>.</div>

<div class="idx1"><samp>\mho</samp>: <a href="#uid1343">&#10043;</a>.</div>

<div class="idx1"><samp>\@Mi</samp>: <a href="#uid3830">&#10043;</a>.</div>

<div class="idx1"><samp>\mid</samp>: <a href="#uid1417">&#10043;</a>.</div>

<div class="idx1"><samp>\middle</samp>: <a href="#uid3804">&#10043;</a>.</div>

<div class="idx1"><samp>\@Mii</samp>: <a href="#uid3831">&#10043;</a>.</div>

<div class="idx1"><samp>\@Miii</samp>: <a href="#uid3832">&#10043;</a>.</div>

<div class="idx1"><samp>\min</samp>: <a href="#uid1315">&#10043;</a>.</div>

<div class="idx1"><samp>minipage</samp>: <a href="#uid3252">&#10043;</a>.</div>

<div class="idx1"><samp>\@minus</samp>: <a href="#uid3867">&#10043;</a>.</div>

<div class="idx1">misc (bibtex entry type): <a href="#uid1750">&#10043;</a>.</div>

<div class="idx1"><samp>\@Miv</samp>: <a href="#uid3833">&#10043;</a>.</div>

<div class="idx1"><samp>\mkern</samp>: <a href="#uid901">&#10043;</a>, <a href="#uid1605">&#10043;</a>, <a href="#uid2928">&#10043;</a>.</div>

<div class="idx1"><samp>\@MM</samp>: <a href="#uid3834">&#10043;</a>.</div>

<div class="idx1">mm (unit): <a href="#uid767">&#10043;</a>.</div>

<div class="idx1"><samp>\mod</samp>: <a href="#uid3925">&#10043;</a>.</div>

<div class="idx1"><samp>\@mod</samp>: <a href="#uid1339">&#10043;</a>.</div>

<div class="idx1"><samp>\models</samp>: <a href="#uid1421">&#10043;</a>.</div>

<div class="idx1"><samp>module</samp>: <a href="#uid3165">&#10043;</a>.</div>

<div class="idx1"><samp>\moduleref</samp>: <a href="#uid3197">&#10043;</a>.</div>

<div class="idx1"><samp>\m@ne</samp>: <a href="#uid3827">&#10043;</a>.</div>

<div class="idx1"><samp>\month</samp>: <a href="#uid422">&#10043;</a>.</div>

<div class="idx1">month (bibtex field): <a href="#uid1775">&#10043;</a>.</div>

<div class="idx1"><samp>moreinfo</samp>: <a href="#uid3180">&#10043;</a>.</div>

<div class="idx1"><samp>\motcle</samp>: <a href="#uid3301">&#10043;</a>.</div>

<div class="idx1"><samp>motscle</samp>: <a href="#uid3124">&#10043;</a>, <a href="#uid3174">&#10043;</a>.</div>

<div class="idx1"><samp>\motscle</samp>: <a href="#uid57">&#10043;</a>.</div>

<div class="idx1"><samp>\moveleft</samp>: <a href="#uid2774">&#10043;</a>.</div>

<div class="idx1"><samp>\moveright</samp>: <a href="#uid2775">&#10043;</a>.</div>

<div class="idx1"><samp>\mp</samp>: <a href="#uid1401">&#10043;</a>.</div>

<div class="idx1">mpfootnote (counter): <a href="#uid595">&#10043;</a>.</div>

<div class="idx1"><samp>\mskip</samp>: <a href="#uid900">&#10043;</a>, <a href="#uid1604">&#10043;</a>.</div>

<div class="idx1"><samp>\mu</samp>: <a href="#uid1264">&#10043;</a>.</div>

<div class="idx1"><samp>\muexpr</samp>: <a href="#uid565">&#10043;</a>.</div>

<div class="idx1"><samp>\multicolumn</samp>: <a href="#uid1614">&#10043;</a>, <a href="#uid3339">&#10043;</a>.</div>

<div class="idx1"><samp>\multimap</samp>: <a href="#uid1384">&#10043;</a>.</div>

<div class="idx1"><samp>\multiply</samp>: <a href="#uid274">&#10043;</a>, <a href="#uid801">&#10043;</a>.</div>

<div class="idx1"><samp>\multiput</samp>: <a href="#uid3270">&#10043;</a>, <a href="#uid3674">&#10043;</a>.</div>

<div class="idx1"><samp>\multispan</samp>: <a href="#uid1142">&#10043;</a>.</div>

<div class="idx1"><samp>multline</samp>: <a href="#uid1186">&#10043;</a>.</div>

<div class="idx1"><samp>\muskip</samp>: <a href="#uid116">&#10043;</a>, <a href="#uid731">&#10043;</a>.</div>

<div class="idx1"><samp>\muskipdef</samp>: <a href="#uid192">&#10043;</a>.</div>

<div class="idx1"><samp>\mutoglue</samp>: <a href="#uid573">&#10043;</a>, <a href="#uid3778">&#10043;</a>.</div>

<div class="idx1"><samp>\nabla</samp>: <a href="#uid1301">&#10043;</a>.</div>

<div class="idx1"><samp>\@namedef</samp>: <a href="#uid204">&#10043;</a>.</div>

<div class="idx1"><samp>\@nameuse</samp>: <a href="#uid205">&#10043;</a>.</div>

<div class="idx1"><samp>\natural</samp>: <a href="#uid1246">&#10043;</a>, <a href="#uid2073">&#10043;</a>.</div>

<div class="idx1"><samp>\ne</samp>: <a href="#uid1429">&#10043;</a>.</div>

<div class="idx1"><samp>\nearrow</samp>: <a href="#uid1422">&#10043;</a>.</div>

<div class="idx1"><samp>\NeedsTeXFormat</samp>: <a href="#uid2471">&#10043;</a>.</div>

<div class="idx1"><samp>\neg</samp>: <a href="#uid1356">&#10043;</a>.</div>

<div class="idx1"><samp>\neq</samp>: <a href="#uid1430">&#10043;</a>.</div>

<div class="idx1"><samp>\newboolean</samp>: <a href="#uid997">&#10043;</a>, <a href="#uid2601">&#10043;</a>.</div>

<div class="idx1"><samp>\newbox</samp>: <a href="#uid210">&#10043;</a>.</div>

<div class="idx1"><samp>\newcolumntype</samp>: <a href="#uid3331">&#10043;</a>.</div>

<div class="idx1"><samp>\newcommand</samp>: <a href="#uid142">&#10043;</a>.</div>

<div class="idx1"><samp>\newcount</samp>: <a href="#uid207">&#10043;</a>, <a href="#uid208">&#10043;</a>.</div>

<div class="idx1"><samp>\newcounter</samp>: <a href="#uid207">&#10043;</a>, <a href="#uid775">&#10043;</a>.</div>

<div class="idx1"><samp>\newdimen</samp>: <a href="#uid211">&#10043;</a>, <a href="#uid218">&#10043;</a>.</div>

<div class="idx1"><samp>\newenvironment</samp>: <a href="#uid176">&#10043;</a>.</div>

<div class="idx1"><samp>\newhelp</samp>: <a href="#uid220">&#10043;</a>.</div>

<div class="idx1"><samp>\newif</samp>: <a href="#uid996">&#10043;</a>.</div>

<div class="idx1"><samp>\newinsert</samp>: <a href="#uid219">&#10043;</a>.</div>

<div class="idx1"><samp>\newlanguage</samp>: <a href="#uid216">&#10043;</a>.</div>

<div class="idx1"><samp>\newlength</samp>: <a href="#uid803">&#10043;</a>, <a href="#uid1003">&#10043;</a>.</div>

<div class="idx1"><samp>\newline</samp>: <a href="#uid908">&#10043;</a>.</div>

<div class="idx1"><samp>\newlinechar</samp>: <a href="#uid482">&#10043;</a>.</div>

<div class="idx1"><samp>\newmuskip</samp>: <a href="#uid213">&#10043;</a>.</div>

<div class="idx1"><samp>\newread</samp>: <a href="#uid214">&#10043;</a>.</div>

<div class="idx1"><samp>\newsavebox</samp>: <a href="#uid217">&#10043;</a>.</div>

<div class="idx1"><samp>\newskip</samp>: <a href="#uid212">&#10043;</a>.</div>

<div class="idx1"><samp>\newtheorem</samp>: <a href="#uid50">&#10043;</a>, <a href="#uid2632">&#10043;</a>.</div>

<div class="idx1"><samp>\newtoks</samp>: <a href="#uid209">&#10043;</a>, <a href="#uid773">&#10043;</a>.</div>

<div class="idx1"><samp>\newwrite</samp>: <a href="#uid215">&#10043;</a>.</div>

<div class="idx1"><samp>\NG</samp>: <a href="#uid1966">&#10043;</a>.</div>

<div class="idx1"><samp>\ng</samp>: <a href="#uid1966">&#10043;</a>.</div>

<div class="idx1"><samp>\ni</samp>: <a href="#uid1446">&#10043;</a>.</div>

<div class="idx1"><samp>\@nil</samp>: <a href="#uid133">&#10043;</a>.</div>

<div class="idx1"><samp>\@nnil</samp>: <a href="#uid3947">&#10043;</a>.</div>

<div class="idx1"><samp>\no</samp>: <a href="#uid2014">&#10043;</a>.</div>

<div class="idx1"><samp>\No</samp>: <a href="#uid2011">&#10043;</a>.</div>

<div class="idx1">no_footnote_hack: <a href="#uid3393">&#10043;</a>.</div>

<div class="idx1"><samp>\noalign</samp>: <a href="#uid3352">&#10043;</a>.</div>

<div class="idx1">nobibyearerror (tralics option): <a href="#uid3036">&#10043;</a>.</div>

<div class="idx1">nobibyearmodify (tralics option): <a href="#uid3038">&#10043;</a>.</div>

<div class="idx1"><samp>\noboundary</samp>: <a href="#uid2695">&#10043;</a>.</div>

<div class="idx1"><samp>\nobreak</samp>: <a href="#uid2884">&#10043;</a>.</div>

<div class="idx1"><samp>\nobreakspace</samp>: <a href="#uid880">&#10043;</a>, <a href="#uid1545">&#10043;</a>, <a href="#uid1944">&#10043;</a>, <a href="#uid2085">&#10043;</a>.</div>

<div class="idx1"><samp>\nocentering</samp>: <a href="#uid301">&#10043;</a>, <a href="#uid2708">&#10043;</a>, <a href="#uid3253">&#10043;</a>.</div>

<div class="idx1"><samp>\nocite</samp>: <a href="#uid1730">&#10043;</a>, <a href="#uid1790">&#10043;</a>, <a href="#uid1794">&#10043;</a>.</div>

<div class="idx1">noconfig: <a href="#uid3040">&#10043;</a>.</div>

<div class="idx1"><samp>\node</samp>: <a href="#uid2935">&#10043;</a>.</div>

<div class="idx1"><samp>\nodebox</samp>: <a href="#uid2953">&#10043;</a>.</div>

<div class="idx1"><samp>\nodecircle</samp>: <a href="#uid2957">&#10043;</a>.</div>

<div class="idx1"><samp>\nodeconnect</samp>: <a href="#uid2939">&#10043;</a>.</div>

<div class="idx1"><samp>\nodecurve</samp>: <a href="#uid2947">&#10043;</a>.</div>

<div class="idx1"><samp>\nodeoval</samp>: <a href="#uid2955">&#10043;</a>.</div>

<div class="idx1"><samp>\nodepoint</samp>: <a href="#uid2937">&#10043;</a>.</div>

<div class="idx1"><samp>\nodetriangle</samp>: <a href="#uid2951">&#10043;</a>.</div>

<div class="idx1">noentnames (tralics option): <a href="#uid3042">&#10043;</a>.</div>

<div class="idx1">noetex (tralics option): <a href="#uid3044">&#10043;</a>.</div>

<div class="idx1"><samp>\noexpand</samp>: <a href="#uid228">&#10043;</a>, <a href="#uid237">&#10043;</a>, <a href="#uid979">&#10043;</a>, <a href="#uid1057">&#10043;</a>, <a href="#uid2509">&#10043;</a>.</div>

<div class="idx1">nofirst: <a href="#uid1956">&#10043;</a>, <a href="#uid1957">&#10043;</a>.</div>

<div class="idx1"><samp>\noindent</samp>: <a href="#uid904">&#10043;</a>, <a href="#uid1180">&#10043;</a>.</div>

<div class="idx1">noindent: <a href="#uid1956">&#10043;</a>, <a href="#uid1957">&#10043;</a>.</div>

<div class="idx1"><samp>\nolimits</samp>: <a href="#uid1193">&#10043;</a>, <a href="#uid1645">&#10043;</a>.</div>

<div class="idx1"><samp>\nolinebreak</samp>: <a href="#uid909">&#10043;</a>, <a href="#uid1656">&#10043;</a>.</div>

<div class="idx1"><samp>\@nomathml</samp>: <a href="#uid511">&#10043;</a>, <a href="#uid1622">&#10043;</a>.</div>

<div class="idx1">nomathml (tralics option): <a href="#uid3046">&#10043;</a>.</div>

<div class="idx1">nomathvariant (tralics option): <a href="#uid3048">&#10043;</a>.</div>

<div class="idx1"><samp>\nonscript</samp>: <a href="#uid1641">&#10043;</a>.</div>

<div class="idx1"><samp>\nonstopmode</samp>: <a href="#uid2851">&#10043;</a>.</div>

<div class="idx1"><samp>\nonumber</samp>: <a href="#uid1655">&#10043;</a>.</div>

<div class="idx1"><samp>\noopsort</samp>: <a href="#uid1823">&#10043;</a>.</div>

<div class="idx1"><samp>\nopagebreak</samp>: <a href="#uid910">&#10043;</a>.</div>

<div class="idx1"><samp>\normalbaselineskip</samp>: <a href="#uid343">&#10043;</a>.</div>

<div class="idx1"><samp>\normalfont</samp>: <a href="#uid54">&#10043;</a>, <a href="#uid853">&#10043;</a>.</div>

<div class="idx1"><samp>\normallineskip</samp>: <a href="#uid344">&#10043;</a>.</div>

<div class="idx1"><samp>\normallineskiplimit</samp>: <a href="#uid685">&#10043;</a>.</div>

<div class="idx1"><samp>\normalsize</samp>: <a href="#uid854">&#10043;</a>, <a href="#uid859">&#10043;</a>, <a href="#uid3408">&#10043;</a>, <a href="#uid3419">&#10043;</a>.</div>

<div class="idx1">nostraightquotes (tralics option): <a href="#uid3054">&#10043;</a>.</div>

<div class="idx1"><samp>\not</samp>: <a href="#uid1452">&#10043;</a>, <a href="#uid2616">&#10043;</a>.</div>

<div class="idx1"><samp>\NOT</samp>: <a href="#uid2619">&#10043;</a>.</div>

<div class="idx1">note (bibtex field): <a href="#uid1776">&#10043;</a>.</div>

<div class="idx1"><samp>\notin</samp>: <a href="#uid1453">&#10043;</a>.</div>

<div class="idx1"><samp>\@notprerr</samp>: <a href="#uid2923">&#10043;</a>.</div>

<div class="idx1"><samp>\notrivialmath</samp>: <a href="#uid513">&#10043;</a>.</div>

<div class="idx1">notrivialmath (tralics option): <a href="#uid3050">&#10043;</a>.</div>

<div class="idx1">noundefmac (tralics option): <a href="#uid3052">&#10043;</a>.</div>

<div class="idx1">nov (bibtex field): <a href="#uid1757">&#10043;</a>.</div>

<div class="idx1">noxmlerror (tralics option): <a href="#uid3056">&#10043;</a>.</div>

<div class="idx1">nozerowidthelt (tralics option): <a href="#uid3058">&#10043;</a>.</div>

<div class="idx1">nozerowidthspace (tralics option): <a href="#uid3060">&#10043;</a>.</div>

<div class="idx1"><samp>\nu</samp>: <a href="#uid1265">&#10043;</a>.</div>

<div class="idx1"><samp>\null</samp>: <a href="#uid3906">&#10043;</a>.</div>

<div class="idx1"><samp>\nulldelimiterspace</samp>: <a href="#uid625">&#10043;</a>.</div>

<div class="idx1"><samp>\nullfont</samp>: <a href="#uid242">&#10043;</a>.</div>

<div class="idx1"><samp>\number</samp>: <a href="#uid225">&#10043;</a>, <a href="#uid785">&#10043;</a>, <a href="#uid936">&#10043;</a>, <a href="#uid1035">&#10043;</a>, <a href="#uid1063">&#10043;</a>, <a href="#uid2513">&#10043;</a>.</div>

<div class="idx1">number (bibtex field): <a href="#uid1777">&#10043;</a>.</div>

<div class="idx1"><samp>\numberedverbatim</samp>: <a href="#uid1959">&#10043;</a>.</div>

<div class="idx1"><samp>\numero</samp>: <a href="#uid2015">&#10043;</a>.</div>

<div class="idx1"><samp>\Numero</samp>: <a href="#uid2012">&#10043;</a>.</div>

<div class="idx1"><samp>\numexpr</samp>: <a href="#uid562">&#10043;</a>, <a href="#uid3782">&#10043;</a>.</div>

<div class="idx1"><samp>\nwarrow</samp>: <a href="#uid1424">&#10043;</a>.</div>

<div class="idx1"><samp>\o</samp>: <a href="#uid1966">&#10043;</a>, <a href="#uid2018">&#10043;</a>.</div>

<div class="idx1"><samp>\O</samp>: <a href="#uid1966">&#10043;</a>, <a href="#uid2017">&#10043;</a>.</div>

<div class="idx1"><samp>\obeylines</samp>: <a href="#uid3901">&#10043;</a>.</div>

<div class="idx1"><samp>\obeyspaces</samp>: <a href="#uid3897">&#10043;</a>.</div>

<div class="idx1">oct (bibtex field): <a href="#uid1757">&#10043;</a>.</div>

<div class="idx1"><samp>\oddsidemargin</samp>: <a href="#uid651">&#10043;</a>.</div>

<div class="idx1"><samp>\odot</samp>: <a href="#uid1395">&#10043;</a>.</div>

<div class="idx1"><samp>\oe</samp>: <a href="#uid1966">&#10043;</a>.</div>

<div class="idx1"><samp>\OE</samp>: <a href="#uid1966">&#10043;</a>.</div>

<div class="idx1">oe1 (tralics option): <a href="#uid3062">&#10043;</a>.</div>

<div class="idx1">oe1a (tralics option): <a href="#uid3062">&#10043;</a>.</div>

<div class="idx1">oe8 (tralics option): <a href="#uid3062">&#10043;</a>, <a href="#uid3080">&#10043;</a>.</div>

<div class="idx1">oe8a (tralics option): <a href="#uid3062">&#10043;</a>.</div>

<div class="idx1"><samp>\of</samp>: <a href="#uid1579">&#10043;</a>.</div>

<div class="idx1"><samp>\og</samp>: <a href="#uid2020">&#10043;</a>.</div>

<div class="idx1"><samp>\oint</samp>: <a href="#uid1371">&#10043;</a>.</div>

<div class="idx1"><samp>\Omega</samp>: <a href="#uid1292">&#10043;</a>.</div>

<div class="idx1"><samp>\omega</samp>: <a href="#uid1275">&#10043;</a>.</div>

<div class="idx1"><samp>\ominus</samp>: <a href="#uid1398">&#10043;</a>.</div>

<div class="idx1"><samp>\omit</samp>: <a href="#uid3338">&#10043;</a>.</div>

<div class="idx1"><samp>\@ne</samp>: <a href="#uid931">&#10043;</a>, <a href="#uid3821">&#10043;</a>.</div>

<div class="idx1"><samp>\@onlypreamble</samp>: <a href="#uid2433">&#10043;</a>.</div>

<div class="idx1"><samp>\openin</samp>: <a href="#uid2639">&#10043;</a>.</div>

<div class="idx1"><samp>\openout</samp>: <a href="#uid2649">&#10043;</a>.</div>

<div class="idx1"><samp>\operatorname</samp>: <a href="#uid1696">&#10043;</a>.</div>

<div class="idx1"><samp>\oplus</samp>: <a href="#uid1399">&#10043;</a>.</div>

<div class="idx1"><samp>\OptionNotUsed</samp>: <a href="#uid2470">&#10043;</a>.</div>

<div class="idx1"><samp>\or</samp>: <a href="#uid1099">&#10043;</a>, <a href="#uid2544">&#10043;</a>, <a href="#uid2618">&#10043;</a>.</div>

<div class="idx1"><samp>\OR</samp>: <a href="#uid2621">&#10043;</a>.</div>

<div class="idx1">organization (bibtex field): <a href="#uid1778">&#10043;</a>.</div>

<div class="idx1"><samp>\oslash</samp>: <a href="#uid1396">&#10043;</a>.</div>

<div class="idx1"><samp>\otimes</samp>: <a href="#uid1397">&#10043;</a>.</div>

<div class="idx1"><samp>\outer</samp>: <a href="#uid127">&#10043;</a>.</div>

<div class="idx1"><samp>\output</samp>: <a href="#uid354">&#10043;</a>.</div>

<div class="idx1">output-dir (tralics option): <a href="#uid3064">&#10043;</a>.</div>

<div class="idx1">output-file (tralics option): <a href="#uid3066">&#10043;</a>.</div>

<div class="idx1"><samp>\outputpenalty</samp>: <a href="#uid456">&#10043;</a>.</div>

<div class="idx1"><samp>\oval</samp>: <a href="#uid3274">&#10043;</a>, <a href="#uid3686">&#10043;</a>.</div>

<div class="idx1"><samp>\over</samp>: <a href="#uid110">&#10043;</a>, <a href="#uid136">&#10043;</a>, <a href="#uid1623">&#10043;</a>.</div>

<div class="idx1"><samp>\overbrace</samp>: <a href="#uid1535">&#10043;</a>.</div>

<div class="idx1"><samp>\overfullrule</samp>: <a href="#uid635">&#10043;</a>.</div>

<div class="idx1"><samp>\overleftarrow</samp>: <a href="#uid1524">&#10043;</a>.</div>

<div class="idx1"><samp>\overline</samp>: <a href="#uid1528">&#10043;</a>.</div>

<div class="idx1"><samp>\overrightarrow</samp>: <a href="#uid1523">&#10043;</a>.</div>

<div class="idx1"><samp>\overset</samp>: <a href="#uid1532">&#10043;</a>.</div>

<div class="idx1"><samp>\overwithdelims</samp>: <a href="#uid1623">&#10043;</a>.</div>

<div class="idx1"><samp>\owns</samp>: <a href="#uid1456">&#10043;</a>.</div>

<div class="idx1"><samp>\P</samp>: <a href="#uid2022">&#10043;</a>.</div>

<div class="idx1"><samp>\p@</samp>: <a href="#uid647">&#10043;</a>.</div>

<div class="idx1"><samp>\PackageError</samp>: <a href="#uid2910">&#10043;</a>.</div>

<div class="idx1"><samp>\PackageErrorNoLine</samp>: <a href="#uid2911">&#10043;</a>.</div>

<div class="idx1"><samp>\PackageInfo</samp>: <a href="#uid2914">&#10043;</a>.</div>

<div class="idx1"><samp>\PackageWarning</samp>: <a href="#uid2918">&#10043;</a>.</div>

<div class="idx1"><samp>\PackageWarningNoLine</samp>: <a href="#uid2919">&#10043;</a>.</div>

<div class="idx1">page (counter): <a href="#uid575">&#10043;</a>, <a href="#uid3949">&#10043;</a>.</div>

<div class="idx1"><samp>\pagebreak</samp>: <a href="#uid911">&#10043;</a>.</div>

<div class="idx1"><samp>\pagedepth</samp>: <a href="#uid761">&#10043;</a>.</div>

<div class="idx1"><samp>\pagediscards</samp>: <a href="#uid3802">&#10043;</a>.</div>

<div class="idx1"><samp>\pagefilllstretch</samp>: <a href="#uid760">&#10043;</a>.</div>

<div class="idx1"><samp>\pagefillstretch</samp>: <a href="#uid759">&#10043;</a>.</div>

<div class="idx1"><samp>\pagefilstretch</samp>: <a href="#uid758">&#10043;</a>.</div>

<div class="idx1"><samp>\pagegoal</samp>: <a href="#uid754">&#10043;</a>.</div>

<div class="idx1"><samp>\pageref</samp>: <a href="#uid2737">&#10043;</a>, <a href="#uid3951">&#10043;</a>.</div>

<div class="idx1">pages (bibtex field): <a href="#uid1779">&#10043;</a>.</div>

<div class="idx1"><samp>\pageshrink</samp>: <a href="#uid756">&#10043;</a>.</div>

<div class="idx1"><samp>\pagestretch</samp>: <a href="#uid757">&#10043;</a>.</div>

<div class="idx1"><samp>\pagetotal</samp>: <a href="#uid755">&#10043;</a>.</div>

<div class="idx1"><samp>\paperheight</samp>: <a href="#uid718">&#10043;</a>.</div>

<div class="idx1"><samp>\paperwidth</samp>: <a href="#uid719">&#10043;</a>.</div>

<div class="idx1"><samp>\par</samp>: <a href="#uid906">&#10043;</a>, <a href="#uid1038">&#10043;</a>.</div>

<div class="idx1"><samp>\paragraph</samp>: <a href="#uid2744">&#10043;</a>, <a href="#uid3481">&#10043;</a>.</div>

<div class="idx1">paragraph (counter): <a href="#uid588">&#10043;</a>.</div>

<div class="idx1"><samp>\paragraphmark</samp>: <a href="#uid3934">&#10043;</a>.</div>

<div class="idx1"><samp>\parallel</samp>: <a href="#uid1416">&#10043;</a>.</div>

<div class="idx1">param (tralics option): <a href="#uid3068">&#10043;</a>.</div>

<div class="idx1"><samp>\parbox</samp>: <a href="#uid3255">&#10043;</a>, <a href="#uid3327">&#10043;</a>.</div>

<div class="idx1"><samp>\parfillskip</samp>: <a href="#uid313">&#10043;</a>.</div>

<div class="idx1"><samp>\parindent</samp>: <a href="#uid603">&#10043;</a>, <a href="#uid905">&#10043;</a>.</div>

<div class="idx1"><samp>\parsep</samp>: <a href="#uid325">&#10043;</a>.</div>

<div class="idx1"><samp>\parshape</samp>: <a href="#uid352">&#10043;</a>.</div>

<div class="idx1"><samp>\parshapedimen</samp>: <a href="#uid560">&#10043;</a>, <a href="#uid3795">&#10043;</a>.</div>

<div class="idx1"><samp>\parshapeindent</samp>: <a href="#uid559">&#10043;</a>, <a href="#uid3794">&#10043;</a>.</div>

<div class="idx1"><samp>\parshapelength</samp>: <a href="#uid558">&#10043;</a>, <a href="#uid3793">&#10043;</a>.</div>

<div class="idx1"><samp>\parskip</samp>: <a href="#uid288">&#10043;</a>.</div>

<div class="idx1"><samp>\part</samp>: <a href="#uid2739">&#10043;</a>, <a href="#uid3480">&#10043;</a>.</div>

<div class="idx1">part (counter): <a href="#uid582">&#10043;</a>.</div>

<div class="idx1"><samp>\partial</samp>: <a href="#uid1298">&#10043;</a>.</div>

<div class="idx1"><samp>participant</samp>: <a href="#uid3181">&#10043;</a>, <a href="#uid3190">&#10043;</a>.</div>

<div class="idx1"><samp>participante</samp>: <a href="#uid3190">&#10043;</a>.</div>

<div class="idx1"><samp>participantes</samp>: <a href="#uid3190">&#10043;</a>.</div>

<div class="idx1"><samp>participants</samp>: <a href="#uid3189">&#10043;</a>.</div>

<div class="idx1"><samp>\partopsep</samp>: <a href="#uid348">&#10043;</a>.</div>

<div class="idx1"><samp>\PassOptionToClass</samp>: <a href="#uid2463">&#10043;</a>.</div>

<div class="idx1"><samp>\PassOptionToPackage</samp>: <a href="#uid2464">&#10043;</a>.</div>

<div class="idx1"><samp>\patterns</samp>: <a href="#uid2865">&#10043;</a>, <a href="#uid2978">&#10043;</a>.</div>

<div class="idx1"><samp>\pausing</samp>: <a href="#uid434">&#10043;</a>.</div>

<div class="idx1">pc (unit): <a href="#uid767">&#10043;</a>.</div>

<div class="idx1"><samp>\penalty</samp>: <a href="#uid261">&#10043;</a>, <a href="#uid2673">&#10043;</a>.</div>

<div class="idx1"><samp>\perp</samp>: <a href="#uid1463">&#10043;</a>.</div>

<div class="idx1"><samp>\pers</samp>: <a href="#uid3199">&#10043;</a>.</div>

<div class="idx1"><samp>\persA</samp>: <a href="#uid3199">&#10043;</a>.</div>

<div class="idx1"><samp>\@persA</samp>: <a href="#uid3203">&#10043;</a>.</div>

<div class="idx1"><samp>\persB</samp>: <a href="#uid3201">&#10043;</a>.</div>

<div class="idx1"><samp>\@persB</samp>: <a href="#uid3205">&#10043;</a>.</div>

<div class="idx1">phdthesis (bibtex entry type): <a href="#uid1751">&#10043;</a>.</div>

<div class="idx1"><samp>\Phi</samp>: <a href="#uid1289">&#10043;</a>.</div>

<div class="idx1"><samp>\phi</samp>: <a href="#uid1272">&#10043;</a>.</div>

<div class="idx1"><samp>\Pi</samp>: <a href="#uid1290">&#10043;</a>.</div>

<div class="idx1"><samp>\pi</samp>: <a href="#uid1267">&#10043;</a>.</div>

<div class="idx1"><samp>picture</samp>: <a href="#uid3229">&#10043;</a>.</div>

<div class="idx1"><samp>\@plus</samp>: <a href="#uid3867">&#10043;</a>.</div>

<div class="idx1"><samp>\pm</samp>: <a href="#uid1402">&#10043;</a>.</div>

<div class="idx1"><samp>pmatrix</samp>: <a href="#uid1197">&#10043;</a>.</div>

<div class="idx1"><samp>\pmod</samp>: <a href="#uid3927">&#10043;</a>.</div>

<div class="idx1"><samp>\pod</samp>: <a href="#uid3928">&#10043;</a>.</div>

<div class="idx1"><samp>\postdisplaypenalty</samp>: <a href="#uid402">&#10043;</a>.</div>

<div class="idx1"><samp>\pounds</samp>: <a href="#uid2109">&#10043;</a>.</div>

<div class="idx1"><samp>\Pr</samp>: <a href="#uid1326">&#10043;</a>.</div>

<div class="idx1">preamble (bibtex keyword): <a href="#uid1759">&#10043;</a>.</div>

<div class="idx1"><samp>\prec</samp>: <a href="#uid1439">&#10043;</a>.</div>

<div class="idx1"><samp>\preceq</samp>: <a href="#uid1438">&#10043;</a>.</div>

<div class="idx1"><samp>\predisplaydirection</samp>: <a href="#uid502">&#10043;</a>, <a href="#uid3812">&#10043;</a>.</div>

<div class="idx1"><samp>\predisplaypenalty</samp>: <a href="#uid400">&#10043;</a>.</div>

<div class="idx1"><samp>\predisplaysize</samp>: <a href="#uid629">&#10043;</a>.</div>

<div class="idx1"><samp>\pretolerance</samp>: <a href="#uid378">&#10043;</a>.</div>

<div class="idx1"><samp>\prevdepth</samp>: <a href="#uid764">&#10043;</a>.</div>

<div class="idx1"><samp>\prevgraf</samp>: <a href="#uid765">&#10043;</a>.</div>

<div class="idx1"><samp>\prime</samp>: <a href="#uid108">&#10043;</a>.</div>

<div class="idx1"><samp>\ProcessOptions</samp>: <a href="#uid2467">&#10043;</a>.</div>

<div class="idx1"><samp>\proclaim</samp>: <a href="#uid49">&#10043;</a>.</div>

<div class="idx1"><samp>\prod</samp>: <a href="#uid1367">&#10043;</a>.</div>

<div class="idx1">profession_vals: <a href="#uid3371">&#10043;</a>.</div>

<div class="idx1"><samp>\project</samp>: <a href="#uid3151">&#10043;</a>.</div>

<div class="idx1"><samp>\projet</samp>: <a href="#uid3152">&#10043;</a>.</div>

<div class="idx1"><samp>\projlim</samp>: <a href="#uid1317">&#10043;</a>.</div>

<div class="idx1"><samp>\propto</samp>: <a href="#uid1411">&#10043;</a>.</div>

<div class="idx1"><samp>\protect</samp>: <a href="#uid235">&#10043;</a>, <a href="#uid2868">&#10043;</a>.</div>

<div class="idx1"><samp>\protected</samp>: <a href="#uid128">&#10043;</a>, <a href="#uid3765">&#10043;</a>.</div>

<div class="idx1"><samp>\provideboolean</samp>: <a href="#uid2602">&#10043;</a>.</div>

<div class="idx1"><samp>\providecommand</samp>: <a href="#uid147">&#10043;</a>.</div>

<div class="idx1"><samp>\ProvidesClass</samp>: <a href="#uid2452">&#10043;</a>.</div>

<div class="idx1"><samp>\ProvidesFile</samp>: <a href="#uid2454">&#10043;</a>.</div>

<div class="idx1"><samp>\ProvidesPackage</samp>: <a href="#uid2453">&#10043;</a>.</div>

<div class="idx1">ps (tralics option): <a href="#uid3070">&#10043;</a>.</div>

<div class="idx1"><samp>\psfig</samp>: <a href="#uid2838">&#10043;</a>.</div>

<div class="idx1"><samp>\psi</samp>: <a href="#uid1274">&#10043;</a>.</div>

<div class="idx1"><samp>\Psi</samp>: <a href="#uid1291">&#10043;</a>.</div>

<div class="idx1">pt (unit): <a href="#uid767">&#10043;</a>.</div>

<div class="idx1">publisher (bibtex field): <a href="#uid1780">&#10043;</a>.</div>

<div class="idx1"><samp>\put</samp>: <a href="#uid3261">&#10043;</a>, <a href="#uid3665">&#10043;</a>.</div>

<div class="idx1"><samp>\p@xxx</samp>: <a href="#uid779">&#10043;</a>.</div>

<div class="idx1"><samp>\qbezier</samp>: <a href="#uid3259">&#10043;</a>.</div>

<div class="idx1"><samp>\qquad</samp>: <a href="#uid882">&#10043;</a>, <a href="#uid1236">&#10043;</a>, <a href="#uid2077">&#10043;</a>.</div>

<div class="idx1"><samp>\quad</samp>: <a href="#uid881">&#10043;</a>, <a href="#uid1235">&#10043;</a>, <a href="#uid2075">&#10043;</a>.</div>

<div class="idx1"><samp>quotation</samp>: <a href="#uid2904">&#10043;</a>, <a href="#uid3592">&#10043;</a>.</div>

<div class="idx1"><samp>quote</samp>: <a href="#uid2903">&#10043;</a>, <a href="#uid3591">&#10043;</a>.</div>

<div class="idx1"><samp>\r</samp>: <a href="#uid1119">&#10043;</a>, <a href="#uid1916">&#10043;</a>.</div>

<div class="idx1">ra-debug (tralics option): <a href="#uid3072">&#10043;</a>.</div>

<div class="idx1"><samp>\radical</samp>: <a href="#uid1701">&#10043;</a>.</div>

<div class="idx1"><samp>\raggedleft</samp>: <a href="#uid2899">&#10043;</a>.</div>

<div class="idx1"><samp>\raggedright</samp>: <a href="#uid2898">&#10043;</a>.</div>

<div class="idx1"><samp>\raise</samp>: <a href="#uid1703">&#10043;</a>.</div>

<div class="idx1"><samp>\RAlabel</samp>: <a href="#uid2862">&#10043;</a>.</div>

<div class="idx1"><samp>\rangle</samp>: <a href="#uid1214">&#10043;</a>, <a href="#uid1497">&#10043;</a>.</div>

<div class="idx1"><samp>RAsection</samp>: <a href="#uid3186">&#10043;</a>.</div>

<div class="idx1"><samp>\RAstartprojet</samp>: <a href="#uid3184">&#10043;</a>.</div>

<div class="idx1"><samp>\ratio</samp>: <a href="#uid808">&#10043;</a>, <a href="#uid2595">&#10043;</a>.</div>

<div class="idx1"><samp>rawhtml</samp>: <a href="#uid2894">&#10043;</a>.</div>

<div class="idx1"><samp>\rbrace</samp>: <a href="#uid1216">&#10043;</a>, <a href="#uid1503">&#10043;</a>.</div>

<div class="idx1"><samp>\rbrack</samp>: <a href="#uid3840">&#10043;</a>.</div>

<div class="idx1"><samp>\rceil</samp>: <a href="#uid1218">&#10043;</a>, <a href="#uid1506">&#10043;</a>.</div>

<div class="idx1"><samp>\Re</samp>: <a href="#uid1296">&#10043;</a>.</div>

<div class="idx1"><samp>\read</samp>: <a href="#uid2645">&#10043;</a>.</div>

<div class="idx1"><samp>\readline</samp>: <a href="#uid3798">&#10043;</a>.</div>

<div class="idx1"><samp>\real</samp>: <a href="#uid808">&#10043;</a>, <a href="#uid2597">&#10043;</a>.</div>

<div class="idx1"><samp>\@reevaluate</samp>: <a href="#uid2932">&#10043;</a>.</div>

<div class="idx1"><samp>\ref</samp>: <a href="#uid2735">&#10043;</a>.</div>

<div class="idx1">refer (bibtex type): <a href="#uid1721">&#10043;</a>, <a href="#uid1793">&#10043;</a>.</div>

<div class="idx1"><samp>\refercite</samp>: <a href="#uid1724">&#10043;</a>.</div>

<div class="idx1"><samp>\refname</samp>: <a href="#uid1862">&#10043;</a>, <a href="#uid3884">&#10043;</a>.</div>

<div class="idx1"><samp>\refstepcounter</samp>: <a href="#uid810">&#10043;</a>, <a href="#uid1151">&#10043;</a>.</div>

<div class="idx1"><samp>\relax</samp>: <a href="#uid236">&#10043;</a>, <a href="#uid772">&#10043;</a>, <a href="#uid782">&#10043;</a>, <a href="#uid948">&#10043;</a>, <a href="#uid1576">&#10043;</a>, <a href="#uid2647">&#10043;</a>, <a href="#uid3785">&#10043;</a>.</div>

<div class="idx1"><samp>\relpenalty</samp>: <a href="#uid398">&#10043;</a>.</div>

<div class="idx1"><samp>\renewcommand</samp>: <a href="#uid145">&#10043;</a>.</div>

<div class="idx1"><samp>\renewenvironment</samp>: <a href="#uid146">&#10043;</a>.</div>

<div class="idx1"><samp>\repeat</samp>: <a href="#uid944">&#10043;</a>, <a href="#uid974">&#10043;</a>.</div>

<div class="idx1"><samp>\RequirePackage</samp>: <a href="#uid2447">&#10043;</a>.</div>

<div class="idx1"><samp>\RequirePackageWithOptions</samp>: <a href="#uid2450">&#10043;</a>.</div>

<div class="idx1"><samp>\rfloor</samp>: <a href="#uid1222">&#10043;</a>, <a href="#uid1508">&#10043;</a>.</div>

<div class="idx1"><samp>\rfoot</samp>: <a href="#uid2821">&#10043;</a>.</div>

<div class="idx1"><samp>\rgroup</samp>: <a href="#uid1220">&#10043;</a>, <a href="#uid1501">&#10043;</a>.</div>

<div class="idx1"><samp>\rhead</samp>: <a href="#uid2817">&#10043;</a>.</div>

<div class="idx1"><samp>\rho</samp>: <a href="#uid1268">&#10043;</a>.</div>

<div class="idx1"><samp>\right</samp>: <a href="#uid34">&#10043;</a>, <a href="#uid1575">&#10043;</a>.</div>

<div class="idx1"><samp>\rightarrow</samp>: <a href="#uid1458">&#10043;</a>.</div>

<div class="idx1"><samp>\Rightarrow</samp>: <a href="#uid1428">&#10043;</a>.</div>

<div class="idx1"><samp>\rightharpoondown</samp>: <a href="#uid1471">&#10043;</a>.</div>

<div class="idx1"><samp>\rightharpoonup</samp>: <a href="#uid1470">&#10043;</a>.</div>

<div class="idx1"><samp>\righthyphenmin</samp>: <a href="#uid488">&#10043;</a>.</div>

<div class="idx1"><samp>\rightline</samp>: <a href="#uid2874">&#10043;</a>.</div>

<div class="idx1"><samp>\rightmargin</samp>: <a href="#uid655">&#10043;</a>.</div>

<div class="idx1">rightquote (tralics option): <a href="#uid3074">&#10043;</a>.</div>

<div class="idx1"><samp>\rightskip</samp>: <a href="#uid300">&#10043;</a>.</div>

<div class="idx1"><samp>\rm</samp>: <a href="#uid831">&#10043;</a>, <a href="#uid1557">&#10043;</a>, <a href="#uid1632">&#10043;</a>.</div>

<div class="idx1"><samp>\rmfamily</samp>: <a href="#uid825">&#10043;</a>.</div>

<div class="idx1"><samp>\rmoustache</samp>: <a href="#uid1224">&#10043;</a>, <a href="#uid1499">&#10043;</a>.</div>

<div class="idx1"><samp>\@roman</samp>: <a href="#uid795">&#10043;</a>.</div>

<div class="idx1"><samp>\@Roman</samp>: <a href="#uid796">&#10043;</a>.</div>

<div class="idx1"><samp>\Roman</samp>: <a href="#uid790">&#10043;</a>, <a href="#uid1161">&#10043;</a>.</div>

<div class="idx1"><samp>\roman</samp>: <a href="#uid789">&#10043;</a>, <a href="#uid1160">&#10043;</a>.</div>

<div class="idx1"><samp>\Romannumeral</samp>: <a href="#uid787">&#10043;</a>, <a href="#uid1066">&#10043;</a>, <a href="#uid2522">&#10043;</a>.</div>

<div class="idx1"><samp>\romannumeral</samp>: <a href="#uid786">&#10043;</a>, <a href="#uid1035">&#10043;</a>, <a href="#uid1065">&#10043;</a>, <a href="#uid2514">&#10043;</a>.</div>

<div class="idx1"><samp>\root</samp>: <a href="#uid1541">&#10043;</a>.</div>

<div class="idx1"><samp>\rotatebox</samp>: <a href="#uid3248">&#10043;</a>, <a href="#uid3508">&#10043;</a>, <a href="#uid3511">&#10043;</a>.</div>

<div class="idx1"><samp>\rq</samp>: <a href="#uid3837">&#10043;</a>.</div>

<div class="idx1"><samp>\rrrt</samp>: <a href="#uid2719">&#10043;</a>.</div>

<div class="idx1"><samp>\S</samp>: <a href="#uid2024">&#10043;</a>.</div>

<div class="idx1"><samp>\@sanitize</samp>: <a href="#uid3946">&#10043;</a>.</div>

<div class="idx1"><samp>\SaveVerb</samp>: <a href="#uid1148">&#10043;</a>, <a href="#uid1947">&#10043;</a>.</div>

<div class="idx1"><samp>\savingdiscards</samp>: <a href="#uid504">&#10043;</a>, <a href="#uid3801">&#10043;</a>.</div>

<div class="idx1"><samp>\savinghyphcodes</samp>: <a href="#uid505">&#10043;</a>, <a href="#uid3800">&#10043;</a>.</div>

<div class="idx1"><samp>\sb</samp>: <a href="#uid197">&#10043;</a>.</div>

<div class="idx1"><samp>\sbox</samp>: <a href="#uid1030">&#10043;</a>.</div>

<div class="idx1"><samp>\sc</samp>: <a href="#uid849">&#10043;</a>.</div>

<div class="idx1"><samp>\scalebox</samp>: <a href="#uid3246">&#10043;</a>, <a href="#uid3497">&#10043;</a>.</div>

<div class="idx1"><samp>\scaleput</samp>: <a href="#uid3268">&#10043;</a>, <a href="#uid3671">&#10043;</a>.</div>

<div class="idx1"><samp>\scantokens</samp>: <a href="#uid3766">&#10043;</a>.</div>

<div class="idx1">school (bibtex field): <a href="#uid1781">&#10043;</a>.</div>

<div class="idx1"><samp>\scriptscriptfont</samp>: <a href="#uid245">&#10043;</a>.</div>

<div class="idx1"><samp>\scriptscriptstyle</samp>: <a href="#uid107">&#10043;</a>, <a href="#uid1590">&#10043;</a>, <a href="#uid1639">&#10043;</a>.</div>

<div class="idx1"><samp>\scriptscritpfont</samp>: <a href="#uid823">&#10043;</a>.</div>

<div class="idx1"><samp>\scriptsize</samp>: <a href="#uid856">&#10043;</a>, <a href="#uid3419">&#10043;</a>.</div>

<div class="idx1"><samp>\scriptspace</samp>: <a href="#uid627">&#10043;</a>.</div>

<div class="idx1"><samp>\scriptstyle</samp>: <a href="#uid106">&#10043;</a>, <a href="#uid1589">&#10043;</a>, <a href="#uid1638">&#10043;</a>.</div>

<div class="idx1"><samp>\scritpfont</samp>: <a href="#uid822">&#10043;</a>.</div>

<div class="idx1"><samp>\scrollmode</samp>: <a href="#uid2852">&#10043;</a>.</div>

<div class="idx1"><samp>\scshape</samp>: <a href="#uid842">&#10043;</a>, <a href="#uid3425">&#10043;</a>.</div>

<div class="idx1"><samp>\searrow</samp>: <a href="#uid1423">&#10043;</a>.</div>

<div class="idx1"><samp>\sec</samp>: <a href="#uid1337">&#10043;</a>.</div>

<div class="idx1"><samp>\@secondoftwo</samp>: <a href="#uid1129">&#10043;</a>, <a href="#uid2485">&#10043;</a>.</div>

<div class="idx1"><samp>\section</samp>: <a href="#uid22">&#10043;</a>, <a href="#uid2741">&#10043;</a>, <a href="#uid3480">&#10043;</a>.</div>

<div class="idx1">section (counter): <a href="#uid586">&#10043;</a>.</div>

<div class="idx1">section_vals: <a href="#uid3366">&#10043;</a>.</div>

<div class="idx1"><samp>\sectionmark</samp>: <a href="#uid3931">&#10043;</a>.</div>

<div class="idx1"><samp>\selectfont</samp>: <a href="#uid55">&#10043;</a>, <a href="#uid820">&#10043;</a>.</div>

<div class="idx1">sep (bibtex field): <a href="#uid1757">&#10043;</a>.</div>

<div class="idx1">series: <a href="#uid1782">&#10043;</a>.</div>

<div class="idx1"><samp>\seriesdefault</samp>: <a href="#uid3871">&#10043;</a>.</div>

<div class="idx1"><samp>\setboolean</samp>: <a href="#uid998">&#10043;</a>, <a href="#uid2604">&#10043;</a>.</div>

<div class="idx1"><samp>\setbox</samp>: <a href="#uid195">&#10043;</a>.</div>

<div class="idx1">setcounter: <a href="#uid781">&#10043;</a>.</div>

<div class="idx1"><samp>\setcounter</samp>: <a href="#uid1153">&#10043;</a>, <a href="#uid2587">&#10043;</a>.</div>

<div class="idx1"><samp>\setlanguage</samp>: <a href="#uid2685">&#10043;</a>.</div>

<div class="idx1"><samp>\setlength</samp>: <a href="#uid804">&#10043;</a>, <a href="#uid1156">&#10043;</a>, <a href="#uid2583">&#10043;</a>.</div>

<div class="idx1"><samp>\setminus</samp>: <a href="#uid1405">&#10043;</a>.</div>

<div class="idx1"><samp>\@setmode</samp>: <a href="#uid3944">&#10043;</a>.</div>

<div class="idx1"><samp>\sf</samp>: <a href="#uid832">&#10043;</a>, <a href="#uid1558">&#10043;</a>.</div>

<div class="idx1"><samp>\sfcode</samp>: <a href="#uid747">&#10043;</a>, <a href="#uid1877">&#10043;</a>.</div>

<div class="idx1"><samp>\sffamily</samp>: <a href="#uid827">&#10043;</a>, <a href="#uid3433">&#10043;</a>.</div>

<div class="idx1"><samp>\shapedefault</samp>: <a href="#uid3872">&#10043;</a>.</div>

<div class="idx1"><samp>\sharp</samp>: <a href="#uid1245">&#10043;</a>, <a href="#uid2079">&#10043;</a>.</div>

<div class="idx1">shell-escape (tralics option): <a href="#uid3076">&#10043;</a>.</div>

<div class="idx1"><samp>\shipout</samp>: <a href="#uid763">&#10043;</a>, <a href="#uid2683">&#10043;</a>.</div>

<div class="idx1"><samp>\show</samp>: <a href="#uid267">&#10043;</a>, <a href="#uid3207">&#10043;</a>.</div>

<div class="idx1"><samp>\showbox</samp>: <a href="#uid256">&#10043;</a>, <a href="#uid3209">&#10043;</a>.</div>

<div class="idx1"><samp>\showboxbreadth</samp>: <a href="#uid258">&#10043;</a>, <a href="#uid426">&#10043;</a>.</div>

<div class="idx1"><samp>\showboxdept</samp>: <a href="#uid259">&#10043;</a>, <a href="#uid428">&#10043;</a>.</div>

<div class="idx1"><samp>\showgroups</samp>: <a href="#uid3768">&#10043;</a>.</div>

<div class="idx1"><samp>\showlists</samp>: <a href="#uid3210">&#10043;</a>.</div>

<div class="idx1"><samp>\showthe</samp>: <a href="#uid269">&#10043;</a>, <a href="#uid272">&#10043;</a>, <a href="#uid3208">&#10043;</a>.</div>

<div class="idx1"><samp>\showtokens</samp>: <a href="#uid3797">&#10043;</a>.</div>

<div class="idx1"><samp>\sigma</samp>: <a href="#uid1269">&#10043;</a>.</div>

<div class="idx1"><samp>\Sigma</samp>: <a href="#uid1287">&#10043;</a>.</div>

<div class="idx1">silent (tralics option): <a href="#uid3078">&#10043;</a>.</div>

<div class="idx1"><samp>\sim</samp>: <a href="#uid1461">&#10043;</a>.</div>

<div class="idx1"><samp>\simeq</samp>: <a href="#uid1462">&#10043;</a>.</div>

<div class="idx1"><samp>\sin</samp>: <a href="#uid90">&#10043;</a>, <a href="#uid1338">&#10043;</a>.</div>

<div class="idx1"><samp>\sinh</samp>: <a href="#uid1340">&#10043;</a>.</div>

<div class="idx1"><samp>\sixt@@n</samp>: <a href="#uid3824">&#10043;</a>.</div>

<div class="idx1"><samp>\skewchar</samp>: <a href="#uid247">&#10043;</a>, <a href="#uid516">&#10043;</a>.</div>

<div class="idx1"><samp>\skip</samp>: <a href="#uid115">&#10043;</a>, <a href="#uid729">&#10043;</a>, <a href="#uid1004">&#10043;</a>.</div>

<div class="idx1"><samp>\skipdef</samp>: <a href="#uid191">&#10043;</a>.</div>

<div class="idx1"><samp>\sl</samp>: <a href="#uid848">&#10043;</a>, <a href="#uid1562">&#10043;</a>.</div>

<div class="idx1"><samp>\slash</samp>: <a href="#uid2026">&#10043;</a>.</div>

<div class="idx1"><samp>\sloppy</samp>: <a href="#uid2880">&#10043;</a>.</div>

<div class="idx1"><samp>\slshape</samp>: <a href="#uid841">&#10043;</a>, <a href="#uid3425">&#10043;</a>.</div>

<div class="idx1"><samp>\small</samp>: <a href="#uid858">&#10043;</a>, <a href="#uid3419">&#10043;</a>.</div>

<div class="idx1"><samp>\smallbreak</samp>: <a href="#uid916">&#10043;</a>.</div>

<div class="idx1"><samp>\smallint</samp>: <a href="#uid1373">&#10043;</a>.</div>

<div class="idx1"><samp>\smallskip</samp>: <a href="#uid895">&#10043;</a>.</div>

<div class="idx1"><samp>\smallskipamount</samp>: <a href="#uid329">&#10043;</a>.</div>

<div class="idx1"><samp>\smile</samp>: <a href="#uid1466">&#10043;</a>.</div>

<div class="idx1"><samp>\so</samp>: <a href="#uid1938">&#10043;</a>.</div>

<div class="idx1"><samp>\SortNoop</samp>: <a href="#uid1822">&#10043;</a>.</div>

<div class="idx1"><samp>\sortnoop</samp>: <a href="#uid1821">&#10043;</a>.</div>

<div class="idx1"><samp>\sp</samp>: <a href="#uid197">&#10043;</a>.</div>

<div class="idx1">sp (unit): <a href="#uid767">&#10043;</a>.</div>

<div class="idx1"><samp>\space</samp>: <a href="#uid868">&#10043;</a>, <a href="#uid878">&#10043;</a>, <a href="#uid1027">&#10043;</a>, <a href="#uid3880">&#10043;</a>.</div>

<div class="idx1">space: <a href="#uid15">&#10043;</a>, <a href="#uid30">&#10043;</a>, <a href="#uid131">&#10043;</a>, <a href="#uid165">&#10043;</a>, <a href="#uid927">&#10043;</a>, <a href="#uid1026">&#10043;</a>, <a href="#uid1039">&#10043;</a>.</div>

<div class="idx1"><samp>\spacefactor</samp>: <a href="#uid462">&#10043;</a>.</div>

<div class="idx1"><samp>\@spaces</samp>: <a href="#uid3891">&#10043;</a>.</div>

<div class="idx1"><samp>\spaceskip</samp>: <a href="#uid309">&#10043;</a>, <a href="#uid463">&#10043;</a>.</div>

<div class="idx1"><samp>\spadesuit</samp>: <a href="#uid1347">&#10043;</a>.</div>

<div class="idx1"><samp>\span</samp>: <a href="#uid3349">&#10043;</a>.</div>

<div class="idx1"><samp>\special</samp>: <a href="#uid263">&#10043;</a>, <a href="#uid2864">&#10043;</a>, <a href="#uid2979">&#10043;</a>.</div>

<div class="idx1"><samp>split</samp>: <a href="#uid1185">&#10043;</a>.</div>

<div class="idx1"><samp>\splitbotmark</samp>: <a href="#uid1106">&#10043;</a>, <a href="#uid2491">&#10043;</a>.</div>

<div class="idx1"><samp>\splitbotmarks</samp>: <a href="#uid2497">&#10043;</a>, <a href="#uid3810">&#10043;</a>.</div>

<div class="idx1"><samp>\splitdiscards</samp>: <a href="#uid3803">&#10043;</a>.</div>

<div class="idx1"><samp>\splitfirstmark</samp>: <a href="#uid1105">&#10043;</a>, <a href="#uid2490">&#10043;</a>.</div>

<div class="idx1"><samp>\splitfirstmarks</samp>: <a href="#uid2496">&#10043;</a>, <a href="#uid3809">&#10043;</a>.</div>

<div class="idx1"><samp>\splitmaxdepth</samp>: <a href="#uid615">&#10043;</a>.</div>

<div class="idx1"><samp>\splittopskip</samp>: <a href="#uid305">&#10043;</a>.</div>

<div class="idx1"><samp>\sqcap</samp>: <a href="#uid1387">&#10043;</a>.</div>

<div class="idx1"><samp>\sqcup</samp>: <a href="#uid1388">&#10043;</a>.</div>

<div class="idx1"><samp>\sqrt</samp>: <a href="#uid1540">&#10043;</a>.</div>

<div class="idx1"><samp>\sqsubset</samp>: <a href="#uid1414">&#10043;</a>.</div>

<div class="idx1"><samp>\sqsubseteq</samp>: <a href="#uid1412">&#10043;</a>.</div>

<div class="idx1"><samp>\sqsupset</samp>: <a href="#uid1415">&#10043;</a>.</div>

<div class="idx1"><samp>\sqsupseteq</samp>: <a href="#uid1413">&#10043;</a>.</div>

<div class="idx1"><samp>\square</samp>: <a href="#uid1353">&#10043;</a>.</div>

<div class="idx1"><samp>\ss</samp>: <a href="#uid1966">&#10043;</a>, <a href="#uid2029">&#10043;</a>.</div>

<div class="idx1"><samp>\SS</samp>: <a href="#uid1966">&#10043;</a>, <a href="#uid2028">&#10043;</a>.</div>

<div class="idx1"><samp>\st</samp>: <a href="#uid1939">&#10043;</a>.</div>

<div class="idx1"><samp>\stackrel</samp>: <a href="#uid1530">&#10043;</a>.</div>

<div class="idx1"><samp>\star</samp>: <a href="#uid1409">&#10043;</a>.</div>

<div class="idx1"><samp>\stepcounter</samp>: <a href="#uid809">&#10043;</a>.</div>

<div class="idx1"><samp>\@stpelt</samp>: <a href="#uid814">&#10043;</a>, <a href="#uid1150">&#10043;</a>.</div>

<div class="idx1"><samp>\string</samp>: <a href="#uid144">&#10043;</a>, <a href="#uid206">&#10043;</a>, <a href="#uid224">&#10043;</a>, <a href="#uid238">&#10043;</a>, <a href="#uid1068">&#10043;</a>, <a href="#uid2515">&#10043;</a>.</div>

<div class="idx1">string (bibtex keyword): <a href="#uid1756">&#10043;</a>.</div>

<div class="idx1"><samp>\strip@prefix</samp>: <a href="#uid1137">&#10043;</a>, <a href="#uid2564">&#10043;</a>.</div>

<div class="idx1"><samp>subequations</samp>: <a href="#uid2890">&#10043;</a>.</div>

<div class="idx1"><samp>\subfigure</samp>: <a href="#uid3514">&#10043;</a>, <a href="#uid3517">&#10043;</a>, <a href="#uid3520">&#10043;</a>.</div>

<div class="idx1"><samp>\subitem</samp>: <a href="#uid2881">&#10043;</a>.</div>

<div class="idx1"><samp>\subparagraph</samp>: <a href="#uid2745">&#10043;</a>, <a href="#uid3481">&#10043;</a>.</div>

<div class="idx1">subparagraph (counter): <a href="#uid589">&#10043;</a>.</div>

<div class="idx1"><samp>\subparagraphmark</samp>: <a href="#uid3935">&#10043;</a>.</div>

<div class="idx1"><samp>\subsection</samp>: <a href="#uid23">&#10043;</a>, <a href="#uid2742">&#10043;</a>, <a href="#uid3480">&#10043;</a>.</div>

<div class="idx1">subsection (counter): <a href="#uid585">&#10043;</a>.</div>

<div class="idx1"><samp>\subsectionmark</samp>: <a href="#uid3932">&#10043;</a>.</div>

<div class="idx1"><samp>\subset</samp>: <a href="#uid1442">&#10043;</a>.</div>

<div class="idx1"><samp>\subseteq</samp>: <a href="#uid1444">&#10043;</a>.</div>

<div class="idx1"><samp>\subsubsection</samp>: <a href="#uid2743">&#10043;</a>, <a href="#uid3481">&#10043;</a>.</div>

<div class="idx1">subsubsection (counter): <a href="#uid587">&#10043;</a>.</div>

<div class="idx1"><samp>\subsubsectionmark</samp>: <a href="#uid3933">&#10043;</a>.</div>

<div class="idx1"><samp>\succ</samp>: <a href="#uid1435">&#10043;</a>.</div>

<div class="idx1"><samp>\succeq</samp>: <a href="#uid1437">&#10043;</a>.</div>

<div class="idx1"><samp>\sum</samp>: <a href="#uid1366">&#10043;</a>.</div>

<div class="idx1"><samp>\sup</samp>: <a href="#uid1316">&#10043;</a>.</div>

<div class="idx1"><samp>\supset</samp>: <a href="#uid1441">&#10043;</a>.</div>

<div class="idx1"><samp>\supseteq</samp>: <a href="#uid1443">&#10043;</a>.</div>

<div class="idx1"><samp>\surd</samp>: <a href="#uid1302">&#10043;</a>.</div>

<div class="idx1"><samp>\swarrow</samp>: <a href="#uid1425">&#10043;</a>.</div>

<div class="idx1"><samp>\T</samp>: <a href="#uid1120">&#10043;</a>, <a href="#uid1926">&#10043;</a>.</div>

<div class="idx1"><samp>\tabcolsep</samp>: <a href="#uid679">&#10043;</a>.</div>

<div class="idx1"><samp>table</samp>: <a href="#uid3320">&#10043;</a>.</div>

<div class="idx1"><samp>\tabskip</samp>: <a href="#uid307">&#10043;</a>.</div>

<div class="idx1"><samp>tabular</samp>: <a href="#uid3323">&#10043;</a>, <a href="#uid3345">&#10043;</a>.</div>

<div class="idx1"><samp>\tagcurve</samp>: <a href="#uid3294">&#10043;</a>, <a href="#uid3710">&#10043;</a>, <a href="#uid3743">&#10043;</a>.</div>

<div class="idx1"><samp>\tan</samp>: <a href="#uid1341">&#10043;</a>.</div>

<div class="idx1"><samp>\tanh</samp>: <a href="#uid1342">&#10043;</a>.</div>

<div class="idx1"><samp>\tau</samp>: <a href="#uid1270">&#10043;</a>.</div>

<div class="idx1"><samp>\tbinom</samp>: <a href="#uid1586">&#10043;</a>.</div>

<div class="idx1">te1 (tralics option): <a href="#uid3080">&#10043;</a>.</div>

<div class="idx1">te1a (tralics option): <a href="#uid3080">&#10043;</a>.</div>

<div class="idx1">te8a (tralics option): <a href="#uid3080">&#10043;</a>.</div>

<div class="idx1">techreport (bibtex entry type): <a href="#uid1752">&#10043;</a>.</div>

<div class="idx1"><samp>\@tempdima</samp>: <a href="#uid714">&#10043;</a>, <a href="#uid715">&#10043;</a>, <a href="#uid716">&#10043;</a>.</div>

<div class="idx1"><samp>\@tempskipa</samp>: <a href="#uid350">&#10043;</a>.</div>

<div class="idx1"><samp>\@tempskipb</samp>: <a href="#uid350">&#10043;</a>.</div>

<div class="idx1"><samp>\@temptokena</samp>: <a href="#uid376">&#10043;</a>.</div>

<div class="idx1"><samp>\TeX</samp>: <a href="#uid2031">&#10043;</a>.</div>

<div class="idx1"><samp>\texorpdfstring</samp>: <a href="#uid16">&#10043;</a>.</div>

<div class="idx1"><samp>\text</samp>: <a href="#uid1595">&#10043;</a>, <a href="#uid1628">&#10043;</a>.</div>

<div class="idx1"><samp>\textacutedbl</samp>: <a href="#uid2205">&#10043;</a>.</div>

<div class="idx1"><samp>\textascendercompwordmark</samp>: <a href="#uid2327">&#10043;</a>.</div>

<div class="idx1"><samp>\textasciiacute</samp>: <a href="#uid2145">&#10043;</a>.</div>

<div class="idx1"><samp>\textasciiacutex</samp>: <a href="#uid2036">&#10043;</a>.</div>

<div class="idx1"><samp>\textasciibreve</samp>: <a href="#uid2173">&#10043;</a>.</div>

<div class="idx1"><samp>\textasciicaron</samp>: <a href="#uid2175">&#10043;</a>.</div>

<div class="idx1"><samp>\textasciicedilla</samp>: <a href="#uid2155">&#10043;</a>.</div>

<div class="idx1"><samp>\textasciicircum</samp>: <a href="#uid2038">&#10043;</a>.</div>

<div class="idx1"><samp>\textasciidieresis</samp>: <a href="#uid2117">&#10043;</a>.</div>

<div class="idx1"><samp>\textasciigrave</samp>: <a href="#uid2040">&#10043;</a>.</div>

<div class="idx1"><samp>\textasciimacron</samp>: <a href="#uid2135">&#10043;</a>.</div>

<div class="idx1"><samp>\textasciitilde</samp>: <a href="#uid2097">&#10043;</a>.</div>

<div class="idx1"><samp>\textasteriskcentered</samp>: <a href="#uid2277">&#10043;</a>.</div>

<div class="idx1"><samp>\textbackslash</samp>: <a href="#uid2042">&#10043;</a>.</div>

<div class="idx1"><samp>\textbaht</samp>: <a href="#uid2177">&#10043;</a>.</div>

<div class="idx1"><samp>\textbardbl</samp>: <a href="#uid2183">&#10043;</a>.</div>

<div class="idx1"><samp>\textbf</samp>: <a href="#uid837">&#10043;</a>.</div>

<div class="idx1"><samp>\textbigcircle</samp>: <a href="#uid2265">&#10043;</a>.</div>

<div class="idx1"><samp>\textblank</samp>: <a href="#uid2341">&#10043;</a>.</div>

<div class="idx1"><samp>\textborn</samp>: <a href="#uid2337">&#10043;</a>.</div>

<div class="idx1"><samp>\textbraceleft</samp>: <a href="#uid2093">&#10043;</a>.</div>

<div class="idx1"><samp>\textbraceright</samp>: <a href="#uid2095">&#10043;</a>.</div>

<div class="idx1"><samp>\textbrokenbar</samp>: <a href="#uid2115">&#10043;</a>.</div>

<div class="idx1"><samp>\textbullet</samp>: <a href="#uid2193">&#10043;</a>.</div>

<div class="idx1"><samp>\textcapitalcompwordmark</samp>: <a href="#uid2319">&#10043;</a>.</div>

<div class="idx1"><samp>\textcelsius</samp>: <a href="#uid2235">&#10043;</a>.</div>

<div class="idx1"><samp>\textcent</samp>: <a href="#uid2105">&#10043;</a>.</div>

<div class="idx1"><samp>\textcentoldstyle</samp>: <a href="#uid2293">&#10043;</a>.</div>

<div class="idx1"><samp>\textcircledP</samp>: <a href="#uid2239">&#10043;</a>.</div>

<div class="idx1"><samp>\textcolonmonetary</samp>: <a href="#uid2219">&#10043;</a>.</div>

<div class="idx1"><samp>\textcompwordmark</samp>: <a href="#uid2289">&#10043;</a>.</div>

<div class="idx1"><samp>\textcopyleft</samp>: <a href="#uid2297">&#10043;</a>.</div>

<div class="idx1"><samp>\textcopyright</samp>: <a href="#uid2123">&#10043;</a>.</div>

<div class="idx1"><samp>\textcurrency</samp>: <a href="#uid2111">&#10043;</a>.</div>

<div class="idx1"><samp>\textdagger</samp>: <a href="#uid2189">&#10043;</a>.</div>

<div class="idx1"><samp>\textdaggerdbl</samp>: <a href="#uid2191">&#10043;</a>.</div>

<div class="idx1"><samp>\textdblhyphen</samp>: <a href="#uid2329">&#10043;</a>.</div>

<div class="idx1"><samp>\textdegree</samp>: <a href="#uid2137">&#10043;</a>.</div>

<div class="idx1"><samp>\textdied</samp>: <a href="#uid2333">&#10043;</a>.</div>

<div class="idx1"><samp>\textdiscount</samp>: <a href="#uid2325">&#10043;</a>.</div>

<div class="idx1"><samp>\textdiv</samp>: <a href="#uid2099">&#10043;</a>.</div>

<div class="idx1"><samp>\textdivorced</samp>: <a href="#uid2335">&#10043;</a>.</div>

<div class="idx1"><samp>\textdollar</samp>: <a href="#uid2044">&#10043;</a>.</div>

<div class="idx1"><samp>\textdollardoldstyle</samp>: <a href="#uid2295">&#10043;</a>.</div>

<div class="idx1"><samp>\textdong</samp>: <a href="#uid2229">&#10043;</a>.</div>

<div class="idx1"><samp>\textdownarrow</samp>: <a href="#uid2259">&#10043;</a>.</div>

<div class="idx1"><samp>\texteightoldstyle</samp>: <a href="#uid2315">&#10043;</a>.</div>

<div class="idx1"><samp>\textellipsis</samp>: <a href="#uid2195">&#10043;</a>.</div>

<div class="idx1"><samp>\textemdash</samp>: <a href="#uid2181">&#10043;</a>.</div>

<div class="idx1"><samp>\textendash</samp>: <a href="#uid2179">&#10043;</a>.</div>

<div class="idx1"><samp>\textestimated</samp>: <a href="#uid2251">&#10043;</a>.</div>

<div class="idx1"><samp>\texteuro</samp>: <a href="#uid119">&#10043;</a>, <a href="#uid1127">&#10043;</a>, <a href="#uid2231">&#10043;</a>.</div>

<div class="idx1"><samp>\textexclamdown</samp>: <a href="#uid2103">&#10043;</a>.</div>

<div class="idx1"><samp>\textfiveoldstyle</samp>: <a href="#uid2309">&#10043;</a>.</div>

<div class="idx1"><samp>\textfloatsep</samp>: <a href="#uid334">&#10043;</a>.</div>

<div class="idx1"><samp>\textflorin</samp>: <a href="#uid2171">&#10043;</a>.</div>

<div class="idx1"><samp>\textfont</samp>: <a href="#uid244">&#10043;</a>, <a href="#uid821">&#10043;</a>.</div>

<div class="idx1"><samp>\textfouroldstyle</samp>: <a href="#uid2307">&#10043;</a>.</div>

<div class="idx1"><samp>\textfraction</samp>: <a href="#uid3847">&#10043;</a>.</div>

<div class="idx1"><samp>\textfractionsolidus</samp>: <a href="#uid2213">&#10043;</a>.</div>

<div class="idx1"><samp>\textfrenchfranc</samp>: <a href="#uid2221">&#10043;</a>.</div>

<div class="idx1"><samp>\textgravedbl</samp>: <a href="#uid2207">&#10043;</a>.</div>

<div class="idx1"><samp>\textgreater</samp>: <a href="#uid2089">&#10043;</a>.</div>

<div class="idx1"><samp>\textguarani</samp>: <a href="#uid2321">&#10043;</a>.</div>

<div class="idx1"><samp>\textheight</samp>: <a href="#uid695">&#10043;</a>.</div>

<div class="idx1"><samp>\textinterrobang</samp>: <a href="#uid2211">&#10043;</a>.</div>

<div class="idx1"><samp>\textinterrobangdown</samp>: <a href="#uid2323">&#10043;</a>.</div>

<div class="idx1"><samp>\textit</samp>: <a href="#uid844">&#10043;</a>, <a href="#uid3401">&#10043;</a>.</div>

<div class="idx1"><samp>\textlangle</samp>: <a href="#uid2269">&#10043;</a>.</div>

<div class="idx1"><samp>\textlbrackdbl</samp>: <a href="#uid2285">&#10043;</a>.</div>

<div class="idx1"><samp>\textleaf</samp>: <a href="#uid2331">&#10043;</a>.</div>

<div class="idx1"><samp>\textleftarrow</samp>: <a href="#uid2253">&#10043;</a>.</div>

<div class="idx1"><samp>\textless</samp>: <a href="#uid2087">&#10043;</a>.</div>

<div class="idx1"><samp>\textlira</samp>: <a href="#uid2223">&#10043;</a>.</div>

<div class="idx1"><samp>\textlnot</samp>: <a href="#uid2129">&#10043;</a>.</div>

<div class="idx1"><samp>\textlquill</samp>: <a href="#uid2215">&#10043;</a>.</div>

<div class="idx1"><samp>\textmarried</samp>: <a href="#uid2339">&#10043;</a>.</div>

<div class="idx1"><samp>\textmd</samp>: <a href="#uid836">&#10043;</a>.</div>

<div class="idx1"><samp>\textmho</samp>: <a href="#uid2249">&#10043;</a>.</div>

<div class="idx1"><samp>\textmu</samp>: <a href="#uid2147">&#10043;</a>.</div>

<div class="idx1"><samp>\textmusicalnote</samp>: <a href="#uid2267">&#10043;</a>.</div>

<div class="idx1"><samp>\textnaira</samp>: <a href="#uid2225">&#10043;</a>.</div>

<div class="idx1"><samp>\textnineoldstyle</samp>: <a href="#uid2317">&#10043;</a>.</div>

<div class="idx1"><samp>\textnormal</samp>: <a href="#uid852">&#10043;</a>.</div>

<div class="idx1"><samp>\textnospace</samp>: <a href="#uid2046">&#10043;</a>.</div>

<div class="idx1"><samp>\textnumero</samp>: <a href="#uid2237">&#10043;</a>.</div>

<div class="idx1"><samp>\textohm</samp>: <a href="#uid2247">&#10043;</a>.</div>

<div class="idx1"><samp>\textonehalf</samp>: <a href="#uid2165">&#10043;</a>.</div>

<div class="idx1"><samp>\textoneoldstyle</samp>: <a href="#uid2301">&#10043;</a>.</div>

<div class="idx1"><samp>\textonequarter</samp>: <a href="#uid2163">&#10043;</a>.</div>

<div class="idx1"><samp>\textonesuperior</samp>: <a href="#uid2157">&#10043;</a>.</div>

<div class="idx1"><samp>\textopenbullet</samp>: <a href="#uid2263">&#10043;</a>.</div>

<div class="idx1"><samp>\textordfeminine</samp>: <a href="#uid2125">&#10043;</a>.</div>

<div class="idx1"><samp>\textordmasculine</samp>: <a href="#uid2159">&#10043;</a>.</div>

<div class="idx1"><samp>\textparagraph</samp>: <a href="#uid2149">&#10043;</a>.</div>

<div class="idx1"><samp>\textperiodcentered</samp>: <a href="#uid2153">&#10043;</a>.</div>

<div class="idx1"><samp>\textpertenthousand</samp>: <a href="#uid2203">&#10043;</a>.</div>

<div class="idx1"><samp>\textperthousand</samp>: <a href="#uid2201">&#10043;</a>.</div>

<div class="idx1"><samp>\textpeso</samp>: <a href="#uid2233">&#10043;</a>.</div>

<div class="idx1"><samp>\textpilcrow</samp>: <a href="#uid2151">&#10043;</a>.</div>

<div class="idx1"><samp>\textpm</samp>: <a href="#uid2139">&#10043;</a>.</div>

<div class="idx1"><samp>\textquestiondown</samp>: <a href="#uid2169">&#10043;</a>.</div>

<div class="idx1"><samp>\textquotedblleft</samp>: <a href="#uid2197">&#10043;</a>.</div>

<div class="idx1"><samp>\textquotedblright</samp>: <a href="#uid2199">&#10043;</a>.</div>

<div class="idx1"><samp>\textquoteleft</samp>: <a href="#uid2185">&#10043;</a>.</div>

<div class="idx1"><samp>\textquoteright</samp>: <a href="#uid2187">&#10043;</a>.</div>

<div class="idx1"><samp>\textquotesingle</samp>: <a href="#uid2279">&#10043;</a>.</div>

<div class="idx1"><samp>\textquotestraightbase</samp>: <a href="#uid2281">&#10043;</a>.</div>

<div class="idx1"><samp>\textquotestraightdblbase</samp>: <a href="#uid2283">&#10043;</a>.</div>

<div class="idx1"><samp>\textrangle</samp>: <a href="#uid2271">&#10043;</a>.</div>

<div class="idx1"><samp>\textrbrackdbl</samp>: <a href="#uid2287">&#10043;</a>.</div>

<div class="idx1"><samp>\textrecipe</samp>: <a href="#uid2241">&#10043;</a>.</div>

<div class="idx1"><samp>\textreferencemark</samp>: <a href="#uid2209">&#10043;</a>.</div>

<div class="idx1"><samp>\textregistered</samp>: <a href="#uid2133">&#10043;</a>.</div>

<div class="idx1"><samp>\textrightarrow</samp>: <a href="#uid2257">&#10043;</a>.</div>

<div class="idx1"><samp>\textrm</samp>: <a href="#uid828">&#10043;</a>.</div>

<div class="idx1"><samp>\textrquill</samp>: <a href="#uid2217">&#10043;</a>.</div>

<div class="idx1"><samp>\textsc</samp>: <a href="#uid846">&#10043;</a>.</div>

<div class="idx1"><samp>\textsection</samp>: <a href="#uid2119">&#10043;</a>.</div>

<div class="idx1"><samp>\textservicemark</samp>: <a href="#uid2243">&#10043;</a>.</div>

<div class="idx1"><samp>\textsevenoldstyle</samp>: <a href="#uid2313">&#10043;</a>.</div>

<div class="idx1"><samp>\textsf</samp>: <a href="#uid829">&#10043;</a>.</div>

<div class="idx1"><samp>\textsixoldstyle</samp>: <a href="#uid2311">&#10043;</a>.</div>

<div class="idx1"><samp>\textsl</samp>: <a href="#uid845">&#10043;</a>.</div>

<div class="idx1"><samp>\textsofthyphen</samp>: <a href="#uid2131">&#10043;</a>.</div>

<div class="idx1"><samp>\textsterling</samp>: <a href="#uid2107">&#10043;</a>.</div>

<div class="idx1"><samp>\textstyle</samp>: <a href="#uid105">&#10043;</a>, <a href="#uid1588">&#10043;</a>, <a href="#uid1637">&#10043;</a>.</div>

<div class="idx1"><samp>\textsubscript</samp>: <a href="#uid1620">&#10043;</a>, <a href="#uid3447">&#10043;</a>.</div>

<div class="idx1"><samp>\textsuperscript</samp>: <a href="#uid865">&#10043;</a>, <a href="#uid1619">&#10043;</a>, <a href="#uid3447">&#10043;</a>.</div>

<div class="idx1"><samp>\textsurd</samp>: <a href="#uid2261">&#10043;</a>.</div>

<div class="idx1"><samp>\textthreeoldstyle</samp>: <a href="#uid2305">&#10043;</a>.</div>

<div class="idx1"><samp>\textthreequarters</samp>: <a href="#uid2167">&#10043;</a>.</div>

<div class="idx1"><samp>\textthreequartersemdash</samp>: <a href="#uid2275">&#10043;</a>.</div>

<div class="idx1"><samp>\textthreesuperior</samp>: <a href="#uid2143">&#10043;</a>.</div>

<div class="idx1"><samp>\texttildelow</samp>: <a href="#uid2291">&#10043;</a>.</div>

<div class="idx1"><samp>\texttimes</samp>: <a href="#uid2101">&#10043;</a>.</div>

<div class="idx1"><samp>\texttrademark</samp>: <a href="#uid2245">&#10043;</a>.</div>

<div class="idx1"><samp>\texttt</samp>: <a href="#uid830">&#10043;</a>.</div>

<div class="idx1"><samp>\texttwelveudash</samp>: <a href="#uid2273">&#10043;</a>.</div>

<div class="idx1"><samp>\texttwooldstyle</samp>: <a href="#uid2303">&#10043;</a>.</div>

<div class="idx1"><samp>\texttwosuperior</samp>: <a href="#uid2141">&#10043;</a>.</div>

<div class="idx1"><samp>\textunderscore</samp>: <a href="#uid1125">&#10043;</a>, <a href="#uid2091">&#10043;</a>.</div>

<div class="idx1"><samp>\textup</samp>: <a href="#uid843">&#10043;</a>.</div>

<div class="idx1"><samp>\textuparrow</samp>: <a href="#uid2255">&#10043;</a>.</div>

<div class="idx1"><samp>\textvisiblespace</samp>: <a href="#uid1943">&#10043;</a>, <a href="#uid2048">&#10043;</a>.</div>

<div class="idx1"><samp>\textwidth</samp>: <a href="#uid693">&#10043;</a>.</div>

<div class="idx1"><samp>\textwon</samp>: <a href="#uid2227">&#10043;</a>.</div>

<div class="idx1"><samp>\textyen</samp>: <a href="#uid2113">&#10043;</a>.</div>

<div class="idx1"><samp>\textzerooldstyle</samp>: <a href="#uid2299">&#10043;</a>.</div>

<div class="idx1"><samp>\TeXXeTstate</samp>: <a href="#uid509">&#10043;</a>, <a href="#uid3811">&#10043;</a>.</div>

<div class="idx1"><samp>\tfrac</samp>: <a href="#uid1539">&#10043;</a>, <a href="#uid1686">&#10043;</a>.</div>

<div class="idx1"><samp>\th</samp>: <a href="#uid1966">&#10043;</a>, <a href="#uid2034">&#10043;</a>.</div>

<div class="idx1"><samp>\TH</samp>: <a href="#uid1966">&#10043;</a>, <a href="#uid2033">&#10043;</a>.</div>

<div class="idx1"><samp>\thanks</samp>: <a href="#uid2725">&#10043;</a>.</div>

<div class="idx1"><samp>\the</samp>: <a href="#uid37">&#10043;</a>, <a href="#uid227">&#10043;</a>, <a href="#uid268">&#10043;</a>, <a href="#uid271">&#10043;</a>, <a href="#uid1074">&#10043;</a>.</div>

<div class="idx1"><samp>thebibliography</samp>: <a href="#uid1861">&#10043;</a>.</div>

<div class="idx1"><samp>\@themark</samp>: <a href="#uid3923">&#10043;</a>.</div>

<div class="idx1"><samp>\theme</samp>: <a href="#uid3154">&#10043;</a>.</div>

<div class="idx1">theme_vals: <a href="#uid3364">&#10043;</a>.</div>

<div class="idx1"><samp>\theorembodyfont</samp>: <a href="#uid2626">&#10043;</a>.</div>

<div class="idx1"><samp>\theoremheaderfont</samp>: <a href="#uid2630">&#10043;</a>.</div>

<div class="idx1"><samp>\theoremstyle</samp>: <a href="#uid2628">&#10043;</a>.</div>

<div class="idx1"><samp>\thepage</samp>: <a href="#uid3950">&#10043;</a>.</div>

<div class="idx1"><samp>\Theta</samp>: <a href="#uid1284">&#10043;</a>.</div>

<div class="idx1"><samp>\theta</samp>: <a href="#uid1260">&#10043;</a>.</div>

<div class="idx1"><samp>\thexxx</samp>: <a href="#uid811">&#10043;</a>.</div>

<div class="idx1"><samp>\thicklines</samp>: <a href="#uid3280">&#10043;</a>, <a href="#uid3713">&#10043;</a>.</div>

<div class="idx1"><samp>\thickmuskip</samp>: <a href="#uid319">&#10043;</a>, <a href="#uid873">&#10043;</a>.</div>

<div class="idx1"><samp>\thinlines</samp>: <a href="#uid3282">&#10043;</a>, <a href="#uid3716">&#10043;</a>.</div>

<div class="idx1"><samp>\thinmuskip</samp>: <a href="#uid315">&#10043;</a>, <a href="#uid873">&#10043;</a>.</div>

<div class="idx1"><samp>\thinspace</samp>: <a href="#uid3881">&#10043;</a>.</div>

<div class="idx1"><samp>\@thirdofthree</samp>: <a href="#uid3914">&#10043;</a>.</div>

<div class="idx1"><samp>\thr@@</samp>: <a href="#uid3823">&#10043;</a>.</div>

<div class="idx1"><samp>\tilde</samp>: <a href="#uid1515">&#10043;</a>.</div>

<div class="idx1"><samp>\time</samp>: <a href="#uid418">&#10043;</a>.</div>

<div class="idx1"><samp>\times</samp>: <a href="#uid1408">&#10043;</a>.</div>

<div class="idx1"><samp>\tiny</samp>: <a href="#uid855">&#10043;</a>, <a href="#uid3401">&#10043;</a>, <a href="#uid3408">&#10043;</a>, <a href="#uid3419">&#10043;</a>.</div>

<div class="idx1">title (bibtex field): <a href="#uid1783">&#10043;</a>.</div>

<div class="idx1"><samp>\to</samp>: <a href="#uid1459">&#10043;</a>.</div>

<div class="idx1"><samp>\toappear</samp>: <a href="#uid2754">&#10043;</a>.</div>

<div class="idx1"><samp>\today</samp>: <a href="#uid3919">&#10043;</a>.</div>

<div class="idx1"><samp>\toks</samp>: <a href="#uid733">&#10043;</a>.</div>

<div class="idx1"><samp>\toksdef</samp>: <a href="#uid193">&#10043;</a>.</div>

<div class="idx1"><samp>\tolerance</samp>: <a href="#uid380">&#10043;</a>.</div>

<div class="idx1"><samp>\top</samp>: <a href="#uid1303">&#10043;</a>.</div>

<div class="idx1"><samp>\topfraction</samp>: <a href="#uid3852">&#10043;</a>.</div>

<div class="idx1"><samp>\toplevelsection</samp>: <a href="#uid2435">&#10043;</a>.</div>

<div class="idx1"><samp>\topmargin</samp>: <a href="#uid703">&#10043;</a>.</div>

<div class="idx1"><samp>\topmark</samp>: <a href="#uid1102">&#10043;</a>, <a href="#uid2487">&#10043;</a>.</div>

<div class="idx1"><samp>\topmarks</samp>: <a href="#uid2493">&#10043;</a>, <a href="#uid3807">&#10043;</a>.</div>

<div class="idx1">topnumber (counter): <a href="#uid598">&#10043;</a>.</div>

<div class="idx1"><samp>\topsep</samp>: <a href="#uid347">&#10043;</a>.</div>

<div class="idx1"><samp>\topskip</samp>: <a href="#uid303">&#10043;</a>.</div>

<div class="idx1">totalnumber (counter): <a href="#uid600">&#10043;</a>.</div>

<div class="idx1">tpa_status (tralics option): <a href="#uid3082">&#10043;</a>.</div>

<div class="idx1"><samp>\tracingall</samp>: <a href="#uid3211">&#10043;</a>.</div>

<div class="idx1"><samp>\tracingassigns</samp>: <a href="#uid494">&#10043;</a>, <a href="#uid3752">&#10043;</a>.</div>

<div class="idx1"><samp>\tracingcommands</samp>: <a href="#uid450">&#10043;</a>, <a href="#uid3214">&#10043;</a>, <a href="#uid3225">&#10043;</a>, <a href="#uid3750">&#10043;</a>.</div>

<div class="idx1"><samp>\tracinggroups</samp>: <a href="#uid495">&#10043;</a>, <a href="#uid3754">&#10043;</a>.</div>

<div class="idx1"><samp>\tracingifs</samp>: <a href="#uid496">&#10043;</a>, <a href="#uid3753">&#10043;</a>.</div>

<div class="idx1"><samp>\tracinglostchars</samp>: <a href="#uid448">&#10043;</a>, <a href="#uid3221">&#10043;</a>, <a href="#uid3751">&#10043;</a>.</div>

<div class="idx1"><samp>\tracingmacros</samp>: <a href="#uid438">&#10043;</a>, <a href="#uid3212">&#10043;</a>, <a href="#uid3223">&#10043;</a>.</div>

<div class="idx1"><samp>\tracingmath</samp>: <a href="#uid500">&#10043;</a>, <a href="#uid3216">&#10043;</a>.</div>

<div class="idx1"><samp>\tracingnesting</samp>: <a href="#uid498">&#10043;</a>, <a href="#uid3755">&#10043;</a>.</div>

<div class="idx1"><samp>\tracingonline</samp>: <a href="#uid436">&#10043;</a>, <a href="#uid3217">&#10043;</a>.</div>

<div class="idx1"><samp>\tracingoutput</samp>: <a href="#uid446">&#10043;</a>, <a href="#uid3213">&#10043;</a>, <a href="#uid3220">&#10043;</a>.</div>

<div class="idx1"><samp>\tracingpages</samp>: <a href="#uid444">&#10043;</a>, <a href="#uid3219">&#10043;</a>.</div>

<div class="idx1"><samp>\tracingparagraphs</samp>: <a href="#uid442">&#10043;</a>, <a href="#uid3218">&#10043;</a>.</div>

<div class="idx1"><samp>\tracingrestores</samp>: <a href="#uid452">&#10043;</a>, <a href="#uid3215">&#10043;</a>, <a href="#uid3224">&#10043;</a>.</div>

<div class="idx1"><samp>\tracingscantokens</samp>: <a href="#uid497">&#10043;</a>, <a href="#uid3756">&#10043;</a>.</div>

<div class="idx1"><samp>\tracingstats</samp>: <a href="#uid440">&#10043;</a>, <a href="#uid3222">&#10043;</a>.</div>

<div class="idx1"><samp>\tralicsversion</samp>: <a href="#uid1072">&#10043;</a>, <a href="#uid2520">&#10043;</a>.</div>

<div class="idx1"><samp>\triangle</samp>: <a href="#uid1307">&#10043;</a>.</div>

<div class="idx1"><samp>\triangleleft</samp>: <a href="#uid1374">&#10043;</a>.</div>

<div class="idx1"><samp>\triangleright</samp>: <a href="#uid1375">&#10043;</a>.</div>

<div class="idx1">trivialmath (tralics option): <a href="#uid3084">&#10043;</a>.</div>

<div class="idx1">true (unit prefix): <a href="#uid768">&#10043;</a>.</div>

<div class="idx1"><samp>\tt</samp>: <a href="#uid17">&#10043;</a>, <a href="#uid833">&#10043;</a>, <a href="#uid1559">&#10043;</a>.</div>

<div class="idx1"><samp>\ttfamily</samp>: <a href="#uid826">&#10043;</a>, <a href="#uid3433">&#10043;</a>.</div>

<div class="idx1"><samp>\tw@</samp>: <a href="#uid932">&#10043;</a>, <a href="#uid3822">&#10043;</a>.</div>

<div class="idx1">type (bibtex field): <a href="#uid1784">&#10043;</a>.</div>

<div class="idx1">type (tralics option): <a href="#uid3086">&#10043;</a>.</div>

<div class="idx1"><samp>\typeout</samp>: <a href="#uid2691">&#10043;</a>.</div>

<div class="idx1"><samp>\u</samp>: <a href="#uid1115">&#10043;</a>, <a href="#uid1902">&#10043;</a>.</div>

<div class="idx1"><samp>\uccode</samp>: <a href="#uid751">&#10043;</a>, <a href="#uid1876">&#10043;</a>.</div>

<div class="idx1"><samp>\uchyph</samp>: <a href="#uid454">&#10043;</a>.</div>

<div class="idx1"><samp>\ul</samp>: <a href="#uid1937">&#10043;</a>.</div>

<div class="idx1"><samp>\UndefineShortVerb</samp>: <a href="#uid1946">&#10043;</a>.</div>

<div class="idx1"><samp>\underbrace</samp>: <a href="#uid1536">&#10043;</a>.</div>

<div class="idx1"><samp>\underleftarrow</samp>: <a href="#uid1526">&#10043;</a>.</div>

<div class="idx1"><samp>\underline</samp>: <a href="#uid1529">&#10043;</a>.</div>

<div class="idx1"><samp>\underrightarrow</samp>: <a href="#uid1525">&#10043;</a>.</div>

<div class="idx1"><samp>\underset</samp>: <a href="#uid1531">&#10043;</a>.</div>

<div class="idx1"><samp>\unexpanded</samp>: <a href="#uid2500">&#10043;</a>, <a href="#uid3780">&#10043;</a>.</div>

<div class="idx1"><samp>\unhbox</samp>: <a href="#uid2701">&#10043;</a>.</div>

<div class="idx1"><samp>\unhcopy</samp>: <a href="#uid2703">&#10043;</a>.</div>

<div class="idx1"><samp>\unitlength</samp>: <a href="#uid691">&#10043;</a>, <a href="#uid3227">&#10043;</a>.</div>

<div class="idx1"><samp>\unkern</samp>: <a href="#uid2680">&#10043;</a>.</div>

<div class="idx1"><samp>\unless</samp>: <a href="#uid969">&#10043;</a>, <a href="#uid2551">&#10043;</a>, <a href="#uid3760">&#10043;</a>.</div>

<div class="idx1"><samp>\unnumberedverbatim</samp>: <a href="#uid1960">&#10043;</a>.</div>

<div class="idx1"><samp>\unpenalty</samp>: <a href="#uid2679">&#10043;</a>.</div>

<div class="idx1">unpublished (bibtex entry type): <a href="#uid1753">&#10043;</a>.</div>

<div class="idx1"><samp>\unskip</samp>: <a href="#uid871">&#10043;</a>, <a href="#uid2681">&#10043;</a>.</div>

<div class="idx1"><samp>\unvbox</samp>: <a href="#uid2702">&#10043;</a>.</div>

<div class="idx1"><samp>\unvcopy</samp>: <a href="#uid2704">&#10043;</a>.</div>

<div class="idx1"><samp>\Uparrow</samp>: <a href="#uid1230">&#10043;</a>, <a href="#uid1493">&#10043;</a>.</div>

<div class="idx1"><samp>\uparrow</samp>: <a href="#uid1227">&#10043;</a>, <a href="#uid1491">&#10043;</a>.</div>

<div class="idx1"><samp>\updownarrow</samp>: <a href="#uid1229">&#10043;</a>, <a href="#uid1496">&#10043;</a>.</div>

<div class="idx1"><samp>\Updownarrow</samp>: <a href="#uid1232">&#10043;</a>, <a href="#uid1495">&#10043;</a>.</div>

<div class="idx1"><samp>\uplus</samp>: <a href="#uid1400">&#10043;</a>.</div>

<div class="idx1"><samp>\uppercase</samp>: <a href="#uid1963">&#10043;</a>.</div>

<div class="idx1"><samp>\upshape</samp>: <a href="#uid839">&#10043;</a>, <a href="#uid3425">&#10043;</a>.</div>

<div class="idx1"><samp>\upsilon</samp>: <a href="#uid1271">&#10043;</a>.</div>

<div class="idx1"><samp>\Upsilon</samp>: <a href="#uid1288">&#10043;</a>.</div>

<div class="idx1"><samp>\UR</samp>: <a href="#uid3160">&#10043;</a>.</div>

<div class="idx1">ur_vals: <a href="#uid3368">&#10043;</a>.</div>

<div class="idx1"><samp>\url</samp>: <a href="#uid2717">&#10043;</a>, <a href="#uid3380">&#10043;</a>, <a href="#uid3533">&#10043;</a>.</div>

<div class="idx1">url (bibtex field): <a href="#uid1785">&#10043;</a>.</div>

<div class="idx1">url_font: <a href="#uid3379">&#10043;</a>.</div>

<div class="idx1"><samp>\urlfont</samp>: <a href="#uid3380">&#10043;</a>.</div>

<div class="idx1">use_all_sizes: <a href="#uid3403">&#10043;</a>.</div>

<div class="idx1">use_font_elt: <a href="#uid3400">&#10043;</a>.</div>

<div class="idx1"><samp>\usecounter</samp>: <a href="#uid2797">&#10043;</a>.</div>

<div class="idx1"><samp>\usepackage</samp>: <a href="#uid2434">&#10043;</a>, <a href="#uid2446">&#10043;</a>.</div>

<div class="idx1">usequotes (tralics option): <a href="#uid3088">&#10043;</a>.</div>

<div class="idx1"><samp>\UseVerb</samp>: <a href="#uid1147">&#10043;</a>, <a href="#uid1948">&#10043;</a>.</div>

<div class="idx1"><samp>\useverb</samp>: <a href="#uid2558">&#10043;</a>.</div>

<div class="idx1">utf8 (tralics option): <a href="#uid3090">&#10043;</a>.</div>

<div class="idx1">utf8output (tralics option): <a href="#uid3092">&#10043;</a>.</div>

<div class="idx1"><samp>\V</samp>: <a href="#uid1121">&#10043;</a>, <a href="#uid1928">&#10043;</a>.</div>

<div class="idx1"><samp>\v</samp>: <a href="#uid1112">&#10043;</a>, <a href="#uid1904">&#10043;</a>.</div>

<div class="idx1"><samp>\vadjust</samp>: <a href="#uid2699">&#10043;</a>, <a href="#uid2982">&#10043;</a>.</div>

<div class="idx1"><samp>\valign</samp>: <a href="#uid3351">&#10043;</a>.</div>

<div class="idx1"><samp>\value</samp>: <a href="#uid780">&#10043;</a>, <a href="#uid1154">&#10043;</a>.</div>

<div class="idx1"><samp>\varepsilon</samp>: <a href="#uid1257">&#10043;</a>.</div>

<div class="idx1"><samp>\varkappa</samp>: <a href="#uid1281">&#10043;</a>.</div>

<div class="idx1"><samp>\varphi</samp>: <a href="#uid1279">&#10043;</a>.</div>

<div class="idx1"><samp>\varpi</samp>: <a href="#uid1276">&#10043;</a>.</div>

<div class="idx1"><samp>\varrho</samp>: <a href="#uid1277">&#10043;</a>.</div>

<div class="idx1"><samp>\varsigma</samp>: <a href="#uid1278">&#10043;</a>.</div>

<div class="idx1"><samp>\vartheta</samp>: <a href="#uid1280">&#10043;</a>.</div>

<div class="idx1"><samp>\vbadness</samp>: <a href="#uid432">&#10043;</a>.</div>

<div class="idx1"><samp>\vbox</samp>: <a href="#uid2765">&#10043;</a>.</div>

<div class="idx1"><samp>\vcenter</samp>: <a href="#uid1705">&#10043;</a>.</div>

<div class="idx1"><samp>\Vdash</samp>: <a href="#uid1420">&#10043;</a>.</div>

<div class="idx1"><samp>\vdash</samp>: <a href="#uid1419">&#10043;</a>.</div>

<div class="idx1"><samp>\vdots</samp>: <a href="#uid1486">&#10043;</a>.</div>

<div class="idx1"><samp>\vec</samp>: <a href="#uid1522">&#10043;</a>.</div>

<div class="idx1"><samp>\vector</samp>: <a href="#uid3278">&#10043;</a>, <a href="#uid3683">&#10043;</a>.</div>

<div class="idx1"><samp>\vee</samp>: <a href="#uid1380">&#10043;</a>.</div>

<div class="idx1"><samp>\verb</samp>: <a href="#uid182">&#10043;</a>.</div>

<div class="idx1"><samp>Verbatim</samp>: <a href="#uid1953">&#10043;</a>.</div>

<div class="idx1"><samp>verbatim</samp>: <a href="#uid1954">&#10043;</a>.</div>

<div class="idx1"><samp>\verbatimfont</samp>: <a href="#uid1950">&#10043;</a>.</div>

<div class="idx1"><samp>\verbatimnumberfont</samp>: <a href="#uid1955">&#10043;</a>.</div>

<div class="idx1"><samp>\verbatimprefix</samp>: <a href="#uid1951">&#10043;</a>.</div>

<div class="idx1">verbose (tralics option): <a href="#uid3094">&#10043;</a>, <a href="#uid3096">&#10043;</a>.</div>

<div class="idx1"><samp>\verbprefix</samp>: <a href="#uid1952">&#10043;</a>.</div>

<div class="idx1">version (tralics option): <a href="#uid3098">&#10043;</a>.</div>

<div class="idx1"><samp>\vert</samp>: <a href="#uid1225">&#10043;</a>, <a href="#uid1490">&#10043;</a>.</div>

<div class="idx1"><samp>\Vert</samp>: <a href="#uid1226">&#10043;</a>, <a href="#uid1488">&#10043;</a>.</div>

<div class="idx1"><samp>\vfil</samp>: <a href="#uid889">&#10043;</a>.</div>

<div class="idx1"><samp>\vfill</samp>: <a href="#uid890">&#10043;</a>.</div>

<div class="idx1"><samp>\vfilneg</samp>: <a href="#uid891">&#10043;</a>.</div>

<div class="idx1"><samp>\vfuzz</samp>: <a href="#uid621">&#10043;</a>.</div>

<div class="idx1"><samp>\@viiipt</samp>: <a href="#uid3857">&#10043;</a>.</div>

<div class="idx1"><samp>\@viipt</samp>: <a href="#uid3856">&#10043;</a>.</div>

<div class="idx1"><samp>\@vipt</samp>: <a href="#uid3855">&#10043;</a>.</div>

<div class="idx1"><samp>vmatrix</samp>: <a href="#uid1200">&#10043;</a>.</div>

<div class="idx1"><samp>Vmatrix</samp>: <a href="#uid1201">&#10043;</a>.</div>

<div class="idx1"><samp>\@vobeyspaces</samp>: <a href="#uid3899">&#10043;</a>.</div>

<div class="idx1"><samp>\voffset</samp>: <a href="#uid641">&#10043;</a>.</div>

<div class="idx1">volume (bibtex field): <a href="#uid1786">&#10043;</a>.</div>

<div class="idx1"><samp>\@vpt</samp>: <a href="#uid3854">&#10043;</a>.</div>

<div class="idx1"><samp>\vrule</samp>: <a href="#uid2926">&#10043;</a>.</div>

<div class="idx1"><samp>\vsize</samp>: <a href="#uid611">&#10043;</a>.</div>

<div class="idx1"><samp>\vskip</samp>: <a href="#uid897">&#10043;</a>, <a href="#uid1607">&#10043;</a>.</div>

<div class="idx1"><samp>\vspace</samp>: <a href="#uid899">&#10043;</a>, <a href="#uid1601">&#10043;</a>.</div>

<div class="idx1"><samp>\vsplit</samp>: <a href="#uid2779">&#10043;</a>.</div>

<div class="idx1"><samp>\vss</samp>: <a href="#uid892">&#10043;</a>.</div>

<div class="idx1"><samp>\vtop</samp>: <a href="#uid2777">&#10043;</a>.</div>

<div class="idx1"><samp>\wd</samp>: <a href="#uid737">&#10043;</a>.</div>

<div class="idx1"><samp>\wedge</samp>: <a href="#uid1378">&#10043;</a>.</div>

<div class="idx1"><samp>\@whiledim</samp>: <a href="#uid1171">&#10043;</a>, <a href="#uid2575">&#10043;</a>.</div>

<div class="idx1"><samp>\whiledo</samp>: <a href="#uid2577">&#10043;</a>, <a href="#uid2578">&#10043;</a>.</div>

<div class="idx1"><samp>\@whilenum</samp>: <a href="#uid1170">&#10043;</a>, <a href="#uid2574">&#10043;</a>.</div>

<div class="idx1"><samp>\@whilesw</samp>: <a href="#uid1172">&#10043;</a>, <a href="#uid2576">&#10043;</a>.</div>

<div class="idx1"><samp>\widehat</samp>: <a href="#uid1521">&#10043;</a>.</div>

<div class="idx1"><samp>\widetilde</samp>: <a href="#uid1516">&#10043;</a>.</div>

<div class="idx1"><samp>\widowpenalty</samp>: <a href="#uid390">&#10043;</a>.</div>

<div class="idx1"><samp>\@width</samp>: <a href="#uid3867">&#10043;</a>.</div>

<div class="idx1"><samp>\widthof</samp>: <a href="#uid2591">&#10043;</a>.</div>

<div class="idx1"><samp>\wp</samp>: <a href="#uid1295">&#10043;</a>.</div>

<div class="idx1"><samp>\wr</samp>: <a href="#uid1393">&#10043;</a>.</div>

<div class="idx1"><samp>wrapfigure</samp>: <a href="#uid3324">&#10043;</a>.</div>

<div class="idx1"><samp>\write</samp>: <a href="#uid240">&#10043;</a>, <a href="#uid264">&#10043;</a>, <a href="#uid2653">&#10043;</a>.</div>

<div class="idx1"><samp>\@xbegintheorem</samp>: <a href="#uid2635">&#10043;</a>.</div>

<div class="idx1"><samp>\xbox</samp>: <a href="#uid1738">&#10043;</a>, <a href="#uid2762">&#10043;</a>.</div>

<div class="idx1"><samp>\xdef</samp>: <a href="#uid206">&#10043;</a>, <a href="#uid232">&#10043;</a>.</div>

<div class="idx1"><samp>\xi</samp>: <a href="#uid1266">&#10043;</a>.</div>

<div class="idx1"><samp>\Xi</samp>: <a href="#uid1286">&#10043;</a>.</div>

<div class="idx1"><samp>\@xiipt</samp>: <a href="#uid3861">&#10043;</a>.</div>

<div class="idx1"><samp>\@xipt</samp>: <a href="#uid3860">&#10043;</a>.</div>

<div class="idx1"><samp>\@xivpt</samp>: <a href="#uid3862">&#10043;</a>.</div>

<div class="idx1"><samp>\xleaders</samp>: <a href="#uid2772">&#10043;</a>.</div>

<div class="idx1">xml (tralics option): <a href="#uid3100">&#10043;</a>.</div>

<div class="idx1">xml-expanded-project-name: <a href="#uid3119">&#10043;</a>.</div>

<div class="idx1">xml_accueil_name: <a href="#uid3537">&#10043;</a>.</div>

<div class="idx1">xml_anchor_name: <a href="#uid3649">&#10043;</a>.</div>

<div class="idx1">xml_arc_name: <a href="#uid3667">&#10043;</a>.</div>

<div class="idx1">xml_backmatter_name: <a href="#uid3471">&#10043;</a>.</div>

<div class="idx1">xml_bezier_name: <a href="#uid3661">&#10043;</a>.</div>

<div class="idx1">xml_biblio: <a href="#uid3550">&#10043;</a>.</div>

<div class="idx1">xml_bigcircle_name: <a href="#uid3700">&#10043;</a>.</div>

<div class="idx1">xml_box_name: <a href="#uid3486">&#10043;</a>.</div>

<div class="idx1">xml_bpers_name: <a href="#uid3620">&#10043;</a>.</div>

<div class="idx1">xml_caps_name: <a href="#uid3442">&#10043;</a>.</div>

<div class="idx1">xml_caption_name: <a href="#uid3115">&#10043;</a>, <a href="#uid3526">&#10043;</a>.</div>

<div class="idx1">xml_cell_name: <a href="#uid3613">&#10043;</a>.</div>

<div class="idx1">xml_circle_name: <a href="#uid3697">&#10043;</a>.</div>

<div class="idx1">xml_cit_name: <a href="#uid3631">&#10043;</a>.</div>

<div class="idx1">xml_citation_name: <a href="#uid3629">&#10043;</a>.</div>

<div class="idx1">xml_citetype_name: <a href="#uid3635">&#10043;</a>.</div>

<div class="idx1">xml_cleaders_name: <a href="#uid3638">&#10043;</a>.</div>

<div class="idx1">xml_closecurve_name: <a href="#uid3706">&#10043;</a>.</div>

<div class="idx1">xml_composition_ra_name: <a href="#uid3120">&#10043;</a>, <a href="#uid3539">&#10043;</a>.</div>

<div class="idx1">xml_curve_name: <a href="#uid3703">&#10043;</a>.</div>

<div class="idx1">xml_dashline_name: <a href="#uid3688">&#10043;</a>.</div>

<div class="idx1">xml_div0_name: <a href="#uid3473">&#10043;</a>.</div>

<div class="idx1">xml_div1_name: <a href="#uid3474">&#10043;</a>.</div>

<div class="idx1">xml_div2_name: <a href="#uid3475">&#10043;</a>.</div>

<div class="idx1">xml_div3_name: <a href="#uid3476">&#10043;</a>.</div>

<div class="idx1">xml_div4_name: <a href="#uid3477">&#10043;</a>.</div>

<div class="idx1">xml_div5_name: <a href="#uid3478">&#10043;</a>.</div>

<div class="idx1">xml_div6_name: <a href="#uid3479">&#10043;</a>.</div>

<div class="idx1">xml_dottedline_name: <a href="#uid3694">&#10043;</a>.</div>

<div class="idx1">xml_draline_name: <a href="#uid3691">&#10043;</a>.</div>

<div class="idx1">xml_fbox_name: <a href="#uid3484">&#10043;</a>.</div>

<div class="idx1">xml_figure_env_name: <a href="#uid3528">&#10043;</a>.</div>

<div class="idx1">xml_figure_name: <a href="#uid3567">&#10043;</a>.</div>

<div class="idx1">xml_font_bold: <a href="#uid3428">&#10043;</a>.</div>

<div class="idx1">xml_font_it: <a href="#uid3422">&#10043;</a>.</div>

<div class="idx1">xml_font_large: <a href="#uid3406">&#10043;</a>.</div>

<div class="idx1">xml_font_large1: <a href="#uid3414">&#10043;</a>.</div>

<div class="idx1">xml_font_large2: <a href="#uid3415">&#10043;</a>.</div>

<div class="idx1">xml_font_large3: <a href="#uid3416">&#10043;</a>.</div>

<div class="idx1">xml_font_large4: <a href="#uid3417">&#10043;</a>.</div>

<div class="idx1">xml_font_large5: <a href="#uid3418">&#10043;</a>.</div>

<div class="idx1">xml_font_medium: <a href="#uid3427">&#10043;</a>.</div>

<div class="idx1">xml_font_normalsize: <a href="#uid3407">&#10043;</a>.</div>

<div class="idx1">xml_font_roman: <a href="#uid3430">&#10043;</a>.</div>

<div class="idx1">xml_font_sansserif: <a href="#uid3432">&#10043;</a>.</div>

<div class="idx1">xml_font_sc: <a href="#uid3424">&#10043;</a>.</div>

<div class="idx1">xml_font_slanted: <a href="#uid3423">&#10043;</a>.</div>

<div class="idx1">xml_font_small: <a href="#uid3405">&#10043;</a>.</div>

<div class="idx1">xml_font_small1: <a href="#uid3410">&#10043;</a>.</div>

<div class="idx1">xml_font_small2: <a href="#uid3411">&#10043;</a>.</div>

<div class="idx1">xml_font_small3: <a href="#uid3412">&#10043;</a>.</div>

<div class="idx1">xml_font_small4: <a href="#uid3413">&#10043;</a>.</div>

<div class="idx1">xml_font_tt: <a href="#uid3431">&#10043;</a>.</div>

<div class="idx1">xml_font_upright: <a href="#uid3421">&#10043;</a>.</div>

<div class="idx1">xml_footnote_name: <a href="#uid3396">&#10043;</a>.</div>

<div class="idx1">xml_frontmatter_name: <a href="#uid3469">&#10043;</a>.</div>

<div class="idx1">xml_glo_name: <a href="#uid3461">&#10043;</a>.</div>

<div class="idx1">xml_gloitem_name: <a href="#uid3459">&#10043;</a>.</div>

<div class="idx1">xml_graphics_name: <a href="#uid3527">&#10043;</a>.</div>

<div class="idx1">xml_head_name: <a href="#uid3465">&#10043;</a>.</div>

<div class="idx1">xml_hl_name: <a href="#uid3444">&#10043;</a>.</div>

<div class="idx1">xml_index_name: <a href="#uid3651">&#10043;</a>.</div>

<div class="idx1">xml_item_name: <a href="#uid3453">&#10043;</a>.</div>

<div class="idx1">xml_keywords_name: <a href="#uid3499">&#10043;</a>.</div>

<div class="idx1">xml_labelitem_name: <a href="#uid3451">&#10043;</a>.</div>

<div class="idx1">xml_leaders_name: <a href="#uid3637">&#10043;</a>.</div>

<div class="idx1">xml_leg_name: <a href="#uid3519">&#10043;</a>.</div>

<div class="idx1">xml_line_name: <a href="#uid3676">&#10043;</a>, <a href="#uid3679">&#10043;</a>.</div>

<div class="idx1">xml_linethickness_name: <a href="#uid3718">&#10043;</a>.</div>

<div class="idx1">xml_list_name: <a href="#uid3455">&#10043;</a>.</div>

<div class="idx1">xml_mainmatter_name: <a href="#uid3470">&#10043;</a>.</div>

<div class="idx1">xml_mbox_name: <a href="#uid3505">&#10043;</a>.</div>

<div class="idx1">xml_multiput_name: <a href="#uid3673">&#10043;</a>.</div>

<div class="idx1">xml_oldstyle_name: <a href="#uid3438">&#10043;</a>.</div>

<div class="idx1">xml_oval_name: <a href="#uid3685">&#10043;</a>.</div>

<div class="idx1">xml_overline_name: <a href="#uid3439">&#10043;</a>.</div>

<div class="idx1">xml_pers_name: <a href="#uid3623">&#10043;</a>.</div>

<div class="idx1">xml_picture_name: <a href="#uid3659">&#10043;</a>.</div>

<div class="idx1">xml_pre_name: <a href="#uid3647">&#10043;</a>.</div>

<div class="idx1">xml_prenote_name: <a href="#uid3634">&#10043;</a>.</div>

<div class="idx1">xml_project_name: <a href="#uid3119">&#10043;</a>, <a href="#uid3535">&#10043;</a>.</div>

<div class="idx1">xml_put_name: <a href="#uid3664">&#10043;</a>.</div>

<div class="idx1">xml_ref_name: <a href="#uid3632">&#10043;</a>.</div>

<div class="idx1">xml_rotatebox_name: <a href="#uid3507">&#10043;</a>.</div>

<div class="idx1">xml_row_name: <a href="#uid3612">&#10043;</a>.</div>

<div class="idx1">xml_scalebox_name: <a href="#uid3485">&#10043;</a>.</div>

<div class="idx1">xml_scaleput_name: <a href="#uid3670">&#10043;</a>.</div>

<div class="idx1">xml_scaption_name: <a href="#uid3116">&#10043;</a>, <a href="#uid3503">&#10043;</a>.</div>

<div class="idx1">xml_so_name: <a href="#uid3445">&#10043;</a>.</div>

<div class="idx1">xml_st_name: <a href="#uid3446">&#10043;</a>.</div>

<div class="idx1">xml_sub_name: <a href="#uid3436">&#10043;</a>.</div>

<div class="idx1">xml_subfigure_name: <a href="#uid3513">&#10043;</a>.</div>

<div class="idx1">xml_sup_name: <a href="#uid3435">&#10043;</a>.</div>

<div class="idx1">xml_table_env_name: <a href="#uid3529">&#10043;</a>.</div>

<div class="idx1">xml_Table_name: <a href="#uid3530">&#10043;</a>.</div>

<div class="idx1">xml_table_name: <a href="#uid3611">&#10043;</a>.</div>

<div class="idx1">xml_tableofcontents_name: <a href="#uid3643">&#10043;</a>.</div>

<div class="idx1">xml_tagcurve_name: <a href="#uid3709">&#10043;</a>.</div>

<div class="idx1">xml_term_name: <a href="#uid3501">&#10043;</a>.</div>

<div class="idx1">xml_texmath_name: <a href="#uid3645">&#10043;</a>.</div>

<div class="idx1">xml_texte_name: <a href="#uid3516">&#10043;</a>.</div>

<div class="idx1">xml_theindex_name: <a href="#uid3652">&#10043;</a>.</div>

<div class="idx1">xml_theorem_head: <a href="#uid3544">&#10043;</a>.</div>

<div class="idx1">xml_theorem_name: <a href="#uid3546">&#10043;</a>.</div>

<div class="idx1">xml_thicklines_name: <a href="#uid3712">&#10043;</a>.</div>

<div class="idx1">xml_thinlines_name: <a href="#uid3715">&#10043;</a>.</div>

<div class="idx1">xml_topic_name: <a href="#uid3522">&#10043;</a>, <a href="#uid3523">&#10043;</a>.</div>

<div class="idx1">xml_topic_title: <a href="#uid3117">&#10043;</a>.</div>

<div class="idx1">xml_ul_name: <a href="#uid3443">&#10043;</a>.</div>

<div class="idx1">xml_underline_name: <a href="#uid3440">&#10043;</a>.</div>

<div class="idx1">xml_vector_name: <a href="#uid3682">&#10043;</a>.</div>

<div class="idx1">xml_xleaders_name: <a href="#uid3639">&#10043;</a>.</div>

<div class="idx1">xml_xref_name: <a href="#uid3532">&#10043;</a>.</div>

<div class="idx1">xml_xtheorem_name: <a href="#uid3541">&#10043;</a>.</div>

<div class="idx1"><samp>\XMLaddatt</samp>: <a href="#uid266">&#10043;</a>, <a href="#uid2792">&#10043;</a>.</div>

<div class="idx1">xmlall (tralics option): <a href="#uid3105">&#10043;</a>.</div>

<div class="idx1"><samp>\XMLcurrentid</samp>: <a href="#uid266">&#10043;</a>, <a href="#uid541">&#10043;</a>, <a href="#uid1737">&#10043;</a>.</div>

<div class="idx1"><samp>xmlelement</samp>: <a href="#uid2784">&#10043;</a>.</div>

<div class="idx1"><samp>\xmlelt</samp>: <a href="#uid2758">&#10043;</a>.</div>

<div class="idx1"><samp>\xmlemptyelt</samp>: <a href="#uid2760">&#10043;</a>.</div>

<div class="idx1">xmlfo (tralics option): <a href="#uid3101">&#10043;</a>.</div>

<div class="idx1">xmlhtml (tralics option): <a href="#uid3102">&#10043;</a>.</div>

<div class="idx1"><samp>\XMLlastid</samp>: <a href="#uid266">&#10043;</a>, <a href="#uid539">&#10043;</a>, <a href="#uid1736">&#10043;</a>.</div>

<div class="idx1"><samp>\xmllatex</samp>: <a href="#uid2756">&#10043;</a>.</div>

<div class="idx1">xmllint (tralics option): <a href="#uid3103">&#10043;</a>.</div>

<div class="idx1"><samp>xmlonly</samp>: <a href="#uid2889">&#10043;</a>.</div>

<div class="idx1"><samp>\XMLsolvecite</samp>: <a href="#uid1735">&#10043;</a>.</div>

<div class="idx1">xmltex (tralics option): <a href="#uid3104">&#10043;</a>.</div>

<div class="idx1"><samp>\@xpt</samp>: <a href="#uid3859">&#10043;</a>.</div>

<div class="idx1"><samp>\xscale</samp>: <a href="#uid3263">&#10043;</a>, <a href="#uid3734">&#10043;</a>, <a href="#uid3842">&#10043;</a>.</div>

<div class="idx1"><samp>\xscaley</samp>: <a href="#uid3265">&#10043;</a>, <a href="#uid3735">&#10043;</a>, <a href="#uid3844">&#10043;</a>.</div>

<div class="idx1"><samp>\xspace</samp>: <a href="#uid1174">&#10043;</a>, <a href="#uid2502">&#10043;</a>.</div>

<div class="idx1"><samp>\xspaceskip</samp>: <a href="#uid311">&#10043;</a>, <a href="#uid464">&#10043;</a>.</div>

<div class="idx1"><samp>\@xviipt</samp>: <a href="#uid3863">&#10043;</a>.</div>

<div class="idx1"><samp>\@xxpt</samp>: <a href="#uid3864">&#10043;</a>.</div>

<div class="idx1"><samp>\@xxvpt</samp>: <a href="#uid3865">&#10043;</a>.</div>

<div class="idx1"><samp>\year</samp>: <a href="#uid424">&#10043;</a>.</div>

<div class="idx1">year (bibtex field): <a href="#uid1787">&#10043;</a>.</div>

<div class="idx1">year (bibtex type): <a href="#uid1720">&#10043;</a>, <a href="#uid1792">&#10043;</a>.</div>

<div class="idx1">year (tralics option): <a href="#uid3107">&#10043;</a>.</div>

<div class="idx1"><samp>\yearcite</samp>: <a href="#uid1723">&#10043;</a>.</div>

<div class="idx1"><samp>\yscale</samp>: <a href="#uid3264">&#10043;</a>, <a href="#uid3736">&#10043;</a>, <a href="#uid3843">&#10043;</a>.</div>

<div class="idx1"><samp>\yscalex</samp>: <a href="#uid3266">&#10043;</a>, <a href="#uid3737">&#10043;</a>, <a href="#uid3845">&#10043;</a>.</div>

<div class="idx1"><samp>\z@skip</samp>: <a href="#uid341">&#10043;</a>.</div>

<div class="idx1"><samp>\zap@space</samp>: <a href="#uid1135">&#10043;</a>, <a href="#uid2562">&#10043;</a>.</div>

<div class="idx1"><samp>\z@</samp>: <a href="#uid645">&#10043;</a>, <a href="#uid3820">&#10043;</a>.</div>

<div class="idx1"><samp>\zeta</samp>: <a href="#uid1258">&#10043;</a>.</div>
<h1>Notes</h1><hr /><p class="nofirst noindent" id="note1"><a title="back to text" href="#uid1">Note 1. </a>Email: Jose.Grimm@sophia.inria.fr</p><hr /><p class="nofirst noindent" id="note2"><a title="back to text" href="#uid3">Note 2. </a>See
<a href="http://www.inria.fr/interne/disc/apropos/chantiers/raweb-xml/histoire.html">http://www.inria.fr/interne/disc/apropos/chantiers/raweb-xml/histoire.html</a></p><hr /><p class="nofirst noindent" id="note3"><a title="back to text" href="#uid4">Note 3. </a>Grif stands for `GRenoble Interactive Formatter´; further
developments of this editor by the Opera team led to the Amaya software.</p><hr /><p class="nofirst noindent" id="note4"><a title="back to text" href="#uid5">Note 4. </a>See
<a href="http://www.inria.fr/rapportsactivite/RA94/RA94.html">http://www.inria.fr/rapportsactivite/RA94/RA94.html</a></p><hr /><p class="nofirst noindent" id="note5"><a title="back to text" href="#uid8">Note 5. </a>InterDepositDigitalNumber = IDDN.FR.001.510030.001.S.P.2002.000.31235
is the IDDN for version 2.9.4, February 2007</p><hr /><p class="nofirst noindent" id="note6"><a title="back to text" href="#uid9">Note 6. </a>Web site is <a href="http://ralyx.inria.fr">http://<!--PASS THROUGH allowbreak-->ralyx.<!--PASS THROUGH allowbreak-->inria.<!--PASS THROUGH allowbreak-->fr</a></p><hr /><p class="nofirst noindent" id="note7"><a title="back to text" href="#uid10">Note 7. </a>Web site is <a href="http://www.xyleme.com">http://<!--PASS THROUGH allowbreak-->www.<!--PASS THROUGH allowbreak-->xyleme.<!--PASS THROUGH allowbreak-->com</a></p><hr /><p class="nofirst noindent" id="note8"><a title="back to text" href="#uid21">Note 8. </a>Put `Hello,
word!´ in a tex file, compile, and admire the result!</p><hr /><p class="nofirst noindent" id="note9"><a title="back to text" href="#uid26">Note 9. </a>In the HTML version, the delimiters around 1=2 are not shown
if the browser in not in MathML mode</p><hr /><p class="nofirst noindent" id="note10"><a title="back to text" href="#uid29">Note 10. </a>In reality, this depends on the input encoding. In <i>Tralics</i>,
there are very few active characters.</p><hr /><p class="nofirst noindent" id="note11"><a title="back to text" href="#uid32">Note 11. </a>Since <samp>\emph</samp> is robust, it takes no argument, but the
non-robust command associated to it reads the argument. In any case an
argument is read.</p><hr /><p class="nofirst noindent" id="note12"><a title="back to text" href="#uid36">Note 12. </a>We use angle brackets for the formal syntax of TeX  as explained in
the TeXbook, <a href="#bid3" title="Knuth1984">[4]</a>.</p><hr /><p class="nofirst noindent" id="note13"><a title="back to text" href="#uid38">Note 13. </a>In fact, you should use <samp>\active</samp> only in the scope of a
<samp>\catcode</samp>, so you can forget that `<samp>\active</samp>´ typesets as `
´!</p><hr /><p class="nofirst noindent" id="note14"><a title="back to text" href="#uid41">Note 14. </a>Generalized Extensible
LaTeX-Like Markup</p><hr /><p class="nofirst noindent" id="note15"><a title="back to text" href="#uid52">Note 15. </a>Sometimes packages are called style files, because this was the
original term, and the extension is .sty.</p><hr /><p class="nofirst noindent" id="note16"><a title="back to text" href="#uid56">Note 16. </a>LaTeX writes in this file everything needed to produce
a Table of Contents; the content of the file can be inserted at the start or
end of the end document.</p><hr /><p class="nofirst noindent" id="note17"><a title="back to text" href="#uid83">Note 17. </a>An example
of bold math is when typesetting the LaTeX2&#1013; logo, see page <a href="#uid124" title="Defining new commands">2.1</a>.</p><hr /><p class="nofirst noindent" id="note18"><a title="back to text" href="#uid91">Note 18. </a>Apart from the
kludge mentioned above, <i>Tralics</i> make no difference between the letter x and
the parentheses around it; since parentheses are often omitted in the case
of the sine function, the argument could as well be a parenthesized x.</p><hr /><p class="nofirst noindent" id="note19"><a title="back to text" href="#uid92">Note 19. </a>Guess: in the previous formula, was the H in or out of the
math formula.</p><hr /><p class="nofirst noindent" id="note20"><a title="back to text" href="#uid103">Note 20. </a>but
Netscape does not hesitate to break after the plus sign, in the case of
<tt class="txt">&lt;sup&gt;</tt>, observation made in 1999</p><hr /><p class="nofirst noindent" id="note21"><a title="back to text" href="#uid120">Note 21. </a>or Thailand; it has an international layout, with a W. logo
which is a registered trademark of M.C.</p><hr /><p class="nofirst noindent" id="note22"><a title="back to text" href="#uid121">Note 22. </a>This character is not generated when using option nozerowidthspace</p><hr /><p class="nofirst noindent" id="note23"><a title="back to text" href="#uid134">Note 23. </a>The last character on the line is not read</p><hr /><p class="nofirst noindent" id="note24"><a title="back to text" href="#uid137">Note 24. </a>TeX uses <tt>#</tt><sub>13</sub>, because no confusion with an active character
can occur.</p><hr /><p class="nofirst noindent" id="note25"><a title="back to text" href="#uid138">Note 25. </a>TeX uses <tt>1</tt><sub>5</sub>, because no confusion with a
character of category 5 can occur (See TeXbook, exercise 7.3).</p><hr /><p class="nofirst noindent" id="note26"><a title="back to text" href="#uid139">Note 26. </a>Said otherwise
<samp>\ifx</samp><samp>\foo</samp><samp>\xbar</samp> produces different results in TeX and in
<i>Tralics</i>; these two commands take two arguments, and have the same body, the
only difference is in the introducing character.</p><hr /><p class="nofirst noindent" id="note27"><a title="back to text" href="#uid140">Note 27. </a>This was accepted by <i>Tralics</i> until version 2.3: if a command takes
one argument, the value of the second argument is the empty list.</p><hr /><p class="nofirst noindent" id="note28"><a title="back to text" href="#uid177">Note 28. </a>The command
<samp>\currentgrouplevel</samp> defined by &#1013;-TeX returns one less than this value.</p><hr /><p class="nofirst noindent" id="note29"><a title="back to text" href="#uid185">Note 29. </a>Here, and
in the lines that follow, you should replace the tilde by anything that
stops scanning the number.</p><hr /><p class="nofirst noindent" id="note30"><a title="back to text" href="#uid198">Note 30. </a>The reference count of the token list of the body of <samp>\fooA</samp> or
<samp>\fooB</samp> must also be increased.</p><hr /><p class="nofirst noindent" id="note31"><a title="back to text" href="#uid202">Note 31. </a>Since <i>Tralics</i>2.9 uses 16bit integers for characters, this
number is much larger, nearly <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><msup xmlns:xlink="http://www.w3.org/1999/xlink"><mn>2</mn> <mn>32</mn> </msup></math></span>; it is much larger than the size of
the hash table, so the real answer is the number of free slots in the hash
table plus the number of already defined two character tokens</p><hr /><p class="nofirst noindent" id="note32"><a title="back to text" href="#uid221">Note 32. </a>many more in &#1013;-TeX, but they are
dynamically allocated; in <i>Tralics</i>2.9, the limit is 4096</p><hr /><p class="nofirst noindent" id="note33"><a title="back to text" href="#uid229">Note 33. </a>Unless redefined by LaTeX</p><hr /><p class="nofirst noindent" id="note34"><a title="back to text" href="#uid270">Note 34. </a>This might be unexpected, and differs from the LaTeX output. In fact, the command <samp>\the</samp> is expanded before the key word `fill´
is completely read, hence before the assignment of the glue, but <samp>\show</samp>
shows the value after the assignment. The difference with LaTeX is the
initial value of <samp>\thinmuskip</samp>.</p><hr /><p class="nofirst noindent" id="note35"><a title="back to text" href="#uid776">Note 35. </a>In earlier versions, the value returned by the allocator
was stored in an internal integer; nowadays, a count register is
used (the same as in LaTeX). The counter 17 contains the current
allocation number for <samp>\newwrite</samp> and should be used with care; the
smallest number returned by <samp>\newcount</samp> is at least 40.</p><hr /><p class="nofirst noindent" id="note36"><a title="back to text" href="#uid819">Note 36. </a>This is a bit more than ten points.</p><hr /><p class="nofirst noindent" id="note37"><a title="back to text" href="#uid872">Note 37. </a>these values were rounded; exact values are 2, 4
and 5 times 10pt/18, and 10pt/18 is a mu.</p><hr /><p class="nofirst noindent" id="note38"><a title="back to text" href="#uid907">Note 38. </a>There is no <samp>\term</samp> command in
<i>Tralics</i>. Until version 2.11.6, the <samp>\par</samp> command was ignored if the
current stack frame is named `term´, in other words inside the <samp>motcle</samp>
environment.</p><hr /><p class="nofirst noindent" id="note39"><a title="back to text" href="#uid920">Note 39. </a>It is unwise to say `<samp>\def</samp><samp>\bar</samp>´, because <samp>\bar</samp> is already
defined for use in math mode, and who knows which commands
rely on this definition.</p><hr /><p class="nofirst noindent" id="note40"><a title="back to text" href="#uid921">Note 40. </a>The remedy is to add a space after the command name. The trouble is
when the command results from partial expansion of an active character, case
where spaces should be preserved. This is one reason why active characters
cannot be made robust in LaTeX. The package <span class="sansserif">fixltx2e</span> corrects a
bug of this type for the expansion of <samp>\@</samp>: a space disappears if the
command is written on a file and reread.</p><hr /><p class="nofirst noindent" id="note41"><a title="back to text" href="#uid929">Note 41. </a>The actual code uses <samp>\kernel@ifnextchar</samp>, because amsmath
redefines sometimes <samp>\@ifnextchar</samp></p><hr /><p class="nofirst noindent" id="note42"><a title="back to text" href="#uid937">Note 42. </a>Since Z is the result of expansion of <samp>\number</samp> it
starts with a digit or a minus sign, so that this case will not happen.</p><hr /><p class="nofirst noindent" id="note43"><a title="back to text" href="#uid939">Note 43. </a>There is a
<samp>\sharp</samp> command, that typesets as <span class="math"><math xmlns="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mo xmlns:xlink="http://www.w3.org/1999/xlink">&#9839;</mo></math></span>, hence be careful.</p><hr /><p class="nofirst noindent" id="note44"><a title="back to text" href="#uid940">Note 44. </a>This explains the names <samp>\@ne</samp>
and <samp>\tw@</samp>.</p><hr /><p class="nofirst noindent" id="note45"><a title="back to text" href="#uid946">Note 45. </a>The kernel contains two versions, one of them being <samp>\long</samp>.</p><hr /><p class="nofirst noindent" id="note46"><a title="back to text" href="#uid995">Note 46. </a>There is no clear reason
why this command should be <samp>\outer</samp>, hance LaTeX uses a normal macro
instead</p><hr /><p class="nofirst noindent" id="note47"><a title="back to text" href="#uid1018">Note 47. </a>If you remember the code of <samp>\fooiv</samp>, you can see that two
LaTeX commands with optional arguments always compare
unequal.</p><hr /><p class="nofirst noindent" id="note48"><a title="back to text" href="#uid1019">Note 48. </a>Note that &#1013;-TeX adds a third flag, <samp>\protected</samp> that
is also compared.</p><hr /><p class="nofirst noindent" id="note49"><a title="back to text" href="#uid1043">Note 49. </a>A safe
solution would be to change all category codes; but this is time consuming.
On the other hand, if a character like é appears in a verbatim, it will be
converted to a call (put acute accent on letter e), so that you will see é
even in the case of a 7bit font.</p><hr /><p class="nofirst noindent" id="note50"><a title="back to text" href="#uid1708">Note 50. </a>From the web page of
BiblioX: http://www.silmaril.ie/bibliox/biblioxdoc.html</p><hr /><p class="nofirst noindent" id="note51"><a title="back to text" href="#uid1711">Note 51. </a>Exact ordering on page <a href="#uid1740" title="Using Tralics instead of BibTeX">4.3</a>.</p><hr /><p class="nofirst noindent" id="note52"><a title="back to text" href="#uid1713">Note 52. </a>Sorting after assigning a number is weird.</p><hr /><p class="nofirst noindent" id="note53"><a title="back to text" href="#uid1716">Note 53. </a>Exemples on lines 135 to 148 below were produced with a hacked version
of <i>Tralics</i> and bst files</p><hr /><p class="nofirst noindent" id="note54"><a title="back to text" href="#uid1788">Note 54. </a>This is not true in
<i>Tralics</i>; you must escape this characters.</p><hr /><p class="nofirst noindent" id="note55"><a title="back to text" href="#uid1820">Note 55. </a>No
error is signaled if you invoke <i>Tralics</i> with the switch `nobibyearerror´</p><hr /><p class="nofirst noindent" id="note56"><a title="back to text" href="#uid1824">Note 56. </a>But the prefix `refer´ is kept if the current year is at
least 2006, and the magic switch distinguish-refer-in-rabib has been given</p><hr /><p class="nofirst noindent" id="note57"><a title="back to text" href="#uid1826">Note 57. </a>For instance <i>Tame the BeaST</i>, by Nicolas Markey, available on CTAN</p><hr /><p class="nofirst noindent" id="note58"><a title="back to text" href="#uid1827">Note 58. </a>According to N. Markey, you should say <tt><samp>{<samp>\relax</samp>
Ch}</samp>ristopher</tt> in BibTeX</p><hr /><p class="nofirst noindent" id="note59"><a title="back to text" href="#uid1865">Note 59. </a>In fact, in subsequent version, a space is added after the
first dollar sign, independently of the position on the line.</p><hr /><p class="nofirst noindent" id="note60"><a title="back to text" href="#uid1868">Note 60. </a>In <i>Tralics</i>, the range is
0&#8211;65535; note that the null characters is discarded, and characters U+FFFE,
U+FFFF are illegal Unicode characters</p><hr /><p class="nofirst noindent" id="note61"><a title="back to text" href="#uid1871">Note 61. </a>All French letters exist in iso-8859-1,
except <samp>\oe</samp> <samp>\OE</samp>, <samp>\&#8220;Y</samp>, and the Euro sign</p><hr /><p class="nofirst noindent" id="note62"><a title="back to text" href="#uid1888">Note 62. </a>This is an apostrophe, character U+0027, ascii 39. The
<i>Tralics</i> translation could be acute accent, Unicode U+00B4, or right single
quote quotation mark, character U+2019.</p><hr /><p class="nofirst noindent" id="note63"><a title="back to text" href="#uid1934">Note 63. </a>See the TeXbook, chapter 25</p><hr /><p class="nofirst noindent" id="note64"><a title="back to text" href="#uid1936">Note 64. </a>See the TeXbook, chapter 26</p><hr /><p class="nofirst noindent" id="note65"><a title="back to text" href="#uid1949">Note 65. </a>This is because empty paragraphs are generally removed. With
this hack, an empty verbatim line does not disappear</p><hr /><p class="nofirst noindent" id="note66"><a title="back to text" href="#uid1997">Note 66. </a>In a previous version the translation was an entity, named
<tt class="txt">&amp;ieme</tt>, defined by the Raweb. Same remark for the commands that follow,
and <samp>\numero</samp>.</p><hr /><p class="nofirst noindent" id="note67"><a title="back to text" href="#uid2468">Note 67. </a>This seems untrue, it might depend on the version of
LaTeX, so that you should use an explicit star</p><hr /><p class="nofirst noindent" id="note68"><a title="back to text" href="#uid2728">Note 68. </a>Dummy footnote here</p><hr /><p class="nofirst noindent" id="note69"><a title="back to text" href="#uid3002">Note 69. </a>Was src in previous versions</p><hr /><p class="nofirst noindent" id="note70"><a title="back to text" href="#uid3121">Note 70. </a>This is
new in version 2.5 (pl7)</p><hr /><p class="nofirst noindent" id="note71"><a title="back to text" href="#uid3149">Note 71. </a>This re-ordering mechanism
has been removed in 2007</p><hr /><p class="nofirst noindent" id="note72"><a title="back to text" href="#uid3163">Note 72. </a>It is ignored since 2007</p><hr /><p class="nofirst noindent" id="note73"><a title="back to text" href="#uid3166">Note 73. </a>It is ignored since 2007</p><hr /><p class="nofirst noindent" id="note74"><a title="back to text" href="#uid3167">Note 74. </a>Feature introduced in version 2.5 (pl7)</p><hr /><p class="nofirst noindent" id="note75"><a title="back to text" href="#uid3171">Note 75. </a>Most of them removed since 2007</p><hr /><p class="nofirst noindent" id="note76"><a title="back to text" href="#uid3177">Note 76. </a>This
is an obsolescent command; it may one day become obsolete</p><hr /><p class="nofirst noindent" id="note77"><a title="back to text" href="#uid3302">Note 77. </a>HAL-INRIA is an environment for self-archiving of scientific
publications and providing free access to them, like arXiv</p><hr /><p class="nofirst noindent" id="note78"><a title="back to text" href="#uid3767">Note 78. </a>The &#1013;-TeX document says: current newline character</p><hr /><p class="nofirst noindent" id="note79"><a title="back to text" href="#uid3781">Note 79. </a>Guess why the macro is not called <samp>\foo</samp></p><hr /><p class="nofirst noindent" id="note80"><a title="back to text" href="#uid3786">Note 80. </a>Since version 2.12, overflow is checked for all operations</p><hr /><p class="nofirst noindent" id="note81"><a title="back to text" href="#uid3936">Note 81. </a>maybe also indirectly via
<samp>\pagestyle</samp></p></body></html>

