diff options
Diffstat (limited to 'Master/texmf-dist/source/latex-dev/base/ltoutenc.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex-dev/base/ltoutenc.dtx | 89 |
1 files changed, 82 insertions, 7 deletions
diff --git a/Master/texmf-dist/source/latex-dev/base/ltoutenc.dtx b/Master/texmf-dist/source/latex-dev/base/ltoutenc.dtx index 4eea0ad41ec..73146428c0d 100644 --- a/Master/texmf-dist/source/latex-dev/base/ltoutenc.dtx +++ b/Master/texmf-dist/source/latex-dev/base/ltoutenc.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % Copyright (C) 1993-2021 -% The LaTeX3 Project and any individual authors listed elsewhere +% The LaTeX Project and any individual authors listed elsewhere % in this file. % % This file is part of the LaTeX base system. @@ -37,14 +37,14 @@ %<TS1>\ProvidesFile{ts1enc.def}[2001/06/05 v3.0e (jk/car/fm) %<TU>\ProvidesFile{tuenc.def} %<package>\ProvidesPackage{fontenc} -%<OT1|T1|OMS|OML|OT4|TU|package> [2020/08/10 v2.0s +%<OT1|T1|OMS|OML|OT4|TU|package> [2021/02/19 v2.0u %<OT1|T1|OMS|OML|OT4|TS1|TU> Standard LaTeX file] %<package> Standard LaTeX package] % %<*driver> % \fi \ProvidesFile{ltoutenc.dtx} - [2020/12/05 v2.0s LaTeX Kernel (font encodings)] + [2021/02/19 v2.0u LaTeX Kernel (font encodings)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltoutenc.dtx} @@ -1717,6 +1717,17 @@ \DeclareTextSymbol{\textemdash}{OT1}{124} \DeclareTextSymbol{\textendash}{OT1}{123} % \end{macrocode} +% +% The \verb=\nobreak\hskip\z@= is there to prevent a break after +% the hyphen but allow later breaks in the remainder of the word. +% \changes{v2.0u}{2021/02/19}{Add \cs{textnonbreakinghyphen}, \cs{textfiguredash} +% and \cs{texthorizontalbar} (gh/404)} +% \begin{macrocode} +\DeclareTextCommand{\textnonbreakinghyphen}{OT1}{\mbox{-}\nobreak\hskip\z@} +\DeclareTextCommand{\textfiguredash} {OT1}{\textendash} +\DeclareTextCommand{\texthorizontalbar} {OT1}{\textemdash} +% \end{macrocode} +% % Using the ligatures helps with OT1 fonts that have % |\textexclamdown| and |\textquestiondown| in unusual positions. % \changes{v1.95}{2002/06/17}{Definition of \cs{textexclamdown} changed (pr/3368)} @@ -2045,6 +2056,19 @@ \DeclareTextSymbol{\textdollar}{T1}{`\$} \DeclareTextSymbol{\textemdash}{T1}{22} \DeclareTextSymbol{\textendash}{T1}{21} +% \end{macrocode} +% +% The \verb=\nobreak\hskip\z@= is there to prevent a break after +% the hyphen but allow later breaks in the remainder of the word. +% \changes{v2.0u}{2021/02/19}{Add \cs{textnonbreakinghyphen}, \cs{textfiguredash} +% and \cs{texthorizontalbar} (gh/404)} +% \begin{macrocode} +\DeclareTextCommand{\textnonbreakinghyphen}{T1}{\mbox{-}\nobreak\hskip\z@} +\DeclareTextCommand{\textfiguredash} {T1}{\textendash} +\DeclareTextCommand{\texthorizontalbar} {T1}{\textemdash} +% \end{macrocode} +% +% \begin{macrocode} \DeclareTextSymbol{\textexclamdown}{T1}{189} \DeclareTextSymbol{\textgreater}{T1}{`\>} %\DeclareTextSymbol{\texthyphenchar}{T1}{127} @@ -2583,8 +2607,31 @@ \DeclareTextSymbol{\textquotesingle}{TS1}{39} % \end{macrocode} % "28 = 40 -% \begin{macrocode} -\DeclareTextSymbol{\textasteriskcentered}{TS1}{42} +% +% The symbol \cs{textasteriskcentered} ``\textasteriskcentered'' is +% supposed to be always available in \texttt{TS1} and that is +% important as it is used in footnote symbols. However, in a few +% fonts it is missing even though they are otherwise fairly +% complete. We therefore use a rather elaborate method and check if +% the slot has a glyph and if not produce a poor man's version by +% using a normal ``*'' slightly enlarged and somewhat lowered. +% The main application for this symbol is in footnote symbols and +% there it should produce a comparable size and show a similar placement. +% \changes{v2.0t}{2021/02/17}{Special definition for +% \cs{textasteriskcentered} when missing in TS1 (gh/502)} +% \begin{macrocode} +%\DeclareTextSymbol{\textasteriskcentered}{TS1}{42} % that's wanted +\DeclareTextCommand \textasteriskcentered{TS1}{% % and that's needed + \iffontchar\font 42 \char42 \else + \begingroup\fontencoding{T1}% + \fontsize + {\the\dimexpr1.3\dimexpr\f@size pt\relax}% + {\f@baselineskip}% + \selectfont + \raisebox{-0.7ex}[\dimexpr\height-0.7ex][0pt]{*}% + \endgroup + \fi +} % \end{macrocode} % Note that '054 is a comma and '056 is a full stop: these make % numbers using oldstyle digits easier to input. @@ -3106,8 +3153,34 @@ \DeclareTextSymbol{\textbaht} \UnicodeEncodingName{"0E3F} \DeclareTextSymbol{\SS} \UnicodeEncodingName{"1E9E} \DeclareTextSymbol{\textcompwordmark} \UnicodeEncodingName{"200C} +% \end{macrocode} +% +% \changes{v2.0u}{2021/02/19}{Add \cs{textnonbreakinghyphen}, \cs{textfiguredash} +% and \cs{texthorizontalbar} (gh/404)} +% \begin{macrocode} +%\DeclareTextSymbol{\textnonbreakinghyphen} \UnicodeEncodingName{"2011} +%\DeclareTextSymbol{\textfiguredash} \UnicodeEncodingName{"2012} \DeclareTextSymbol{\textendash} \UnicodeEncodingName{"2013} \DeclareTextSymbol{\textemdash} \UnicodeEncodingName{"2014} +%\DeclareTextSymbol{\texthorizontalbar} \UnicodeEncodingName{"2015} +% \end{macrocode} +% Unfortunately some fonts do not implement \texttt{"2011}, \texttt{"2012} and/or +% \texttt{"2015} (including the \LaTeX{} default fonts for Unicode +% engines) so we provide some approximations if the glyph is +% missing, like we do for \texttt{OT1} and \texttt{T1}. +% +% The \verb=\nobreak\hskip\z@= is there to prevent a break after +% the hyphen but allow later breaks in the remainder of the word. +% \begin{macrocode} +\DeclareTextCommand{\textnonbreakinghyphen} \UnicodeEncodingName + {\iffontchar\font "2011 \char "2011 \else \mbox{-}\nobreak\hskip\z@ \fi} +\DeclareTextCommand{\textfiguredash} \UnicodeEncodingName + {\iffontchar\font "2012 \char "2012 \else \char "2013 \fi} +\DeclareTextCommand{\texthorizontalbar} \UnicodeEncodingName + {\iffontchar\font "2015 \char "2015 \else \char "2014 \fi} +% \end{macrocode} +% +% \begin{macrocode} \DeclareTextSymbol{\textbardbl} \UnicodeEncodingName{"2016} \DeclareTextSymbol{\textquoteleft} \UnicodeEncodingName{"2018} \DeclareTextSymbol{\textquoteright} \UnicodeEncodingName{"2019} @@ -3159,15 +3232,17 @@ % \end{macrocode} % % Not all fonts have U+2217 but using U+002A requires some adjustment. +% \changes{v2.0t}{2021/02/17}{Adjust values for +% \cs{textasteriskcentered} To match TS1 definition (gh/502)} % \begin{macrocode} \DeclareTextCommand{\textasteriskcentered}\UnicodeEncodingName{% \iffontchar\font"2217 \char"2217 \else \begingroup \fontsize - {\the\dimexpr1.2\dimexpr\f@size pt\relax}% + {\the\dimexpr1.3\dimexpr\f@size pt\relax}% {\f@baselineskip}% \selectfont - \raisebox{-0.6ex}[\dimexpr\height-0.6ex][0pt]{*}% + \raisebox{-0.7ex}[\dimexpr\height-0.7ex][0pt]{*}% \endgroup \fi } |