diff options
Diffstat (limited to 'macros/latex/base/lttextcomp.dtx')
-rw-r--r-- | macros/latex/base/lttextcomp.dtx | 545 |
1 files changed, 314 insertions, 231 deletions
diff --git a/macros/latex/base/lttextcomp.dtx b/macros/latex/base/lttextcomp.dtx index 3b6231dafd..1efc36d563 100644 --- a/macros/latex/base/lttextcomp.dtx +++ b/macros/latex/base/lttextcomp.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % -% Copyright (C) 2019-2020 -% The LaTeX3 Project and any individual authors listed elsewhere +% Copyright (C) 2019-2021 +% The LaTeX Project and any individual authors listed elsewhere % in this file. % % This file is part of the LaTeX base system. @@ -26,6 +26,9 @@ % extension .ins) which are part of the distribution. % % \fi +% +%%% From File: lttextcomp.dtx +% % \iffalse % %<*driver> @@ -33,7 +36,7 @@ % % \ProvidesFile{lttextcomp.dtx} - [2020/04/29 v1.0d LaTeX Kernel (text companion symbols)] + [2021/04/16 v1.0f LaTeX Kernel (text companion symbols)] % \iffalse \documentclass{ltxdoc} \begin{document} @@ -46,7 +49,7 @@ % % % \GetFileInfo{lttextcomp.dtx} -% \title{Providing addtional text symbols\\ +% \title{Providing additional text symbols\\ % (previously available through the \texttt{textcomp} package)\thanks % {This file has version number % \fileversion\ dated \filedate}} @@ -67,20 +70,23 @@ % % \StopEventually{} % +% \changes{v1.0e}{2021/03/19} +% {Use \cs{NewModuleRelease}} +% \begin{macrocode} +%<*2ekernel|latexrelease> +%<latexrelease>\NewModuleRelease{2020/02/02}{lttextcomp} +%<latexrelease> {Text Companion symbols} +% \end{macrocode} % % \begin{macro}{\oldstylenums} % \begin{macro}{\legacyoldstylenums} % -% % Preserve the old definition of \cs{oldstylenums} under a different name. % % This macro implements old style numerals but only works if we % assume that the standard math fonts are used. Thus it needs % changing in case other math encodings are used. % \begin{macrocode} -%<*2ekernel|latexrelease> -%<latexrelease>\IncludeInRelease{2020/02/02}% -%<latexrelease> {\oldstylenums}{Old style numerals}% \DeclareRobustCommand\legacyoldstylenums[1]{% \begingroup % \end{macrocode} @@ -112,7 +118,7 @@ \mathgroup\symletters #1% \else % \end{macrocode} -% The \cs{CheckEncodingSubset} is discused below. +% The \cs{CheckEncodingSubset} is discussed below. % \begin{macrocode} \CheckEncodingSubset\@use@text@encoding{TS1}\tc@oldstylesubst2{{#1}}% \fi @@ -154,44 +160,6 @@ % \end{macrocode} % \end{macro} % -% -% \begin{macrocode} -%</2ekernel|latexrelease> -%<latexrelease>\EndIncludeInRelease -%<latexrelease>\IncludeInRelease{0000/00/00}% -%<latexrelease> {\oldstylenums}{Old style numerals}% -%<latexrelease> -%<latexrelease>\DeclareRobustCommand\oldstylenums[1]{% -%<latexrelease> \begingroup -%<latexrelease> \spaceskip\fontdimen\tw@\font -%<latexrelease> \usefont{OML}{\rmdefault}{\f@series}{it}% -%<latexrelease> \mathgroup\symletters #1% -%<latexrelease> \endgroup -%<latexrelease>} -%<latexrelease>\let\legacyoldstylenums\@undefined -%<latexrelease>\def\textcompsubstdefault{cmr} -%<latexrelease> -%<latexrelease>\EndIncludeInRelease -% \end{macrocode} -% -% - - - - - -% Everything else in the this file got introduced 2020/02/02, so we do a -% single rollback (for now). -% \begin{macrocode} -%<*2ekernel> -%</2ekernel> -%<*2ekernel|latexrelease> -%<latexrelease>\IncludeInRelease{2020/02/02}% -%<latexrelease> {\DeclareEncodingSubset}{Text companion symbols}% -% \end{macrocode} -% -% -% % \begin{macro}{\DeclareEncodingSubset} % % The declaration takes 3 mandatory arguments: an \emph{encoding} @@ -200,7 +168,7 @@ % declare the subset and finally the \emph{subset} number (between \texttt{0} (all % of the encoding is supported) and \texttt{9} many glyphs are missing. % -% For \texttt{TS1} the numbers have been choosen in a way that most +% For \texttt{TS1} the numbers have been chosen in a way that most % fonts can be fairly correctly categorized, but the default % settings are always conservative, that is they may claim that % less glyphs are supported than there actually are. @@ -362,13 +330,14 @@ } % \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 +% the command |\CheckEncodingSubset| when a symbol is not available in a % certain font family. Here we produce a poor man's Euro symbol by combining % a ``C'' with a ``=''. % \begin{macrocode} @@ -386,10 +355,10 @@ } % \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 @@ -401,21 +370,22 @@ % 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. +% |\textcurrency| is not available. % \begin{macrocode} \def\tc@check@symbol{\CheckEncodingSubset\UseTextSymbol{TS1}\tc@subst} % \end{macrocode} % -% Accents and been mad an error in the \texttt{textcomp} package when +% Accents have been made an error in the \texttt{textcomp} package when % not available. Now that we provide the functionality in the -% kernel we avoid the eror by swapping in a \texttt{T1} accent if +% kernel we avoid the error by swapping in a \texttt{T1} accent if % the \texttt{TS1} accent is not available. % \begin{macrocode} %\def\tc@check@accent{\CheckEncodingSubset\UseTextAccent{TS1}\tc@error} % \end{macrocode} % % \begin{macrocode} -\def\tc@check@accent#1{\CheckEncodingSubset\UseTextAccent{TS1}{\tc@swap@accent#1}} +\def\tc@check@accent#1{\CheckEncodingSubset\UseTextAccent + {TS1}{\tc@swap@accent#1}} \def\tc@swap@accent#1#2{\UseTextAccent{T1}#1} % \end{macrocode} % \end{macro} @@ -430,17 +400,17 @@ % % \begin{macrocode} \DeclareTextSymbolDefault{\textdollar}{TS1} -\UndeclareTextCommand{\textdollar} {OT1} % don't use the OT1 def any longer +\UndeclareTextCommand{\textdollar}{OT1} % don't use the OT1 def any longer % \end{macrocode} % % \begin{macrocode} \DeclareTextSymbolDefault{\textsterling}{TS1} -\UndeclareTextCommand{\textsterling}{OT1} % don't use the OT1 def any longer +\UndeclareTextCommand{\textsterling}{OT1}% don't use the OT1 def any longer % \end{macrocode} % % \begin{macrocode} \DeclareTextSymbolDefault{\textperthousand}{TS1} -\UndeclareTextCommand{\textperthousand}{T1} % don't use the T1 def +\UndeclareTextCommand{\textperthousand}{T1} % don't use the T1 def % \end{macrocode} % Using \cs{UndeclareTextCommand} above is enough only if the % encoding definition files are not reloaded afterwards. In the @@ -462,9 +432,9 @@ % \end{macrocode} % % And here are the other \texttt{TS1} glyphs that are implemented -% by every font (or nearly everyone---a few are commented out and +% by every font (or nearly every---a few are commented out and % moved to sub-encoding 9, -% because they aren't around in one or two fonts. +% because they aren't around in some fonts. % \begin{macrocode} %%\DeclareTextSymbolDefault{\textbardbl}{TS1} % subst in sub-enc 9 above \DeclareTextSymbolDefault{\textbrokenbar}{TS1} @@ -541,31 +511,49 @@ % % \begin{macrocode} \ifx\Umathcode\@undefined - \DeclareTextCommandDefault{\capitalacute} {\tc@check@accent{\'}2\capitalacute} - \DeclareTextCommandDefault{\capitalbreve} {\tc@check@accent{\u}2\capitalbreve} - \DeclareTextCommandDefault{\capitalcaron} {\tc@check@accent{\v}2\capitalcaron} - \DeclareTextCommandDefault{\capitalcedilla} {\tc@check@accent{\c}2\capitalcedilla} - \DeclareTextCommandDefault{\capitalcircumflex} {\tc@check@accent{\^}2\capitalcircumflex} - \DeclareTextCommandDefault{\capitaldieresis} {\tc@check@accent{\"}2\capitaldieresis} - \DeclareTextCommandDefault{\capitaldotaccent} {\tc@check@accent{\.}2\capitaldotaccent} - \DeclareTextCommandDefault{\capitalgrave} {\tc@check@accent{\`}2\capitalgrave} - \DeclareTextCommandDefault{\capitalhungarumlaut}{\tc@check@accent{\H}2\capitalhungarumlaut} - \DeclareTextCommandDefault{\capitalmacron} {\tc@check@accent{\=}2\capitalmacron} - \DeclareTextCommandDefault{\capitalogonek} {\tc@check@accent{\k}2\capitalogonek} - \DeclareTextCommandDefault{\capitalring} {\tc@check@accent{\r}2\capitalring} - \DeclareTextCommandDefault{\capitaltie} {\tc@check@accent{\t}2\capitaltie} - \DeclareTextCommandDefault{\capitaltilde} {\tc@check@accent{\~}2\capitaltilde} + \DeclareTextCommandDefault{\capitalacute} + {\tc@check@accent{\'}2\capitalacute} + \DeclareTextCommandDefault{\capitalbreve} + {\tc@check@accent{\u}2\capitalbreve} + \DeclareTextCommandDefault{\capitalcaron} + {\tc@check@accent{\v}2\capitalcaron} + \DeclareTextCommandDefault{\capitalcedilla} + {\tc@check@accent{\c}2\capitalcedilla} + \DeclareTextCommandDefault{\capitalcircumflex} + {\tc@check@accent{\^}2\capitalcircumflex} + \DeclareTextCommandDefault{\capitaldieresis} + {\tc@check@accent{\"}2\capitaldieresis} + \DeclareTextCommandDefault{\capitaldotaccent} + {\tc@check@accent{\.}2\capitaldotaccent} + \DeclareTextCommandDefault{\capitalgrave} + {\tc@check@accent{\`}2\capitalgrave} + \DeclareTextCommandDefault{\capitalhungarumlaut} + {\tc@check@accent{\H}2\capitalhungarumlaut} + \DeclareTextCommandDefault{\capitalmacron} + {\tc@check@accent{\=}2\capitalmacron} + \DeclareTextCommandDefault{\capitalogonek} + {\tc@check@accent{\k}2\capitalogonek} + \DeclareTextCommandDefault{\capitalring} + {\tc@check@accent{\r}2\capitalring} + \DeclareTextCommandDefault{\capitaltie} + {\tc@check@accent{\t}2\capitaltie} + \DeclareTextCommandDefault{\capitaltilde} + {\tc@check@accent{\~}2\capitaltilde} % \end{macrocode} % For \cs{newtie} and \cs{capitalnewtie} this is actually wrong, they should pick up % the accent from the substitution font (not done yet). % \begin{macrocode} - \DeclareTextCommandDefault{\newtie} {\tc@check@accent{\t}2\newtie} - \DeclareTextCommandDefault{\capitalnewtie} {\tc@check@accent{\t}2\capitalnewtie} + \DeclareTextCommandDefault{\newtie} + {\tc@check@accent{\t}2\newtie} + \DeclareTextCommandDefault{\capitalnewtie} + {\tc@check@accent{\t}2\capitalnewtie} % \end{macrocode} % % In Unicode engines we just execute the simple accents: -% \changes{v1.0c}{2020/02/10}{Use \cs{@tabacckludge} for tabbing where necessary (gh/271)} -% \changes{v1.0d}{2020/04/29}{Make all captial accents text commands for hyperref (gh/332)} +% \changes{v1.0c}{2020/02/10}{Use \cs{@tabacckludge} for +% tabbing where necessary (gh/271)} +% \changes{v1.0d}{2020/04/29}{Make all capital accents text +% commands for hyperref (gh/332)} % \begin{macrocode} \else \DeclareTextCommandDefault\capitalacute{\@tabacckludge'} @@ -593,8 +581,10 @@ % The next two symbols exist in some fonts (faked?), but we ignore % that to keep the subsets reasonable compact and most important linear. % \begin{macrocode} -\DeclareTextCommandDefault{\textlbrackdbl} {\tc@check@symbol2\textlbrackdbl} -\DeclareTextCommandDefault{\textrbrackdbl} {\tc@check@symbol2\textrbrackdbl} +\DeclareTextCommandDefault{\textlbrackdbl} + {\tc@check@symbol2\textlbrackdbl} +\DeclareTextCommandDefault{\textrbrackdbl} + {\tc@check@symbol2\textrbrackdbl} % \end{macrocode} % % @@ -603,72 +593,118 @@ % claim they aren't in sub-encoding 2 as that's true for most % fonts. % \begin{macrocode} -\DeclareTextCommandDefault{\texteightoldstyle} {\tc@check@symbol2\texteightoldstyle} -\DeclareTextCommandDefault{\textfiveoldstyle} {\tc@check@symbol2\textfiveoldstyle} -\DeclareTextCommandDefault{\textfouroldstyle} {\tc@check@symbol2\textfouroldstyle} -\DeclareTextCommandDefault{\textnineoldstyle} {\tc@check@symbol2\textnineoldstyle} -\DeclareTextCommandDefault{\textoneoldstyle} {\tc@check@symbol2\textoneoldstyle} -\DeclareTextCommandDefault{\textsevenoldstyle} {\tc@check@symbol2\textsevenoldstyle} -\DeclareTextCommandDefault{\textsixoldstyle} {\tc@check@symbol2\textsixoldstyle} -\DeclareTextCommandDefault{\textthreeoldstyle} {\tc@check@symbol2\textthreeoldstyle} -\DeclareTextCommandDefault{\texttwooldstyle} {\tc@check@symbol2\texttwooldstyle} -\DeclareTextCommandDefault{\textzerooldstyle} {\tc@check@symbol2\textzerooldstyle} -% \end{macrocode} -% -% -% -% The next set of glyphs is special to TeX fonts (and available -% with a few older PS fonts supported in the virtual fonts), but +\DeclareTextCommandDefault{\texteightoldstyle} + {\tc@check@symbol2\texteightoldstyle} +\DeclareTextCommandDefault{\textfiveoldstyle} + {\tc@check@symbol2\textfiveoldstyle} +\DeclareTextCommandDefault{\textfouroldstyle} + {\tc@check@symbol2\textfouroldstyle} +\DeclareTextCommandDefault{\textnineoldstyle} + {\tc@check@symbol2\textnineoldstyle} +\DeclareTextCommandDefault{\textoneoldstyle} + {\tc@check@symbol2\textoneoldstyle} +\DeclareTextCommandDefault{\textsevenoldstyle} + {\tc@check@symbol2\textsevenoldstyle} +\DeclareTextCommandDefault{\textsixoldstyle} + {\tc@check@symbol2\textsixoldstyle} +\DeclareTextCommandDefault{\textthreeoldstyle} + {\tc@check@symbol2\textthreeoldstyle} +\DeclareTextCommandDefault{\texttwooldstyle} + {\tc@check@symbol2\texttwooldstyle} +\DeclareTextCommandDefault{\textzerooldstyle} + {\tc@check@symbol2\textzerooldstyle} +% \end{macrocode} +% +% +% +% The next set of glyphs is special to \TeX{} fonts (and available +% with a few older PS fonts supported through virtual fonts), but % not any longer in the majority of fonts provided through % autoinst, so we pretend there aren't available in sub-encoding 2 % and below. % \begin{macrocode} -\DeclareTextCommandDefault{\textacutedbl} {\tc@check@symbol2\textacutedbl} -\DeclareTextCommandDefault{\textasciiacute} {\tc@check@symbol2\textasciiacute} -\DeclareTextCommandDefault{\textasciibreve} {\tc@check@symbol2\textasciibreve} -\DeclareTextCommandDefault{\textasciicaron} {\tc@check@symbol2\textasciicaron} -\DeclareTextCommandDefault{\textasciidieresis} {\tc@check@symbol2\textasciidieresis} -\DeclareTextCommandDefault{\textasciigrave} {\tc@check@symbol2\textasciigrave} -\DeclareTextCommandDefault{\textasciimacron} {\tc@check@symbol2\textasciimacron} -\DeclareTextCommandDefault{\textgravedbl} {\tc@check@symbol2\textgravedbl} -\DeclareTextCommandDefault{\texttildelow} {\tc@check@symbol2\texttildelow} +\DeclareTextCommandDefault{\textacutedbl} + {\tc@check@symbol2\textacutedbl} +\DeclareTextCommandDefault{\textasciiacute} + {\tc@check@symbol2\textasciiacute} +\DeclareTextCommandDefault{\textasciibreve} + {\tc@check@symbol2\textasciibreve} +\DeclareTextCommandDefault{\textasciicaron} + {\tc@check@symbol2\textasciicaron} +\DeclareTextCommandDefault{\textasciidieresis} + {\tc@check@symbol2\textasciidieresis} +\DeclareTextCommandDefault{\textasciigrave} + {\tc@check@symbol2\textasciigrave} +\DeclareTextCommandDefault{\textasciimacron} + {\tc@check@symbol2\textasciimacron} +\DeclareTextCommandDefault{\textgravedbl} + {\tc@check@symbol2\textgravedbl} +\DeclareTextCommandDefault{\texttildelow} + {\tc@check@symbol2\texttildelow} % \end{macrocode} % % % Finally those below are only available in CM-based fonts but in % no font that has its origin outside of the \TeX{} world. % \begin{macrocode} -\DeclareTextCommandDefault{\textbaht} {\tc@check@symbol2\textbaht} -\DeclareTextCommandDefault{\textbigcircle} {\tc@check@symbol2\textbigcircle} -\DeclareTextCommandDefault{\textborn} {\tc@check@symbol2\textborn} -\DeclareTextCommandDefault{\textcentoldstyle} {\tc@check@symbol2\textcentoldstyle} -\DeclareTextCommandDefault{\textcircledP} {\tc@check@symbol2\textcircledP} -\DeclareTextCommandDefault{\textcopyleft} {\tc@check@symbol2\textcopyleft} -\DeclareTextCommandDefault{\textdblhyphenchar} {\tc@check@symbol2\textdblhyphenchar} -\DeclareTextCommandDefault{\textdblhyphen} {\tc@check@symbol2\textdblhyphen} -\DeclareTextCommandDefault{\textdied} {\tc@check@symbol2\textdied} -\DeclareTextCommandDefault{\textdiscount} {\tc@check@symbol2\textdiscount} -\DeclareTextCommandDefault{\textdivorced} {\tc@check@symbol2\textdivorced} -\DeclareTextCommandDefault{\textdollaroldstyle} {\tc@check@symbol2\textdollaroldstyle} -\DeclareTextCommandDefault{\textguarani} {\tc@check@symbol2\textguarani} -\DeclareTextCommandDefault{\textleaf} {\tc@check@symbol2\textleaf} -\DeclareTextCommandDefault{\textlquill} {\tc@check@symbol2\textlquill} -\DeclareTextCommandDefault{\textmarried} {\tc@check@symbol2\textmarried} -\DeclareTextCommandDefault{\textmho} {\tc@check@symbol2\textmho} -\DeclareTextCommandDefault{\textmusicalnote} {\tc@check@symbol2\textmusicalnote} -\DeclareTextCommandDefault{\textnaira} {\tc@check@symbol2\textnaira} -\DeclareTextCommandDefault{\textopenbullet} {\tc@check@symbol2\textopenbullet} -\DeclareTextCommandDefault{\textpeso} {\tc@check@symbol2\textpeso} -\DeclareTextCommandDefault{\textpilcrow} {\tc@check@symbol2\textpilcrow} -\DeclareTextCommandDefault{\textrecipe} {\tc@check@symbol2\textrecipe} -\DeclareTextCommandDefault{\textreferencemark} {\tc@check@symbol2\textreferencemark} -\DeclareTextCommandDefault{\textrquill} {\tc@check@symbol2\textrquill} -\DeclareTextCommandDefault{\textservicemark} {\tc@check@symbol2\textservicemark} -\DeclareTextCommandDefault{\textsurd} {\tc@check@symbol2\textsurd} +\DeclareTextCommandDefault{\textbaht} + {\tc@check@symbol2\textbaht} +\DeclareTextCommandDefault{\textbigcircle} + {\tc@check@symbol2\textbigcircle} +\DeclareTextCommandDefault{\textborn} + {\tc@check@symbol2\textborn} +\DeclareTextCommandDefault{\textcentoldstyle} + {\tc@check@symbol2\textcentoldstyle} +\DeclareTextCommandDefault{\textcircledP} + {\tc@check@symbol2\textcircledP} +\DeclareTextCommandDefault{\textcopyleft} + {\tc@check@symbol2\textcopyleft} +\DeclareTextCommandDefault{\textdblhyphenchar} + {\tc@check@symbol2\textdblhyphenchar} +\DeclareTextCommandDefault{\textdblhyphen} + {\tc@check@symbol2\textdblhyphen} +\DeclareTextCommandDefault{\textdied} + {\tc@check@symbol2\textdied} +\DeclareTextCommandDefault{\textdiscount} + {\tc@check@symbol2\textdiscount} +\DeclareTextCommandDefault{\textdivorced} + {\tc@check@symbol2\textdivorced} +\DeclareTextCommandDefault{\textdollaroldstyle} + {\tc@check@symbol2\textdollaroldstyle} +\DeclareTextCommandDefault{\textguarani} + {\tc@check@symbol2\textguarani} +\DeclareTextCommandDefault{\textleaf} + {\tc@check@symbol2\textleaf} +\DeclareTextCommandDefault{\textlquill} + {\tc@check@symbol2\textlquill} +\DeclareTextCommandDefault{\textmarried} + {\tc@check@symbol2\textmarried} +\DeclareTextCommandDefault{\textmho} + {\tc@check@symbol2\textmho} +\DeclareTextCommandDefault{\textmusicalnote} + {\tc@check@symbol2\textmusicalnote} +\DeclareTextCommandDefault{\textnaira} + {\tc@check@symbol2\textnaira} +\DeclareTextCommandDefault{\textopenbullet} + {\tc@check@symbol2\textopenbullet} +\DeclareTextCommandDefault{\textpeso} + {\tc@check@symbol2\textpeso} +\DeclareTextCommandDefault{\textpilcrow} + {\tc@check@symbol2\textpilcrow} +\DeclareTextCommandDefault{\textrecipe} + {\tc@check@symbol2\textrecipe} +\DeclareTextCommandDefault{\textreferencemark} + {\tc@check@symbol2\textreferencemark} +\DeclareTextCommandDefault{\textrquill} + {\tc@check@symbol2\textrquill} +\DeclareTextCommandDefault{\textservicemark} + {\tc@check@symbol2\textservicemark} +\DeclareTextCommandDefault{\textsurd} + {\tc@check@symbol2\textsurd} % \end{macrocode} % % The \cs{textpertenthousand} also belongs in this group but here -% we have a choice: in T1 there is definition for +% we have a choice: in T1 there is a definition for % \cs{textpertenthousand} making the symbol up from \% and % \verb=\char 24= (twice) but in many fonts that char doesn't exist % and the slot is reused for random ligatures. So better not use it @@ -679,7 +715,8 @@ % Alternatively we could just state that the symbol is unavailable in % those fonts. For now I substitute. % \begin{macrocode} -\DeclareTextCommandDefault{\textpertenthousand} {\tc@check@symbol2\textpertenthousand} +\DeclareTextCommandDefault{\textpertenthousand} + {\tc@check@symbol2\textpertenthousand} \UndeclareTextCommand{\textpertenthousand}{T1} % \end{macrocode} % @@ -691,8 +728,10 @@ % symbols. In the higher-numbered sub-encodings we see only a few % dropped additionally. % \begin{macrocode} -\DeclareTextCommandDefault{\textlangle} {\tc@check@symbol3\textlangle} -\DeclareTextCommandDefault{\textrangle} {\tc@check@symbol3\textrangle} +\DeclareTextCommandDefault{\textlangle} + {\tc@check@symbol3\textlangle} +\DeclareTextCommandDefault{\textrangle} + {\tc@check@symbol3\textrangle} % \end{macrocode} % % @@ -702,14 +741,22 @@ % \subsection{Sub-encoding \texttt{4}} % % \begin{macrocode} -\DeclareTextCommandDefault{\textcolonmonetary} {\tc@check@symbol4\textcolonmonetary} -\DeclareTextCommandDefault{\textdong} {\tc@check@symbol4\textdong} -\DeclareTextCommandDefault{\textdownarrow} {\tc@check@symbol4\textdownarrow} -\DeclareTextCommandDefault{\textleftarrow} {\tc@check@symbol4\textleftarrow} -\DeclareTextCommandDefault{\textlira} {\tc@check@symbol4\textlira} -\DeclareTextCommandDefault{\textrightarrow} {\tc@check@symbol4\textrightarrow} -\DeclareTextCommandDefault{\textuparrow} {\tc@check@symbol4\textuparrow} -\DeclareTextCommandDefault{\textwon} {\tc@check@symbol4\textwon} +\DeclareTextCommandDefault{\textcolonmonetary} + {\tc@check@symbol4\textcolonmonetary} +\DeclareTextCommandDefault{\textdong} + {\tc@check@symbol4\textdong} +\DeclareTextCommandDefault{\textdownarrow} + {\tc@check@symbol4\textdownarrow} +\DeclareTextCommandDefault{\textleftarrow} + {\tc@check@symbol4\textleftarrow} +\DeclareTextCommandDefault{\textlira} + {\tc@check@symbol4\textlira} +\DeclareTextCommandDefault{\textrightarrow} + {\tc@check@symbol4\textrightarrow} +\DeclareTextCommandDefault{\textuparrow} + {\tc@check@symbol4\textuparrow} +\DeclareTextCommandDefault{\textwon} + {\tc@check@symbol4\textwon} % \end{macrocode} % % @@ -720,22 +767,24 @@ % % Most older PS fonts (supported in \TeX{} since the early nineties % when virtual fonts became available) are sorted under this -% sub-encoding. But in reality, many of them don't have all glpyhs +% sub-encoding. But in reality, many of them don't have all glyphs % that should be available in sub-encoding \texttt{5}. Instead they % show little squares, i.e., they produce ``tofu'' if you are % unlucky. % % But the coverage is so random that it is impossible to sort them % properly and if we tried to ensure that they only typeset those -% glyphs that are really always available wouput put them all into -% sub-encoding \texttt{9} so that's a compromise really. +% glyphs that are really always available, we would have to put them all into +% sub-encoding \texttt{9}; so putting them into 5 is really a compromise. % -% Modern fonts that don't typeset a tofu character if a glyph is -% missing are only cataloged as sub-encoding \texttt{5} if they -% really support of its glyph set. +% Modern fonts usually don't typeset a tofu character if a glyph is +% missing. They are therefore only classified as sub-encoding \texttt{5} if they +% really support its glyph set completely. % \begin{macrocode} -\DeclareTextCommandDefault{\textestimated} {\tc@check@symbol5\textestimated} -\DeclareTextCommandDefault{\textnumero} {\tc@check@symbol5\textnumero} +\DeclareTextCommandDefault{\textestimated} + {\tc@check@symbol5\textestimated} +\DeclareTextCommandDefault{\textnumero} + {\tc@check@symbol5\textnumero} % \end{macrocode} % % @@ -744,8 +793,10 @@ % \subsection{Sub-encoding \texttt{6}} % % \begin{macrocode} -\DeclareTextCommandDefault{\textflorin} {\tc@check@symbol6\textflorin} -\DeclareTextCommandDefault{\textcurrency} {\tc@check@symbol6\textcurrency} +\DeclareTextCommandDefault{\textflorin} + {\tc@check@symbol6\textflorin} +\DeclareTextCommandDefault{\textcurrency} + {\tc@check@symbol6\textcurrency} % \end{macrocode} % % @@ -753,10 +804,14 @@ % \subsection{Sub-encoding \texttt{7}} % % \begin{macrocode} -\DeclareTextCommandDefault{\textfractionsolidus}{\tc@check@symbol7\textfractionsolidus} -\DeclareTextCommandDefault{\textohm} {\tc@check@symbol7\textohm} -\DeclareTextCommandDefault{\textmu} {\tc@check@symbol7\textmu} -\DeclareTextCommandDefault{\textminus} {\tc@check@symbol7\textminus} +\DeclareTextCommandDefault{\textfractionsolidus} + {\tc@check@symbol7\textfractionsolidus} +\DeclareTextCommandDefault{\textohm} + {\tc@check@symbol7\textohm} +\DeclareTextCommandDefault{\textmu} + {\tc@check@symbol7\textmu} +\DeclareTextCommandDefault{\textminus} + {\tc@check@symbol7\textminus} % \end{macrocode} % % @@ -764,16 +819,19 @@ % \subsection{Sub-encoding \texttt{8}} % % \begin{macrocode} -\DeclareTextCommandDefault{\textblank} {\tc@check@symbol{8}\textblank} -\DeclareTextCommandDefault{\textinterrobangdown}{\tc@check@symbol{8}\textinterrobangdown} -\DeclareTextCommandDefault{\textinterrobang} {\tc@check@symbol{8}\textinterrobang} +\DeclareTextCommandDefault{\textblank} + {\tc@check@symbol{8}\textblank} +\DeclareTextCommandDefault{\textinterrobangdown} + {\tc@check@symbol{8}\textinterrobangdown} +\DeclareTextCommandDefault{\textinterrobang} + {\tc@check@symbol{8}\textinterrobang} % \end{macrocode} % % Fonts with this sub-encoding don't have a Euro symbol, but % instead of substituting we fake it. % \begin{macrocode} \DeclareTextCommandDefault{\texteuro} - {\CheckEncodingSubset\UseTextSymbol{TS1}\tc@fake@euro{8}\texteuro} + {\CheckEncodingSubset\UseTextSymbol{TS1}\tc@fake@euro{8}\texteuro} % \end{macrocode} % % @@ -782,13 +840,20 @@ % \subsection{Sub-encoding \texttt{9} (most missing)} % % \begin{macrocode} -\DeclareTextCommandDefault{\textcelsius}{\tc@check@symbol{9}\textcelsius} -\DeclareTextCommandDefault{\textonesuperior}{\tc@check@symbol{9}\textonesuperior} -\DeclareTextCommandDefault{\textthreequartersemdash}{\tc@check@symbol{9}\textthreequartersemdash} -\DeclareTextCommandDefault{\textthreesuperior}{\tc@check@symbol{9}\textthreesuperior} -\DeclareTextCommandDefault{\texttwelveudash}{\tc@check@symbol{9}\texttwelveudash} -\DeclareTextCommandDefault{\texttwosuperior}{\tc@check@symbol{9}\texttwosuperior} -\DeclareTextCommandDefault{\textbardbl}{\tc@check@symbol{9}\textbardbl} +\DeclareTextCommandDefault{\textcelsius} + {\tc@check@symbol{9}\textcelsius} +\DeclareTextCommandDefault{\textonesuperior} + {\tc@check@symbol{9}\textonesuperior} +\DeclareTextCommandDefault{\textthreequartersemdash} + {\tc@check@symbol{9}\textthreequartersemdash} +\DeclareTextCommandDefault{\textthreesuperior} + {\tc@check@symbol{9}\textthreesuperior} +\DeclareTextCommandDefault{\texttwelveudash} + {\tc@check@symbol{9}\texttwelveudash} +\DeclareTextCommandDefault{\texttwosuperior} + {\tc@check@symbol{9}\texttwosuperior} +\DeclareTextCommandDefault{\textbardbl} + {\tc@check@symbol{9}\textbardbl} % \end{macrocode} % % @@ -830,20 +895,20 @@ \DeclareTextCommand{\texteightoldstyle}\UnicodeEncodingName{\oldstylenums{8}} \DeclareTextCommand{\textnineoldstyle} \UnicodeEncodingName{\oldstylenums{9}} % \end{macrocode} -% These have Unicode slots so this should be integrated into TU explictly +% These have Unicode slots so this should be integrated into TU explicitly % \begin{macrocode} -\DeclareTextSymbol{\textpilcrow} \UnicodeEncodingName{"00B6} -\DeclareTextSymbol{\textborn} \UnicodeEncodingName{"002A} -\DeclareTextSymbol{\textdied} \UnicodeEncodingName{"2020} -\DeclareTextSymbol{\textlbrackdbl} \UnicodeEncodingName{"27E6} -\DeclareTextSymbol{\textrbrackdbl} \UnicodeEncodingName{"27E7} -\DeclareTextSymbol{\textguarani} \UnicodeEncodingName{"20B2} +\DeclareTextSymbol{\textpilcrow} \UnicodeEncodingName{"00B6} +\DeclareTextSymbol{\textborn} \UnicodeEncodingName{"002A} +\DeclareTextSymbol{\textdied} \UnicodeEncodingName{"2020} +\DeclareTextSymbol{\textlbrackdbl} \UnicodeEncodingName{"27E6} +\DeclareTextSymbol{\textrbrackdbl} \UnicodeEncodingName{"27E7} +\DeclareTextSymbol{\textguarani} \UnicodeEncodingName{"20B2} % \end{macrocode} % We could make \cs{textcentoldstyle} and \cs{textdollaroldstyle} % point to dollar and cent in the Unicode encoding % \begin{macrocode} -%\DeclareTextSymbol{\textcentoldstyle} \UnicodeEncodingName{"00A2} -%\DeclareTextSymbol{\textdollaroldstyle} \UnicodeEncodingName{"0024} +%\DeclareTextSymbol{\textcentoldstyle} \UnicodeEncodingName{"00A2} +%\DeclareTextSymbol{\textdollaroldstyle}\UnicodeEncodingName{"0024} % \end{macrocode} % but I think it is better to pick them up from TS1 even if that % usually means LMR fonts @@ -908,7 +973,8 @@ \DeclareEncodingSubset{TS1}{lmss} {1} \DeclareEncodingSubset{TS1}{lmssq} {1} \DeclareEncodingSubset{TS1}{lmvtt} {1} -\DeclareEncodingSubset{TS1}{lmtt} {1} % missing TM, SM, pertenthousand for some reason +\DeclareEncodingSubset{TS1}{lmtt} {1} % missing TM, SM and + % pertenthousand for some reason % \end{macrocode} % % \begin{macrocode} @@ -918,33 +984,33 @@ % \end{macrocode} % % \begin{macrocode} -\DeclareEncodingSubset{TS1}{bch} {5} % tofu for blank, ohm -\DeclareEncodingSubset{TS1}{futj} {5} % tofu for blank, interrobang/down, ohm -\DeclareEncodingSubset{TS1}{futs} {5} % tofu for blank, ohm -\DeclareEncodingSubset{TS1}{futx} {5} % probably (currently broken distrib) -\DeclareEncodingSubset{TS1}{pag} {5} % tofu for blank, interrobang/down, ohm -\DeclareEncodingSubset{TS1}{pbk} {5} % tofu for blank, interrobang/down, ohm -\DeclareEncodingSubset{TS1}{pcr} {5} % tofu for blank, interrobang/down, ohm -\DeclareEncodingSubset{TS1}{phv} {5} % tofu for blank, interrobang/down, ohm -\DeclareEncodingSubset{TS1}{pnc} {5} % tofu for blank, interrobang/down, ohm -\DeclareEncodingSubset{TS1}{pplj} {5} % tofu for blank -\DeclareEncodingSubset{TS1}{pplx} {5} % tofu for blank -\DeclareEncodingSubset{TS1}{ppl} {5} % tofu for blank interrobang/down -\DeclareEncodingSubset{TS1}{ptm} {5} % tofu for blank, interrobang/down, ohm -\DeclareEncodingSubset{TS1}{pzc} {5} % tofu for blank, interrobang/down, ohm -\DeclareEncodingSubset{TS1}{ul9} {5} % tofu for blank, interrobang/down, ohm +\DeclareEncodingSubset{TS1}{bch} {5} % tofu for blank, ohm +\DeclareEncodingSubset{TS1}{futj}{5} % tofu for blank, interrobang/down, ohm +\DeclareEncodingSubset{TS1}{futs}{5} % tofu for blank, ohm +\DeclareEncodingSubset{TS1}{futx}{5} % probably (currently broken distrib) +\DeclareEncodingSubset{TS1}{pag} {5} % tofu for blank, interrobang/down, ohm +\DeclareEncodingSubset{TS1}{pbk} {5} % tofu for blank, interrobang/down, ohm +\DeclareEncodingSubset{TS1}{pcr} {5} % tofu for blank, interrobang/down, ohm +\DeclareEncodingSubset{TS1}{phv} {5} % tofu for blank, interrobang/down, ohm +\DeclareEncodingSubset{TS1}{pnc} {5} % tofu for blank, interrobang/down, ohm +\DeclareEncodingSubset{TS1}{pplj}{5} % tofu for blank +\DeclareEncodingSubset{TS1}{pplx}{5} % tofu for blank +\DeclareEncodingSubset{TS1}{ppl} {5} % tofu for blank interrobang/down +\DeclareEncodingSubset{TS1}{ptm} {5} % tofu for blank, interrobang/down, ohm +\DeclareEncodingSubset{TS1}{pzc} {5} % tofu for blank, interrobang/down, ohm +\DeclareEncodingSubset{TS1}{ul9} {5} % tofu for blank, interrobang/down, ohm % \end{macrocode} % % \begin{macrocode} -\DeclareEncodingSubset{TS1}{dayroms} {6} % tofu for blank, interrobang/down, ohm -\DeclareEncodingSubset{TS1}{dayrom} {6} % tofu for blank, interrobang/down, ohm +\DeclareEncodingSubset{TS1}{dayroms}{6} % tofu for blank, interrobang/down, ohm +\DeclareEncodingSubset{TS1}{dayrom} {6} % tofu for blank, interrobang/down, ohm % \end{macrocode} % % \begin{macrocode} -\DeclareEncodingSubset{TS1}{augie} {8} % really only missing euro -\DeclareEncodingSubset{TS1}{put} {8} -\DeclareEncodingSubset{TS1}{uag} {8} % probably (currently broken distrib) -\DeclareEncodingSubset{TS1}{ugq} {8} +\DeclareEncodingSubset{TS1}{augie}{8} % really only missing euro +\DeclareEncodingSubset{TS1}{put} {8} +\DeclareEncodingSubset{TS1}{uag} {8} % probably (currently broken distrib) +\DeclareEncodingSubset{TS1}{ugq} {8} % \end{macrocode} % % \begin{macrocode} @@ -976,14 +1042,14 @@ % substituted. % % \begin{macrocode} -\DeclareEncodingSubset{TS1}{lato-*} {0} % with a bunch of tofu inside -\DeclareEncodingSubset{TS1}{opensans-*} {0} % with a bunch of tofu inside -\DeclareEncodingSubset{TS1}{cantarell-*} {0} % with a bunch of tofu inside -\DeclareEncodingSubset{TS1}{fbb-*} {0} % missing centoldstyle +\DeclareEncodingSubset{TS1}{lato-*} {0} % with a bunch of tofu inside +\DeclareEncodingSubset{TS1}{opensans-*} {0} % with a bunch of tofu inside +\DeclareEncodingSubset{TS1}{cantarell-*} {0} % with a bunch of tofu inside +\DeclareEncodingSubset{TS1}{fbb-*} {0} % missing centoldstyle % \end{macrocode} % % \begin{macrocode} -\DeclareEncodingSubset{TS1}{tli} {1} % with lots of tofu inside +\DeclareEncodingSubset{TS1}{tli} {1} % with lots of tofu inside % \end{macrocode} % % \begin{macrocode} @@ -1109,7 +1175,7 @@ \DeclareEncodingSubset{TS1}{erewhon-*} {7} \DeclareEncodingSubset{TS1}{ComicNeue-TLF} {7} \DeclareEncodingSubset{TS1}{ComicNeueAngular-TLF} {7} -\DeclareEncodingSubset{TS1}{Forum-LF} {7} % the superiors are missing +\DeclareEncodingSubset{TS1}{Forum-LF} {7} % the superiors are missing % \end{macrocode} % % \begin{macrocode} @@ -1156,7 +1222,7 @@ % \begin{macro}{\textlegacysection} % % Here are new names for the legacy symbols that \LaTeX{} used to -% pick up from the \texttt{OMS} encoded fonts (and used dor itemize +% pick up from the \texttt{OMS} encoded fonts (and used for itemize % lists or footnote symbols. % % We go the roundabout way via separate OMS declarations so that @@ -1199,9 +1265,19 @@ % Supporting rollback \ldots % \begin{macrocode} %</2ekernel|latexrelease> -%<latexrelease>\EndIncludeInRelease +%<latexrelease> %<latexrelease>\IncludeInRelease{0000/00/00}% -%<latexrelease> {\DeclareEncodingSubset}{Text companion symbols}% +%<latexrelease> {lttextcomp}{Undefine text companion symbols}% +%<latexrelease> +%<latexrelease>\DeclareRobustCommand\oldstylenums[1]{% +%<latexrelease> \begingroup +%<latexrelease> \spaceskip\fontdimen\tw@\font +%<latexrelease> \usefont{OML}{\rmdefault}{\f@series}{it}% +%<latexrelease> \mathgroup\symletters #1% +%<latexrelease> \endgroup +%<latexrelease>} +%<latexrelease>\let\legacyoldstylenums\@undefined +%<latexrelease>\def\textcompsubstdefault{cmr} %<latexrelease> %<latexrelease>\let\DeclareEncodingSubset\@undefined %<latexrelease>\let\CheckEncodingSubset\@undefined @@ -1237,26 +1313,32 @@ %<latexrelease>\let\textbrokenbar\@undefined %<latexrelease>\let\textcelsius\@undefined %<latexrelease>\let\textcent\@undefined -%<latexrelease>\DeclareTextCommandDefault{\textcopyright}{\textcircled{c}} +%<latexrelease>\DeclareTextCommandDefault{\textcopyright} +%<latexrelease> {\textcircled{c}} %<latexrelease>\let\textdegree\@undefined %<latexrelease>\let\textdiv\@undefined %<latexrelease>\let\textlnot\@undefined %<latexrelease>\let\textonehalf\@undefined %<latexrelease>\let\textonequarter\@undefined %<latexrelease>\let\textonesuperior\@undefined -%<latexrelease>\DeclareTextCommandDefault{\textordfeminine}{\textsuperscript{a}} -%<latexrelease>\DeclareTextCommandDefault{\textordmasculine}{\textsuperscript{o}} +%<latexrelease>\DeclareTextCommandDefault{\textordfeminine} +%<latexrelease> {\textsuperscript{a}} +%<latexrelease>\DeclareTextCommandDefault{\textordmasculine} +%<latexrelease> {\textsuperscript{o}} %<latexrelease>\let\textpm\@undefined %<latexrelease>\let\textquotesingle\@undefined %<latexrelease>\let\textquotestraightbase\@undefined %<latexrelease>\let\textquotestraightdblbase\@undefined -%<latexrelease>\DeclareTextCommandDefault{\textregistered}{\textcircled{% -%<latexrelease> \check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont R}} +%<latexrelease>\DeclareTextCommandDefault{\textregistered} +%<latexrelease> {\textcircled{% +%<latexrelease> \check@mathfonts\fontsize\sf@size\z@ +%<latexrelease> \math@fontsfalse\selectfont R}} %<latexrelease>\let\textthreequartersemdash\@undefined %<latexrelease>\let\textthreequarters\@undefined %<latexrelease>\let\textthreesuperior\@undefined %<latexrelease>\let\texttimes\@undefined -%<latexrelease>\DeclareTextCommandDefault{\texttrademark}{\textsuperscript{TM}} +%<latexrelease>\DeclareTextCommandDefault{\texttrademark} +%<latexrelease> {\textsuperscript{TM}} %<latexrelease>\let\texttwelveudash\@undefined %<latexrelease>\let\texttwosuperior\@undefined %<latexrelease>\let\textyen\@undefined @@ -1386,9 +1468,7 @@ %<latexrelease>\let\textlegacyperiodcentered\@undefined %<latexrelease>\let\textlegacysection\@undefined %<latexrelease> -%<latexrelease>\EndIncludeInRelease -%<*2ekernel> -%</2ekernel> +%<latexrelease>\EndModuleRelease % \end{macrocode} % % @@ -1433,9 +1513,12 @@ % kernel is info only). Using the package options you can change this behavior. % \changes{v2.0n}{2020/02/05}{Changed the package default to info (gh/262)} % \begin{macrocode} -\DeclareOption{error}{\gdef\tc@errorwarn{\PackageError{textcomp}}} -\DeclareOption{warn}{\gdef\tc@errorwarn#1#2{\PackageWarning{textcomp}{#1}}} -\DeclareOption{info}{\gdef\tc@errorwarn#1#2{\PackageInfo{textcomp}{#1}}} +\DeclareOption{error} + {\gdef\tc@errorwarn{\PackageError{textcomp}}} +\DeclareOption{warn} + {\gdef\tc@errorwarn#1#2{\PackageWarning{textcomp}{#1}}} +\DeclareOption{info} + {\gdef\tc@errorwarn#1#2{\PackageInfo{textcomp}{#1}}} \DeclareOption{quiet}{\gdef\tc@errorwarn#1#2{}} % \end{macrocode} % @@ -1443,7 +1526,7 @@ % of the default (which, unless changes, is 9 these days), i.e., it % no longer depends on the font in use. This is mainly there % because it might have been used in older documents, but not -% somehting that is recommended. +% something that is recommended. % \begin{macrocode} \DeclareOption{force}{% \def\CheckEncodingSubset#1#2#3#4#5{% @@ -1483,7 +1566,7 @@ % This section contains the old code for the textcomp package and % its documentation. It is only used if we roll back prior to 2020. % Thus all the rest is mainly for historians. Note that the old -% code categorised in the sub-encodings only into 6 classes not 10. +% code categorized in the sub-encodings only into 6 classes not 10. % % \begin{macrocode} %<*TS1oldsty> @@ -1773,7 +1856,7 @@ % 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. +% |\textcurrency| is not available. % \begin{macrocode} \def\tc@check@symbol{\CheckEncodingSubset\UseTextSymbol{TS1}\tc@subst} \def\tc@check@accent{\CheckEncodingSubset\UseTextAccent{TS1}\tc@error} @@ -2008,7 +2091,7 @@ % % Finally input the encoding-specific definitions for % \texttt{TS1} thus making the top-level definitions -% optimised for this encoding (and not for the default +% optimized for this encoding (and not for the default % encoding). % \changes{v1.9o}{1998/03/20}{Load decls after defaults for speed.} % \begin{macrocode} |