summaryrefslogtreecommitdiff
path: root/macros/latex/base/fontdef.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-02-03 03:02:01 +0000
committerNorbert Preining <norbert@preining.info>2020-02-03 03:02:01 +0000
commit34897eebd22c3de968b64f09bb4a371d96cb0b89 (patch)
tree19a50e54fca63f1f6482d6cb4c2fdee676fd97b1 /macros/latex/base/fontdef.dtx
parente05dc0bb38b16bfb9ba35591285e40af0adaadc4 (diff)
CTAN sync 202002030302
Diffstat (limited to 'macros/latex/base/fontdef.dtx')
-rw-r--r--macros/latex/base/fontdef.dtx174
1 files changed, 139 insertions, 35 deletions
diff --git a/macros/latex/base/fontdef.dtx b/macros/latex/base/fontdef.dtx
index c9c5f5d77d..4dd5ea3845 100644
--- a/macros/latex/base/fontdef.dtx
+++ b/macros/latex/base/fontdef.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.
%
@@ -39,7 +39,7 @@
%<driver, >\ProvidesFile{fontdef.drv}
% \fi
% \ProvidesFile{fontdef.dtx}
-%<-latexrelease> [2019/09/21 v3.0d LaTeX Kernel
+%<-latexrelease> [2020/01/25 v3.0f LaTeX Kernel
% \iftrue (\else
%<text, >(Text
%<math, >(Math
@@ -102,7 +102,7 @@
%
% You are not allowed to change this source file! If you want to
% change the default encodings and/or the font shape groups preloaded
-% you should should create a copy of \texttt{fonttext.ltx}
+% you should create a copy of \texttt{fonttext.ltx}
% under the name \texttt{fonttext.cfg} and change this copy. If
% \LaTeXe{} finds a file of this name it will use it, otherwise it
% uses the standard file which is \texttt{fontdef.ltx}.
@@ -249,22 +249,43 @@
% \changes{v3.0a}{2016/12/03}{(DPC) Default to TU encoding for Unicode TeX engines}
% \begin{macrocode}
\input {omlenc.def}
-\input {t1enc.def}
-\input {ot1enc.def} % <- should come after T1 for speed
\input {omsenc.def}
% \end{macrocode}
+% Documents containing a lot of accented characters should really
+% be using T1 fonts. We therefore load this last so that T1 encoding
+% specific commands are executed as fast as possible (encoding
+% files are no longer reloaded in \texttt{fontenc}.
+% \changes{v3.0f}{2020/01/25}{Load t1enc.def last (gh/255)}
+% \begin{macrocode}
+\input {ot1enc.def}
+\input {t1enc.def}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\input{ts1enc.def}
+% \end{macrocode}
% \changes{v3.0a}{2016/12/03}{(DPC) Default to TU encoding for Unicode TeX engines}
% \begin{macrocode}
\ifx\Umathchar\@undefined
% \end{macrocode}
%
-% We then set set the default text font encoding. This will
+% We then set the default text font encoding. This will
% hopefully change some day to |T1|. This setting should \emph{not}
% be changed to produce a portable format.
% \begin{macrocode}
\fontencoding{OT1}
% \end{macrocode}
%
+%
+%
+%
+% \begin{macrocode}
+\def\rmsubstdefault{cmr}
+\def\sfsubstdefault{cmss}
+\def\ttsubstdefault{cmtt}
+\LoadFontDefinitionFile{TS1}{cmr}
+% \end{macrocode}
+%
% \begin{macrocode}
\else
% \end{macrocode}
@@ -273,12 +294,16 @@
\input {tuenc.def}
\fontencoding{TU}
\DeclareFontSubstitution{TU}{lmr}{m}{n}
-\begingroup
-\nfss@catcodes
-\input {tulmr.fd}
-\input {tulmss.fd}
-\input {tulmtt.fd}
-\endgroup
+\LoadFontDefinitionFile{TU}{lmr}
+\LoadFontDefinitionFile{TU}{lmss}
+\LoadFontDefinitionFile{TU}{lmtt}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\rmsubstdefault{lmr}
+\def\sfsubstdefault{lmss}
+\def\ttsubstdefault{lmtt}
+\LoadFontDefinitionFile{TS1}{lmr}
% \end{macrocode}
%
% \begin{macrocode}
@@ -442,8 +467,9 @@
% \begin{macro}{\bfdefault}
% \begin{macro}{\mddefault}
% Series changing commands are influenced by the following hooks.
+% \changes{v3.0e}{2019/12/17}{Set \cs{bfdefault} to ``b''}
% \begin{macrocode}
-\newcommand\bfdefault{bx}
+\newcommand\bfdefault{b} % overwritten below
\newcommand\mddefault{m}
% \end{macrocode}
% \end{macro}
@@ -453,18 +479,39 @@
% \begin{macro}{\sldefault}
% \begin{macro}{\scdefault}
% \begin{macro}{\updefault}
+%
% Shape changing commands use the following hooks.
+% \changes{v3.0e}{2019/12/17}{Set \cs{updefault} to ``up''}
% \begin{macrocode}
\newcommand\itdefault{it}
\newcommand\sldefault{sl}
\newcommand\scdefault{sc}
-\newcommand\updefault{n}
+\newcommand\updefault{up} % overwritten below
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
+
+% \begin{macrocode}
+%</text>
+%<*text|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/02/02}%
+%<latexrelease> {\updefault}{font defaults change}%
+\renewcommand\updefault{up}
+\renewcommand\bfdefault{b}
+%</text|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\updefault}{font defaults change}%
+%<latexrelease>
+%<latexrelease>\renewcommand\updefault{n}
+%<latexrelease>\renewcommand\bfdefault{bx}
+%<latexrelease>\EndIncludeInRelease
+%<*text>
+% \end{macrocode}
+%
% \begin{macro}{\familydefault}
% \begin{macro}{\seriesdefault}
% \begin{macro}{\shapedefault}
@@ -477,7 +524,14 @@
% \begin{macrocode}
\newcommand\familydefault{\rmdefault}
\newcommand\seriesdefault{\mddefault}
-\newcommand\shapedefault{\updefault}
+% \end{macrocode}
+% In previous releases \cs{shapedefault} pointed to \cs{updefault}
+% which resolved to \texttt{n}, but these days that is no longer
+% the case (and \texttt{up} is wrong when you want to do a
+% reset. So we now use \texttt{n} explicitly.
+% \begin{macrocode}
+% \changes{v3.0e}{2019/12/17}{Set \cs{shapedefault} explicitly to ``n''}
+\newcommand\shapedefault{n}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -854,7 +908,15 @@
\DeclareMathSymbol{\forall}{\mathord}{symbols}{"38}
\DeclareMathSymbol{\exists}{\mathord}{symbols}{"39}
\DeclareMathSymbol{\neg}{\mathord}{symbols}{"3A}
- \let\lnot=\neg
+% \end{macrocode}
+% Alias:
+% \changes{v3.0e}{2019/12/21}{Distangle alias (gh/184)}
+% \begin{macrocode}
+% \let\lnot=\neg
+\DeclareMathSymbol{\lnot}{\mathord}{symbols}{"3A}
+% \end{macrocode}
+%
+% \begin{macrocode}
\DeclareMathSymbol{\flat}{\mathord}{letters}{"5B}
\DeclareMathSymbol{\natural}{\mathord}{letters}{"5C}
\DeclareMathSymbol{\sharp}{\mathord}{letters}{"5D}
@@ -863,9 +925,9 @@
\DeclareMathSymbol{\heartsuit}{\mathord}{symbols}{"7E}
\DeclareMathSymbol{\spadesuit}{\mathord}{symbols}{"7F}
% \end{macrocode}
-%
+%
% \changes{v3.0c}{2019/08/27}{Various commands made robust throughout
-% the file}
+% the file}
% \begin{macrocode}
\DeclareRobustCommand\hbar{{\mathchar'26\mkern-9muh}}
\DeclareRobustCommand\surd{{\mathchar"1270}}
@@ -908,18 +970,33 @@
\DeclareMathSymbol{\triangleright}{\mathbin}{letters}{"2E}
\DeclareMathSymbol{\bigtriangleup}{\mathbin}{symbols}{"34}
\DeclareMathSymbol{\bigtriangledown}{\mathbin}{symbols}{"35}
- \let \varbigtriangledown \bigtriangledown
- \let \varbigtriangleup \bigtriangleup
+% \end{macrocode}
+% Alias:
+% \changes{v3.0e}{2019/12/21}{Distangle alias (gh/184)}
+% \begin{macrocode}
+% \let \varbigtriangledown \bigtriangledown
+% \let \varbigtriangleup \bigtriangleup
+\DeclareMathSymbol{\varbigtriangleup}{\mathbin}{symbols}{"34}
+\DeclareMathSymbol{\varbigtriangledown}{\mathbin}{symbols}{"35}
% \end{macrocode}
%
-% These last two synonyms are needed because the \textsf{stamryrd}
+% These last two synonyms are needed because the \textsf{stmaryrd}
% package redefines them as Operators.
%
% \begin{macrocode}
\DeclareMathSymbol{\wedge}{\mathbin}{symbols}{"5E}
- \let\land=\wedge
\DeclareMathSymbol{\vee}{\mathbin}{symbols}{"5F}
- \let\lor=\vee
+% \end{macrocode}
+% Alias:
+% \changes{v3.0e}{2019/12/21}{Distangle alias (gh/184)}
+% \begin{macrocode}
+% \let\land=\wedge
+% \let\lor=\vee
+\DeclareMathSymbol{\land}{\mathbin}{symbols}{"5E}
+\DeclareMathSymbol{\lor}{\mathbin}{symbols}{"5F}
+% \end{macrocode}
+%
+% \begin{macrocode}
\DeclareMathSymbol{\cap}{\mathbin}{symbols}{"5C}
\DeclareMathSymbol{\cup}{\mathbin}{symbols}{"5B}
\DeclareMathSymbol{\ddagger}{\mathbin}{symbols}{"7A}
@@ -966,21 +1043,31 @@
\DeclareMathSymbol{\Leftrightarrow}{\mathrel}{symbols}{"2C}
\DeclareMathSymbol{\Leftarrow}{\mathrel}{symbols}{"28}
\DeclareMathSymbol{\Rightarrow}{\mathrel}{symbols}{"29}
-\DeclareRobustCommand\neq{\not=}
+ \DeclareRobustCommand\neq{\not=}
% \end{macrocode}
% As \cs{neq} is robust we should not use \cs{let} to define
-% \cs{ne} as then then it would change if \cs{neq} changes.
+% \cs{ne} as then it would change if \cs{neq} changes.
% \changes{v3.0d}{2019/09/21}{Distangle alias (gh/184)}
% \begin{macrocode}
-%\let\ne=\neq
-\DeclareRobustCommand\ne{\not=}
+ \DeclareRobustCommand\ne{\not=}
% \end{macrocode}
-% It is ok to use \cs{let} for those declared by \cs{DeclareMathSymbol}.
+% It would ok to use \cs{let} for those declared by
+% \cs{DeclareMathSymbol} but for a cleaner interface we avoid it
+% always (just in case the internals change).
% \begin{macrocode}
\DeclareMathSymbol{\leq}{\mathrel}{symbols}{"14}
- \let\le=\leq
\DeclareMathSymbol{\geq}{\mathrel}{symbols}{"15}
- \let\ge=\geq
+% \end{macrocode}
+% Alias:
+% \changes{v3.0e}{2019/12/21}{Distangle alias (gh/184)}
+% \begin{macrocode}
+% \let\le=\leq
+% \let\ge=\geq
+\DeclareMathSymbol{\le}{\mathrel}{symbols}{"14}
+\DeclareMathSymbol{\ge}{\mathrel}{symbols}{"15}
+% \end{macrocode}
+%
+% \begin{macrocode}
\DeclareMathSymbol{\succ}{\mathrel}{symbols}{"1F}
\DeclareMathSymbol{\prec}{\mathrel}{symbols}{"1E}
\DeclareMathSymbol{\approx}{\mathrel}{symbols}{"19}
@@ -992,15 +1079,32 @@
\DeclareMathSymbol{\subseteq}{\mathrel}{symbols}{"12}
\DeclareMathSymbol{\in}{\mathrel}{symbols}{"32}
\DeclareMathSymbol{\ni}{\mathrel}{symbols}{"33}
- \let\owns=\ni
+% \end{macrocode}
+% Alias:
+% \changes{v3.0e}{2019/12/21}{Distangle alias (gh/184)}
+% \begin{macrocode}
+% \let\owns=\ni
+\DeclareMathSymbol{\owns}{\mathrel}{symbols}{"33}
+% \end{macrocode}
+%
+% \begin{macrocode}
\DeclareMathSymbol{\gg}{\mathrel}{symbols}{"1D}
\DeclareMathSymbol{\ll}{\mathrel}{symbols}{"1C}
\DeclareMathSymbol{\not}{\mathrel}{symbols}{"36}
\DeclareMathSymbol{\leftrightarrow}{\mathrel}{symbols}{"24}
\DeclareMathSymbol{\leftarrow}{\mathrel}{symbols}{"20}
- \let\gets=\leftarrow
\DeclareMathSymbol{\rightarrow}{\mathrel}{symbols}{"21}
- \let\to=\rightarrow
+% \end{macrocode}
+% Alias:
+% \changes{v3.0e}{2019/12/21}{Distangle alias (gh/184)}
+% \begin{macrocode}
+% \let\gets=\leftarrow
+% \let\to=\rightarrow
+\DeclareMathSymbol{\gets}{\mathrel}{symbols}{"20}
+\DeclareMathSymbol{\to}{\mathrel}{symbols}{"21}
+% \end{macrocode}
+%
+% \begin{macrocode}
\DeclareMathSymbol{\mapstochar}{\mathrel}{symbols}{"37}
\DeclareRobustCommand\mapsto{\mapstochar\rightarrow}
\DeclareMathSymbol{\sim}{\mathrel}{symbols}{"18}
@@ -1343,7 +1447,7 @@
%
% \subsubsection{Biggggg}
%
-% \changes{v3.0b}{2018/09/24}{Start LR-mode if necessary (git/49)}
+% \changes{v3.0b}{2018/09/24}{Start LR-mode if necessary (git/49)}
% \begin{macrocode}
%</math>
%<*math|latexrelease>
@@ -1368,7 +1472,7 @@
%<latexrelease>\EndIncludeInRelease
%<*math>
% \end{macrocode}
-%
+%
% \begin{macrocode}
\def\n@space{\nulldelimiterspace\z@ \m@th}
% \end{macrocode}