Debian Codegraph @

texmf-dist/doc/latex/base/fntguide.tex

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 1993-2025
4 %
5 % The LaTeX Project and any individual authors listed elsewhere
6 % in this file.
7 %
8 % This file is part of the LaTeX base system.
9 % -------------------------------------------
10 %
11 % It may be distributed and/or modified under the
12 % conditions of the LaTeX Project Public License, either version 1.3c
13 % of this license or (at your option) any later version.
14 % The latest version of this license is in
15 % https://www.latex-project.org/lppl.txt
16 % and version 1.3c or later is part of all distributions of LaTeX
17 % version 2008 or later.
18 %
19 % This file has the LPPL maintenance status "maintained".
20 %
21 % The list of all files belonging to the LaTeX base distribution is
22 % given in the file `manifest.txt'. See also `legal.txt' for additional
23 % information.
24 %
25 % The list of derived (unpacked) files belonging to the distribution
26 % and covered by LPPL is defined by the unpacking scripts (with
27 % extension .ins) which are part of the distribution.
28 %
29 % \fi
30 % Filename: fntguide.tex
31
32 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
33
34 \documentclass{ltxguide}[1995/11/28]
35
36 \usepackage[T1]{fontenc}
37
38 \newcommand\cs[1]{\texttt{\textbackslash #1}}
39 \newcommand\meta[1]{\textnormal{\textlangle\textit{#1}\textrangle}}
40
41
42
43
44 \setcounter{totalnumber}{8}
45 \setcounter{topnumber}{8}
46
47 \usepackage[trace]{fewerfloatpages}
48 \usepackage{booktabs,varioref}
49
50 \title{\LaTeXe{} font selection}
51
52 \author{\copyright~Copyright 1995--2025, \LaTeX\ Project
53 Team.\thanks{Thanks to Arash Esbati for documenting the
54 newer NFSS features of 2020}\\
55 All rights reserved.%
56 \footnote{This file may be distributed and/or modified under the
57 conditions of the \LaTeX{} Project Public License, either version 1.3c
58 of this license or (at your option) any later version. See the source
59 \texttt{fntguide.tex} for full details.}%
60 }
61
62 \date{Sep 2025}
63
64 \begin{document}
65
66 \maketitle
67
68 \tableofcontents
69
70 \section{Introduction}
71
72 This document describes the new font selection features of the \LaTeX{}
73 Document Preparation System. It is intended for package writers who
74 want to write font-loading packages similar to |times| or |latexsym|.
75
76 This document is only a brief introduction to the new facilities and is
77 intended for package writers who are familiar with \TeX{} fonts and
78 \LaTeX{} packages. It is \emph{neither} a user-guide \emph{nor} a
79 reference manual for fonts in \LaTeXe.
80
81 \subsection{\LaTeXe~fonts}
82
83 The most important difference between \LaTeX~2.09 and \LaTeXe{} is the
84 way that fonts are selected. In \LaTeX~2.09, the Computer Modern fonts
85 were built into the \LaTeX~format, and so customizing \LaTeX{} to use
86 other fonts was a major effort.
87
88 In \LaTeXe, very few fonts are built into the format, and there are
89 commands to load new text and math fonts. Packages such as |times| or
90 |latexsym| allow authors to access these fonts. This document describes
91 how to write similar font-loading packages.
92
93 The \LaTeXe{} font selection system was first released as the `New Font
94 Selection Scheme' (NFSS) in 1989, and then in release~2 in 1993.
95 \LaTeXe{} includes NFSS release~2 as standard.
96
97 \subsection{Overview}
98
99 This document contains an overview of the new font commands of \LaTeX.
100
101 \begin{description}
102
103 \item[Section~\ref{sec:text}] describes the commands for selecting fonts
104 in classes and packages. It lists the five \LaTeX{} font attributes,
105 and lists the commands for selecting fonts. It also describes how to
106 customize the author commands such as |\textrm| and |\textit| to suit
107 your document design.
108
109 \item[Section~\ref{sec:math}] explains the commands for controlling
110 \LaTeX{} math fonts. It describes how to specify new math fonts and
111 new math symbols.
112
113 \item[Section~\ref{sec:install}] explains how to install new fonts into
114 \LaTeX. It shows how \LaTeX{} font attributes are turned into \TeX{}
115 font names, and how to specify your own fonts using font definition
116 files.
117
118 \item[Section~\ref{sec:encode}] discusses text font encodings. It
119 describes how to declare a new encoding and how to define commands,
120 such as |\AE| or |\"|, which have different definitions in different
121 encodings, depending on whether ligatures, etc.\ are available in the
122 encoding.
123
124 \item[Section~\ref{sec:misc}] covers font miscellanea. It describes how
125 \LaTeX{} performs font substitution, how to customize fonts that are
126 preloaded in the \LaTeX{} format, and the naming conventions used in
127 \LaTeX{} font selection.
128
129 \end{description}
130
131 \subsection{Further information}
132
133 For a general introduction to \LaTeX, including the new features of
134 \LaTeXe, you should read \emph{\LaTeXbook}, Leslie Lamport, Addison
135 Wesley, 2nd~ed, 1994.
136
137 A more detailed description of the \LaTeX{} font selection scheme is to
138 be found in \emph{\LaTeXcomp}, 2nd~ed, by Mittelbach and Goossens,
139 Addison Wesley, 2004.
140
141 The \LaTeX{} font selection scheme is based on \TeX, which is described
142 by its developer in \emph{The \TeX book}, Donald E.~Knuth, Addison
143 Wesley, 1986, revised in 1991 to include the features of \TeX~3.
144
145 Sebastian Rahtz's |psnfss| software contains the software for using a
146 large number of Type~1 fonts (including the Adobe Laser Writer 35 and
147 the Monotype CD-ROM fonts) in \LaTeX. It should be available from the
148 same source as your copy of \LaTeX.
149
150 The |psnfss| software uses fonts generated by Alan Jeffrey's |fontinst|
151 software. This can convert fonts from Adobe Font Metric format into a
152 format readable by \LaTeX, including the generation of the font
153 definition files described in Section~\ref{sec:install}. The |fontinst|
154 software should be available from the same source as your copy of
155 \LaTeX.
156
157 Whenever practical, \LaTeX{} uses the font naming scheme called
158 `fontname'; this was described in \emph{Filenames for fonts},%
159 \footnote{An up-to-date electronic version of this document can be found
160 on any CTAN server, in the directory \texttt{info/fontname}.}
161 \emph{TUGboat}~11(4),~1990.
162
163 The class-writer's guide \emph{\clsguide} describes the new \LaTeX{}
164 features for writers of document classes and packages and is kept in
165 |clsguide.tex|. Configuring \LaTeX{} is covered by the guide
166 \emph{\cfgguide} in \texttt{cfgguide.tex} whilst the philosophy behind
167 our policy on modifying \LaTeX{} is described in \emph{\modguide} in
168 \texttt{modguide.tex}.
169
170 The documented source code (from the files used to produce the kernel
171 format via |latex.ltx|) is now available as \emph{The \LaTeXe\ Sources}.
172 This very large document also includes an index of \LaTeX{} commands.
173 It can be typeset from the \LaTeX{} file |source2e.tex| in the |base|
174 directory; this uses the class file |ltxdoc.cls|.
175
176 For more information about \TeX{} and \LaTeX{}, please contact your
177 local \TeX{} Users Group, or the international \TeX{} Users Group.
178 Addresses and other details can be found at:
179 \begin{quote}\small\label{addrs}
180 \texttt{https://www.tug.org/lugs.html}
181 \end{quote}
182
183
184 \section{Text fonts}
185 \label{sec:text}
186
187 This section describes the commands available to class and package
188 writers for specifying and selecting fonts.
189
190 \subsection{Text font attributes}
191 \label{sec:textfontattributes}
192
193 Every text font in \LaTeX{} has five \emph{attributes}:
194 \begin{description}
195
196 \item[encoding] This specifies the order that characters appear in the
197 font. The two most common text encodings used in \LaTeX{} are Knuth's
198 `\TeX{} text' encoding, and the `\TeX{} text extended' encoding
199 developed by the \TeX{} Users Group members during a \TeX{} Conference
200 at Cork in~1990 (hence its informal name `Cork encoding').
201
202 \item[family] The name for a collection of fonts, usually grouped under
203 a common name by the font foundry. For example, `Adobe Times', `ITC
204 Garamond', and Knuth's `Computer Modern Roman' are all font families.
205
206 \item[series] How heavy and/or expanded a font is. For example, `medium
207 weight', `narrow' and `bold extended' are all series.
208
209 \item[shape] The form of the letters within a font family. For example,
210 `italic', `oblique' and `upright' (sometimes called `roman') are all
211 font shapes.
212
213 \item[size] The design size of the font, for example `10pt'. If no
214 dimension is specified, `pt' is assumed.
215
216 \end{description}
217 The possible values for these attributes are given short acronyms by
218 \LaTeX. The most common values for the font encoding are:
219 \begin{center}
220 \begin{minipage}{.7\linewidth}
221 \begin{tabular}{rl}
222 |OT1| & \TeX{} text \\
223 |T1| & \TeX{} extended text \\
224 |OML| & \TeX{} math italic \\
225 |OMS| & \TeX{} math symbols \\
226 |OMX| & \TeX{} math large symbols \\
227 |U| & Unknown \\
228 |L<xx>| & A local encoding
229 \end{tabular}
230 \end{minipage}
231 \end{center}
232 The `local' encodings are intended for font encodings which are only
233 locally available, for example a font containing an organization's logo
234 in various sizes.
235
236 There are far too many font families to list them all, but some common
237 ones are:
238 \begin{center}
239 \begin{minipage}{.7\linewidth}
240 \begin{tabular}{rl}
241 |cmr| & Computer Modern Roman \\
242 |cmss| & Computer Modern Sans \\
243 |cmtt| & Computer Modern Typewriter \\
244 |cmm| & Computer Modern Math Italic \\
245 |cmsy| & Computer Modern Math Symbols \\
246 |cmex| & Computer Modern Math Extensions \\
247 |ptm| & Adobe Times \\
248 |phv| & Adobe Helvetica \\
249 |pcr| & Adobe Courier
250 \end{tabular}
251 \end{minipage}
252 \end{center}
253 \NEWdescription{2019/07/10}\label{page:seriesvalues}
254 The font series is denoting a combination of the weight (boldness) and
255 the width (amount of expansion). The standard supported for weights and
256 widths are:
257 \begin{center}
258 %\begin{minipage}{.7\linewidth}
259 \begin{tabular}{rl}
260 |ul| & Ultra Light \\
261 |el| & Extra Light \\
262 |l| & Light \\
263 |sl| & Semi Light \\
264 |m| & Medium (normal)\\
265 |sb| & Semi Bold \\
266 |b| & Bold \\
267 |eb| & Extra Bold \\
268 |ub| & Ultra Bold \\
269 \end{tabular}
270 \qquad
271 \begin{tabular}{rlr}
272 |uc| & Ultra Condensed & 50\% \\
273 |ec| & Extra Condensed & 62.5\% \\
274 |c| & Condensed & 75\% \\
275 |sc| & Semi Condensed & 87.5\% \\
276 |m| & Medium & 100\% \\
277 |sx| & Semi Expanded & 112.5\% \\
278 |x| & Expanded & 125\% \\
279 |ex| & Extra Expanded & 150\% \\
280 |ux| & Ultra Expanded & 200\% \\
281 \end{tabular}
282 \end{center}
283 These are concatenated to a single series value except that |m| is
284 dropped unless both weight and width are medium in which case a single
285 |m| is used.
286
287 Examples for series values are then:
288 \begin{center}
289 \begin{minipage}{.7\linewidth}
290 \begin{tabular}{rl}
291 |m| & Medium weight and width \\
292 |b| & Bold weight, medium width \\
293 |bx| & Bold extended \\
294 |sb| & Semi-bold, medium width\\
295 |sbx| & Semi-bold extended\\
296 |c| & Medium weight, condensed width
297 \end{tabular}
298 \end{minipage}
299 \end{center}
300 \NEWdescription{2019/07/10}
301 Note, that there are a large variety of names floating around like
302 ``regular'', ``black'', ``demi-bold'', ``thin'', ``heavy'' and many
303 more. If at all possible they should be matched into the standard
304 naming scheme to allow for sensible default substitutions if necessary,
305 e.g., ``demi-bold'' is normally just another name for ``semi-bold'', so
306 should get |sb| assigned, etc.
307
308
309 \NEWdescription{2020/02/02}
310 The most common values for the font shape are:
311 \begin{center}
312 \begin{minipage}{.7\linewidth}
313 \begin{tabular}{rl}
314 |n| & Normal (that is `upright' or `roman') \\
315 |it| & Italic \\
316 |sl| & Slanted (or `oblique') \\
317 |sc| & Caps and small caps \\
318 |scit| & Caps and small caps italic \\
319 |scsl| & Caps and small caps slanted \\
320 |sw| & Swash
321 \end{tabular}
322 \end{minipage}
323 \end{center}
324 A less common value for font shape is:
325 \begin{center}
326 \begin{minipage}{.7\linewidth}
327 \begin{tabular}{rl}
328 |ssc| & Spaced caps and small caps
329 \end{tabular}
330 \end{minipage}
331 \end{center}
332 and there is also |ui| for upright italic, i.e., an italic shape but
333 artificially turned upright. This is sometimes useful and available in
334 some fonts.
335
336
337 The font size is specified as a dimension, for example |10pt| or |1.5in|
338 or |3mm|; if no unit is specified, |pt| is assumed. These five
339 parameters specify every \LaTeX{} font, for example:
340 \begin{center}
341 \begin{tabular}{@{}r@{\,}l@{\,}c@{\,}c@{\,}cc@{}r@{}}
342 \multicolumn{5}{@{}c}{\emph{\LaTeX{} specification}}
343 & \emph{Font} & \emph{\TeX{} font name} \\
344 |OT1| & |cmr| & |m| & |n| & |10|
345 & Computer Modern Roman 10 point
346 & |cmr10| \\
347 |OT1| & |cmss| & |m| & |sl| & |1pc|
348 & Computer Modern Sans Oblique 1 pica
349 & |cmssi12| \\
350 |OML| & |cmm| & |m| & |it| & |10pt|
351 & Computer Modern Math Italic 10 point
352 & |cmmi10| \\
353 |T1| & |ptm| & |b| & |it| & |1in|
354 & Adobe Times Bold Italic 1 inch
355 & |ptmb8t at 1in|
356 \end{tabular}
357 \end{center}
358 These five parameters are displayed whenever \LaTeX{} gives an overfull
359 box warning, for example:
360 \begin{verbatim}
361 Overfull \hbox (3.80855pt too wide) in paragraph at lines 314--318
362 []\OT1/cmr/m/n/10 Normally [] and [] will be iden-ti-cal,
363 \end{verbatim}
364 The author commands for fonts set the five attributes as shown in table~\vref{tab:attributes}.
365 \begin{table}[!tbp]
366 \centering
367 \begin{tabular}{@{}r@{\hspace{3pt}}c@{\hspace{1pt}}c@{}}
368 \toprule
369 \multicolumn{1}{c}{\emph{Author command}} & \emph{Attribute}
370 & \emph{Value in} |article| \emph{class} \\
371 \midrule
372 |\textnormal{..}| or |\normalfont| & family & |cmr| \\
373 & series & |m| \\
374 & shape & |n| \\ \midrule%[2pt]
375 |\textrm{..}| or |\rmfamily| & family & |cmr| \\
376 |\textsf{..}| or |\sffamily| & family & |cmss| \\
377 |\texttt{..}| or |\ttfamily| & family & |cmtt| \\
378 |\textmd{..}| or |\mdseries| & series & |m| \\
379 |\textbf{..}| or |\bfseries| & series & |bx| \\ \midrule%[2pt]
380 |\textit{..}| or |\itshape| & shape & |it| \\
381 |\textsl{..}| or |\slshape| & shape & |sl| \\
382 |\textsc{..}| or |\scshape| & shape & |sc| \\
383 |\textssc{..}| or |\sscshape| & shape & |ssc| \\
384 |\textsw{..}| or |\swshape| & shape & |sw| \\
385 |\textulc{..}| or |\ulcshape| & shape & |ulc| (virtual) $\to$ |n|, |it|, |sl| or |ssc| \\
386 |\textup{..}| or |\upshape| & shape & | up| (virtual) $\to$ |n| or |sc |\phantom{, , } \\\midrule%[2pt]
387 |\tiny| & size & |5pt| \\
388 |\scriptsize| & size & |7pt| \\
389 |\footnotesize| & size & |8pt| \\
390 |\small| & size & |9pt| \\
391 |\normalsize| & size & |10pt| \\
392 |\large| & size & |12pt| \\
393 |\Large| & size & |14.4pt| \\
394 |\LARGE| & size & |17.28pt| \\
395 |\huge| & size & |20.74pt| \\
396 |\Huge| & size & |24.88pt| \\
397 \bottomrule
398 \end{tabular}
399 \caption{Author font commands and their effects (article class)}\label{tab:attributes}
400 \end{table}
401 The values used by these commands are determined by the document class,
402 using the parameters defined in Section~\ref{sec:text.param}.
403
404 Note that there are no author commands for selecting new encodings.
405 These should be provided by packages, such as the |fontenc| package.
406
407 This section does not explain how \LaTeX{} font specifications are
408 turned into \TeX{} font names. This is described in
409 Section~\ref{sec:install}.
410
411
412
413 \subsection{Selection commands}
414
415 The low-level commands used to select a text font are as follows.
416
417 \begin{decl}
418 |\fontencoding| \arg{encoding} \\
419 |\fontfamily| \arg{family} \qquad
420 |\fontseries| \arg{series} \qquad
421 |\fontshape| \arg{shape} \\
422 |\fontsize| \arg{size} \arg{baselineskip} \qquad
423 |\linespread| \arg{factor}
424 \end{decl}
425
426 \NEWdescription{1998/12/01}
427 Each of the commands starting with |\font...| sets one of the font
428 attributes; |\fontsize| also sets |\baselineskip|. The |\linespread|
429 command prepares to multiply the current (or newly defined)
430 |\baselineskip| with \m{factor} (e.g., spreads the lines apart for
431 values greater one).
432
433 The actual font in use is not altered by these commands, but the
434 current attributes are used to determine which font and baseline skip
435 to use after the next |\selectfont| command.
436
437 \begin{decl}
438 |\selectfont|
439 \end{decl}
440 Selects a text font, based on the current values of the font attributes.
441
442 \emph{Warning}: There \emph{must} be a |\selectfont| command immediately
443 after any settings of the font parameters by (some of) the six commands
444 above, before any following text. For example, it is legal to say:
445 \begin{verbatim}
446 \fontfamily{ptm}\fontseries{b}\selectfont Some text.
447 \end{verbatim}
448 but it is \emph{not} legal to say:
449 \begin{verbatim}
450 \fontfamily{ptm} Some \fontseries{b}\selectfont text.
451 \end{verbatim}
452 You may get unexpected results if you put text between a
453 |\font<parameter>| command (or |\linespread|) and a |\selectfont|.
454
455 \begin{decl}
456 |\usefont| \arg{encoding} \arg{family} \arg{series} \arg{shape}
457 \end{decl}
458 A short hand for the equivalent |\font...| commands followed by a call
459 to |\selectfont|.
460
461 \subsection{Internals}
462
463 The current values of the font attributes are held in internal macros.
464
465 \begin{decl}
466 |\f@encoding| \quad
467 |\f@family| \quad
468 |\f@series| \quad
469 |\f@shape| \quad
470 |\f@size| \quad
471 |\f@baselineskip| \\
472 |\tf@size| \quad
473 |\sf@size| \quad
474 |\ssf@size|
475 \end{decl}
476
477 These hold the current values of the encoding, the family, the series,
478 the shape, the size, the baseline skip, the main math size, the `script'
479 math size and the `scriptscript' math size. The last three are
480 accessible only within a formula; outside of math they may contain
481 arbitrary values.
482
483 For example, to set the size to 12 without changing the baseline skip:
484 \begin{verbatim}
485 \fontsize{12}{\f@baselineskip}
486 \end{verbatim}
487 However, you should \emph{never} alter the values of the internal
488 commands directly; they must only be modified using the low-level
489 commands like |\fontfamily|, |\fontseries|, etc. If you disobey this
490 warning you might produce code that loops.
491
492 \subsection{Parameters for author commands}
493 \label{sec:text.param}
494
495 The parameter values set by author commands such as |\textrm| and
496 |\rmfamily|, etc.\ are not hard-wired into \LaTeX; instead these
497 commands use the values of a number of parameters set by the document
498 class and packages. For example, |\rmdefault| is the name of the
499 default family selected by |\textrm| and |\rmfamily|. Thus to set a
500 document in Adobe Times, Helvetica and Courier, the document designer
501 specifies:
502 \begin{verbatim}
503 \renewcommand{\rmdefault}{ptm}
504 \renewcommand{\sfdefault}{phv}
505 \renewcommand{\ttdefault}{pcr}
506 \end{verbatim}
507
508 \begin{decl}
509 |\encodingdefault| \qquad
510 |\familydefault| \qquad
511 |\seriesdefault| \qquad
512 |\shapedefault|
513 \end{decl}
514 The encoding, family, series and shape of the main body font. By
515 default these are |OT1|, |\rmdefault|, |m| and |n|. Note that since the
516 default family is |\rmdefault|, this means that changing |\rmdefault|
517 will change the main body font of the document.
518
519 \begin{decl}
520 |\rmdefault| \qquad
521 |\sfdefault| \qquad
522 |\ttdefault|
523 \end{decl}
524 The families selected by |\textrm|, |\rmfamily|, |\textsf|, |\sffamily|,
525 |\texttt| and |\ttfamily|. By default these are |cmr|, |cmss| and
526 |cmtt|.
527
528 \begin{decl}
529 |\bfdefault| \qquad
530 |\mddefault|
531 \end{decl}
532 The series selected by |\textbf|, |\bfseries|, |\textmd| and
533 |\mdseries|. By default these are |bx| and |m|. These values are
534 suitable for the default families used. If other fonts are used as
535 standard document fonts (for example, certain PostScript fonts) it might
536 be necessary to adjust the value of |\bfdefault| to |b| since only a few
537 such families have a `bold extended' series. An alternative (taken for
538 the fonts provided by |psnfss|) is to define silent substitutions from
539 |bx| series to |b| series with special |\DeclareFontShape| declarations
540 and the |ssub| size function, see Section~\ref{sec:sizefunct}.
541
542 \begin{decl}
543 |\itdefault| \qquad
544 |\sldefault| \qquad
545 |\scdefault| \qquad
546 |\sscdefault| \qquad
547 |\swdefault| \\
548 |\ulcdefault| \qquad
549 |\updefault|
550 \end{decl}
551 \NEWfeature{2020/02/02}
552 The shapes selected by |\textit|, |\itshape|, |\textsl|, |\slshape|,
553 |\textsc|, |\scshape|, |\textssc|, |\sscshape|, |\textsw|, |\swshape|,
554 |\textulc|, |\ulcshape|, |\textup| and |\upshape|. By default these are
555 |it|, |sl|, |sc|, |ssc|, |sw|, |ulc| and |up|. Note that |ulc| and |up| are special here
556 because they are virtual shapes; they don't exist as real shape values. Instead they alter
557 the existing shape value based on rules, i.e., the result depends on context. The
558 respective macros |\textulc| or |\ulcshape| change small capitals back
559 to upper/lower case but will not change the font with respect to
560 italics, slanted or swash. |\upshape| or |\textup| in contrast will
561 switch italics or slanted back to upright but not alter the state of
562 upper/lower case, e.g., keep small capitals if present. Finally, the
563 command |\normalshape| is provided to reset the shape back to normal
564 which is a shorthand for |\upshape\ulcshape|.
565
566 Note that there are no parameters for the size commands. These should
567 be defined directly in class files, for example:
568 \begin{verbatim}
569 \renewcommand{\normalsize}{\fontsize{10}{12}\selectfont}
570 \end{verbatim}
571 More elaborate examples (setting additional parameters when the text
572 size is changed) can be found in |classes.dtx| the source documentation
573 for the classes |article|, |report|, and |book|.
574
575 \subsection{Special font declaration commands}
576
577 \begin{decl}
578 |\DeclareFixedFont| \arg{cmd} \arg{encoding} \arg{family} \arg{series}
579 \arg{shape} \arg{size}
580 \end{decl}
581
582 Declares command \m{cmd} to be a font switch which selects the font that
583 is specified by the attributes \m{encoding}, \m{family}, \m{series},
584 \m{shape}, and \m{size}.
585
586 The font is selected without any adjustments to baselineskip and other
587 surrounding conditions.
588
589 This example makes |{\picturechar .}| select a small dot very quickly:
590 \begin{verbatim}
591 \DeclareFixedFont{\picturechar}{OT1}{cmr}{m}{n}{5}
592 \end{verbatim}
593
594 \begin{decl}
595 |\DeclareTextFontCommand| \arg{cmd} \arg{font-switches}
596 \end{decl}
597
598 Declares command \m{cmd} to be a font command with one argument. The
599 current font attributes are locally modified by \m{font-switches} and
600 then the argument of \m{cmd} is typeset in the resulting new font.
601
602 Commands defined by |\DeclareTextFontCommand| automatically take care of
603 any necessary italic correction (on either side).
604
605 The following example shows how |\textrm| is defined by the kernel.
606 \begin{verbatim}
607 \DeclareTextFontCommand{\textrm}{\rmfamily}
608 \end{verbatim}
609
610 To define a command that always typeset its argument in the italic shape
611 of the main document font you could declare:
612 \begin{verbatim}
613 \DeclareTextFontCommand{\normalit}{\normalfont\itshape}
614 \end{verbatim}
615
616 This declaration can be used to change the meaning of a command; if
617 \m{cmd} is already defined, a log that it has been redefined is put in
618 the transcript file.
619
620 \begin{decl}
621 |\DeclareOldFontCommand| \arg{cmd} \arg{text-switch}
622 \arg{math-switch}
623 \end{decl}
624
625 Declares command \m{cmd} to be a font switch (i.e.~used with the
626 syntax |{<cmd>...}|) having the definition \m{text-switch}
627 when used in text and the definition \m{math-switch} when used in a
628 formula.
629 Math alphabet commands, like |\mathit|, when used within \m{math-switch}
630 should not have an argument. Their use in this argument causes their
631 semantics to change so that they here act as a font switch, as
632 required by the usage of the \m{cmd}.
633
634 This declaration is useful for setting up commands like |\rm| to behave
635 as they did in \LaTeX~2.09. We strongly urge you \emph{not} to misuse
636 this declaration to invent new font commands.
637
638 \newpage
639
640 The following example defines |\it| to produce the italic shape of the
641 main document font if used in text and to switch to the font that would
642 normally be produced by the math alphabet |\mathit| if used in a
643 formula.
644 \begin{verbatim}
645 \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
646 \end{verbatim}
647
648 This declaration can be used to change the meaning of a command; if
649 \m{cmd} is already defined, a log that it has been redefined is put in
650 the transcript file.
651
652
653 \section{Math fonts}
654 \label{sec:math}
655
656 This section describes the commands available to class and package
657 writers for specifying math fonts and math commands.
658
659 \subsection{Math font attributes}
660
661 The selection of fonts within math mode is quite different to that of
662 text fonts.
663
664 Some math fonts are selected explicitly by one-argument commands such as
665 |\mathsf{max}| or |\mathbf{vec}|; such fonts are called \emph{math
666 alphabets}. These math alphabet commands affect only the font used
667 for letters and symbols of type |\mathalpha| (see
668 Section~\ref{sec:math.commands}); other symbols within the argument will
669 be left unchanged. The predefined math alphabets are:
670 \begin{center}
671 \begin{tabular}{ccc}
672 \emph{Alphabet} & \emph{Description} & \emph{Example} \\
673 |\mathnormal| & default & $abcXYZ$ \\
674 |\mathrm| & roman & $\mathrm{abcXYZ}$ \\
675 |\mathbf| & bold roman & $\mathbf{abcXYZ}$ \\
676 |\mathsf| & sans serif & $\mathsf{abcXYZ}$ \\
677 |\mathit| & text italic & $\mathit{abcXYZ}$ \\
678 |\mathtt| & typewriter & $\mathtt{abcXYZ}$ \\
679 |\mathcal| & calligraphic & $\mathcal{XYZ}$
680 \end{tabular}
681 \end{center}
682 Other math fonts are selected implicitly by \TeX{} for symbols, with
683 commands such as |\oplus| (producing $\oplus$) or with straight
684 characters like |>>| or |+|. Fonts containing such math symbols are
685 called \emph{math symbol fonts}. The predefined math symbol fonts are:
686 \begin{center}
687 \begin{tabular}{ccc}
688 \emph{Symbol font} & \emph{Description} & \emph{Example} \\
689 |operators| & symbols from |\mathrm| & $[\;+\;]$ \\
690 |letters| & symbols from |\mathnormal| & $<<\star>>$ \\
691 |symbols| & most \LaTeX{} symbols & $\leq*\geq$ \\
692 |largesymbols| & large symbols & $\sum\prod\int$
693 \end{tabular}
694 \end{center}
695 Some math fonts are both \emph{math alphabets} and \emph{math symbol
696 fonts}, for example |\mathrm| and |operators| are the same font, and
697 |\mathnormal| and |letters| are the same font.
698
699 Math fonts in \LaTeX{} have the same five attributes as text fonts:
700 encoding, family, series, shape and size. However, there are no
701 commands that allow the attributes to be individually changed. Instead,
702 the conversion from math fonts to these five attributes is controlled by
703 the \emph{math version}. For example, the |normal| math version maps:
704 \begin{center}
705 \begin{tabular}{rlc@{ }c@{ }c@{ }c}
706 \multicolumn{2}{c}{\emph{Math font}} &
707 \multicolumn{4}{c}{\emph{External font}} \\
708 \emph{Alphabets} & \emph{Symbol fonts} &
709 \multicolumn{4}{c}{\emph{Attributes}} \\
710 |\mathnormal| & |letters| & |OML| & |cmm| & |m| & |it| \\
711 |\mathrm| & |operators| & |OT1| & |cmr| & |m| & |n| \\
712 |\mathcal| & |symbols| & |OMS| & |cmsy| & |m| & |n| \\
713 & |largesymbols| & |OMX| & |cmex| & |m| & |n| \\
714 |\mathbf| & & |OT1| & |cmr| & |bx| & |n| \\
715 |\mathsf| & & |OT1| & |cmss| & |m| & |n| \\
716 |\mathit| & & |OT1| & |cmr| & |m| & |it| \\
717 |\mathtt| & & |OT1| & |cmtt| & |m| & |n|
718 \end{tabular}
719 \end{center}
720 The |bold| math version is similar except that it contains bold fonts.
721 The command |\boldmath| selects the |bold| math version.
722
723 Math versions can only be changed outside of math mode.
724
725 The two predefined math versions are:
726 \begin{center}
727 \begin{tabular}{rl}
728 |normal| & the default math version \\
729 |bold| & the bold math version
730 \end{tabular}
731 \end{center}
732 Packages may define new math alphabets, math symbol fonts, and math
733 versions. This section describes the commands for writing such
734 packages.
735
736 \subsection{Selection commands}
737
738 There are no commands for selecting symbol fonts. Instead, these are
739 selected indirectly through symbol commands like |\oplus|.
740 Section~\ref{sec:math.commands} explains how to define symbol commands.
741
742 \begin{decl}
743 |\mathnormal{<math>}| \quad
744 |\mathcal{<math>}| \quad
745 |\mathbf{<math>}| \quad
746 |\mathit{<math>}| \\
747 |\mathrm{<math>}| \qquad
748 |\mathsf{<math>}| \qquad
749 |\mathtt{<math>}|
750 \end{decl}
751 Each math alphabet is a command which can only be used inside math mode.
752 For example, |$x + \mathsf{y} + \mathcal{Z}$| produces
753 $x + \mathsf{y} + \mathcal{Z}$.
754
755 \begin{decl}
756 |\mathversion{<version>}|
757 \end{decl}
758 This command selects a math version; it can only be used outside math
759 mode. For example, |\boldmath| is defined to be |\mathversion{bold}|.
760
761 \subsection{Declaring math versions}
762
763 \begin{decl}
764 |\DeclareMathVersion| \arg{version}
765 \end{decl}
766
767 Defines \m{version} to be a math version.
768
769 The newly declared version is initialized with the defaults for all
770 symbol fonts and math alphabets declared so far (see the commands
771 |\DeclareSymbolFont| and |\DeclareMathAlphabet|).
772
773 If used on an already existing version, an information message is
774 written to the transcript file and all previous |\SetSymbolFont| or
775 |\SetMathAlphabet| declarations for this version are overwritten by the
776 math alphabet and symbol font defaults, i.e.~one ends up with a virgin
777 math version.
778
779 Example:
780 \begin{verbatim}
781 \DeclareMathVersion{normal}
782 \end{verbatim}
783
784 \subsection{Declaring math alphabets}
785
786 \begin{decl}
787 |\DeclareMathAlphabet| \arg{math-alph} \arg{encoding} \arg{family}
788 \arg{series} \arg{shape}
789 \end{decl}
790
791 \NEWdescription{1997/12/01}
792 If this is the first declaration for \m{math-alph} then a new math
793 alphabet with this as its command name is created.
794
795 The arguments \m{encoding} \m{family} \m{series} \m{shape} are used to
796 set, or reset, the default values for this math alphabet in all math
797 versions; if required, these must be further reset later for a
798 particular math version by a |\SetMathAlphabet| command.
799
800 If \m{shape} is empty then this \m{math-alph} is declared to be invalid
801 in all versions, unless it is set by a later |\SetMathAlphabet| command
802 for a particular math version.
803
804 Checks that the command \m{math-alph} is either already a math alphabet
805 command or is undefined; and that \m{encoding} is a known encoding
806 scheme, i.e., has been previously declared.
807
808 In these examples, |\foo| is defined for all math versions but |\baz|,
809 by default, is defined nowhere.
810 \begin{verbatim}
811 \DeclareMathAlphabet{\foo}{OT1}{cmtt}{m}{n}
812 \DeclareMathAlphabet{\baz}{OT1}{}{}{}
813 \end{verbatim}
814
815
816 \begin{decl}
817 |\SetMathAlphabet| \arg{math-alph} \arg{version}\\
818 \null\hfill \arg{encoding} \arg{family} \arg{series} \arg{shape}
819 \end{decl}
820
821 Changes, or sets, the font for the math alphabet \m{math-alph} in math
822 version \m{version} to \m{encoding}\m{family}\m{series}\m{shape}.
823
824 Checks that \m{math-alph} has been declared as a math alphabet,
825 \m{version} is a known math version and \m{encoding} is a known encoding
826 scheme.
827
828 \newpage
829
830 This example defines |\baz| for the `normal' math version only:
831 \begin{verbatim}
832 \SetMathAlphabet{\baz}{normal}{OT1}{cmss}{m}{n}
833 \end{verbatim}
834
835 Note that this declaration is not used for all math alphabets:
836 Section~\ref{sec:symalph} describes |\DeclareSymbolFontAlphabet|, which
837 is used to set up math alphabets contained in fonts which have been
838 declared as symbol fonts.
839
840 \subsection{Declaring symbol fonts}
841 \label{sec:symalph}
842
843 \begin{decl}
844 |\DeclareSymbolFont| \arg{sym-font} \arg{encoding} \arg{family}
845 \arg{series} \arg{shape}
846 \end{decl}
847
848 \NEWdescription{1997/12/01}
849 If this is the first declaration for \m{sym-font} then a new symbol font
850 with this name is created (i.e.~this identifier is assigned to a new
851 \TeX{} math group).
852
853 The arguments \m{encoding} \m{family} \m{series} \m{shape} are used to
854 set, or reset. the default values for this symbol font in \emph{all}
855 math versions; if required, these must be further reset later for a
856 particular math version by a |\SetSymbolFont| command.
857
858 Checks that \m{encoding} is a declared encoding scheme.
859
860 For example, the following sets up the first four standard math symbol
861 fonts:
862 \begin{verbatim}
863 \DeclareSymbolFont{operators}{OT1}{cmr}{m}{n}
864 \DeclareSymbolFont{letters}{OML}{cmm}{m}{it}
865 \DeclareSymbolFont{symbols}{OMS}{cmsy}{m}{n}
866 \DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}
867 \end{verbatim}
868
869 \begin{decl}
870 |\SetSymbolFont| \arg{sym-font} \arg{version}\\
871 \null\hfill \arg{encoding} \arg{family} \arg{series} \arg{shape}
872 \end{decl}
873
874 Changes the symbol font \m{sym-font} for math version \m{version} to
875 \m{encoding} \m{family} \m{series} \m{shape}.
876
877 Checks that \m{sym-font} has been declared as a symbol font, \m{version}
878 is a known math version and \m{encoding} is a declared encoding scheme.
879
880 For example, the following come from the set up of the `bold' math
881 version:
882 \begin{verbatim}
883 \SetSymbolFont{operators}{bold}{OT1}{cmr}{bx}{n}
884 \SetSymbolFont{letters}{bold}{OML}{cmm}{b}{it}
885 \end{verbatim}
886
887
888 \begin{decl}
889 |\DeclareSymbolFontAlphabet| \arg{math-alph} \arg{sym-font}
890 \end{decl}
891
892 \NEWdescription{1997/12/01}
893 Allows the previously declared symbol font \m{sym-font} to be the math
894 alphabet with command \m{math-alph} in \emph{all} math versions.
895
896 Checks that the command \m{math-alph} is either already a math alphabet
897 command or is undefined; and that \m{sym-font} is a symbol font.
898
899 \newpage
900
901 Example:
902 \begin{verbatim}
903 \DeclareSymbolFontAlphabet{\mathrm}{operators}
904 \DeclareSymbolFontAlphabet{\mathcal}{symbols}
905 \end{verbatim}
906
907 This declaration should be used in preference to |\DeclareMathAlphabet|
908 and |\SetMathAlphabet| when a math alphabet is the same as a symbol
909 font; this is because it makes better use of the limited number (only
910 16) of \TeX's math groups.
911
912 \NEWdescription{1997/12/01}
913 Note that, whereas a \TeX{} math group is allocated to each symbol font
914 when it is first declared, a math alphabet uses a \TeX{} math group only
915 when its command is used within a math formula.
916
917 \subsection{Declaring math symbols}
918 \label{sec:math.commands}
919
920 \begin{decl}
921 |\DeclareMathSymbol| \arg{symbol} \arg{type} \arg{sym-font}
922 \arg{slot}
923 \end{decl}
924
925 The \m{symbol} can be either a single character such as `|>>|', or a
926 macro name, such as |\sum|.
927
928 Defines the \m{symbol} to be a math symbol of type \m{type} in slot
929 \m{slot} of symbol font \m{sym-font}. The \m{type} can be given as a
930 number or as a command:
931 \begin{center}
932 \begin{tabular}{ccc}
933 \emph{Type} & \emph{Meaning} & \emph{Example} \\
934 |0| or |\mathord | & Ordinary & $\alpha$ \\
935 |1| or |\mathop | & Large operator & $\sum$ \\
936 |2| or |\mathbin | & Binary operation & $\times$ \\
937 |3| or |\mathrel | & Relation & $\leq$ \\
938 |4| or |\mathopen | & Opening & $\langle$ \\
939 |5| or |\mathclose| & Closing & $\rangle$ \\
940 |6| or |\mathpunct| & Punctuation & $;$ \\
941 |7| or |\mathalpha| & Alphabet character & $A$
942 \end{tabular}
943 \end{center}
944 Only symbols of type |\mathalpha| will be affected by math alphabet
945 commands: within the argument of a math alphabet command they will
946 produce the character in slot \m{slot} of that math alphabet's font.
947 Symbols of other types will always produce the same symbol (within one
948 math version).
949
950 |\DeclareMathSymbol| allows a macro \m{symbol} to be redefined only if
951 it was previously defined to be a math symbol. It also checks that the
952 \m{sym-font} is a declared symbol font.
953
954 Example:
955 \begin{verbatim}
956 \DeclareMathSymbol{\alpha}{0}{letters}{"0B}
957 \DeclareMathSymbol{\lessdot}{\mathbin}{AMSb}{"0C}
958 \DeclareMathSymbol{\alphld}{\mathalpha}{AMSb}{"0C}
959 \end{verbatim}
960
961
962 \begin{decl}
963 |\DeclareMathDelimiter| \arg{cmd} \arg{type}
964 \arg{sym-font-1} \arg{slot-1}\\
965 \null\hfill \arg{sym-font-2} \arg{slot-2}
966 \end{decl}
967 Defines \m{cmd} to be a math delimiter where the small variant is in
968 slot \m{slot-1} of symbol font \m{sym-font-1} and the large variant is
969 in slot \m{slot-2} of symbol font \m{sym-font-2}. Both symbol fonts
970 must have been declared previously.
971
972 Checks that \m{sym-font-i} are both declared symbol fonts.
973
974 If \TeX{} is not looking for a delimiter, \m{cmd} is treated just as if
975 it had been defined with |\DeclareMathSymbol| using \m{type},
976 \m{sym-font-1} and \m{slot-1}. In other words, if a command is defined
977 as a delimiter then this automatically defines it as a math symbol.
978
979 \NEWdescription{1998/06/01}
980 In case \m{cmd} is a single character such as `|[|', the same syntax is
981 used. Previously the \arg{type} argument was not present (and thus the
982 corresponding math symbol declaration had to be provided separately).
983
984 Example:
985 \begin{verbatim}
986 \DeclareMathDelimiter{\langle}{\mathopen}{symbols}{"68}
987 {largesymbols}{"0A}
988 \DeclareMathDelimiter{(} {\mathopen}{operators}{"28}
989 {largesymbols}{"00}
990 \end{verbatim}
991
992
993 \begin{decl}
994 |\DeclareMathAccent| \arg{cmd} \arg{type} \arg{sym-font} \arg{slot}
995 \end{decl}
996
997 Defines \m{cmd} to act as a math accent.
998
999 The accent character comes from slot \m{slot} in \m{sym-font}. The
1000 \m{type} can be either |\mathord| or |\mathalpha|; in the latter case
1001 the accent character changes font when used in a math alphabet.
1002
1003 Example:
1004 \begin{verbatim}
1005 \DeclareMathAccent{\acute}{\mathalpha}{operators}{"13}
1006 \DeclareMathAccent{\vec}{\mathord}{letters}{"7E}
1007 \end{verbatim}
1008
1009
1010 \begin{decl}
1011 |\DeclareMathRadical| \arg{cmd}
1012 \arg{sym-font-1} \arg{slot-1}\\
1013 \null\hfill \arg{sym-font-2} \arg{slot-2}
1014 \end{decl}
1015
1016 Defines \m{cmd} to be a radical where the small variant is in slot
1017 \m{slot-1} of symbol font \m{sym-font-1} and the large variant is in
1018 slot \m{slot-2} of symbol font \m{sym-font-2}. Both symbol fonts must
1019 have been declared previously.
1020
1021 Example (probably the only use for it!):
1022 \begin{verbatim}
1023 \DeclareMathRadical{\sqrt}{symbols}{"70}{largesymbols}{"70}
1024 \end{verbatim}
1025
1026 \subsection{Declaring math sizes}
1027
1028 \begin{decl}
1029 |\DeclareMathSizes| \arg{t-size} \arg{mt-size} \arg{s-size}
1030 \arg{ss-size}
1031 \end{decl}
1032
1033 Declares that \m{mt-size} is the (main) math text size, \m{s-size} is
1034 the `script' size and \m{ss-size} the `scriptscript' size to be used in
1035 math, when \m{t-size} is the current text size. For text sizes for which
1036 no such declaration is given the `script' and `scriptscript' size will
1037 be calculated and then fonts are loaded for the calculated sizes or the
1038 best approximation (this may result in a warning message).
1039
1040 Normally, \m{t-size} and \m{mt-size} will be identical; however, if, for
1041 example, PostScript text fonts are mixed with bit-map math fonts then
1042 you may not have available a \m{mt-size} for every \m{t-size}.
1043
1044 Example:
1045 \begin{verbatim}
1046 \DeclareMathSizes{13.82}{14.4}{10}{7}
1047 \end{verbatim}
1048
1049 \subsection{Declaring math script fonts}
1050
1051 \begin{decl}
1052 |\DeclareMathScriptfontMapping| \arg{t-enc} \arg{t-family}
1053 \arg{s-enc} \arg{s-family}
1054 \arg{ss-enc} \arg{ss-family}
1055 \end{decl}
1056
1057 Declares that the font family \m{s-family} in encoding \m{s-enc} should
1058 be used in `script' position and \m{ss-family} in encoding \m{ss-enc}
1059 in `scriptscript' encoding should be used in `scriptscript' positions
1060 whenever \arg{t-family} is selected in encoding \m{t-enc} as a math font.
1061
1062 If no such declaration is given for a \arg{t-enc}/\arg{t-family} pair then
1063 different sizes of the same font are used in all `text', `script', and
1064 `scriptscript' positions.
1065 In either case, the sizes are specified through a |\DeclareMathSizes|
1066 declaration.
1067
1068 Example:
1069 \begin{verbatim}
1070 \DeclareMathScriptfontMapping{OML}{cmm}{OML}{cmm-script}{OML}{cmm-scriptscript}
1071 \end{verbatim}
1072
1073 \section{Font installation}
1074 \label{sec:install}
1075
1076 This section explains how \LaTeX's font attributes are turned into
1077 \TeX{} font specifications.
1078
1079
1080 \subsection{Font definition files}
1081
1082 \NEWdescription{1997/12/01}
1083 The description of how \LaTeX{} font attributes are turned into \TeX{}
1084 fonts is usually kept in a \emph{font definition file} (|.fd|). The
1085 file for family \m{family} in encoding \m{ENC} must be called
1086 |<enc><family>.fd|: for example, |ot1cmr.fd| for Computer Modern Roman
1087 with encoding |OT1| or |t1ptm.fd| for Adobe Times with encoding |T1|.
1088 Note that encoding names are converted to lowercase when used as part of
1089 file names.
1090
1091 Whenever \LaTeX{} encounters an encoding/family combination that it does
1092 not know (e.g.~if the document designer says
1093 |\fontfamily{ptm}\selectfont|) then \LaTeX{} attempts to load the
1094 appropriate |.fd| file. ``Not known'' means: there was no
1095 |\DeclareFontFamily| declaration issued for this encoding/family
1096 combination. If the |.fd| file could not be found, a warning is issued
1097 and font substitutions are made.
1098
1099 The declarations in the font definition file are responsible for telling
1100 \LaTeX{} how to load fonts for that encoding/family combination.
1101
1102
1103
1104 \subsection{Font definition file commands}
1105
1106 \emph{Note}: A font definition file should contain only commands from
1107 this subsection.
1108
1109 Note that these commands can also be used outside a font definition
1110 file: they can be put in package or class files, or even in the preamble
1111 of a document.
1112
1113 \begin{decl}
1114 |\ProvidesFile{<file-name>}[<release-info>]|
1115 \end{decl}
1116 The file should announce itself with a |\ProvidesFile| command, as
1117 described in \emph{\clsguide}.
1118
1119 \newpage
1120
1121 For example:
1122 \begin{verbatim}
1123 \ProvidesFile{t1ptm.fd}[1994/06/01 Adobe Times font definitions]
1124 \end{verbatim}
1125
1126 Spaces within the arguments specific to font definition files are
1127 ignored to avoid surplus spaces in the document. If a real space is
1128 necessary use |\space|.
1129 \NEWdescription{2004/02/10}
1130 However, note that this is only true if the declaration is made at top
1131 level! If used within the definition of another command, within
1132 |\AtBeginDocument|, option code or in similar places, then spaces within
1133 the argument will remain and may result in incorrect table entries.
1134
1135 \begin{decl}
1136 |\DeclareFontFamily| \arg{encoding} \arg{family} \arg{loading-settings}
1137 \end{decl}
1138
1139 Declares a font family \m{family} to be available in encoding scheme
1140 \m{encoding}.
1141
1142 The \m{loading-settings} are executed immediately after loading any font
1143 with this encoding and family.
1144
1145 Checks that \m{encoding} was previously declared.
1146
1147 This example refers to the Computer Modern Typewriter font family in the
1148 Cork encoding:
1149 \begin{verbatim}
1150 \DeclareFontFamily{T1}{cmtt}{\hyphenchar\font=-1}
1151 \end{verbatim}
1152
1153 Each |.fd| file should contain exactly one |\DeclareFontFamily| command,
1154 and it should be for the appropriate encoding/family combination.
1155
1156 \begin{decl}
1157 |\DeclareFontShape| \arg{encoding} \arg{family} \arg{series}
1158 \arg{shape}\\
1159 \null\hfill \arg{loading-info} \arg{loading-settings}
1160 \end{decl}
1161
1162 Declares a font shape combination; here \m{loading-info} contains the
1163 information that combines sizes with external fonts. The syntax is
1164 complex and is described in Section~\ref{sec:loadinfo} below.
1165
1166 The \m{loading-settings} are executed after loading any font with this
1167 font shape. They are executed immediately after the `loading-settings'
1168 which were declared by |\DeclareFontFamily| and so they can be used to
1169 overwrite the settings made at the family level.
1170
1171 Checks that the combination \m{encoding}\m{family} was previously
1172 declared via |\DeclareFontFamily|.
1173
1174 Example:
1175 \begin{verbatim}
1176 \DeclareFontShape{OT1}{cmr}{m}{sl}{%
1177 <<5-8>> sub * cmr/m/n
1178 <<8>> cmsl8
1179 <<9>> cmsl9
1180 <<10>> <<10.95>> cmsl10
1181 <<12>> <<14.4>> <<17.28>> <<20.74>> <<24.88>> cmsl12
1182 }{}
1183 \end{verbatim}
1184 The file can contain any number of |\DeclareFontShape| commands, which
1185 should be for the appropriate \m{encoding} and \m{family}.
1186
1187 \NEWfeature{1996/06/01}
1188 The font family declarations for the |OT1|-encoded fonts now all
1189 contain:
1190 \begin{verbatim}
1191 \hyphenchar\font=`\-
1192 \end{verbatim}
1193 This enables the use of an alternative |\hyphenchar| in other encodings
1194 whilst maintaining the correct value for all fonts.
1195
1196 \NEWfeature{2020/02/02} According to NFSS conventions the series value
1197 should be a combination of weight and width abbreviated each with one or
1198 two letters as described on page~\pageref{page:seriesvalues}. In
1199 particular it should not contain an ``\texttt{m}'' unless it
1200 consists of just one character. In the past incorrect values such as
1201 ``\texttt{cm}'' were simply accepted, but since this now leads to
1202 problems with the extended mechanism, the correct syntax is now
1203 enforced.
1204
1205 More exactly, if the series values is a member of a specific set of
1206 values (\texttt{ulm}, \texttt{elm}, \texttt{lm}, \texttt{slm},
1207 \texttt{mm}, \texttt{sbm}, \texttt{bm}, \texttt{ebm}, \texttt{ubm},
1208 \texttt{muc}, \texttt{mec}, \texttt{mc}, \texttt{msc}, \texttt{msx},
1209 \texttt{mx}, \texttt{mex} or \texttt{mux}) it is assumed to be in
1210 incorrect NFSS notation and so a warning is given and a surplus
1211 ``\texttt{m}'' is dropped. Other values are not touched to allow for
1212 the usage of values like ``\texttt{semibold}'' or ``\texttt{medium}'' as
1213 used by the \texttt{autoinst} program.
1214
1215
1216 \subsection{Font file loading information}
1217 \label{sec:loadinfo}
1218
1219 The information which tells \LaTeX{} exactly which font (\texttt{.tfm})
1220 files to load is contained in the \m{loading-info} part of a
1221 |\DeclareFontShape| declaration. This part consists of one or more
1222 \m{fontshape-decl}s, each of which has the following form:
1223
1224 \begin{center}
1225 \begin{tabular}{r@{ $::=$ }l}
1226 \m{fontshape-decl} & \m{size-infos} \m{font-info} \\
1227 \m{size-infos} & \m{size-infos} \m{size-info} $\mid$
1228 \m{size-info} \\
1229 \m{size-info} & ``|<<|'' \m{number-or-range} ``|>>|'' \\
1230 \m{font-info} & $[$ \m{size-function} ``|*|'' $]$
1231 $[$ ``|[|'' \m{optarg} ``|]|'' $]$ \m{fontarg} \\
1232 \end{tabular}
1233 \end{center}
1234 The \m{number-or-range} denotes the size or size-range for which this
1235 entry applies.
1236
1237 If it contains a hyphen it is a range: lower bound on the left (if
1238 missing, zero implied), upper bound on the right (if missing, $\infty$
1239 implied). For ranges, the upper bound is \emph{not} included in the
1240 range and the lower bound is.
1241
1242 Examples:
1243 \begin{center}
1244 \begin{tabular}{lll}
1245 |<<10>>| & simple size & 10pt only \\
1246 |<<-8>>| & range & all sizes less than 8pt \\
1247 |<<8-14.4>>| & range & all sizes greater than or equal to 8pt \\
1248 & & \ but less than 14.4pt \\
1249 |<<14.4->>| & range & all sizes greater than or equal 14.4pt
1250 \end{tabular}
1251 \end{center}
1252 If more than one \m{size-info} entry follows without any intervening
1253 \m{font-info}, they all share the next \m{font-info}.
1254
1255 The \m{size-function}, if present, handles the use of \m{font-info}. If
1256 not present, the `empty' \m{size-function} is assumed.
1257
1258 All the \m{size-info}s are inspected in the order in which they appear
1259 in the font shape declaration. If a \m{size-info} matches the requested
1260 size, its \m{size-function} is executed. If |\external@font| is
1261 non-empty afterwards this process stops, otherwise the next
1262 \m{size-info} is inspected. (See also |\DeclareSizeFunction|.)
1263
1264 If this process does not lead to a non-empty |\external@font|, \LaTeX{}
1265 tries the nearest simple size. If the entry contains only ranges an
1266 error is returned.
1267
1268 \subsection{Size functions}
1269 \label{sec:sizefunct}
1270
1271 \LaTeX{} provides the following size functions, whose `inputs' are
1272 \m{fontarg} and \m{optarg} (when present).
1273
1274 \begin{description}
1275 \item[`' (empty)]
1276 Load the external font \m{fontarg} at the user-requested size. If
1277 \m{optarg} is present, it is used as the scale-factor.
1278
1279 \item[s]
1280 Like the empty function but without terminal warnings, only
1281 loggings.
1282
1283 \item[gen]
1284 Generates the external font from \m{fontarg} followed by the
1285 user-requested size, e.g.~|<<8>> <<9>> <<10>> gen * cmtt|
1286
1287 \item[sgen]
1288 Like the `gen' function but without terminal warnings, only loggings.
1289
1290 \item[genb]
1291 \NEWfeature{1995/12/01}
1292 Generates the external font from \m{fontarg} followed by the
1293 user-requested size, using the conventions of the `ec' fonts.
1294 e.g.~|<<10.98>> genb * dctt| produces |dctt1098|.
1295
1296 \item[sgenb]
1297 \NEWfeature{1995/12/01}
1298 Like the `genb' function but without terminal warnings, only loggings.
1299
1300 \item[sub]
1301 Tries to load a font from a different font shape declaration given by
1302 \m{fontarg} in the form \m{family}|/|\m{series}|/|\m{shape}.
1303
1304 \item[ssub]
1305 Silent variant of `sub', only loggings.
1306
1307 \item[alias]
1308 \NEWfeature{2019/10/15}
1309 Same as `ssub' but with a different logging message. Intended for
1310 cases where the substitution is only done to change the name, e.g.,
1311 going from \texttt{regular} series to the official name \texttt{m}. In
1312 that case given a warning that some shape is not found is not correct.
1313
1314 \item[subf]
1315 Like the empty function but issues a warning that it has to substitute
1316 the external font \m{fontarg} because the desired font shape was not
1317 available in the requested size.
1318
1319 \item[ssubf]
1320 Silent variant of `subf', only loggings.
1321
1322 \item[fixed]
1323 Load font \m{fontarg} as is, disregarding the user-requested size. If
1324 present, \m{optarg} gives the ``at \ldots pt'' size to be used.
1325
1326 \item[sfixed]
1327 Silent variant of `fixed', only loggings.
1328 \end{description}
1329
1330 Examples for the use of most of the above size functions can be found in
1331 the file |cmfonts.fdd|---the source for the standard |.fd| files
1332 describing the Computer Modern fonts by Donald Knuth.
1333
1334
1335 \begin{decl}
1336 |\DeclareSizeFunction| \arg{name} \arg{code}
1337 \end{decl}
1338
1339 Declares a size-function \m{name} for use in |\DeclareFontShape|
1340 commands. The interface is still under development but there should be
1341 no real need to a define new size functions.
1342
1343 The \m{code} is executed when the size or size-range in
1344 |\DeclareFontShape| matches the user-requested size.
1345
1346 The arguments of the size-function are automatically parsed and placed
1347 into |\mandatory@arg| and |\optional@arg| for use in \m{code}. Also
1348 available, of course, is |\f@size|, which is the user-requested size.
1349
1350 To signal success \m{code} must define the command |\external@font| to
1351 contain the external name and any scaling options (if present) for the
1352 font to be loaded.
1353
1354 This example sets up the `empty' size function (simplified):
1355 \begin{verbatim}
1356 \DeclareSizeFunction{}
1357 {\edef\external@font{\mandatory@arg\space at\f@size}
1358 \end{verbatim}
1359
1360
1361 \section{Encodings}
1362 \label{sec:encode}
1363
1364 This section explains how to declare and use new font encodings and how
1365 to declare commands for use with particular encodings.
1366
1367 \subsection{The \textsf{fontenc} package}
1368
1369 Users can select new font encodings using the |fontenc| package. The
1370 |fontenc| package has options for encodings; the last option becomes the
1371 default encoding. For example, to use the |OT2| (Washington University
1372 Cyrillic encoding) and |T1| encodings, with |T1| as the default, an
1373 author types:
1374 \begin{verbatim}
1375 \usepackage[OT2,T1]{fontenc}
1376 \end{verbatim}
1377
1378 \NEWdescription{1997/12/01}
1379 For each font encoding \m{ENC} given as an option, this package loads
1380 the \emph{encoding definition} (|<enc>enc.def|, with an all lower-case
1381 name) file; it also sets |\encodingdefault| to be the last encoding in
1382 the option list.
1383
1384 The declarations in the encoding definition file |<enc>enc.def| for
1385 encoding \m{ENC} are responsible for declaring this encoding and telling
1386 \LaTeX{} how to produce characters in this encoding; this file should
1387 contain nothing else (see Section~\ref{sec:encode.def}.
1388
1389 The standard \LaTeX{} format declares the |OT1| and |T1| text encodings
1390 by inputting the files |ot1enc.def| and |t1enc.def|; it also sets up
1391 various defaults which require that |OT1|-encoded fonts are available.
1392 Other encoding set-ups might be added to the distribution at a later
1393 stage.
1394
1395 Thus the example above loads the files |ot2enc.def| and |t1enc.def| and
1396 sets |\encodingdefault| to |T1|.
1397
1398 \emph{Warning}: If you wish to use |T1|-encoded fonts other than the
1399 `cmr' family then you may need to load the package (e.g.~\texttt{times})
1400 that selects the fonts \emph{before} loading \texttt{fontenc} (this
1401 prevents the system from attempting to load any |T1|-encoded fonts from
1402 the `cmr' family).
1403
1404 \subsection{Encoding definition file commands}
1405 \label{sec:encode.def}
1406
1407 \emph{Note}: An encoding definition file should contain only commands
1408 from this subsection.
1409
1410 \NEWdescription{2019/07/10}
1411 As an exception it may also contain a |\DeclareFontSubstitution|
1412 declaration (described in \ref{sec:encoding-defaults}) to specify how
1413 font substitution for this encoding should be handled. In that case it
1414 is important that the values used point to a font that is guaranteed to
1415 be available on all \LaTeX{} installations.\footnote{If the font
1416 encoding file is made available as part of a CTAN bundle, that could
1417 be a font that is provided together with that bundle, but it should
1418 not point to font which requires further installation steps and
1419 therefore may or may not be installed.}
1420
1421 \NEWdescription{1997/12/01}
1422 As with the font definition file commands, it is also possible (although
1423 normally not necessary) to use these declarations directly within a
1424 class or package file.
1425
1426 \emph{Warning}: Some aspects of the contents of font definition files
1427 are still under development. Therefore, the current versions of the
1428 files |ot1enc.def| and |t1enc.def| are temporary versions and should not
1429 be used as models for producing further such files. For further
1430 information you should read the documentation in |ltoutenc.dtx|.
1431
1432 \begin{decl}
1433 |\ProvidesFile{<file-name>}[<release-info>]|
1434 \end{decl}
1435 The file should announce itself with a |\ProvidesFile| command,
1436 described in \emph{\clsguide}. For example:
1437 \begin{verbatim}
1438 \ProvidesFile{ot2enc.def}
1439 [1994/06/01 Washington University Cyrillic encoding]
1440 \end{verbatim}
1441
1442
1443 \begin{decl}
1444 |\DeclareFontEncoding| \arg{encoding} \arg{text-settings}
1445 \arg{math-settings}
1446 \end{decl}
1447
1448 Declares a new encoding scheme \m{encoding}.
1449
1450 The \m{text-settings} are declarations which are executed every time
1451 |\selectfont| changes the encoding to be \m{encoding}.
1452
1453 The \m{math-settings} are similar but are for math alphabets. They are
1454 executed whenever a math alphabet with this encoding is called.
1455
1456 \NEWfeature{1998/12/01}
1457 It also saves the value of \m{encoding} in the macro
1458 |\LastDeclaredEncoding|.
1459
1460 \newpage
1461
1462 Example:
1463 \begin{verbatim}
1464 \DeclareFontEncoding{OT1}{}{}
1465 \end{verbatim}
1466
1467 \NEWfeature{2021/06/01}
1468 Fonts in encoding \texttt{TS1} are usually not implementing the full encoding but only a subset.
1469 This subset should be declared with a |\DeclareEncodingSubset|
1470 declaration:
1471
1472 \begin{decl}
1473 |\DeclareEncodingSubset| \arg{encoding}
1474 \arg{font family}
1475 \arg{subset number}
1476 \end{decl}
1477 This should even be done if the font is implementing the full
1478 \texttt{TS1} encoding; see page~\pageref{page:declareencodingsubset} for
1479 further details.
1480
1481 Some author commands need to change their definition depending on which
1482 encoding is currently in use. For example, in the |OT1| encoding, the
1483 letter `\AE' is in slot |"1D|, whereas in the |T1| encoding it is in
1484 slot |"C6|. So the definition of |\AE| has to change depending on
1485 whether the current encoding is |OT1| or |T1|. The following commands
1486 allow this to happen.
1487
1488 \begin{decl}
1489 |\DeclareTextCommand| \arg{cmd} \arg{encoding}
1490 \oarg{num} \oarg{default} \arg{definition}
1491 \end{decl}
1492 This command is like |\newcommand|, except that it defines a command
1493 which is specific to one encoding. For example, the definition of |\k|
1494 in the |T1| encoding is:
1495 \begin{verbatim}
1496 \DeclareTextCommand{\k}{T1}[1]
1497 {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\char12}\egroup}
1498 \end{verbatim}
1499 |\DeclareTextCommand| takes the same optional arguments as
1500 |\newcommand|.
1501
1502 The resulting command is robust, even if the code in \m{definition} is
1503 fragile.
1504
1505 It does not produce an error if the command has already been defined but
1506 logs the redefinition in the transcript file.
1507
1508 \begin{decl}[1994/12/01]
1509 |\ProvideTextCommand| \arg{cmd} \arg{encoding}
1510 \oarg{num} \oarg{default} \arg{definition}
1511 \end{decl}
1512 This command is the same as |\DeclareTextCommand|, except that if
1513 \m{cmd} is already defined in encoding \m{encoding}, then the definition
1514 is ignored.
1515
1516 \begin{decl}
1517 |\DeclareTextSymbol| \arg{cmd} \arg{encoding} \arg{slot}
1518 \end{decl}
1519 This command defines a text symbol with slot \m{slot} in the encoding.
1520 For example, the definition of |\ss| in the |OT1| encoding is:
1521 \begin{verbatim}
1522 \DeclareTextSymbol{\ss}{OT1}{25}
1523 \end{verbatim}
1524 It does not produce an error if the command has already
1525 been defined but logs the redefinition in the transcript file.
1526
1527 \newpage
1528
1529 \begin{decl}
1530 |\DeclareTextAccent| \arg{cmd} \arg{encoding} \arg{slot}
1531 \end{decl}
1532 This command declares a text accent, with the accent taken from slot
1533 \m{slot} in the encoding. For example, the definition of |\"| in the
1534 |OT1| encoding is:
1535 \begin{verbatim}
1536 \DeclareTextAccent{\"}{OT1}{127}
1537 \end{verbatim}
1538 It does not produce an error if the command has already been defined but
1539 logs the redefinition in the transcript file.
1540
1541 \begin{decl}
1542 |\DeclareTextComposite| \arg{cmd} \arg{encoding} \arg{letter}
1543 \arg{slot}
1544 \end{decl}
1545 This command declares that the composite letter formed from applying
1546 \m{cmd} to \m{letter} is defined to be simply slot \m{slot} in the
1547 encoding. The \m{letter} should be a single letter (such as |a|) or a
1548 single command (such as |\i|).
1549
1550 For example, the definition of |\'{a}| in the |T1| encoding could be
1551 declared like this:
1552 \begin{verbatim}
1553 \DeclareTextComposite{\'}{T1}{a}{225}
1554 \end{verbatim}
1555
1556 The \m{cmd} will normally have been previously declared for this
1557 encoding, either by using |\DeclareTextAccent|, or as a one-argument
1558 |\DeclareTextCommand|.
1559
1560 \begin{decl}[1994/12/01]
1561 |\DeclareTextCompositeCommand| \arg{cmd} \arg{encoding} \arg{letter}
1562 \arg{definition}
1563 \end{decl}
1564 This is a more general form of |\DeclareTextComposite|, which allows for
1565 an arbitrary \m{definition}, not just a \m{slot}. The main use for this
1566 is to allow accents on |i| to act like accents on |\i|, for example:
1567 \begin{verbatim}
1568 \DeclareTextCompositeCommand{\'}{OT1}{i}{\'\i}
1569 \end{verbatim}
1570 It has the same restrictions as |\DeclareTextComposite|.
1571
1572
1573 \begin{decl}[1998/12/01]
1574 |\LastDeclaredEncoding|
1575 \end{decl}
1576 This holds the name of the last encoding declared via
1577 |\DeclareFontEncoding| (this should also be the currently most efficient
1578 encoding). It can be used in the \m{encoding} argument of the above
1579 declarations in place of explicitly mentioning the encoding, e.g.
1580 \begin{verbatim}
1581 \DeclareFontEncoding{T1}{}{}
1582 \DeclareTextAccent{\`}{\LastDeclaredEncoding}{0}
1583 \DeclareTextAccent{\'}{\LastDeclaredEncoding}{1}
1584 \end{verbatim}
1585 This can be useful in cases where encoding files sharing common code
1586 are generated from one source.
1587
1588 \subsection{Default definitions}
1589
1590 \NEWdescription{1997/12/01}
1591 The declarations used in encoding definition files define
1592 encoding-specific commands but they do not allow those commands to be
1593 used without explicitly changing the encoding. For some commands, such
1594 as symbols, this is not enough. For example, the~|OMS| encoding
1595 contains the symbol~`\S', but we need to be able to use the command~|\S|
1596 whatever the current encoding may be, without explicitly selecting the
1597 encoding~|OMS|.
1598
1599 \NEWdescription{1997/12/01}
1600 To allow this, \LaTeX{} has commands that declare default definitions
1601 for commands; these defaults are used when the command is not defined in
1602 the current encoding. For example, the default encoding for~|\S|
1603 is~|OMS|, and so in an encoding (such as |OT1|) which does not
1604 contain~|\S|, the~|OMS| encoding is selected in order to access this
1605 glyph. But in an encoding (such as~|T1|) which does contain~|\S|, the
1606 glyph in that encoding is used. The standard \LaTeXe{} format sets up
1607 several such defaults using the following encodings: |OT1|,~|OMS|
1608 and~|OML|.
1609
1610 \emph{Warning}: These commands should \emph{not} occur in encoding
1611 definition files, since those files should declare only commands for use
1612 when that encoding has been selected. They should instead be placed in
1613 packages; they must, of course, always refer to encodings that are known
1614 to be available.
1615
1616 \begin{decl}[1994/12/01]
1617 |\DeclareTextCommandDefault| \arg{cmd} \arg{definition}
1618 \end{decl}
1619 This command allows an encoding-specific command to be given a default
1620 definition. For example, the default definition for |\copyright| is
1621 defined be a circled `c' with:
1622 \begin{verbatim}
1623 \DeclareTextCommandDefault{\copyright}{\textcircled{c}}
1624 \end{verbatim}
1625 \begin{decl}[1994/12/01]
1626 |\DeclareTextAccentDefault| \arg{cmd} \arg{encoding} \\
1627 |\DeclareTextSymbolDefault| \arg{cmd} \arg{encoding}
1628 \end{decl}
1629 These commands allow an encoding-specific command to be given a default
1630 encoding. For example, the default encoding for |\"| and |\ae| is set
1631 to be |OT1| by:
1632 \begin{verbatim}
1633 \DeclareTextAccentDefault{\"}{OT1}
1634 \DeclareTextSymbolDefault{\ae}{OT1}
1635 \end{verbatim}
1636 Note that |\DeclareTextAccentDefault| can be used on any one-argument
1637 encoding-specific command, not just those defined with
1638 |\DeclareTextAccent|. Similarly, |\DeclareTextSymbolDefault| can be
1639 used on any encoding-specific command with no arguments, not just those
1640 defined with |\DeclareTextSymbol|.
1641
1642 For more examples of these definitions, see |ltoutenc.dtx|.
1643
1644 \newpage
1645
1646 \begin{decl}[1994/12/01]
1647 |\ProvideTextCommandDefault| \arg{cmd} \arg{definition}
1648 \end{decl}
1649 This command is the same as |\DeclareTextCommandDefault|, except that if
1650 the command already has a default definition, then the definition is
1651 ignored. This is useful to give `faked' definitions of symbols which
1652 may be given `real' definitions by other packages. For example, a
1653 package might give a fake definition of |\textonequarter| by saying:
1654 \begin{verbatim}
1655 \ProvideTextCommandDefault{\textonequarter}{$\m@th\frac14$}
1656 \end{verbatim}
1657
1658 \subsection{Encoding defaults} \label{sec:encoding-defaults}
1659
1660 \begin{decl}
1661 |\DeclareFontEncodingDefaults| \arg{text-settings} \arg{math-settings}
1662 \end{decl}
1663
1664 Declares \m{text-settings} and \m{math-settings} for all encoding
1665 schemes. These are executed before the encoding scheme dependent ones
1666 are executed so that one can use the defaults for the major cases and
1667 overwrite them if necessary using |\DeclareFontEncoding|.
1668
1669 If |\relax| is used as an argument, the current setting of this default
1670 is left unchanged.
1671
1672 This example is used by amsfonts.sty for accent positioning; it changes
1673 only the math settings:
1674 \begin{verbatim}
1675 \DeclareFontEncodingDefaults{\relax}{\def\accentclass@{7}}
1676 \end{verbatim}
1677
1678
1679 \begin{decl}
1680 |\DeclareFontSubstitution| \arg{encoding} \arg{family} \arg{series}
1681 \arg{shape}
1682 \end{decl}
1683
1684 Declares the default values for font substitution which will be used
1685 when a font with encoding \m{encoding} should be loaded but no font can
1686 be found with the current attributes.
1687
1688 These substitutions are local to the encoding scheme because the
1689 encoding scheme is never substituted! They are tried in the order
1690 \m{shape} then \m{series} and finally \m{family}.
1691
1692 \NEWdescription{2019/07/10}
1693 This declaration is normally done in an encoding definition file
1694 (see~\ref{sec:encode.def}), but can also be used in a class file or the
1695 document preamble to alter the default for a specific encoding.
1696
1697 If no defaults are set up for an encoding, the values given by
1698 |\DeclareErrorFont| are used.
1699
1700 The font specification for \m{encoding}\m{family}\m{series}\m{shape}
1701 must have been defined by |\DeclareFontShape| before the
1702 |\begin{document}| is reached.
1703
1704 Example:
1705 \begin{verbatim}
1706 \DeclareFontSubstitution{T1}{cmr}{m}{n}
1707 \end{verbatim}
1708
1709 \subsection{Case changing}
1710 \label{sec:case}
1711
1712 \begin{decl}
1713 |\MakeUppercase| \arg{text} \\
1714 |\MakeLowercase| \arg{text}
1715 \end{decl}
1716
1717 \NEWfeature{1995/06/01}
1718 \TeX{} provides the two primitives |\uppercase| and |\lowercase| for
1719 changing the case of text. Unfortunately, these \TeX{} primitives do
1720 not change the case of characters accessed by commands like |\ae| or
1721 |\aa|. To overcome this problem, \LaTeX{} provides these two commands.
1722
1723 In the long run, we would like to use all-caps fonts rather than any
1724 command like |\MakeUppercase| but this is not possible at the moment
1725 because such fonts do not exist.
1726
1727 For further details, see \texttt{clsguide.tex}.
1728
1729 \NEWdescription{1999/04/23}
1730 In order that upper/lower-casing will work reasonably well, and in order
1731 to provide any correct hyphenation, \LaTeXe{} \emph{must} use,
1732 throughout a document, the same fixed table for changing case. The
1733 table used is designed for the font encoding |T1|; this works well with
1734 the standard \TeX{} fonts for all Latin alphabets but will cause
1735 problems when using other alphabets. As an experiment, it has now been
1736 extended for use with some Cyrillic encodings.
1737
1738 \section{Miscellanea}
1739 \label{sec:misc}
1740
1741 This section covers the remaining font commands in \LaTeX{} and some
1742 other issues.
1743
1744 \subsection{Font substitution}
1745
1746 \begin{decl}
1747 |\DeclareErrorFont| \arg{encoding} \arg{family} \arg{series}
1748 \arg{shape} \arg{size}
1749 \end{decl}
1750
1751 Declares \m{encoding}\m{family}\m{series}\m{shape} to be the font shape
1752 used in cases where the standard substitution mechanism fails
1753 (i.e.~would loop). For the standard mechanism see the command
1754 |\DeclareFontSubstitution| above.
1755
1756 The font specification for \m{encoding}\m{family}\m{series}\m{shape}
1757 must have been defined by |\DeclareFontShape| before the
1758 |\begin{document}| is reached.
1759
1760 Example:
1761 \begin{verbatim}
1762 \DeclareErrorFont{OT1}{cmr}{m}{n}{10}
1763 \end{verbatim}
1764
1765 \NEWdescription{2019/07/10}
1766 This declaration is a system wide fallback and it should normally not be
1767 changed, in particular it does not belong into font encoding definition
1768 files but rather into the \LaTeX{} format. It is normally set up in
1769 \texttt{fonttext.cfg}. Adjustments on a per encoding base should be made
1770 through |\DeclareFontSubstitution| instead!
1771
1772 \begin{decl}
1773 |\fontsubfuzz|
1774 \end{decl}
1775
1776 This parameter is used to decide whether or not to produce a terminal
1777 warning if a font size substitution takes place. If the difference
1778 between the requested and the chosen size is less than |\fontsubfuzz|
1779 the warning is only written to the transcript file. The default value is
1780 |0.4pt|. This can be redefined with |\renewcommand|, for example:
1781 \begin{verbatim}
1782 \renewcommand{\fontsubfuzz}{0pt} % always warn
1783 \end{verbatim}
1784
1785 \subsection{Preloading}
1786
1787 \begin{decl}
1788 |\DeclarePreloadSizes| \arg{encoding} \arg{family} \arg{series}
1789 \arg{shape}
1790 \arg{size-list}
1791 \end{decl}
1792
1793 Specifies the fonts that should be preloaded by the format. These
1794 commands should be put in a |preload.cfg| file, which is read in when
1795 the \LaTeX{} format is being built. Read |preload.dtx| for more
1796 information on how to built such a configuration file.
1797
1798 Example:
1799 \begin{verbatim}
1800 \DeclarePreloadSizes{OT1}{cmr}{m}{sl}{10,10.95,12}
1801 \end{verbatim}
1802
1803 \NEWdescription{2019/07/10}
1804 Preloading is really an artifact of the days when loading fonts while
1805 processing a document contributed substantially to the processing
1806 time. These days it is usually best not to use this mechanism any more.
1807
1808 \subsection{Accented characters}
1809
1810 \NEWdescription{1996/06/01}
1811 Accented characters in \LaTeX{} can be produced using commands such as
1812 |\"a| etc. The precise effect of such commands depends on the font
1813 encoding being used. When using a font encoding that contains the
1814 accented characters as individual glyphs (such as the |T1| encoding, in
1815 the case of |\"a|) words that contain such accented characters can be
1816 automatically hyphenated. For font encodings that do not contain the
1817 requested individual glyph (such as the |OT1| encoding) such a command
1818 invokes typesetting instructions that produce the accented character as
1819 a combination of character glyphs and diacritical marks in the font. In
1820 most cases this involves a call to the \TeX{} primitive |\accent|.
1821 Glyphs constructed as composites in this way inhibit hyphenation of the
1822 current word; this is one reason why the |T1| encoding is preferable to
1823 the original \TeX{} font encoding |OT1|.
1824
1825 It is important to understand that commands like |\"a| in \LaTeXe{}
1826 represent just a name for a single glyph (in this case `umlaut a') and
1827 contain no information about how to typeset that glyph---thus it does
1828 \emph{not} mean `put two dots on top of the character a'. The decision
1829 as to what typesetting routine to use will depend on the encoding of the
1830 current font and so this decision is taken at the last minute. Indeed,
1831 it is possible that the same input will be typeset in more than one way
1832 in the same document; for example, text in section headings may also
1833 appear in table of contents and in running heads; and each of these may
1834 use a font with a different encoding.
1835
1836 For this reason the notation |\"a| is \emph{not} equivalent to:
1837 \begin{verbatim}
1838 \newcommand \chara {a} \"\chara
1839 \end{verbatim}
1840 In the latter case, \LaTeX{} does not expand the macro |\chara| but
1841 simply compares the notation (the string |\"\chara|) to its list of
1842 known composite notations in the current encoding; when it fails to find
1843 |\"\chara| it does the best it can and invokes the typesetting
1844 instructions that put the umlaut accent on top of the expansion of
1845 |\chara|. Thus, even if the font actually contains `\"a' as an
1846 individual glyph, it will not be used.
1847
1848 The low-level accent commands in \LaTeX{} are defined in such a way that
1849 it is possible to combine a diacritical mark from one font with a glyph
1850 from another font; for example, |\"\textparagraph| will produce
1851 \"\textparagraph. The umlaut here is taken from the |OT1| encoded font
1852 |cmr10| whilst the paragraph sign is from the |OMS| encoded font
1853 |cmsy10|. (This example may be typographically silly but better ones
1854 would involve font encodings like |OT2| (Cyrillic) that might not be
1855 available at every site.)
1856
1857 There are, however, restrictions on the font-changing commands that will
1858 work within the argument to such an accent command. These are
1859 \TeX{}nical in the sense that they follow from the way that \TeX{}'s
1860 |\accent| primitive works, allowing only a special class of commands
1861 between the accent and the accented character.
1862
1863 The following are examples of commands that will not work correctly as
1864 the accent will appear above a space: the font commands with text
1865 arguments (|\textbf{...}| and friends); all the font size declarations
1866 (|\fontsize| and |\Large|, etc.); |\usefont| and declarations that
1867 depend on it, such as |\normalfont|; box commands (e.g.~|\mbox{...}|).
1868
1869 The lower-level font declarations that set the attributes family, series
1870 and shape (such as |\fontshape{sl}\selectfont|) will produce correct
1871 typesetting, as will the default declarations such as |\bfseries|.
1872
1873 \subsection{Naming conventions}
1874
1875 \begin{itemize}
1876 \item
1877 Math alphabet commands all start with |\math...|: examples are
1878 |\mathbf|, |\mathcal|, etc.
1879
1880 \item
1881 The text font changing commands with arguments all start with
1882 |\text...|: e.g.~|\textbf| and |\textrm|. The exception to this is
1883 |\emph|, since it occurs very commonly in author documents and so
1884 deserves a shorter name.
1885
1886 \item
1887 Names for encoding schemes are strings of up to three letters (all
1888 upper case) plus digits.
1889
1890 The \LaTeX\ Project reserves the use of encodings starting with the
1891 following letters: |T| (standard 256-long text encodings), |TS|
1892 (symbols that are designed to extend a corresponding |T| encoding),
1893 |X| (text encodings that do not conform to the strict requirements for
1894 |T| encodings), |M| (standard 256-long math encodings), |S| (other
1895 symbol encodings), |A| (other special applications), |OT| (standard
1896 128-long text encodings) and |OM| (standard 128-long math encodings).
1897
1898 Please do not use the above starting letters for non-portable
1899 encodings. If new standard encodings emerge then we shall add them in
1900 a later release of \LaTeX.
1901
1902 Encoding schemes which are local to a site or a system should start
1903 with |L|, experimental encodings intended for wide distribution will
1904 start with |E|, whilst |U| is for Unknown or Unclassified encodings.
1905
1906 \item
1907 \NEWdescription{2019/10/15}
1908 Font family names should contain only upper and lower case letters and
1909 hyphen characters. Where possible, these should conform to the
1910 \emph{Filenames for fonts} font naming scheme of the scheme
1911 implemented by \texttt{autoinst} with suffixes such as \texttt{-LF},
1912 \texttt{-OsF}, etc.\ to indicate different figure styles.
1913
1914 \item
1915 \NEWdescription{2019/10/15}
1916 Font series names should contain up to four lower case letters. If at
1917 all possible standard names as suggested in
1918 Section~\ref{sec:textfontattributes} should be used. Font specific
1919 names such as \texttt{regular} or \texttt{black}, etc.\ should be at
1920 least aliased to a corresponding standard name.
1921
1922 \item
1923 \NEWdescription{2019/10/15}
1924 Font shapes should contain up to four letters lower case. Use the
1925 names suggested in Section~\ref{sec:textfontattributes}.
1926
1927 \item
1928 Names for symbol fonts are built from lower and upper case letters
1929 with no restriction.
1930 \end{itemize}
1931
1932 Whenever possible, you should use the series and shape names suggested
1933 in \emph{\LaTeXcomp} since this will make it easier to combine new fonts
1934 with existing fonts.
1935
1936 \NEWdescription{1994/12/01}
1937 Where possible, text symbols should be named as |\text| followed by the
1938 Adobe glyph name: for example |\textonequarter| or |\textsterling|.
1939 Similarly, math symbols should be named as |\math| followed by the glyph
1940 name, for example |\mathonequarter| or |\mathsterling|. Commands which
1941 can be used in text or math can then be defined using |\ifmmode|, for
1942 example:
1943 \begin{verbatim}
1944 \DeclareRobustCommand{\pounds}{%
1945 \ifmmode \mathsterling \else \textsterling \fi
1946 }
1947 \end{verbatim}
1948 Note that commands defined in this way must be robust, in case they
1949 get put into a section title or other moving argument.
1950
1951 \subsection{The order of declaration}
1952
1953 \NEWdescription{2019/10/15}
1954 \NFSS{} forces you to give all declarations in a specific order so that
1955 it can check whether you have specified all necessary information. If
1956 you declare objects in the wrong order, it will complain. Here are the
1957 dependencies that you have to obey:
1958 \begin{itemize}
1959 \item
1960 |\DeclareFontFamily| checks that the encoding scheme was previously
1961 declared with |\DeclareFontEncoding|.
1962
1963 \item
1964 |\DeclareFontShape| checks that the font family was declared to be
1965 available in the requested encoding (|\DeclareFontFamily|).
1966
1967 \item
1968 |\DeclareSymbolFont| checks that the encoding scheme is valid.
1969
1970 \item
1971 |\SetSymbolFont| additionally ensures that the requested math version
1972 was declared (|\DeclareMathVersion|) and that the requested symbol
1973 font was declared (|\DeclareSymbolFont|).
1974
1975 \item
1976 |\DeclareSymbolFontAlphabet| checks that the command name for the
1977 alphabet identifier can be used and that the symbol font was declared.
1978
1979 \item
1980 |\DeclareMathAlphabet| checks that the chosen command name can be used
1981 and that the encoding scheme was declared.
1982
1983 \item
1984 |\SetMathAlphabet| checks that the alphabet identifier was previously
1985 declared with |\DeclareMathAlphabet| or |\DeclareSymbolFontAlphabet|
1986 and that the math version and the encoding scheme are known.
1987
1988 \item
1989 |\DeclareMathSymbol| makes sure that the command name can be used
1990 (i.e., is undefined or was previously declared to be a math symbol)
1991 and that the symbol font was previously declared.
1992
1993 \item
1994 When the |\begin{document}| command is reached, \NFSS{} makes some
1995 additional checks---for example, verifying that substitution
1996 defaults for every encoding scheme point to known font shape group
1997 declarations.
1998 \end{itemize}
1999
2000
2001
2002 \subsection{Document font metafamilies}
2003
2004 \LaTeX{} knows three font families accessible through \cs{rmfamily} (the
2005 serifed font family of the document), \cs{sffamily} (the sans serif
2006 family), and \cs{ttfamily} (the documents mono-spaced/typewriter family).
2007 These abstract families, i.e., \texttt{rm}, \texttt{sf}, and \texttt{tt},
2008 are called ``metafamilies''.
2009 The concrete font families selected for them depend on the settings of
2010 \cs{rmdefault}, \cs{sfdefault}, and \cs{ttdefault}.
2011
2012 Besides these metafamilies it is, of course, possible to access further
2013 font families by selecting them through
2014 \cs{fontfamily}\arg{name}\cs{selectfont}.
2015
2016 \NEWfeature{2025/11/01}
2017 In some cases it is helpful to know which of the three metafamilies
2018 (if any) is currently used for typesetting, and this information is
2019 available for programmers in \cs{@currentmetafamily}. The command
2020 returns either \texttt{rm}, \texttt{sf}, \texttt{tt}, or \texttt{??} (in case
2021 none of the metafamilies but some other font family is currently used).
2022
2023 As one application of this there is \cs{@restoremetafamily}. If the
2024 current metafamily is \meta{name} it executes \cs{\meta{name}family},
2025 e.g., \cs{sffamily}, and that then executes the hook
2026 \texttt{\meta{name}family} besides other re-initializations. This can be
2027 useful if that hook contains conditional code and the condition has
2028 changed and therefore requires re-initialization.
2029
2030
2031 \subsection{Font series defaults per document metafamily}
2032
2033 \NEWfeature{2020/02/02}
2034 With additional weights and widths being available in many font families
2035 nowadays, it is more likely that somebody will want to match, say, a
2036 medium weight serif family with a semi-light sans serif family, or that
2037 with one family one wants to use the bold-extended face when |\textbf|
2038 is used, while with another it should be bold (not extended) or
2039 semi-bold, etc. The default values can be altered using the
2040 |\DeclareFontSeriesDefault| declaration in packages or document
2041 preambles:
2042 \begin{decl}
2043 |\DeclareFontSeriesDefault| \oarg{metafamily}
2044 \arg{metaseries} \arg{series value}
2045 \end{decl}
2046 This declaration takes three arguments:
2047 \begin{description}
2048 \item[Metafamily interface:] Can be either |rm|, |sf| or |tt|. This is
2049 optional and if not present the next two arguments apply to the
2050 overall default.
2051 \item[Metaseries interface:] Can be |md| or |bf|.
2052 \item[Series value:] This is the value that is going to be used when the
2053 combination of \m{metafamily} and \m{metaseries} is requested.
2054 \end{description}
2055 For example,
2056 \begin{verbatim}
2057 \DeclareFontSeriesDefault[rm]{bf}{sb}
2058 \end{verbatim}
2059 would use |sb| (semi-bold) when |\rmfamily\bfseries| is requested in the
2060 document.
2061
2062 \subsection{Handling of current and requested font series and shape}
2063
2064 In the original NFSS implementation, the series was a single attribute
2065 stored in |\f@series| and so one always had to specify both weight and
2066 width together. Hence, it was impossible to typeset a paragraph in a
2067 condensed font and inside have a few words in bold weight (but still
2068 condensed) without doing this manually by requesting
2069 |\fontseries{bc}\selectfont|.
2070
2071 \NEWfeature{2020/02/02}
2072 The new implementation now works differently by looking both at the
2073 current value of |\f@series| and the requested new series and out of
2074 that combination selects a resulting series value. Thus, if the current
2075 series is |c| and we ask for |b|, we now get |bc|. This is done by
2076 consulting a simple lookup table where entries can be added or changed
2077 with |\DeclareFontSeriesChangeRule|:
2078 \begin{decl}
2079 |\DeclareFontSeriesChangeRule| %
2080 \arg{current series} \arg{requested series} \\
2081 \leavevmode\hfill \arg{result} \arg{alternative result}
2082 \end{decl}
2083
2084 The \m{current series} is the value currently stored in |\f@series|,
2085 \m{requested series} is the new series requested, \m{result} is the
2086 combined value if it exists for the given font family, and
2087 \m{alternative result} is a fallback in case \m{result} doesn't exist.
2088 The example above now looks like this:
2089 \begin{verbatim}
2090 \DeclareFontSeriesChangeRule{c}{b}{bc}{}
2091 \end{verbatim}
2092 which means: switch to the |bc| series if |c| is current and |b| is
2093 (additionally) requested, and if the current font doesn't have the
2094 combination, start the normal font substitution, i.e., switch back shape
2095 to |n| and if this combination doesn't succeed, switch back series to
2096 |m| as well, ending up with |m/n|.
2097
2098 Another example is:
2099 \begin{verbatim}
2100 \DeclareFontSeriesChangeRule{bc}{sc}{bsc}{bc}
2101 \end{verbatim}
2102 which means: if the current series is bold condensed (|bc|) and
2103 semi-condensed (|sc|) is requested (additionally), try bold
2104 semi-condensed (|bsc|) if available but stay with bold condensed if not.
2105
2106 A special value is |m| which is used to reset both weight and width. In
2107 order to reset only one of them, the special values |?m| (reset width)
2108 and |m?| (reset weight) are provided, e.g.:
2109 \begin{verbatim}
2110 \DeclareFontSeriesChangeRule{bc}{m?}{c}{}
2111 \end{verbatim}
2112
2113 The corresponding macro |\DeclareFontShapeChangeRule| is also provided
2114 for setting database entries for font shapes:
2115 \begin{decl}
2116 |\DeclareFontShapeChangeRule| %
2117 \arg{current shape} \arg{requested shape} \\
2118 \leavevmode\hfill \arg{result} \arg{alternative result}
2119 \end{decl}
2120
2121 An example would be:
2122 \begin{verbatim}
2123 \DeclareFontShapeChangeRule{it}{sc}{scit}{scsl}
2124 \end{verbatim}
2125 If italics is the current shape and small caps is requested, switch to
2126 |scit| (small caps italics) and if that doesn't exist, try |scsl| (small
2127 caps slanted).
2128
2129 Finally, it is also possible to overrule the entries in the lookup
2130 tables and forcibly select a series or shape with:
2131 \begin{decl}
2132 |\fontseriesforce| \arg{series} \qquad |\fontshapeforce| \arg{shape}
2133 \end{decl}
2134
2135 With the example above for the |c| series, issuing |\fontseriesforce{b}|
2136 means that the series switches to |b| and not to |bc|. Same applies to
2137 |\fontshapeforce|.
2138
2139 \subsection{Handling of nested emphasis}
2140
2141 \begin{decl}
2142 |\DeclareEmphSequence| \arg{list of font declarations}
2143 \end{decl}
2144
2145 \NEWfeature{2020/02/02}
2146 This declaration takes a comma separated list of font declarations each
2147 specifying how increasing levels of emphasis should be handled. For
2148 example:
2149 \begin{verbatim}
2150 \DeclareEmphSequence{\itshape,%
2151 \upshape\scshape,%
2152 \itshape}
2153 \end{verbatim}
2154 uses italics for the first, small capitals for the second, and italic
2155 small capitals for the third level. If there are more nesting levels
2156 than provided, declarations stored in |\emreset| (by default
2157 |\ulcshape\upshape|) are used for the next level and then the list
2158 restarts.
2159
2160 \subsection{Providing font family substitutions}
2161
2162 \begin{decl}
2163 |\DeclareFontFamilySubstitution| \arg{encoding}
2164 \arg{family}
2165 \arg{new-family}
2166 \end{decl}
2167
2168 \NEWfeature{2020/02/02}
2169 This declaration selects the font family \m{new-family} as replacement
2170 for \m{family} in the font encoding \m{encoding}. For example,
2171 \begin{verbatim}
2172 \DeclareFontFamilySubstitution{LGR}
2173 {Montserrat-LF}{IBMPlexSans-TLF}
2174 \end{verbatim}
2175 tells \LaTeX{} to substitute the sans serif font |Montserrat-LF| in the
2176 Greek encoding |LGR| with |IBMPlexSans-TLF| once requested in a
2177 document.
2178
2179 \section{Additional text symbols -- \textsf{textcomp}}
2180
2181 \NEWfeature{2020/02/02}
2182 For a long time the interface to additional text symbols and the text
2183 companion encoding |TS1| in general was the \textsf{textcomp} package.
2184 All the symbols provided by the \textsf{textcomp} package are now
2185 available in \LaTeX{} kernel. Furthermore, an intelligent substitution
2186 mechanism has been implemented so that glyphs missing in some fonts are
2187 automatically substituted with default glyphs that are sans serif if you
2188 typeset in |\textsf| and monospaced if you typeset using |\texttt|. In
2189 the past they were always taken from Computer Modern Roman if
2190 substitution was necessary.
2191
2192 {\sffamily This is most noticeable with |\oldstylenums| which are now
2193 taken from |TS1| so that you no longer get \legacyoldstylenums{1234}
2194 but \oldstylenums{1234} when typesetting in sans serif fonts \ttfamily
2195 and \oldstylenums{1234} when using typewriter fonts.}
2196
2197 \begin{decl}
2198 |\legacyoldstylenums| \arg{nums}\\
2199 |\UseLegacyTextSymbols|
2200 \end{decl}
2201 If there ever is a need to use the original (inferior) definition, then
2202 that remains available as |\legacyoldstylenums|; and to fully revert to
2203 the old behavior there is also |\UseLegacyTextSymbols|. The latter
2204 declaration reverts |\oldstylenums| and also changes the footnote
2205 symbols, such as |\textdagger|, |\textparagraph|, etc., to pick up their
2206 glyphs from the math fonts instead of the current text font (this means
2207 they always keep the same shape and do not nicely blend in with the text
2208 font).
2209
2210 %\newpage
2211
2212 The following tables show the macros available. The next commands are
2213 `constructed' accents and are built via \TeX{} macros:
2214 \begin{center}
2215 \begin{tabular}[t]{@{}ll}
2216 \verb*|\capitalcedilla A| & \capitalcedilla A \\
2217 \verb*|\capitalogonek A| & \capitalogonek A \\
2218 \end{tabular}
2219 \quad
2220 \begin{tabular}[t]{@{}ll}
2221 \verb*|\textcircled a| & \textcircled a
2222 \end{tabular}
2223 \end{center}
2224
2225 These accents are available via font encoding. The numbers in third row
2226 show the slot number:
2227 \begin{center}
2228 \begin{tabular}[t]{@{}p{0.32\linewidth}p{1em}p{2em}@{}}
2229 \verb|\capitalgrave| & \capitalgrave{} & 0 \\
2230 \verb|\capitalacute| & \capitalacute{} & 1 \\
2231 \verb|\capitalcircumflex| & \capitalcircumflex{} & 2 \\
2232 \verb|\capitaltilde| & \capitaltilde{} & 3 \\
2233 \verb|\capitaldieresis| & \capitaldieresis{} & 4 \\
2234 \verb|\capitalhungarumlaut| & \capitalhungarumlaut{} & 5 \\
2235 \verb|\capitalring| & \capitalring{} & 6 \\
2236 \verb|\capitalcaron| & \capitalcaron{} & 7
2237 \end{tabular}
2238 \quad
2239 \begin{tabular}[t]{@{}p{0.32\linewidth}p{1em}p{2em}@{}}
2240 \verb|\capitalbreve| & \capitalbreve{} & 8 \\
2241 \verb|\capitalmacron| & \capitalmacron{} & 9 \\
2242 \verb|\capitaldotaccent| & \capitaldotaccent{} & 10 \\
2243 \verb|\t| & \t{} & 26 \\
2244 \verb|\capitaltie| & \capitaltie{} & 27 \\
2245 \verb|\newtie| & \newtie{} & 28 \\
2246 \verb|\capitalnewtie| & \capitalnewtie{} & 29
2247 \end{tabular}
2248 \end{center}
2249
2250 Table~\vref{tab:textcomp}
2251 contains the full list of commands to access the text symbols.
2252 %
2253 % Tables~\vrefrange{tab:ts1-subset-always}{tab:ts1-subset-9-disable}
2254 % contain the commands to access the text symbols.
2255 %
2256 Again,
2257 the numbers are the slots in the encoding.
2258
2259 \iftrue
2260 \begin{table}[!tp]
2261 \centering\footnotesize
2262 \renewcommand\arraystretch{1.07}
2263 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2264 \toprule
2265 \verb|\textcapitalcompwordmark| & \textcapitalcompwordmark & 23 \\
2266 \verb|\textascendercompwordmark| & \textascendercompwordmark & 31 \\
2267 \verb|\textquotestraightbase| & \textquotestraightbase & 13 \\
2268 \verb|\textquotestraightdblbase| & \textquotestraightdblbase & 18 \\
2269 \verb|\texttwelveudash| & \texttwelveudash & 21 \\
2270 \verb|\textthreequartersemdash| & \textthreequartersemdash & 22 \\
2271 \verb|\textleftarrow| & \textleftarrow & 24 \\
2272 \verb|\textrightarrow| & \textrightarrow & 25 \\
2273 \verb|\textblank| & \textblank & 32 \\
2274 \verb|\textdollar| & \textdollar & 36 \\
2275 \verb|\textquotesingle| & \textquotesingle & 39 \\
2276 \verb|\textasteriskcentered| & \textasteriskcentered & 42 \\
2277 \verb|\textdblhyphen| & \textdblhyphen & 45 \\
2278 \verb|\textfractionsolidus| & \textfractionsolidus & 47 \\
2279 \verb|\textzerooldstyle| & \textzerooldstyle & 48 \\
2280 \verb|\textoneoldstyle| & \textoneoldstyle & 49 \\
2281 \verb|\texttwooldstyle| & \texttwooldstyle & 50 \\
2282 \verb|\textthreeoldstyle| & \textthreeoldstyle & 51 \\
2283 \verb|\textfouroldstyle| & \textfouroldstyle & 52 \\
2284 \verb|\textfiveoldstyle| & \textfiveoldstyle & 53 \\
2285 \verb|\textsixoldstyle| & \textsixoldstyle & 54 \\
2286 \verb|\textsevenoldstyle| & \textsevenoldstyle & 55 \\
2287 \verb|\texteightoldstyle| & \texteightoldstyle & 56 \\
2288 \verb|\textnineoldstyle| & \textnineoldstyle & 57 \\
2289 \verb|\textlangle| & \textlangle & 60 \\
2290 \verb|\textminus| & \textminus & 61 \\
2291 \verb|\textrangle| & \textrangle & 62 \\
2292 \verb|\textmho| & \textmho & 77 \\
2293 \verb|\textbigcircle| & \textbigcircle & 79 \\
2294 \verb|\textohm| & \textohm & 87 \\
2295 \verb|\textlbrackdbl| & \textlbrackdbl & 91 \\
2296 \verb|\textrbrackdbl| & \textrbrackdbl & 93 \\
2297 \verb|\textuparrow| & \textuparrow & 94 \\
2298 \verb|\textdownarrow| & \textdownarrow & 95 \\
2299 \verb|\textasciigrave| & \textasciigrave & 96 \\
2300 \verb|\textborn| & \textborn & 98 \\
2301 \verb|\textdivorced| & \textdivorced & 99 \\
2302 \verb|\textdied| & \textdied & 100 \\
2303 \verb|\textleaf| & \textleaf & 108 \\
2304 \verb|\textmarried| & \textmarried & 109 \\
2305 \verb|\textmusicalnote| & \textmusicalnote & 110 \\
2306 \verb|\texttildelow| & \texttildelow & 126 \\
2307 \verb|\textdblhyphenchar| & \textdblhyphenchar & 127 \\
2308 \verb|\textasciibreve| & \textasciibreve & 128 \\
2309 \verb|\textasciicaron| & \textasciicaron & 129 \\
2310 \verb|\textacutedbl| & \textacutedbl & 130 \\
2311 \verb|\textgravedbl| & \textgravedbl & 131 \\
2312 \verb|\textdagger| & \textdagger & 132 \\
2313 \verb|\textdaggerdbl| & \textdaggerdbl & 133 \\
2314 \verb|\textbardbl| & \textbardbl & 134 \\
2315 \verb|\textperthousand| & \textperthousand & 135 \\
2316 \verb|\textbullet| & \textbullet & 136 \\
2317 \verb|\textcelsius| & \textcelsius & 137 \\
2318 \verb|\textdollaroldstyle| & \textdollaroldstyle & 138 \\
2319 \verb|\textcentoldstyle| & \textcentoldstyle & 139 \\
2320 \bottomrule
2321 \end{tabular}\qquad
2322 \begin{tabular}[t]{lp{1.5em}l}
2323 \toprule
2324 \verb|\textflorin| & \textflorin & 140 \\
2325 \verb|\textcolonmonetary| & \textcolonmonetary & 141 \\
2326 \verb|\textwon| & \textwon & 142 \\
2327 \verb|\textnaira| & \textnaira & 143 \\
2328 \verb|\textguarani| & \textguarani & 144 \\
2329 \verb|\textpeso| & \textpeso & 145 \\
2330 \verb|\textlira| & \textlira & 146 \\
2331 \verb|\textrecipe| & \textrecipe & 147 \\
2332 \verb|\textinterrobang| & \textinterrobang & 148 \\
2333 \verb|\textinterrobangdown| & \textinterrobangdown & 149 \\
2334 \verb|\textdong| & \textdong & 150 \\
2335 \verb|\texttrademark| & \texttrademark & 151 \\
2336 \verb|\textpertenthousand| & \textpertenthousand & 152 \\
2337 \verb|\textpilcrow| & \textpilcrow & 153 \\
2338 \verb|\textbaht| & \textbaht & 154 \\
2339 \verb|\textnumero| & \textnumero & 155 \\
2340 \verb|\textdiscount| & \textdiscount & 156 \\
2341 \verb|\textestimated| & \textestimated & 157 \\
2342 \verb|\textopenbullet| & \textopenbullet & 158 \\
2343 \verb|\textservicemark| & \textservicemark & 159 \\
2344 \verb|\textlquill| & \textlquill & 160 \\
2345 \verb|\textrquill| & \textrquill & 161 \\
2346 \verb|\textcent| & \textcent & 162 \\
2347 \verb|\textsterling| & \textsterling & 163 \\
2348 \verb|\textcurrency| & \textcurrency & 164 \\
2349 \verb|\textyen| & \textyen & 165 \\
2350 \verb|\textbrokenbar| & \textbrokenbar & 166 \\
2351 \verb|\textsection| & \textsection & 167 \\
2352 \verb|\textasciidieresis| & \textasciidieresis & 168 \\
2353 \verb|\textcopyright| & \textcopyright & 169 \\
2354 \verb|\textordfeminine| & \textordfeminine & 170 \\
2355 \verb|\textcopyleft| & \textcopyleft & 171 \\
2356 \verb|\textlnot| & \textlnot & 172 \\
2357 \verb|\textcircledP| & \textcircledP & 173 \\
2358 \verb|\textregistered| & \textregistered & 174 \\
2359 \verb|\textasciimacron| & \textasciimacron & 175 \\
2360 \verb|\textdegree| & \textdegree & 176 \\
2361 \verb|\textpm| & \textpm & 177 \\
2362 \verb|\texttwosuperior| & \texttwosuperior & 178 \\
2363 \verb|\textthreesuperior| & \textthreesuperior & 179 \\
2364 \verb|\textasciiacute| & \textasciiacute & 180 \\
2365 \verb|\textmu| & \textmu & 181 \\
2366 \verb|\textparagraph| & \textparagraph & 182 \\
2367 \verb|\textperiodcentered| & \textperiodcentered & 183 \\
2368 \verb|\textreferencemark| & \textreferencemark & 184 \\
2369 \verb|\textonesuperior| & \textonesuperior & 185 \\
2370 \verb|\textordmasculine| & \textordmasculine & 186 \\
2371 \verb|\textsurd| & \textsurd & 187 \\
2372 \verb|\textonequarter| & \textonequarter & 188 \\
2373 \verb|\textonehalf| & \textonehalf & 189 \\
2374 \verb|\textthreequarters| & \textthreequarters & 190 \\
2375 \verb|\texteuro| & \texteuro & 191 \\
2376 \verb|\texttimes| & \texttimes & 214 \\
2377 \verb|\textdiv| & \textdiv & 246 \\
2378 \null \\
2379 \bottomrule
2380 \end{tabular}
2381 \caption{Text symbols formerly from the \textsf{textcomp} package}
2382 \label{tab:textcomp}
2383 \end{table}
2384
2385 \fi
2386
2387 The |TS1| encoding contains a rich set of symbols which means that
2388 several symbols are only available in a few \TeX{} fonts and some, such
2389 as the capital accents, not available at all but developed as part of
2390 the reference font implementation. In reality, many existing fonts
2391 don't provide a full set of glyphs defined in |TS1| encoding and the
2392 question arises: ``Which glyphs of the |TS1| encoding are implemented by
2393 which font?''
2394
2395 \NEWfeature{2021/06/01}
2396 Fonts\label{page:declareencodingsubset}
2397 can be ordered in sub-encodings with the |\DeclareEncodingSubset|
2398 macro:
2399 \begin{decl}
2400 |\DeclareEncodingSubset| \arg{encoding}
2401 \arg{font family}
2402 \arg{subset number}
2403 \end{decl}
2404 The macro takes 3 mandatory arguments: An \m{encoding} for which a
2405 subsetting is wanted (currently only |TS1|), the \m{font family} for
2406 which we declare the subset and finally the \m{subset number} between
2407 |0| (all of the encoding is supported) and |9| (many glyphs are
2408 missing). Hence, it is assumed that some symbols are always available
2409 by all fonts and each sub-encoding defines macros which become
2410 unavailable (i.e., they are not provided in the sub-encoding with that
2411 number and all sub-encodings with higher numbers.)
2412
2413 \begin{table}[tbp]
2414 \centering\footnotesize
2415 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2416 \toprule
2417 \verb|\textquotestraightbase| & \textquotestraightbase & 13 \\
2418 \verb|\textquotestraightdblbase| & \textquotestraightdblbase & 18 \\
2419 \verb|\textcapitalcompwordmark| & \textcapitalcompwordmark & 23 \\
2420 \verb|\textascendercompwordmark| & \textascendercompwordmark & 31 \\
2421 \verb|\textdollar| & \textdollar & 36 \\
2422 \verb|\textquotesingle| & \textquotesingle & 39 \\
2423 \verb|\textasteriskcentered| & \textasteriskcentered & 42 \\
2424 \verb|\textdagger| & \textdagger & 132 \\
2425 \verb|\textdaggerdbl| & \textdaggerdbl & 133 \\
2426 \verb|\textperthousand| & \textperthousand & 135 \\
2427 \verb|\textbullet| & \textbullet & 136 \\
2428 \verb|\texttrademark| & \texttrademark & 151 \\
2429 \verb|\textcent| & \textcent & 162 \\
2430 \verb|\textsterling| & \textsterling & 163 \\
2431 \verb|\textyen| & \textyen & 165 \\
2432 \verb|\textbrokenbar| & \textbrokenbar & 166 \\
2433 \bottomrule
2434 \end{tabular}\qquad
2435 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2436 \toprule
2437 \verb|\textsection| & \textsection & 167 \\
2438 \verb|\textcopyright| & \textcopyright & 169 \\
2439 \verb|\textordfeminine| & \textordfeminine & 170 \\
2440 \verb|\textlnot| & \textlnot & 172 \\
2441 \verb|\textregistered| & \textregistered & 174 \\
2442 \verb|\textdegree| & \textdegree & 176 \\
2443 \verb|\textpm| & \textpm & 177 \\
2444 \verb|\textparagraph| & \textparagraph & 182 \\
2445 \verb|\textperiodcentered| & \textperiodcentered & 183 \\
2446 \verb|\textordmasculine| & \textordmasculine & 186 \\
2447 \verb|\textonequarter| & \textonequarter & 188 \\
2448 \verb|\textonehalf| & \textonehalf & 189 \\
2449 \verb|\textthreequarters| & \textthreequarters & 190 \\
2450 \verb|\texttimes| & \texttimes & 214 \\
2451 \verb|\textdiv| & \textdiv & 246 \\
2452 \null \\
2453 \bottomrule
2454 \end{tabular}
2455 \caption{Symbols available in all \texttt{TS1} sub-encodings}
2456 \label{tab:ts1-subset-always}
2457 \end{table}
2458
2459
2460
2461 \begin{table}[!tbp]
2462 \centering
2463 \begin{tabular}[t]{@{}lll@{}}
2464 \toprule
2465 \verb*|\textcircled| & \textcircled{} & acc \\
2466 \bottomrule
2467 \end{tabular}
2468 \caption{Symbol unavailable in \texttt{TS1} sub-encoding \texttt{1}
2469 and higher}
2470 \label{tab:ts1-subset-1-disable}
2471 \end{table}
2472
2473
2474
2475 \begin{table}[!tbp]
2476 \centering\footnotesize
2477 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2478 \toprule
2479 \verb|\capitalcedilla| & \capitalcedilla{} & acc \\
2480 \verb|\capitalogonek| & \capitalogonek{} & acc \\
2481 \verb|\capitalgrave| & \capitalgrave{} & 0 \\
2482 \verb|\capitalacute| & \capitalacute{} & 1 \\
2483 \verb|\capitalcircumflex| & \capitalcircumflex{} & 2 \\
2484 \verb|\capitaltilde| & \capitaltilde{} & 3 \\
2485 \verb|\capitaldieresis| & \capitaldieresis{} & 4 \\
2486 \verb|\capitalhungarumlaut| & \capitalhungarumlaut{} & 5 \\
2487 \verb|\capitalring| & \capitalring{} & 6 \\
2488 \verb|\capitalcaron| & \capitalcaron{} & 7 \\
2489 \verb|\capitalbreve| & \capitalbreve{} & 8 \\
2490 \verb|\capitalmacron| & \capitalmacron{} & 9 \\
2491 \verb|\capitaldotaccent| & \capitaldotaccent{} & 10 \\
2492 \verb|\capitaltie| & \capitaltie{} & 27 \\
2493 \verb|\newtie| & \newtie{} & 28 \\
2494 \verb|\capitalnewtie{}| & \capitalnewtie{} & 29 \\
2495 \verb|\textdblhyphen| & \textdblhyphen & 45 \\
2496 \verb|\textzerooldstyle| & \textzerooldstyle & 48 \\
2497 \verb|\textoneoldstyle| & \textoneoldstyle & 49 \\
2498 \verb|\texttwooldstyle| & \texttwooldstyle & 50 \\
2499 \verb|\textthreeoldstyle| & \textthreeoldstyle & 51 \\
2500 \verb|\textfouroldstyle| & \textfouroldstyle & 52 \\
2501 \verb|\textfiveoldstyle| & \textfiveoldstyle & 53 \\
2502 \verb|\textsixoldstyle| & \textsixoldstyle & 54 \\
2503 \verb|\textsevenoldstyle| & \textsevenoldstyle & 55 \\
2504 \verb|\texteightoldstyle| & \texteightoldstyle & 56 \\
2505 \verb|\textnineoldstyle| & \textnineoldstyle & 57 \\
2506 \verb|\textmho| & \textmho & 77 \\
2507 \verb|\textbigcircle| & \textbigcircle & 79 \\
2508 \verb|\textlbrackdbl| & \textlbrackdbl & 91 \\
2509 \verb|\textrbrackdbl| & \textrbrackdbl & 93 \\
2510 \verb|\textasciigrave| & \textasciigrave & 96 \\
2511 \verb|\textborn| & \textborn & 98 \\
2512 \bottomrule
2513 \end{tabular}\qquad
2514 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2515 \toprule
2516 \verb|\textdivorced| & \textdivorced & 99 \\
2517 \verb|\textdied| & \textdied & 100 \\
2518 \verb|\textleaf| & \textleaf & 108 \\
2519 \verb|\textmarried| & \textmarried & 109 \\
2520 \verb|\textmusicalnote| & \textmusicalnote & 110 \\
2521 \verb|\texttildelow| & \texttildelow & 126 \\
2522 \verb|\textdblhyphenchar| & \textdblhyphenchar & 127 \\
2523 \verb|\textasciibreve| & \textasciibreve & 128 \\
2524 \verb|\textasciicaron| & \textasciicaron & 129 \\
2525 \verb|\textacutedbl| & \textacutedbl & 130 \\
2526 \verb|\textgravedbl| & \textgravedbl & 131 \\
2527 \verb|\textdollaroldstyle| & \textdollaroldstyle & 138 \\
2528 \verb|\textcentoldstyle| & \textcentoldstyle & 139 \\
2529 \verb|\textnaira| & \textnaira & 143 \\
2530 \verb|\textguarani| & \textguarani & 144 \\
2531 \verb|\textpeso| & \textpeso & 145 \\
2532 \verb|\textrecipe| & \textrecipe & 147 \\
2533 \verb|\textpertenthousand| & \textpertenthousand & 152 \\
2534 \verb|\textpilcrow| & \textpilcrow & 153 \\
2535 \verb|\textbaht| & \textbaht & 154 \\
2536 \verb|\textdiscount| & \textdiscount & 156 \\
2537 \verb|\textopenbullet| & \textopenbullet & 158 \\
2538 \verb|\textservicemark| & \textservicemark & 159 \\
2539 \verb|\textlquill| & \textlquill & 160 \\
2540 \verb|\textrquill| & \textrquill & 161 \\
2541 \verb|\textasciidieresis| & \textasciidieresis & 168 \\
2542 \verb|\textcopyleft| & \textcopyleft & 171 \\
2543 \verb|\textcircledP| & \textcircledP & 173 \\
2544 \verb|\textasciimacron| & \textasciimacron & 175 \\
2545 \verb|\textasciiacute| & \textasciiacute & 180 \\
2546 \verb|\textreferencemark| & \textreferencemark & 184 \\
2547 \verb|\textsurd| & \textsurd & 187 \\
2548 \null \\
2549 \bottomrule
2550 \end{tabular}
2551 \caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{2}
2552 and higher}
2553 \label{tab:ts1-subset-2-disable}
2554 \end{table}
2555
2556
2557 \begin{table}[!tbp]
2558 \centering\footnotesize
2559 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2560 \toprule
2561 \verb|textlangle| & \textlangle & 60 \\
2562 \bottomrule
2563 \end{tabular}\qquad
2564 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2565 \toprule
2566 \verb|\textrangle| & \textrangle & 62 \\
2567 \bottomrule
2568 \end{tabular}
2569 \caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{3}
2570 and higher}
2571 \label{tab:ts1-subset-3-disable}
2572 \end{table}
2573
2574
2575 Thus, the symbols that are available in sub-encoding $x$ are the symbols
2576 in table~\ref{tab:ts1-subset-always} (always available) and the symbols
2577 that only become unavailable in sub-encodings $> x$. The tables
2578 \vrefrange{tab:ts1-subset-1-disable}{tab:ts1-subset-9-disable} show the symbols that
2579 become unavailable in the different sub-encodings. Again, the numbers
2580 are the slots in the |TS1| encoding, |acc| indicates a `constructed'
2581 accent.
2582
2583
2584
2585 \begin{table}[!tbp]
2586 \centering\footnotesize
2587 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2588 \toprule
2589 \verb|\textleftarrow| & \textleftarrow & 24 \\
2590 \verb|\textrightarrow| & \textrightarrow & 25 \\
2591 \verb|\textuparrow| & \textuparrow & 94 \\
2592 \verb|\textdownarrow| & \textdownarrow & 95 \\
2593 \bottomrule
2594 \end{tabular}\qquad
2595 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2596 \toprule
2597 \verb|\textcolonmonetary| & \textcolonmonetary & 141 \\
2598 \verb|\textwon| & \textwon & 142 \\
2599 \verb|\textlira| & \textlira & 146 \\
2600 \verb|\textdong| & \textdong & 150 \\
2601 \bottomrule
2602 \end{tabular}
2603 \caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{4}
2604 and higher}
2605 \label{tab:ts1-subset-4-disable}
2606 \end{table}
2607
2608
2609 \begin{table}[!tbp]
2610 \centering\footnotesize
2611 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2612 \toprule
2613 \verb|\textnumero| & \textnumero & 155 \\
2614 \bottomrule
2615 \end{tabular}\qquad
2616 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2617 \toprule
2618 \verb|\textestimated| & \textestimated & 157 \\
2619 \bottomrule
2620 \end{tabular}
2621 \caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{5}
2622 and higher}
2623 \label{tab:ts1-subset-5-disable}
2624 \end{table}
2625
2626
2627
2628 \begin{table}[!tbp]
2629 \centering\footnotesize
2630 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2631 \toprule
2632 \verb|\textflorin| & \textflorin & 140 \\
2633 \bottomrule
2634 \end{tabular}\qquad
2635 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2636 \toprule
2637 \verb|\textcurrency| & \textcurrency & 164 \\
2638 \bottomrule
2639 \end{tabular}
2640 \caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{6}
2641 and higher}
2642 \label{tab:ts1-subset-6-disable}
2643 \end{table}
2644
2645
2646
2647 \begin{table}[!tbp]
2648 \centering\footnotesize
2649 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2650 \toprule
2651 \verb|\textfractionsolidus| & \textfractionsolidus & 47 \\
2652 \verb|\textminus| & \textminus & 61 \\
2653 \bottomrule
2654 \end{tabular}\qquad
2655 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2656 \toprule
2657 \verb|\textohm| & \textohm & 87 \\
2658 \verb|\textmu| & \textmu & 181 \\
2659 \bottomrule
2660 \end{tabular}
2661 \caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{7}
2662 and higher}
2663 \label{tab:ts1-subset-7-disable}
2664 \end{table}
2665
2666
2667
2668 \begin{table}[!tbp]
2669 \centering\footnotesize
2670 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2671 \toprule
2672 \verb|\textblank| & \textblank & 32 \\
2673 \verb|\textinterrobang| & \textinterrobang & 148 \\
2674 \bottomrule
2675 \end{tabular}\qquad
2676 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2677 \toprule
2678 \verb|\textinterrobangdown| & \textinterrobangdown & 149 \\
2679 \null \\
2680 \bottomrule
2681 \end{tabular}
2682 \caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{8}
2683 and higher}
2684 \label{tab:ts1-subset-8-disable}
2685 \end{table}
2686
2687
2688 \begin{table}[!tbp]
2689 \centering\footnotesize
2690 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2691 \toprule
2692 \verb|\texttwelveudash| & \texttwelveudash & 21 \\
2693 \verb|\textthreequartersemdash| & \textthreequartersemdash & 22 \\
2694 \verb|\textbardbl| & \textbardbl & 134 \\
2695 \verb|\textcelsius| & \textcelsius & 137 \\
2696 \bottomrule
2697 \end{tabular}\qquad
2698 \begin{tabular}[t]{@{}lp{1.5em}l@{}}
2699 \toprule
2700 \verb|\texttwosuperior| & \texttwosuperior & 178 \\
2701 \verb|\textthreesuperior| & \textthreesuperior & 179 \\
2702 \verb|\textonesuperior| & \textonesuperior & 185 \\
2703 \null \\
2704 \bottomrule
2705 \end{tabular}
2706 \caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{9}}
2707 \label{tab:ts1-subset-9-disable}
2708 \end{table}
2709
2710
2711
2712 As an example,
2713 %\begin{verbatim}
2714 \verb=\DeclareEncodingSubset{TS1}{foo}{5}=
2715 %\end{verbatim}
2716 indicates that the font family |foo| contains the always available
2717 symbols (table~\vref{tab:ts1-subset-always}) and the ones disabled
2718 in sub-encodings 6--9, i.e.,
2719 tables~\vrefrange{tab:ts1-subset-6-disable}{tab:ts1-subset-9-disable}.
2720
2721 As these days many font families are set up to end in |-LF| (lining
2722 figures), |-OsF| (oldstyle figures), etc. the declaration supports a
2723 shortcut: if the \m{font family} name ends in |-*| then the star gets
2724 replaced by these common ending, e.g.,
2725 \begin{verbatim}
2726 \DeclareEncodingSubset{TS1}{Alegreya-*}{2}
2727 \end{verbatim}
2728 is the same as writing
2729 \begin{verbatim}
2730 \DeclareEncodingSubset{TS1}{Alegreya-LF} {2}
2731 \DeclareEncodingSubset{TS1}{Alegreya-OsF} {2}
2732 \DeclareEncodingSubset{TS1}{Alegreya-TLF} {2}
2733 \DeclareEncodingSubset{TS1}{Alegreya-TOsF}{2}
2734 \end{verbatim}
2735 If only some are needed then one can define them individually but in
2736 many cases all four are wanted, hence the shortcut.
2737
2738 Maintainers of font bundles that include \texttt{TS1} encoded font files
2739 should add an appropriate declaration into the corresponding
2740 \texttt{ts1}\textit{family}\texttt{.fd} file, because otherwise the
2741 default subencoding is assumed, which is probably disabling too many
2742 glyphs that are actually available in the font.\footnote{The \LaTeX{}
2743 format contains declarations for many font families already, but this
2744 is really the wrong place for the declarations. Thus for new fonts
2745 they should be placed into the corresponding \texttt{.fd} file.}
2746
2747
2748 \section{If you need to know more \ldots}
2749
2750 \NEWdescription{1996/06/01}
2751 The |tracefnt| package provides for tracing the actions concerned with
2752 loading, substituting and using fonts. The package accepts the
2753 following options:
2754 \begin{description}
2755 \item[errorshow] Write all information about font changes, etc.\ but
2756 only to the transcript file unless an error occurs. This means that
2757 information about font substitution will not be shown on the terminal.
2758
2759 \item[warningshow] Show all font warnings on the terminal. This setting
2760 corresponds to the default behavior when this \texttt{tracefnt}
2761 package is \emph{not} used!
2762
2763 \item[infoshow] Show all font warnings and all font info messages (that
2764 are normally only written to the transcript file) also on the
2765 terminal. This is the default when this \texttt{tracefnt} package is
2766 loaded.
2767
2768 \item[debugshow] In addition to what is shown by \texttt{infoshow}, show
2769 also changes of math fonts (as far as possible): beware, this option
2770 can produce a large amount of output.
2771
2772 \item[loading] Show the names of external font files when they are
2773 loaded. This option shows only `newly loaded' fonts, not those
2774 already preloaded in the format or the class file before this
2775 \texttt{tracefnt} package becomes active.
2776
2777 \item[pausing] Turn all font warnings into errors so that \LaTeX{} will
2778 stop.
2779 \end{description}
2780
2781 \emph{Warning}: The actions of this package can change the layout of a
2782 document and even, in rare cases, produce clearly wrong output, so it
2783 should not be used in the final formatting of `real documents'.
2784
2785 \begin{thebibliography}{1}
2786
2787 \bibitem{A-W:MG2004}
2788 Frank Mittelbach and Michel Goossens.
2789 \newblock {\em The {\LaTeX} Companion second edition}.
2790 \newblock With Johannes Braams, David Carlisle, and Chris Rowley.
2791 \newblock Addison-Wesley, Reading, Massachusetts, 2004.
2792
2793 \bibitem{tub:DKn89}
2794 Donald~E. Knuth.
2795 \newblock Typesetting concrete mathematics.
2796 \newblock {\em {TUG}boat}, 10(1):31--36, April 1989.
2797
2798 \bibitem{A-W:LLa94}
2799 Leslie Lamport.
2800 \newblock {\em {\LaTeX:} A Document Preparation System}.
2801 \newblock Addison-Wesley, Reading, Massachusetts, second edition, 1994.
2802
2803 \end{thebibliography}
2804
2805 \end{document}
2806
2807 %%% Local Variables:
2808 %%% mode: latex
2809 %%% TeX-master: t
2810 %%% fill-column: 72
2811 %%% End: