File indexing completed on 2024-11-24 04:34:43
0001 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 0002 <html> 0003 <!-- This document is an unofficial reference manual for LaTeX, a 0004 document preparation system, version of November 2018. 0005 0006 This manual was originally translated from LATEX.HLP v1.0a in the 0007 VMS Help Library. The pre-translation version was written by 0008 George D. Greenwade of Sam Houston State University. The 0009 LaTeX 2.09 version was written by Stephen Gilmore. The 0010 LaTeX2e version was adapted from this by Torsten Martinsen. Karl 0011 Berry made further updates and additions, and gratefully acknowledges 0012 using Hypertext Help with LaTeX, by Sheldon Green, and 0013 LaTeX Command Summary (for LaTeX 2.09) by 0014 L. Botway and C. Biemesderfer (published by the TeX Users 0015 Group as TeXniques number 10), as reference material. We also 0016 gratefully acknowledge additional material appearing in 0017 latex2e-reference by Martin Herbert Dietze. (From these references no 0018 text was directly copied.) 0019 0020 Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013, 0021 2014, 2015, 2016, 2017, 2018 Karl Berry. 0022 0023 Copyright 1988, 1994, 2007 Stephen Gilmore. 0024 0025 Copyright 1994, 1995, 1996 Torsten Martinsen. 0026 0027 Permission is granted to make and distribute verbatim copies of 0028 this manual provided the copyright notice and this permission notice 0029 are preserved on all copies. 0030 0031 0032 Permission is granted to copy and distribute modified versions of this 0033 manual under the conditions for verbatim copying, provided that the entire 0034 resulting derived work is distributed under the terms of a permission 0035 notice identical to this one. 0036 0037 Permission is granted to copy and distribute translations of this manual 0038 into another language, under the above conditions for modified versions. --> 0039 <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> 0040 <head> 0041 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 0042 <title>Font styles (LaTeX2e unofficial reference manual (November 2018))</title> 0043 0044 <meta name="description" content="Font styles (LaTeX2e unofficial reference manual (November 2018))"> 0045 <meta name="keywords" content="Font styles (LaTeX2e unofficial reference manual (November 2018))"> 0046 <meta name="resource-type" content="document"> 0047 <meta name="distribution" content="global"> 0048 <meta name="Generator" content="makeinfo"> 0049 <link href="index.html#Top" rel="start" title="Top"> 0050 <link href="IndexDocument.html#Index" rel="index" title="Index"> 0051 <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> 0052 <link href="Fonts.html#Fonts" rel="up" title="Fonts"> 0053 <link href="Font-sizes.html#Font-sizes" rel="next" title="Font sizes"> 0054 <link href="_005cUseTextAccent-_0026-_005cUseTextSymbol.html#g_t_005cUseTextAccent-_0026-_005cUseTextSymbol" rel="prev" title="\UseTextAccent & \UseTextSymbol"> 0055 <style type="text/css"> 0056 <!-- 0057 /* $Id: latex2e.css 690 2018-09-15 15:20:19Z jimhefferon $ 0058 Minor css for latexrefman. Public domain. 0059 Originally written by Jim Hefferon and Karl Berry, 2018. */ 0060 0061 /* So you can style for yourself */ 0062 @import url("/css/latexreflocal.css"); 0063 0064 0065 0066 a.summary-letter {text-decoration: none} 0067 blockquote.indentedblock {margin-right: 0em} 0068 blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} 0069 blockquote.smallquotation {font-size: smaller} 0070 div.display {margin-left: 3.2em} 0071 div.example {margin-left: 3.2em} 0072 div.lisp {margin-left: 3.2em} 0073 div.smalldisplay {margin-left: 3.2em} 0074 div.smallexample {margin-left: 3.2em} 0075 div.smalllisp {margin-left: 3.2em} 0076 kbd {font-style: oblique} 0077 pre.display {font-family: inherit} 0078 pre.format {font-family: inherit} 0079 pre.menu-comment {font-family: serif} 0080 pre.menu-preformatted {font-family: serif} 0081 pre.smalldisplay {font-family: inherit; font-size: smaller} 0082 pre.smallexample {font-size: smaller} 0083 pre.smallformat {font-family: inherit; font-size: smaller} 0084 pre.smalllisp {font-size: smaller} 0085 span.nolinebreak {white-space: nowrap} 0086 span.roman {font-family: initial; font-weight: normal} 0087 span.sansserif {font-family: sans-serif; font-weight: normal} 0088 ul.no-bullet {list-style: none} 0089 BODY { 0090 margin-top: 1em; 0091 margin-left: 1em; /* auto results in two-digit <ol> lost off left */ 0092 margin-right: 1em; 0093 margin-bottom: 1em; 0094 /* the idea is to use the whole window, unless it is ridiculously 0095 wide, probably with too-small fonts, too. */ 0096 max-width: 64em; 0097 } 0098 0099 /* Because we want @math{... @code ...} to be upright, not slanted, 0100 and Texinfo won't fix it. */ 0101 code {font-style:normal; font-family:monospace; } 0102 0103 /* We put a link to our own home page at the bottom. */ 0104 div.referenceinfo {font-size:small;} 0105 0106 --> 0107 </style> 0108 0109 0110 </head> 0111 0112 <body lang="en"> 0113 <a name="Font-styles"></a> 0114 <div class="header"> 0115 <p> 0116 Next: <a href="Font-sizes.html#Font-sizes" accesskey="n" rel="next">Font sizes</a>, Previous: <a href="fontenc-package.html#fontenc-package" accesskey="p" rel="prev">fontenc package</a>, Up: <a href="Fonts.html#Fonts" accesskey="u" rel="up">Fonts</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="IndexDocument.html#Index" title="Index" rel="index">Index</a>]</p> 0117 </div> 0118 <hr> 0119 <a name="Font-styles-1"></a> 0120 <h3 class="section">4.2 Font styles</h3> 0121 0122 <a name="index-font-styles"></a> 0123 <a name="index-type-styles"></a> 0124 <a name="index-styles-of-text"></a> 0125 0126 <p>The following type style commands are supported by LaTeX. 0127 </p> 0128 <p>In the table below the listed commands, the <code>\text...</code> commands, 0129 is used with an argument, as in <code>\textit{<var>text</var>}</code>. This is 0130 the preferred form. But shown after it, in parenthesis, is the 0131 corresponding declaration form, which is sometimes useful. This form 0132 takes no arguments, as in <code>{\itshape <var>text</var>}</code>. The scope of 0133 the declaration form lasts until the next type style command or the end 0134 of the current group. In addition, each has an environment form such as 0135 <code>\begin{itshape}...\end{itshape}</code>. 0136 </p> 0137 <p>These commands, in both the argument form and the declaration form, are 0138 cumulative; for instance you can get bold sans serif by saying either of 0139 <code>\sffamily\bfseries</code> or <code>\bfseries\sffamily</code>. 0140 </p> 0141 <a name="index-_005cnocorrlist"></a> 0142 <a name="index-_005cnocorr"></a> 0143 <p>One advantage of these commands is that they automatically insert italic 0144 corrections if needed (see <a href="_005c_002f.html#g_t_005c_002f">\/</a>). Specifically, they insert the 0145 italic correction unless the following character is in the list 0146 <code>\nocorrlist</code>, which by default consists of a period and a comma. 0147 To suppress the automatic insertion of italic correction, use 0148 <code>\nocorr</code> at the start or end of the command argument, such as 0149 <code>\textit{\nocorr text}</code> or <code>\textsc{text \nocorr}</code>. 0150 </p> 0151 <dl compact="compact"> 0152 <dt><code>\textrm (\rmfamily)</code></dt> 0153 <dd><a name="index-_005ctextrm"></a> 0154 <a name="index-_005crmfamily"></a> 0155 <p>Roman. 0156 </p> 0157 </dd> 0158 <dt><code>\textit (\itshape)</code></dt> 0159 <dd><a name="index-_005ctextit"></a> 0160 <a name="index-_005citshape"></a> 0161 <p>Italics. 0162 </p> 0163 </dd> 0164 <dt><code>\textmd (\mdseries)</code></dt> 0165 <dd><a name="index-_005ctextmd"></a> 0166 <a name="index-_005cmdseries"></a> 0167 <p>Medium weight (default). 0168 </p> 0169 </dd> 0170 <dt><code>\textbf (\bfseries)</code></dt> 0171 <dd><a name="index-_005ctextbf"></a> 0172 <a name="index-_005cbfseries"></a> 0173 <p>Boldface. 0174 </p> 0175 </dd> 0176 <dt><code>\textup (\upshape)</code></dt> 0177 <dd><a name="index-_005ctextup"></a> 0178 <a name="index-_005cupshape"></a> 0179 <p>Upright (default). 0180 </p> 0181 </dd> 0182 <dt><code>\textsl (\slshape)</code></dt> 0183 <dd><a name="index-_005ctextsl"></a> 0184 <a name="index-_005cslshape"></a> 0185 <p>Slanted. 0186 </p> 0187 </dd> 0188 <dt><code>\textsf (\sffamily)</code></dt> 0189 <dd><a name="index-_005ctextsf"></a> 0190 <a name="index-_005csffamily"></a> 0191 <p>Sans serif. 0192 </p> 0193 </dd> 0194 <dt><code>\textsc (\scshape)</code></dt> 0195 <dd><a name="index-_005ctextsc"></a> 0196 <a name="index-_005cscshape"></a> 0197 <p>Small caps. 0198 </p> 0199 </dd> 0200 <dt><code>\texttt (\ttfamily)</code></dt> 0201 <dd><a name="index-_005ctexttt"></a> 0202 <a name="index-_005cttfamily"></a> 0203 <p>Typewriter. 0204 </p> 0205 </dd> 0206 <dt><code>\textnormal (\normalfont)</code></dt> 0207 <dd><a name="index-_005ctextnormal"></a> 0208 <a name="index-_005cnormalfont"></a> 0209 <p>Main document font. 0210 </p> 0211 </dd> 0212 </dl> 0213 0214 <a name="index-emphasis"></a> 0215 <a name="index-_005cemph"></a> 0216 <p>Although it also changes fonts, the <code>\emph{<var>text</var>}</code> command 0217 is semantic, for text to be emphasized, and should not be used as a 0218 substitute for <code>\textit</code>. For example, <code>\emph{<var>start 0219 text</var> \emph{<var>middle text</var>} <var>end text</var>}</code> will result in the 0220 <var>start text</var> and <var>end text</var> in italics, but <var>middle text</var> 0221 will be in roman. 0222 </p> 0223 <p>LaTeX also provides the following commands, which unconditionally 0224 switch to the given style, that is, are <em>not</em> cumulative. They are 0225 used as declarations: <code>{\<var>cmd</var>...}</code> instead of 0226 <code>\<var>cmd</var>{...}</code>. 0227 </p> 0228 <p>(The unconditional commands below are an older version of font 0229 switching. The earlier commands are an improvement in most 0230 circumstances. But sometimes an unconditional font switch is precisely 0231 what you want.) 0232 </p> 0233 <dl compact="compact"> 0234 <dt><code>\bf</code> 0235 <a name="index-_005cbf"></a> 0236 </dt> 0237 <dd><a name="index-bold-font"></a> 0238 <p>Switch to bold face. 0239 </p> 0240 </dd> 0241 <dt><code>\cal</code> 0242 <a name="index-_005ccal"></a> 0243 </dt> 0244 <dd><a name="index-script-letters-for-math"></a> 0245 <a name="index-calligraphic-letters-for-math"></a> 0246 <p>Switch to calligraphic letters for math. 0247 </p> 0248 </dd> 0249 <dt><code>\it</code> 0250 <a name="index-_005cit"></a> 0251 </dt> 0252 <dd><a name="index-italic-font"></a> 0253 <p>Italics. 0254 </p> 0255 </dd> 0256 <dt><code>\rm</code> 0257 <a name="index-_005crm"></a> 0258 </dt> 0259 <dd><a name="index-roman-font"></a> 0260 <p>Roman. 0261 </p> 0262 </dd> 0263 <dt><code>\sc</code> 0264 <a name="index-_005csc"></a> 0265 </dt> 0266 <dd><a name="index-small-caps-font"></a> 0267 <p>Small caps. 0268 </p> 0269 </dd> 0270 <dt><code>\sf</code> 0271 <a name="index-_005csf"></a> 0272 </dt> 0273 <dd><a name="index-sans-serif-font"></a> 0274 <p>Sans serif. 0275 </p> 0276 </dd> 0277 <dt><code>\sl</code> 0278 <a name="index-_005csl"></a> 0279 </dt> 0280 <dd><a name="index-slanted-font"></a> 0281 <a name="index-oblique-font"></a> 0282 <p>Slanted (oblique). 0283 </p> 0284 </dd> 0285 <dt><code>\tt</code> 0286 <a name="index-_005ctt"></a> 0287 </dt> 0288 <dd><a name="index-typewriter-font"></a> 0289 <a name="index-monospace-font"></a> 0290 <a name="index-fixed_002dwidth-font"></a> 0291 <p>Typewriter (monospace, fixed-width). 0292 </p> 0293 </dd> 0294 </dl> 0295 0296 <p>The <code>\em</code> command is the unconditional version of <code>\emph</code>. 0297 </p> 0298 <p>The following commands are for use in math mode. They are not 0299 cumulative, so <code>\mathbf{\mathit{<var>symbol</var>}}</code> does not 0300 create a boldface and italic <var>symbol</var>; instead, it will just be in 0301 italics. This is because typically math symbols need consistent 0302 typographic treatment, regardless of the surrounding environment. 0303 </p> 0304 <dl compact="compact"> 0305 <dt><code>\mathrm</code></dt> 0306 <dd><a name="index-_005cmathrm"></a> 0307 <p>Roman, for use in math mode. 0308 </p> 0309 </dd> 0310 <dt><code>\mathbf</code></dt> 0311 <dd><a name="index-_005cmathbf"></a> 0312 <p>Boldface, for use in math mode. 0313 </p> 0314 </dd> 0315 <dt><code>\mathsf</code></dt> 0316 <dd><a name="index-_005cmathsf"></a> 0317 <p>Sans serif, for use in math mode. 0318 </p> 0319 </dd> 0320 <dt><code>\mathtt</code></dt> 0321 <dd><a name="index-_005cmathtt"></a> 0322 <p>Typewriter, for use in math mode. 0323 </p> 0324 </dd> 0325 <dt><code>\mathit</code></dt> 0326 <dt><code>(\mit)</code></dt> 0327 <dd><p>Italics, for use in math mode. 0328 </p> 0329 </dd> 0330 <dt><code>\mathnormal</code></dt> 0331 <dd><a name="index-_005cmathnormal"></a> 0332 <p>For use in math mode, e.g., inside another type style declaration. 0333 </p> 0334 </dd> 0335 <dt><code>\mathcal</code></dt> 0336 <dd><a name="index-_005cmathcal"></a> 0337 <p>Calligraphic letters, for use in math mode. 0338 </p> 0339 </dd> 0340 </dl> 0341 0342 <a name="index-_005cmathversion"></a> 0343 <a name="index-math_002c-bold"></a> 0344 <a name="index-bold-math"></a> 0345 <p>In addition, the command <code>\mathversion{bold}</code> can be used for 0346 switching to bold letters and symbols in 0347 formulas. <code>\mathversion{normal}</code> restores the default. 0348 </p> 0349 <a name="index-_005coldstylenums"></a> 0350 <a name="index-numerals_002c-old_002dstyle"></a> 0351 <a name="index-old_002dstyle-numerals"></a> 0352 <a name="index-lining-numerals"></a> 0353 <a name="index-package_002c-textcomp"></a> 0354 <a name="index-textcomp-package"></a> 0355 0356 <p>Finally, the command <code>\oldstylenums{<var>numerals</var>}</code> will typeset 0357 so-called “old-style” numerals, which have differing heights and 0358 depths (and sometimes widths) from the standard “lining” numerals, 0359 which all have the same height as uppercase letters. LaTeX’s 0360 default fonts support this, and will respect <code>\textbf</code> (but not 0361 other styles; there are no italic old-style numerals in Computer 0362 Modern). Many other fonts have old-style numerals also; sometimes the 0363 <code>textcomp</code> package must be loaded, and sometimes package options 0364 are provided to make them the default. FAQ entry: 0365 <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=osf">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=osf</a>. 0366 </p> 0367 0368 0369 0370 <hr/><div class='referenceinfo'> <a href='https://latexref.xyz/'> <i>Unofficial LaTeX2e reference manual</i></a></div> 0371 </body> 0372 </html>