From 8012fbf3193a5d1699496b198c3bd448973557bd Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 7 Mar 2020 03:00:57 +0000 Subject: CTAN sync 202003070300 --- macros/latex-dev/base/ltfssini.dtx | 50 ++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 7 deletions(-) (limited to 'macros/latex-dev/base/ltfssini.dtx') diff --git a/macros/latex-dev/base/ltfssini.dtx b/macros/latex-dev/base/ltfssini.dtx index bdf5f5e6e9..3947b4d953 100644 --- a/macros/latex-dev/base/ltfssini.dtx +++ b/macros/latex-dev/base/ltfssini.dtx @@ -36,7 +36,7 @@ % % \ProvidesFile{ltfssini.dtx} - [2020/02/18 v3.1i LaTeX Kernel (NFSS Initialisation)] + [2020/03/02 v3.1k LaTeX Kernel (NFSS Initialisation)] % \iffalse \documentclass{ltxdoc} \begin{document} @@ -244,7 +244,7 @@ % \DescribeMacro\DeclareFontSeriesDefault % We now support this concept directly from within \LaTeX{} and for % use in font packages (or the document preamble) we offer -% \cs{DeclareSeriesDefault}. This declaration takes three +% \cs{DeclareFontSeriesDefault}. This declaration takes three % arguments: % \begin{description} % \item[document family interface:] Can either be \texttt{rm}, @@ -278,6 +278,7 @@ % The command to declare font series defaults for the ``rm'', ``sf'' or % ``tt'' family. % \begin{macrocode} +\let\DeclareFontSeriesDefault\@undefined % for rollback \newcommand\DeclareFontSeriesDefault[3][]{% \def\reserved@a{#1}% % \end{macrocode} @@ -393,8 +394,14 @@ \edef\rmdef@ult{\rmdefault}% \edef\sfdef@ult{\sfdefault}% \edef\ttdef@ult{\ttdefault}% - \edef\bfdef@ult{\bfdefault}% - \edef\mddef@ult{\mddefault}% +% \end{macrocode} +% The series defaults may contain some surplus \texttt{m} that we +% need to drop here. +% \changes{v3.1j}{2020/02/25}{Drop surplus ``m'' from \cs{bfdef@ult} +% and \cs{mddef@ult} (gh/291)} +% \begin{macrocode} + \series@maybe@drop@one@m\bfdefault\bfdef@ult + \series@maybe@drop@one@m\mddefault\mddef@ult \edef\famdef@ult{\familydefault}% } % \end{macrocode} @@ -718,7 +725,16 @@ \maybe@load@fontshape %<+debug> \series@change@debug{Target series: %<+debug> \f@series \space -> \target@series@value}% - \let\f@series\target@series@value +% \end{macrocode} +% The \cs{target@series@value} may contain something like +% \texttt{cm} (coming from a default) and so we can't directly +% asign it to \cs{f@series} be have to drop any surplus \texttt{m} +% first. +% \changes{v3.1j}{2020/02/25}{Drop surplus ``m'' from +% \cs{target@series@value} (gh/291)} +% \begin{macrocode} +% \let\f@series\target@series@value + \series@maybe@drop@one@m\target@series@value\f@series \fi \fi \fi @@ -776,10 +792,30 @@ % \cs{rmfamily}. This is now covered by looping and stopping the % loop when a match was found. % \begin{macrocode} - \expandafter\ifx\csname mdseries@#1\endcsname\f@series +% \end{macrocode} +% We have to sanitize the default value first because it may +% contain something like \texttt{mc} and that would never match +% \cs{f@series} because there it would be called \texttt{c} with +% the \texttt{m} dropped. It would be probably better to do that +% differently these days, but it is hard to adjust without causing +% a lot of issues, so we do the dropping in various places instead. +% \changes{v3.1j}{2020/02/25}{Drop surplus ``m'' from \cs{reserved@d} +% (gh/291)} +% \begin{macrocode} + \expandafter\series@maybe@drop@one@m + \csname mdseries@#1\endcsname\reserved@d + \ifx\reserved@d\f@series %<+debug> \series@change@debug{mdseries@#1 matched -> \reserved@b}% \let\target@series@value\reserved@b - \else\expandafter\ifx\csname bfseries@#1\endcsname\f@series + \else +% \end{macrocode} +% Again do some sanitizing. +% \changes{v3.1j}{2020/02/25}{Drop surplus ``m'' from \cs{reserved@d} +% (gh/291)} +% \begin{macrocode} + \expandafter\series@maybe@drop@one@m + \csname bfseries@#1\endcsname\reserved@d + \ifx\reserved@d\f@series %<+debug> \series@change@debug{bfseries@#1 matched -> \reserved@c}% \let\target@series@value\reserved@c \else\ifx\f@series\mddef@ult \let\target@series@value\reserved@b -- cgit v1.2.3