[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh293: extend test to include testing for "mb"; updated documentation in latexchanges.tex and fntguide.tex (d68a894e)
Frank Mittelbach
frank.mittelbach at latex-project.org
Fri Feb 28 00:35:14 CET 2020
Repository : https://github.com/latex3/latex2e
On branch : hotfix/gh293
Link : https://github.com/latex3/latex2e/commit/d68a894e20f59601bc0b44cc4949e10822444440
>---------------------------------------------------------------
commit d68a894e20f59601bc0b44cc4949e10822444440
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Fri Feb 28 00:35:14 2020 +0100
extend test to include testing for "mb";
updated documentation in latexchanges.tex and fntguide.tex
>---------------------------------------------------------------
d68a894e20f59601bc0b44cc4949e10822444440
base/doc/fntguide.tex | 30 +++++++++++++++++-------------
base/doc/latexchanges.tex | 14 +++++++++-----
base/ltfssaxes.dtx | 21 +++++++++++++++++----
base/testfiles-search/github-0293.lvt | 6 ++++++
base/testfiles-search/github-0293.tlg | 16 +++++++++++++++-
5 files changed, 64 insertions(+), 23 deletions(-)
diff --git a/base/doc/fntguide.tex b/base/doc/fntguide.tex
index 0fa3698a..0c18661a 100644
--- a/base/doc/fntguide.tex
+++ b/base/doc/fntguide.tex
@@ -1090,20 +1090,24 @@ contain:
This enables the use of an alternative |\hyphenchar| in other encodings
whilst maintaining the correct value for all fonts.
-\NEWfeature{2020/02/02}
-According to NFSS conventions the series value should be a combination
-of weight and width abbreviated each with one or two letters as
-described on page~\pageref{page:seriesvalues}. In particular it should
-not contain contain an ``\texttt{m}'' unless it consists of just one
-character. In the past incorrect values such as ``\texttt{cm}'' or
-``\texttt{mb}'' were simply accepted, but since this now leads to
+\NEWfeature{2020/02/02} According to NFSS conventions the series value
+should be a combination of weight and width abbreviated each with one or
+two letters as described on page~\pageref{page:seriesvalues}. In
+particular it should not contain contain an ``\texttt{m}'' unless it
+consists of just one character. In the past incorrect values such as
+``\texttt{cm}'' were simply accepted, but since this now leads to
problems with the extended mechanism, the correct syntax is now
-enforced. More exactly, if the series values consists of three or less
-characters, it is assumed to be in NFSS notation and if incorrect, a
-warning is given and a surplus ``\texttt{m}'' is dropped. Longer values
-are not touched to allow for the usage of values like
-``\texttt{semibold}'' or ``\texttt{medium}'' as used by the
-\texttt{autoinst} program.
+enforced.
+
+More exactly, if the series values is a member of a specific set of
+values (\texttt{ulm}, \texttt{elm}, \texttt{lm}, \texttt{slm},
+\texttt{mm}, \texttt{sbm}, \texttt{bm}, \texttt{ebm}, \texttt{ubm},
+\texttt{muc}, \texttt{mec}, \texttt{mc}, \texttt{msc}, \texttt{msx},
+\texttt{mx}, \texttt{mex} or \texttt{mux}) it is assumed to be in
+incorrect NFSS notation and so a warning is given and a surplus
+``\texttt{m}'' is dropped. Other values are not touched to allow for
+the usage of values like ``\texttt{semibold}'' or ``\texttt{medium}'' as
+used by the \texttt{autoinst} program.
\subsection{Font file loading information}
diff --git a/base/doc/latexchanges.tex b/base/doc/latexchanges.tex
index 85b70317..8e1681c5 100644
--- a/base/doc/latexchanges.tex
+++ b/base/doc/latexchanges.tex
@@ -112,11 +112,15 @@ see for example
The patch~4 dropped a bit too much in certain situations, e.g., it
changed a series value of \texttt{semibold} (as used by
\texttt{autoinst}) to \texttt{seibold}, rendering it useless. So we
-now only correct series values if they have three or less characters
-assuming that in that case they follow or rather intended to follow
-the NFSS convention. We also add a warning that the
-\verb=\DeclareFontShape= should be updated in if we make a change to
-it (\ghissue{293}).
+now only correct series values if they are a member one of the
+following list: \texttt{ulm}, \texttt{elm}, \texttt{lm}, \texttt{slm},
+\texttt{mm}, \texttt{sbm}, \texttt{bm}, \texttt{ebm}, \texttt{ubm},
+\texttt{muc}, \texttt{mec}, \texttt{mc}, \texttt{msc}, \texttt{msx},
+\texttt{mx}, \texttt{mex} or \texttt{mux}. Here we assume that people
+intended to follow the NFSS convention but somehow got it wrong. So we
+drop one ``m'' and also add a warning that the
+\verb=\DeclareFontShape= declaration in question should be updated
+(\ghissue{293}).
\section{Changes introduced in 2020-02-02 patch~4}
diff --git a/base/ltfssaxes.dtx b/base/ltfssaxes.dtx
index 538caf53..cff38031 100644
--- a/base/ltfssaxes.dtx
+++ b/base/ltfssaxes.dtx
@@ -866,13 +866,26 @@
% fixed list (gh/293)}
% \begin{macrocode}
\def\series at maybe@drop at one@m#1#2{%
- \in@{,#1,}%
- {,ulm,elm,lm,slm,mm,sbm,bm,ebm,ubm,muc,mec,mc,msc,msx,mx,mex,mux,}%
- \ifin@
+% \end{macrocode}
+% The code below is an inline version of the \çs{in@} macro without
+% the group, so that it works in \cs{accent}.
+% \begin{macrocode}
+ \def\in@@##1,#1,{}%
+ \series at check@toks\expandafter{\in@@
+ ,ulm,elm,lm,slm,mm,sbm,bm,ebm,ubm,muc,mec,mc,msc,msx,mx,mex,mux,{}{},#1,}%
+ \edef\in@@{\the\series at check@toks}%
+ \ifx\in@@\@empty
+ \def#2{#1}%
+ \else
\edef#2{\expandafter\series at drop@one at m #1m\series at drop@one at m}%
- \else \def#2{#1}\fi
+ \fi
}
% \end{macrocode}
+% As a precaution we use a private toks register not \cs{toks@} as
+% that is no longer hidden inside the group.
+% \begin{macrocode}
+\newtoks\series at check@toks
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\series at drop@one at m}
diff --git a/base/testfiles-search/github-0293.lvt b/base/testfiles-search/github-0293.lvt
index 902ad2ec..c46aa4da 100644
--- a/base/testfiles-search/github-0293.lvt
+++ b/base/testfiles-search/github-0293.lvt
@@ -22,6 +22,9 @@
\DeclareFontShape{OT1}{lmr}{mc}{n}
{<->alias * lmr/m/it}{} % just to see it better
+\DeclareFontShape{OT1}{lmr}{mb}{n}
+ {<->alias * lmtt/m/it}{} % just to see it better
+
\OMIT
\begin{document}
\TIMO
@@ -41,5 +44,8 @@
\fontseries{c}\selectfont
\showfont{5}
+\fontseries{mb}\selectfont
+\showfont{6}
+
\end{document}
diff --git a/base/testfiles-search/github-0293.tlg b/base/testfiles-search/github-0293.tlg
index 7120c5a4..3507d736 100644
--- a/base/testfiles-search/github-0293.tlg
+++ b/base/testfiles-search/github-0293.tlg
@@ -13,6 +13,10 @@ LaTeX Font Info: Font shape `OT1/lmr/c/n' aliased to
(Font) `OT1/lmr/m/it' on input line ....
4: OT1/lmr/c/n
5: OT1/lmr/c/n
+LaTeX Font Info: Trying to load font information for OT1+lmtt on input line ....
+LaTeX Font Info: Font shape `OT1/lmr/mb/n' aliased to
+(Font) `OT1/lmtt/m/it' on input line ....
+6: OT1/lmr/mb/n
Completed box being shipped out [1]
\vbox(633.0+0.0)x407.0
.\glue 16.0
@@ -22,7 +26,7 @@ Completed box being shipped out [1]
...\hbox(0.0+0.0)x345.0
..\glue 25.0
..\glue(\lineskip) 0.0
-..\vbox(550.0+0.0)x345.0, glue set 491.94745fil
+..\vbox(550.0+0.0)x345.0, glue set 479.94873fil
...\write-{}
...\glue(\topskip) 3.11125
...\hbox(6.88875+0.0)x345.0, glue set 308.195fil
@@ -73,6 +77,16 @@ Completed box being shipped out [1]
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 5.8195
+...\hbox(6.1805+0.0)x345.0, glue set 314.25005fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/lmtt/m/it/10 A
+....\OT1/lmtt/m/it/10 B
+....\OT1/lmtt/m/it/10 C
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
...\glue 0.0 plus 1.0fil
...\glue 0.0
...\glue 0.0 plus 0.0001fil
More information about the latex3-commits
mailing list.