[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh264: fixes for #260 #262 and #264 * lttextcomp.dtx (section{The \texttt{textcomp} package}): Warn if new package runs with old format (gh/260) Changed the package default to info (gh/262) (3d3af211)

Frank Mittelbach frank.mittelbach at latex-project.org
Wed Feb 5 13:35:35 CET 2020


Repository : https://github.com/latex3/latex2e
On branch  : hotfix/gh264
Link       : https://github.com/latex3/latex2e/commit/3d3af211b5c7d86028d7ef1c28fa88ff0e26a8c3

>---------------------------------------------------------------

commit 3d3af211b5c7d86028d7ef1c28fa88ff0e26a8c3
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Wed Feb 5 13:35:35 2020 +0100

    fixes for #260 #262 and #264
            * lttextcomp.dtx (section{The \texttt{textcomp} package}):
            Warn if new package runs with old format (gh/260)
            Changed the package default to info (gh/262)
    
            * ltfssini.dtx (section{Custom series settings for main document families}):
            Corrected misspelled csname (gh/264)
            Renamed \@reserveda to \reserved at a
            Clarrified error text message
    
            * ltfssaxes.dtx: Renamed \@reserveda and\@reservedb to \reserved at a
            and \reserved at b
    
            * ltclass.dtx: Renamed \@reserveda to \reserved at a


>---------------------------------------------------------------

3d3af211b5c7d86028d7ef1c28fa88ff0e26a8c3
 base/changes.txt                             | 16 ++++++++++++++++
 base/ltclass.dtx                             | 10 +++++-----
 base/ltfssaxes.dtx                           | 26 +++++++++++++-------------
 base/ltfssini.dtx                            | 19 ++++++++++++-------
 base/lttextcomp.dtx                          | 17 +++++++++++------
 base/testfiles/github-0264.lvt               | 14 ++++++++++++++
 base/testfiles/github-0264.tlg               | 16 ++++++++++++++++
 base/testfiles/github-robust-0123.luatex.tlg |  4 ++--
 base/testfiles/github-robust-0123.lvt        |  2 +-
 base/testfiles/github-robust-0123.tlg        |  4 ++--
 base/testfiles/github-robust-0123.xetex.tlg  |  4 ++--
 11 files changed, 94 insertions(+), 38 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 6b82d586..9f2037d2 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -4,6 +4,22 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2020-02-05  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* lttextcomp.dtx (section{The \texttt{textcomp} package}):
+	Warn if new package runs with old format (gh/260)
+	Changed the package default to info (gh/262)
+
+	* ltfssini.dtx (section{Custom series settings for main document families}):
+	Corrected misspelled csname (gh/264)
+	Renamed \@reserveda to \reserved at a
+	Clarrified error text message
+
+	* ltfssaxes.dtx: Renamed \@reserveda and\@reservedb to \reserved at a
+	and \reserved at b
+
+	* ltclass.dtx: Renamed \@reserveda to \reserved at a
+
 #########################
 # 2020-02-02 Release
 #########################
diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index 9e7668e8..96daa3aa 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltclass.dtx}
-             [2020/01/28 v1.3h LaTeX Kernel (Class & Package Interface)]
+             [2020/02/05 v1.3i LaTeX Kernel (Class & Package Interface)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltclass.dtx}
@@ -1807,11 +1807,11 @@
 %    \begin{macrocode}
 \def\filec at ntents@opt[#1]{%
   \edef\@fortmp{\zap at space#1 \@empty}%
-  \@for\@reserveda:=\@fortmp\do{%
-    \ifcsname filec at ntents@\@reserveda\endcsname
-      \csname filec at ntents@\@reserveda\endcsname
+  \@for\reserved at a:=\@fortmp\do{%
+    \ifcsname filec at ntents@\reserved at a\endcsname
+      \csname filec at ntents@\reserved at a\endcsname
     \else
-    \@latex at error{Unknown filecontents option \@reserveda}%
+    \@latex at error{Unknown filecontents option \reserved at a}%
        {Valid options are force (or overwrite), nosearch, noheader}%
     \fi}%
   \filec at ntents
diff --git a/base/ltfssaxes.dtx b/base/ltfssaxes.dtx
index 4dd7a36c..fcf304d1 100644
--- a/base/ltfssaxes.dtx
+++ b/base/ltfssaxes.dtx
@@ -35,7 +35,7 @@
 %
 %
 \ProvidesFile{ltfssaxes.dtx}
-             [2020/01/30 v1.0a LaTeX Kernel (NFSS Axes handing)]
+             [2020/02/05 v1.0b LaTeX Kernel (NFSS Axes handing)]
 % \iffalse
 \documentclass{ltxdoc}
 \begin{document}
@@ -739,8 +739,8 @@
 %    definition of \cs{AmSfont} that is actually the case.
 %    \begin{macrocode}
 %\ifcat\expandafter X\detokenize{#1}X%
-  \def\@reserveda{#3}%
-  \ifx\@reserveda\@empty
+  \def\reserved at a{#3}%
+  \ifx\reserved at a\@empty
     \set at target@series{#2}%
   \else
 %    \end{macrocode}
@@ -751,8 +751,8 @@
 %    is actually available.
 %    \begin{macrocode}
     \maybe at load@fontshape
-    \edef\@reserveda{\f at encoding /\f at family /#1/\f at shape}%
-     \ifcsname \@reserveda \endcsname
+    \edef\reserved at a{\f at encoding /\f at family /#1/\f at shape}%
+     \ifcsname \reserved at a \endcsname
 %    \end{macrocode}
 %     If the desired result is available then we use that. However, we
 %    do need some post-processing because we need to drop surplus
@@ -791,10 +791,10 @@
 %    \cs{@reserveda} above.
 %    \begin{macrocode}
 \def\@font at shape@subst at warning{%
-   \edef\@reservedb{\curr at fontshape}%
-   \ifx\@reserveda\@reservedb \else
-     \@font at warning{Font shape `\@reserveda' undefined\MessageBreak
-                    using `\@reservedb' instead}%
+   \edef\reserved at b{\curr at fontshape}%
+   \ifx\reserved at a\reserved at b \else
+     \@font at warning{Font shape `\reserved at a' undefined\MessageBreak
+                    using `\reserved at b' instead}%
    \fi
 }
 %    \end{macrocode}
@@ -1103,13 +1103,13 @@
 %    ``m''s from the name as we had to for the series.
 %    \begin{macrocode}
 \def\merge at font@shape@#1#2#3\@nil{%
-  \def\@reserveda{#3}%
-  \ifx\@reserveda\@empty
+  \def\reserved at a{#3}%
+  \ifx\reserved at a\@empty
     \edef\f at shape{#2}%
   \else
     \maybe at load@fontshape
-    \edef\@reserveda{\f at encoding /\f at family /\f at series/#1}%
-     \ifcsname \@reserveda\endcsname
+    \edef\reserved at a{\f at encoding /\f at family /\f at series/#1}%
+     \ifcsname \reserved at a\endcsname
        \edef\f at shape{#1}%
     \else
        \ifcsname \f at encoding /\f at family /\f at series/#2\endcsname
diff --git a/base/ltfssini.dtx b/base/ltfssini.dtx
index 9687e08b..320c5a18 100644
--- a/base/ltfssini.dtx
+++ b/base/ltfssini.dtx
@@ -36,7 +36,7 @@
 %
 %
 \ProvidesFile{ltfssini.dtx}
-             [2020/01/11 v3.1f LaTeX Kernel (NFSS Initialisation)]
+             [2020/02/05 v3.1g LaTeX Kernel (NFSS Initialisation)]
 % \iffalse
 \documentclass{ltxdoc}
 \begin{document}
@@ -279,16 +279,21 @@
 %    ``tt'' family.
 %    \begin{macrocode}
 \newcommand\DeclareFontSeriesDefault[3][]{%
-  \def\@reserveda{#1}%
+  \def\reserved at a{#1}%
 %    \end{macrocode}
 %    No optional argument: set up general default.
+% \changes{v3.1g}{2020/02/05}{Corrected misspelled csname (gh/264)}
 %    \begin{macrocode}
-  \ifx\@resereda\@empty
+  \ifx\reserved at a\@empty
     \ifcsname #2series\endcsname           % supported are
                                            % \[md/bf]default
       \expandafter\def
          \csname #2default\endcsname{#3}%
     \else
+%    \end{macrocode}
+%    
+% \changes{v3.1g}{2020/02/05}{Clarrified error text}
+%    \begin{macrocode}
        \@latex at error{Wrong syntax for \string\DeclareFontSeriesDefault}%
           {Mandatory first argument must be 'md'  or 'bf'.}
     \fi
@@ -310,8 +315,8 @@
          \csname #2series@#1 at kernel\endcsname\@undefined
     \else
        \@latex at error{Wrong syntax for \string\DeclareFontSeriesDefault}%
-          {Optional first argument must be 'rm', 'sf', or 'tt'. \MessageBreak
-           Second argument must be 'md'  or 'bf'.}
+          {Optional argument must be 'rm', 'sf', or 'tt'. \MessageBreak
+           Mandatory first argument must be 'md'  or 'bf'.}
     \fi
   \fi
 }
@@ -678,8 +683,8 @@
 %    contains all meta families and we need to ignore the case where
 %    current one from the list and target one are identical.
 %    \begin{macrocode}
-  \def\@reserveda{#1}%
-  \ifx\target at meta@family at value\@reserveda   % rm -> rm do nothing
+  \def\reserved at a{#1}%
+  \ifx\target at meta@family at value\reserved at a   % rm -> rm do nothing
   \else
 %    \end{macrocode}
 %    We only ``do'' something if the current font family matches the
diff --git a/base/lttextcomp.dtx b/base/lttextcomp.dtx
index eca72e4d..c918a836 100644
--- a/base/lttextcomp.dtx
+++ b/base/lttextcomp.dtx
@@ -1397,7 +1397,6 @@
 %
 %    \begin{macrocode}
 %<*TS1sty>
-\NeedsTeXFormat{LaTeX2e}[1995/06/01]
 \providecommand\DeclareRelease[3]{}
 \providecommand\DeclareCurrentRelease[2]{}
 
@@ -1405,7 +1404,13 @@
 \DeclareCurrentRelease{}{2020-02-02}
 
 \ProvidesPackage{textcomp}
- [2020/02/02 v2.0m Standard LaTeX package]
+ [2020/02/02 v2.0n Standard LaTeX package]
+%    \end{macrocode}
+%
+%    A precaution in case this is used without rebuilding the format.
+% \changes{v2.0n}{2020/02/05}{Ensure we are on a new format (gh/260)}
+%    \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}[2020/02/02]
 %    \end{macrocode}
 %
 %    This is implemented by defining the default subset:
@@ -1423,12 +1428,12 @@
 %    results to ensure that there aren't ``missing glyphs''.
 %
 %    The next set of options define the warning level (default in the
-%    kernel is info only). If you load the package then the default
-%    changes to produce an error message if any substitution happens.
+%    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}
-\def\tc at errorwarn{\PackageError{textcomp}}
 \DeclareOption{error}{\gdef\tc at errorwarn{\PackageError{textcomp}}}
 \DeclareOption{warn}{\gdef\tc at errorwarn#1#2{\PackageWarning{textcomp}{#1}}}
+\DeclareOption{info}{\gdef\tc at errorwarn#1#2{\PackageInfo{textcomp}{#1}}}
 \DeclareOption{quiet}{\gdef\tc at errorwarn#1#2{}}
 %    \end{macrocode}
 %
@@ -1453,7 +1458,7 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\ExecuteOptions{}
+\ExecuteOptions{info}
 \ProcessOptions\relax
 %    \end{macrocode}
 %
diff --git a/base/testfiles/github-0264.lvt b/base/testfiles/github-0264.lvt
new file mode 100644
index 00000000..7d762916
--- /dev/null
+++ b/base/testfiles/github-0264.lvt
@@ -0,0 +1,14 @@
+\documentclass{article}
+
+
+\input{test2e}
+
+\START
+
+\DeclareFontSeriesDefault{bf}{b}        % this should not cause an error
+
+\DeclareFontSeriesDefault[xx]{bf}{b}
+
+\DeclareFontSeriesDefault[rm]{c}{c}
+
+\END
diff --git a/base/testfiles/github-0264.tlg b/base/testfiles/github-0264.tlg
new file mode 100644
index 00000000..1fa5cadc
--- /dev/null
+++ b/base/testfiles/github-0264.tlg
@@ -0,0 +1,16 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+! LaTeX Error: Wrong syntax for \DeclareFontSeriesDefault.
+See the LaTeX manual or LaTeX Companion for explanation.
+Type  H <return>  for immediate help.
+ ...                                              
+l. ...\DeclareFontSeriesDefault[xx]{bf}{b}
+Optional argument must be 'rm', 'sf', or 'tt'. 
+Mandatory first argument must be 'md' or 'bf'.
+! LaTeX Error: Wrong syntax for \DeclareFontSeriesDefault.
+See the LaTeX manual or LaTeX Companion for explanation.
+Type  H <return>  for immediate help.
+ ...                                              
+l. ...\DeclareFontSeriesDefault[rm]{c}{c}
+Optional argument must be 'rm', 'sf', or 'tt'. 
+Mandatory first argument must be 'md' or 'bf'.
diff --git a/base/testfiles/github-robust-0123.luatex.tlg b/base/testfiles/github-robust-0123.luatex.tlg
index f8ec523c..31b1f8ca 100644
--- a/base/testfiles/github-robust-0123.luatex.tlg
+++ b/base/testfiles/github-robust-0123.luatex.tlg
@@ -183,9 +183,9 @@ l. ...\show\Downarrow
 ---------------------------------------
 \fnsymbol{page} -> \TextOrMath  {\textasteriskcentered }{*}
 ---------------------------------------
-\hline -> \noalign {\hrule height\arrayrulewidth \futurelet \def document{document}\edef { on input line ...}\GenericError {               }{LaTeX Error: Can be used only in preamble}{See the LaTeX manual or LaTeX Companion for explanation.}{Your command was ignored.\MessageBreak Type  I <command> <return>  to replace it with another command,\MessageBreak or  <return>  to continue without it.}}
+\hline -> \noalign {\hrule height\arrayrulewidth \futurelet tt}
 ---------------------------------------
-\label{foo} -> \relax \begingroup \let 1\relax \let \@unexpandable at protect\edef \def document{document}\edef { on input line ...}\GenericError {               }{LaTeX Error: Can be used only in preamble}{See the LaTeX manual or LaTeX Companion for explanation.}{Your command was ignored.\MessageBreak Type  I <command> <return>  to replace it with another command,\MessageBreak or  <return>  to continue without it.}{\write \@auxout {\newlabel{foo}{{}{1}}}}\def document{document}\edef { on input line ...}\GenericError {               }{LaTeX Error: Can be used only in preamble}{See the LaTeX manual or LaTeX Companion for explanation.}{Your command was ignored.\MessageBreak Type  I <command> <return>  to replace it with another command,\MessageBreak or  <return>  to continue without it.}\endgroup \relax 
+\label{foo} -> \relax \begingroup \let 1\relax \let \@unexpandable at protect\edef tt{\write \@auxout {\newlabel{foo}{{}{1}}}}tt\endgroup \relax 
 ---------------------------------------
 \pageref{foo} -> \G at refundefinedtrue{\mbox {\normalfont \bfseries ??}}\GenericWarning {               }{LaTeX Warning: Reference `foo' on page 1 undefined}
 ---------------------------------------
diff --git a/base/testfiles/github-robust-0123.lvt b/base/testfiles/github-robust-0123.lvt
index bdc598b1..cc0171b3 100644
--- a/base/testfiles/github-robust-0123.lvt
+++ b/base/testfiles/github-robust-0123.lvt
@@ -270,7 +270,7 @@
 \test{\arabic{page}}
 \test{\fnsymbol{page}}
 \test{\hline}           % may not be easy to make that robust (\noalign needs to be seen)
-\test{\label{foo}}   % again may not be easy to make robust
+\test{\label{foo}}      % again may not be easy to make robust
 \test{\pageref{foo}}              % maybe difficult to make robust
 \test{\ref{foo}}                      % maybe difficult to make robust
 \test{\roman{page}}
diff --git a/base/testfiles/github-robust-0123.tlg b/base/testfiles/github-robust-0123.tlg
index 50bc174f..fd273e1e 100644
--- a/base/testfiles/github-robust-0123.tlg
+++ b/base/testfiles/github-robust-0123.tlg
@@ -183,9 +183,9 @@ l. ...\show\Downarrow
 ---------------------------------------
 \fnsymbol{page} -> \TextOrMath  {\textasteriskcentered }{*}
 ---------------------------------------
-\hline -> \noalign {\hrule height\arrayrulewidth \futurelet \def document{document}\edef { on input line ...}\GenericError {               }{LaTeX Error: Can be used only in preamble}{See the LaTeX manual or LaTeX Companion for explanation.}{Your command was ignored.\MessageBreak Type  I <command> <return>  to replace it with another command,\MessageBreak or  <return>  to continue without it.}}
+\hline -> \noalign {\hrule height\arrayrulewidth \futurelet tt}
 ---------------------------------------
-\label{foo} -> \relax \begingroup \let 1\relax \let \@unexpandable at protect\edef \def document{document}\edef { on input line ...}\GenericError {               }{LaTeX Error: Can be used only in preamble}{See the LaTeX manual or LaTeX Companion for explanation.}{Your command was ignored.\MessageBreak Type  I <command> <return>  to replace it with another command,\MessageBreak or  <return>  to continue without it.}{\write \@auxout {\newlabel{foo}{{}{1}}}}\def document{document}\edef { on input line ...}\GenericError {               }{LaTeX Error: Can be used only in preamble}{See the LaTeX manual or LaTeX Companion for explanation.}{Your command was ignored.\MessageBreak Type  I <command> <return>  to replace it with another command,\MessageBreak or  <return>  to continue without it.}\endgroup \relax 
+\label{foo} -> \relax \begingroup \let 1\relax \let \@unexpandable at protect\edef tt{\write \@auxout {\newlabel{foo}{{}{1}}}}tt\endgroup \relax 
 ---------------------------------------
 \pageref{foo} -> \G at refundefinedtrue{\mbox {\normalfont \bfseries ??}}\GenericWarning {               }{LaTeX Warning: Reference `foo' on page 1 undefined}
 ---------------------------------------
diff --git a/base/testfiles/github-robust-0123.xetex.tlg b/base/testfiles/github-robust-0123.xetex.tlg
index 161e5ad3..540c42e3 100644
--- a/base/testfiles/github-robust-0123.xetex.tlg
+++ b/base/testfiles/github-robust-0123.xetex.tlg
@@ -183,9 +183,9 @@ l. ...\show\Downarrow
 ---------------------------------------
 \fnsymbol{page} -> \TextOrMath  {\textasteriskcentered }{*}
 ---------------------------------------
-\hline -> \noalign {\hrule height\arrayrulewidth \futurelet \def document{document}\edef { on input line ...}\GenericError {               }{LaTeX Error: Can be used only in preamble}{See the LaTeX manual or LaTeX Companion for explanation.}{Your command was ignored.\MessageBreak Type  I <command> <return>  to replace it with another command,\MessageBreak or  <return>  to continue without it.}}
+\hline -> \noalign {\hrule height\arrayrulewidth \futurelet tt}
 ---------------------------------------
-\label{foo} -> \relax \begingroup \let 1\relax \let \@unexpandable at protect\edef \def document{document}\edef { on input line ...}\GenericError {               }{LaTeX Error: Can be used only in preamble}{See the LaTeX manual or LaTeX Companion for explanation.}{Your command was ignored.\MessageBreak Type  I <command> <return>  to replace it with another command,\MessageBreak or  <return>  to continue without it.}{\write \@auxout {\newlabel{foo}{{}{1}}}}\def document{document}\edef { on input line ...}\GenericError {               }{LaTeX Error: Can be used only in preamble}{See the LaTeX manual or LaTeX Companion for explanation.}{Your command was ignored.\MessageBreak Type  I <command> <return>  to replace it with another command,\MessageBreak or  <return>  to continue without it.}\endgroup \relax 
+\label{foo} -> \relax \begingroup \let 1\relax \let \@unexpandable at protect\edef tt{\write \@auxout {\newlabel{foo}{{}{1}}}}tt\endgroup \relax 
 ---------------------------------------
 \pageref{foo} -> \G at refundefinedtrue{\mbox {\normalfont \bfseries ??}}\GenericWarning {               }{LaTeX Warning: Reference `foo' on page 1 undefined}
 ---------------------------------------





More information about the latex3-commits mailing list.