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
|
<!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>A note on style</title>
</head>
<body>
<a href="manual004.html"><img src="previous_motif.svg" alt="Previous"></a>
<a href="manual002.html"><img src="contents_motif.svg" alt="Up"></a>
<a href="manual006.html"><img src="next_motif.svg" alt="Next"></a>
<hr>
<h2 class="section" id="sec10">3 A note on style</h2>
<ul>
<li><a href="manual005.html#sec11">Spacing, Paragraphs</a>
</li><li><a href="manual005.html#sec14">Math mode</a>
</li><li><a href="manual005.html#sec19">Warnings</a>
</li><li><a href="manual005.html#sec20">Commands</a>
</li><li><a href="manual005.html#sec21">Style choices</a>
</li></ul>
<h3 class="subsection" id="sec11">3.1 Spacing, Paragraphs</h3>
<p>
Sequence of spaces normally are translated into one single space.
Newlines in the input document undergo a special treatement.
A newline triggers a special scanning mode that reads all following
spaces and newlines. In case at least one additional newline character
is read, then H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A executes the <code class="verb">\par</code> command.
Otherwise, H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A outputs a single newline character.
This process approximates T<sub>E</sub>X process for introducting paragraph
breaks and, as a result, empty lines produce paragraph breaks.</p><p>Space after commands with no argument is skipped (as in L<sup>A</sup>T<sub>E</sub>X) —
however this is not true in math mode, as explained in
section <a href="#spacemath">3.2.1</a>.</p><p>The following two subsections describe management of paragraphs and
spaces after command sequences in greater detail.
They can be skipped in first reading.</p>
<h4 class="subsubsection" id="spurious:par">3.1.1 Spurious Paragraphs</h4>
<p>
Paragraphs are rendered by the means of <code class="verb">p</code> elements.
H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A is a bit simplistic in breaking paragraphs and spurious paragraphs
may be present in the final html document.
Normally, as H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A never outputs <code class="verb">p</code> elements whose contents is
made of spaces only, this should not happen very often.
Unfortunately, some commands do not produce any output in L<sup>A</sup>T<sub>E</sub>X,
while they do produce output in H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A: those commands
are <code class="verb">\label</code>, <code class="verb">\index</code> etc.
H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A translates
<code class="verb">\label{</code><span class="c023">name</span><code class="verb">}</code> into the anchor
<code class="verb"><a id="</code><span class="c023">name</span><code class="verb">"></a></code>. As a result, the following
source fragment will introduce a spurious paragraph.
</p><pre class="verbatim">This a first paragraph.
\label{label}
This is another paragraph.
</pre><p>
Indeed, whe have the following translation:
</p><pre class="verbatim"><p>This a first paragraph.</p>
<p><a id="label"></a></p>
<p>This is another paragraph.</p>
</pre><p>
Which your browser renders as follows — with additional borders
emphasizing <code class="verb">p</code> elements.
</p><blockquote class="quote">
<p class="c005">This a first paragraph.</p>
<p class="c005"><a id="label"></a></p>
<p class="c005">This is another paragraph.</p>
</blockquote><p>Most of the time, such extra paragraphs remain unnoticed.
Of course, they can be supressed by erasing one of the empty
lines. For instance:
</p><pre class="verbatim">This a first paragraph.
\label{label}
This is another paragraph.
</pre><p>A similar situation occurs when a sectioning command is followed by
<code class="verb">\label</code> and a paragraph break:
</p><pre class="verbatim">\section*{A section}\label{section:label}
First paragraph.
</pre><p>
Produced html is, after a few cosmetic simplifications:
</p><pre class="verbatim"><h2 class="section">A section</h2>
<p><a id="section:label"></a></p>
<p>First paragraph.</p>
</pre><p>
Output is so, because closing the element <code class="verb">h2</code> implies re-opening
a new paragraph.
Your browser renders the above html fragment as follows:
</p><blockquote class="quote">
<h2 class="section">A section</h2>
<p class="c005"><a id="section:label"></a></p>
<p class="c005">First paragraph.</p>
</blockquote><p>Here, two possible re-writing of source are:
</p><div class="center">
<table class="c002 cellpading0"><tr><td class="c044"><pre class="verbatim">\section*{A\label{section:label} section}
First paragraph.
</pre></td><td class="c044"><pre class="verbatim">\section*{A section}
\label{section:label}First paragraph.
</pre>
</td></tr>
</table>
</div><p>
In all cases, this amounts to avoiding a paragraph whose contents
consists in a sole <code class="verb">\label</code> command.</p><p>Spurious paragraphs are more easily seen by running <span class="c017">hevea</span>
with the command-line option <a id="hevea_default1"></a><span class="c017">-dv</span>, which instructs
<span class="c017">hevea</span> to add border on some of the elements it produces,
including <code class="verb">p</code> elements.</p>
<h4 class="subsubsection" id="sec13">3.1.2 Spaces after Commands</h4>
<p>
<a id="hevea_default2"></a>
Space after commands with no argument is skipped.
Consider the following example:
</p><pre class="verbatim">\newcommand{\open}{(}
\newcommand{\close}{)}
\open text opened by ``\verb+\open+''
and closed by ``\verb+\close+''\close.
</pre><p>
We get:
</p><blockquote class="quote">
(text opened by “<code class="verb">\open</code>” and closed by
“<code class="verb">\close</code>”).
</blockquote><p>
In the output above, the space after <code class="verb">\open</code> does not
find its way to the output.</p><p>More generally,
H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A tries to emulate L<sup>A</sup>T<sub>E</sub>X behaviour in all situations, but
discrepancies probably exist.
Thus, users are invited to make explicit what they want.
This is good practice anyway, because L<sup>A</sup>T<sub>E</sub>X is mysterious
here. Consider the following example, where the <code class="verb">\tryspace</code>
macro is first applied and then expansed by hand:
</p><pre class="verbatim">\newcommand{\bfsymbol}{\textbf{symbol}}
\newcommand{\tryspace}[1]{#1 XXX}
Some space: \tryspace{\bfsymbol}\\
No space: \bfsymbol XXX
</pre><p>
Spacing is a bit chaotic here,
the space after <span class="c027">symbol</span> remains when <code class="verb">#1</code> is substituted for it
by L<sup>A</sup>T<sub>E</sub>X (or H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A).</p><blockquote class="quote">
<table class="c002 cellpading0"><tr><td class="c037">Some space</td><td class="c034"> : </td><td class="c037"><span class="c027">symbol</span> XXX</td></tr>
<tr><td class="c037">No space</td><td class="c034"> : </td><td class="c037"><span class="c027">symbol</span>XXX
</td></tr>
</table></blockquote><p>
Note that, if a space before “XXX” is wanted, then
one should probably write:
</p><pre class="verbatim">\newcommand{\tryspace}[1]{#1{} XXX}
</pre><p>Finally, <a id="hevea_default3"></a>whether the tabulation character is a space or not
is random, so avoid tabs in your source document.</p>
<h3 class="subsection" id="sec14">3.2 Math mode</h3>
<p>
H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A math mode is not very far from normal text mode, except that
all letters are shown in italics and that space after macros
is echoed.</p><p>However, typesetting math formulas in html rises two difficulties.
First, formulas contain symbols, such as Greek letters; second,
even simple formulas do not follow the simple basic typesetting model of html.</p>
<h4 class="subsubsection" id="spacemath">3.2.1 Spacing in math mode</h4>
<p>
<a id="hevea_default4"></a>
By contrast with L<sup>A</sup>T<sub>E</sub>X, spaces from the input are significant in
math mode, this
feature allows users to instruct H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A
on how to put space in their formulas.
For instance, <code class="verb">\alpha\rightarrow\beta</code> is typeset without spaces between
symbols, whereas <code class="verb">\alpha \rightarrow \beta</code> produces these spaces.
</p><table class="display dcenter"><tr class="c040"><td class="dcell"><table class="c002 cellpading0"><tr><td class="c037"><code class="verb">\alpha\rightarrow\beta</code></td><td class="c034"> : </td><td class="c037">α→β</td></tr>
<tr><td class="c037"><code class="verb">\alpha \rightarrow \beta</code></td><td class="c034"> : </td><td class="c037">α → β</td></tr>
</table></td></tr>
</table><p>
Note that L<sup>A</sup>T<sub>E</sub>X ignores spaces in math mode, so that users can
freely adjust H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A output without changing anything to L<sup>A</sup>T<sub>E</sub>X
output.</p>
<h4 class="subsubsection" id="sec16">3.2.2 Symbols</h4>
<p><a id="symbols"></a>
</p><blockquote class="figure"><div class="center"><hr class="floatrule"></div>
<div class="caption"><table class="c002 cellpading0"><tr><td class="c044">Figure 1: <a id="symbol:fig"></a>Some symbols</td></tr>
</table></div>
<div class="center">
<table class="c002 cellpading0"><tr><td class="c038"><span class="c017">\in</span>: </td><td class="c037"><span class="c021">∈</span></td><td class="c034">  </td><td class="c038"><span class="c017">\notin</span>: </td><td class="c037"><span class="c021">∉</span></td></tr>
<tr><td class="c038"><span class="c017">\int</span>: </td><td class="c037"><span class="c021">∫</span></td><td class="c034">  </td><td class="c038"><span class="c017">\prod</span>: </td><td class="c037"><span class="c021">∏</span></td></tr>
<tr><td class="c038"><span class="c017">\preceq</span>: </td><td class="c037"><span class="c021">≼</span></td><td class="c034">  </td><td class="c038"><span class="c017">\prec</span>: </td><td class="c037"><span class="c021">≺</span></td></tr>
<tr><td class="c038"><span class="c017">\leq</span>: </td><td class="c037"><span class="c021">≤</span></td><td class="c034">  </td><td class="c038"><span class="c017">\geq</span>: </td><td class="c037"><span class="c021">≥</span></td></tr>
<tr><td class="c038"><span class="c017">\cup</span>: </td><td class="c037"><span class="c021">∪</span></td><td class="c034">  </td><td class="c038"><span class="c017">\cap</span>: </td><td class="c037"><span class="c021">∩</span></td></tr>
<tr><td class="c038"><span class="c017">\supset</span>: </td><td class="c037"><span class="c021">⊃</span></td><td class="c034">  </td><td class="c038"><span class="c017">\subset</span>: </td><td class="c037"><span class="c021">⊂</span></td></tr>
<tr><td class="c038"><span class="c017">\supseteq</span>: </td><td class="c037"><span class="c021">⊇</span></td><td class="c034">  </td><td class="c038"><span class="c017">\subseteq</span>: </td><td class="c037"><span class="c021">⊆</span></td></tr>
</table>
</div>
<div class="center"><hr class="floatrule"></div></blockquote><p>
With respect to previous versions of H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A since the begining, the
treatment of symbols has significantly evolved. Outputting symbols is
now performed by using Unicode character references, an option that
much more complies whith standards than the previous option of
selecting a “symbol” font. Observe that this choice is now
possible, because more and more browsers correctly display such
references. See Figure <a href="#symbol%3Afig">1</a> for a few such symbols.</p><p>However, this means that ancient or purposely limited browsers (such as
text-oriented browsers) cannot display maths, as translated by H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A.
For authors that insist on avoiding symbols that cannot be shown
by any browser, H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A offers a degraded mode that outputs text
in place of symbols.
H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A operates in this mode when given the <a id="hevea_default5"></a><span class="c017">-textsymbols</span>
command-line option. Replacement text is in English.
For instance. the “∈” symbol is replace by “in”.
This is far from being satisfactory, but degraded mode may be
appropriate for documents than contain few symbols.</p>
<h4 class="subsubsection" id="sec17">3.2.3 Displays</h4>
<p>
Apart from containing symbols, formulas specify strong typesetting
constraints: sub-elements must be combined together following patterns
that departs from normal text typesetting. For instance, fractions
numerators and denominators must be placed one above the other.
H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A handles such constraints in display mode only.</p><p>The main two operating modes of H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A are <em>text</em> mode and
<em>display</em> mode.
Text mode is the mode for typesetting normal text,
when in this mode, text items are echoed one following the other and
paragraph breaks are just blank lines, both in input and output.
The so called <em>displayed-paragraph environments</em> of L<sup>A</sup>T<sub>E</sub>X (such as
<span class="c017">center</span> or <span class="c017">quote</span>) are rendered by html block-level
elements (such as <span class="c017">div</span> or <span class="c017">blockquote</span>).
Rendering is correct becauses both L<sup>A</sup>T<sub>E</sub>X displayed environments and
html block-level elements start a new line.
Conversly, since opening a html block-level elements means starting
a new line, any text that sould appear inside a paragraph must be
translated using only html text-level elements.
H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A chooses to translate in-text formulas that way.</p><p>H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A display mode allows more control on text placement, since
entering display mode means opening
a html <code class="verb">table</code> element and that tables allow to control the
relative position of their sub-elements.
Displays come in two flavor, horizontal displays and vertical
displays.
An horizontal display is a one-row table, while a vertical display is
a one-column table. These tables holds display sub-elements, displays
sub-elements being centered vertically in horizontal display mode and
horizontally in vertical display mode.</p><p>Display mode is first opened by opening a <code class="verb">displaymath</code> environment
(e.g. by <code class="verb">$$</code>
or <code class="verb">\[</code>).
Then, sub-displays are opened by L<sup>A</sup>T<sub>E</sub>X constructs which require
them.
For instance, a displayed fraction (<code class="verb">\frac</code>) opens a vertical display.</p><p>The distinction between text and display modes clearly appears while
typesetting math formulas.
An in-text formula such as
<code class="verb">$\int_1^2 xdx = \frac{3}{2}$</code> appears as:
∫<sub>1</sub><sup>2</sup> <span class="c023">xdx</span> =3/2,
while the same formula has a better aspect in display mode:
</p><table class="display dcenter"><tr class="c040"><td class="dcell"><span class="c022">∫</span></td><td class="dcell"><table class="display"><tr><td class="dcell c035">2</td></tr>
<tr><td class="dcell c035"><br>
<br>
</td></tr>
<tr><td class="dcell c035">1</td></tr>
</table></td><td class="dcell"><span class="c023">xdx</span> = </td><td class="dcell"><table class="display"><tr><td class="dcell c032">3</td></tr>
<tr><td class="hrule"></td></tr>
<tr><td class="dcell c032">2</td></tr>
</table></td></tr>
</table><p>
As a consequence, H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A is more powerful in display mode and
formulas should be displayed as soon as they get a bit complicated.
This rule is also true in L<sup>A</sup>T<sub>E</sub>X but it is more strict in H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A,
since html capabilities to typeset formulas inside text are quite
poor.
In particular, it is not possible to get in-text “real” fractions or
in-text limit-like subscripts.</p><p>Users should remember that H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A is not T<sub>E</sub>X or L<sup>A</sup>T<sub>E</sub>X and that
H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A author neither is D. E. Knuth nor L. Lamport.
Thus, some formulas may be rendered poorly.
For instance, two fractions with different denominator and numerator
height look strange.
</p><table class="display dcenter"><tr class="c040"><td class="dcell"><table class="display"><tr><td class="dcell c032">1</td></tr>
<tr><td class="hrule"></td></tr>
<tr><td class="dcell c032"><table class="display"><tr class="c040"><td class="dcell"><table class="display"><tr><td class="dcell c032"><span class="c023">N</span></td></tr>
<tr><td class="dcell c032"><span class="c022">∑</span></td></tr>
<tr><td class="dcell c032"><span class="c023">i</span>=0</td></tr>
</table></td><td class="dcell"><span class="c023">U</span><sub><span class="c023">i</span></sub></td></tr>
</table></td></tr>
</table></td><td class="dcell"> = </td><td class="dcell"><table class="display"><tr><td class="dcell c032"><table class="display"><tr class="c040"><td class="dcell"><table class="display"><tr><td class="dcell c032"><span class="c023">N</span></td></tr>
<tr><td class="dcell c032"><span class="c022">∑</span></td></tr>
<tr><td class="dcell c032"><span class="c023">i</span>=0</td></tr>
</table></td><td class="dcell"><span class="c023">U</span><sub><span class="c023">i</span></sub></td></tr>
</table></td></tr>
<tr><td class="hrule"></td></tr>
<tr><td class="dcell c032">1</td></tr>
</table></td></tr>
</table><p>
The reason is that vertical displays in an horizontal display are
html tables
that always get centered in the vertical direction.
Such a crude model cannot faithfully emulate any T<sub>E</sub>X box placement.</p><p>Users can get an idea on how H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A combines elements in display mode
by giving the <a id="hevea_default6"></a><span class="c017">-dv</span> command-line option, which
instructs H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A to add
borders to the <code class="verb">table</code> elements introduced by displays.</p>
<h4 class="subsubsection" id="sec18">3.2.4 Arrays and display mode</h4>
<p>By contrast with formulas, which H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A attempts to render with
text-level elements only when they appear inside paragraphs, L<sup>A</sup>T<sub>E</sub>X arrays
always translate to the
block-level element <code class="verb">table</code>, thereby introducing non-desired line
breaks before and after in-text arrays.
As a consequence, in-text arrays yield an acceptable output, only while
alone in a paragraph.</p><p>
Consider the following source:
</p><pre class="verbatim">This is a small array:
\begin{tabular}{|cc|}
\hline item-1 & item-2 \\
\hline\end{tabular}. Next sentence.
</pre><p>
We get:
</p><blockquote class="quote">
This is a small array:
<table class="c001 cellpadding1" border=1><tr><td class="c033">item-1</td><td class="c033">item-2
</td></tr>
</table>. Next sentence.
</blockquote><p>However, since in some sense, all html tables are displayed, the
<code class="verb">array</code> and <code class="verb">tabular</code> environments implicitly open display
mode, thus allowing a satisfactory typesetting of formulas in
arrays. More precisely, array elements whose column format
specification is <code class="verb">l</code>, <code class="verb">c</code> or <code class="verb">r</code> are typeset in display
mode (see section <a href="manual032.html#arraydef">B.10.2</a>).</p>
<h3 class="subsection" id="sec19">3.3 Warnings</h3>
<p>
When H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A thinks it cannot translate a symbol or construct
properly, it issues a warning. This draws user attention onto a
potential problem. However, rendering may be correct.</p><p>
In the following (silly) example, H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A gets nervous because of
the complicated length given as argument to <code class="verb">\hspace</code>:
</p><pre class="verbatim">\newlength{\mylength}\setlength{\mylength}{5pt}
\begin{tabular}{c@{\hspace{\mylength}}c}
Before & After
\end{tabular}
</pre><p>
Running H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A on this input produces a warning:
</p><pre class="verbatim"># hevea manual.tex
...
manual.tex:697: Warning: Command not found: \mylength
manual.tex:697: Warning: \hspace with arg ''
...
</pre><p>
However the final rendering is correct:
</p><blockquote class="quote">
<table class="c002 cellpading0"><tr><td class="c034">Before</td><td class="c034"></td><td class="c034">After
</td></tr>
</table>
</blockquote><p>Note that all warnings can be suppressed with the <code class="verb">-s</code> (silent)
option.
When a warning reveals a real problem, it can often be cured by
writing a specific macro. The next two sections introduce H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A
macros, then section <a href="manual006.html#trouble">4</a> describes how to proceed with
greater detail.</p>
<h3 class="subsection" id="sec20">3.4 Commands</h3>
<p>
Just like L<sup>A</sup>T<sub>E</sub>X, H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A can be seen as a macro language, macros
are rewritten until no more expansion is possible. Then, either some
characters (such as letters, integers…) are outputed or some
internal operation (such as changing font attributes, or arranging
text items in a certain manner) are performed.</p><p>This scheme favors easy extension of program capabilities
by users. However, predicting program behaviour and correcting errors
may prove difficult, since final output or errors
may occur after several levels of macro expansion.
As a consequence, users can tailor H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A to their needs, but it
remains a subtle task.
Nevertheless, happy L<sup>A</sup>T<sub>E</sub>X users should enjoy customizing
H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A, since this is done by writing L<sup>A</sup>T<sub>E</sub>X code.</p>
<h3 class="subsection" id="sec21">3.5 Style choices</h3>
<p><a id="stylechoice"></a>
L<sup>A</sup>T<sub>E</sub>X and html differ in many aspects. For instance, L<sup>A</sup>T<sub>E</sub>X allows
fine control over text placement, whereas
html does not.
More symbols and font attributes are available in L<sup>A</sup>T<sub>E</sub>X than in
html. Conversely, html has font attributes, such as color, which
standard L<sup>A</sup>T<sub>E</sub>X has not.</p><p>Therefore, there are many situations where H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A just cannot
render the visual effect of L<sup>A</sup>T<sub>E</sub>X constructions. Here some choices
have to be made. For instance, calligraphic letters (<code class="verb">\mathcal</code>)
are rendered in red.</p><p>If you are not satisfied with H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A rendering of text style
declarations, then you
can choose your own, by redefining the <code class="verb">\cal</code>
macros, using <code class="verb">\renewcommand</code>, the macro redefinition operator of
L<sup>A</sup>T<sub>E</sub>X. The key point is that you need not worry about H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A
internals: just redefine the old-L<sup>A</sup>T<sub>E</sub>X style text-style
declarations (<em>i.e.</em> <code class="verb">\it</code>, <code class="verb">\sc</code>, etc.) and everything should
get fine:
</p><pre class="verbatim">\renewcommand{\sc}{\Huge}
\renewcommand{\cal}{\em}
</pre><p>
(See sections <a href="manual006.html#trouble">4</a> and <a href="manual007.html#both">5</a> on how to make such
changes while leaving your file processable by L<sup>A</sup>T<sub>E</sub>X, and
section <a href="manual020.html#customize-style">10.2</a> for a more thorough descripton of
customizing type styles).</p><p>
With such redefinitions, we get:
</p><blockquote class="quote">
This is <span class="c022"><span style="font-size:150%">small caps</span></span> and this is <span class="c023"><em>CALLIGRAPHIC LETTERS</em></span>
</blockquote><p>Note that many of L<sup>A</sup>T<sub>E</sub>X commands and environments are defined in the
<span class="c017">hevea.hva</span> file that H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A loads before processing any
input.
These constructs are written using L<sup>A</sup>T<sub>E</sub>X source code, in the end they
invoke H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A internal commands.</p><p>Other L<sup>A</sup>T<sub>E</sub>X constructs, such as
L<sup>A</sup>T<sub>E</sub>X key constructs or H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A internal commands (see section <a href="manual018.html#internal">8.3</a>),
that require special processing are defined
in H<span class="c020"><sup>E</sup></span>V<span class="c020"><sup>E</sup></span>A source code.
However, the vast majority of these definitions can be overridden by a
redefinition.
This may prove useless, since there is little point in
redefining core constructs such as <code class="verb">\newcommand</code> for instance.</p>
<hr>
<a href="manual004.html"><img src="previous_motif.svg" alt="Previous"></a>
<a href="manual002.html"><img src="contents_motif.svg" alt="Up"></a>
<a href="manual006.html"><img src="next_motif.svg" alt="Next"></a>
</body>
</html>
|