From 34897eebd22c3de968b64f09bb4a371d96cb0b89 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 3 Feb 2020 03:02:01 +0000 Subject: CTAN sync 202002030302 --- macros/latex/base/ltoutenc.dtx | 867 +++++------------------------------------ 1 file changed, 105 insertions(+), 762 deletions(-) (limited to 'macros/latex/base/ltoutenc.dtx') diff --git a/macros/latex/base/ltoutenc.dtx b/macros/latex/base/ltoutenc.dtx index b16af5c8c6..6ebb62cee8 100644 --- a/macros/latex/base/ltoutenc.dtx +++ b/macros/latex/base/ltoutenc.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 1993-2019 +% Copyright (C) 1993-2020 % The LaTeX3 Project and any individual authors listed elsewhere % in this file. % @@ -37,15 +37,14 @@ %\ProvidesFile{ts1enc.def}[2001/06/05 v3.0e (jk/car/fm) %\ProvidesFile{tuenc.def} %\ProvidesPackage{fontenc} -%\ProvidesPackage{textcomp} -% [2018/08/11 v2.0j -% Standard LaTeX file] -% Standard LaTeX package] +% [2020/01/25 v2.0m +% Standard LaTeX file] +% Standard LaTeX package] % %<*driver> % \fi \ProvidesFile{ltoutenc.dtx} - [2018/11/18 v2.0k LaTeX Kernel (font encodings)] + [2020/01/20 v2.0n LaTeX Kernel (font encodings)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltoutenc.dtx} @@ -834,8 +833,23 @@ % {Explicitly set \cs{spacefactor} after \cs{accent} (pr/2877)} % \begin{macrocode} \global\mathchardef\accent@spacefactor\spacefactor}% +% \end{macrocode} +% The accent primitive doesn't allow things \cs{begingroup} to +% interfere between accent and base character. Therefore we need to +% avoid that (they are some hidden inside \cs{maybe@load@fontshape}). +% As we don't have to load the fontshape in this case +% (as that happened in the box above if necessary, we simply +% disable that part of the code temporaily. +% We also ignore \cs{ignorespaces} which has the same issue and may +% show up as part of \cs{normalfont} if that is used. +% \changes{v2.0m}{2019/12/18}{Avoid code that breaks \cs{accent}} +% \begin{macrocode} + \let\maybe@load@fontshape\relax + \let\ignorespaces\relax \accent#1 #2\egroup\spacefactor\accent@spacefactor} % \end{macrocode} +% +% % Default definition for |\accent@spacefactor| prevents a horrible % death of the above macro inside an unprotected |\edef|. % \changes{v1.9w}{1999/10/28}{Give \cs{accent@spacefactor} a default @@ -1030,7 +1044,7 @@ % \begin{macrocode} \@onlypreamble\DeclareTextComposite % \end{macrocode} -% +% % \end{macro} % \end{macro} % \end{macro} @@ -1048,7 +1062,7 @@ %\IncludeInRelease{2019/10/01}% % {\UseTextAccent}{Make commands robust}% % \end{macrocode} -% +% % \begin{macro}{\UseTextAccent} % \begin{macro}{\UseTextSymbol} % \changes{v1.7p}{1995/11/17}{Support \cs{@wrong@font@char} latex/1676} @@ -1107,7 +1121,8 @@ %<*2ekernel> % \end{macrocode} % -% +% Switch to a different text encoding without any grouping for use in +% \cs{UseTextAccent} or \cs{UseTextSymbol} (and for \cs{oldstylenums}). % \begin{macrocode} \def\@use@text@encoding#1{% \edef\f@encoding{#1}% @@ -1445,11 +1460,18 @@ % \begin{macrocode} \DeclareTextCommandDefault{\textasciicircum}{\^{}} \DeclareTextCommandDefault{\textasciitilde}{\~{}} -\DeclareTextCommandDefault{\textcompwordmark}{\leavevmode\kern\z@} \DeclareTextCommandDefault{\textunderscore}{% \leavevmode \kern.06em\vbox{\hrule\@width.3em}} % \end{macrocode} % +% There is no good reason anymore to fake \cs{textcompwordmark}. +% \changes{v2.0m}{2019/12/18}{Don't fake \cs{textcompwordmark}; take +% default from T1 instead} +% \begin{macrocode} +%\DeclareTextCommandDefault{\textcompwordmark}{\leavevmode\kern\z@} +\DeclareTextSymbolDefault{\textcompwordmark}{T1} +% \end{macrocode} +% % \begin{macrocode} \DeclareTextCommandDefault{\textvisiblespace}{% \mbox{\kern.06em\vrule \@height.3ex}% @@ -1490,8 +1512,16 @@ % Some commands can be used in both text and math mode: % \begin{macrocode} \DeclareRobustCommand{\$}{\ifmmode\mathdollar\else\textdollar\fi} -\DeclareRobustCommand{\{}{\ifmmode\lbrace\else\textbraceleft\fi} -\DeclareRobustCommand{\}}{\ifmmode\rbrace\else\textbraceright\fi} +% \end{macrocode} +% We use \cs{protected} not \cs{DeclareRobustCommand} so that +% \verb=\bigl\{= etc.\ works inside \cs{protected@edef}. +% \changes{v2.0n}{2020/01/20}{fix for gh/251} +% \begin{macrocode} +\protected\def\{{\ifmmode\lbrace\else\textbraceleft\fi} +\protected\def\}{\ifmmode\rbrace\else\textbraceright\fi} +% \end{macrocode} +% +% \begin{macrocode} \DeclareRobustCommand{\P}{\ifmmode\mathparagraph\else\textparagraph\fi} \DeclareRobustCommand{\S}{\ifmmode\mathsection\else\textsection\fi} \DeclareRobustCommand{\dag}{\ifmmode{\dagger}\else\textdagger\fi} @@ -1986,7 +2016,7 @@ \DeclareTextSymbol{\guillemotleft}{T1}{19} \DeclareTextSymbol{\guillemotright}{T1}{20} % \end{macrocode} -% +% % \begin{macrocode} \DeclareTextSymbol{\guilsinglleft}{T1}{14} \DeclareTextSymbol{\guilsinglright}{T1}{15} @@ -2375,7 +2405,7 @@ \DeclareTextSymbol{\guillemotleft}{OT4}{174} \DeclareTextSymbol{\guillemotright}{OT4}{175} % \end{macrocode} -% +% % \begin{macrocode} \DeclareTextSymbol{\i}{OT4}{16} \DeclareTextSymbol{\j}{OT4}{17} @@ -2976,7 +3006,7 @@ % old Adobe name \DeclareTextSymbol{\guillemotleft} \UnicodeEncodingName{"00AB} % \end{macrocode} -% +% % \begin{macrocode} \DeclareTextSymbol{\textlnot} \UnicodeEncodingName{"00AC} \DeclareTextSymbol{\textregistered} \UnicodeEncodingName{"00AE} @@ -2998,7 +3028,7 @@ % old Adobe name \DeclareTextSymbol{\guillemotright} \UnicodeEncodingName{"00BB} % \end{macrocode} -% +% % \begin{macrocode} \DeclareTextSymbol{\textonequarter} \UnicodeEncodingName{"00BC} \DeclareTextSymbol{\textonehalf} \UnicodeEncodingName{"00BD} @@ -3087,7 +3117,7 @@ \DeclareTextSymbol{\Hwithstroke} \UnicodeEncodingName{"0126} \DeclareTextSymbol{\hwithstroke} \UnicodeEncodingName{"0127} % \end{macrocode} -% +% % Not all fonts have U+2217 but using U+002A requires some adjustment. % \begin{macrocode} \DeclareTextCommand{\textasteriskcentered}\UnicodeEncodingName{% @@ -3465,27 +3495,48 @@ % \begin{macrocode} \DeclareOption*{% \let\encodingdefault\CurrentOption - \edef\reserved@f{% - \lowercase{\def\noexpand\reserved@f{\CurrentOption enc.def}}}% - \reserved@f - \InputIfFileExists\reserved@f - {}{\PackageError{fontenc}% - {Encoding file `\reserved@f' not found.% - \MessageBreak - You might have misspelt the name of the encoding}% - {Necessary code for this encoding was not - loaded.\MessageBreak - Thus calling the encoding later on will - produce further error messages.}}% - \let\reserved@f\relax +% \end{macrocode} +% From 2020/02/02 release onward we only load the encoding files if +% they haven't be loaded already. To check this we look if +% \verb=\T@=\textit{encoding} is already defined. If not we load +% (indicated by setting the switch +% \texttt{@tempswa} to true and we always load if we run in an older +% format (or rather in a rollback situation). +% \changes{v2.0m}{2020/01/25}{Load each encoding file only once (gh/255)} +% \begin{macrocode} + \@tempswafalse + \@ifl@t@r\fmtversion{2020/02/02}% + {\expandafter\ifx\csname T@\CurrentOption\endcsname\relax + \@tempswatrue\fi}% + {\@tempswatrue}% +% \end{macrocode} +% Load if necessary: +% \begin{macrocode} + \if@tempswa +% \end{macrocode} +% +% \begin{macrocode} + \edef\reserved@f{% + \lowercase{\def\noexpand\reserved@f{\CurrentOption enc.def}}}% + \reserved@f + \InputIfFileExists\reserved@f + {}{\PackageError{fontenc}% + {Encoding file `\reserved@f' not found.% + \MessageBreak + You might have misspelt the name of the encoding}% + {Necessary code for this encoding was not + loaded.\MessageBreak + Thus calling the encoding later on will + produce further error messages.}}% + \let\reserved@f\relax % \end{macrocode} % % In case the current encoding is one of a list of known % cyrillic ones we extend the |\@uclclist|: % \begin{macrocode} - \expandafter\in@\expandafter{\CurrentOption}% - {T2A,T2B,T2C,X2,LCY,OT2}% - \ifin@ + \expandafter\in@\expandafter{\CurrentOption}% + {T2A,T2B,T2C,X2,LCY,OT2}% + \ifin@ % \end{macrocode} % % But only if it hasn't already been extended. This might happen if @@ -3494,12 +3545,13 @@ % unnecessarily big, slowing down the processing at runtime. % \changes{v1.9v}{1999/06/12}{Extend \cs{@uclclist} only once} % \begin{macrocode} - \expandafter\in@\expandafter\cyra\expandafter - {\@uclclist}% - \ifin@ - \else - \update@uclc@with@cyrillic - \fi + \expandafter\in@\expandafter\cyra\expandafter + {\@uclclist}% + \ifin@ + \else + \update@uclc@with@cyrillic + \fi + \fi \fi } % \end{macrocode} @@ -3508,8 +3560,21 @@ \ProcessOptions* % \end{macrocode} % +% We select the new font encoding default (i.e., the last encoding +% specified in the option list. But this encoding may not work with +% the current |\f@shape|, e.g., \texttt{LY1} is not defined for +% \texttt{cmr} and therefore packages switching to \texttt{LY1} +% usually also change \cs{rmdefault}. But that only applies at +% |\begin{document}| so we get a spurious warning if we use what +% \LaTeX{} previously used: +% \changes{v2.0l}{2019/11/22}{Avoid spurious if fontenc selects LY1 as +% default encoding (gh/199)} % \begin{macrocode} -\fontencoding\encodingdefault\selectfont +%\fontencoding\encodingdefault\selectfont +% \end{macrocode} +% So instead we do this here: +% \begin{macrocode} +\usefont\encodingdefault\familydefault\seriesdefault\shapedefault % \end{macrocode} % % To save some space we get rid of the macro extending the @@ -3538,728 +3603,6 @@ % \end{macrocode} % % -% \subsection{The textcomp package} -% -% This one is for the |TS1| encoding which contains text symbols -% for use with the |T1|-encoded text fonts. It therefore first -% inputs the file |TS1enc.def| and then sets (or resets) the -% defaults for the symbols it contains. The result of this is that -% when one of these symbols is accessed and the current encoding -% does not provide it, the symbol will be supplied by a silent, -% local change to this encoding. -% -% \begin{macrocode} -%<*TS1sty> -% \end{macrocode} -% Since many PostScript fonts only implement a subset of |TS1| many -% commands only produce black blobs of ink. To resolve the -% resulting problems a number of options have been introduced and -% some code has been developed to distinguish sub-encodings. -% -% The sub-encodings have a numerical id and are defined as follows -% for \texttt{TS1}: -% \begin{description} -% -% \item[\#5] those \texttt{TS1} symbols that are also in the ISO-Adobe -% character set; without \verb=textcurrency=, which is often -% misused for the Euro. Older Type1 fonts from the non-\TeX{} -% world provide only this subset. -% -% \item[\#4] = \#5 + \verb=\texteuro=. Most newer fonts provide this. -% -% \item[\#3] = \#4 + \verb=\textomega=. Can also be described as -% $\texttt{TS1} \cap (\texttt{ISO-Adobe} \cup -% \texttt{MacRoman})$. (Except for the missing "currency".) - -% -% \item[\#2] = \#3 + \verb=\textestimated= + \verb=\textcurrency=. Can -% also be described as $\texttt{TS1} \cap -% \texttt{Adobe-Western-2}$. This may be relevant for OpenType -% fonts, which usually show the Adobe-Western-2 character set. -% -% \item[\#1] = \texttt{TS1} without \verb=\textcircled= and \verb=\t=. -% These two glyphs are often not implemented and if their kernel -% defaults are changed commands like \verb=\copyright= -% unnecessarily fail. -% -% \item[\#0] = full \texttt{TS1} -% \end{description} -% -% And here a summary to go in the transcript file: -% \begin{macrocode} -\PackageInfo{textcomp}{Sub-encoding information:\MessageBreak - \space\space 5 = only ISO-Adobe without - \string\textcurrency\MessageBreak - \space\space 4 = 5 + \string\texteuro\MessageBreak - \space\space 3 = 4 + \string\textohm\MessageBreak - \space\space 2 = 3 + \noexpand\textestimated+ - \string\textcurrency\MessageBreak - \space\space 1 = TS1 - \noexpand\textcircled- - \string\t\MessageBreak - \space\space 0 = TS1 (full)\MessageBreak - Font families with sub-encoding setting implement\MessageBreak - only a restricted character set as indicated.\MessageBreak - Family '?' is the default used for unknown fonts.\MessageBreak - See the documentation for details\@gobble} -% \end{macrocode} -% -% \begin{macro}{\DeclareEncodingSubset} -% An encoding subset to which a font family belongs is declared by -% the command |\DeclareEncodingSubset| that takes the major encoding as the -% first argument (e.g., |TS1|), the family name as the second -% argument (e.g., |cmr|), and the subset encoding id as a third, -% (e.g., |0| for |cmr|). -% -% The default encoding subset to use when nothing is known about -% the current font family is named |?|. -% \begin{macrocode} -\def\DeclareEncodingSubset#1#2#3{% - \@ifundefined{#1:#2}% - {\PackageInfo{textcomp}{Setting #2 sub-encoding to #1/#3}}% - {\PackageInfo{textcomp}{Changing #2 sub-encoding to #1/#3}}% - \@namedef{#1:#2}{#3}} -\@onlypreamble\DeclareEncodingSubset -% \end{macrocode} -% \end{macro} -% -% -% The options for the package are the following: -% \begin{description} -% \item[safe] -% for unknown font families enables only symbols that are also -% in the ISO-Adobe character set; without "currency", which is -% often misused for the Euro. Older Type1 fonts from the -% non-TeX world provide only this subset. -% -% \item[euro] -% enables the ``safe'' symbols plus the |\texteuro| -% command. Most newer fonts provide this. -% -% \item[full] enables all |TS1| commands; useful only with fonts -% like EC or CM bright. -% -% \item[almostfull] -% same as ``full'', except that |\textcircled| -% and |\t| are \emph{not} redefined from their defaults to avoid -% that commands like |\copyright| suddenly no longer work. -% -% \item[force] -% ignore all subset encoding definitions stored in the package -% itself or in the configuration file and always use the default -% subset as specified by one of the other options (seldom useful, -% only dangerous). -% \end{description} - -% \begin{macro}{\iftc@forced} -% Switch used to implement the \texttt{force} option -% \begin{macrocode} -\newif\iftc@forced \tc@forcedfalse -% \end{macrocode} -% \end{macro} - -% This is implemented by defining the default subset: -% \begin{macrocode} -\DeclareOption{full}{\DeclareEncodingSubset{TS1}{?}{0}} -\DeclareOption{almostfull}{\DeclareEncodingSubset{TS1}{?}{1}} -\DeclareOption{euro}{\DeclareEncodingSubset{TS1}{?}{4}} -\DeclareOption{safe}{\DeclareEncodingSubset{TS1}{?}{5}} -% \end{macrocode} -% The default is ``almostfull'' which means that old documents will -% work except that |\textcircled| and |\t| will use the kernel -% defaults (with the advantage that this also works if the current -% font (as often the case) doesn't implement these glyphs. -% -% The ``force'' option simply sets the switch to true. -% \begin{macrocode} -\DeclareOption{force}{\tc@forcedtrue} -% \end{macrocode} -% -% The suggestions to user is to use the ``safe'' option always -% unless that balks in which case they could switch to -% ``almostfull'' but then better check their output manually. -% -% \begin{macrocode} -\def\tc@errorwarn{\PackageError} -\DeclareOption{warn}{\gdef\tc@errorwarn#1#2#3{\PackageWarning{#1}{#2}}} -% \end{macrocode} -% -% \begin{macrocode} -\ExecuteOptions{almostfull} -\ProcessOptions\relax -% \end{macrocode} -% -% \begin{macro}{\CheckEncodingSubset} -% The command |\CheckEncodingSubset| will check if the current font -% family has the right encoding subset to typeset a certain -% command. It takes five arguments as follows: -% first argument is either |\UseTextSymbol|, |\UseTextAccent| -% depending on whether or not the symbol is a text symbol or a text -% accent. - -% The second argument is the encoding from which this symbol should -% be fetched. -% -% The third argument is either a fake accessor command or an error -% message. the code in that argument (if ever executed) receives -% two arguments: |#2| and |#5| of |\CheckEncodingSubset|. -% -% Argument four is the subset encoding id to test against: if this -% value is higher than the subset id of the current font family -% then we typeset the symbol, i.e., execute |#1{#2}#5| otherwise -% it runs |#3#5|, e.g., to produce an error message or fake the -% glyph somehow. -% -% Argument five is the symbol or accent command that is being -% checked. -% -% For usage examples see definitions below. -% \begin{macrocode} -\iftc@forced -% \end{macrocode} -% If the ``force'' option was given we always use the default for -% testing against. -% \begin{macrocode} -\def\CheckEncodingSubset#1#2#3#4#5{% - \ifnum #4>% - 0\csname #2:?\endcsname - \relax - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi - {#1{#2}}{#3}% - #5% -} -% \end{macrocode} -% In normal circumstances the test is a bit more complicated: first -% check if there exists a macro -% |\|\meta{arg2}|:|\meta{current-family} and if so use that value -% to test against, otherwise use the default to test against. -% \begin{macrocode} -\else -\def\CheckEncodingSubset#1#2#3#4#5{% - \ifnum #4>% - \expandafter\ifx\csname #2:\f@family\endcsname\relax - 0\csname #2:?\endcsname - \else - \csname #2:\f@family\endcsname - \fi - \relax - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi - {#1{#2}}{#3}% - #5% -} -\fi -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\tc@subst} -% \begin{macrocode} -\def\tc@subst#1{% - \tc@errorwarn{textcomp}% % should be latex error if general - {Symbol \string#1 not provided by\MessageBreak - font family \f@family\space - in TS1 encoding.\MessageBreak Default family used instead}\@eha - \bgroup\fontfamily\textcompsubstdefault\selectfont#1\egroup -} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\textcompsubstdefault} -% \begin{macrocode} -\def\textcompsubstdefault{cmr} -% \end{macrocode} -% \end{macro} - -% \begin{macro}{\tc@error} -% |\tc@error| is going to be used in arg |#3| of -% |\CheckEncodingSubset| when a symbol is not available in a -% certain font family. It gets pass the encoding it normally lives -% in (arg one) and the name of the symbol or accent that has a -% problem. -% -% \begin{macrocode} -% error commands take argument: -% #1 symbol to be used -\def\tc@error#1{% - \PackageError{textcomp}% % should be latex error if general - {Accent \string#1 not provided by\MessageBreak - font family \f@family\space - in TS1 encoding}\@eha -} -% \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\tc@fake@euro} -% |\tc@fake@euro| is an example of a ``fake'' definition to use in arg |#3| of -% |\CheckEncodingSubset| when a symbol is not available in a -% certain font family. Here we produce an Euro symbol by combining -% a ``C'' with a ``=''. -% \begin{macrocode} -\def\tc@fake@euro#1{% - \leavevmode - \PackageInfo{textcomp}{Faking \noexpand#1for font family - \f@family\MessageBreak in TS1 encoding}% - \valign{##\cr - \vfil\hbox to 0.07em{\dimen@\f@size\p@ - \math@fontsfalse - \fontsize{.7\dimen@}\z@\selectfont=\hss}% - \vfil\cr% - \hbox{C}\crcr - }% -} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\tc@check@symbol} -% \begin{macro}{\tc@check@accent} -% These are two abbreviations that we use below to check symbols -% and accents in TS1. Only there to save some space, e.g., we can -% then write -%\begin{verbatim} -%\DeclareTextCommandDefault{\textcurrency}{\tc@check@symbol3\textcurrency} -%\end{verbatim} -% to ensure that |\textcurrency| is only typeset if the current -% font has a \texttt{TS1} subset id of less than 3. Otherwise -% |\tc@error| is called telling the user that for this font family -% |\textcurreny| is not available. -% \begin{macrocode} -\def\tc@check@symbol{\CheckEncodingSubset\UseTextSymbol{TS1}\tc@subst} -\def\tc@check@accent{\CheckEncodingSubset\UseTextAccent{TS1}\tc@error} -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% We start with the commands that are ``safe'' and which can be -% unconditionally set up, first the accents\ldots -% \begin{macrocode} -\DeclareTextAccentDefault{\capitalcedilla}{TS1} -\DeclareTextAccentDefault{\capitalogonek}{TS1} -\DeclareTextAccentDefault{\capitalgrave}{TS1} -\DeclareTextAccentDefault{\capitalacute}{TS1} -\DeclareTextAccentDefault{\capitalcircumflex}{TS1} -\DeclareTextAccentDefault{\capitaltilde}{TS1} -\DeclareTextAccentDefault{\capitaldieresis}{TS1} -\DeclareTextAccentDefault{\capitalhungarumlaut}{TS1} -\DeclareTextAccentDefault{\capitalring}{TS1} -\DeclareTextAccentDefault{\capitalcaron}{TS1} -\DeclareTextAccentDefault{\capitalbreve}{TS1} -\DeclareTextAccentDefault{\capitalmacron}{TS1} -\DeclareTextAccentDefault{\capitaldotaccent}{TS1} -% \end{macrocode} -% \ldots and then the other glyphs. -% \changes{v1.9p}{1998/06/12}{Renamed \cs{textmacron} pr/2840} -% \begin{macrocode} -\DeclareTextSymbolDefault{\textcapitalcompwordmark}{TS1} -\DeclareTextSymbolDefault{\textascendercompwordmark}{TS1} -\DeclareTextSymbolDefault{\textquotestraightbase}{TS1} -\DeclareTextSymbolDefault{\textquotestraightdblbase}{TS1} -\DeclareTextSymbolDefault{\texttwelveudash}{TS1} -\DeclareTextSymbolDefault{\textthreequartersemdash}{TS1} -\DeclareTextSymbolDefault{\textdollar}{TS1} -\DeclareTextSymbolDefault{\textquotesingle}{TS1} -\DeclareTextSymbolDefault{\textasteriskcentered}{TS1} -\DeclareTextSymbolDefault{\textfractionsolidus}{TS1} -\DeclareTextSymbolDefault{\textminus}{TS1} -\DeclareTextSymbolDefault{\textlbrackdbl}{TS1} -\DeclareTextSymbolDefault{\textrbrackdbl}{TS1} -\DeclareTextSymbolDefault{\textasciigrave}{TS1} -\DeclareTextSymbolDefault{\texttildelow}{TS1} -\DeclareTextSymbolDefault{\textasciibreve}{TS1} -\DeclareTextSymbolDefault{\textasciicaron}{TS1} -\DeclareTextSymbolDefault{\textgravedbl}{TS1} -\DeclareTextSymbolDefault{\textacutedbl}{TS1} -\DeclareTextSymbolDefault{\textdagger}{TS1} -\DeclareTextSymbolDefault{\textdaggerdbl}{TS1} -\DeclareTextSymbolDefault{\textbardbl}{TS1} -\DeclareTextSymbolDefault{\textperthousand}{TS1} -\DeclareTextSymbolDefault{\textbullet}{TS1} -\DeclareTextSymbolDefault{\textcelsius}{TS1} -\DeclareTextSymbolDefault{\textflorin}{TS1} -\DeclareTextSymbolDefault{\texttrademark}{TS1} -\DeclareTextSymbolDefault{\textcent}{TS1} -\DeclareTextSymbolDefault{\textsterling}{TS1} -\DeclareTextSymbolDefault{\textyen}{TS1} -\DeclareTextSymbolDefault{\textbrokenbar}{TS1} -\DeclareTextSymbolDefault{\textsection}{TS1} -\DeclareTextSymbolDefault{\textasciidieresis}{TS1} -\DeclareTextSymbolDefault{\textcopyright}{TS1} -\DeclareTextSymbolDefault{\textordfeminine}{TS1} -\DeclareTextSymbolDefault{\textlnot}{TS1} -\DeclareTextSymbolDefault{\textregistered}{TS1} -\DeclareTextSymbolDefault{\textasciimacron}{TS1} -\DeclareTextSymbolDefault{\textdegree}{TS1} -\DeclareTextSymbolDefault{\textpm}{TS1} -\DeclareTextSymbolDefault{\texttwosuperior}{TS1} -\DeclareTextSymbolDefault{\textthreesuperior}{TS1} -\DeclareTextSymbolDefault{\textasciiacute}{TS1} -\DeclareTextSymbolDefault{\textmu}{TS1} -\DeclareTextSymbolDefault{\textparagraph}{TS1} -\DeclareTextSymbolDefault{\textperiodcentered}{TS1} -\DeclareTextSymbolDefault{\textonesuperior}{TS1} -\DeclareTextSymbolDefault{\textordmasculine}{TS1} -\DeclareTextSymbolDefault{\textonequarter}{TS1} -\DeclareTextSymbolDefault{\textonehalf}{TS1} -\DeclareTextSymbolDefault{\textthreequarters}{TS1} -\DeclareTextSymbolDefault{\texttimes}{TS1} -\DeclareTextSymbolDefault{\textdiv}{TS1} -% \end{macrocode} -% -% The |\texteuro| is only available for subsets with id 4 or -% less. Otherwise we fake the glyph using |\tc@fake@euro| -% \begin{macrocode} -\DeclareTextCommandDefault{\texteuro} - {\CheckEncodingSubset\UseTextSymbol{TS1}\tc@fake@euro5\texteuro} -% \end{macrocode} -% -% The |\textohm| is only available for subsets with id 3 or -% less. Otherwise we produce an error. -% \begin{macrocode} -\DeclareTextCommandDefault{\textohm}{\tc@check@symbol4\textohm} -% \end{macrocode} -% The |\textestimated| and |\textcurrency| are only provided for -% fonts with subset encoding with id 2 or less. -% \begin{macrocode} -\DeclareTextCommandDefault{\textestimated}% - {\tc@check@symbol3\textestimated} -\DeclareTextCommandDefault{\textcurrency}% - {\tc@check@symbol3\textcurrency} -% \end{macrocode} -% Nearly all of the remaining glyphs are provided only with fonts -% with id 1 or 0, i.e., are essentially complete. -% \begin{macrocode} -\DeclareTextCommandDefault{\capitaltie}% - {\tc@check@accent2\capitaltie} -\DeclareTextCommandDefault{\newtie}% - {\tc@check@accent2\newtie} -\DeclareTextCommandDefault{\capitalnewtie}% - {\tc@check@accent2\capitalnewtie} -\DeclareTextCommandDefault{\textleftarrow}% - {\tc@check@symbol2\textleftarrow} -\DeclareTextCommandDefault{\textrightarrow}% - {\tc@check@symbol2\textrightarrow} -\DeclareTextCommandDefault{\textblank}% - {\tc@check@symbol2\textblank} -\DeclareTextCommandDefault{\textdblhyphen}% - {\tc@check@symbol2\textdblhyphen} -\DeclareTextCommandDefault{\textzerooldstyle}% - {\tc@check@symbol2\textzerooldstyle} -\DeclareTextCommandDefault{\textoneoldstyle}% - {\tc@check@symbol2\textoneoldstyle} -\DeclareTextCommandDefault{\texttwooldstyle}% - {\tc@check@symbol2\texttwooldstyle} -\DeclareTextCommandDefault{\textthreeoldstyle}% - {\tc@check@symbol2\textthreeoldstyle} -\DeclareTextCommandDefault{\textfouroldstyle}% - {\tc@check@symbol2\textfouroldstyle} -\DeclareTextCommandDefault{\textfiveoldstyle}% - {\tc@check@symbol2\textfiveoldstyle} -\DeclareTextCommandDefault{\textsixoldstyle}% - {\tc@check@symbol2\textsixoldstyle} -\DeclareTextCommandDefault{\textsevenoldstyle}% - {\tc@check@symbol2\textsevenoldstyle} -\DeclareTextCommandDefault{\texteightoldstyle}% - {\tc@check@symbol2\texteightoldstyle} -\DeclareTextCommandDefault{\textnineoldstyle}% - {\tc@check@symbol2\textnineoldstyle} -\DeclareTextCommandDefault{\textlangle}% - {\tc@check@symbol2\textlangle} -\DeclareTextCommandDefault{\textrangle}% - {\tc@check@symbol2\textrangle} -\DeclareTextCommandDefault{\textmho}% - {\tc@check@symbol2\textmho} -\DeclareTextCommandDefault{\textbigcircle}% - {\tc@check@symbol2\textbigcircle} -\DeclareTextCommandDefault{\textuparrow}% - {\tc@check@symbol2\textuparrow} -\DeclareTextCommandDefault{\textdownarrow}% - {\tc@check@symbol2\textdownarrow} -\DeclareTextCommandDefault{\textborn}% - {\tc@check@symbol2\textborn} -\DeclareTextCommandDefault{\textdivorced}% - {\tc@check@symbol2\textdivorced} -\DeclareTextCommandDefault{\textdied}% - {\tc@check@symbol2\textdied} -\DeclareTextCommandDefault{\textleaf}% - {\tc@check@symbol2\textleaf} -\DeclareTextCommandDefault{\textmarried}% - {\tc@check@symbol2\textmarried} -\DeclareTextCommandDefault{\textmusicalnote}% - {\tc@check@symbol2\textmusicalnote} -\DeclareTextCommandDefault{\textdblhyphenchar}% - {\tc@check@symbol2\textdblhyphenchar} -\DeclareTextCommandDefault{\textdollaroldstyle}% - {\tc@check@symbol2\textdollaroldstyle} -\DeclareTextCommandDefault{\textcentoldstyle}% - {\tc@check@symbol2\textcentoldstyle} -\DeclareTextCommandDefault{\textcolonmonetary}% - {\tc@check@symbol2\textcolonmonetary} -\DeclareTextCommandDefault{\textwon}% - {\tc@check@symbol2\textwon} -\DeclareTextCommandDefault{\textnaira}% - {\tc@check@symbol2\textnaira} -\DeclareTextCommandDefault{\textguarani}% - {\tc@check@symbol2\textguarani} -\DeclareTextCommandDefault{\textpeso}% - {\tc@check@symbol2\textpeso} -\DeclareTextCommandDefault{\textlira}% - {\tc@check@symbol2\textlira} -\DeclareTextCommandDefault{\textrecipe}% - {\tc@check@symbol2\textrecipe} -\DeclareTextCommandDefault{\textinterrobang}% - {\tc@check@symbol2\textinterrobang} -\DeclareTextCommandDefault{\textinterrobangdown}% - {\tc@check@symbol2\textinterrobangdown} -\DeclareTextCommandDefault{\textdong}% - {\tc@check@symbol2\textdong} -\DeclareTextCommandDefault{\textpertenthousand}% - {\tc@check@symbol2\textpertenthousand} -\DeclareTextCommandDefault{\textpilcrow}% - {\tc@check@symbol2\textpilcrow} -\DeclareTextCommandDefault{\textbaht}% - {\tc@check@symbol2\textbaht} -\DeclareTextCommandDefault{\textnumero}% - {\tc@check@symbol2\textnumero} -\DeclareTextCommandDefault{\textdiscount}% - {\tc@check@symbol2\textdiscount} -\DeclareTextCommandDefault{\textopenbullet}% - {\tc@check@symbol2\textopenbullet} -\DeclareTextCommandDefault{\textservicemark}% - {\tc@check@symbol2\textservicemark} -\DeclareTextCommandDefault{\textlquill}% - {\tc@check@symbol2\textlquill} -\DeclareTextCommandDefault{\textrquill}% - {\tc@check@symbol2\textrquill} -\DeclareTextCommandDefault{\textcopyleft}% - {\tc@check@symbol2\textcopyleft} -\DeclareTextCommandDefault{\textcircledP}% - {\tc@check@symbol2\textcircledP} -\DeclareTextCommandDefault{\textreferencemark}% - {\tc@check@symbol2\textreferencemark} -\DeclareTextCommandDefault{\textsurd}% - {\tc@check@symbol2\textsurd} -% \end{macrocode} -% The |\textcircled| and |\t| are handled specially, unless the -% current font has a subset id of 0 (i.e. full \texttt{TS1}) we -% pick the symbols up from the the math font encodings, i.e., the -% third argument to |\CheckEncodingSubset| uses |\UseTextAccent| to -% get them from there. -% \begin{macrocode} -\DeclareTextCommandDefault{\textcircled} - {\CheckEncodingSubset\UseTextAccent{TS1}% - {\UseTextAccent{OMS}}1\textcircled} -\DeclareTextCommandDefault{\t} - {\CheckEncodingSubset\UseTextAccent{TS1}% - {\UseTextAccent{OML}}1\t} -% \end{macrocode} - - -% -% Finally input the encoding-specific definitions for -% \texttt{TS1} thus making the top-level definitions -% optimised for this encoding (and not for the default -% encoding, see section~\ref{sec:orderofdecls}). -% \changes{v1.9o}{1998/03/20}{Load decls after defaults for speed.} -% \begin{macrocode} -\input{ts1enc.def} -% \end{macrocode} -% Now having the new glyphs available we also want to make sure -% that they are used. For most cases this will automatically happen -% but for some glyphs there are inferior definitions already known -% to \LaTeX{} which will prevent the usage of the \texttt{TS1} -% versions (see section~\ref{sec:removeencspec} above). So we better -% get rid of them: -% \changes{v1.9o}{1998/03/20}{Added various \cs{UndeclareTextCommand} -% declarations for pr/2783} -% \begin{macrocode} -\UndeclareTextCommand{\textsterling}{OT1} -\UndeclareTextCommand{\textdollar} {OT1} -% \end{macrocode} -% Similar declarations should probably be made for other encodings -% like \texttt{OT4} if they are in use. -% \begin{macrocode} -%\UndeclareTextCommand{\textsterling}{OT4} -%\UndeclareTextCommand{\textdollar} {OT4} -% \end{macrocode} -% From the \texttt{T1} encoding there are two candidates for removal: -% \textperthousand{} and \textpertenthousand{} since these are both -% constructed from \% followed by a tiny -% `{\fontencoding{T1}\selectfont \char 24}' -% rather than being a single glyph. The problem with this -% approach is that in PostScript fonts this small zero is usually not -% available resulting in \%\rule{3pt}{3pt} rather than -% \textperthousand{} while the real glyph (at least for -% |\textperthousand|) is available in the PostScript version of -% \texttt{TS1}. So for the moment we compromise by removing the -% \texttt{T1} declaration for |\textperthousand| but keeping the one -% for |\textpertenthousand|. This will have the effect that with -% Computer Modern fonts everything will come out (although -% \textperthousand{} and \textpertenthousand{} are not taken from the -% same physical font) and with PostScript fonts \textperthousand{} -% will come out correctly while \textpertenthousand{} will most -% likely look like \%\rule{6pt}{3pt} --- which is probably an -% improvement over just getting a single `\rule{3pt}{3pt}' to -% indicate a completely missing glyph, which would happen if we -% also `undeclared' |\textpertenthousand|. -% \begin{macrocode} -\UndeclareTextCommand{\textperthousand}{T1} -%\UndeclareTextCommand{\textpertenthousand}{T1} -% \end{macrocode} -% -% -% \subsubsection{Supporting oldstyle digits} -% -% \begin{macrocode} -\DeclareRobustCommand\oldstylenums[1]{% - \begingroup - \ifmmode - \mathgroup\symletters #1% - \else - \CheckEncodingSubset\@use@text@encoding{TS1}% - {\PackageWarning{textcomp}% - {Oldstyle digits unavailable for - family \f@family.\MessageBreak - Lining digits used instead}}% - \tw@{#1}% - \fi - \endgroup -} -% \end{macrocode} -% -% \subsubsection{Subset encoding defaults} -% -% For many font families commonly used in the \TeX{} world we -% provide the subset encoding data here. Users can add additional -% font families in the file \texttt{textcomp.cfg} if they own other -% fonts. -% -% However, if the option ``forced'' was given then all subset -% encoding specifications are ignored, so there is no point in -% setting any of them up: -% \begin{macrocode} -\iftc@forced \else -% \end{macrocode} -% -% Computer modern based fonts (e.g., CM, CM-Bright, Concrete): -% \begin{macrocode} -\DeclareEncodingSubset{TS1}{cmr} {0} -\DeclareEncodingSubset{TS1}{cmss} {0} -\DeclareEncodingSubset{TS1}{cmtt} {0} -\DeclareEncodingSubset{TS1}{cmvtt} {0} -\DeclareEncodingSubset{TS1}{cmbr} {0} -\DeclareEncodingSubset{TS1}{cmtl} {0} -\DeclareEncodingSubset{TS1}{ccr} {0} -% \end{macrocode} -% -% PSNFSS fonts: -% \begin{macrocode} -\DeclareEncodingSubset{TS1}{ptm} {4} -\DeclareEncodingSubset{TS1}{pcr} {4} -\DeclareEncodingSubset{TS1}{phv} {4} -\DeclareEncodingSubset{TS1}{ppl} {3} -\DeclareEncodingSubset{TS1}{pag} {4} -\DeclareEncodingSubset{TS1}{pbk} {4} -\DeclareEncodingSubset{TS1}{pnc} {4} -\DeclareEncodingSubset{TS1}{pzc} {4} -\DeclareEncodingSubset{TS1}{bch} {4} -\DeclareEncodingSubset{TS1}{put} {5} -% \end{macrocode} -% -% Other CTAN fonts (probably not complete): -% \begin{macrocode} -\DeclareEncodingSubset{TS1}{uag} {5} -\DeclareEncodingSubset{TS1}{ugq} {5} -\DeclareEncodingSubset{TS1}{ul8} {4} -\DeclareEncodingSubset{TS1}{ul9} {4} % (LuxiSans, one day) -\DeclareEncodingSubset{TS1}{augie} {5} -\DeclareEncodingSubset{TS1}{dayrom} {3} -\DeclareEncodingSubset{TS1}{dayroms} {3} -\DeclareEncodingSubset{TS1}{pxr} {0} -\DeclareEncodingSubset{TS1}{pxss} {0} -\DeclareEncodingSubset{TS1}{pxtt} {0} -\DeclareEncodingSubset{TS1}{txr} {0} -\DeclareEncodingSubset{TS1}{txss} {0} -\DeclareEncodingSubset{TS1}{txtt} {0} -% \end{macrocode} -% -% Latin Modern and TeX Gyre: -% \changes{v1.99k}{2009/10/28}{Added Latin Modern and TeX Gyre subsets} -% \changes{v1.99l}{2009/11/04}{Added more Latin Modern and TeX Gyre subsets} -% \changes{v1.99m}{2015/02/16}{Added lmtt (Heiko Oberdiek) latex/4415} -% \begin{macrocode} -\DeclareEncodingSubset{TS1}{lmr} {0} -\DeclareEncodingSubset{TS1}{lmdh} {0} -\DeclareEncodingSubset{TS1}{lmss} {0} -\DeclareEncodingSubset{TS1}{lmssq} {0} -\DeclareEncodingSubset{TS1}{lmvtt} {0} -\DeclareEncodingSubset{TS1}{lmtt} {0} -% \end{macrocode} -% -% \begin{macrocode} -\DeclareEncodingSubset{TS1}{qhv} {0} -\DeclareEncodingSubset{TS1}{qag} {0} -\DeclareEncodingSubset{TS1}{qbk} {0} -\DeclareEncodingSubset{TS1}{qcr} {0} -\DeclareEncodingSubset{TS1}{qcs} {0} -\DeclareEncodingSubset{TS1}{qpl} {0} -\DeclareEncodingSubset{TS1}{qtm} {0} -\DeclareEncodingSubset{TS1}{qzc} {0} -\DeclareEncodingSubset{TS1}{qhvc} {0} -% \end{macrocode} -% -% Fourier-GUTenberg: -% \begin{macrocode} -\DeclareEncodingSubset{TS1}{futs} {4} -\DeclareEncodingSubset{TS1}{futx} {4} -\DeclareEncodingSubset{TS1}{futj} {4} -% \end{macrocode} -% -% Y\&Y's Lucida Bright -% \begin{macrocode} -\DeclareEncodingSubset{TS1}{hlh} {3} -\DeclareEncodingSubset{TS1}{hls} {3} -\DeclareEncodingSubset{TS1}{hlst} {3} -% \end{macrocode} -% The remaining settings for Lucida are conservative: the following -% fonts contain the |\textohm| character but not the |\texteuro|, -% i.e., belong to neither subset~4 nor subset~3. If you want to -% use the |\textohm| with these fonts copy these definition to -% \texttt{textcomp.cfg} and change the subset to~3. However in that -% case make sure that you do not use the |\texteuro|. -% \begin{macrocode} -\DeclareEncodingSubset{TS1}{hlct} {5} -\DeclareEncodingSubset{TS1}{hlx} {5} -\DeclareEncodingSubset{TS1}{hlce} {5} -\DeclareEncodingSubset{TS1}{hlcn} {5} -\DeclareEncodingSubset{TS1}{hlcw} {5} -\DeclareEncodingSubset{TS1}{hlcf} {5} -% \end{macrocode} -% -% Other commercial families\ldots -% \begin{macrocode} -\DeclareEncodingSubset{TS1}{pplx} {3} -\DeclareEncodingSubset{TS1}{pplj} {3} -\DeclareEncodingSubset{TS1}{ptmx} {4} -\DeclareEncodingSubset{TS1}{ptmj} {4} -% \end{macrocode} -% -% If the file \texttt{textcomp.cfg} exists it will be loaded at -% this point. This allows to define further subset encodings for -% font families not covered by default. -% -% \begin{macrocode} -\InputIfFileExists{textcomp.cfg} - {\PackageInfo{textcomp}{Local configuration file used}}{} -% \end{macrocode} -% -% \begin{macrocode} -\fi -% -% \end{macrocode} % % \Finale % -- cgit v1.2.3