summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/base/ltfssdcl.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-10-04 20:57:14 +0000
committerKarl Berry <karl@freefriends.org>2019-10-04 20:57:14 +0000
commit70aaae3b3c98fb6357c846ad54ce2367e9682f50 (patch)
treef0446e015c31510a11ada780ad4978dce03ad104 /Master/texmf-dist/source/latex/base/ltfssdcl.dtx
parentbe53f9d0af947622afca67b99c89a90d5c08dbd4 (diff)
latex2e (4oct19)
git-svn-id: svn://tug.org/texlive/trunk@52286 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/base/ltfssdcl.dtx')
-rw-r--r--Master/texmf-dist/source/latex/base/ltfssdcl.dtx199
1 files changed, 187 insertions, 12 deletions
diff --git a/Master/texmf-dist/source/latex/base/ltfssdcl.dtx b/Master/texmf-dist/source/latex/base/ltfssdcl.dtx
index cca3df4693c..d1284a08e8a 100644
--- a/Master/texmf-dist/source/latex/base/ltfssdcl.dtx
+++ b/Master/texmf-dist/source/latex/base/ltfssdcl.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright 1993-2016
+% 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".
%
@@ -36,7 +36,7 @@
%
%
\ProvidesFile{ltfssdcl.dtx}
- [2016/02/18 v3.0r LaTeX Kernel (NFSS Declarative Interface)]
+ [2019/08/27 v3.0s LaTeX Kernel (NFSS Declarative Interface)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -1078,12 +1078,17 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\DeclareMathAlphabet}
-% could do with more checks like allowing single number in |#4|
-% lowercase in |#4| etc
+% \begin{macro}{\DeclareMathAccent}
+% Could do with more checks like allowing single number in |#4|
+% lowercase in |#4| etc
% \changes{v3.0r}{2016/02/18}
% {Check for mathaccent not \cs{mathaccemt}}
+% \changes{v3.0s}{2019/08/27}{Make math accents robust}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {DeclareMathAccent}{Make math accents robust}%
\def\DeclareMathAccent#1#2#3#4{%
\expandafter\in@\csname sym#3\expandafter\endcsname
\expandafter{\group@list}%
@@ -1097,9 +1102,14 @@
\advance\count\tw@-\count@
\if\relax\noexpand#1% is command?
\edef\reserved@a{\noexpand\in@
- {\expandafter\@gobble\string\mathaccent}{\meaning#1}}%
+ {\expandafter\@gobble\string\mathaccent}
+ {\expandafter\meaning
+ \csname\expandafter\@gobble\string#1\space\endcsname}}%
\reserved@a
\ifin@
+ \expandafter\let
+ \csname\expandafter\@gobble\string#1\space\endcsname
+ \@undefined
\expandafter\set@mathaccent
\csname sym#3\endcsname#1#2%
{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
@@ -1123,21 +1133,87 @@
\@latex@error{Symbol font `#3' is not defined}\@eha
\fi
}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {DeclareMathAccent}{Make math accents robust}%
+%<latexrelease>\def\DeclareMathAccent#1#2#3#4{%
+%<latexrelease> \expandafter\in@\csname sym#3\expandafter\endcsname
+%<latexrelease> \expandafter{\group@list}%
+%<latexrelease> \ifin@
+%<latexrelease> \begingroup
+%<latexrelease> \count\z@=#4\relax
+%<latexrelease> \count\tw@\count\z@
+%<latexrelease> \divide\count\z@\sixt@@n
+%<latexrelease> \count@\count\z@
+%<latexrelease> \multiply\count@\sixt@@n
+%<latexrelease> \advance\count\tw@-\count@
+%<latexrelease> \if\relax\noexpand#1% is command?
+%<latexrelease> \edef\reserved@a{\noexpand\in@
+%<latexrelease> {\expandafter\@gobble\string\mathaccent}{\meaning#1}}%
+%<latexrelease> \reserved@a
+%<latexrelease> \ifin@
+%<latexrelease> \expandafter\set@mathaccent
+%<latexrelease> \csname sym#3\endcsname#1#2%
+%<latexrelease> {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+%<latexrelease> \@font@info{Redeclaring math accent \string#1}%
+%<latexrelease> \else
+%<latexrelease> \expandafter\ifx
+%<latexrelease> \csname\expandafter\@gobble\string#1\endcsname
+%<latexrelease> \relax
+%<latexrelease> \expandafter\set@mathaccent
+%<latexrelease> \csname sym#3\endcsname#1#2%
+%<latexrelease> {\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+%<latexrelease> \else
+%<latexrelease> \@latex@error{Command `\string#1' already defined}\@eha
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \else
+%<latexrelease> \@latex@error{Not a command name: `\noexpand#1'}\@eha
+%<latexrelease> \fi
+%<latexrelease> \endgroup
+%<latexrelease> \else
+%<latexrelease> \@latex@error{Symbol font `#3' is not defined}\@eha
+%<latexrelease> \fi
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
\@onlypreamble\DeclareMathAccent
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\set@mathaccent}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\set@mathaccent}{makemath accents robust}%
\def\set@mathaccent#1#2#3#4{%
- \xdef#2{\mathaccent"\mathchar@type#3\hexnumber@#1#4\relax}}
+ \xdef#2{\mathaccent"\mathchar@type#3\hexnumber@#1#4\relax}%
+ \MakeRobust#2%
+}
\@onlypreamble\set@mathaccent
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\set@mathaccent}{makemath accents robust}%
+%<latexrelease>
+%<latexrelease>\def\set@mathaccent#1#2#3#4{%
+%<latexrelease> \xdef#2{\mathaccent"\mathchar@type#3\hexnumber@#1#4\relax}}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\DeclareMathSymbol}
% \changes{v3.0r}{2016/02/18}
% {Check for mathchar not \cs{mathchar}}
+% \changes{v3.0s}{2019/09/09}{Allow definition if the math symbol was
+% a command already robust}
% \begin{macrocode}
\def\DeclareMathSymbol#1#2#3#4{%
\expandafter\in@\csname sym#3\expandafter\endcsname
@@ -1151,17 +1227,30 @@
\multiply\count@\sixt@@n
\advance\count\tw@-\count@
\if\relax\noexpand#1% is command?
+% \end{macrocode}
+% Store the command name with a space attached inside
+% \cs{reserved@@b} in case we look at a robust definition.
+% \begin{macrocode}
+ \edef\reserved@b{\expandafter\noexpand
+ \csname\expandafter\@gobble\string#1\space\endcsname}%
+% \end{macrocode}
+% Test both \verb=#1= and \verb*=#1 = for containing \texttt{mathchar}.
+% \begin{macrocode}
\edef\reserved@a
{\noexpand\in@{\expandafter\@gobble\string\mathchar}%
- {\meaning#1}}%
+ {\meaning#1\expandafter\meaning\reserved@b}}%
\reserved@a
+% \end{macrocode}
+% Drop \verb*=#1 = in case it was defined before.
+% \begin{macrocode}
+ \global\expandafter\let\reserved@b\@undefined
\ifin@
\expandafter\set@mathsymbol
\csname sym#3\endcsname#1#2%
{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
\@font@info{Redeclaring math symbol \string#1}%
\else
- \expandafter\ifx
+ \expandafter\ifx
\csname\expandafter\@gobble\string#1\endcsname
\relax
\expandafter\set@mathsymbol
@@ -1278,7 +1367,12 @@
% \begin{macro}{\@DeclareMathDelimiter}
% \changes{v3.0r}{2016/02/18}
% {Check for delimiter not \cs{delimiter}}
+% \changes{v3.0s}{2019/08/27}{Make math delimiters robust}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\@DeclareMathDelimiter}{Make math delimiters robust}%
\def\@DeclareMathDelimiter#1#2#3#4#5#6{%
\expandafter\in@\csname sym#3\expandafter\endcsname
\expandafter{\group@list}%
@@ -1304,9 +1398,11 @@
\edef\reserved@d{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
%
\edef\reserved@a{\noexpand\in@
- {\expandafter\@gobble\string\delimiter}{\meaning#1}}%
+ {\expandafter\@gobble\string\delimiter}%
+ {\expandafter\meaning\csname\expandafter\@gobble\string#1\space\endcsname}}%
\reserved@a
\ifin@
+ \expandafter\let\csname\expandafter\@gobble\string#1\space\endcsname\@undefined
\expandafter\set@mathdelimiter
\csname sym#3\expandafter\endcsname
\csname sym#5\endcsname#1#2%
@@ -1332,6 +1428,68 @@
\@latex@error{Symbol font `#3' is not defined}\@eha
\fi
}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@DeclareMathDelimiter}{Make math delimiters robust}%
+%<latexrelease>\def\@DeclareMathDelimiter#1#2#3#4#5#6{%
+%<latexrelease> \expandafter\in@\csname sym#3\expandafter\endcsname
+%<latexrelease> \expandafter{\group@list}%
+%<latexrelease> \ifin@
+%<latexrelease> \expandafter\in@\csname sym#5\expandafter\endcsname
+%<latexrelease> \expandafter{\group@list}%
+%<latexrelease> \ifin@
+%<latexrelease> \begingroup
+%<latexrelease> \count\z@=#4\relax
+%<latexrelease> \count\tw@\count\z@
+%<latexrelease> \divide\count\z@\sixt@@n
+%<latexrelease> \count@\count\z@
+%<latexrelease> \multiply\count@\sixt@@n
+%<latexrelease> \advance\count\tw@-\count@
+%<latexrelease> \edef\reserved@c{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+%<latexrelease> %
+%<latexrelease> \count\z@=#6\relax
+%<latexrelease> \count\tw@\count\z@
+%<latexrelease> \divide\count\z@\sixt@@n
+%<latexrelease> \count@\count\z@
+%<latexrelease> \multiply\count@\sixt@@n
+%<latexrelease> \advance\count\tw@-\count@
+%<latexrelease> \edef\reserved@d{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}%
+%<latexrelease> %
+%<latexrelease> \edef\reserved@a{\noexpand\in@
+%<latexrelease> {\expandafter\@gobble\string\delimiter}{\meaning#1}}%
+%<latexrelease> \reserved@a
+%<latexrelease> \ifin@
+%<latexrelease> \expandafter\set@mathdelimiter
+%<latexrelease> \csname sym#3\expandafter\endcsname
+%<latexrelease> \csname sym#5\endcsname#1#2%
+%<latexrelease> \reserved@c\reserved@d
+%<latexrelease> \@font@info{Redeclaring math delimiter \string#1}%
+%<latexrelease> \else
+%<latexrelease> \expandafter\ifx
+%<latexrelease> \csname\expandafter\@gobble\string#1\endcsname
+%<latexrelease> \relax
+%<latexrelease> \expandafter\set@mathdelimiter
+%<latexrelease> \csname sym#3\expandafter\endcsname
+%<latexrelease> \csname sym#5\endcsname#1#2%
+%<latexrelease> \reserved@c\reserved@d
+%<latexrelease> \else
+%<latexrelease> \@latex@error{Command `\string#1' already defined}\@eha
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \endgroup
+%<latexrelease> \else
+%<latexrelease> \@latex@error{Symbol font `#5' is not defined}\@eha
+%<latexrelease> \fi
+%<latexrelease> \else
+%<latexrelease> \@latex@error{Symbol font `#3' is not defined}\@eha
+%<latexrelease> \fi
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
\@onlypreamble\@DeclareMathDelimiter
% \end{macrocode}
% \end{macro}
@@ -1384,10 +1542,27 @@
%
% \changes{v2.1q}{1995/04/02}{fix pr/1329}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\set@mathdelimiter}{make delimiters robust}%
\def\set@mathdelimiter#1#2#3#4#5#6{%
\xdef#3{\delimiter"\mathchar@type#4\hexnumber@#1#5%
- \hexnumber@#2#6 }}
+ \hexnumber@#2#6 }%
+ \MakeRobust#3%
+}
\@onlypreamble\set@mathdelimiter
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\set@mathdelimiter}{make delimiters robust}%
+%<latexrelease>
+%<latexrelease>\def\set@mathdelimiter#1#2#3#4#5#6{%
+%<latexrelease> \xdef#3{\delimiter"\mathchar@type#4\hexnumber@#1#5%
+%<latexrelease> \hexnumber@#2#6 }}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%