summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/base/fontdef.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/base/fontdef.dtx')
-rw-r--r--Master/texmf-dist/source/latex/base/fontdef.dtx92
1 files changed, 60 insertions, 32 deletions
diff --git a/Master/texmf-dist/source/latex/base/fontdef.dtx b/Master/texmf-dist/source/latex/base/fontdef.dtx
index 36a31ef19bf..c9c5f5d77dc 100644
--- a/Master/texmf-dist/source/latex/base/fontdef.dtx
+++ b/Master/texmf-dist/source/latex/base/fontdef.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright 1993-2018
+% Copyright (C) 1993-2019
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file.
%
@@ -13,7 +13,7 @@
% The latest version of this license is in
% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
+% version 2008 or later.
%
% This file has the LPPL maintenance status "maintained".
%
@@ -39,7 +39,7 @@
%<driver, >\ProvidesFile{fontdef.drv}
% \fi
% \ProvidesFile{fontdef.dtx}
-%<-latexrelease> [2018/09/24 v3.0b LaTeX Kernel
+%<-latexrelease> [2019/09/21 v3.0d LaTeX Kernel
% \iftrue (\else
%<text, >(Text
%<math, >(Math
@@ -837,7 +837,6 @@
%
% \begin{macrocode}
\DeclareMathSymbol{\aleph}{\mathord}{symbols}{"40}
-\def\hbar{{\mathchar'26\mkern-9muh}}
\DeclareMathSymbol{\imath}{\mathord}{letters}{"7B}
\DeclareMathSymbol{\jmath}{\mathord}{letters}{"7C}
\DeclareMathSymbol{\ell}{\mathord}{letters}{"60}
@@ -849,13 +848,8 @@
\DeclareMathSymbol{\prime}{\mathord}{symbols}{"30}
\DeclareMathSymbol{\emptyset}{\mathord}{symbols}{"3B}
\DeclareMathSymbol{\nabla}{\mathord}{symbols}{"72}
-\def\surd{{\mathchar"1270}}
\DeclareMathSymbol{\top}{\mathord}{symbols}{"3E}
\DeclareMathSymbol{\bot}{\mathord}{symbols}{"3F}
-\def\angle{{\vbox{\ialign{$\m@th\scriptstyle##$\crcr
- \not\mathrel{\mkern14mu}\crcr
- \noalign{\nointerlineskip}
- \mkern2.5mu\leaders\hrule \@height.34pt\hfill\mkern2.5mu\crcr}}}}
\DeclareMathSymbol{\triangle}{\mathord}{symbols}{"34}
\DeclareMathSymbol{\forall}{\mathord}{symbols}{"38}
\DeclareMathSymbol{\exists}{\mathord}{symbols}{"39}
@@ -869,6 +863,17 @@
\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}
+% \begin{macrocode}
+\DeclareRobustCommand\hbar{{\mathchar'26\mkern-9muh}}
+\DeclareRobustCommand\surd{{\mathchar"1270}}
+\DeclareRobustCommand\angle{{\vbox{\ialign{$\m@th\scriptstyle##$\crcr
+ \not\mathrel{\mkern14mu}\crcr
+ \noalign{\nointerlineskip}
+ \mkern2.5mu\leaders\hrule \@height.34pt\hfill\mkern2.5mu\crcr}}}}
+% \end{macrocode}
%
%
% \subsubsection{Large Operators}
@@ -881,14 +886,14 @@
\DeclareMathSymbol{\bigcap}{\mathop}{largesymbols}{"54}
\DeclareMathSymbol{\bigcup}{\mathop}{largesymbols}{"53}
\DeclareMathSymbol{\intop}{\mathop}{largesymbols}{"52}
- \def\int{\intop\nolimits}
+ \DeclareRobustCommand\int{\intop\nolimits}
\DeclareMathSymbol{\prod}{\mathop}{largesymbols}{"51}
\DeclareMathSymbol{\sum}{\mathop}{largesymbols}{"50}
\DeclareMathSymbol{\bigotimes}{\mathop}{largesymbols}{"4E}
\DeclareMathSymbol{\bigoplus}{\mathop}{largesymbols}{"4C}
\DeclareMathSymbol{\bigodot}{\mathop}{largesymbols}{"4A}
\DeclareMathSymbol{\ointop}{\mathop}{largesymbols}{"48}
- \def\oint{\ointop\nolimits}
+ \DeclareRobustCommand\oint{\ointop\nolimits}
\DeclareMathSymbol{\bigsqcup}{\mathop}{largesymbols}{"46}
\DeclareMathSymbol{\smallint}{\mathop}{symbols}{"73}
% \end{macrocode}
@@ -961,7 +966,17 @@
\DeclareMathSymbol{\Leftrightarrow}{\mathrel}{symbols}{"2C}
\DeclareMathSymbol{\Leftarrow}{\mathrel}{symbols}{"28}
\DeclareMathSymbol{\Rightarrow}{\mathrel}{symbols}{"29}
-\def\neq{\not=} \let\ne=\neq
+\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.
+% \changes{v3.0d}{2019/09/21}{Distangle alias (gh/184)}
+% \begin{macrocode}
+%\let\ne=\neq
+\DeclareRobustCommand\ne{\not=}
+% \end{macrocode}
+% It is ok to use \cs{let} for those declared by \cs{DeclareMathSymbol}.
+% \begin{macrocode}
\DeclareMathSymbol{\leq}{\mathrel}{symbols}{"14}
\let\le=\leq
\DeclareMathSymbol{\geq}{\mathrel}{symbols}{"15}
@@ -987,7 +1002,7 @@
\DeclareMathSymbol{\rightarrow}{\mathrel}{symbols}{"21}
\let\to=\rightarrow
\DeclareMathSymbol{\mapstochar}{\mathrel}{symbols}{"37}
- \def\mapsto{\mapstochar\rightarrow}
+ \DeclareRobustCommand\mapsto{\mapstochar\rightarrow}
\DeclareMathSymbol{\sim}{\mathrel}{symbols}{"18}
\DeclareMathSymbol{\simeq}{\mathrel}{symbols}{"27}
\DeclareMathSymbol{\perp}{\mathrel}{symbols}{"3F}
@@ -1051,9 +1066,9 @@
\DeclareRobustCommand
\Relbar{\mathrel{=}}
\DeclareMathSymbol{\lhook}{\mathrel}{letters}{"2C}
- \def\hookrightarrow{\lhook\joinrel\rightarrow}
+ \DeclareRobustCommand\hookrightarrow{\lhook\joinrel\rightarrow}
\DeclareMathSymbol{\rhook}{\mathrel}{letters}{"2D}
- \def\hookleftarrow{\leftarrow\joinrel\rhook}
+ \DeclareRobustCommand\hookleftarrow{\leftarrow\joinrel\rhook}
\DeclareRobustCommand
\bowtie{\mathrel\triangleright\joinrel\mathrel\triangleleft}
% \end{macrocode}
@@ -1155,43 +1170,45 @@
% \subsubsection{Over and under something, etc}
%
% \begin{macrocode}
-\def\overrightarrow#1{\vbox{\m@th\ialign{##\crcr
+\DeclareRobustCommand\overrightarrow[1]{\vbox{\m@th\ialign{##\crcr
\rightarrowfill\crcr\noalign{\kern-\p@\nointerlineskip}
$\hfil\displaystyle{#1}\hfil$\crcr}}}
-\def\overleftarrow#1{\vbox{\m@th\ialign{##\crcr
+\DeclareRobustCommand\overleftarrow[1]{\vbox{\m@th\ialign{##\crcr
\leftarrowfill\crcr\noalign{\kern-\p@\nointerlineskip}%
$\hfil\displaystyle{#1}\hfil$\crcr}}}
-\def\overbrace#1{\mathop{\vbox{\m@th\ialign{##\crcr\noalign{\kern3\p@}%
+\DeclareRobustCommand\overbrace[1]
+ {\mathop{\vbox{\m@th\ialign{##\crcr\noalign{\kern3\p@}%
\downbracefill\crcr\noalign{\kern3\p@\nointerlineskip}%
$\hfil\displaystyle{#1}\hfil$\crcr}}}\limits}
-\def\underbrace#1{\mathop{\vtop{\m@th\ialign{##\crcr
+\DeclareRobustCommand\underbrace[1]{\mathop{\vtop{\m@th\ialign{##\crcr
$\hfil\displaystyle{#1}\hfil$\crcr
\noalign{\kern3\p@\nointerlineskip}%
\upbracefill\crcr\noalign{\kern3\p@}}}}\limits}
% \end{macrocode}
% (quite a waste of tokens, IMHO --- Frank)
% \begin{macrocode}
-\def\skew#1#2#3{{\muskip\z@#1mu\divide\muskip\z@\tw@ \mkern\muskip\z@
+\DeclareRobustCommand\skew[3]
+ {{\muskip\z@#1mu\divide\muskip\z@\tw@ \mkern\muskip\z@
#2{\mkern-\muskip\z@{#3}\mkern\muskip\z@}\mkern-\muskip\z@}{}}
% \end{macrocode}
%
% \changes{v2.2n}{1995/11/21}{Incorporate changed figures,
% as in plain.tex}
% \begin{macrocode}
-\def\rightarrowfill{$\m@th\smash-\mkern-7mu%
+\DeclareRobustCommand\rightarrowfill{$\m@th\smash-\mkern-7mu%
\cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill
\mkern-7mu\mathord\rightarrow$}
-\def\leftarrowfill{$\m@th\mathord\leftarrow\mkern-7mu%
+\DeclareRobustCommand\leftarrowfill{$\m@th\mathord\leftarrow\mkern-7mu%
\cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill
\mkern-7mu\smash-$}
\DeclareMathSymbol{\braceld}{\mathord}{largesymbols}{"7A}
\DeclareMathSymbol{\bracerd}{\mathord}{largesymbols}{"7B}
\DeclareMathSymbol{\bracelu}{\mathord}{largesymbols}{"7C}
\DeclareMathSymbol{\braceru}{\mathord}{largesymbols}{"7D}
-\def\downbracefill{$\m@th \setbox\z@\hbox{$\braceld$}%
+\DeclareRobustCommand\downbracefill{$\m@th \setbox\z@\hbox{$\braceld$}%
\braceld\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\braceru
\bracelu\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\bracerd$}
-\def\upbracefill{$\m@th \setbox\z@\hbox{$\braceld$}%
+\DeclareRobustCommand\upbracefill{$\m@th \setbox\z@\hbox{$\braceld$}%
\bracelu\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\bracerd
\braceld\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\braceru$}
% \end{macrocode}
@@ -1209,7 +1226,18 @@
{\mathord}{symbols}{"6B}{largesymbols}{"3D}
\DeclareMathDelimiter{\Vert}
{\mathord}{symbols}{"6B}{largesymbols}{"0D}
-\let\|=\Vert
+% \end{macrocode}
+% \cs{DeclareMathDelimiter} produces a command that is robust (with
+% an internal macro containing the payload) so we should not use
+% \cs{let} for making an alias
+% \changes{v3.0d}{2019/09/21}{Distangle alias (gh/184)}
+% \begin{macrocode}
+%\let\|=\Vert
+\DeclareMathDelimiter{\|}
+ {\mathord}{symbols}{"6B}{largesymbols}{"0D}
+% \end{macrocode}
+%
+% \begin{macrocode}
\DeclareMathDelimiter{\vert}
{\mathord}{symbols}{"6A}{largesymbols}{"0C}
\DeclareMathDelimiter{\uparrow}
@@ -1295,8 +1323,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\mathsterling{\mathit{\mathchar"7024}}
-\def\mathunderscore{\kern.06em\vbox{\hrule\@width.3em}}
+\DeclareRobustCommand\mathsterling{\mathit{\mathchar"7024}}
+\DeclareRobustCommand\mathunderscore{\kern.06em\vbox{\hrule\@width.3em}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1307,7 +1335,7 @@
% \begin{macro}{\mathellipsis}
% This is plain \TeX's |\ldots|.
% \begin{macrocode}
-\def\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}}%
+\DeclareRobustCommand\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}}%
% \end{macrocode}
% \end{macro}
%
@@ -1321,13 +1349,13 @@
%<*math|latexrelease>
%<latexrelease>\IncludeInRelease{2018/12/01}%
%<latexrelease> {\Big}{Start LR-mode}%
-\def\big#1{\leavevmode@ifvmode
+\DeclareRobustCommand\big[1]{\leavevmode@ifvmode
{\hbox{$\left#1\vbox to8.5\p@{}\right.\n@space$}}}
-\def\Big#1{\leavevmode@ifvmode
+\DeclareRobustCommand\Big[1]{\leavevmode@ifvmode
{\hbox{$\left#1\vbox to11.5\p@{}\right.\n@space$}}}
-\def\bigg#1{\leavevmode@ifvmode
+\DeclareRobustCommand\bigg[1]{\leavevmode@ifvmode
{\hbox{$\left#1\vbox to14.5\p@{}\right.\n@space$}}}
-\def\Bigg#1{\leavevmode@ifvmode
+\DeclareRobustCommand\Bigg[1]{\leavevmode@ifvmode
{\hbox{$\left#1\vbox to17.5\p@{}\right.\n@space$}}}
%</math|latexrelease>
%<latexrelease>\EndIncludeInRelease