File: extras.html

package info (click to toggle)
hevea-doc 2.36-1
  • links: PTS, VCS
  • area: non-free
  • in suites: bookworm, forky, sid, trixie
  • size: 1,764 kB
  • sloc: makefile: 9
file content (485 lines) | stat: -rw-r--r-- 31,923 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="generator" content="hevea 2.36">
<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="sec174">B.16&#X2003;Extra Features</h2>
<ul>
<li><a href="extras.html#sec175">T<sub>E</sub>X macros</a>
</li><li><a href="extras.html#sec181">Command Definition inside Command Definition</a>
</li><li><a href="extras.html#sec182">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="c019">MathJax</span> support</a>
</li></ul>
<p>
This section describes H<span class="c020"><sup>E</sup></span>V<span class="c020"><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="sec175">B.16.1&#X2003;T<sub>E</sub>X macros</h3>
<p><a id="texmacro"></a>
Normally, H<span class="c020"><sup>E</sup></span>V<span class="c020"><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="c020"><sup>E</sup></span>V<span class="c020"><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="sec176">B.16.1.1&#X2003;&#XC0; la T<sub>E</sub>X macros definitions</h4>
<p><a id="texmacros"></a>
<a id="hevea_default202"></a><a id="hevea_default203"></a>
The <code class="verb">\def</code> construct for defining commands is supported.
It is important to
notice that H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A semantics for <code class="verb">\def</code> 
follows T<sub>E</sub>X semantics.
That is, defining a command that already
exists with <code class="verb">\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="c025">LookLook</span> c<span class="c025">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 class="verb">\{</code>.
One can include <code class="verb">\{</code> in a command argument by using the grouping
characters <code class="verb">{</code>&#X2026; <code class="verb">}</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="c020"><sup>E</sup></span>V<span class="c020"><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 class="verb">\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="c020"><sup>E</sup></span>V<span class="c020"><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="c020"><sup>E</sup></span>V<span class="c020"><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="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A output is &#X201C;coucouA&#X201D;.
For instance, here is H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A output:


&#X201C;coucouA&#X201D;.
Please note that in most situations this discrepancy will make
H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A crash. </p>
<h4 class="subsubsection" id="sec177">B.16.1.2&#X2003;The <span class="c017">\let</span> construct</h4>
<p>
<a id="hevea_default204"></a>H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A also processes a
limited version of <code class="verb">\let</code>:
</p><div class="flushleft">
<code class="verb">\let</code> <span class="c023">macro-name1</span> = <span class="c023">macro-name2</span>
</div><p>
The effect is to bind <span class="c023">macro-name1</span> to whatever <span class="c023">macro-name2</span>
is bound to at the time <code class="verb">\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 class="verb">\let</code> in such a situation.</p>
<h4 class="subsubsection" id="sec178">B.16.1.3&#X2003;The <span class="c017">\global</span> construct</h4>
<p>
<a id="hevea_default205"></a>
It is possible to escape scope and to make global definitions
and bindings by using the T<sub>E</sub>X construct <code class="verb">\global</code>.
The <code class="verb">\global</code> construct is significant before
<code class="verb">\def</code> and <code class="verb">\let</code> constructs.</p><p><a id="hevea_default206"></a>
Also note that <code class="verb">\gdef</code> is equivalent to <code class="verb">\global\def</code>.</p>
<h4 class="subsubsection" id="sec179">B.16.1.4&#X2003;T<sub>E</sub>X Conditional Macros</h4>
<p><a id="texcond"></a>
<a id="hevea_default207"></a><a id="hevea_default208"></a><a id="hevea_default209"></a><a id="hevea_default210"></a>
The <code class="verb">\newif\if</code><span class="c023">name</span>, where <span class="c023">name</span> is made of letters
only, creates three macros:
<code class="verb">\if</code><span class="c023">name</span>, <code class="verb">\</code><span class="c023">name</span><code class="verb">true</code> and
<code class="verb">\</code><span class="c023">name</span><code class="verb">false</code>.
The latter two set the <span class="c023">name</span> condition to <span class="c023">true</span> and
<span class="c023">false</span>, respectively.
The <code class="verb">\if</code><span class="c023">name</span> command tests the condition <span class="c023">name</span>:
</p><div class="flushleft">
<code class="verb">\if</code><span class="c023">name<br>
text</span><sub>1</sub><br>
<code class="verb">\else</code><br>
<span class="c023">text</span><sub>2</sub><br>
<code class="verb">\fi</code><br>
</div><p>
Text <span class="c023">text</span><sub>1</sub> is processed when <span class="c023">name</span> is
<span class="c023">true</span>, otherwise <span class="c023">text</span><sub>2</sub> is processed.
If <span class="c023">text</span><sub>2</sub> is empty, then the <code class="verb">\else</code> keyword can be
omitted.</p><p>Note that H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A also implements L<sup>A</sup>T<sub>E</sub>X <span class="c017">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="c034" colspan=2>T<sub>E</sub>X</td><td class="c034">L<sup>A</sup>T<sub>E</sub>X</td></tr>
<tr><td class="hrule" colspan=3></td></tr>
<tr><td class="c044"><code class="verb">\newif\if</code><span class="c023">name</span></td><td class="c034">&#X2003;</td><td class="c044"><code class="verb">\newboolean{</code><span class="c023">name</span><code class="verb">}</code></td></tr>
<tr><td class="c044"><code class="verb">\</code><span class="c023">name</span><code class="verb">true</code></td><td class="c034">&#X2003;</td><td class="c044"><code class="verb">\setboolean{</code><span class="c023">name</span><code class="verb">}{true}</code></td></tr>
<tr><td class="c044"><code class="verb">\</code><span class="c023">name</span><code class="verb">false</code></td><td class="c034">&#X2003;</td><td class="c044"><code class="verb">\setboolean{</code><span class="c023">name</span><code class="verb">}{false}</code></td></tr>
<tr><td class="c044"><code class="verb">\if</code><span class="c023">name text</span><sub>1</sub><code class="verb">\else</code>
<span class="c023">text</span><sub>2</sub><code class="verb">\fi</code></td><td class="c034">&#X2003;</td><td class="c044"><code class="verb">\ifthenelse{\boolean{</code><span class="c023">name</span><code class="verb">}}{</code><span class="c023">text</span><sub>1</sub><code class="verb">}{</code><span class="c023">text</span><sub>2</sub><code class="verb">}</code></td></tr>
</table>
</div>
<h4 class="subsubsection" id="sec180">B.16.1.5&#X2003;Other T<sub>E</sub>X Macros</h4>
<p>
H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A implements the macros <code class="verb">\unskip</code> and <code class="verb">\endinput</code>.
It also supports the <code class="verb">\csname</code>&#X2026; <code class="verb">\endcsname</code>
construct.</p>
<h3 class="subsection" id="sec181">B.16.2&#X2003;Command Definition inside Command Definition</h3>
<p>
<a id="hevea_default211"></a><a id="hevea_default212"></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 class="verb">#</code><span class="c023">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 class="verb">#</code><span class="c023">n</span> still refer to the outer
definition, while nested parameters <code class="verb">##</code><span class="c023">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="sec182">B.16.3&#X2003;Date and time</h3>
<p>
<a id="hevea_default213"></a><a id="hevea_default214"></a>
Date and time support is not enabled by default, for portability and
simplicity reasons.</p><p>However, H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A source distribution includes a simple (<span class="c017">sh</span>)
shell script
<span class="c017">xxdate.exe</span> that activates date and time support.
The <span class="c017">hevea</span> command, should be invoked as:
</p><pre class="verbatim"># hevea -exec xxdate.exe ...
</pre><p>
This will execute the script <span class="c017">xxdate.exe</span>, whose output is then
read by H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A.
As a consequence, standard L<sup>A</sup>T<sub>E</sub>X counters <code class="verb">year</code>,
<code class="verb">month</code>, <code class="verb">day</code> and
<code class="verb">time</code> are defined and
L<sup>A</sup>T<sub>E</sub>X command <code class="verb">\today</code> works properly.
<a id="hevea_default215"></a>
Additionally the following counters and commands are defined:
</p><div class="center">
<table class="c002 cellpading0"><tr><td class="hrule" colspan=3></td></tr>
<tr><td class="c046">Counter <span class="c017">weekday</span></td><td class="c034">&#X2003;</td><td class="c044">day of week, 0&#X2026;6
(e.g. 3)</td></tr>
<tr><td class="c046">Counter <span class="c017">Hour</span></td><td class="c034">&#X2003;</td><td class="c044">hour, 00&#X2026;11
(e.g. 04)</td></tr>
<tr><td class="c046">Counter <span class="c017">hour</span></td><td class="c034">&#X2003;</td><td class="c044">hour, 00&#X2026;23 (e.g. 16)</td></tr>
<tr><td class="c046">Counter <span class="c017">minute</span></td><td class="c034">&#X2003;</td><td class="c044">minute, 00&#X2026;59
(e.g. 09)</td></tr>
<tr><td class="c046">Counter <span class="c017">second</span></td><td class="c034">&#X2003;</td><td class="c044">second, 00&#X2026;61<sup><a id="text11" href="#note11">10</a></sup>(e.g. 46)</td></tr>
<tr><td class="hrule" colspan=3></td></tr>
<tr><td class="c046">Command <code class="verb">\ampm</code></td><td class="c034">&#X2003;</td><td class="c044">AM or PM
(e.g. PM)</td></tr>
<tr><td class="c046">Command <code class="verb">\timezone</code></td><td class="c034">&#X2003;</td><td class="c044">Time zone
(e.g. CEST)</td></tr>
<tr><td class="c046">Command <code class="verb">\heveadate</code></td><td class="c034">&#X2003;</td><td class="c044">Output of the <span class="c017">date</span> Unix
command, (e.g. Wed Jun 15 16:09:46 CEST 2022)</td></tr>
<tr><td class="hrule" colspan=3></td></tr>
</table>
</div><p>Note that I chose to add an extra option (and not an extra
<code class="verb">\@exec</code> primitive) for security reasons. You certainly do
not want to enable H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A to execute silently an arbitrary program
without being conscious of that fact.
Moreover, the <span class="c017">hevea</span> program does not execute
<span class="c017">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="c017">xxdate.exe</span> included in the Win32 distribution. </p>
<h3 class="subsection" id="fancysection">B.16.4&#X2003;Fancy sectioning commands</h3>
<p>
<a id="hevea_default216"></a><a id="hevea_default217"></a>Loading the <span class="c017">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="c027">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="c017">fancysection.hva</span> file is intended to be loaded after
the document base style.
Hence the easiest way to load the <span class="c017">fancysection.hva</span> file
is by issuing <code class="verb">\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="c017">fancysection.sty</span> file.</p><p>As an alternative, to use fancy section style in
<span class="c017">doc.tex</span> whose base style is <span class="c023">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="c017">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="c017">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="c017">part</span>, <span class="c017">chapter</span>,
<span class="c017">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="c017">named</span>
color model that is used above.)</p><p><a id="hevea_default218"></a>
Another choice is issuing the command
<code class="verb">\colorsections{</code><span class="c023">hue</span><code class="verb">}</code>, where
<span class="c023">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_default219"></a>
H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A distribution features another style for fancy sectioning commands:
the <span class="c017">undersection</span> package provides underlined sectional headers.</p>
<h3 class="subsection" id="winfonts">B.16.5&#X2003;Targeting Windows</h3>
<p>
<a id="hevea_default220"></a><a id="hevea_default221"></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="c020"><sup>E</sup></span>V<span class="c020"><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="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A normally
outputs when it processes <code class="verb">\left[</code>, <code class="verb">\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="c017">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="c017">winfonts.hva</span>.
For instance they can invoke H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A as:
</p><pre class="verbatim"># hevea winfonts.hva ...
</pre><p>
At the moment, loading <span class="c017">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="c040"><td class="dcell"><table class="c002 cellpading0"><tr><td class="hrule" colspan=5></td></tr>
<tr><td class="c034" colspan=2>delimiters</td><td class="c034" colspan=2>default</td><td class="c034">winfonts</td></tr>
<tr><td class="hrule" colspan=5></td></tr>
<tr><td class="c037"><span class="c017">\left\{&#X2003;&#X2026;&#X2003;\right\}</span></td><td class="c034">&#X2003;&#X2003;</td><td class="c034"><table class="display"><tr class="c040"><td class="dcell">&#X23A7;<br>
&#X23AA;<br>
&#X23A8;<br>
&#X23AA;<br>
&#X23A9;</td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c034">1</td></tr>
<tr><td class="c034">2</td></tr>
<tr><td class="c034">3</td></tr>
</table></td><td class="dcell">&#X23AB;<br>
&#X23AA;<br>
&#X23AC;<br>
&#X23AA;<br>
&#X23AD;</td></tr>
</table></td><td class="c034">&#X2003;&#X2003;</td><td class="c034"><table class="display"><tr class="c040"><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="c034">1</td></tr>
<tr><td class="c034">2</td></tr>
<tr><td class="c034">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="c037"><span class="c017">\left[&#X2003;&#X2026;&#X2003;\right]</span></td><td class="c034">&#X2003;&#X2003;</td><td class="c034"><table class="display"><tr class="c040"><td class="dcell">&#X23A1;<br>
&#X23A2;<br>
&#X23A2;<br>
&#X23A3;</td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c034">1</td></tr>
<tr><td class="c034">2</td></tr>
<tr><td class="c034">3</td></tr>
</table></td><td class="dcell">&#X23A4;<br>
&#X23A5;<br>
&#X23A5;<br>
&#X23A6;</td></tr>
</table></td><td class="c034">&#X2003;&#X2003;</td><td class="c034"><table class="display"><tr class="c040"><td class="dcell"><table class="delimleft"><tr><td class="bracell horizontal-rule c053"></td></tr>
<tr><td class="bracell c035"><div class="vertical-rule" style="height:4em;"></div></td></tr>
<tr><td class="bracell horizontal-rule c053"></td></tr>
</table></td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c034">1</td></tr>
<tr><td class="c034">2</td></tr>
<tr><td class="c034">3</td></tr>
</table></td><td class="dcell"><table class="delimright"><tr><td class="bracell horizontal-rule c053"></td></tr>
<tr><td class="bracell" style="text-align:right"><div class="vertical-rule" style="height:4em;"></div></td></tr>
<tr><td class="bracell horizontal-rule c053"></td></tr>
</table></td></tr>
</table></td></tr>
<tr><td class="c037"><span class="c017">\left(&#X2003;&#X2026;&#X2003;\right)</span></td><td class="c034">&#X2003;&#X2003;</td><td class="c034"><table class="display"><tr class="c040"><td class="dcell">&#X239B;<br>
&#X239C;<br>
&#X239C;<br>
&#X239D;</td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c034">1</td></tr>
<tr><td class="c034">2</td></tr>
<tr><td class="c034">3</td></tr>
</table></td><td class="dcell">&#X239E;<br>
&#X239F;<br>
&#X239F;<br>
&#X23A0;</td></tr>
</table></td><td class="c034">&#X2003;&#X2003;</td><td class="c034"><table class="display"><tr class="c040"><td class="dcell">/&#XA0;<br>
|&#XA0;<br>
|&#XA0;<br>
\&#XA0;</td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c034">1</td></tr>
<tr><td class="c034">2</td></tr>
<tr><td class="c034">3</td></tr>
</table></td><td class="dcell">&#XA0;\<br>
&#XA0;|<br>
&#XA0;|<br>
&#XA0;/</td></tr>
</table></td></tr>
<tr><td class="c037"><span class="c017">\left\vert&#X2003;&#X2026;&#X2003;\right\vert</span></td><td class="c034">&#X2003;&#X2003;</td><td class="c034"><table class="display"><tr class="c040"><td class="dcell">&#X23AA;<br>
&#X23AA;<br>
&#X23AA;<br>
&#X23AA;</td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c034">1</td></tr>
<tr><td class="c034">2</td></tr>
<tr><td class="c034">3</td></tr>
</table></td><td class="dcell">&#X23AA;<br>
&#X23AA;<br>
&#X23AA;<br>
&#X23AA;</td></tr>
</table></td><td class="c034">&#X2003;&#X2003;</td><td class="c034"><table class="display"><tr class="c040"><td class="dcell"><div class="vertical-rule c031"></div></td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c034">1</td></tr>
<tr><td class="c034">2</td></tr>
<tr><td class="c034">3</td></tr>
</table></td><td class="dcell"><div class="vertical-rule c031"></div></td></tr>
</table></td></tr>
<tr><td class="c037"><span class="c017">\left\Vert&#X2003;&#X2026;&#X2003;\right\Vert</span></td><td class="c034">&#X2003;&#X2003;</td><td class="c034"><table class="display"><tr class="c040"><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="c034">1</td></tr>
<tr><td class="c034">2</td></tr>
<tr><td class="c034">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="c034">&#X2003;&#X2003;</td><td class="c034"><table class="display"><tr class="c040"><td class="dcell"><div class="vertical-rule c030"></div></td><td class="dcell"><div class="vertical-rule c030"></div></td><td class="dcell"><table class="c002 cellpading0"><tr><td class="c034">1</td></tr>
<tr><td class="c034">2</td></tr>
<tr><td class="c034">3</td></tr>
</table></td><td class="dcell"><div class="vertical-rule c030"></div></td><td class="dcell"><div class="vertical-rule c030"></div></td></tr>
</table></td></tr>
<tr><td class="hrule" 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 class="verb">\leq</code> [&#X2264;]
in place of <code class="verb">\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&#X2003;<span class="c019">MathJax</span> support</h3>
<p>
<a id="hevea_default222"></a><a id="hevea_default223"></a><a id="hevea_default224"></a><a id="hevea_default225"></a></p><p><a href="https://www.mathjax.org/"><span class="c019">MathJax</span></a>
support is enabled by loading the
<span class="c019">mathjax</span> package. Two operating mode modes are provided:
explicit and automatic. Notice that H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A distribution includes a innocuous
<span class="c017">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="sec186">B.16.6.1&#X2003;Explicit mode</h4>
<p>
<a id="hevea_default226"></a><a id="hevea_default227"></a><a id="hevea_default228"></a><a id="hevea_default229"></a>Explicit mode is enabled when <code class="verb">\usepackage{mathjax}</code>
appears in the document preamble,
or when H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A is invoked as &#X201C;<code class="verb">hevea mathjax.hva</code>&#X2026;&#X201D;.</p><p>Basic consists in one environment <span class="c017">displayjax</span>
and one command&#XA0;<code class="verb">\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 class="verb">\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_default230"></a><a id="hevea_default231"></a>Advanced support consists in the <span class="c017">mathjax</span> environment. Source code
enclosed in <code class="verb">\begin{mathjax}\ldots\end{mathjax}</code> will be
reproduced into output for the <span class="c019">MathJax</span> script to handle it.
However, H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A does not start any other action.
Thanks to this feature, users can have any (recognised by <span class="c019">MathJax</span>)
displayed math environment processed by&#XA0;<span class="c019">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="c019">MathJax</span>
constructs can be processed by L<sup>A</sup>T<sub>E</sub>X, provided
it loads the <span class="c017">mathjax.sty</span> file present in H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A distribution.
This can be done simply by having the line <code class="verb">\usepackage{mathjax}</code> in
the document preamble. Then, H<span class="c020"><sup>E</sup></span>V<span class="c020"><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="sec187">B.16.6.2&#X2003;Automatic mode</h4>
<p>
<a id="hevea_default232"></a>Automatic mode is enabled when <code class="verb">\usepackage[auto]{mathjax}</code>
appears in the document preamble,
or when H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A is invoked as &#X201C;<code class="verb">hevea mathjaxauto.hva</code>&#X2026;&#X201D;.</p><p>In automatic mode, H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A will pass all mathematical text to <span class="c019">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="c019">MathJax</span> to H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A.
As result, equation numbers, as generated for instance by the
<span class="c017">equation</span> environment, will not find their way to the final display.
</li><li class="li-enumerate">Some constructs, such as <code class="verb">\mbox</code>, are not handled
by&#XA0;<span class="c019">MathJax</span>.
</li></ol>
<h4 class="subsubsection" id="sec188">B.16.6.3&#X2003;Customising the <a href="https://www.mathjax.org/"><span class="c019">MathJax</span></a> script</h4>
<p>
By default H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A insert a reference to the &#X201C;default&#X201D;
<a href="https://www.mathjax.org/"><span class="c019">MathJax</span></a> script
with &#X201C;default&#X201D; configuration parameters.
Advanced users can change this setting by redefining the <code class="verb">\jax@meta</code>
command, which must contain the appropriate <code class="verb">&lt;script&gt;</code> element.
See the file <code class="verb">html/mathjax.hva</code> for details.</p>
<hr class="ffootnoterule"><dl class="thefootnotes"><dt class="dt-thefootnotes"><a id="note11" href="#text11">10</a></dt><dd class="dd-thefootnotes"><div class="footnotetext">According to
<span class="c017">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>