<!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>Font Selection</title> </head> <body> <a href="manual036.html"><img src="previous_motif.svg" alt="Previous"></a> <a href="manual022.html"><img src="contents_motif.svg" alt="Up"></a> <a href="extras.html"><img src="next_motif.svg" alt="Next"></a> <hr> <h2 class="section" id="sec166">B.15  Font Selection</h2> <ul> <li><a href="manual037.html#sec167">Changing the Type Style</a> </li><li><a href="manual037.html#sec168">Changing the Type Size</a> </li><li><a href="manual037.html#sec169">Special Symbols</a> </li></ul> <h3 class="subsection" id="sec167">B.15.1  Changing the Type Style</h3> <p><a id="type-style"></a> All L<sup>A</sup>T<sub>E</sub>X 2є declarations and environments for changing type style are recognised. Aspect is rather like L<sup>A</sup>T<sub>E</sub>X 2є output, but there is no guarantee.</p><p>As html does not provide the same variety of type styles as L<sup>A</sup>T<sub>E</sub>X does. However <span class="c021">css</span> provide a wide variety of font properties. H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A uses generic properties, proper rendering will then depend upon user agent. For instance, it belongs to the user agent to make a difference between <span class="c019">italics</span> (rendered by the font style “italic”) and <span class="c020">slanted</span> (rendered by the font style “oblique”).</p><p>Here is how H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A implements text-style declarations by default: </p><div class="center"> <table class="c002 cellpading0"><tr><td class="c040"><table class="c002 cellpading0"><tr><td class="hbar" colspan=3></td></tr> <tr><td class="c033"><code>\itshape</code></td><td class="c030">  </td><td class="c033"><span class="c019">font-style:italic</span></td></tr> <tr><td class="c033"><code>\slshape</code></td><td class="c030">  </td><td class="c033"><span class="c020">font-style:oblique</span></td></tr> <tr><td class="c033"><code>\scshape</code></td><td class="c030">  </td><td class="c033"><span class="c021">font-variant:small-caps</span></td></tr> <tr><td class="c033"><code>\upshape</code></td><td class="c030">  </td><td class="c033">no style</td></tr> <tr><td class="hbar" colspan=3></td></tr> </table></td><td class="c040"><table class="c002 cellpading0"><tr><td class="hbar" colspan=3></td></tr> <tr><td class="c033"><code>\ttfamily</code></td><td class="c030">  </td><td class="c033"><span class="c013">font-family:monospace</span></td></tr> <tr><td class="c033"><code>\sffamily</code></td><td class="c030">  </td><td class="c033"><span class="c015">font-family:sans-serif</span></td></tr> <tr><td class="c033"><code>\rmfamily</code></td><td class="c030">  </td><td class="c033">no style</td></tr> <tr><td class="hbar" colspan=3></td></tr> </table></td><td class="c040"><table class="c002 cellpading0"><tr><td class="hbar" colspan=3></td></tr> <tr><td class="c033"><code>\bfseries</code></td><td class="c030">  </td><td class="c033"><span class="c023">font-weight:bold</span></td></tr> <tr><td class="c033"><code>\mdseries</code></td><td class="c030">  </td><td class="c033">no style</td></tr> <tr><td class="hbar" colspan=3></td></tr> </table> </td></tr> </table> </div><p>Text-style commands also exists, they are defined as <code>\mbox{\</code><span class="c019">decl</span>…<code>}</code>. For instance, <code>\texttt</code> is defined as a command with one argument whose body is <code>\mbox{\ttfamily#1}</code>. Finally, the <code>\emph</code> command for emphasised text also exists, it yields text-level <code>em</code> elements.</p><p>As in L<sup>A</sup>T<sub>E</sub>X, type styles consists in three components: <em>shape</em>, <em>series</em> and <em>family</em>. H<span class="c016"><sup>E</sup></span>V<span class="c016"><sup>E</sup></span>A implements the three components by making one declaration to cancel the effect of other declarations of the same kind. For instance consider the following source, that exhibits shape changes: </p><pre class="verbatim">{\itshape italic shape \slshape slanted shape \scshape small caps shape \upshape upright shape} </pre><p> Then, in the rendering below, “small caps shape” appears in small caps shape only and not in italics: </p><blockquote class="quote"> <span class="c019">italic shape </span><span class="c020">slanted shape </span><span class="c021">small caps shape </span>upright shape </blockquote><p>Old style declarations are also recognised, they translate to text-level elements. However, no elements are cancelled when using old style declaration. Thus, the source “<code>{\sl\sc slanted and small caps}</code>” yields “slanted” small caps: “<span style="font-style:oblique;font-variant:small-caps">slanted and small caps</span>”. Users need probably not worry about this. However this has an important practical consequence: to change the default rendering of type styles, one should redefine old style declaration in order to benefit from the cancellation mechanism. See section <a href="manual020.html#customize-style">10.2</a> for a more thorough description.</p> <h3 class="subsection" id="sec168">B.15.2  Changing the Type Size</h3> <p> All declarations, from <code>\tiny</code> to <code>\Huge</code> are recognised. Output is not satisfactory inside headers elements generated by sectioning commands.</p> <h3 class="subsection" id="sec169">B.15.3  Special Symbols</h3> <p>The <code>\symbol{</code><span class="c019">num</span><code>}</code> outputs character number <span class="c019">num</span> (decimal) from the Unicode character set. This departs from L<sup>A</sup>T<sub>E</sub>X, which output symbol number <span class="c019">num</span> in the current font.</p> <hr> <a href="manual036.html"><img src="previous_motif.svg" alt="Previous"></a> <a href="manual022.html"><img src="contents_motif.svg" alt="Up"></a> <a href="extras.html"><img src="next_motif.svg" alt="Next"></a> </body> </html>