1 % \iffalse meta-comment
4 % The LaTeX3 Project and any individual authors listed elsewhere
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
10 % It may be distributed and/or modified under the
11 % conditions of the LaTeX Project Public License, either version 1.3c
12 % of this license or (at your option) any later version.
13 % The latest version of this license is in
14 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
20 % The list of all files belonging to the LaTeX base distribution is
21 % given in the file `manifest.txt'. See also `legal.txt' for additional
24 % The list of derived (unpacked) files belonging to the distribution
25 % and covered by LPPL is defined by the unpacking scripts (with
26 % extension .ins) which are part of the distribution.
30 %%% From File: ltoutenc.dtx
31 %\NeedsTeXFormat{LaTeX2e}[2000/06/01]
32 %<OT1>\ProvidesFile{ot1enc.def}
33 %<T1>\ProvidesFile{t1enc.def}
34 %<OMS>\ProvidesFile{omsenc.def}
35 %<OML>\ProvidesFile{omlenc.def}
36 %<OT4>\ProvidesFile{ot4enc.def}
37 %<TS1>\ProvidesFile{ts1enc.def}[2001/06/05 v3.0e (jk/car/fm)
38 %<package>\ProvidesPackage{fontenc}
39 %<TS1sty>\ProvidesPackage{textcomp}
40 %<OT1|T1|OMS|OML|OT4|package|TS1sty> [2005/09/27 v1.99g
41 %<OT1|T1|OMS|OML|OT4|TS1> Standard LaTeX file]
42 %<package|TS1sty> Standard LaTeX package]
46 \ProvidesFile{ltoutenc.dtx}
47 [2015/08/28 v1.99m LaTeX Kernel (font encodings)]
49 \documentclass{ltxdoc}
50 \GetFileInfo{ltoutenc.dtx}
62 \MaintainedByLaTeXTeam{latex}
72 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
73 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
74 % Digits \0\1\2\3\4\5\6\7\8\9
75 % Exclamation \! Double quote \" Hash (number) \#
76 % Dollar \$ Percent \% Ampersand \&
77 % Acute accent \' Left paren \( Right paren \)
78 % Asterisk \* Plus \+ Comma \,
79 % Minus \- Point \. Solidus \/
80 % Colon \: Semicolon \; Less than \<
81 % Equals \= Greater than \> Question mark \?
82 % Commercial at \@ Left bracket \[ Backslash \\
83 % Right bracket \] Circumflex \^ Underscore \_
84 % Grave accent \` Left brace \{ Vertical bar \|
85 % Right brace \} Tilde \~}
88 % \changes{v1.99e}{2004/02/13}{Documentation fixes: typos}
89 % \changes{v1.9k}{1998/01/12}{Added \cs{ProvidesPackage}
91 % \changes{v1.9i}{1997/12/19}{Documentation corrections.}
92 % \changes{v1.9h}{1997/12/17}{Documentation changes and additions.}
93 % \changes{v1.9h}{1997/12/17}{Added textcomp.sty.}
94 % \changes{v1.9f}{1997/08/29}{Added OT4 encoding,
95 % provided by Marcin Woli\'nski.}
96 % \changes{v1.7r}{1995/11/28}{doc fixes}
97 % \changes{v1.7h}{1995/04/21}{Added \cs{null} \cs{k} latex/1274}
98 % \changes{v1.7f}{1994/12/14}{Added braces to \cs{copyright} so it
99 % works unbraced in subscripts.}
100 % \changes{v1.7f}{1994/12/14}{Added check for math mode in
101 % \cs{@changed@cmd}.}
102 % \changes{v1.7f}{1994/12/14}{Commented out \cs{textasciicircum},
103 % \cs{textasciitilde}, \cs{textbackslash}, \cs{textbar},
104 % \cs{textgreater}, \cs{texthyphenchar}, \cs{texthyphen} and
105 % \cs{textless} to save memory.}
106 % \changes{v1.7e}{1994/12/10}{Added documentation for the OML encoding.}
107 % \changes{v1.7e}{1994/12/10}{Replaced width with \cs{@width} and
108 % ditto height in vrules.}
109 % \changes{v1.7d}{1994/12/08}{Added \cs{null} and \cs{sh@ft} to \cs{b}
111 % \changes{v1.7c}{1994/12/05}{Added braces to \cs{textcircled}.}
112 % \changes{v1.7b}{1994/12/02}{Fixed a bug with \cs{a}.}
113 % \changes{v1.7a}{1994/11/30}{Added new code for encoding-specific
114 % commands. These now expand in the mouth, which means that
115 % ligaturing and kerning can happen.}
116 % \changes{v1.6i}{1994/11/22}{Fixed empty accents. Again.}
117 % \changes{v1.6i}{1994/11/22}{Corrected \cs{dots} so that there's no
118 % kerning in monowidth fonts.}
119 % \changes{v1.6i}{1994/11/22}{Corrected typo with
120 % \cs{mathunderscore}.}
121 % \changes{v1.6h}{1994/11/17}{(DPC) \cs{@tempa} to \cs{reserved@a}}
122 % \changes{v1.6d}{1994/11/02}{Wrapped lines longer than 70 characters.}
123 % \changes{v1.6d}{1994/10/30}{Added math commands.}
124 % \changes{v1.6d}{1994/10/30}{Added OML encoding.}
125 % \changes{v1.6d}{1994/10/30}{Added \cs{textcircled}.}
126 % \changes{v1.6d}{1994/10/30}{Added \cs{DeclareTextCompositeCommand}.}
127 % \changes{v1.6c}{1994/10/29}{Renamed \cs{P}, \cs{S}, \cs{dag} and
128 % \cs{ddag} to \cs{textparagraph}, \cs{textsection},
129 % \cs{textdagger} and \cs{textdaggerdbl}.}
130 % \changes{v1.6b}{1994/10/27}{Removed the enc.def files}
131 % \changes{v1.6a}{1994/10/25}{Added \cs{ProvideTextCommand},
132 % \cs{UseTextSymbol},
133 % \cs{UseTextAccent},
134 % \cs{DeclareTextSymbolDefault},
135 % \cs{DeclareTextAccentDefault},
136 % \cs{DeclareTextCommandDefault}, and
137 % \cs{ProvideTextCommandDefault}.}
138 % \changes{v1.5m}{1994/10/18}{Added new definitions of \cs{patterns}
139 % and \cs{hyphenation}.}
140 % \changes{v1.5l}{1994/10/07}{Moved the ogonek accent.}
141 % \changes{v1.5k}{1994/05/18}{Removed braces from \cs{pounds} and
143 % \changes{v1.5k}{1994/05/18}{Replaced \cs{defaultencoding} with
144 % \cs{encodingdefault}.}
145 % \changes{v1.5k}{1994/05/18}{Made dotted-i produce `i'.}
146 % \changes{v1.5j}{1994/05/17}{Added braces to \cs{pounds} so it works
148 % \changes{v1.5i}{1994/05/16}{Fixed a bug with \cs{d}.}
149 % \changes{v1.5h}{1994/05/16}{Added \cs{NG}, \cs{ng}, \cs{TH},
150 % \cs{th}, \cs{DH}, \cs{dh}, \cs{DJ} and \cs{dj}.}
151 % \changes{v1.5h}{1994/05/16}{Added \cs{r} (ring accent) and \cs{k}
153 % \changes{v1.5h}{1994/05/16}{Removed \cs{P} from the OT1 definitions
155 % \changes{v1.5h}{1994/05/16}{Fixed a bug with \cs{pounds}.}
156 % \changes{v1.5g}{1994/05/16}{Made fontenc.sty use the new mixed-case
158 % \changes{v1.5f}{1994/05/16}{Revert code so that the encoding
159 % given is used in \cs{DeclareTextCommand} (FMi)}
160 % \changes{v1.5f}{1994/05/16}{enc files now have uc encoding name
162 % \changes{v1.5e}{1994/05/14}{Replaced \cs{ENC@cmd} by \cs{ENC-cmd}.}
163 % \changes{v1.5d}{1994/05/14}{Rewrote \cs{DeclareTextCommand} to define
164 % its argument to use the current encoding by default, rather than
165 % the encoding provided to \cs{DeclareTextCommand}.}
166 % \changes{v1.5d}{1994/05/14}{Tidied up the documentation.}
167 % \changes{v1.5c}{1994/05/14}{Added the fontenc package.}
168 % \changes{v1.5c}{1994/05/14}{Fixed a bug which caused an infinite loop
169 % if \cs{f@encoding} was incorrectly set.}
170 % \changes{v1.5c}{1994/05/14}{Moved fontsmpl to its own dtx file.}
171 % \changes{v1.5b}{1994/05/13}{Added \cmd\{, \cmd\} and \cmd\$.}
172 % \changes{v1.5b}{1994/05/13}
173 % {Replaces \cs{space} by `~' in \cs{csname}.}
174 % \changes{v1.5b}{1994/05/13}{Renamed \cs{DeclareProtectedCommand} to
175 % \cs{DeclareRobustCommand}.}
176 % \changes{v1.5a}{1994/05/11}{Renamed the commands again. Made the
177 % encoding part of the command syntax. Added the
178 % \cs{DeclareTextCommand} interface. Used
179 % \cs{DeclareProtectedCommand}.}
180 % \changes{v1.4a}{1994/05/01}{Renamed the commands, removed the
181 % \cs{EncodingSpecific} command. Turned all slots into decimal.
183 % \changes{v1.4a}{1994/05/01}{Removed Rokicki's encoding.}
184 % \changes{v1.3d}{1993/12/18}{Some T1 stuff had drifted into the OT1
186 % \changes{v1.3c}{1993/12/18}{A new syntax, separating
187 % accent-definitions from encoding-specific definitions, and
188 % allowing encoding-specific \cs{chardef}, \cs{let}, etc.}
189 % \changes{v1.3c}{1993/12/18}{Rewrote for the new syntax of
190 % \cs{EncodingSpecific}.}
191 % \changes{v1.3b}{1993/12/18}{Corrected typos.}
192 % \changes{v1.3b}{1993/12/18}{Replaced the missing last argument to
193 % \cs{DeclareFontEncoding}.}
194 % \changes{v1.3a}{1993/12/18}{Replaced OT3 by XXX}
195 % \changes{v1.3}{1993/12/17}{Added \cs{EncodingSpecificAccent},
196 % \cs{EncodingSpecificAccentedLetter} and
197 % \cs{EncodingSpecificCommand}.}
198 % \changes{v1.3}{1993/12/17}{Made Rokicki's encoding a proper encoding
199 % scheme rather than a variant of OT1.}
200 % \changes{v1.2b}{1993/12/13}{Corrected file name in driver code.}
201 % \changes{v1.2a}{1993/12/11}{Corrected for t1enc, math.}
202 % \changes{v1.2}{1993/12/10}{Added source code for t1enc.sty.}
203 % \changes{v1.1}{1993/12/07}{Made all character numbers decimal.}
204 % \changes{v1.1}{1993/12/07}{Removed a lot of equal signs and the
206 % \changes{v1.99m}{2015/02/21}
207 % {Removed autoload code}
210 % \section{Font encodings}
212 % This section of the kernel contains commands for declaring
214 % commands, such as accents. It also contains the code for some of
215 % the encoding files, including |omlenc.def|,
216 % |omsenc.def|, |t1enc.def| and |ot1enc.def| files, which define
218 % |OMS|, |T1| and |OT1| encodings, and the |fontenc| package
219 % for selecting encodings.
221 % The |fontenc| package has options for encodings, of which the
222 % last option is the default encoding. For example, to use the
223 % |OT2|, |OT3| and |T1| encodings, with |T1| as the default, you
226 % \usepackage[OT2,OT3,T1]{fontenc}
228 % The standard kernel set-up loads font encoding files and selects
229 % an encoding as follows.
231 % \input {omlenc.def}
233 % \input {ot1enc.def}
234 % \input {omsenc.def}
237 % Note that the files in the standard |inputenc| package depend on
238 % this behaviour of the kernel.
240 % The syntax for declaring encoding-specific commands is:
242 % |\DeclareTextCommand{|^^A
243 % \meta{command}|}{|^^A
244 % \meta{encoding}|}|\\\hspace*{\fill}|[|^^A
245 % \meta{number}|][|^^A
246 % \meta{default}|]{|^^A
249 % This command is like |\newcommand|, except that it defines a
250 % command which is specific to one encoding. The resulting command
251 % is always robust, even if its definition is fragile. For example,
252 % the definition of |\l| in the |OT1| encoding is:
254 % \DeclareTextCommand{\l}{OT1}{{\@xxxii l}}
256 % |\DeclareTextCommand| takes the same optional arguments as
259 % |\ProvideTextCommand{|^^A
260 % \meta{command}|}{|^^A
261 % \meta{encoding}|}|\\\hspace*{\fill}|[|^^A
262 % \meta{number}|][|^^A
263 % \meta{default}|]{|^^A
266 % This acts like |\DeclareTextCommand|, but does nothing if the
267 % command is already defined.
269 % |\DeclareTextSymbol{|^^A
270 % \meta{command}|}{|^^A
271 % \meta{encoding}|}{|^^A
274 % This command defines a text symbol, with a particular slot in that
275 % encoding. The commands:
276 % \changes{v1.9h}{1997/12/17}{Example corrected, braces removed.}
278 % \DeclareTextSymbol{\ss}{OT1}{25}
279 % \DeclareTextCommand{\ss}{OT1}{\char25 }
281 % have the same effect, but the |\DeclareTextSymbol| is faster.
283 % |\DeclareTextAccent{|^^A
284 % \meta{command}|}{|^^A
285 % \meta{encoding}|}{|^^A
288 % \changes{v1.8e}{1996/11/23}{Corrected description}
289 % \changes{v1.9k}{1997/12/31}{Further correction}
290 % This command declares a text accent. The commands:
292 % \DeclareTextAccent{\"}{OT1}{127}
293 % \DeclareTextCommand{\"}{OT1}{\add@accent {127}}
295 % have the same effect.
296 % \changes{v1.8c}{1996/10/27}
297 % {Corrected syntax descriptions}
299 % |\DeclareTextComposite{|^^A
300 % \meta{command}|}|\\\hspace*{\fill}|{|^^A
301 % \meta{encoding}|}{|^^A
302 % \meta{argument}|}{|^^A
305 % This command declares a composite letter, for example in the |T1|
306 % encoding |\'{a}| is slot 225, which is declared by:
308 % \DeclareTextComposite{\'}{T1}{a}{225}
310 % \changes{v1.8e}{1996/11/23}
311 % {Corrected description}
312 % The \emph{command} will normally have been declared with
313 % |\DeclareTextAccent|, or as a one-argument |\DeclareTextCommand|.
315 % |\DeclareTextComposite| is the most common example of using
316 % the more general declaration
317 % |\DeclareTextCompositeCommand|, which can define a composite
318 % to be an arbitrary piece of text.
320 % |\DeclareTextCompositeCommand{|^^A
321 % \meta{command}|}|\\\hspace*{\fill}|{|^^A
322 % \meta{encoding}|}{|^^A
323 % \meta{argument}|}{|^^A
326 % For example, in the OT1 encoding \r A has a hand-crafted
327 % definition this is declared as follows
329 % \DeclareTextCompositeCommand{\r}{OT1}{A}
330 % {\leavevmode\setbox\z@\hbox{!}\dimen@\ht\z@\advance\dimen@-1ex%
331 % \rlap{\raise.67\dimen@\hbox{\char23}}A}
333 % \changes{v1.8e}{1996/11/23}
334 % {Corrected description}
335 % The \emph{command} will normally have been declared with
336 % |\DeclareTextAccent|, or as a one-argument |\DeclareTextCommand|.
338 % The commands defined using the above declarations can be used in
340 % Normally they are used by just calling the command in the
341 % appropriate encoding, for example |\ss|. However, sometimes you
342 % may wish to use a command in an encoding where it is not defined.
343 % If the command has no arguments, then you can use it in another
344 % encoding by calling |\UseTextSymbol|:
346 % |\UseTextSymbol{|^^A
347 % \meta{encoding}|}{|^^A
351 % \task{?}{Document the problems of these commands, see pr/3160}
352 % \changes{v1.9e}{1997/08/05}{Corrected order of arguments in
353 % \cs{UseTextSymbol} example.}
354 % For example, |\UseTextSymbol{OT1}{\ss}| has the same effect as:
356 % {\fontencoding{OT1}\selectfont\ss}
358 % If the command has one argument then you can use it in another
359 % encoding by calling
362 % |\UseTextAccent{|^^A
363 % \meta{encoding}|}{|^^A
364 % \meta{command}|}{|^^A
367 % For example, if the current encoding is |OT2| then
368 % |\UseTextAccent{OT1}{\'}{a}| has the same effect as:
370 % {\fontencoding{OT1}\selectfont\'{\fontencoding{OT2}\selectfont a}}
372 % \changes{v1.8e}{1996/11/23}
373 % {Extended description}
374 % You can also declare a default definition for a text command, which
375 % will be used if the current encoding has no appropriate definition.
376 % Such use will also set the definition for this command in the
377 % current encoding to equal this default definition; this makes
378 % subsequent uses of the command much faster.
380 % |\DeclareTextCommandDefault{|^^A
381 % \meta{command}|}{|^^A
382 % \meta{definition}|}|
384 % For example, the default definition of the command
385 % |\textonequarter| (which produces the fraction $\frac14$) could be
386 % built using math mode:
388 % \DeclareTextCommandDefault{\textonequarter}{\ensuremath {\frac14}}
390 % There is a matching |\Provide| command which will not override an
391 % existing default definition:
393 % |\ProvideTextCommandDefault{|^^A
394 % \meta{command}|}{|^^A
395 % \meta{definition}|}|
397 % The most common use for these commands is to use symbols from
398 % other encodings, so there are some optimizations provided:
400 % |\DeclareTextSymbolDefault{|^^A
401 % \meta{command}|}|^^A
402 % \meta{encoding}|}|\\
403 % |\DeclareTextAccentDefault{|^^A
404 % \meta{command}|}|^^A
409 % |\DeclareTextCommandDefault{|^^A
410 % \meta{command}|}|\\\hspace*{\fill}^^A
411 % |{\UseTextSymbol{|^^A
412 % \meta{encoding}|}{|\meta{command}|}}| \\
413 % |\DeclareTextCommandDefault[1]{|^^A
414 % \meta{command}|}|\\\hspace*{\fill}^^A
415 % |{\UseTextAccent{|^^A
416 % \meta{encoding}|}{|\meta{command}|}{#1}}|
418 % For example, to make |OT1| the default encoding for |\ss| and
421 % \DeclareTextSymbolDefault{\ss}{OT1}
422 % \DeclareTextAccentDefault{\'}{OT1}
424 % Note that you can use these commands on any zero- or one-argument
425 % commands declared with |\DeclareText*| or |\ProvideText*|, not
426 % just those defined using |\DeclareTextSymbol| or
427 % |\DeclareTextAccent|.
429 % \subsection{Removing encoding-specific commands}
430 % \label{sec:removeencspec}
432 % \changes{v1.9o}{1998/03/20}{Documentation added for pr/2783}
434 % In some cases encoding definitions are given to provide some limited
435 % support since nothing better is available, for example, the definition
436 % for |\textdollar| in \texttt{OT1} is a hack since \$ and \pounds{}
437 % actually share the same slot in this encoding. Thus if such a glyph
438 % becomes available in a different encoding (e.g., \texttt{TS1}) one
439 % would like to get rid of the flacky one and make the default
440 % definition point to the new encoding. In such a case defining
442 % \DeclareTextSymbol{\textdollar}{TS1}{36}
443 % \DeclareTextSymbolDefault{\textdollar}{TS1}
445 % is not enough since if typesetting in \texttt{OT1} \LaTeX{} will
446 % still find the encoding specific-definition for \texttt{OT1} and
447 % therefore ignore the new default.
448 % Therefore to ensure that in this case the \texttt{TS1} version is
449 % used we have to remove the \texttt{OT1} declaration:
451 % \UndeclareTextCommand{\textdollar}{OT1}
454 % Since the \$ sign is a proper glyph in the \texttt{T1} encoding there
455 % is no point removing its definition and forcing \LaTeX{} to pick up
456 % the \texttt{TS1} version if typesetting in this encoding.
457 % However, assume you want to use the variant dollar sign,
458 % i.e., \textdollaroldstyle{}
459 % for your dollars. In that case you have to get rid of the \texttt{T1}
460 % declaration as well, e.g., the following would do that for you:
462 % \UndeclareTextCommand{\textdollar}{OT1}
463 % \UndeclareTextCommand{\textdollar} {T1}
464 % \DeclareTextCommandDefault{\textdollar}
465 % {\UseTextSymbol{TS1}\textdollaroldstyle}
468 % \subsection{The order of declarations}\label{sec:orderofdecls}
470 % \changes{v1.9o}{1998/03/20}{Documentation added about order of decls}
472 % If an encoding-specific command is defined for more than one encoding,
473 % then it will execute fastest in the encoding in which it was defined
474 % last since its top-level definition will be set up to execute in that
475 % encoding without any overhead.
477 % For this reason the file \texttt{fonttext.ltx} currently first loads
478 % the definitions for the \texttt{T1} encoding and then those for the
479 % \texttt{OT1} encoding so that typesetting in \texttt{OT1} is optimized
480 % since that is (still) the default. However, when \texttt{T1} is
481 % explicitly requested (via |\usepackage[T1]{fontenc}|) the
482 % top-level definitions are automatically changed to favour
483 % \texttt{T1} since its declarations are reloaded in the process.
485 % For the same reason default declarations should never come last since
486 % they are implemented as a special encoding themselves (with the
488 % Specifying them last would simply mean to make those encoding-specific
489 % commands equally inefficient in all encodings. Therefore the
490 % \texttt{textcomp} package, for example, first sets up all defaults
491 % to point to \texttt{TS1} and then declares the commands in the
492 % \texttt{TS1} encoding.
497 % \subsection{Docstrip modules}
499 % This |.dtx| file is be used to generate several related files
500 % containing font encoding definitions. The mutually exclusive
501 % docstrip options are listed here.
503 % \begin{tabular}{lp{10cm}}
504 % |T1| & generates |t1enc.def| for the Cork encoding. \\
505 % |TS1| & generates |ts1enc.def| for the Text Companion
507 % |TS1sty| & generates |textcomp.sty|, package that sets up use
508 % of the Text Companion encoding. \\
509 % |OT1| & generates |ot1enc.def| for Knuth's CM encoding. \\
510 % |OMS| & generates |omsenc.def| for Knuth's
511 % math symbol encoding. \\
512 % |OML| & generates |omlenc.def| for Knuth's
513 % math letters encoding. \\
514 % |OT4| & generates |ot4enc.def| for the Polish extension to
515 % the OT1 encoding, created by B.~Jackowski and
516 % M.~Ry\'cko for use with the Polish version of
517 % Computer Modern and Computer Concrete.\\
518 % |package| & generates |fontenc.sty| for
519 % selecting encodings. \\
520 % |2ekernel| & for the kernel commands.\\
523 % \changes{1.0d}{1993/07/17}{changed \cs{catcoding} @}
524 % \changes{1.0f}{1993/08/13}{Protected against active @ sign.}
525 % \changes{1.0g}{1993/08/16}{Needs space after \cs{string}}
526 % \changes{1.1}{1993/12/07}{Protected all special characters with
528 % \changes{1.3}{1993/12/17}{Removed the catcode hackery, since the file
529 % is only read as a package in the preamble, and removed all the
530 % messages on the screen, which just confuse users. Replaced them
531 % by the appropriate \cs{ProvidesPackage} commands. Added XXXenc.}
532 % \changes{1.3b}{1993/12/18}
533 % {Fixed typos with \cs{ProvidesPackage} lines.
534 % Added the \cs{NeedsTeXFormat} line. Added the last argument to
535 % \cs{DeclareEncoding}. Moved the use of the encodings to after their
537 % \changes{1.4a}{1994/04/29}{Removed Rokicki's OT1 variant encoding.
538 % Moved the driver to the top.}
539 % \changes{1.5a}{1994/05/11}{Made T1 and OT1 generate packages rather
540 % than def files. Renamed the `package' module to `teststy'.}
541 % \changes{1.5d}{1994/05/14}{Moved the driver to the top.}
543 % \subsection{Definitions for the kernel}
545 % \subsubsection{Declaration commands}
547 % \changes{1.3}{1993/12/17}{Added this section}
548 % \changes{1.3c}{1993/12/18}{Split \cs{EncodingSpecificAccent} up into
549 % \cs{EncodingSpecific} and \cs{DeclareAccent}.}
550 % \changes{1.4a}{1994/04/29}{Removed \cs{EncodingSpecific}. Renamed
551 % all the commands. Added \cs{DeclareTextGlyph} and
552 % \cs{UndeclareTextCommand}.}
553 % \changes{v1.5a}{1994/05/11}{Reimplemented \cs{DeclareTextCommand}
554 % using \cs{@changed@cmd} and \cs{DeclareProtectedCommand}.}
555 % \changes{v1.5c}{1994/05/14}{Fixed a bug which caused an infinite loop
556 % if \cs{f@encoding} was incorrectly set.}
557 % \changes{v1.5d}{1994/05/14}{Rewrote \cs{DeclareTextCommand} to define
558 % its argument to use the current encoding by default, rather than
559 % the encoding provided to \cs{DeclareTextCommand}.}
560 % \changes{v1.6a}{1994/10/25}{Added the \cs{Provide} commands,
561 % and the default definitions.}
563 % This section contains definitions for commands such as accents which
564 % depend on the current encoding. These commands will usually be kept
565 % in |.def| files, for example |ot1enc.def| contains the definitions
566 % for the |OT1| encoding.
569 \message{font encodings,}
572 % \changes{v1.5d}{1994/10/27}{Rewrote \cs{DeclareTextSymbol} to define
573 % its argument to use the current encoding by default, to fit with
574 % \cs{DeclareTextCommand}.}
576 % \changes{v1.7a}{1994/11/30}{Redefined \cs{@changed@cmd} to expand in
578 % \changes{v1.7a}{1994/11/30}{Removed \cs{@changed@x@mouth} since
579 % \cs{@changed@x} now expands in the mouth.}
581 % \changes{v1.7r}{1995/11/28}{Renamed \cs{@changed@x@err} to
582 % \cs{TextSymbolUnavailable}.}
583 % \changes{v1.7r}{1995/11/28}{Added math mode checks to text commands.}
584 % Far too many macros in one block here!
585 % \begin{macro}{\DeclareTextCommand}
586 % \begin{macro}{\ProvideTextCommand}
587 % \begin{macro}{\DeclareTextSymbol}
588 % \begin{macro}{\@dec@text@cmd}
589 % \begin{macro}{\chardef@text@cmd}
590 % \begin{macro}{\@changed@cmd}
591 % \begin{macro}{\@changed@x}
592 % \begin{macro}{\TextSymbolUnavailable}
593 % \begin{macro}{\@inmathwarn}
596 % \DeclareTextCommand{\foo}{T1}...
598 % then |\foo| is defined to be |\T1-cmd \foo \T1\foo|,
599 % where |\T1\foo| is \emph{one} control sequence, not two!
600 % We then call |\newcommand| to define |\T1\foo|.
602 \def\DeclareTextCommand{%
603 \@dec@text@cmd\newcommand}
607 \def\ProvideTextCommand{%
608 \@dec@text@cmd\providecommand}
612 \def\@dec@text@cmd#1#2#3{%
613 \expandafter\def\expandafter#2%
615 \csname#3-cmd\expandafter\endcsname
617 \csname#3\string#2\endcsname
619 \let\@ifdefinable\@rc@ifdefinable
620 \expandafter#1\csname#3\string#2\endcsname}
622 % \changes{v1.99d}{2004/02/06}{New command added to fix
623 % severe bug: pr/3563}
624 % This command was introduced to fix a major bug
625 % in |\@dec@text@cmd| without changing that command itself.
626 % This was thought to be necessary because it is defined
627 % in more than one package. (Perhaps the more serious bug is to put
628 % complex low-level commands like this in packages?)
630 % The problem it solves is that whereas both |\newcommand| and
631 % |\providecommand| (used just above) both handle the
632 % resetting of |\@ifdefinable| (following its disabling in
633 % |\@dec@text@cmd|), the primitive |\chardef| neither needs the
634 % disabling, nor does the resetting.
637 \def\chardef@text@cmd{%
638 \let\@ifdefinable\@@ifdefinable
641 \def\DeclareTextSymbol#1#2#3{%
642 \@dec@text@cmd\chardef@text@cmd#1{#2}#3\relax
646 % The declarations are only available before |\begin{document}|.
647 % \changes{v1.7h}{1995/05/21}{Added several \cs{@onlypreamble}}
648 % \changes{v1.7k}{1995/06/05}{Removed \cs{protected@cmd} and replaced
649 % with explicit \cs{noexpand}.}
651 \@onlypreamble\DeclareTextCommand
652 \@onlypreamble\DeclareTextSymbol
654 % The sneaky bit in all this is what |\T1-cmd \foo \T1\foo| does.
655 % There are five possibilities, depending on the current values of
656 % |\protect|, |\cf@encoding| and |\ifmmode|:
658 % \item If |\protect| is |\@typeset@protect| and |\cf@encoding| is
659 % |T1|, then we execute |\T1\foo|. This should be the normal
660 % behaviour, and is optimized for speed.
661 % \item If |\protect| is |\@typeset@protect|, |\cf@encoding| is
662 % (say) |OT1|, and |\OT1\foo| is defined, then we execute
664 % \item If |\protect| is |\@typeset@protect|, |\cf@encoding| is
665 % (say) |OT1|, we're in text mode,
666 % and |\OT1\foo| is undefined, then we define
667 % |\OT1\foo| to be the default value of |\foo|, and execute
669 % \item If |\protect| is |\@typeset@protect|, |\cf@encoding| is
670 % (say) |OT1|, we're in math mode,
671 % and |\OT1\foo| is undefined, then we execute the default value
672 % of |\foo|. (This is necessary so that things like
673 % |$X_\copyright$| work properly.)
674 % \item If |\protect| is not |\@typeset@protect| then we execute
675 % |\noexpand\foo|. For example, if we are writing to a file,
676 % then this results in |\foo| being written. If we are in a
677 % |\mark|, then |\foo| will be put in the mark---since |\foo| is
678 % robust, it will then survive all the things which may happen
679 % to it whilst it's a |\mark|.
681 % So after all that, we will either execute the appropriate
682 % definition of |\foo| for the current encoding, or we will execute
685 % The default value of |\foo| is |\?\foo| if it is defined, and an
686 % error message otherwise.
688 % When the encoding is changed from |T1| to |OT1|, |\T1-cmd| is
689 % defined to be |\@changed@cmd| and |\OT1-cmd| is defined to be
690 % |\@current@cmd|. This means that the test for what the current
691 % encoding is can be performed quickly.
693 \def\@current@cmd#1{%
694 \ifx\protect\@typeset@protect
697 \noexpand#1\expandafter\@gobble
702 \def\@changed@cmd#1#2{%
703 \ifx\protect\@typeset@protect
705 \expandafter\ifx\csname\cf@encoding\string#1\endcsname\relax
706 \expandafter\ifx\csname ?\string#1\endcsname\relax
707 \expandafter\def\csname ?\string#1\endcsname{%
708 \TextSymbolUnavailable#1%
711 \global\expandafter\let
712 \csname\cf@encoding \string#1\expandafter\endcsname
713 \csname ?\string#1\endcsname
715 \csname\cf@encoding\string#1%
716 \expandafter\endcsname
721 % \changes{v1.7m}{1995/10/09}{Autoload error}
722 % \changes{v1.7v}{1995/12/05}{Changed \cs{TextSymbolUnavailable} text}
724 \gdef\TextSymbolUnavailable#1{%
726 Command \protect#1 unavailable in encoding \cf@encoding%
729 % The command |\@inmathwarn| produces a warning message if we are
730 % currently in math mode. Note that since this command is used
731 % inside text commands, it can't call |\relax| before the
732 % |\ifmmode|. This means that it is possible for the warning to
733 % fail to be issued at the beginning of a row of an halign whose
734 % template enters math mode. This is probably a bad feature, but
735 % there's not much that can be done about it, since adding a |\relax|
736 % would break ligatures and kerning between text symbols.
738 % A more efficient solution would be to make |\@inmathwarn| and
739 % |\@inmatherr| equal to |\@empty| and |\relax| by default, and
741 % |\everymath| reset them to their usual definitions. This is left
742 % for future investigation (for example it may break some third
747 \@latex@warning{Command \protect#1 invalid in math mode}%
760 % \changes{v1.7k}{1995/06/05}{Allowed \cs{ProvideTextCommandDefault}
761 % after the preamble.}
763 % \begin{macro}{\DeclareTextCommandDefault}
764 % \begin{macro}{\ProvideTextCommandDefault}
765 % These define commands with encoding |?|.
767 % Note that |\DeclareTextCommandDefault| can only be used in the
768 % preamble, but that the |\Provide| version is allowed in inputenc
769 % |.def| files, so is allowed anywhere.
771 \def\DeclareTextCommandDefault#1{%
772 \DeclareTextCommand#1?}
776 \def\ProvideTextCommandDefault#1{%
777 \ProvideTextCommand#1?}
781 \@onlypreamble\DeclareTextCommandDefault
782 %\@onlypreamble\ProvideTextCommandDefault
784 % They require |\?-cmd| to be initialized as |\@changed@cmd|.
786 \expandafter\let\csname?-cmd\endcsname\@changed@cmd
791 % \begin{macro}{\DeclareTextAccent}
792 % \changes{v1.5a}{1994/05/11}
793 % {Reimplemented using \cs{DeclareTextCommand}.}
794 % \changes{v1.7z}{1996/05/23}
795 % {Reimplemented using \cs{add@accent} to save space latex/2133}
796 % This is just a disguise for defining a \TeX~|\accent| command.
798 \def\DeclareTextAccent#1#2#3{%
799 \DeclareTextCommand#1{#2}{\add@accent{#3}}}
803 \@onlypreamble\DeclareTextAccent
807 % \changes{v1.7a}{1994/11/30}{Rewrote \cs{@text@composite} so it
808 % allows an empty argument, or an argument containing lots of
811 % \begin{macro}{\add@accent}
812 % \changes{v1.7z}{1996/05/23}{macro added. latex/2133}
813 % \changes{v1.91}{2000/08/30}{Rearranged but no change to final code,
815 % To save space this code is shared between all text accents that are
816 % set using the |\accent| primitive.
817 % The argument is pre-set in a box so that any
818 % font loading that is needed is already done within the box.
819 % This is needed because font-loading involves grouping and that would
820 % prevent the accent mechanism from working so that the accent would
821 % not be positioned over the argument.
822 % Declarations that change the font should be allowed (only low-level
823 % ones are at present) inside the argument of an accent command,
824 % but not size changes, as they involve |\setbox| operations which
825 % also inhibit the mechanism of the |\accent| primitive.
827 % Note that the whole process is within a group.
828 % \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
830 % For a detailed discussion of this reimplementation and its
831 % deficiencies, see pr/3160.
832 % \task{?}{Improve this and document its problems, see pr/3160}
833 % \changes{v1.9z}{2000/01/30}{Macro reimplemented (pr/3160)}
835 \def\add@accent#1#2{\hmode@bgroup
837 % Turn off the group in |\UseTextSymbol| in case this is used
838 % inside the argument of |\add@accent|.
840 \let\hmode@start@before@group\@firstofone
841 \setbox\@tempboxa\hbox{#2%
843 % When presetting the argument in a box we record its |\spacefactor|
844 % for later use after the accent got typeset. This way something like
845 % |\`A| gets the spacefactor of |A| (i.e., 999) rather than the
846 % default value of 1000.
847 % \changes{v1.9q}{1998/06/12}
848 % {Explicitly set \cs{spacefactor} after \cs{accent} (pr/2877)}
850 \global\mathchardef\accent@spacefactor\spacefactor}%
851 \accent#1 #2\egroup\spacefactor\accent@spacefactor}
853 % Default definition for |\accent@spacefactor| prevents a horrible
854 % death of the above macro inside an unprotected |\edef|.
855 % \changes{v1.9w}{1999/10/28}{Give \cs{accent@spacefactor} a default
856 % definition (pr/3084)}
858 \let\accent@spacefactor\relax
862 % \begin{macro}{\hmode@bgroup}
863 % \changes{v1.9y}{2000/01/30}{Macro added}
865 \def\hmode@bgroup{\leavevmode\bgroup}
870 % \begin{macro}{\DeclareTextCompositeCommand}
871 % \changes{v1.7z}{1996/05/23}
872 % {Modified to cope with new \cs{add@accent} command: required
873 % removal of check for one argument-command}
874 % \begin{macro}{\DeclareTextComposite}
875 % \changes{v1.7l}{1995/06/09}{Rewrote \cs{DeclareTextComposite} to
876 % define the composite as a no-argument command rather than a
877 % two-argument command.}
878 % \begin{macro}{\@text@composite}
879 % \begin{macro}{\@text@composite@x}
880 % \begin{macro}{\@strip@args}
881 % \changes{v1.8c}{1996/10/27}
883 % Another amusing game to play with |\expandafter|, |\csname|, and
884 % |\string|. When you say
885 % |\DeclareTextCompositeCommand{\foo}{T1}{a}{bar}|, we look to see
886 % if the expansion of |\T1\foo| begins with |\@text@composite|, and
887 % if it doesn't, we redefine |\T1\foo| to be:
889 % #1 -> \@text@composite \T1\foo #1\@empty \@text@composite {...}
892 % previous definition of |\T1\foo|. Finally, we define |\\T1\foo-a|
893 % to expand to |bar|.
895 \def\DeclareTextCompositeCommand#1#2#3#4{%
896 \expandafter\let\expandafter\reserved@a\csname#2\string#1\endcsname
897 \expandafter\expandafter\expandafter\ifx
898 \expandafter\@car\reserved@a\relax\relax\@nil \@text@composite \else
899 \edef\reserved@b##1{%
900 \def\expandafter\noexpand
901 \csname#2\string#1\endcsname####1{%
902 \noexpand\@text@composite
903 \expandafter\noexpand\csname#2\string#1\endcsname
904 ####1\noexpand\@empty\noexpand\@text@composite
906 \expandafter\reserved@b\expandafter{\reserved@a{##1}}%
908 \expandafter\def\csname\expandafter\string\csname
909 #2\endcsname\string#1-\string#3\endcsname{#4}}
913 \@onlypreamble\DeclareTextCompositeCommand
915 % This all works because:
917 % \@text@composite \T1\foo A\@empty \@text@composite {...}
920 % |\\T1\foo-A| if |\\T1\foo-A| has been defined, and |{...}|
923 % Note that |\@text@composite| grabs the first token of the
924 % argument and puts just that in the
925 % csname. This is so that |\'{\textit{e}}| will work---it checks
926 % whether |\\T1\'-\textit| is defined (which presumably it isn't)
927 % and so expands to |{\accent 1 \textit{e}}|.
929 % This trick won't always work, for example |\'{{\itshape e}}| will
930 % expand to (with spaces added for clarity):
932 % \csname \string \T1\' - \string {\itshape e} \@empty \endcsname
934 % which will die pretty horribly. Unfortunately there's not much
935 % can be done about this if we're going to use |\csname| lookups as a
936 % fast way of accessing composites.
938 % This has an unfortunate `misfeature' though, which is that in
939 % the T1 encoding, |\'{aa}| produces \'a. This is not the expected
940 % behaviour, and should perhaps be fixed if the fix doesn't affect
941 % performance too badly.
943 % Finally, it's worth noting that the |\@empty| is used in
944 % |\@text@composite| so that accents will work even when the
945 % argument is empty. If you say |\'{}| then this looks up
946 % |\\T1\'-\@empty|, which ought to be |\relax|, and so all is well.
947 % If we didn't include the |\@empty|, then |\'{}| would expand to:
949 % \csname \string \T1\' - \string \endcsname
951 % so the |\endcsname| would be |\string|'ed and the whole of the
952 % rest of the document would be put inside the |\csname|. This
955 \def\@text@composite#1#2#3\@text@composite{%
956 \expandafter\@text@composite@x
957 \csname\string#1-\string#2\endcsname}
960 % \changes{v1.7z}{1996/05/23}
961 % {\cs{expandafter} added to match other changes for latex/2133}
962 % \changes{v1.9r}{1999/01/06}{New impl for latex/2930}
963 % \changes{v1.9s}{1999/01/13}{Simplified solution for latex/2930}
964 % Originally the |\@text@composite@x| macro had two arguments and if
965 % |#1| was not |\relax| it was executed, otherwise |#2| was executed.
966 % All this happened within the |\ifx| code so that neither |#1|
967 % nor |#2| could have picked up any additional arguments form
969 % This has now being changed using the typical |\@firstoftwo| /
970 % |\@secondoftwo| coding. This way the
971 % final expansion will happen without any |\else| or |\fi|
972 % intervening in the case that we need to get a further token
973 % from the input stream.
975 \def\@text@composite@x#1{%
977 \expandafter\@secondoftwo
979 \expandafter\@firstoftwo
983 % The command |\DeclareTextComposite| uses
984 % |\DeclareTextCompositeCommand| to declare a command which
985 % expands out to a single glyph.
986 % \changes{v1.8a}{1996/07/19}
987 % {Use char 0 not @ as carrier for \cs{lowercase} /2197}
993 \def\DeclareTextComposite#1#2#3#4{%
994 \def\reserved@a{\DeclareTextCompositeCommand#1{#2}{#3}}%
1003 \catcode\z@=15\relax
1007 \@onlypreamble\DeclareTextComposite
1015 % \begin{macro}{\UseTextAccent}
1016 % \begin{macro}{\UseTextSymbol}
1017 % \changes{v1.7p}{1995/11/17}{Support \cs{@wrong@font@char} latex/1676}
1018 % \changes{v1.7q}{1995/11/18}{Modify message slightly}
1019 % \begin{macro}{\@use@text@encoding}
1020 % \changes{v1.91}{2000/08/30}{Rearranged but no change to final code,
1022 % These fragile commands access glyphs from different encodings.
1023 % They use grotty low-level calls to the font selection scheme for
1024 % speed, and in order to make sure that |\UseTextSymbol| doesn't
1025 % do anything which you're not allowed to do between an |\accent|
1028 % For a detailed discussion of this reimplementation and its
1029 % deficiencies, see pr/3160.
1030 % \task{?}{Improve this and document its problems, see pr/3160}
1031 % \changes{v1.9z}{2000/01/30}{Macro reimplemented (pr/3160)}
1033 \def\UseTextAccent#1#2#3{%
1034 \hmode@start@before@group
1037 % Turn off the group in |\UseTextSymbol| in case this is used
1038 % inside the arguments of |\UseTextAccent|.
1040 \let\hmode@start@before@group\@firstofone
1041 \let\@curr@enc\cf@encoding
1042 \@use@text@encoding{#1}%
1043 #2{\@use@text@encoding\@curr@enc#3}%
1047 % \changes{v1.9z}{2000/01/30}{Macro reimplemented (pr/3160)}
1049 \def\UseTextSymbol#1#2{%
1050 \hmode@start@before@group
1052 \def\@wrong@font@char{\MessageBreak
1053 for \noexpand\symbol`\string#2'}%
1054 \@use@text@encoding{#1}%
1061 \def\@use@text@encoding#1{%
1062 \edef\f@encoding{#1}%
1064 \csname\curr@fontshape/\f@size\endcsname}%
1073 % \begin{macro}{\hmode@start@before@group}
1074 % The |\hmode@start@before@group| starts hmode and should be
1075 % immediately followed by an explicit |{...}|. Its purpose is to
1076 % ensure that hmode is started before this group is opened. Inside
1077 % |\add@accent| and |\UseTextAccent| it is redefined to remove this
1078 % group so that it doesn't conflict with the |\accent| primitive.
1080 % For a detailed discussion see pr/3160.
1081 % \changes{v1.9z}{2000/01/30}{Macro added (pr/3160)}
1083 \let\hmode@start@before@group\leavevmode
1087 % \begin{macro}{\DeclareTextSymbolDefault}
1088 % \begin{macro}{\DeclareTextAccentDefault}
1089 % Some syntactic sugar. Again, these should probably be optimized
1092 \def\DeclareTextSymbolDefault#1#2{%
1093 \DeclareTextCommandDefault#1{\UseTextSymbol{#2}#1}}
1097 \def\DeclareTextAccentDefault#1#2{%
1098 \DeclareTextCommandDefault#1{\UseTextAccent{#2}#1}}
1102 \@onlypreamble\DeclareTextSymbolDefault
1103 \@onlypreamble\DeclareTextAccentDefault
1109 % \begin{macro}{\UndeclareTextCommand}
1110 % This command safely removes and encoding specific declaration
1111 % for a given encoding. It is helpful if one intends to use the
1112 % default definition always and therefore wants to get rid of
1113 % a declaration for some specific encoding.
1114 % \changes{v1.9o}{1998/03/20}{Macro added for pr/2783}
1116 \def\UndeclareTextCommand#1#2{%
1118 % If there is no declaration for the current encoding do nothing.
1119 % (This makes a hash table entry but without e\TeX{} we can't do
1120 % anything about that).
1122 \expandafter\ifx\csname#2\string#1\endcsname\relax
1125 % Else: throw away that declaration.
1127 \global\expandafter\let\csname#2\string#1\endcsname
1130 % But this is unfortunately not enough, we have to take a look
1131 % at the top-level definition of the encoding specific command
1132 % which for a command |\foo| would look similar to
1133 % |\T1-cmd \foo \T1\foo| (three tokens).
1135 % Of course, instead of |T1| one could see a different encoding name;
1136 % which one depends the encoding for which |\foo| was declared
1139 % Now assume we have just removed the declaration for |\foo| in |T1|
1140 % and the top-level of |\foo| expands to the above. Then we better
1141 % change that pretty fast otherwise we do get an ``undefined csname
1142 % error'' when we try to typeset |\foo| within |T1| instead of
1143 % getting the default definition for |\foo|.
1144 % And what is the best way to change that top-level definition? Well,
1145 % the only ``encoding'' we know for sure will still be around is
1146 % the default encoding denoted by |?|.
1148 % Thus in case the last token of the top-level expansion
1149 % is now undefined we change the declaration to look like
1150 % |\?-cmd \foo \?\foo| which is done by the following
1153 \expandafter\expandafter\expandafter
1154 \ifx\expandafter\@thirdofthree#1\@undefined
1155 \expandafter\gdef\expandafter#1\expandafter
1156 {\csname ?-cmd\expandafter\endcsname\expandafter
1157 #1\csname?\string#1\endcsname}%
1164 \@onlypreamble\UndeclareTextCommand
1169 % \subsubsection{Hyphenation}
1171 % \changes{v1.5l}{1994/10/18}{Added new definitions of \cs{patterns}
1172 % and \cs{hyphenation}.}
1173 % \changes{v1.6g}{1994/11/05}{Added setting of \cs{@typeset@protect}
1174 % to \cs{patterns} and \cs{hyphenation}.}
1175 % \changes{v1.6g}{1994/11/30}{Removed new definitions of \cs{patterns}
1176 % and \cs{hyphenation}, since encoding-specific commands now expand
1179 % \begin{macro}{\patterns}
1180 % \begin{macro}{\@@patterns}
1181 % \begin{macro}{\hyphenation}
1182 % \begin{macro}{\@@hyphenation}
1183 % We redefine |\patterns| and |\hyphenation| to allow the use of
1184 % commands declared with |\DeclareText*| to be used inside them.
1186 %\let\@@patterns\patterns
1187 %\let\@@hyphenation\hyphenation
1190 % \let\protect\@empty
1191 % \let\@typeset@protect\@empty
1192 % \let\@changed@x\@changed@x@mouth
1193 % \afterassignment\egroup
1198 % \let\protect\@empty
1199 % \let\@typeset@protect\@empty
1200 % \let\@changed@x\@changed@x@mouth
1201 % \afterassignment\egroup
1210 % \subsubsection{Miscellania}
1212 % \changes{1.4a}{1994/05/01}{Added the \cs{a} command.}
1213 % \changes{1.7a}{1994/11/30}{Redefined \cs{a} for the new scheme.}
1214 % \changes{1.7b}{1994/12/02}{Redefined \cs{a} properly.}
1215 % \changes{1.7g}{1995/03/03}{Corrected an error in documentation
1216 % referring to the tabular rather than the tabbing
1218 % \changes{v1.7n}{1995/11/02}{Changed internal name \cs{a} to
1219 % \cs{@tabacckludge} to protect against redefinition by malicious
1223 % The |\a| command is used to access the accent commands even when
1224 % they have been redefined (for example by the |tabbing|
1225 % environment). Its internal name is |\@tabacckludge|.
1227 % The |\string| within the |\csname| guards against something
1228 % like |'| being active at the point of use.
1229 % \changes{v1.9r}{1998/09/19}{Added \cs{string} (pr/2878)}
1231 \def\@tabacckludge#1{\expandafter\@changed@cmd
1232 \csname\string#1\endcsname\relax}
1233 \let\a=\@tabacckludge
1237 % \changes{v1.6a}{1994/10/25}{Added the files OT1enc.def, T1enc.def and
1239 % \changes{v1.6b}{1994/10/27}{Removed the files OT1enc.def, T1enc.def
1242 % \subsubsection{Default encodings}
1244 % We define the default encodings for most commands to be either OT1,
1245 % OML or OMS. These defaults are in the kernel and therefore
1246 % fonts with these encodings must be available unless these
1247 % defaults are redefined elsewhere. Recall that the standard kernel
1248 % loads the encoding files for these encodings, and also that for
1251 % The naming conventions in the kernel are not what we would use if we
1252 % were starting from scratch\dots\
1253 % Those defined by DEK (like |\ae| and |\ss|) or by the \TeX{} Users
1254 % Group Technical Working Group on multi-lingual typesetting (like
1255 % |\th| and |\ng|) have short names. Those which were added to the
1256 % kernel in 1993 and early 1994 are named after their Adobe glyph
1257 % names (like |\guillemotleft| and |\quotedblbase|). Unfortunately,
1258 % this naming scheme won't work for all glyphs, since some names (like
1259 % |\space|) are already used, and some (like |\endash|) are very
1260 % likely to be defined by users. So we're now using the naming scheme
1261 % of |\text| followed by the Adobe name, (like |\textendash| and
1262 % |\textsterling|). Except that some glyphs don't have Adobe names,
1263 % so we're using the names used by fontinst for those (like
1264 % |\textcompwordmark|). Sigh.
1266 % \changes{v1.6a}{1994/10/25}{Added the defaults.}
1267 % \changes{v1.6b}{1994/10/27}{Added more defaults for OT1.}
1268 % \changes{v1.6c}{1994/10/29}{Added commands like \cs{dots} for use in
1271 % Some accents from OT1:
1273 \DeclareTextAccentDefault{\"}{OT1}
1274 \DeclareTextAccentDefault{\'}{OT1}
1275 \DeclareTextAccentDefault{\.}{OT1}
1276 \DeclareTextAccentDefault{\=}{OT1}
1277 \DeclareTextAccentDefault{\H}{OT1}
1278 \DeclareTextAccentDefault{\^}{OT1}
1279 \DeclareTextAccentDefault{\`}{OT1}
1280 \DeclareTextAccentDefault{\b}{OT1}
1281 \DeclareTextAccentDefault{\c}{OT1}
1282 \DeclareTextAccentDefault{\d}{OT1}
1283 \DeclareTextAccentDefault{\r}{OT1}
1284 \DeclareTextAccentDefault{\u}{OT1}
1285 \DeclareTextAccentDefault{\v}{OT1}
1286 \DeclareTextAccentDefault{\~}{OT1}
1288 % Some symbols from OT1:
1289 % \changes{v1.8c}{1996/10/27}
1290 % {Removed \cs{aa} and \cs{AA}}
1292 %\DeclareTextSymbolDefault{\AA}{OT1}
1293 \DeclareTextSymbolDefault{\AE}{OT1}
1294 \DeclareTextSymbolDefault{\L}{OT1}
1295 \DeclareTextSymbolDefault{\OE}{OT1}
1296 \DeclareTextSymbolDefault{\O}{OT1}
1297 %\DeclareTextSymbolDefault{\aa}{OT1}
1298 \DeclareTextSymbolDefault{\ae}{OT1}
1299 \DeclareTextSymbolDefault{\i}{OT1}
1300 \DeclareTextSymbolDefault{\j}{OT1}
1302 % \changes{v1.99h}{2005/11/08}
1303 % {Added \cs{ij} and \cs{IJ} from babel. (pr/3771)}
1305 \DeclareTextSymbolDefault{\ij}{OT1}
1306 \DeclareTextSymbolDefault{\IJ}{OT1}
1309 \DeclareTextSymbolDefault{\l}{OT1}
1310 \DeclareTextSymbolDefault{\oe}{OT1}
1311 \DeclareTextSymbolDefault{\o}{OT1}
1312 \DeclareTextSymbolDefault{\ss}{OT1}
1313 \DeclareTextSymbolDefault{\textdollar}{OT1}
1314 \DeclareTextSymbolDefault{\textemdash}{OT1}
1315 \DeclareTextSymbolDefault{\textendash}{OT1}
1316 \DeclareTextSymbolDefault{\textexclamdown}{OT1}
1317 %\DeclareTextSymbolDefault{\texthyphenchar}{OT1}
1318 %\DeclareTextSymbolDefault{\texthyphen}{OT1}
1319 \DeclareTextSymbolDefault{\textquestiondown}{OT1}
1320 \DeclareTextSymbolDefault{\textquotedblleft}{OT1}
1321 \DeclareTextSymbolDefault{\textquotedblright}{OT1}
1322 \DeclareTextSymbolDefault{\textquoteleft}{OT1}
1323 \DeclareTextSymbolDefault{\textquoteright}{OT1}
1324 \DeclareTextSymbolDefault{\textsterling}{OT1}
1326 % Some symbols from OMS:
1327 % \changes{v1.7t}{1995/11/29}{Added \cs{textbackslash} and
1329 % \changes{v1.8c}{1996/10/27}
1330 % {Added \cs{textasteriskcentered}}
1331 % \changes{v1.95}{2002/06/16}{Added default for \cs{textbardbl} (pr/3400)}
1333 \DeclareTextSymbolDefault{\textasteriskcentered}{OMS}
1334 \DeclareTextSymbolDefault{\textbackslash}{OMS}
1335 \DeclareTextSymbolDefault{\textbar}{OMS}
1336 \DeclareTextSymbolDefault{\textbardbl}{OMS}
1337 \DeclareTextSymbolDefault{\textbraceleft}{OMS}
1338 \DeclareTextSymbolDefault{\textbraceright}{OMS}
1339 \DeclareTextSymbolDefault{\textbullet}{OMS}
1340 \DeclareTextSymbolDefault{\textdaggerdbl}{OMS}
1341 \DeclareTextSymbolDefault{\textdagger}{OMS}
1342 \DeclareTextSymbolDefault{\textparagraph}{OMS}
1343 \DeclareTextSymbolDefault{\textperiodcentered}{OMS}
1344 \DeclareTextSymbolDefault{\textsection}{OMS}
1345 \DeclareTextAccentDefault{\textcircled}{OMS}
1348 % \changes{v1.6d}{1994/10/30}{Added OML encoding.}
1349 % \changes{v1.6d}{1994/10/30}{Made \cs{textless} and \cs{textgreater}
1351 % \changes{v1.6d}{1994/10/30}{Added \cs{t}.}
1352 % \changes{v1.7k}{1995/06/05}{Commented out \cs{textless} and
1353 % \cs{textgreater}.}
1355 % Some symbols from OML:
1356 % \changes{v1.7t}{1995/11/29}{Added \cs{textless} and
1357 % \cs{textgreater}.}
1359 \DeclareTextSymbolDefault{\textless}{OML}
1360 \DeclareTextSymbolDefault{\textgreater}{OML}
1361 \DeclareTextAccentDefault{\t}{OML}
1364 % \changes{v1.6d}{1994/10/30}{Added \cs{textcircled}.}
1365 % \changes{v1.6d}{1994/10/30}{Rewrote \cs{copyright} to use
1366 % \cs{textcircled}.}
1367 % \changes{v1.6d}{1994/10/30}{Removed \cs{textregistered}.}
1368 % \changes{v1.7k}{1995/06/05}{Save some tokens in
1369 % \cs{textvisiblespace} and \cs{textunderscore}.}
1370 % \changes{v1.7t}{1995/11/29}{Added \cs{textasciicircum},
1371 % \cs{textasciitilde}, \cs{textregistered} and \cs{texttrademark}.}
1372 % \changes{v1.7u}{1995/12/01}{Made \cs{SS} a Default, rather than
1373 % having the default point to the OT1 definition.}
1374 % \changes{v1.7w}{1995/12/11}{Modified \cs{copyright}}
1375 % \changes{v1.9a}{1997/04/30}{Introduced \cs{textcopyright} and modified
1378 % Some defaults we can fake.
1380 % The interface for defining |\copyright| changed, it used to
1381 % use |\expandafter| to add braces at the appropriate points.
1383 \DeclareTextCommandDefault{\textcopyright}{\textcircled{c}}
1384 % \expandafter\def\expandafter
1385 % \copyright\expandafter{\expandafter{\copyright}}
1388 % \changes{v1.9a}{1997/04/30}{Modified \cs{textunderscore}, removing
1389 % \cs{mathunderscore}}
1390 % \changes{v1.9b}{1997/04/30}{Added \cs{leavevmode} to
1391 % \cs{textunderscore}}
1392 % \changes{v1.9d}{1997/05/07}{Added \cs{leavevmode} to
1393 % \cs{textcompwordmark}}
1395 \DeclareTextCommandDefault{\textasciicircum}{\^{}}
1396 \DeclareTextCommandDefault{\textasciitilde}{\~{}}
1397 \DeclareTextCommandDefault{\textcompwordmark}{\leavevmode\kern\z@}
1398 \DeclareTextCommandDefault{\textunderscore}{%
1399 \leavevmode \kern.06em\vbox{\hrule\@width.3em}}
1403 \DeclareTextCommandDefault{\textvisiblespace}{%
1404 \mbox{\kern.06em\vrule \@height.3ex}%
1405 \vbox{\hrule \@width.3em}%
1406 \hbox{\vrule \@height.3ex}}
1409 % Using |\fontdimen3| in the next definition is some sort of a
1410 % kludge (since it is the interword stretch) but it makes the
1411 % ellipsis come out right in mono-spaced fonts too (since there it
1414 \DeclareTextCommandDefault{\textellipsis}{%
1415 .\kern\fontdimen3\font
1416 .\kern\fontdimen3\font
1417 .\kern\fontdimen3\font}
1420 % \changes{v1.9a}{1997/04/30}{Changed \cs{textsc} to \cs{scshape}}
1421 % \changes{v1.95}{2002/06/18}{Changed def for \cs{textregistered} to
1422 % avoid small caps (pr/3420)}
1424 %\DeclareTextCommandDefault{\textregistered}{\textcircled{\scshape r}}
1425 \DeclareTextCommandDefault{\textregistered}{\textcircled{%
1426 \check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont R}}
1427 \DeclareTextCommandDefault{\texttrademark}{\textsuperscript{TM}}
1428 \DeclareTextCommandDefault{\SS}{SS}
1431 % \changes{v1.9n}{1998/03/05}{Added masc/fem ords as in pr/2579}
1433 \DeclareTextCommandDefault{\textordfeminine}{\textsuperscript{a}}
1434 \DeclareTextCommandDefault{\textordmasculine}{\textsuperscript{o}}
1437 % \subsubsection{Math material}
1439 % Some commands can be used in both text and math mode:
1441 \DeclareRobustCommand{\$}{\ifmmode\mathdollar\else\textdollar\fi}
1442 \DeclareRobustCommand{\{}{\ifmmode\lbrace\else\textbraceleft\fi}
1443 \DeclareRobustCommand{\}}{\ifmmode\rbrace\else\textbraceright\fi}
1444 \DeclareRobustCommand{\P}{\ifmmode\mathparagraph\else\textparagraph\fi}
1445 \DeclareRobustCommand{\S}{\ifmmode\mathsection\else\textsection\fi}
1446 \DeclareRobustCommand{\dag}{\ifmmode{\dagger}\else\textdagger\fi}
1447 \DeclareRobustCommand{\ddag}{\ifmmode{\ddagger}\else\textdaggerdbl\fi}
1450 % For historical reasons |\copyright|
1451 % needs |{}| around the definition in maths.
1453 % \changes{v1.6f}{1994/11/04}{Added \cmd\_.}
1455 % \changes{v1.9a}{1997/04/30}{Modified \cs{underscore}, removing
1456 % \cs{mathunderscore}}
1457 % \changes{v1.9a}{1997/04/30}{Introduced \cs{textcopyright} and modify
1460 \DeclareRobustCommand{\_}{%
1461 \ifmmode\nfss@text{\textunderscore}\else\textunderscore\fi}
1462 \DeclareRobustCommand{\copyright}{%
1463 \ifmmode{\nfss@text{\textcopyright}}\else\textcopyright\fi}
1464 \DeclareRobustCommand{\pounds}{%
1465 \ifmmode\mathsterling\else\textsterling\fi}
1469 \DeclareRobustCommand{\dots}{%
1470 \ifmmode\mathellipsis\else\textellipsis\fi}
1476 % \changes{v1.99m}{2015/02/16}{Added \cs{textcommabelow} latex/4414}
1477 % Default definition of comma below.
1480 %<latexrelease>\IncludeInRelease{2015/10/01}{\textcommabelow}{comma accent}%
1481 %<*2ekernel|latexrelease>
1482 \DeclareTextCommandDefault\textcommabelow[1]
1483 {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\raise-.31ex
1484 \hbox{\check@mathfonts\fontsize\ssf@size\z@
1485 \math@fontsfalse\selectfont,}\hidewidth}\egroup}
1486 %<latexrelease>\EndIncludeInRelease
1487 %</2ekernel|latexrelease>
1488 %<latexrelease>\IncludeInRelease{0000/00/00}{\textcommabelow}{comma accent}%
1489 %<latexrelease>\let\textcommabelow\@undefined
1490 %<latexrelease>\EndIncludeInRelease
1493 % \changes{v1.6d}{1994/10/30}{Moved math commands here from ltmath.}
1494 % \changes{v1.6f}{1994/11/04}{Added \cs{mathunderscore}.}
1495 % \changes{v1.7k}{1995/06/05}{Moved math commands to fontdef.dtx.}
1498 % \changes{1.4a}{1994/05/01}{Added the \cs{SaveAtCatcode} and
1499 % \cs{RestoreAtCatcode} commands.}
1501 % \changes{1.5a}{1994/05/12}{Removed the \cs{SaveAtCatcode} and
1502 % \cs{RestoreAtCatcode} commands.}
1505 % \subsection{Definitions for the OT1 encoding}
1507 % \changes{1.3}{1993/12/17}{Removed all the hackery for use in
1508 % \cs{DeclareFontEncoding}, and redid everything using
1509 % \cs{DeclareTextFoo}.}
1510 % \changes{1.3b}{1993/12/18}{Replaced the missing last argument to
1511 % \cs{DeclareFontEncoding}.}
1512 % \changes{1.3c}{1993/12/18}{Rewrote for the new syntax of
1513 % \cs{EncodingSpecific}.}
1514 % \changes{1.4a}{1994/05/01}{Rewrote for the new syntax.}
1515 % \changes{1.5a}{1994/05/12}{Rewrote for the new syntax.}
1516 % \changes{1.5h}{1994/05/16}{\cs{pounds} was still using u rather than
1518 % \changes{1.6b}{1994/10/27}{Added:
1521 % \cs{textexclamdown}
1522 % \cs{texthyphenchar}
1524 % \cs{textquestiondown}
1525 % \cs{textquotedblleft}
1526 % \cs{textquotedblright}
1527 % \cs{textquoteleft}
1528 % \cs{textquoteright}
1531 % The definitions for the `\TeX{} text' (OT1) encoding.
1533 % Declare the encoding.
1536 \DeclareFontEncoding{OT1}{}{}
1538 % Declare the accents.
1540 \DeclareTextAccent{\"}{OT1}{127}
1541 \DeclareTextAccent{\'}{OT1}{19}
1542 \DeclareTextAccent{\.}{OT1}{95}
1543 \DeclareTextAccent{\=}{OT1}{22}
1544 \DeclareTextAccent{\^}{OT1}{94}
1545 \DeclareTextAccent{\`}{OT1}{18}
1546 \DeclareTextAccent{\~}{OT1}{126}
1547 \DeclareTextAccent{\H}{OT1}{125}
1548 \DeclareTextAccent{\u}{OT1}{21}
1549 \DeclareTextAccent{\v}{OT1}{20}
1550 \DeclareTextAccent{\r}{OT1}{23}
1552 % Some accents have to be built by hand:
1553 % Note that |\ooalign| and |\o@lign| must be inside a group.
1554 % \changes{v1.7j}{1995/05/21}{Updated some plain macros}
1555 % \changes{v1.7o}{1995/11/07}{Added \cs{leavevmode} at start of
1556 % \cs{c}, otherwise the output routine might be invoked within the
1558 % \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
1560 % \changes{v1.99g}{2005/09/27}{Replace \cs{sh@ft} by \cs{ltx@sh@ft}}
1561 % In these definitions we no longer use the helper function |\sh@ft|
1562 % from plain.tex since that now has two incompatible definitions.
1564 \DeclareTextCommand{\b}{OT1}[1]
1565 {\hmode@bgroup\o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-3ex}%
1566 \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}\egroup}
1567 \DeclareTextCommand{\c}{OT1}[1]
1568 {\leavevmode\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent24 #1%
1569 \else{\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi}
1570 \DeclareTextCommand{\d}{OT1}[1]
1572 \o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-1ex}.\hidewidth}\egroup}
1575 % Declare the text symbols.
1577 \DeclareTextSymbol{\AE}{OT1}{29}
1578 \DeclareTextSymbol{\OE}{OT1}{30}
1579 \DeclareTextSymbol{\O}{OT1}{31}
1580 \DeclareTextSymbol{\ae}{OT1}{26}
1581 \DeclareTextSymbol{\i}{OT1}{16}
1582 \DeclareTextSymbol{\j}{OT1}{17}
1583 \DeclareTextSymbol{\oe}{OT1}{27}
1584 \DeclareTextSymbol{\o}{OT1}{28}
1585 \DeclareTextSymbol{\ss}{OT1}{25}
1586 \DeclareTextSymbol{\textemdash}{OT1}{124}
1587 \DeclareTextSymbol{\textendash}{OT1}{123}
1589 % Using the ligatures helps with OT1 fonts that have
1590 % |\textexclamdown| and |\textquestiondown| in unusual positions.
1591 % \changes{v1.95}{2002/06/17}{Definition of \cs{textexclamdown} changed (pr/3368)}
1592 % \changes{v1.95}{2002/06/17}{Definition of \cs{textquestiondown} changed (pr/3368)}
1594 %\DeclareTextSymbol{\textexclamdown}{OT1}{60}
1595 %\DeclareTextSymbol{\textquestiondown}{OT1}{62}
1596 \DeclareTextCommand{\textexclamdown}{OT1}{!`}
1597 \DeclareTextCommand{\textquestiondown}{OT1}{?`}
1598 %\DeclareTextSymbol{\texthyphenchar}{OT1}{`\-}
1599 %\DeclareTextSymbol{\texthyphen}{OT1}{`\-}
1600 \DeclareTextSymbol{\textquotedblleft}{OT1}{92}
1601 \DeclareTextSymbol{\textquotedblright}{OT1}{`\"}
1602 \DeclareTextSymbol{\textquoteleft}{OT1}{`\`}
1603 \DeclareTextSymbol{\textquoteright}{OT1}{`\'}
1605 % Some symbols which are faked from others:
1606 % \changes{v1.7o}{1995/11/07}{Changed \cs{char}32 to \cs{@xxxii} (two
1608 % \changes{v1.7o}{1995/11/07}{Replaced octal number 27 by decimal
1609 % number 23 to protect against the quote character being active.}
1610 % \changes{v1.7o}{1995/11/07}{Replaced some 0's by \cs{z@} (faster).}
1611 % \changes{v1.8c}{1996/10/27}
1612 % {Removed \cs{aa} and \cs{AA}}
1613 % \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
1616 % \DeclareTextCommand{\aa}{OT1}
1618 \DeclareTextCommand{\L}{OT1}
1619 {\leavevmode\setbox\z@\hbox{L}\hb@xt@\wd\z@{\hss\@xxxii L}}
1620 \DeclareTextCommand{\l}{OT1}
1621 {\hmode@bgroup\@xxxii l\egroup}
1622 % \DeclareTextCommand{\AA}{OT1}
1623 % {\leavevmode\setbox\z@\hbox{h}\dimen@\ht\z@\advance\dimen@-1ex%
1624 % \rlap{\raise.67\dimen@\hbox{\char23}}A}
1626 % In the OT1 encoding \r A has a hand-crafted definition, so we
1627 % have here the first recorded explicit use of
1628 % |\DeclareTextCompositeCommand|.
1629 % \changes{v1.8c}{1996/10/27}
1631 % \changes{v1.96}{2002/10/28}{%
1632 % coding change, to follow bug fix by DEK in plain.tex (pr/3469)}
1634 \DeclareTextCompositeCommand{\r}{OT1}{A}
1635 {\leavevmode\setbox\z@\hbox{!}\dimen@\ht\z@\advance\dimen@-1ex%
1636 \rlap{\raise.67\dimen@\hbox{\char23}}A}
1638 % \changes{v1.99h}{2005/11/08}
1639 % {Added \cs{ij} and \cs{IJ} from babel. (pr/3771)}
1640 % The dutch language uses the letter `ij'. It is available in
1641 % \texttt{T1} encoded fonts, but not in the \texttt{OT1} encoded
1642 % fonts. Therefor we fake it for the \texttt{OT1} encoding.
1644 \DeclareTextCommand{\ij}{OT1}{%
1645 \nobreak\hskip\z@skip i\kern-0.02em j\nobreak\hskip\z@skip}
1646 \DeclareTextCommand{\IJ}{OT1}{%
1647 \nobreak\hskip\z@skip I\kern-0.02em J\nobreak\hskip\z@skip}
1649 % In the OT1 encoding, \pounds~and \$ share a slot.
1650 % \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
1653 \DeclareTextCommand{\textdollar}{OT1}{\hmode@bgroup
1654 \ifdim \fontdimen\@ne\font >\z@
1663 \DeclareTextCommand{\textsterling}{OT1}{\hmode@bgroup
1664 \ifdim \fontdimen\@ne\font >\z@
1667 \fontshape{ui}\selectfont
1672 % Here we are adding some more composite commands to the |OT1|
1673 % encoding. This makes the use of certain accents with |i|
1674 % compatible with their use with the |T1| encoding; this
1675 % enables them to become true \LaTeX{} internal representations.
1676 % However, it will make these accents work a little less fast since
1677 % a check will always be made for the existence of a composite.
1679 % \changes{v1.93}{2001/05/28}{Added composites for compatibility with
1681 % \changes{v1.94}{2001/06/05}{Text composite Commands need kludges for
1682 % `,' -- see tlb1903.lvt}
1684 \DeclareTextComposite{\.}{OT1}{i}{`\i}
1685 \DeclareTextComposite{\.}{OT1}{\i}{`\i}
1686 \DeclareTextCompositeCommand{\`}{OT1}{i}{\@tabacckludge`\i}
1687 \DeclareTextCompositeCommand{\'}{OT1}{i}{\@tabacckludge'\i}
1688 \DeclareTextCompositeCommand{\^}{OT1}{i}{\^\i}
1689 \DeclareTextCompositeCommand{\"}{OT1}{i}{\"\i}
1696 % \subsection{Definitions for the T1 encoding}
1698 % \changes{1.3}{1993/12/17}{Removed all the hackery for use in
1699 % \cs{DeclareFontEncoding}, and redid everything using
1700 % \cs{DeclareTextFoo}.}
1701 % \changes{1.3b}{1993/12/18}{Replaced the missing last argument to
1702 % \cs{DeclareFontEncoding}.}
1703 % \changes{1.3c}{1993/12/18}{Rewrote for the new syntax of
1704 % \cs{EncodingSpecific}.}
1705 % \changes{1.4a}{1994/05/01}{Rewrote for the new syntax.}
1706 % \changes{1.5a}{1994/05/12}{Rewrote for the new syntax.}
1707 % \changes{1.6a}{1994/10/25}{Added \cs{textdollar},
1708 % \cs{textlbrace}, \cs{textrbrace}, \cs{textsterling},
1709 % \cs{textunderline}.}
1710 % \changes{1.6a}{1994/10/25}{Removed
1711 % \cs{textlbrace}, \cs{textrbrace}, \cs{textunderline} to give them
1712 % their proper names.}
1713 % \changes{1.6b}{1994/10/27}{Added
1714 % \cs{textasciicircum}
1715 % \cs{textasciitilde}
1716 % \cs{textbackslash}
1718 % \cs{textbraceleft}
1719 % \cs{textbraceright}
1720 % \cs{textcompwordmark}
1723 % \cs{textexclamdown}
1725 % \cs{texthyphenchar}
1728 % \cs{textquestiondown}
1729 % \cs{textquotedblleft}
1730 % \cs{textquotedblright}
1732 % \cs{textquoteleft}
1733 % \cs{textquoteright}
1734 % \cs{textunderscore}
1735 % \cs{textvisiblespace}
1737 % \changes{v1.9h}{1997/12/17}
1738 % {Added \cs{textperthousand} and \cs{textpertenthousand}}
1740 % The definitions for the `Extended \TeX{} text' (T1) encoding.
1742 % Declare the encoding.
1745 \DeclareFontEncoding{T1}{}{}
1747 % Declare the accents.
1749 \DeclareTextAccent{\`}{T1}{0}
1750 \DeclareTextAccent{\'}{T1}{1}
1751 \DeclareTextAccent{\^}{T1}{2}
1752 \DeclareTextAccent{\~}{T1}{3}
1753 \DeclareTextAccent{\"}{T1}{4}
1754 \DeclareTextAccent{\H}{T1}{5}
1755 \DeclareTextAccent{\r}{T1}{6}
1756 \DeclareTextAccent{\v}{T1}{7}
1757 \DeclareTextAccent{\u}{T1}{8}
1758 \DeclareTextAccent{\=}{T1}{9}
1759 \DeclareTextAccent{\.}{T1}{10}
1761 % Some accents have to be built by hand.
1762 % Note that |\ooalign| and |\o@lign| must be inside a group.
1763 % \changes{v1.9h}{1997/12/17}{As in OT1, Added \cs{leavevmode} at
1764 % start of \cs{c}, otherwise the output routine might be invoked
1765 % within the macro.}
1766 % \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
1768 % \changes{v1.95}{2002/06/17}{Corrected \cs{c} for T1 (pr/3442)}
1769 % \changes{v1.99b}{2004/01/03}{Use \cs{ooalign} for \cs{k} (pr/3532)}
1770 % \changes{v1.99b}{2004/01/03}{Added \cs{textogonekcentered} (pr/3532)}
1771 % \changes{v1.99c}{2004/01/04}{More adjustments for ogonek (pr/3532)}
1772 % \changes{v1.99g}{2005/09/27}{Replace \cs{sh@ft} by \cs{ltx@sh@ft}}
1773 % In these definitions we no longer use the helper function |\sh@ft|
1774 % from plain.tex since that now has two incompatible definitions.
1776 \DeclareTextCommand{\b}{T1}[1]
1777 {\hmode@bgroup\o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-3ex}%
1778 \vbox to.2ex{\hbox{\char9}\vss}\hidewidth}\egroup}
1779 \DeclareTextCommand{\c}{T1}[1]
1780 {\leavevmode\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent11 #1%
1781 \else{\ooalign{\unhbox\z@\crcr
1782 \hidewidth\char11\hidewidth}}\fi}
1783 \DeclareTextCommand{\d}{T1}[1]
1785 \o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-1ex}.\hidewidth}\egroup}
1786 \DeclareTextCommand{\k}{T1}[1]
1787 {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\char12}\egroup}
1788 \DeclareTextCommand{\textogonekcentered}{T1}[1]
1789 {\hmode@bgroup\ooalign{%
1790 \null#1\crcr\hidewidth\char12\hidewidth}\egroup}
1793 % Some symbols are constructed.
1795 % \changes{v1.9h}{1997/12/17}
1796 % {Added \cs{textperthousand} and \cs{textpertenthousand}}
1797 % Slot 24 contains a small circle intended for construction of
1801 \DeclareTextCommand{\textperthousand}{T1}
1802 {\%\char 24 } % space or `relax as delimiter?
1803 \DeclareTextCommand{\textpertenthousand}{T1}
1804 {\%\char 24\char 24 } % space or `relax as delimiter?
1807 % Declare the text symbols.
1808 % \changes{v1.7t}{1995/11/29}{Added \cs{textasciicircum},
1809 % \cs{textasciitilde}, \cs{textbackslash}, \cs{textbar},
1810 % \cs{textgreater} and \cs{textless}.}
1811 % \changes{v1.8c}{1996/10/27}
1812 % {Removed \cs{aa} and \cs{AA}}
1813 % \changes{v1.99h}{2005/11/08}
1814 % {Added \cs{ij} and \cs{IJ} from babel. (pr/3771)}
1817 %\DeclareTextSymbol{\AA}{T1}{197}
1818 \DeclareTextSymbol{\AE}{T1}{198}
1819 \DeclareTextSymbol{\DH}{T1}{208}
1820 \DeclareTextSymbol{\DJ}{T1}{208}
1821 \DeclareTextSymbol{\L}{T1}{138}
1822 \DeclareTextSymbol{\NG}{T1}{141}
1823 \DeclareTextSymbol{\OE}{T1}{215}
1824 \DeclareTextSymbol{\O}{T1}{216}
1825 \DeclareTextSymbol{\SS}{T1}{223}
1826 \DeclareTextSymbol{\TH}{T1}{222}
1827 %\DeclareTextSymbol{\aa}{T1}{229}
1828 \DeclareTextSymbol{\ae}{T1}{230}
1829 \DeclareTextSymbol{\dh}{T1}{240}
1830 \DeclareTextSymbol{\dj}{T1}{158}
1831 \DeclareTextSymbol{\guillemotleft}{T1}{19}
1832 \DeclareTextSymbol{\guillemotright}{T1}{20}
1833 \DeclareTextSymbol{\guilsinglleft}{T1}{14}
1834 \DeclareTextSymbol{\guilsinglright}{T1}{15}
1835 \DeclareTextSymbol{\i}{T1}{25}
1836 \DeclareTextSymbol{\j}{T1}{26}
1837 \DeclareTextSymbol{\ij}{T1}{188}
1838 \DeclareTextSymbol{\IJ}{T1}{156}
1839 \DeclareTextSymbol{\l}{T1}{170}
1840 \DeclareTextSymbol{\ng}{T1}{173}
1841 \DeclareTextSymbol{\oe}{T1}{247}
1842 \DeclareTextSymbol{\o}{T1}{248}
1843 \DeclareTextSymbol{\quotedblbase}{T1}{18}
1844 \DeclareTextSymbol{\quotesinglbase}{T1}{13}
1845 \DeclareTextSymbol{\ss}{T1}{255}
1846 \DeclareTextSymbol{\textasciicircum}{T1}{`\^}
1847 \DeclareTextSymbol{\textasciitilde}{T1}{`\~}
1848 \DeclareTextSymbol{\textbackslash}{T1}{`\\}
1849 \DeclareTextSymbol{\textbar}{T1}{`\|}
1850 \DeclareTextSymbol{\textbraceleft}{T1}{`\{}
1851 \DeclareTextSymbol{\textbraceright}{T1}{`\}}
1852 \DeclareTextSymbol{\textcompwordmark}{T1}{23}
1853 \DeclareTextSymbol{\textdollar}{T1}{`\$}
1854 \DeclareTextSymbol{\textemdash}{T1}{22}
1855 \DeclareTextSymbol{\textendash}{T1}{21}
1856 \DeclareTextSymbol{\textexclamdown}{T1}{189}
1857 \DeclareTextSymbol{\textgreater}{T1}{`\>}
1858 %\DeclareTextSymbol{\texthyphenchar}{T1}{127}
1859 %\DeclareTextSymbol{\texthyphen}{T1}{`\-}
1860 \DeclareTextSymbol{\textless}{T1}{`\<}
1861 \DeclareTextSymbol{\textquestiondown}{T1}{190}
1862 \DeclareTextSymbol{\textquotedblleft}{T1}{16}
1863 \DeclareTextSymbol{\textquotedblright}{T1}{17}
1864 \DeclareTextSymbol{\textquotedbl}{T1}{`\"}
1865 \DeclareTextSymbol{\textquoteleft}{T1}{`\`}
1866 \DeclareTextSymbol{\textquoteright}{T1}{`\'}
1867 \DeclareTextSymbol{\textsection}{T1}{159}
1868 \DeclareTextSymbol{\textsterling}{T1}{191}
1869 \DeclareTextSymbol{\textunderscore}{T1}{95}
1870 \DeclareTextSymbol{\textvisiblespace}{T1}{32}
1871 \DeclareTextSymbol{\th}{T1}{254}
1873 % Declare the composites.
1874 % \changes{v1.93}{2001/05/28}{Changed the effect of
1875 % \cs{.}\cs{i}, pr/3295}
1877 \DeclareTextComposite{\.}{T1}{i}{`\i}
1878 \DeclareTextComposite{\.}{T1}{\i}{`\i}
1880 % \changes{v1.9c}{1997/05/04}{Added `hex index tabs'}
1883 \DeclareTextComposite{\u}{T1}{A}{128}
1884 \DeclareTextComposite{\k}{T1}{A}{129}
1885 \DeclareTextComposite{\'}{T1}{C}{130}
1886 \DeclareTextComposite{\v}{T1}{C}{131}
1887 \DeclareTextComposite{\v}{T1}{D}{132}
1888 \DeclareTextComposite{\v}{T1}{E}{133}
1889 \DeclareTextComposite{\k}{T1}{E}{134}
1890 \DeclareTextComposite{\u}{T1}{G}{135}
1894 \DeclareTextComposite{\'}{T1}{L}{136}
1895 \DeclareTextComposite{\v}{T1}{L}{137}
1896 \DeclareTextComposite{\'}{T1}{N}{139}
1897 \DeclareTextComposite{\v}{T1}{N}{140}
1898 \DeclareTextComposite{\H}{T1}{O}{142}
1899 \DeclareTextComposite{\'}{T1}{R}{143}
1903 \DeclareTextComposite{\v}{T1}{R}{144}
1904 \DeclareTextComposite{\'}{T1}{S}{145}
1905 \DeclareTextComposite{\v}{T1}{S}{146}
1906 \DeclareTextComposite{\c}{T1}{S}{147}
1907 \DeclareTextComposite{\v}{T1}{T}{148}
1908 \DeclareTextComposite{\c}{T1}{T}{149}
1909 \DeclareTextComposite{\H}{T1}{U}{150}
1910 \DeclareTextComposite{\r}{T1}{U}{151}
1914 \DeclareTextComposite{\"}{T1}{Y}{152}
1915 \DeclareTextComposite{\'}{T1}{Z}{153}
1916 \DeclareTextComposite{\v}{T1}{Z}{154}
1917 \DeclareTextComposite{\.}{T1}{Z}{155}
1918 \DeclareTextComposite{\.}{T1}{I}{157}
1922 \DeclareTextComposite{\u}{T1}{a}{160}
1923 \DeclareTextComposite{\k}{T1}{a}{161}
1924 \DeclareTextComposite{\'}{T1}{c}{162}
1925 \DeclareTextComposite{\v}{T1}{c}{163}
1926 \DeclareTextComposite{\v}{T1}{d}{164}
1927 \DeclareTextComposite{\v}{T1}{e}{165}
1928 \DeclareTextComposite{\k}{T1}{e}{166}
1929 \DeclareTextComposite{\u}{T1}{g}{167}
1933 \DeclareTextComposite{\'}{T1}{l}{168}
1934 \DeclareTextComposite{\v}{T1}{l}{169}
1935 \DeclareTextComposite{\'}{T1}{n}{171}
1936 \DeclareTextComposite{\v}{T1}{n}{172}
1937 \DeclareTextComposite{\H}{T1}{o}{174}
1938 \DeclareTextComposite{\'}{T1}{r}{175}
1942 \DeclareTextComposite{\v}{T1}{r}{176}
1943 \DeclareTextComposite{\'}{T1}{s}{177}
1944 \DeclareTextComposite{\v}{T1}{s}{178}
1945 \DeclareTextComposite{\c}{T1}{s}{179}
1946 \DeclareTextComposite{\v}{T1}{t}{180}
1947 \DeclareTextComposite{\c}{T1}{t}{181}
1948 \DeclareTextComposite{\H}{T1}{u}{182}
1949 \DeclareTextComposite{\r}{T1}{u}{183}
1953 \DeclareTextComposite{\"}{T1}{y}{184}
1954 \DeclareTextComposite{\'}{T1}{z}{185}
1955 \DeclareTextComposite{\v}{T1}{z}{186}
1956 \DeclareTextComposite{\.}{T1}{z}{187}
1960 \DeclareTextComposite{\`}{T1}{A}{192}
1961 \DeclareTextComposite{\'}{T1}{A}{193}
1962 \DeclareTextComposite{\^}{T1}{A}{194}
1963 \DeclareTextComposite{\~}{T1}{A}{195}
1964 \DeclareTextComposite{\"}{T1}{A}{196}
1965 \DeclareTextComposite{\r}{T1}{A}{197}
1966 \DeclareTextComposite{\c}{T1}{C}{199}
1970 \DeclareTextComposite{\`}{T1}{E}{200}
1971 \DeclareTextComposite{\'}{T1}{E}{201}
1972 \DeclareTextComposite{\^}{T1}{E}{202}
1973 \DeclareTextComposite{\"}{T1}{E}{203}
1974 \DeclareTextComposite{\`}{T1}{I}{204}
1975 \DeclareTextComposite{\'}{T1}{I}{205}
1976 \DeclareTextComposite{\^}{T1}{I}{206}
1977 \DeclareTextComposite{\"}{T1}{I}{207}
1981 \DeclareTextComposite{\~}{T1}{N}{209}
1982 \DeclareTextComposite{\`}{T1}{O}{210}
1983 \DeclareTextComposite{\'}{T1}{O}{211}
1984 \DeclareTextComposite{\^}{T1}{O}{212}
1985 \DeclareTextComposite{\~}{T1}{O}{213}
1986 \DeclareTextComposite{\"}{T1}{O}{214}
1990 \DeclareTextComposite{\`}{T1}{U}{217}
1991 \DeclareTextComposite{\'}{T1}{U}{218}
1992 \DeclareTextComposite{\^}{T1}{U}{219}
1993 \DeclareTextComposite{\"}{T1}{U}{220}
1994 \DeclareTextComposite{\'}{T1}{Y}{221}
1998 \DeclareTextComposite{\`}{T1}{a}{224}
1999 \DeclareTextComposite{\'}{T1}{a}{225}
2000 \DeclareTextComposite{\^}{T1}{a}{226}
2001 \DeclareTextComposite{\~}{T1}{a}{227}
2002 \DeclareTextComposite{\"}{T1}{a}{228}
2003 \DeclareTextComposite{\r}{T1}{a}{229}
2004 \DeclareTextComposite{\c}{T1}{c}{231}
2008 \DeclareTextComposite{\`}{T1}{e}{232}
2009 \DeclareTextComposite{\'}{T1}{e}{233}
2010 \DeclareTextComposite{\^}{T1}{e}{234}
2011 \DeclareTextComposite{\"}{T1}{e}{235}
2012 \DeclareTextComposite{\`}{T1}{i}{236}
2013 \DeclareTextComposite{\`}{T1}{\i}{236}
2014 \DeclareTextComposite{\'}{T1}{i}{237}
2015 \DeclareTextComposite{\'}{T1}{\i}{237}
2016 \DeclareTextComposite{\^}{T1}{i}{238}
2017 \DeclareTextComposite{\^}{T1}{\i}{238}
2018 \DeclareTextComposite{\"}{T1}{i}{239}
2019 \DeclareTextComposite{\"}{T1}{\i}{239}
2023 \DeclareTextComposite{\~}{T1}{n}{241}
2024 \DeclareTextComposite{\`}{T1}{o}{242}
2025 \DeclareTextComposite{\'}{T1}{o}{243}
2026 \DeclareTextComposite{\^}{T1}{o}{244}
2027 \DeclareTextComposite{\~}{T1}{o}{245}
2028 \DeclareTextComposite{\"}{T1}{o}{246}
2032 \DeclareTextComposite{\`}{T1}{u}{249}
2033 \DeclareTextComposite{\'}{T1}{u}{250}
2034 \DeclareTextComposite{\^}{T1}{u}{251}
2035 \DeclareTextComposite{\"}{T1}{u}{252}
2036 \DeclareTextComposite{\'}{T1}{y}{253}
2038 % \changes{v1.99b}{2004/01/03}{Added composites for \cs{k} (pr/3532)}
2040 \DeclareTextCompositeCommand{\k}{T1}{o}{\textogonekcentered{o}}
2041 \DeclareTextCompositeCommand{\k}{T1}{O}{\textogonekcentered{O}}
2048 % \changes{1.4a}{1994/05/01}{Removed the uc/lc table settings, since
2049 % the T1 uc/lc table is now the default.}
2051 % \subsection{Definitions for the OMS encoding}
2053 % \changes{v1.6a}{1994/10/25}{Added the OMS encoding.}
2054 % \changes{v1.6b}{1994/10/27}{Renamed \cs{textlbrace} to
2055 % \cs{textbraceleft} and \cs{textrbrace} to \cs{textbraceright}.}
2056 % \changes{v1.6b}{1994/10/27}{Added \cs{textbackslash}.}
2057 % \changes{v1.6d}{1994/10/30}{Added \cs{textcircled}.}
2059 % The definitions for the `\TeX{} math symbol' (OMS) encoding. Even
2060 % though this is meant to be a math font, it includes some of the
2061 % standard \LaTeX{} text symbols.
2063 % Declare the encoding.
2066 \DeclareFontEncoding{OMS}{}{}
2068 % Declare the symbols.
2069 % \changes{v1.7t}{1995/11/29}{Added \cs{textbackslash} and
2071 % \changes{v1.8c}{1996/10/27}
2072 % {Added \cs{textasteriskcentered}}
2073 % \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
2075 % \changes{v1.95}{2002/06/16}{Added \cs{textbardbl} (pr/3400)}
2077 % \changes{v1.99}{2004/02/02}{Added \cs{textbigcircle}}
2078 % Note that slot 13 has in places been named |\Orb|: please root
2079 % out and destroy this impolity wherever you find it!
2081 \DeclareTextSymbol{\textasteriskcentered}{OMS}{3} % "03
2082 \DeclareTextSymbol{\textbackslash}{OMS}{110} % "6E
2083 \DeclareTextSymbol{\textbar}{OMS}{106} % "6A
2084 \DeclareTextSymbol{\textbardbl}{OMS}{107} % "6B
2085 \DeclareTextSymbol{\textbraceleft}{OMS}{102} % "66
2086 \DeclareTextSymbol{\textbraceright}{OMS}{103} % "67
2087 \DeclareTextSymbol{\textbullet}{OMS}{15} % "0F
2088 \DeclareTextSymbol{\textdaggerdbl}{OMS}{122} % "7A
2089 \DeclareTextSymbol{\textdagger}{OMS}{121} % "79
2090 \DeclareTextSymbol{\textparagraph}{OMS}{123} % "7B
2091 \DeclareTextSymbol{\textperiodcentered}{OMS}{1} % "01
2092 \DeclareTextSymbol{\textsection}{OMS}{120} % "78
2093 \DeclareTextSymbol{\textbigcircle}{OMS}{13} % "0D
2094 \DeclareTextCommand{\textcircled}{OMS}[1]{\hmode@bgroup
2096 \hfil \raise .07ex\hbox {\upshape#1}\hfil \crcr
2103 % \subsection{Definitions for the OML encoding}
2105 % \changes{v1.6d}{1994/10/30}{Added the OML encoding.}
2107 % The definitions for the `\TeX{} math italic' (OML) encoding. Even
2108 % though this is meant to be a math font, it includes some of the
2109 % standard \LaTeX{} text symbols.
2111 % Declare the encoding.
2114 \DeclareFontEncoding{OML}{}{}
2116 % Declare the symbols.
2117 % \changes{v1.7t}{1995/11/29}{Added \cs{textless} and
2118 % \cs{textgreater}.}
2119 % \changes{v1.9h}{1997/12/17}{Changed to decimal codes.}
2120 % \changes{v1.9m}{1998/01/16}{fixed decimal codes. latex/2734}
2122 \DeclareTextSymbol{\textless}{OML}{`\<}
2123 \DeclareTextSymbol{\textgreater}{OML}{`\>}
2124 \DeclareTextAccent{\t}{OML}{127} % "7F
2128 % \subsection{Definitions for the OT4 encoding}
2130 % These definitions are for the Polish extension to the
2131 % `\TeX\ text' (OT1) encoding.
2132 % This encoding was created by B.~Jackowski and M.~Ry\'cko
2133 % for use with the Polish version of Computer Modern and Computer
2134 % Concrete. In positions 0--127 it is identical to OT1 but it
2135 % contains some additional characters in the upper half. The \LaTeX{}
2136 % support was developed by Mariusz Olko.
2138 % The PL fonts that use it are available as follows:\\
2140 % \texttt{ftp://ftp.gust.org.pl/TeX/language/polish/pl-mf.zip};
2143 % \texttt{ftp://ftp.gust.org.pl/TeX/language/polish/pl-tfm.zip}.
2145 % Declare the encoding.
2148 \DeclareFontEncoding{OT4}{}{}
2149 \DeclareFontSubstitution{OT4}{cmr}{m}{n}
2151 % Declare the accents.
2153 \DeclareTextAccent{\"}{OT4}{127}
2154 \DeclareTextAccent{\'}{OT4}{19}
2155 \DeclareTextAccent{\.}{OT4}{95}
2156 \DeclareTextAccent{\=}{OT4}{22}
2157 \DeclareTextAccent{\^}{OT4}{94}
2158 \DeclareTextAccent{\`}{OT4}{18}
2159 \DeclareTextAccent{\~}{OT4}{126}
2160 \DeclareTextAccent{\H}{OT4}{125}
2161 \DeclareTextAccent{\u}{OT4}{21}
2162 \DeclareTextAccent{\v}{OT4}{20}
2163 \DeclareTextAccent{\r}{OT4}{23}
2165 % The ogonek accent is available only under a e A \& E. But we
2166 % have to provide some definition for \cs{k}. Some other accents
2167 % have to be built by hand as in OT1:
2168 % \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
2171 \DeclareTextCommand{\k}{OT4}[1]{%
2172 \TextSymbolUnavailable{\k{#1}}#1}
2174 % In these definitions we no longer use the helper function |\sh@ft|
2175 % from plain.tex since that now has two incompatible definitions.
2176 % \changes{v1.99g}{2005/09/27}{Replace \cs{sh@ft} by \cs{ltx@sh@ft}}
2178 \DeclareTextCommand{\b}{OT4}[1]
2179 {\hmode@bgroup\o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-3ex}%
2180 \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}\egroup}
2181 \DeclareTextCommand{\c}{OT4}[1]
2182 {\leavevmode\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent24 #1%
2183 \else{\ooalign{\unhbox\z@\crcr\hidewidth\char24\hidewidth}}\fi}
2184 \DeclareTextCommand{\d}{OT4}[1]
2186 \o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-1ex}.\hidewidth}\egroup}
2188 % Declare the text symbols.
2190 \DeclareTextSymbol{\AE}{OT4}{29}
2191 \DeclareTextSymbol{\OE}{OT4}{30}
2192 \DeclareTextSymbol{\O}{OT4}{31}
2193 \DeclareTextSymbol{\L}{OT4}{138}
2194 \DeclareTextSymbol{\ae}{OT4}{26}
2195 \DeclareTextSymbol{\guillemotleft}{OT4}{174}
2196 \DeclareTextSymbol{\guillemotright}{OT4}{175}
2197 \DeclareTextSymbol{\i}{OT4}{16}
2198 \DeclareTextSymbol{\j}{OT4}{17}
2199 \DeclareTextSymbol{\l}{OT4}{170}
2200 \DeclareTextSymbol{\o}{OT4}{28}
2201 \DeclareTextSymbol{\oe}{OT4}{27}
2202 \DeclareTextSymbol{\quotedblbase}{OT4}{255}
2203 \DeclareTextSymbol{\ss}{OT4}{25}
2204 \DeclareTextSymbol{\textemdash}{OT4}{124}
2205 \DeclareTextSymbol{\textendash}{OT4}{123}
2206 \DeclareTextSymbol{\textexclamdown}{OT4}{60}
2207 %\DeclareTextSymbol{\texthyphenchar}{OT4}{`\-}
2208 %\DeclareTextSymbol{\texthyphen}{OT4}{`\-}
2209 \DeclareTextSymbol{\textquestiondown}{OT4}{62}
2210 \DeclareTextSymbol{\textquotedblleft}{OT4}{92}
2211 \DeclareTextSymbol{\textquotedblright}{OT4}{`\"}
2212 \DeclareTextSymbol{\textquoteleft}{OT4}{`\`}
2213 \DeclareTextSymbol{\textquoteright}{OT4}{`\'}
2215 % Definition for \r A as in OT1:
2216 % \changes{v1.96}{2002/10/28}{%
2217 % coding change, to follow bug fix by DEK in plain.tex (pr/3469)}
2219 \DeclareTextCompositeCommand{\r}{OT4}{A}
2220 {\leavevmode\setbox\z@\hbox{!}\dimen@\ht\z@\advance\dimen@-1ex%
2221 \rlap{\raise.67\dimen@\hbox{\char23}}A}
2223 % In the OT4 encoding, \pounds~and \$ share a slot.
2224 % \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
2227 \DeclareTextCommand{\textdollar}{OT4}{\hmode@bgroup
2228 \ifdim \fontdimen\@ne\font >\z@
2234 \DeclareTextCommand{\textsterling}{OT4}{\hmode@bgroup
2235 \ifdim \fontdimen\@ne\font >\z@
2238 \fontshape{ui}\selectfont
2242 % Declare the composites.
2244 \DeclareTextComposite{\k}{OT4}{A}{129}
2245 \DeclareTextComposite{\'}{OT4}{C}{130}
2246 \DeclareTextComposite{\k}{OT4}{E}{134}
2247 \DeclareTextComposite{\'}{OT4}{N}{139}
2248 \DeclareTextComposite{\'}{OT4}{S}{145}
2249 \DeclareTextComposite{\'}{OT4}{Z}{153}
2250 \DeclareTextComposite{\.}{OT4}{Z}{155}
2251 \DeclareTextComposite{\k}{OT4}{a}{161}
2252 \DeclareTextComposite{\'}{OT4}{c}{162}
2253 \DeclareTextComposite{\k}{OT4}{e}{166}
2254 \DeclareTextComposite{\'}{OT4}{n}{171}
2255 \DeclareTextComposite{\'}{OT4}{s}{177}
2256 \DeclareTextComposite{\'}{OT4}{z}{185}
2257 \DeclareTextComposite{\.}{OT4}{z}{187}
2258 \DeclareTextComposite{\'}{OT4}{O}{211}
2259 \DeclareTextComposite{\'}{OT4}{o}{243}
2264 % \subsection{Definitions for the TS1 encoding}
2266 % \changes{v1.9c}{1997/05/04}{Added TS1 encoding v2.2.beta}
2267 % \changes{v1.9g}{1997/11/23}
2268 % {Use \cs{textperthousand}, \cs{textpertenthousand} and
2269 % \cs{textfractionsolidus} not
2270 % \cs{textpermill}, \cs{textpertenmill} and \cs{textfraction}.
2272 % \changes{v1.9h}{1997/12/17}
2273 % {Removed default settings, see next section.}
2277 \DeclareFontEncoding{TS1}{}{}
2278 \DeclareFontSubstitution{TS1}{cmr}{m}{n}
2280 % Some accents have to be built by hand.
2281 % Note that |\ooalign| and |\o@lign| must be inside a group.
2282 % \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
2285 \DeclareTextCommand{\capitalcedilla}{TS1}[1]
2287 \ooalign{\null#1\crcr\hidewidth\char11\hidewidth}\egroup}
2288 \DeclareTextCommand{\capitalogonek}{TS1}[1]
2290 \ooalign{\null#1\crcr\hidewidth\char12\hidewidth}\egroup}
2293 % Accents for capital letters.
2295 % These commands can be used by the end user either directly or through
2296 % definitions of the type
2298 % \DeclareTextCompositeCommand{\'}{T1}{X}{\capitalacute X}
2300 % None of the latter definitions are provided by default, since they
2301 % are probably rarely used.
2305 \DeclareTextAccent{\capitalgrave}{TS1}{0}
2306 \DeclareTextAccent{\capitalacute}{TS1}{1}
2307 \DeclareTextAccent{\capitalcircumflex}{TS1}{2}
2308 \DeclareTextAccent{\capitaltilde}{TS1}{3}
2309 \DeclareTextAccent{\capitaldieresis}{TS1}{4}
2310 \DeclareTextAccent{\capitalhungarumlaut}{TS1}{5}
2311 \DeclareTextAccent{\capitalring}{TS1}{6}
2312 \DeclareTextAccent{\capitalcaron}{TS1}{7}
2316 \DeclareTextAccent{\capitalbreve}{TS1}{8}
2317 \DeclareTextAccent{\capitalmacron}{TS1}{9}
2318 \DeclareTextAccent{\capitaldotaccent}{TS1}{10}
2322 % The tie accent was borrowed from the |cmmi| font. The tc fonts
2323 % now provide four tie accents, the first two are done in the
2324 % classical way with assymetric glyphs hanging out of their boxes;
2325 % the new ties are centered in their boxes like all other accents.
2326 % They need a name: please tell us if you know what to call them.
2330 \DeclareTextAccent{\t}{TS1}{26}
2331 \DeclareTextAccent{\capitaltie}{TS1}{27}
2332 \DeclareTextAccent{\newtie}{TS1}{28}
2333 \DeclareTextAccent{\capitalnewtie}{TS1}{29}
2336 % Compund word marks.
2338 % The text companion fonts contain two compound word marks of
2339 % different heights, one has |cap_height|, the other |asc_height|.
2342 \DeclareTextSymbol{\textcapitalcompwordmark}{TS1}{23}
2343 \DeclareTextSymbol{\textascendercompwordmark}{TS1}{31}
2346 % The text companion symbols.
2349 \DeclareTextSymbol{\textquotestraightbase}{TS1}{13}
2353 \DeclareTextSymbol{\textquotestraightdblbase}{TS1}{18}
2354 \DeclareTextSymbol{\texttwelveudash}{TS1}{21}
2355 \DeclareTextSymbol{\textthreequartersemdash}{TS1}{22}
2359 \DeclareTextSymbol{\textleftarrow}{TS1}{24}
2360 \DeclareTextSymbol{\textrightarrow}{TS1}{25}
2364 \DeclareTextSymbol{\textblank}{TS1}{32}
2365 \DeclareTextSymbol{\textdollar}{TS1}{36}
2366 \DeclareTextSymbol{\textquotesingle}{TS1}{39}
2370 \DeclareTextSymbol{\textasteriskcentered}{TS1}{42}
2372 % Note that '054 is a comma and '056 is a full stop: these make
2373 % numbers using oldstyle digits easier to input.
2375 \DeclareTextSymbol{\textdblhyphen}{TS1}{45}
2376 \DeclareTextSymbol{\textfractionsolidus}{TS1}{47}
2383 \DeclareTextSymbol{\textzerooldstyle}{TS1}{48}
2384 \DeclareTextSymbol{\textoneoldstyle}{TS1}{49}
2385 \DeclareTextSymbol{\texttwooldstyle}{TS1}{50}
2386 \DeclareTextSymbol{\textthreeoldstyle}{TS1}{51}
2387 \DeclareTextSymbol{\textfouroldstyle}{TS1}{52}
2388 \DeclareTextSymbol{\textfiveoldstyle}{TS1}{53}
2389 \DeclareTextSymbol{\textsixoldstyle}{TS1}{54}
2390 \DeclareTextSymbol{\textsevenoldstyle}{TS1}{55}
2394 \DeclareTextSymbol{\texteightoldstyle}{TS1}{56}
2395 \DeclareTextSymbol{\textnineoldstyle}{TS1}{57}
2398 % More text companion symbols.
2401 \DeclareTextSymbol{\textlangle}{TS1}{60}
2402 \DeclareTextSymbol{\textminus}{TS1}{61}
2403 \DeclareTextSymbol{\textrangle}{TS1}{62}
2407 \DeclareTextSymbol{\textmho}{TS1}{77}
2410 % \changes{v1.9r}{1999/01/06}{Minor documentation fix.}
2411 % The big circle is here to define the command \cs{textcircled}.
2412 % Formerly it was taken from the |cmsy| font.
2413 % \changes{v1.9h}{1997/12/17}{Changed to decimal codes in \cs{ooalign}.}
2414 % \changes{v1.9k}{1998/01/12}{Adding missing braces and \cs{ushape}.}
2415 % \changes{v1.9y}{2000/01/30}{Use \cs{hmode@bgroup} where applicable
2418 \DeclareTextSymbol{\textbigcircle}{TS1}{79}
2419 \DeclareTextCommand{\textcircled}{TS1}[1]{\hmode@bgroup
2421 \hfil \raise .07ex\hbox {\upshape#1}\hfil \crcr
2422 \char 79 % '117 = "4F
2427 % More text companion symbols.
2431 \DeclareTextSymbol{\textohm}{TS1}{87}
2435 \DeclareTextSymbol{\textlbrackdbl}{TS1}{91}
2436 \DeclareTextSymbol{\textrbrackdbl}{TS1}{93}
2437 \DeclareTextSymbol{\textuparrow}{TS1}{94}
2438 \DeclareTextSymbol{\textdownarrow}{TS1}{95}
2442 \DeclareTextSymbol{\textasciigrave}{TS1}{96}
2443 \DeclareTextSymbol{\textborn}{TS1}{98}
2444 \DeclareTextSymbol{\textdivorced}{TS1}{99}
2445 \DeclareTextSymbol{\textdied}{TS1}{100}
2449 \DeclareTextSymbol{\textleaf}{TS1}{108}
2450 \DeclareTextSymbol{\textmarried}{TS1}{109}
2451 \DeclareTextSymbol{\textmusicalnote}{TS1}{110}
2455 \DeclareTextSymbol{\texttildelow}{TS1}{126}
2458 % This glyph, |\textdblhyphenchar| is hanging, like the hyphenchar of
2462 \DeclareTextSymbol{\textdblhyphenchar}{TS1}{127}
2466 \DeclareTextSymbol{\textasciibreve}{TS1}{128}
2467 \DeclareTextSymbol{\textasciicaron}{TS1}{129}
2470 % This next glyph is \emph{not} the same as |\textquotedbl|.
2472 % \changes{v1.9p}{1998/06/12}{Corrected 130 and 131, see pr/2834}
2474 \DeclareTextSymbol{\textacutedbl}{TS1}{130}
2475 \DeclareTextSymbol{\textgravedbl}{TS1}{131}
2476 \DeclareTextSymbol{\textdagger}{TS1}{132}
2477 \DeclareTextSymbol{\textdaggerdbl}{TS1}{133}
2478 \DeclareTextSymbol{\textbardbl}{TS1}{134}
2479 \DeclareTextSymbol{\textperthousand}{TS1}{135}
2483 \DeclareTextSymbol{\textbullet}{TS1}{136}
2484 \DeclareTextSymbol{\textcelsius}{TS1}{137}
2485 \DeclareTextSymbol{\textdollaroldstyle}{TS1}{138}
2486 \DeclareTextSymbol{\textcentoldstyle}{TS1}{139}
2487 \DeclareTextSymbol{\textflorin}{TS1}{140}
2488 \DeclareTextSymbol{\textcolonmonetary}{TS1}{141}
2489 \DeclareTextSymbol{\textwon}{TS1}{142}
2490 \DeclareTextSymbol{\textnaira}{TS1}{143}
2494 \DeclareTextSymbol{\textguarani}{TS1}{144}
2495 \DeclareTextSymbol{\textpeso}{TS1}{145}
2496 \DeclareTextSymbol{\textlira}{TS1}{146}
2497 \DeclareTextSymbol{\textrecipe}{TS1}{147}
2498 \DeclareTextSymbol{\textinterrobang}{TS1}{148}
2499 \DeclareTextSymbol{\textinterrobangdown}{TS1}{149}
2500 \DeclareTextSymbol{\textdong}{TS1}{150}
2501 \DeclareTextSymbol{\texttrademark}{TS1}{151}
2505 \DeclareTextSymbol{\textpertenthousand}{TS1}{152}
2506 \DeclareTextSymbol{\textpilcrow}{TS1}{153}
2507 \DeclareTextSymbol{\textbaht}{TS1}{154}
2508 \DeclareTextSymbol{\textnumero}{TS1}{155}
2510 % This next name may change.
2511 % For the following sign we know only a german name, which is
2512 % abz\"uglich. The meaning is something like ``commercial minus''.
2513 % An ASCII ersatz is ./. (dot slash dot).
2514 % The temporary English name is |\textdiscount|.
2516 \DeclareTextSymbol{\textdiscount}{TS1}{156}
2517 \DeclareTextSymbol{\textestimated}{TS1}{157}
2518 \DeclareTextSymbol{\textopenbullet}{TS1}{158}
2519 \DeclareTextSymbol{\textservicemark}{TS1}{159}
2523 \DeclareTextSymbol{\textlquill}{TS1}{160}
2524 \DeclareTextSymbol{\textrquill}{TS1}{161}
2525 \DeclareTextSymbol{\textcent}{TS1}{162}
2526 \DeclareTextSymbol{\textsterling}{TS1}{163}
2527 \DeclareTextSymbol{\textcurrency}{TS1}{164}
2528 \DeclareTextSymbol{\textyen}{TS1}{165}
2529 \DeclareTextSymbol{\textbrokenbar}{TS1}{166}
2530 \DeclareTextSymbol{\textsection}{TS1}{167}
2534 \DeclareTextSymbol{\textasciidieresis}{TS1}{168}
2535 \DeclareTextSymbol{\textcopyright}{TS1}{169}
2536 \DeclareTextSymbol{\textordfeminine}{TS1}{170}
2537 \DeclareTextSymbol{\textcopyleft}{TS1}{171}
2538 \DeclareTextSymbol{\textlnot}{TS1}{172}
2541 % The meaning of the circled-P is ``sound recording copyright''.
2543 % \changes{v1.9p}{1998/06/12}{Renamed \cs{textmacron} pr/2840}
2545 \DeclareTextSymbol{\textcircledP}{TS1}{173}
2546 \DeclareTextSymbol{\textregistered}{TS1}{174}
2547 \DeclareTextSymbol{\textasciimacron}{TS1}{175}
2551 \DeclareTextSymbol{\textdegree}{TS1}{176}
2552 \DeclareTextSymbol{\textpm}{TS1}{177}
2553 \DeclareTextSymbol{\texttwosuperior}{TS1}{178}
2554 \DeclareTextSymbol{\textthreesuperior}{TS1}{179}
2555 \DeclareTextSymbol{\textasciiacute}{TS1}{180}
2556 \DeclareTextSymbol{\textmu}{TS1}{181} % micro sign
2557 \DeclareTextSymbol{\textparagraph}{TS1}{182}
2558 \DeclareTextSymbol{\textperiodcentered}{TS1}{183}
2562 \DeclareTextSymbol{\textreferencemark}{TS1}{184}
2563 \DeclareTextSymbol{\textonesuperior}{TS1}{185}
2564 \DeclareTextSymbol{\textordmasculine}{TS1}{186}
2565 \DeclareTextSymbol{\textsurd}{TS1}{187}
2566 \DeclareTextSymbol{\textonequarter}{TS1}{188}
2567 \DeclareTextSymbol{\textonehalf}{TS1}{189}
2568 \DeclareTextSymbol{\textthreequarters}{TS1}{190}
2569 \DeclareTextSymbol{\texteuro}{TS1}{191}
2573 \DeclareTextSymbol{\texttimes}{TS1}{214}
2577 \DeclareTextSymbol{\textdiv}{TS1}{246}
2581 % \section{Package files}
2583 % \changes{v1.9h}{1997/12/17}{Added section.}
2584 % \changes{v1.9h}{1997/12/17}{Added code for textcomp.sty.}
2585 % This file now also contains some packages that provide access to
2586 % the more specialised encodings.
2588 % \subsection{The fontenc package}
2590 % \changes{v1.5c}{1994/05/14}{Added the fontenc package}
2591 % \changes{v1.5g}{1994/05/16}{Removed the lowercasing of the filename.}
2592 % \changes{v1.7a}{1994/11/30}{Always load the enc.def file, so that
2593 % the default encoding for the commands will change.}
2594 % \changes{v1.7x}{1996/05/18}{Produce error if encoding not found.
2596 % \changes{v1.7y}{1996/05/21}{Corrected error message (CAR)}
2597 % \changes{v1.8d}{1996/11/18}
2598 % {(DPC) lowercase external file names. internal/1044}%
2599 % This package allows authors to specify which encodings they will use.
2600 % For each encoding |FOO|, the package looks to see if the encoding
2601 % |FOO| has already been declared. If it has not, the file |fooenc.def|
2602 % is loaded. The default encoding is set to be |FOO|.
2604 % In addition the package at the moment contains extra code to extend
2605 % the |\@uclclist| (list of upper/lower case pairs) for encodings that
2606 % involve cyrillic characters. THIS IS A TEMPORARY SOLUTION and will not
2607 % stay this way forever (or so we hope) but right now we are missing a
2608 % proper interface for this and didn't wanted to rush it.
2609 % \changes{v1.9r}{1999/01/07}{Hackery to temp support cyrillic uc/lc}
2610 % \changes{v1.9t}{1999/02/24}{Corrected hackery cyrillic uc/lc list}
2611 % \changes{v1.9x}{1999/12/08}{Changed \cs{CYRRHOOK} and \cs{cyrrhook}
2612 % to\cs{CYRRHK} and \cs{cyrrhk} as name changed in the cyrillic
2613 % bundle for naming consistency with other ``hook'' glyphs.}
2618 % Here we define a macro that extends the |\@uclclist| if needed and
2619 % afterwards turns itself in a noop.
2621 \def\update@uclc@with@cyrillic{%
2622 \expandafter\def\expandafter\@uclclist\expandafter
2624 \cyra\CYRA\cyrabhch\CYRABHCH\cyrabhchdsc\CYRABHCHDSC\cyrabhdze
2625 \CYRABHDZE\cyrabhha\CYRABHHA\cyrae\CYRAE\cyrb\CYRB\cyrbyus
2626 \CYRBYUS\cyrc\CYRC\cyrch\CYRCH\cyrchldsc\CYRCHLDSC\cyrchrdsc
2627 \CYRCHRDSC\cyrchvcrs\CYRCHVCRS\cyrd\CYRD\cyrdelta\CYRDELTA
2628 \cyrdje\CYRDJE\cyrdze\CYRDZE\cyrdzhe\CYRDZHE\cyre\CYRE\cyreps
2629 \CYREPS\cyrerev\CYREREV\cyrery\CYRERY\cyrf\CYRF\cyrfita
2630 \CYRFITA\cyrg\CYRG\cyrgdsc\CYRGDSC\cyrgdschcrs\CYRGDSCHCRS
2631 \cyrghcrs\CYRGHCRS\cyrghk\CYRGHK\cyrgup\CYRGUP\cyrh\CYRH
2632 \cyrhdsc\CYRHDSC\cyrhhcrs\CYRHHCRS\cyrhhk\CYRHHK\cyrhrdsn
2633 \CYRHRDSN\cyri\CYRI\cyrie\CYRIE\cyrii\CYRII\cyrishrt\CYRISHRT
2634 \cyrishrtdsc\CYRISHRTDSC\cyrizh\CYRIZH\cyrje\CYRJE\cyrk\CYRK
2635 \cyrkbeak\CYRKBEAK\cyrkdsc\CYRKDSC\cyrkhcrs\CYRKHCRS\cyrkhk
2636 \CYRKHK\cyrkvcrs\CYRKVCRS\cyrl\CYRL\cyrldsc\CYRLDSC\cyrlhk
2637 \CYRLHK\cyrlje\CYRLJE\cyrm\CYRM\cyrmdsc\CYRMDSC\cyrmhk\CYRMHK
2638 \cyrn\CYRN\cyrndsc\CYRNDSC\cyrng\CYRNG\cyrnhk\CYRNHK\cyrnje
2639 \CYRNJE\cyrnlhk\CYRNLHK\cyro\CYRO\cyrotld\CYROTLD\cyrp\CYRP
2640 \cyrphk\CYRPHK\cyrq\CYRQ\cyrr\CYRR\cyrrdsc\CYRRDSC\cyrrhk
2641 \CYRRHK\cyrrtick\CYRRTICK\cyrs\CYRS\cyrsacrs\CYRSACRS
2642 \cyrschwa\CYRSCHWA\cyrsdsc\CYRSDSC\cyrsemisftsn\CYRSEMISFTSN
2643 \cyrsftsn\CYRSFTSN\cyrsh\CYRSH\cyrshch\CYRSHCH\cyrshha\CYRSHHA
2644 \cyrt\CYRT\cyrtdsc\CYRTDSC\cyrtetse\CYRTETSE\cyrtshe\CYRTSHE
2645 \cyru\CYRU\cyrushrt\CYRUSHRT\cyrv\CYRV\cyrw\CYRW\cyry\CYRY
2646 \cyrya\CYRYA\cyryat\CYRYAT\cyryhcrs\CYRYHCRS\cyryi\CYRYI\cyryo
2647 \CYRYO\cyryu\CYRYU\cyrz\CYRZ\cyrzdsc\CYRZDSC\cyrzh\CYRZH
2648 \cyrzhdsc\CYRZHDSC}%
2649 \let\update@uclc@with@cyrillic\relax
2653 % Here we process each option:
2656 \let\encodingdefault\CurrentOption
2658 \lowercase{\def\noexpand\reserved@f{\CurrentOption enc.def}}}%
2660 \InputIfFileExists\reserved@f
2661 {}{\PackageError{fontenc}%
2662 {Encoding file `\reserved@f' not found.%
2664 You might have misspelt the name of the encoding}%
2665 {Necessary code for this encoding was not
2666 loaded.\MessageBreak
2667 Thus calling the encoding later on will
2668 produce further error messages.}}%
2669 \let\reserved@f\relax
2672 % In case the current encoding is one of a list of known
2673 % cyrillic ones we extend the |\@uclclist|:
2675 \expandafter\in@\expandafter{\CurrentOption}%
2676 {T2A,T2B,T2C,X2,LCY,OT2}%
2680 % But only if it hasn't already been extended. This might happen if
2681 % there are several calls to fontenc loading one of the above
2682 % encodings. If we don't do this check the |\@uclclist| gets
2683 % unnecessarily big, slowing down the processing at runtime.
2684 % \changes{v1.9v}{1999/06/12}{Extend \cs{@uclclist} only once}
2686 \expandafter\in@\expandafter\cyra\expandafter
2690 \update@uclc@with@cyrillic
2701 \fontencoding\encodingdefault\selectfont
2704 % To save some space we get rid of the macro extending the
2705 % |\@uclclist| (might have happened already).
2707 \let\update@uclc@with@cyrillic\relax
2710 % Finally we pretend that the fontenc package wasn't read in. This
2711 % allows for using it several times, e.g., in a class file and in the
2712 % preamble (at the cost of not getting any version info).
2713 % That kind of hackery shows that using a general purpose
2714 % package just for loading an encoding is not the right kind
2715 % of interface for setting up encodings --- it will get replaced at
2716 % some point in the future.
2717 % \changes{v1.9r}{1999/01/07}{Hackery to allow using fontenc several
2719 % \changes{v1.9u}{1999/06/10}{Ensure that we also forget old options
2722 \global\expandafter\let\csname ver@fontenc.sty\endcsname\relax
2723 \global\expandafter\let\csname opt@fontenc.sty\endcsname\relax
2724 \global\let\@ifl@ter@@\@ifl@ter
2725 \def\@ifl@ter#1#2#3#4#5{\global\let\@ifl@ter\@ifl@ter@@}
2730 % \subsection{The textcomp package}
2732 % This one is for the |TS1| encoding which contains text symbols
2733 % for use with the |T1|-encoded text fonts. It therefore first
2734 % inputs the file |TS1enc.def| and then sets (or resets) the
2735 % defaults for the symbols it contains. The result of this is that
2736 % when one of these symbols is accessed and the current encoding
2737 % does not provide it, the symbol will be supplied by a silent,
2738 % local change to this encoding.
2743 % Since many PostScript fonts only implement a subset of |TS1| many
2744 % commands only produce black blobs of ink. To resolve the
2745 % resulting problems a number of options have been introduced and
2746 % some code has been developed to distinguish sub-encodings.
2748 % The sub-encodings have a numerical id and are defined as follows
2750 % \begin{description}
2752 % \item[\#5] those \texttt{TS1} symbols that are also in the ISO-Adobe
2753 % character set; without \verb=textcurrency=, which is often
2754 % misused for the Euro. Older Type1 fonts from the non-\TeX{}
2755 % world provide only this subset.
2757 % \item[\#4] = \#5 + \verb=\texteuro=. Most newer fonts provide this.
2759 % \item[\#3] = \#4 + \verb=\textomega=. Can also be described as
2760 % $\texttt{TS1} \cap (\texttt{ISO-Adobe} \cup
2761 % \texttt{MacRoman})$. (Except for the missing "currency".)
2764 % \item[\#2] = \#3 + \verb=\textestimated= + \verb=\textcurrency=. Can
2765 % also be described as $\texttt{TS1} \cap
2766 % \texttt{Adobe-Western-2}$. This may be relevant for OpenType
2767 % fonts, which usually show the Adobe-Western-2 character set.
2769 % \item[\#1] = \texttt{TS1} without \verb=\textcircled= and \verb=\t=.
2770 % These two glyphs are often not implemented and if their kernel
2771 % defaults are changed commands like \verb=\copyright=
2772 % unnecessarily fail.
2774 % \item[\#0] = full \texttt{TS1}
2777 % And here a summary to go in the transcript file:
2779 \PackageInfo{textcomp}{Sub-encoding information:\MessageBreak
2780 \space\space 5 = only ISO-Adobe without
2781 \string\textcurrency\MessageBreak
2782 \space\space 4 = 5 + \string\texteuro\MessageBreak
2783 \space\space 3 = 4 + \string\textohm\MessageBreak
2784 \space\space 2 = 3 + \noexpand\textestimated+
2785 \string\textcurrency\MessageBreak
2786 \space\space 1 = TS1 - \noexpand\textcircled-
2787 \string\t\MessageBreak
2788 \space\space 0 = TS1 (full)\MessageBreak
2789 Font families with sub-encoding setting implement\MessageBreak
2790 only a restricted character set as indicated.\MessageBreak
2791 Family '?' is the default used for unknown fonts.\MessageBreak
2792 See the documentation for details\@gobble}
2795 % \begin{macro}{\DeclareEncodingSubset}
2796 % An encoding subset to which a font family belongs is declared by
2797 % the command |\DeclareEncodingSubset| that takes the major encoding as the
2798 % first argument (e.g., |TS1|), the family name as the second
2799 % argument (e.g., |cmr|), and the subset encoding id as a third,
2800 % (e.g., |0| for |cmr|).
2802 % The default encoding subset to use when nothing is known about
2803 % the current font family is named |?|.
2805 \def\DeclareEncodingSubset#1#2#3{%
2806 \@ifundefined{#1:#2}%
2807 {\PackageInfo{textcomp}{Setting #2 sub-encoding to #1/#3}}%
2808 {\PackageInfo{textcomp}{Changing #2 sub-encoding to #1/#3}}%
2809 \@namedef{#1:#2}{#3}}
2810 \@onlypreamble\DeclareEncodingSubset
2815 % The options for the package are the following:
2816 % \begin{description}
2818 % for unknown font families enables only symbols that are also
2819 % in the ISO-Adobe character set; without "currency", which is
2820 % often misused for the Euro. Older Type1 fonts from the
2821 % non-TeX world provide only this subset.
2824 % enables the ``safe'' symbols plus the |\texteuro|
2825 % command. Most newer fonts provide this.
2827 % \item[full] enables all |TS1| commands; useful only with fonts
2828 % like EC or CM bright.
2831 % same as ``full'', except that |\textcircled|
2832 % and |\t| are \emph{not} redefined from their defaults to avoid
2833 % that commands like |\copyright| suddenly no longer work.
2836 % ignore all subset encoding definitions stored in the package
2837 % itself or in the configuration file and always use the default
2838 % subset as specified by one of the other options (seldom useful,
2842 % \begin{macro}{\iftc@forced}
2843 % Switch used to implement the \texttt{force} option
2845 \newif\iftc@forced \tc@forcedfalse
2849 % This is implemented by defining the default subset:
2851 \DeclareOption{full}{\DeclareEncodingSubset{TS1}{?}{0}}
2852 \DeclareOption{almostfull}{\DeclareEncodingSubset{TS1}{?}{1}}
2853 \DeclareOption{euro}{\DeclareEncodingSubset{TS1}{?}{4}}
2854 \DeclareOption{safe}{\DeclareEncodingSubset{TS1}{?}{5}}
2856 % The default is ``almostfull'' which means that old documents will
2857 % work except that |\textcircled| and |\t| will use the kernel
2858 % defaults (with the advantage that this also works if the current
2859 % font (as often the case) doesn't implement these glyphs.
2861 % The ``force'' option simply sets the switch to true.
2863 \DeclareOption{force}{\tc@forcedtrue}
2866 % The suggestions to user is to use the ``safe'' option always
2867 % unless that balks in which case they could switch to
2868 % ``almostfull'' but then better check their output manually.
2871 \def\tc@errorwarn{\PackageError}
2872 \DeclareOption{warn}{\gdef\tc@errorwarn#1#2#3{\PackageWarning{#1}{#2}}}
2876 \ExecuteOptions{almostfull}
2877 \ProcessOptions\relax
2880 % \begin{macro}{\CheckEncodingSubset}
2881 % The command |\CheckEncodingSubset| will check if the current font
2882 % family has the right encoding subset to typeset a certain
2883 % command. It takes five arguments as follows:
2884 % first argument is either |\UseTextSymbol|, |\UseTextAccent|
2885 % depending on whether or not the symbol is a text symbol or a text
2888 % The second argument is the encoding from which this symbol should
2891 % The third argument is either a fake accessor command or an error
2892 % message. the code in that argument (if ever executed) receives
2893 % two arguments: |#2| and |#5| of |\CheckEncodingSubset|.
2895 % Argument four is the subset encoding id to test against: if this
2896 % value is higher than the subset id of the current font family
2897 % then we typeset the symbol, i.e., execute |#1{#2}#5| otherwise
2898 % it runs |#3#5|, e.g., to produce an error message or fake the
2901 % Argument five is the symbol or accent command that is being
2904 % For usage examples see definitions below.
2908 % If the ``force'' option was given we always use the default for
2911 \def\CheckEncodingSubset#1#2#3#4#5{%
2913 0\csname #2:?\endcsname
2915 \expandafter\@firstoftwo
2917 \expandafter\@secondoftwo
2923 % In normal circumstances the test is a bit more complicated: first
2924 % check if there exists a macro
2925 % |\|\meta{arg2}|:|\meta{current-family} and if so use that value
2926 % to test against, otherwise use the default to test against.
2929 \def\CheckEncodingSubset#1#2#3#4#5{%
2931 \expandafter\ifx\csname #2:\f@family\endcsname\relax
2932 0\csname #2:?\endcsname
2934 \csname #2:\f@family\endcsname
2937 \expandafter\@firstoftwo
2939 \expandafter\@secondoftwo
2948 % \begin{macro}{tc@subst}
2951 \tc@errorwarn{textcomp}% % should be latex error if general
2952 {Symbol \string#1 not provided by\MessageBreak
2953 font family \f@family\space
2954 in TS1 encoding.\MessageBreak Default family used instead}\@eha
2955 \bgroup\fontfamily\textcompsubstdefault\selectfont#1\egroup
2960 % \begin{macro}{\textcompsubstdefault}
2962 \def\textcompsubstdefault{cmr}
2966 % \begin{macro}{\tc@error}
2967 % |\tc@error| is going to be used in arg |#3| of
2968 % |\CheckEncodingSubset| when a symbol is not available in a
2969 % certain font family. It gets pass the encoding it normally lives
2970 % in (arg one) and the name of the symbol or accent that has a
2974 % error commands take argument:
2975 % #1 symbol to be used
2977 \PackageError{textcomp}% % should be latex error if general
2978 {Accent \string#1 not provided by\MessageBreak
2979 font family \f@family\space
2980 in TS1 encoding}\@eha
2986 % \begin{macro}{\tc@fake@euro}
2987 % |\tc@fake@euro| is an example of a ``fake'' definition to use in arg |#3| of
2988 % |\CheckEncodingSubset| when a symbol is not available in a
2989 % certain font family. Here we produce an Euro symbol by combining
2990 % a ``C'' with a ``=''.
2992 \def\tc@fake@euro#1{%
2994 \PackageInfo{textcomp}{Faking \noexpand#1for font family
2995 \f@family\MessageBreak in TS1 encoding}%
2997 \vfil\hbox to 0.07em{\dimen@\f@size\p@
2999 \fontsize{.7\dimen@}\z@\selectfont=\hss}%
3007 % \begin{macro}{\tc@check@symbol}
3008 % \begin{macro}{\tc@check@accent}
3009 % These are two abbreviations that we use below to check symbols
3010 % and accents in TS1. Only there to save some space, e.g., we can
3013 %\DeclareTextCommandDefault{\textcurrency}{\tc@check@symbol3\textcurrency}
3015 % to ensure that |\textcurrency| is only typeset if the current
3016 % font has a \texttt{TS1} subset id of less than 3. Otherwise
3017 % |\tc@error| is called telling the user that for this font family
3018 % |\textcurreny| is not available.
3020 \def\tc@check@symbol{\CheckEncodingSubset\UseTextSymbol{TS1}\tc@subst}
3021 \def\tc@check@accent{\CheckEncodingSubset\UseTextAccent{TS1}\tc@error}
3026 % We start with the commands that are ``safe'' and which can be
3027 % unconditionally set up, first the accents\ldots
3029 \DeclareTextAccentDefault{\capitalcedilla}{TS1}
3030 \DeclareTextAccentDefault{\capitalogonek}{TS1}
3031 \DeclareTextAccentDefault{\capitalgrave}{TS1}
3032 \DeclareTextAccentDefault{\capitalacute}{TS1}
3033 \DeclareTextAccentDefault{\capitalcircumflex}{TS1}
3034 \DeclareTextAccentDefault{\capitaltilde}{TS1}
3035 \DeclareTextAccentDefault{\capitaldieresis}{TS1}
3036 \DeclareTextAccentDefault{\capitalhungarumlaut}{TS1}
3037 \DeclareTextAccentDefault{\capitalring}{TS1}
3038 \DeclareTextAccentDefault{\capitalcaron}{TS1}
3039 \DeclareTextAccentDefault{\capitalbreve}{TS1}
3040 \DeclareTextAccentDefault{\capitalmacron}{TS1}
3041 \DeclareTextAccentDefault{\capitaldotaccent}{TS1}
3043 % \ldots and then the other glyphs.
3044 % \changes{v1.9p}{1998/06/12}{Renamed \cs{textmacron} pr/2840}
3046 \DeclareTextSymbolDefault{\textcapitalcompwordmark}{TS1}
3047 \DeclareTextSymbolDefault{\textascendercompwordmark}{TS1}
3048 \DeclareTextSymbolDefault{\textquotestraightbase}{TS1}
3049 \DeclareTextSymbolDefault{\textquotestraightdblbase}{TS1}
3050 \DeclareTextSymbolDefault{\texttwelveudash}{TS1}
3051 \DeclareTextSymbolDefault{\textthreequartersemdash}{TS1}
3052 \DeclareTextSymbolDefault{\textdollar}{TS1}
3053 \DeclareTextSymbolDefault{\textquotesingle}{TS1}
3054 \DeclareTextSymbolDefault{\textasteriskcentered}{TS1}
3055 \DeclareTextSymbolDefault{\textfractionsolidus}{TS1}
3056 \DeclareTextSymbolDefault{\textminus}{TS1}
3057 \DeclareTextSymbolDefault{\textlbrackdbl}{TS1}
3058 \DeclareTextSymbolDefault{\textrbrackdbl}{TS1}
3059 \DeclareTextSymbolDefault{\textasciigrave}{TS1}
3060 \DeclareTextSymbolDefault{\texttildelow}{TS1}
3061 \DeclareTextSymbolDefault{\textasciibreve}{TS1}
3062 \DeclareTextSymbolDefault{\textasciicaron}{TS1}
3063 \DeclareTextSymbolDefault{\textgravedbl}{TS1}
3064 \DeclareTextSymbolDefault{\textacutedbl}{TS1}
3065 \DeclareTextSymbolDefault{\textdagger}{TS1}
3066 \DeclareTextSymbolDefault{\textdaggerdbl}{TS1}
3067 \DeclareTextSymbolDefault{\textbardbl}{TS1}
3068 \DeclareTextSymbolDefault{\textperthousand}{TS1}
3069 \DeclareTextSymbolDefault{\textbullet}{TS1}
3070 \DeclareTextSymbolDefault{\textcelsius}{TS1}
3071 \DeclareTextSymbolDefault{\textflorin}{TS1}
3072 \DeclareTextSymbolDefault{\texttrademark}{TS1}
3073 \DeclareTextSymbolDefault{\textcent}{TS1}
3074 \DeclareTextSymbolDefault{\textsterling}{TS1}
3075 \DeclareTextSymbolDefault{\textyen}{TS1}
3076 \DeclareTextSymbolDefault{\textbrokenbar}{TS1}
3077 \DeclareTextSymbolDefault{\textsection}{TS1}
3078 \DeclareTextSymbolDefault{\textasciidieresis}{TS1}
3079 \DeclareTextSymbolDefault{\textcopyright}{TS1}
3080 \DeclareTextSymbolDefault{\textordfeminine}{TS1}
3081 \DeclareTextSymbolDefault{\textlnot}{TS1}
3082 \DeclareTextSymbolDefault{\textregistered}{TS1}
3083 \DeclareTextSymbolDefault{\textasciimacron}{TS1}
3084 \DeclareTextSymbolDefault{\textdegree}{TS1}
3085 \DeclareTextSymbolDefault{\textpm}{TS1}
3086 \DeclareTextSymbolDefault{\texttwosuperior}{TS1}
3087 \DeclareTextSymbolDefault{\textthreesuperior}{TS1}
3088 \DeclareTextSymbolDefault{\textasciiacute}{TS1}
3089 \DeclareTextSymbolDefault{\textmu}{TS1}
3090 \DeclareTextSymbolDefault{\textparagraph}{TS1}
3091 \DeclareTextSymbolDefault{\textperiodcentered}{TS1}
3092 \DeclareTextSymbolDefault{\textonesuperior}{TS1}
3093 \DeclareTextSymbolDefault{\textordmasculine}{TS1}
3094 \DeclareTextSymbolDefault{\textonequarter}{TS1}
3095 \DeclareTextSymbolDefault{\textonehalf}{TS1}
3096 \DeclareTextSymbolDefault{\textthreequarters}{TS1}
3097 \DeclareTextSymbolDefault{\texttimes}{TS1}
3098 \DeclareTextSymbolDefault{\textdiv}{TS1}
3101 % The |\texteuro| is only available for subsets with id 4 or
3102 % less. Otherwise we fake the glyph using |\tc@fake@euro|
3104 \DeclareTextCommandDefault{\texteuro}
3105 {\CheckEncodingSubset\UseTextSymbol{TS1}\tc@fake@euro5\texteuro}
3108 % The |\textohm| is only available for subsets with id 3 or
3109 % less. Otherwise we produce an error.
3111 \DeclareTextCommandDefault{\textohm}{\tc@check@symbol4\textohm}
3113 % The |\textestimated| and |\textcurrency| are only provided for
3114 % fonts with subset encoding with id 2 or less.
3116 \DeclareTextCommandDefault{\textestimated}%
3117 {\tc@check@symbol3\textestimated}
3118 \DeclareTextCommandDefault{\textcurrency}%
3119 {\tc@check@symbol3\textcurrency}
3121 % Nearly all of the remaining glyphs are provided only with fonts
3122 % with id 1 or 0, i.e., are essentially complete.
3124 \DeclareTextCommandDefault{\capitaltie}%
3125 {\tc@check@accent2\capitaltie}
3126 \DeclareTextCommandDefault{\newtie}%
3127 {\tc@check@accent2\newtie}
3128 \DeclareTextCommandDefault{\capitalnewtie}%
3129 {\tc@check@accent2\capitalnewtie}
3130 \DeclareTextCommandDefault{\textleftarrow}%
3131 {\tc@check@symbol2\textleftarrow}
3132 \DeclareTextCommandDefault{\textrightarrow}%
3133 {\tc@check@symbol2\textrightarrow}
3134 \DeclareTextCommandDefault{\textblank}%
3135 {\tc@check@symbol2\textblank}
3136 \DeclareTextCommandDefault{\textdblhyphen}%
3137 {\tc@check@symbol2\textdblhyphen}
3138 \DeclareTextCommandDefault{\textzerooldstyle}%
3139 {\tc@check@symbol2\textzerooldstyle}
3140 \DeclareTextCommandDefault{\textoneoldstyle}%
3141 {\tc@check@symbol2\textoneoldstyle}
3142 \DeclareTextCommandDefault{\texttwooldstyle}%
3143 {\tc@check@symbol2\texttwooldstyle}
3144 \DeclareTextCommandDefault{\textthreeoldstyle}%
3145 {\tc@check@symbol2\textthreeoldstyle}
3146 \DeclareTextCommandDefault{\textfouroldstyle}%
3147 {\tc@check@symbol2\textfouroldstyle}
3148 \DeclareTextCommandDefault{\textfiveoldstyle}%
3149 {\tc@check@symbol2\textfiveoldstyle}
3150 \DeclareTextCommandDefault{\textsixoldstyle}%
3151 {\tc@check@symbol2\textsixoldstyle}
3152 \DeclareTextCommandDefault{\textsevenoldstyle}%
3153 {\tc@check@symbol2\textsevenoldstyle}
3154 \DeclareTextCommandDefault{\texteightoldstyle}%
3155 {\tc@check@symbol2\texteightoldstyle}
3156 \DeclareTextCommandDefault{\textnineoldstyle}%
3157 {\tc@check@symbol2\textnineoldstyle}
3158 \DeclareTextCommandDefault{\textlangle}%
3159 {\tc@check@symbol2\textlangle}
3160 \DeclareTextCommandDefault{\textrangle}%
3161 {\tc@check@symbol2\textrangle}
3162 \DeclareTextCommandDefault{\textmho}%
3163 {\tc@check@symbol2\textmho}
3164 \DeclareTextCommandDefault{\textbigcircle}%
3165 {\tc@check@symbol2\textbigcircle}
3166 \DeclareTextCommandDefault{\textuparrow}%
3167 {\tc@check@symbol2\textuparrow}
3168 \DeclareTextCommandDefault{\textdownarrow}%
3169 {\tc@check@symbol2\textdownarrow}
3170 \DeclareTextCommandDefault{\textborn}%
3171 {\tc@check@symbol2\textborn}
3172 \DeclareTextCommandDefault{\textdivorced}%
3173 {\tc@check@symbol2\textdivorced}
3174 \DeclareTextCommandDefault{\textdied}%
3175 {\tc@check@symbol2\textdied}
3176 \DeclareTextCommandDefault{\textleaf}%
3177 {\tc@check@symbol2\textleaf}
3178 \DeclareTextCommandDefault{\textmarried}%
3179 {\tc@check@symbol2\textmarried}
3180 \DeclareTextCommandDefault{\textmusicalnote}%
3181 {\tc@check@symbol2\textmusicalnote}
3182 \DeclareTextCommandDefault{\textdblhyphenchar}%
3183 {\tc@check@symbol2\textdblhyphenchar}
3184 \DeclareTextCommandDefault{\textdollaroldstyle}%
3185 {\tc@check@symbol2\textdollaroldstyle}
3186 \DeclareTextCommandDefault{\textcentoldstyle}%
3187 {\tc@check@symbol2\textcentoldstyle}
3188 \DeclareTextCommandDefault{\textcolonmonetary}%
3189 {\tc@check@symbol2\textcolonmonetary}
3190 \DeclareTextCommandDefault{\textwon}%
3191 {\tc@check@symbol2\textwon}
3192 \DeclareTextCommandDefault{\textnaira}%
3193 {\tc@check@symbol2\textnaira}
3194 \DeclareTextCommandDefault{\textguarani}%
3195 {\tc@check@symbol2\textguarani}
3196 \DeclareTextCommandDefault{\textpeso}%
3197 {\tc@check@symbol2\textpeso}
3198 \DeclareTextCommandDefault{\textlira}%
3199 {\tc@check@symbol2\textlira}
3200 \DeclareTextCommandDefault{\textrecipe}%
3201 {\tc@check@symbol2\textrecipe}
3202 \DeclareTextCommandDefault{\textinterrobang}%
3203 {\tc@check@symbol2\textinterrobang}
3204 \DeclareTextCommandDefault{\textinterrobangdown}%
3205 {\tc@check@symbol2\textinterrobangdown}
3206 \DeclareTextCommandDefault{\textdong}%
3207 {\tc@check@symbol2\textdong}
3208 \DeclareTextCommandDefault{\textpertenthousand}%
3209 {\tc@check@symbol2\textpertenthousand}
3210 \DeclareTextCommandDefault{\textpilcrow}%
3211 {\tc@check@symbol2\textpilcrow}
3212 \DeclareTextCommandDefault{\textbaht}%
3213 {\tc@check@symbol2\textbaht}
3214 \DeclareTextCommandDefault{\textnumero}%
3215 {\tc@check@symbol2\textnumero}
3216 \DeclareTextCommandDefault{\textdiscount}%
3217 {\tc@check@symbol2\textdiscount}
3218 \DeclareTextCommandDefault{\textopenbullet}%
3219 {\tc@check@symbol2\textopenbullet}
3220 \DeclareTextCommandDefault{\textservicemark}%
3221 {\tc@check@symbol2\textservicemark}
3222 \DeclareTextCommandDefault{\textlquill}%
3223 {\tc@check@symbol2\textlquill}
3224 \DeclareTextCommandDefault{\textrquill}%
3225 {\tc@check@symbol2\textrquill}
3226 \DeclareTextCommandDefault{\textcopyleft}%
3227 {\tc@check@symbol2\textcopyleft}
3228 \DeclareTextCommandDefault{\textcircledP}%
3229 {\tc@check@symbol2\textcircledP}
3230 \DeclareTextCommandDefault{\textreferencemark}%
3231 {\tc@check@symbol2\textreferencemark}
3232 \DeclareTextCommandDefault{\textsurd}%
3233 {\tc@check@symbol2\textsurd}
3235 % The |\textcircled| and |\t| are handled specially, unless the
3236 % current font has a subset id of 0 (i.e. full \texttt{TS1}) we
3237 % pick the symbols up from the the math font encodings, i.e., the
3238 % third argument to |\CheckEncodingSubset| uses |\UseTextAccent| to
3239 % get them from there.
3241 \DeclareTextCommandDefault{\textcircled}
3242 {\CheckEncodingSubset\UseTextAccent{TS1}%
3243 {\UseTextAccent{OMS}}1\textcircled}
3244 \DeclareTextCommandDefault{\t}
3245 {\CheckEncodingSubset\UseTextAccent{TS1}%
3246 {\UseTextAccent{OML}}1\t}
3251 % Finally input the encoding-specific definitions for
3252 % \texttt{TS1} thus making the top-level definitions
3253 % optimised for this encoding (and not for the default
3254 % encoding, see section~\ref{sec:orderofdecls}).
3255 % \changes{v1.9o}{1998/03/20}{Load decls after defaults for speed.}
3259 % Now having the new glyphs available we also want to make sure
3260 % that they are used. For most cases this will automatically happen
3261 % but for some glyphs there are inferior definitions already known
3262 % to \LaTeX{} which will prevent the usage of the \texttt{TS1}
3263 % versions (see section~\ref{sec:removeencspec} above). So we better
3265 % \changes{v1.9o}{1998/03/20}{Added various \cs{UndeclareTextCommand}
3266 % declarations for pr/2783}
3268 \UndeclareTextCommand{\textsterling}{OT1}
3269 \UndeclareTextCommand{\textdollar} {OT1}
3271 % Similar declarations should probably be made for other encodings
3272 % like \texttt{OT4} if they are in use.
3274 %\UndeclareTextCommand{\textsterling}{OT4}
3275 %\UndeclareTextCommand{\textdollar} {OT4}
3277 % From the \texttt{T1} encoding there are two candidates for removal:
3278 % \textperthousand{} and \textpertenthousand{} since these are both
3279 % constructed from \% followed by a tiny
3280 % `{\fontencoding{T1}\selectfont \char 24}'
3281 % rather than being a single glyph. The problem with this
3282 % approach is that in PostScript fonts this small zero is usually not
3283 % available resulting in \%\rule{3pt}{3pt} rather than
3284 % \textperthousand{} while the real glyph (at least for
3285 % |\textperthousand|) is available in the PostScript version of
3286 % \texttt{TS1}. So for the moment we compromise by removing the
3287 % \texttt{T1} declaration for |\textperthousand| but keeping the one
3288 % for |\textpertenthousand|. This will have the effect that with
3289 % Computer Modern fonts everything will come out (although
3290 % \textperthousand{} and \textpertenthousand{} are not taken from the
3291 % same physical font) and with PostScript fonts \textperthousand{}
3292 % will come out correctly while \textpertenthousand{} will most
3293 % likely look like \%\rule{6pt}{3pt} --- which is probably an
3294 % improvement over just getting a single `\rule{3pt}{3pt}' to
3295 % indicate a completely missing glyph, which would happen if we
3296 % also `undeclared' |\textpertenthousand|.
3298 \UndeclareTextCommand{\textperthousand}{T1}
3299 %\UndeclareTextCommand{\textpertenthousand}{T1}
3303 % \subsubsection{Supporting oldstyle digits}
3306 \DeclareRobustCommand\oldstylenums[1]{%
3309 \mathgroup\symletters #1%
3311 \CheckEncodingSubset\@use@text@encoding{TS1}%
3312 {\PackageWarning{textcomp}%
3313 {Oldstyle digits unavailable for
3314 family \f@family.\MessageBreak
3315 Lining digits used instead}}%
3322 % \subsubsection{Subset encoding defaults}
3324 % For many font families commonly used in the \TeX{} world we
3325 % provide the subset encoding data here. Users can add additional
3326 % font families in the file \texttt{textcomp.cfg} if they own other
3329 % However, if the option ``forced'' was given then all subset
3330 % encoding specifications are ignored, so there is no point in
3331 % setting any of them up:
3336 % Computer modern based fonts (e.g., CM, CM-Bright, Concrete):
3338 \DeclareEncodingSubset{TS1}{cmr} {0}
3339 \DeclareEncodingSubset{TS1}{cmss} {0}
3340 \DeclareEncodingSubset{TS1}{cmtt} {0}
3341 \DeclareEncodingSubset{TS1}{cmvtt} {0}
3342 \DeclareEncodingSubset{TS1}{cmbr} {0}
3343 \DeclareEncodingSubset{TS1}{cmtl} {0}
3344 \DeclareEncodingSubset{TS1}{ccr} {0}
3349 \DeclareEncodingSubset{TS1}{ptm} {4}
3350 \DeclareEncodingSubset{TS1}{pcr} {4}
3351 \DeclareEncodingSubset{TS1}{phv} {4}
3352 \DeclareEncodingSubset{TS1}{ppl} {3}
3353 \DeclareEncodingSubset{TS1}{pag} {4}
3354 \DeclareEncodingSubset{TS1}{pbk} {4}
3355 \DeclareEncodingSubset{TS1}{pnc} {4}
3356 \DeclareEncodingSubset{TS1}{pzc} {4}
3357 \DeclareEncodingSubset{TS1}{bch} {4}
3358 \DeclareEncodingSubset{TS1}{put} {5}
3361 % Other CTAN fonts (probably not complete):
3363 \DeclareEncodingSubset{TS1}{uag} {5}
3364 \DeclareEncodingSubset{TS1}{ugq} {5}
3365 \DeclareEncodingSubset{TS1}{ul8} {4}
3366 \DeclareEncodingSubset{TS1}{ul9} {4} % (LuxiSans, one day)
3367 \DeclareEncodingSubset{TS1}{augie} {5}
3368 \DeclareEncodingSubset{TS1}{dayrom} {3}
3369 \DeclareEncodingSubset{TS1}{dayroms} {3}
3370 \DeclareEncodingSubset{TS1}{pxr} {0}
3371 \DeclareEncodingSubset{TS1}{pxss} {0}
3372 \DeclareEncodingSubset{TS1}{pxtt} {0}
3373 \DeclareEncodingSubset{TS1}{txr} {0}
3374 \DeclareEncodingSubset{TS1}{txss} {0}
3375 \DeclareEncodingSubset{TS1}{txtt} {0}
3378 % Latin Modern and TeX Gyre:
3379 % \changes{v1.99k}{2009/10/28}{Added Latin Modern and TeX Gyre subsets}
3380 % \changes{v1.99l}{2009/11/04}{Added more Latin Modern and TeX Gyre subsets}
3381 % \changes{v1.99m}{2015/02/16}{Added lmtt (Heiko Oberdiek) latex/4415}
3383 \DeclareEncodingSubset{TS1}{lmr} {0}
3384 \DeclareEncodingSubset{TS1}{lmdh} {0}
3385 \DeclareEncodingSubset{TS1}{lmss} {0}
3386 \DeclareEncodingSubset{TS1}{lmssq} {0}
3387 \DeclareEncodingSubset{TS1}{lmvtt} {0}
3388 \DeclareEncodingSubset{TS1}{lmtt} {0}
3392 \DeclareEncodingSubset{TS1}{qhv} {0}
3393 \DeclareEncodingSubset{TS1}{qag} {0}
3394 \DeclareEncodingSubset{TS1}{qbk} {0}
3395 \DeclareEncodingSubset{TS1}{qcr} {0}
3396 \DeclareEncodingSubset{TS1}{qcs} {0}
3397 \DeclareEncodingSubset{TS1}{qpl} {0}
3398 \DeclareEncodingSubset{TS1}{qtm} {0}
3399 \DeclareEncodingSubset{TS1}{qzc} {0}
3400 \DeclareEncodingSubset{TS1}{qhvc} {0}
3403 % Fourier-GUTenberg:
3405 \DeclareEncodingSubset{TS1}{futs} {4}
3406 \DeclareEncodingSubset{TS1}{futx} {4}
3407 \DeclareEncodingSubset{TS1}{futj} {4}
3410 % Y\&Y's Lucida Bright
3412 \DeclareEncodingSubset{TS1}{hlh} {3}
3413 \DeclareEncodingSubset{TS1}{hls} {3}
3414 \DeclareEncodingSubset{TS1}{hlst} {3}
3416 % The remaining settings for Lucida are conservative: the following
3417 % fonts contain the |\textohm| character but not the |\texteuro|,
3418 % i.e., belong to neither subset~4 nor subset~3. If you want to
3419 % use the |\textohm| with these fonts copy these definition to
3420 % \texttt{textcomp.cfg} and change the subset to~3. However in that
3421 % case make sure that you do not use the |\texteuro|.
3423 \DeclareEncodingSubset{TS1}{hlct} {5}
3424 \DeclareEncodingSubset{TS1}{hlx} {5}
3425 \DeclareEncodingSubset{TS1}{hlce} {5}
3426 \DeclareEncodingSubset{TS1}{hlcn} {5}
3427 \DeclareEncodingSubset{TS1}{hlcw} {5}
3428 \DeclareEncodingSubset{TS1}{hlcf} {5}
3431 % Other commercial families\ldots
3433 \DeclareEncodingSubset{TS1}{pplx} {3}
3434 \DeclareEncodingSubset{TS1}{pplj} {3}
3435 \DeclareEncodingSubset{TS1}{ptmx} {4}
3436 \DeclareEncodingSubset{TS1}{ptmj} {4}
3439 % If the file \texttt{textcomp.cfg} exists it will be loaded at
3440 % this point. This allows to define further subset encodings for
3441 % font families not covered by default.
3444 \InputIfFileExists{textcomp.cfg}
3445 {\PackageInfo{textcomp}{Local configuration file used}}{}