Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > fe880a8a8b91ae0b29da8fb72f3c41de > files > 20

hevea-2.32-2.mga7.i586.rpm

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="generator" content="hevea 2.32">
<meta name="Author" content="Luc Maranget">
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"></script><link rel="stylesheet" type="text/css" href="manual.css">
<title>Extra Features</title>
</head>
<body>
<a href="manual037.html"><img src="previous_motif.svg" alt="Previous"></a>
<a href="manual022.html"><img src="contents_motif.svg" alt="Up"></a>
<a href="manual-packages.html"><img src="next_motif.svg" alt="Next"></a>
<hr>
<h2 class="section" id="sec170">B.16&#XA0;&#XA0;Extra Features</h2>
<ul>
<li><a href="extras.html#sec171">T<sub>E</sub>X macros</a>
</li><li><a href="extras.html#sec177">Command Definition inside Command Definition</a>
</li><li><a href="extras.html#sec178">Date and time</a>
</li><li><a href="extras.html#fancysection">Fancy sectioning commands</a>
</li><li><a href="extras.html#winfonts">Targeting Windows</a>
</li><li><a href="extras.html#mathjax"><span class="c015">MathJax</span> support</a>
</li></ul>
<p>
This section describes H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A functionalities that extends on plain L<sup>A</sup>T<sub>E</sub>X,
as defined in [<a href="manual047.html#latex">L<sup>A</sup>T<sub>E</sub>X</a>].
Most of the features described here are performed by default.</p>
<h3 class="subsection" id="sec171">B.16.1&#XA0;&#XA0;T<sub>E</sub>X macros</h3>
<p><a id="texmacro"></a>
Normally, H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A does not recognise constructs that are specific to
T<sub>E</sub>X.
However, some of the internal commands of H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A are homonymous to
T<sub>E</sub>X macros, in order to enhance compatibility.
Note that full compatibility with T<sub>E</sub>X is not guaranteed.</p>
<h4 class="subsubsection" id="sec172">B.16.1.1&#XA0;&#XA0;&#XC0; la T<sub>E</sub>X macros definitions</h4>
<p><a id="texmacros"></a>
<a id="hevea_default200"></a><a id="hevea_default201"></a>
The <code>\def</code> construct for defining commands is supported.
It is important to
notice that H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A semantics for <code>\def</code> 
follows T<sub>E</sub>X semantics.
That is, defining a command that already
exists with <code>\def</code> succeeds.</p><p>Delimiting characters in command definition are somehow supported.
Consider the following example from the T<sub>E</sub>X Book:
</p><pre class="verbatim">\def\Look{\textsc{Look}}
\def\x{\textsc{x}}
\def\cs AB#1#2C$#3\$ {#3{ab#1}#1 c\x #2}
\cs AB {\Look}{}C${And \$}{look}\$ 5.
</pre><p>
It yields:



And $lookab<span class="c021">LookLook</span> c<span class="c021">x</span>5.</p><p>Please note that delimiting characters are supported as far as I
could, problems are likely with delimiting characters which include
spaces or command names, in particular the command name <code>\{</code>.
One can include <code>\{</code> in a command argument by using the grouping
characters <code>{</code>&#X2026; <code>}</code>:
</p><pre class="verbatim">\def\frenchquote(#1){\guillemotleft~\emph{#1}~\guillemotright{} (in French)}
he said \frenchquote(Alors cette accolade ouvrante {``\{''}~?).
</pre><p>
Yields:
he said &#XAB;&#XA0;<em>Alors cette accolade ouvrante &#X201C;{&#X201D;&#XA0;?</em>&#XA0;&#XBB; (in French).
</p><p>Another issue regards comments: &#X201C;%&#X201D; in arguments may give undefined
behaviours, while comments are better avoided while defining
macros. As an example, the following code will <em>not</em>
be handled properly
by H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A:
</p><pre class="verbatim">\def\x%
   #1{y}
</pre><p>
Such T<sub>E</sub>X source should be rewritten as <code>\def\x#1{y}</code>.</p><p>Another source of incompatibility with T<sub>E</sub>X is that substitution of
macros parameters is not performed at the same moment by H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A and
T<sub>E</sub>X.
However, things should go smoothly at the first level of macro
expansion, that is when the delimiters
appear in source code at the same level as the macro that is to
parse them.
For instance, the following source will give different results in
L<sup>A</sup>T<sub>E</sub>X and in H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A:
</p><pre class="verbatim">\def\cs#1A{``#1''}
\def\othercs#1{\cs#1A}
\othercs{coucouA}
</pre><p>
L<sup>A</sup>T<sub>E</sub>X output is &#X201C;coucou&#X201D;A, while H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A output is &#X201C;coucouA&#X201D;.
For instance, here is H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A output:


&#X201C;coucouA&#X201D;.
Please note that in most situations this discrepancy will make
H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A crash. </p>
<h4 class="subsubsection" id="sec173">B.16.1.2&#XA0;&#XA0;The <span class="c013">\let</span> construct</h4>
<p>
<a id="hevea_default202"></a>H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A also processes a
limited version of <code>\let</code>:
</p><div class="flushleft">
<code>\let</code> <span class="c019">macro-name1</span> = <span class="c019">macro-name2</span>
</div><p>
The effect is to bind <span class="c019">macro-name1</span> to whatever <span class="c019">macro-name2</span>
is bound to at the time <code>\let</code> is processed. This construct may
prove very useful in situations where
one wishes to slightly modify basic commands.
See sections&#XA0;<a href="manual020.html#customize-let">10.3</a> and&#XA0;<a href="manual024.html#exlet">B.2</a> for examples of using
<code>\let</code> in such a situation.</p>
<h4 class="subsubsection" id="sec174">B.16.1.3&#XA0;&#XA0;The <span class="c013">\global</span> construct</h4>
<p>
<a id="hevea_default203"></a>
It is possible to escape scope and to make global definitions
and bindings by using the T<sub>E</sub>X construct <code>\global</code>.
The <code>\global</code> construct is significant before
<code>\def</code> and <code>\let</code> constructs.</p><p><a id="hevea_default204"></a>
Also note that <code>\gdef</code> is equivalent to <code>\global\def</code>.</p>
<h4 class="subsubsection" id="sec175">B.16.1.4&#XA0;&#XA0;T<sub>E</sub>X Conditional Macros</h4>
<p><a id="texcond"></a>
<a id="hevea_default205"></a><a id="hevea_default206"></a><a id="hevea_default207"></a><a id="hevea_default208"></a>
The <code>\newif\if</code><span class="c019">name</span>, where <span class="c019">name</span> is made of letters
only, creates three macros:
<code>\if</code><span class="c019">name</span>, <code>\</code><span class="c019">name</span><code>true</code> and
<code>\</code><span class="c019">name</span><code>false</code>.
The latter two set the <span class="c019">name</span> condition to <span class="c019">true</span> and
<span class="c019">false</span>, respectively.
The <code>\if</code><span class="c019">name</span> command tests the condition <span class="c019">name</span>:
</p><div class="flushleft">
<code>\if</code><span class="c019">name<br>
text</span><sub>1</sub><br>
<code>\else</code><br>
<span class="c019">text</span><sub>2</sub><br>
<code>\fi</code><br>
</div><p>
Text <span class="c019">text</span><sub>1</sub> is processed when <span class="c019">name</span> is
<span class="c019">true</span>, otherwise <span class="c019">text</span><sub>2</sub> is processed.
If <span class="c019">text</span><sub>2</sub> is empty, then the <code>\else</code> keyword can be
omitted.</p><p>Note that H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A also implements L<sup>A</sup>T<sub>E</sub>X <span class="c013">ifthen</span> package
and that T<sub>E</sub>X simple conditional macros are fully compatible with
L<sup>A</sup>T<sub>E</sub>X boolean registers. More precisely,
we have the following correspondences:
</p><div class="center">
<table class="c002 cellpading0"><tr><td class="c030" colspan=2>T<sub>E</sub>X</td><td class="c030">L<sup>A</sup>T<sub>E</sub>X</td></tr>
<tr><td class="hbar" colspan=3></td></tr>
<tr><td class="c040"><code>\newif\if</code><span class="c019">name</span></td><td class="c030">&#XA0;&#XA0;</td><td class="c040"><code>\newboolean{</code><span class="c019">name</span><code>}</code></td></tr>
<tr><td class="c040"><code>\</code><span class="c019">name</span><code>true</code></td><td class="c030">&#XA0;&#XA0;</td><td class="c040"><code>\setboolean{</code><span class="c019">name</span><code>}{true}</code></td></tr>
<tr><td class="c040"><code>\</code><span class="c019">name</span><code>false</code></td><td class="c030">&#XA0;&#XA0;</td><td class="c040"><code>\setboolean{</code><span class="c019">name</span><code>}{false}</code></td></tr>
<tr><td class="c040"><code>\if</code><span class="c019">name text</span><sub>1</sub><code>\else</code>
<span class="c019">text</span><sub>2</sub><code>\fi</code></td><td class="c030">&#XA0;&#XA0;</td><td class="c040"><code>\ifthenelse{\boolean{</code><span class="c019">name</span><code>}}{</code><span class="c019">text</span><sub>1</sub><code>}{</code><span class="c019">text</span><sub>2</sub><code>}</code></td></tr>
</table>
</div>
<h4 class="subsubsection" id="sec176">B.16.1.5&#XA0;&#XA0;Other T<sub>E</sub>X Macros</h4>
<p>
H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A implements the macros <code>\unskip</code> and <code>\endinput</code>.
It also supports the <code>\csname</code>&#X2026; <code>\endcsname</code>
construct.</p>
<h3 class="subsection" id="sec177">B.16.2&#XA0;&#XA0;Command Definition inside Command Definition</h3>
<p>
<a id="hevea_default209"></a><a id="hevea_default210"></a>
If one strictly follows the L<sup>A</sup>T<sub>E</sub>X manual, only commands with no
arguments can be defined inside other commands.
Parameters (<em>i.e.</em> <code>#</code><span class="c019">n</span>) occurring inside command bodies
refer to the outer definition, even when they appear in nested
command definitions.
That is, the following source:
</p><pre class="verbatim">\newcommand{\outercom}[1]{\newcommand{\insidecom}{#1}\insidecom}
\outercom{outer}
</pre><p>
yields this output:
</p><div class="center">

outer
</div><p>Nevertheless, nested commands with arguments are allowed.
Standard parameters <code>#</code><span class="c019">n</span> still refer to the outer
definition, while nested parameters <code>##</code><span class="c019">n</span> refer to the
inner definition.
That is, the source:
</p><pre class="verbatim">\newcommand{\outercom}[1]{\newcommand{\insidecom}[1]{##1}\insidecom{inner}}
\outercom{outer}
</pre><p>
yields this output:
</p><div class="center">

inner
</div>
<h3 class="subsection" id="sec178">B.16.3&#XA0;&#XA0;Date and time</h3>
<p>
<a id="hevea_default211"></a><a id="hevea_default212"></a>
Date and time support is not enabled by default, for portability and
simplicity reasons.</p><p>However, H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A source distribution includes a simple (<span class="c013">sh</span>)
shell script
<span class="c013">xxdate.exe</span> that activates date and time support.
The <span class="c013">hevea</span> command, should be invoked as:
</p><pre class="verbatim"># hevea -exec xxdate.exe ...
</pre><p>
This will execute the script <span class="c013">xxdate.exe</span>, whose output is then
read by H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A.
As a consequence, standard L<sup>A</sup>T<sub>E</sub>X counters <code>year</code>,
<code>month</code>, <code>day</code> and
<code>time</code> are defined and
L<sup>A</sup>T<sub>E</sub>X command <code>\today</code> works properly.
<a id="hevea_default213"></a>
Additionally the following counters and commands are defined:
</p><div class="center">
<table class="c002 cellpading0"><tr><td class="hbar" colspan=3></td></tr>
<tr><td class="c042">Counter <span class="c013">weekday</span></td><td class="c030">&#XA0;&#XA0;</td><td class="c040">day of week, 0&#X2026;6
(e.g. 3)</td></tr>
<tr><td class="c042">Counter <span class="c013">Hour</span></td><td class="c030">&#XA0;&#XA0;</td><td class="c040">hour, 00&#X2026;11
(e.g. 03)</td></tr>
<tr><td class="c042">Counter <span class="c013">hour</span></td><td class="c030">&#XA0;&#XA0;</td><td class="c040">hour, 00&#X2026;23 (e.g. 15)</td></tr>
<tr><td class="c042">Counter <span class="c013">minute</span></td><td class="c030">&#XA0;&#XA0;</td><td class="c040">minute, 00&#X2026;59
(e.g. 20)</td></tr>
<tr><td class="c042">Counter <span class="c013">second</span></td><td class="c030">&#XA0;&#XA0;</td><td class="c040">second, 00&#X2026;61<sup><a id="text10" href="#note10">9</a></sup>(e.g. 45)</td></tr>
<tr><td class="hbar" colspan=3></td></tr>
<tr><td class="c042">Command <code>\ampm</code></td><td class="c030">&#XA0;&#XA0;</td><td class="c040">AM or PM
(e.g. PM)</td></tr>
<tr><td class="c042">Command <code>\timezone</code></td><td class="c030">&#XA0;&#XA0;</td><td class="c040">Time zone
(e.g. CEST)</td></tr>
<tr><td class="c042">Command <code>\heveadate</code></td><td class="c030">&#XA0;&#XA0;</td><td class="c040">Output of the <span class="c013">date</span> Unix
command, (e.g. Wed Jul 4 15:20:45 CEST 2018)</td></tr>
<tr><td class="hbar" colspan=3></td></tr>
</table>
</div><p>Note that I chose to add an extra option (and not an extra
<code>\@exec</code> primitive) for security reasons. You certainly do
not want to enable H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A to execute silently an arbitrary program
without being conscious of that fact.
Moreover, the <span class="c013">hevea</span> program does not execute
<span class="c013">xxdate.exe</span> by default since it is difficult to write such 
a script in a portable manner.</p><p>Windows users should enjoy the same features with the version of
<span class="c013">xxdate.exe</span> included in the Win32 distribution. </p>
<h3 class="subsection" id="fancysection">B.16.4&#XA0;&#XA0;Fancy sectioning commands</h3>
<p>
<a id="hevea_default214"></a><a id="hevea_default215"></a>Loading the <span class="c013">fancysection.hva</span> file will radically change the
style of sectional units headers: they appear over a green
background, the background color saturation decreases as the sectioning
commands themselves do (this is the style of this manual).
Additionally, the document background color is white.</p><p><span class="c023">Note : </span>Fancy section has been re-implemented using style-sheets. While it respects the old behaviour, users are encouraged to try out style-sheets for more flexibility. See Section&#XA0;<a href="manual019.html#style%3Asheets">9</a> for details.</p><p>The <span class="c013">fancysection.hva</span> file is intended to be loaded after
the document base style.
Hence the easiest way to load the <span class="c013">fancysection.hva</span> file
is by issuing <code>\usepackage{fancysection}</code> in the document preamble.
To allow processing by L<sup>A</sup>T<sub>E</sub>X, one may for instance create
an empty <span class="c013">fancysection.sty</span> file.</p><p>As an alternative, to use fancy section style in
<span class="c013">doc.tex</span> whose base style is <span class="c019">article</span>
you should issue the command:
</p><pre class="verbatim">  # hevea article.hva fancysection.hva doc.tex
</pre><p>
You can also make a <span class="c013">doc.hva</span> file that contains the two lines:
</p><pre class="verbatim">  \input{article.hva}
  \input{fancysection.hva}
</pre><p>
And then launch <span class="c013">hevea</span> as:
</p><pre class="verbatim">  # hevea doc.hva doc.tex
</pre><p>Sectioning command background colours can be changed by
redefining the corresponding colours (<span class="c013">part</span>, <span class="c013">chapter</span>,
<span class="c013">section</span>,&#X2026;).
For instance, you get various mixes of red and orange by:
</p><pre class="verbatim">\input{article.hva}
\input{fancysection.hva}
\definecolor{part}{named}{BrickRed}
\definecolor{section}{named}{RedOrange}
\definecolor{subsection}{named}{BurntOrange}
</pre><p>
(See section&#XA0;<a href="manual036.html#color%3Apackage">B.14.2</a> for details on the <span class="c013">named</span>
color model that is used above.)</p><p><a id="hevea_default216"></a>
Another choice is issuing the command
<code>\colorsections{</code><span class="c019">hue</span><code>}</code>, where
<span class="c019">hue</span> is a hue value to be interpreted in the HSV model.
For instance,
</p><pre class="verbatim">\input{article.hva}
\input{fancysection.hva}
\colorsections{20}
</pre><p>
will yield sectional headers on a red-orange background.</p><p><a id="hevea_default217"></a>
H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A distribution features another style for fancy sectioning commands:
the <span class="c013">undersection</span> package provides underlined sectional headers.</p>
<h3 class="subsection" id="winfonts">B.16.5&#XA0;&#XA0;Targeting Windows</h3>
<p>
<a id="hevea_default218"></a><a id="hevea_default219"></a>
At the time of this release, Windows support for symbols
through Unicode is not as complete as the one of Linux, which I am
using for testing&#XA0;H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A.</p><p>One of the most salient shortcomings is the inability to display sub-elements
for big brackets, braces and parenthesis, which H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A normally
outputs when it processes <code>\left[</code>, <code>\right\}</code> etc.</p><p>We (hopefully) expect Windows fonts to display more of
Unicode easily in a foreseeable future. As a temporary fix, we provide
a style file <span class="c013">winfonts.hva</span>.
Authors concerned by producing pages that do not look too ugly
when viewed through Windows browsers are thus advised to
load the file <span class="c013">winfonts.hva</span>.
For instance they can invoke H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A as:
</p><pre class="verbatim"># hevea winfonts.hva ...
</pre><p>
At the moment, loading <span class="c013">winfonts.hva</span>
only changes the rendering
of L<sup>A</sup>T<sub>E</sub>X big delimiters, avoiding the troublesome Unicode entities.
As an example, here are some examples of rendering.
</p><table class="display dcenter"><tr class="c036"><td class="dcell"><table class="c002 cellpading0"><tr><td class="hbar" colspan=5></td></tr>
<tr><td class="c030" colspan=2>delimiters</td><td class="c030" colspan=2>default</td><td class="c030">winfonts</td></tr>
<tr><td class="hbar" colspan=5></td></tr>
<tr><td class="c033"><span class="c013">\left\{&#XA0;&#XA0;&#X2026;&#XA0;&#XA0;\right\}</span></td><td class="c030">&#XA0;&#XA0;&#XA0;&#XA0;</td><td class="c030"><table class="display"><tr class="c036"><td class="dcell">&#X23A7;<br>
&#X23AA;<br>
&#X23A8;<br>
&#X23AA;<br>
&#X23A9;</td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c030">1</td></tr>
<tr><td class="c030">2</td></tr>
<tr><td class="c030">3</td></tr>
</table></td><td class="dcell">&#X23AB;<br>
&#X23AA;<br>
&#X23AC;<br>
&#X23AA;<br>
&#X23AD;</td></tr>
</table></td><td class="c030">&#XA0;&#XA0;&#XA0;&#XA0;</td><td class="c030"><table class="display"><tr class="c036"><td class="dcell">&#XA0;/&#XA0;<br>
&#XA0;|&#XA0;<br>
&lt;&#XA0;<br>
&#XA0;|&#XA0;<br>
&#XA0;\&#XA0;</td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c030">1</td></tr>
<tr><td class="c030">2</td></tr>
<tr><td class="c030">3</td></tr>
</table></td><td class="dcell">&#XA0;\<br>
&#XA0;|<br>
&#XA0;&gt;<br>
&#XA0;|<br>
&#XA0;/</td></tr>
</table></td></tr>
<tr><td class="c033"><span class="c013">\left[&#XA0;&#XA0;&#X2026;&#XA0;&#XA0;\right]</span></td><td class="c030">&#XA0;&#XA0;&#XA0;&#XA0;</td><td class="c030"><table class="display"><tr class="c036"><td class="dcell">&#X23A1;<br>
&#X23A2;<br>
&#X23A2;<br>
&#X23A3;</td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c030">1</td></tr>
<tr><td class="c030">2</td></tr>
<tr><td class="c030">3</td></tr>
</table></td><td class="dcell">&#X23A4;<br>
&#X23A5;<br>
&#X23A5;<br>
&#X23A6;</td></tr>
</table></td><td class="c030">&#XA0;&#XA0;&#XA0;&#XA0;</td><td class="c030"><table class="display"><tr class="c036"><td class="dcell"><table class="delimleft"><tr><td class="bracell hbar c049"></td></tr>
<tr><td class="bracell c031"><div class="vbar" style="height:4em;"></div></td></tr>
<tr><td class="bracell hbar c049"></td></tr>
</table></td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c030">1</td></tr>
<tr><td class="c030">2</td></tr>
<tr><td class="c030">3</td></tr>
</table></td><td class="dcell"><table class="delimright"><tr><td class="bracell hbar c049"></td></tr>
<tr><td class="bracell" style="text-align:right"><div class="vbar" style="height:4em;"></div></td></tr>
<tr><td class="bracell hbar c049"></td></tr>
</table></td></tr>
</table></td></tr>
<tr><td class="c033"><span class="c013">\left(&#XA0;&#XA0;&#X2026;&#XA0;&#XA0;\right)</span></td><td class="c030">&#XA0;&#XA0;&#XA0;&#XA0;</td><td class="c030"><table class="display"><tr class="c036"><td class="dcell">&#X239B;<br>
&#X239C;<br>
&#X239C;<br>
&#X239D;</td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c030">1</td></tr>
<tr><td class="c030">2</td></tr>
<tr><td class="c030">3</td></tr>
</table></td><td class="dcell">&#X239E;<br>
&#X239F;<br>
&#X239F;<br>
&#X23A0;</td></tr>
</table></td><td class="c030">&#XA0;&#XA0;&#XA0;&#XA0;</td><td class="c030"><table class="display"><tr class="c036"><td class="dcell">/&#XA0;<br>
|&#XA0;<br>
|&#XA0;<br>
\&#XA0;</td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c030">1</td></tr>
<tr><td class="c030">2</td></tr>
<tr><td class="c030">3</td></tr>
</table></td><td class="dcell">&#XA0;\<br>
&#XA0;|<br>
&#XA0;|<br>
&#XA0;/</td></tr>
</table></td></tr>
<tr><td class="c033"><span class="c013">\left\vert&#XA0;&#XA0;&#X2026;&#XA0;&#XA0;\right\vert</span></td><td class="c030">&#XA0;&#XA0;&#XA0;&#XA0;</td><td class="c030"><table class="display"><tr class="c036"><td class="dcell">&#X23AA;<br>
&#X23AA;<br>
&#X23AA;<br>
&#X23AA;</td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c030">1</td></tr>
<tr><td class="c030">2</td></tr>
<tr><td class="c030">3</td></tr>
</table></td><td class="dcell">&#X23AA;<br>
&#X23AA;<br>
&#X23AA;<br>
&#X23AA;</td></tr>
</table></td><td class="c030">&#XA0;&#XA0;&#XA0;&#XA0;</td><td class="c030"><table class="display"><tr class="c036"><td class="dcell"><div class="vbar c027"></div></td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c030">1</td></tr>
<tr><td class="c030">2</td></tr>
<tr><td class="c030">3</td></tr>
</table></td><td class="dcell"><div class="vbar c027"></div></td></tr>
</table></td></tr>
<tr><td class="c033"><span class="c013">\left\Vert&#XA0;&#XA0;&#X2026;&#XA0;&#XA0;\right\Vert</span></td><td class="c030">&#XA0;&#XA0;&#XA0;&#XA0;</td><td class="c030"><table class="display"><tr class="c036"><td class="dcell">&#X23AA;&#X23AA;<br>
&#X23AA;&#X23AA;<br>
&#X23AA;&#X23AA;<br>
&#X23AA;&#X23AA;</td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c030">1</td></tr>
<tr><td class="c030">2</td></tr>
<tr><td class="c030">3</td></tr>
</table></td><td class="dcell">&#X23AA;&#X23AA;<br>
&#X23AA;&#X23AA;<br>
&#X23AA;&#X23AA;<br>
&#X23AA;&#X23AA;</td></tr>
</table></td><td class="c030">&#XA0;&#XA0;&#XA0;&#XA0;</td><td class="c030"><table class="display"><tr class="c036"><td class="dcell"><div class="vbar c026"></div></td><td class="dcell"><div class="vbar c026"></div></td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c030">1</td></tr>
<tr><td class="c030">2</td></tr>
<tr><td class="c030">3</td></tr>
</table></td><td class="dcell"><div class="vbar c026"></div></td><td class="dcell"><div class="vbar c026"></div></td></tr>
</table></td></tr>
<tr><td class="hbar" colspan=5></td></tr>
</table></td></tr>
</table><p>More generally, it remains authors responsibility to be careful not to
issue too refined Unicode entities. To that aim, authors that target
a wide audience should first limit themselves to the most common
symbols (<em>e.g.</em> use <code>\leq</code> [&#X2264;]
in place of <code>\preceq</code> [&#X227C;]) and, above all,
they should control the rendering of their documents using several browsers.</p>
<h3 class="subsection" id="mathjax">B.16.6&#XA0;&#XA0;<span class="c015">MathJax</span> support</h3>
<p>
<a id="hevea_default220"></a><a id="hevea_default221"></a><a id="hevea_default222"></a><a id="hevea_default223"></a></p><p><a href="https://www.mathjax.org/"><span class="c015">MathJax</span></a>
support is enabled by loading the
<span class="c015">mathjax</span> package. Two operating mode modes are provided:
explicit and automatic. Notice that H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A distribution includes a innocuous
<span class="c013">mathjax.sty</span> for L<sup>A</sup>T<sub>E</sub>X compatibility &#X2014; see also Sec.&#XA0;<a href="manual044.html#installsty">C.4.2</a>.</p>
<h4 class="subsubsection" id="sec182">B.16.6.1&#XA0;&#XA0;Explicit mode</h4>
<p>
<a id="hevea_default224"></a><a id="hevea_default225"></a><a id="hevea_default226"></a><a id="hevea_default227"></a>Explicit mode is enabled when <code>\usepackage{mathjax}</code>
appears in the document preamble,
or when H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A is invoked as &#X201C;<code>hevea mathjax.hva</code>&#X2026;&#X201D;.</p><p>Basic consists in one environment <span class="c013">displayjax</span>
and one command&#XA0;<code>\textjax</code>.
The environment is appropriate for displayed maths.
As an example, the following source
</p><pre class="verbatim">A displayed formula:
\begin{displayjax}
\frac{\pi}{4} = \left[1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} +
\frac{1}{9} + \cdots + \frac{(-1)^n}{2n+1} + \cdots \right]
\end{displayjax}
</pre><p>
is displayed as follows:
</p><div class="show">
A displayed formula:
\[
\frac{\pi}{4} = \left[1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \frac{1}{9} + \cdots + \frac{(-1)^n}{2n+1} + \cdots \right]
\]
</div><p>The <code>\textjax</code> command is appropriate for inline mathematical contents.
For instance, the following source
</p><pre class="verbatim">``A nice inline formula:
\textjax{\frac{\pi}{4} = \left[1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} +
\frac{1}{9} + \cdots + \frac{(-1)^n}{2n+1} + \cdots \right]}.''
</pre><p>
is typeset as: &#X201C;A nice inline formula: \(\frac{\pi}{4} = \left[1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \frac{1}{9} + \cdots + \frac{(-1)^n}{2n+1} + \cdots \right]\).&#X201D;</p><p><a id="hevea_default228"></a><a id="hevea_default229"></a>Advanced support consists in the <span class="c013">mathjax</span> environment. Source code
enclosed in <code>\begin{mathjax}\ldots\end{mathjax}</code> will be
reproduced into output for the <span class="c015">MathJax</span> script to handle it.
However, H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A does not start any other action.
Thanks to this feature, users can have any (recognised by <span class="c015">MathJax</span>)
displayed math environment processed by&#XA0;<span class="c015">MathJax</span>. For instance,
the following source
</p><pre class="verbatim">\begin{mathjax}
\begin{eqnarray*}
z^2  &amp; = &amp; x^2 + y^2\\
\end{eqnarray*}
\end{mathjax}
</pre><p>
will be displayed as:
</p><div class="show">

\begin{eqnarray*}
z^2  & = & x^2 + y^2\\
\end{eqnarray*}

</div><p>Finally, notice that a document that uses the explicit <span class="c015">MathJax</span>
constructs can be processed by L<sup>A</sup>T<sub>E</sub>X, provided
it loads the <span class="c013">mathjax.sty</span> file present in H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A distribution.
This can be done simply by having the line <code>\usepackage{mathjax}</code> in
teh document preamble. Then, H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A and L<sup>A</sup>T<sub>E</sub>X will react appropriately
(see sections&#XA0;<a href="manual004.html#usepackage%3Aboth">2.3.2</a> and&#XA0;<a href="manual027.html#usepackage">B.5.2</a>).</p>
<h4 class="subsubsection" id="sec183">B.16.6.2&#XA0;&#XA0;Automatic mode</h4>
<p>
<a id="hevea_default230"></a>Automatic mode is enabled when <code>\usepackage[auto]{mathjax}</code>
appears in the document preamble,
or when H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A is invoked as &#X201C;<code>hevea mathjaxauto.hva</code>&#X2026;&#X201D;.</p><p>In automatic mode, H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A will pass all mathematical text to <span class="c015">MathJax</span>.
This mode seems by far the most practical, but beware:
</p><ol class="enumerate" type=1><li class="li-enumerate">
There is no communication back from <span class="c015">MathJax</span> to H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A.
As result, equation numbers, as generated for instance by the
<span class="c013">equation</span> environment, will not find their way to the final display.
</li><li class="li-enumerate">Some constructs, such as <code>\mbox</code>, are not handled
by&#XA0;<span class="c015">MathJax</span>.
</li></ol>
<h4 class="subsubsection" id="sec184">B.16.6.3&#XA0;&#XA0;Customising the <a href="https://www.mathjax.org/"><span class="c015">MathJax</span></a> script</h4>
<p>
By default H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A insert a reference to the &#X201C;default&#X201D;
<a href="https://www.mathjax.org/"><span class="c015">MathJax</span></a> script
with &#X201C;default&#X201D; configuration parameters.
Advanced users can change this setting by redefining the <code>\jax@meta</code>
command, which must contain the appropriate <code>&lt;script&gt;</code> element.
See the file <code>html/mathjax.hva</code> for details.</p>
<hr class="ffootnoterule"><dl class="thefootnotes"><dt class="dt-thefootnotes">
<a id="note10" href="#text10">9</a></dt><dd class="dd-thefootnotes"><div class="footnotetext">According to
<span class="c013">date</span> man page.</div></dd></dl>
<hr>
<a href="manual037.html"><img src="previous_motif.svg" alt="Previous"></a>
<a href="manual022.html"><img src="contents_motif.svg" alt="Up"></a>
<a href="manual-packages.html"><img src="next_motif.svg" alt="Next"></a>
</body>
</html>