[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh289: support for #289 (50104b7f)

Frank Mittelbach frank.mittelbach at latex-project.org
Mon Feb 24 01:08:48 CET 2020


Repository : https://github.com/latex3/latex2e
On branch  : hotfix/gh289
Link       : https://github.com/latex3/latex2e/commit/50104b7ff3fd44bd4a3cffc844f18964fe6772d7

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

commit 50104b7ff3fd44bd4a3cffc844f18964fe6772d7
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Mon Feb 24 01:08:48 2020 +0100

    support for #289


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

50104b7ff3fd44bd4a3cffc844f18964fe6772d7
 base/changes.txt                                   |  5 +++
 base/doc/latexchanges.tex                          |  3 ++
 base/ltfssbas.dtx                                  | 52 +++++++++++++++++++---
 .../testfiles-search/github-0289.lvt               |  8 ++--
 .../github-0289.tlg}                               |  6 +--
 base/testfiles/tlb-latexrelease-003.luatex.tlg     |  4 ++
 base/testfiles/tlb-latexrelease-003.tlg            |  4 ++
 base/testfiles/tlb-latexrelease-003.xetex.tlg      |  4 ++
 8 files changed, 73 insertions(+), 13 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 68bfb936..002ffef1 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -11,6 +11,11 @@ are not part of the distribution.
 # 2020-02-02 PL 4 Release
 #########################
 
+2020-02-24  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltfssbas.dtx (section{Macros for setting up the tables}):
+	Drop surplus ``m'' in series when defining fontshape (gh/289)
+
 2020-02-21  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* ltclass.dtx (subsection{Providing shipment}):
diff --git a/base/doc/latexchanges.tex b/base/doc/latexchanges.tex
index d8bb8207..1442ca22 100644
--- a/base/doc/latexchanges.tex
+++ b/base/doc/latexchanges.tex
@@ -113,6 +113,9 @@ In some cases the \texttt{filecontents} environment was opening the
 file for writing without quoting it, so that files with spaces failed
 (\ghissue{284}).
 
+Ensure that \verb=\DeclareFontShape= drops surplus ``m'' in situations
+where an \texttt{.fd} incorrectly specifies \texttt{mc} instead of
+\texttt{c}, etc.\ (\ghissue{289}).
 
 \section{Changes introduced in 2020-02-02 patch~3}
 
diff --git a/base/ltfssbas.dtx b/base/ltfssbas.dtx
index b59b0faf..9836aee7 100644
--- a/base/ltfssbas.dtx
+++ b/base/ltfssbas.dtx
@@ -35,7 +35,7 @@
 %
 %
 \ProvidesFile{ltfssbas.dtx}
-             [2019/12/17 v3.2e LaTeX Kernel (NFSS Basic Macros)]
+             [2020/02/24 v3.2f LaTeX Kernel (NFSS Basic Macros)]
 % \iffalse
 \documentclass{ltxdoc}
 \begin{document}
@@ -245,23 +245,38 @@
 %    We use |\expandafter| |\endgroup| to restore catcode in case
 %    something goes wrong with the argument parsing (suggested by Tim
 %    Van Zandt)
+%    \begin{macrocode}
+   \expandafter\endgroup
+   \DeclareFontShape@}
+%    \end{macrocode}
 %  \end{macro}
 %
 %
 %
-%  \begin{macro}{\DeclareFontShape}
+%  \begin{macro}{\DeclareFontShape@}
 % \changes{v2.1c}{1994/02/07}{revert catcode settings earlier}
 % \changes{v3.0m}{1995/11/01}
 %      {(DPC) Test for \cs{relax} not \cs{undefined}, internal/1933}
 %    \begin{macrocode}
-   \expandafter\endgroup
-   \DeclareFontShape@}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/02/02}%
+%<latexrelease>                 {\DeclareFontShape@}{Maybe drop one m}%
 \def\DeclareFontShape@#1#2#3#4#5#6{%
    \expandafter\ifx\csname #1+#2\endcsname\relax
      \@latex at error{Font family `#1+#2' unknown}\@eha
    \else
      \expandafter
-       \xdef\csname#1/#2/#3/#4\endcsname{\expandafter\noexpand
+       \xdef\csname#1/#2/%
+%    \end{macrocode}
+%    If the series value is incorrectly specified with an extra ``m'',
+%    e.g., ``mc'' instead of just ``c'', drop the surplus ``m'' but
+%    keep the ``m'' if it is by its own.
+% \changes{v3.2f}{2020/12/24}{Drop surplus ``m'' in series when
+%                             defining fontshape (gh/289)}
+%    \begin{macrocode}
+       \series at drop@one at m#3mm\series at drop@one at m/%
+       #4\endcsname{\expandafter\noexpand
                                    \csname #5\endcsname}%
      \def\reserved at a{#6}%
      \global
@@ -274,6 +289,33 @@
    \fi
   }
 %    \end{macrocode}
+%
+%    \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease>                 {\DeclareFontShape@}{Maybe drop one m}%
+%<latexrelease>
+%<latexrelease>\def\DeclareFontShape@#1#2#3#4#5#6{%
+%<latexrelease>   \expandafter\ifx\csname #1+#2\endcsname\relax
+%<latexrelease>     \@latex at error{Font family `#1+#2' unknown}\@eha
+%<latexrelease>   \else
+%<latexrelease>     \expandafter
+%<latexrelease>       \xdef\csname#1/#2/#3/#4\endcsname{\expandafter\noexpand
+%<latexrelease>                                   \csname #5\endcsname}%
+%<latexrelease>     \def\reserved at a{#6}%
+%<latexrelease>     \global
+%<latexrelease>     \expandafter\let\csname#5\expandafter\endcsname
+%<latexrelease>        \ifx\reserved at a\@empty
+%<latexrelease>          \@empty
+%<latexrelease>        \else
+%<latexrelease>          \reserved at a
+%<latexrelease>        \fi
+%<latexrelease>   \fi
+%<latexrelease>  }
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+%    \end{macrocode}
 %  \end{macro}
 %
 %
diff --git a/required/amsmath/testfiles/tlb-amsmath-load.lvt b/base/testfiles-search/github-0289.lvt
similarity index 50%
copy from required/amsmath/testfiles/tlb-amsmath-load.lvt
copy to base/testfiles-search/github-0289.lvt
index fe720de4..11e8166c 100644
--- a/required/amsmath/testfiles/tlb-amsmath-load.lvt
+++ b/base/testfiles-search/github-0289.lvt
@@ -1,11 +1,13 @@
 \documentclass{article}
+
 \input{test2e}
 
-\START
+\begin{document}
 
-\usepackage{amsmath}
+\START
 
-\begin{document}
+\fontfamily{phv}\fontseries{mc}\selectfont
+\expandafter\string\the\font
 
 \END
 
diff --git a/base/testfiles-TU/tu-tlb4500.tlg b/base/testfiles-search/github-0289.tlg
similarity index 54%
copy from base/testfiles-TU/tu-tlb4500.tlg
copy to base/testfiles-search/github-0289.tlg
index 6c7661c3..089d1bdf 100644
--- a/base/testfiles-TU/tu-tlb4500.tlg
+++ b/base/testfiles-search/github-0289.tlg
@@ -1,7 +1,3 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
-> \box...=
-\hbox(7.5+2.49998)x45.84
-.\TU/lmr/m/n/10 $<>\_{|}
-! OK.
-l. ...\showbox0
+LaTeX Font Info:    Trying to load font information for OT1+phv on input line ....
diff --git a/base/testfiles/tlb-latexrelease-003.luatex.tlg b/base/testfiles/tlb-latexrelease-003.luatex.tlg
index 9643357f..62edab3d 100644
--- a/base/testfiles/tlb-latexrelease-003.luatex.tlg
+++ b/base/testfiles/tlb-latexrelease-003.luatex.tlg
@@ -207,6 +207,8 @@ Applying: [....-..-..] Old style numerals on input line ....
 LaTeX Info: Redefining \oldstylenums on input line ....
 Skipping: [....-..-..] Text companion symbols on input line ....
 Applying: [....-..-..] Text companion symbols on input line ....
+Skipping: [....-..-..] Maybe drop one m on input line ....
+Applying: [....-..-..] Maybe drop one m on input line ....
 Skipping: [....-..-..] Arbitrary units in \DeclareMathSizes  on input line ....
 Applying: [....-..-..] Arbitrary units in \DeclareMathSizes  on input line ....
 Skipping: [....-..-..] Loading .fd files on input line ....
@@ -547,6 +549,8 @@ Applying: [....-..-..] Old style numerals on input line ....
 LaTeX Info: Redefining \oldstylenums on input line ....
 Skipping: [....-..-..] Text companion symbols on input line ....
 Applying: [....-..-..] Text companion symbols on input line ....
+Skipping: [....-..-..] Maybe drop one m on input line ....
+Applying: [....-..-..] Maybe drop one m on input line ....
 Applying: [....-..-..] Arbitrary units in \DeclareMathSizes  on input line ....
 Already applied: [....-..-..] Arbitrary units in \DeclareMathSizes  on input line ....
 Skipping: [....-..-..] Loading .fd files on input line ....
diff --git a/base/testfiles/tlb-latexrelease-003.tlg b/base/testfiles/tlb-latexrelease-003.tlg
index af0aa261..a3eb7075 100644
--- a/base/testfiles/tlb-latexrelease-003.tlg
+++ b/base/testfiles/tlb-latexrelease-003.tlg
@@ -205,6 +205,8 @@ Applying: [....-..-..] Old style numerals on input line ....
 LaTeX Info: Redefining \oldstylenums on input line ....
 Skipping: [....-..-..] Text companion symbols on input line ....
 Applying: [....-..-..] Text companion symbols on input line ....
+Skipping: [....-..-..] Maybe drop one m on input line ....
+Applying: [....-..-..] Maybe drop one m on input line ....
 Skipping: [....-..-..] Arbitrary units in \DeclareMathSizes  on input line ....
 Applying: [....-..-..] Arbitrary units in \DeclareMathSizes  on input line ....
 Skipping: [....-..-..] Loading .fd files on input line ....
@@ -539,6 +541,8 @@ Applying: [....-..-..] Old style numerals on input line ....
 LaTeX Info: Redefining \oldstylenums on input line ....
 Skipping: [....-..-..] Text companion symbols on input line ....
 Applying: [....-..-..] Text companion symbols on input line ....
+Skipping: [....-..-..] Maybe drop one m on input line ....
+Applying: [....-..-..] Maybe drop one m on input line ....
 Applying: [....-..-..] Arbitrary units in \DeclareMathSizes  on input line ....
 Already applied: [....-..-..] Arbitrary units in \DeclareMathSizes  on input line ....
 Skipping: [....-..-..] Loading .fd files on input line ....
diff --git a/base/testfiles/tlb-latexrelease-003.xetex.tlg b/base/testfiles/tlb-latexrelease-003.xetex.tlg
index 90033881..509317eb 100644
--- a/base/testfiles/tlb-latexrelease-003.xetex.tlg
+++ b/base/testfiles/tlb-latexrelease-003.xetex.tlg
@@ -205,6 +205,8 @@ Applying: [....-..-..] Old style numerals on input line ....
 LaTeX Info: Redefining \oldstylenums on input line ....
 Skipping: [....-..-..] Text companion symbols on input line ....
 Applying: [....-..-..] Text companion symbols on input line ....
+Skipping: [....-..-..] Maybe drop one m on input line ....
+Applying: [....-..-..] Maybe drop one m on input line ....
 Skipping: [....-..-..] Arbitrary units in \DeclareMathSizes  on input line ....
 Applying: [....-..-..] Arbitrary units in \DeclareMathSizes  on input line ....
 Skipping: [....-..-..] Loading .fd files on input line ....
@@ -548,6 +550,8 @@ Applying: [....-..-..] Old style numerals on input line ....
 LaTeX Info: Redefining \oldstylenums on input line ....
 Skipping: [....-..-..] Text companion symbols on input line ....
 Applying: [....-..-..] Text companion symbols on input line ....
+Skipping: [....-..-..] Maybe drop one m on input line ....
+Applying: [....-..-..] Maybe drop one m on input line ....
 Applying: [....-..-..] Arbitrary units in \DeclareMathSizes  on input line ....
 Already applied: [....-..-..] Arbitrary units in \DeclareMathSizes  on input line ....
 Skipping: [....-..-..] Loading .fd files on input line ....





More information about the latex3-commits mailing list.