From a78ac53d88cadec5d811d6c21462bbcc69801a6d Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Mon, 7 Oct 2019 02:23:27 +0200 Subject: [PATCH 01/55] initial code for nfss axes --- base/build.lua | 2 + base/cmfonts.fdd | 3 + base/ltfinal.dtx | 8 + base/ltvers.dtx | 2 +- base/nfssaxes.tex | 518 ++++++++++++++++++++++++++++ base/testfiles/tlb-nfssaxes-001.lvt | 104 ++++++ base/testfiles/tlb-nfssaxes-001.tlg | 34 ++ base/testfiles/tlb-nfssaxes-002.lvt | 61 ++++ base/testfiles/tlb-nfssaxes-002.tlg | 27 ++ base/testfiles/tlb1214.tlg | 4 +- base/testfiles/tnfss3.tlg | 5 +- 11 files changed, 761 insertions(+), 7 deletions(-) create mode 100644 base/nfssaxes.tex create mode 100644 base/testfiles/tlb-nfssaxes-001.lvt create mode 100644 base/testfiles/tlb-nfssaxes-001.tlg create mode 100644 base/testfiles/tlb-nfssaxes-002.lvt create mode 100644 base/testfiles/tlb-nfssaxes-002.tlg diff --git a/base/build.lua b/base/build.lua index 8cf4079ca..f4c5de39c 100644 --- a/base/build.lua +++ b/base/build.lua @@ -36,6 +36,7 @@ installfiles = "sample2e.tex", "small2e.tex", "testpage.tex", + "nfssaxes.tex", } sourcefiles = { @@ -51,6 +52,7 @@ sourcefiles = "sample2e.tex", "small2e.tex", "testpage.tex", + "nfssaxes.tex", } textfiles = { diff --git a/base/cmfonts.fdd b/base/cmfonts.fdd index f33039479..00aa2ed64 100644 --- a/base/cmfonts.fdd +++ b/base/cmfonts.fdd @@ -1021,6 +1021,9 @@ %<+Ucmtt>\DeclareFontShape{U}{cmtt}{bx}{it}% %<-nowarn> {<->sub*cmtt/m/it}{} %<+nowarn> {<->ssub*cmtt/m/it}{} +%<+OT1cmtt>\DeclareFontShape{OT1}{cmtt}{bx}{sl} +%<-nowarn> {<->sub*cmtt/m/n}{} +%<+nowarn> {<->ssub*cmtt/m/n}{} %<+OT1cmtt>\DeclareFontShape{OT1}{cmtt}{bx}{ui} %<+Ucmtt>\DeclareFontShape{U}{cmtt}{bx}{ui}% %<-nowarn> {<->sub*cmtt/m/it}{} diff --git a/base/ltfinal.dtx b/base/ltfinal.dtx index 47641e960..628130595 100644 --- a/base/ltfinal.dtx +++ b/base/ltfinal.dtx @@ -1116,6 +1116,14 @@ % \end{macro} % \end{macro} % +% \subsection{Do some temporary work for pre-release} +% +% This is a good place to load code that hasn't yet been +% integrated into the other files \ldots +% \begin{macrocode} +\input nfssaxes.tex +% \end{macrocode} +% % \subsection{Dumping the format} % Finally we make |@| into a letter, ensure the format will % be in the `normal' error mode, and dump everything into the diff --git a/base/ltvers.dtx b/base/ltvers.dtx index 24838e9c0..85e814113 100644 --- a/base/ltvers.dtx +++ b/base/ltvers.dtx @@ -125,7 +125,7 @@ % intended to help help us internally when we locally install a % format out of some development branch. % \begin{macrocode} -\edef\development@branch@name{development \the\year-\the\month-\the\day} +\edef\development@branch@name{nfssaxes \the\year-\the\month-\the\day} % \end{macrocode} % \end{macro} % \end{macro} diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex new file mode 100644 index 000000000..a747f6fde --- /dev/null +++ b/base/nfssaxes.tex @@ -0,0 +1,518 @@ + +% \section{Changing the font series} +% +% \emph{write intro} +% +% \begin{macro}{\DeclareFontSeriesChangeRule} +% The \cs{DeclareFontSeriesChangeRule} defines entries in a simple +% database (implemented as a set of commands) that define mappings +% between from an existing series and requested new series and maps +% that to a result series (and additionally offers an alternative +% if the desired one is not existing): +% \begin{itemize} +% \item[\texttt{\#1}] current \cs{f@series} +% \item[\texttt{\#2}] requested new series +% \item[\texttt{\#3}] result (if that exist for the given font family +% \item[\texttt{\#4}] alternative result (if \textt{\#3} does not exist) +% \end{itemize} +% If an \texttt{.fd} file has its own substitution rules then +% \texttt{\#3} exist and thus \textt{\#4} is not applied. +% +% If there is no matching database entry or if neither the result +% nor the alternate result exist in the font family the requested +% new series is used (which then may trigger substitutions later on. +% \begin{macrocode} +\def\DeclareFontSeriesChangeRule#1#2#3#4{% + \@namedef{series@#1@#2}{{#3}{#4}}} +% \end{macrocode} +% \end{macro} +% +% \subsection{Mappin rules for series changes} +% +% The rules set up use explicit series values not \cs{..default} +% indirections; my current feeling is that this is in fact better. +% +% With 9 weights and 9 width classes this table is getting a bit large +% in the end (324 entries) but on the other hand it doesn't change and +% accessing speed and it is not \emph{that} large. +% +% \emph{What is missing so far, is a way to state that I want to revert, say +% the weight to ``regular'' but keep the width or vize versa. That +% would probably need a new letter due to the double use of ``m''. --- +% not quite sure what I meant when I wrote that sentence!} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {m}{c} {c} {m} +\DeclareFontSeriesChangeRule {m}{x} {x} {m} +\DeclareFontSeriesChangeRule {m}{m} {m} {} +\DeclareFontSeriesChangeRule {m}{b} {b} {bx} +\DeclareFontSeriesChangeRule {m}{bx} {bx} {b} +\DeclareFontSeriesChangeRule {m}{l} {l} {m} +\DeclareFontSeriesChangeRule {m}{sb} {sb} {b} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {b}{c} {bc} {b} +\DeclareFontSeriesChangeRule {b}{x} {bx} {b} +\DeclareFontSeriesChangeRule {b}{m} {m} {} +\DeclareFontSeriesChangeRule {b}{b} {b} {bx} +\DeclareFontSeriesChangeRule {b}{bx} {bx} {b} +\DeclareFontSeriesChangeRule {b}{l} {l} {} +\DeclareFontSeriesChangeRule {b}{sb} {sb} {b} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {bx}{c} {bc} {bx} +\DeclareFontSeriesChangeRule {bx}{x} {bx} {} +\DeclareFontSeriesChangeRule {bx}{m} {m} {} +\DeclareFontSeriesChangeRule {bx}{b} {b} {bx} +\DeclareFontSeriesChangeRule {bx}{bx} {bx} {} +\DeclareFontSeriesChangeRule {bx}{l} {lx} {} +\DeclareFontSeriesChangeRule {bx}{sb} {sbx} {sb} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {l}{c} {lc} {l} % ? +\DeclareFontSeriesChangeRule {l}{x} {lx} {l} % ? +\DeclareFontSeriesChangeRule {l}{m} {m} {} +\DeclareFontSeriesChangeRule {l}{b} {b} {bx} +\DeclareFontSeriesChangeRule {l}{bx} {bx} {b} +\DeclareFontSeriesChangeRule {l}{l} {l} {} +\DeclareFontSeriesChangeRule {l}{sb} {sb} {b} % ? +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {sb}{c} {sbc} {bc} %? +\DeclareFontSeriesChangeRule {sb}{x} {sbx} {bx} %? +\DeclareFontSeriesChangeRule {sb}{m} {m} {} +\DeclareFontSeriesChangeRule {sb}{b} {b} {} +\DeclareFontSeriesChangeRule {sb}{bx} {bx} {} +\DeclareFontSeriesChangeRule {sb}{l} {l} {} +\DeclareFontSeriesChangeRule {sb}{sb} {sb} {} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {l}{c} {c} {m} % ? +% \end{macrocode} +% +% +% \emph{rules need to get completed!} +% +% + +% \subsection{Changing to a new series} +% +% \begin{macro}{\fontseries} +% The \cs{fontseries} command takes one argument which is the requested new +% font series. In the orginal implementation it simply saved the +% expanded value in \cs{f@series}. Now we do a bit more processing +% and look up the final value in the font series data base. This is +% done by \cs{merge@font@series}. +% \begin{macrocode} +\DeclareRobustCommand\fontseries[1]{\merge@font@series{#1}} +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\merge@font@series} +% We look up the data base value by expanding the right command +% twice. If no such value exist then the result will be \cs{relax} +% otherwise it will be the two brace groups: the desired result and +% the alternate result. The first case means that the third +% argument to \cs{merge@font@series} will be empty. +% \begin{macrocode} +\def\merge@font@series#1{% + \expandafter\expandafter\expandafter + \merge@font@series@ + \csname series@\f@series @#1\endcsname + {#1}% + \@nil +} +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{merge@font@series@} +% This now defines the new \cs{f@series}: +% \begin{macrocode} +\def\merge@font@series@#1#2#3\@nil{% + \edef\f@series{% +% \end{macrocode} +% If the third argument is empty there is no database entry for the +% combination and the second argument holds the new series so we +% return that. +% \begin{macrocode} + \ifx!#3!% + #2% + \else +% \end{macrocode} +% Otherwise we check if the desired result for the series +% (\texttt{\#1}) exists for the font family and the current shape. +% \begin{macrocode} + \expandafter \ifx + \csname \f@encoding /\f@family /#1/\f@shape \endcsname + \relax +% \end{macrocode} +% If not, then we try the alternate result (\texttt{\#2}). +% \begin{macrocode} + \expandafter \ifx + \csname \f@encoding /\f@family /#2/\f@shape \endcsname + \relax +% \end{macrocode} +% If that doesn't exist either, then we use the requested series unmodified. +% \begin{macrocode} + #3% +% \end{macrocode} +% If the alternate result exist we use that +% \begin{macrocode} + \else + #2% + \fi +% \end{macrocode} +% and if the desired result is available then we use that: +% \begin{macrocode} + \else + #1% + \fi + \fi +}} +% \end{macrocode} +% \end{macro} + + + + + +% \section{Changing the shape} +% +% Rules for managing shapes (i.e., essentially building in an ``sc'' +% axis). +% +% \emph{write intro} +% +% \begin{macro}{\DeclareFontShapeChangeRule} +% The database for shapes is done in exactly the same way, only +% that it is much smaller and we usually have no alternative shape +% (or rather it is empty thus not used). +% \begin{macrocode} +\def\DeclareFontShapeChangeRule #1#2#3#4{% + \@namedef{shape@#1@#2}{{#3}{#4}}} +% \end{macrocode} +% \end{macro} +% +% +% There is kind of the same problem with returning back from +% \texttt{sc} to normal. It sort of needs its own letter. In +% fontspec this is solved by the first time \cs{upshape} changes +% \texttt{it} or \texttt{sl} back (so only \texttt{sc} remains) and +% second time it changes then \texttt{sc} back to normal. Maybe +% that's not a bad way to handle it, so I've done that below too. +% The alternative would be to provide something like \cs{noscshape} +% as the \pkg{slantsc} package does. +% +% That sort of approach doesn't seem possible with the series as +% \cs{bfseries} produces \texttt{bx} (normally) and \cs{mdseries} +% reverts that back to \texttt{{m} (ie no bold and normal width) +% and I think that needs to be preserved. +% +% \begin{macro}{\ulcshape} +% To request going back to upper/lowercase we need a new +% command. It uses \texttt{ulc} as shape name but this shape is +% virtual, i.e., it doesn't exist as a real shape, it is only used +% as part of the database table entries and thus only appears in +% the second argument there (but not in the first). +% \begin{macrocode} +\DeclareRobustCommand\ulcshape + {\not@math@alphabet\ulcshape\relax + \fontshape{ulc}\selectfont} +\DeclareTextFontCommand{\textulc}{\ulcshape} % back to upper/lower case +% \end{macrocode} +% \end{macro} +% +% +% +% \subsection{Mapping rules for shape combinations} + +% \begin{macrocode} +\DeclareFontShapeChangeRule {n}{n} {n} {} +\DeclareFontShapeChangeRule {n}{it} {it} {sl} +\DeclareFontShapeChangeRule {n}{sl} {sl} {it} +\DeclareFontShapeChangeRule {n}{sc} {sc} {} +\DeclareFontShapeChangeRule {n}{ulc} {n} {} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontShapeChangeRule {it}{n} {n} {} +\DeclareFontShapeChangeRule {it}{it} {it} {} +\DeclareFontShapeChangeRule {it}{sl} {sl} {it} +\DeclareFontShapeChangeRule {it}{sc} {scit} {scsl} % or sc or it as second default? +\DeclareFontShapeChangeRule {it}{ulc} {it} {} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontShapeChangeRule {sl}{n} {n} {} +\DeclareFontShapeChangeRule {sl}{it} {it} {sl} +\DeclareFontShapeChangeRule {sl}{sl} {sl} {} +\DeclareFontShapeChangeRule {sl}{sc} {scsl} {scit} % sc or sl as second default? +\DeclareFontShapeChangeRule {sl}{ulc} {sl} {} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontShapeChangeRule {sc}{n} {n} {} +\DeclareFontShapeChangeRule {sc}{it} {scit} {scsl} +\DeclareFontShapeChangeRule {sc}{sl} {scsl} {scit} +\DeclareFontShapeChangeRule {sc}{sc} {sc} {} +\DeclareFontShapeChangeRule {sc}{ulc} {n} {} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontShapeChangeRule {scit}{n} {sc} {} +\DeclareFontShapeChangeRule {scit}{it} {scit} {} +\DeclareFontShapeChangeRule {scit}{sl} {scsl} {scit} +\DeclareFontShapeChangeRule {scit}{sc} {scit} {} +\DeclareFontShapeChangeRule {scit}{ulc} {it} {} +% \end{macrocode} +% The previous rule assumes that if \texttt{scit} exists then +% \texttt{it} exists as well. If not, the mechanism will save +% \texttt{ulc} in \cs{f@series} which most certainly doesn't +% exist. So when a font is later selected that would result in a +% substitution (so no harm done really). Alternatively, we could in +% this case use \texttt{n} as aternative, which may be a bit +% faster, but such a setup would be so weird in the first place +% that this isn't worth the effort. +% +% \begin{macrocode} +\DeclareFontShapeChangeRule {scsl}{n} {sc} {} +\DeclareFontShapeChangeRule {scsl}{it} {scit} {scsl} +\DeclareFontShapeChangeRule {scsl}{sl} {scsl} {} +\DeclareFontShapeChangeRule {scsl}{sc} {scsl} {} +\DeclareFontShapeChangeRule {scsl}{ulc} {sl} {} +% \end{macrocode} + + +% By the way, fontspec uses \cs{itscdefault} etc.\ whereas in the +% \texttt{.fd} files it is always called \texttt{scit}. I +% personally kind of think ``\texttt{itsc}'' reads better than +% ``\texttt{scit}'' but with more than 700 fonts (in T1 encoding) +% having \texttt{scit} and none the other I think the name is now +% given. +% +% +% \subsection{Changing to a new shape} +% +% \begin{macro}{\fontshape} +% Again the \cs{fontshape} now has to do a lookup to get to its new +% value in \cs{f@shape}. The method is exactly the same as in +% \csπfontseries}. +% \begin{macrocode} +\DeclareRobustCommand\fontshape[1]{\merge@font@shape{#1}} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\merge@font@shape} +% Look up the database entry (if existing) and act accordingly. +% \begin{macrocode} +\def\merge@font@shape#1{% + \expandafter\expandafter\expandafter + \merge@font@shape@ + \csname shape@\f@shape @#1\endcsname + {#1}% + \@nil +} +% \end{macrocode} +% \end{macro} +% + +% \begin{macro}{\merge@font@shape@} +% Same game now, except that we look at shapes not series values. +% \begin{macrocode} +\def\merge@font@shape@#1#2#3\@nil{% + \edef\f@shape{% + \ifx!#3!% + #2% + \else + \expandafter \ifx + \csname \f@encoding /\f@family /\f@series/#1\endcsname + \relax + \expandafter \ifx + \csname \f@encoding /\f@family /\f@series/#2\endcsname + \relax + #3% + \else + #2% + \fi + \else + #1% + \fi + \fi +}} +% \end{macrocode} +% \end{macro} + + + + +% \section{Supporting nested emphasis} + +% By default \LaTeXe{} supports two levels of nested emphasis: if +% the current font has an upright shape then it switches to +% \cs{itshape} otherwise to \cs{eminnershape} (which defaults to +% \cs{upshape}). This means nested emphasis will ocssilate between +% italic and upright shapes. +% +% Sometimes it would be nice to allow for a more lengthly sequence, +% but instead of providing a fixed one \LaTeX{} now offers a +% general mechanism that allows to define arbitrary sequences. +% +% \DeclareMacro\emfontdeclare +% \DeclareMacro\emforce +% +% \emph{decide name! maybe \cs{DeclareEmSequence} ???} +% +% This declaration expects a comma separated list of (font) change +% declarations corresponding to increasing levels of emphasis. +% The mechanism tries to be ``smart'' and verifies that the +% declarations actually alter the font. If not it will ignore this +% level and tries the next one---the assumption being that +% there was a manual font change in the document to the font that +% is now supposed to be used for emphasis. Of course, this only +% works if the declarations in the list actually change the font +% and not, say, just the color. +% In such a case one has to use \cs{emforce} to which directs the +% mechanism to use the level even if the font attributes haven't changed. +% +% If the nesting is so deep, that the specified levels are +% exhausted then \cs{emreset} is used as a final set of +% declarations (which by default returns +% back to the upright shape). ThisAny additional nesting levels will +% then reuse the list from its beginning. + +% +% +% +% \begin{macro}{\emfontdeclare} +% +% \cs{emfontdeclare| expects a clist of declaration. Spaces in the +% argument are dropped to avoid surious spaces in the output. The +% declarations are additive. At the very end the shape is reset +% using |\emreset| and |\emforce| so that this case is never +% skipped.\footnote{Maybe we should not add \cs{emforce} but allow +% that case to be skipped as well. Of course, that might result in +% an endless loop if somebody defines a sequence without any font +% change and without \cs{emforce} but \ldots} +% Further nested calls restart at the beginning. +% \begin{macrocode} +\def\emfontdeclare#1{% + \protected@edef\emfontdeclare@clist{\zap@space#1, \@empty\emforce\emreset}% +} +% \end{macrocode} +% By default the ist is empty, in which case \cs{eminnershape} is +% used by \LaTeX. +% \begin{macrocode} +\let\emfontdeclare@clist\@empty +% \end{macrocode} +% \end{macro} + + + +% \begin{macro}{\emreset} +% Reset the font to upright (this needs to undo \texttt{sc} and +% \textt{it} separately as \cs{upshape} no longer resets both in +% one go). +% \begin{macrocode} +\def\emreset{\fontshape{ulc}% in case sc is in use, e.g, changes scit -> it + \fontshape{n}% for all other cases +} +% \end{macrocode} +% We could have used \verb=\fontshape{n}= twice, that would give +% the same result with the default set of shape rules. +% \end{macro} + + + +% \begin{macro}{\em} +% The new definition for \cs{em} (and implicitly \cs{emph} is like +% it was before if \cs{emfontdeclare@clist} is empty. +% \begin{macrocode} +\DeclareRobustCommand\em{% + \@nomath\em + \ifx\emfontdeclare@clist\@empty + \ifdim \fontdimen\@ne\font >\z@ + \eminnershape \else \itshape \fi + \else +% \end{macrocode} +% But if not we use the list to decide how to do emphasis. +% +% We use the current font to check if the declarations have any +% effect, so even a size change is allowed and identified as a +% modification (but a color change, for example, isn't). So first +% we save the current status. +% \begin{macrocode} + \edef\em@currfont{\csname\curr@fontshape/\f@size\endcsname}% +% \end{macrocode} +% Then we grab the next element from the list and check if it can +% be used. +% \begin{macrocode} + \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update + \fi +} +% \end{macrocode} +% \end{macro} + + + +% \begin{macro}{\do@emfont@update} +% We know that the list (if not empty) has at least 2 elements +% separated by a comma, so we pick up the first in \texttt{\#1} and +% the rest in \texttt{\#2}. +% \begin{macrocode} +\def\do@emfont@update#1,#2\do@emfont@update{% +% \end{macrocode} +% First action is to alter the list and move the first entry to the end +% \begin{macrocode} + \def\emfontdeclare@clist{#2,#1}% +% \end{macrocode} +% Then we execute current declaration. Appending |\selectfont| means one +% can write just |\fontshape{it}}| and that works then too. +% \begin{macrocode} +% \typeout{Use: \detokenize{#1}}% + #1\selectfont +% \end{macrocode} +% We then compare the current font with our saved version, but with +% a slight twist: we add \cs{em@force} at the end of the +% name. Normally this is empty so has no effect but if there was an +% \cs{emforce} as part of \texttt{\#1} it will append a |/| to the +% font name (making it invalid) thus this will then always fail the +% test. +% +% If the test fails we are done and the declarations will be used. +% Otherwise we will try the next declaration in the sequence. +% \begin{macrocode} + \expandafter\ifx\csname\curr@fontshape/\f@size\em@force\endcsname\em@currfont + \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update +% \end{macrocode} +% If \cs{emforce} was used, we have to undo its effect: +% \begin{macrocode} + \else + \let\em@force\@empty + \fi +} +% \end{macrocode} +% \end{macro} + + + +% \begin{macro}{\emforce} +% \begin{macro}{\em@force} +% The definition of \cs{emforce} is simple: change \cs{em@force} to +% make the above test always invalid. +% \begin{macrocode} +\protected\def\emforce{\def\em@force{/}} +\let\em@force\@empty +% \end{macrocode} +% \end{macro} +% \end{macro} + + + diff --git a/base/testfiles/tlb-nfssaxes-001.lvt b/base/testfiles/tlb-nfssaxes-001.lvt new file mode 100644 index 000000000..f88203b14 --- /dev/null +++ b/base/testfiles/tlb-nfssaxes-001.lvt @@ -0,0 +1,104 @@ +\documentclass{article} + +\input{test2e} + + + +\def\testseries#1{\showresult{series}{\fontseries{#1}}} +\def\testshape#1{\showresult{shape}{\fontshape{#1}}} +\def\showresult#1#2{#2\typeout{\string#2 -> \csname f@#1\endcsname}} + + + +\begin{document} + +\START + +\fontencoding{T1}\fontfamily{lmr}\selectfont + + +\typeout{=========== Testing standard shape declarations ==========} + +Test +\showresult{shape}\upshape after upshape +\showresult{shape}\scshape after scshape +\showresult{shape}\itshape after itshape +\showresult{shape}\upshape after upshape +\showresult{shape}\upshape after upshape +\showresult{shape}\slshape after slshape +\showresult{shape}\scshape after scshape +\showresult{shape}\upshape after upshape +\showresult{shape}\ulcshape after ulcshape + + +\typeout{=========== Testing low-level \string\fontshape\space declarations ==========} + +Testing \verb=\fontshape= + +\testshape{n} \selectfont after fontshape ``{n}'' +\testshape{sc} \selectfont after fontshape ``{sc}'' +\testshape{it} \selectfont after fontshape ``{it}'' +\testshape{sl} \selectfont after fontshape ``{sl}'' +\testshape{n} \selectfont after fontshape ``{n}'' +\testshape{ulc} \selectfont after fontshape ``{ulc}'' + +\typeout{=========== Testing low-level \string\fontseries\space declarations ==========} + +Testing \verb=\fontseries= + +\testseries{bx} \selectfont after ``{bx}'' +\testseries{l} \selectfont after ``{l}'' +\testseries{c} \selectfont after ``{c}'' % lc doesn't exist +\testseries{m} \selectfont after ``{m} `` +\testseries{c} \selectfont after ``{c} `` +\testseries{b} \selectfont after ``{b}'' +\testseries{bx} \selectfont after ``{bx}'' +\testseries{foo} \selectfont after ``{foo}'' +\testseries{m} \selectfont after ``{m}'' + + +\END + + +%--------------------------------- + +Testing \verb=\fontseries= + +\testseries{bx} \selectfont after ``{bx}'' +\testseries{l} \selectfont after ``{l}'' +\testseries{c} \selectfont after ``{c}'' % lc doesn't exist +\testseries{m} \selectfont after ``{m} `` +\testseries{c} \selectfont after ``{c} `` +\testseries{b} \selectfont after ``{b}'' +\testseries{bx} \selectfont after ``{bx}'' +\testseries{foo} \selectfont after ``{foo}'' +\testseries{m} \selectfont after ``{m}'' + +\fontfamily{lmr}\selectfont + +Testing \verb=\..shape=s + +Test +\showresult{shape}\upshape after upshape +\showresult{shape}\scshape after scshape +\showresult{shape}\itshape after itshape +\showresult{shape}\slshape after slshape +\showresult{shape}\upshape after upshape +\showresult{shape}\ulcshape after ulcshape + + +%--------------------------------- + +Testing \verb=\fontshape= + +\testshape{n} \selectfont after fontshape ``{n}'' +\testshape{sc} \selectfont after fontshape ``{sc}'' +\testshape{it} \selectfont after fontshape ``{it}'' +\testshape{sl} \selectfont after fontshape ``{sl}'' +\testshape{n} \selectfont after fontshape ``{n}'' +\testshape{ulc} \selectfont after fontshape ``{ulc}'' + +%--------------------------------- + + +\end{document} diff --git a/base/testfiles/tlb-nfssaxes-001.tlg b/base/testfiles/tlb-nfssaxes-001.tlg new file mode 100644 index 000000000..51ed476fb --- /dev/null +++ b/base/testfiles/tlb-nfssaxes-001.tlg @@ -0,0 +1,34 @@ +This is a generated file for the LaTeX2e validation system. +Don't change this file in any respect. +LaTeX Font Info: Trying to load font information for T1+lmr on input line .... +=========== Testing standard shape declarations ========== +\upshape -> n +\scshape -> sc +\itshape -> scsl +\upshape -> sc +\upshape -> n +\slshape -> sl +\scshape -> scsl +\upshape -> sc +\ulcshape -> n +=========== Testing low-level \fontshape declarations ========== +\fontshape{n} -> n +\fontshape{sc} -> sc +\fontshape{it} -> scsl +\fontshape{sl} -> scsl +\fontshape{n} -> sc +\fontshape{ulc} -> n +=========== Testing low-level \fontseries declarations ========== +\fontseries{bx} -> bx +\fontseries{l} -> l +LaTeX Font Warning: Font shape `T1/lmr/l/n' undefined +(Font) using `T1/lmr/m/n' instead on input line .... +\fontseries{c} -> m +\fontseries{m} -> m +\fontseries{c} -> m +\fontseries{b} -> b +\fontseries{bx} -> bx +\fontseries{foo} -> foo +LaTeX Font Warning: Font shape `T1/lmr/foo/n' undefined +(Font) using `T1/lmr/m/n' instead on input line .... +\fontseries{m} -> m diff --git a/base/testfiles/tlb-nfssaxes-002.lvt b/base/testfiles/tlb-nfssaxes-002.lvt new file mode 100644 index 000000000..ba6fbae04 --- /dev/null +++ b/base/testfiles/tlb-nfssaxes-002.lvt @@ -0,0 +1,61 @@ +\documentclass{article} + +\input{test2e} + + +\def\showresult#1#2{#2\typeout{\string#2 -> \csname f@#1\endcsname}} + + +\begin{document} + +\START + +%--------------------------------- + +\typeout{default nesting of emph} + +\emph{ Foo \showresult{shape}{} + \emph{ Bar \showresult{shape}{} + \emph{ Baz \showresult{shape}{} + \emph{ FooBar \showresult{shape}{} + \emph{ FooBarBaz \showresult{shape}{} + \emph{ circle \showresult{shape}{} + \emph{ circle2 \showresult{shape}{} +}}}}}}} + + + +\typeout{extended nesting of emph using it,n+sc,it+sc} + +\emfontdeclare{\fontshape{it},\fontshape{n}\fontshape{sc},\fontshape{it}} + + +\emph{ Foo \showresult{shape}{} + \emph{ Bar \showresult{shape}{} + \emph{ Baz \showresult{shape}{} + \emph{ FooBar \showresult{shape}{} + \emph{ FooBarBaz \showresult{shape}{} + \emph{ circle \showresult{shape}{} + \emph{ circle2 \showresult{shape}{} +}}}}}}} + + +\typeout{extended nesting of emph using it,n+sc,it+sc in T1/lmr} + +\fontencoding{T1}\fontfamily{lmr}\selectfont + +\emfontdeclare{\fontshape{it},\fontshape{n}\fontshape{sc},\fontshape{it}} + +\emph{ Foo \showresult{shape}{} + \emph{ Bar \showresult{shape}{} + \emph{ Baz \showresult{shape}{} + \emph{ FooBar \showresult{shape}{} + \emph{ FooBarBaz \showresult{shape}{} + \emph{ circle \showresult{shape}{} + \emph{ circle2 \showresult{shape}{} +}}}}}}} + + +\END + + diff --git a/base/testfiles/tlb-nfssaxes-002.tlg b/base/testfiles/tlb-nfssaxes-002.tlg new file mode 100644 index 000000000..f76a4045b --- /dev/null +++ b/base/testfiles/tlb-nfssaxes-002.tlg @@ -0,0 +1,27 @@ +This is a generated file for the LaTeX2e validation system. +Don't change this file in any respect. +default nesting of emph + -> it + -> n + -> it + -> n + -> it + -> n + -> it +extended nesting of emph using it,n+sc,it+sc + -> it + -> sc + -> it + -> n + -> it + -> sc + -> it +extended nesting of emph using it,n+sc,it+sc in T1/lmr +LaTeX Font Info: Trying to load font information for T1+lmr on input line .... + -> it + -> sc + -> scsl + -> n + -> it + -> sc + -> scsl diff --git a/base/testfiles/tlb1214.tlg b/base/testfiles/tlb1214.tlg index 2d80ea237..2c9b61e14 100644 --- a/base/testfiles/tlb1214.tlg +++ b/base/testfiles/tlb1214.tlg @@ -59,8 +59,8 @@ LaTeX Font Info: Font shape `OT1/cmtt/bx/it' in size <10> not available LaTeX Font Warning: Font shape `OMS/cmtt/bx/it' undefined (Font) using `OMS/cmtt/bx/n' instead (Font) for symbol `textparagraph' on input line .... -LaTeX Font Warning: Font shape `OT1/cmtt/bx/sl' undefined -(Font) using `OT1/cmtt/bx/n' instead on input line .... +LaTeX Font Info: Font shape `OT1/cmtt/bx/sl' in size <10> not available +(Font) Font shape `OT1/cmtt/m/n' tried instead on input line .... Completed box being shipped out [1] \vbox(633.0+0.0)x407.0 .\glue 16.0 diff --git a/base/testfiles/tnfss3.tlg b/base/testfiles/tnfss3.tlg index 9cc0955a1..ba98ddc87 100644 --- a/base/testfiles/tnfss3.tlg +++ b/base/testfiles/tnfss3.tlg @@ -23,9 +23,7 @@ LaTeX Font Warning: Font shape `OT1/cmss/m/sc' in size <8> not available (Font) Font shape `OT1/cmr/m/sc' tried instead on input line .... LaTeX Font Warning: Font shape `OT1/cmss/m/sc' in size <14.4> not available (Font) Font shape `OT1/cmr/m/sc' tried instead on input line .... -LaTeX Font Warning: Font shape `OT1/cmtt/bx/sl' undefined -(Font) using `OT1/cmtt/bx/n' instead on input line .... -LaTeX Font Info: Font shape `OT1/cmtt/bx/n' in size <14.4> not available +LaTeX Font Info: Font shape `OT1/cmtt/bx/sl' in size <14.4> not available (Font) Font shape `OT1/cmtt/m/n' tried instead on input line .... LaTeX Font Info: Font shape `OT1/cmtt/bx/sl' in size <10> not available (Font) Font shape `OT1/cmtt/m/n' tried instead on input line .... @@ -210,4 +208,3 @@ Completed box being shipped out [1] ..\glue(\baselineskip) 30.0 ..\hbox(0.0+0.0)x345.0 (tnfss3.aux) -LaTeX Font Warning: Some font shapes were not available, defaults substituted. From d1a2cdccea498132c33583654c692e52d0e7b522 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Mon, 7 Oct 2019 09:54:13 +0200 Subject: [PATCH 02/55] one more update needed --- base/testfiles/tl2e3.tlg | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/base/testfiles/tl2e3.tlg b/base/testfiles/tl2e3.tlg index 2e356ffc9..a3dc7aee0 100644 --- a/base/testfiles/tl2e3.tlg +++ b/base/testfiles/tl2e3.tlg @@ -22,9 +22,7 @@ LaTeX Font Warning: Font shape `OT1/cmss/m/sc' in size <8> not available (Font) Font shape `OT1/cmr/m/sc' tried instead on input line .... LaTeX Font Warning: Font shape `OT1/cmss/m/sc' in size <14.4> not available (Font) Font shape `OT1/cmr/m/sc' tried instead on input line .... -LaTeX Font Warning: Font shape `OT1/cmtt/bx/sl' undefined -(Font) using `OT1/cmtt/bx/n' instead on input line .... -LaTeX Font Info: Font shape `OT1/cmtt/bx/n' in size <14.4> not available +LaTeX Font Info: Font shape `OT1/cmtt/bx/sl' in size <14.4> not available (Font) Font shape `OT1/cmtt/m/n' tried instead on input line .... LaTeX Font Info: Font shape `OT1/cmtt/bx/sl' in size <10> not available (Font) Font shape `OT1/cmtt/m/n' tried instead on input line .... @@ -210,4 +208,3 @@ Completed box being shipped out [1] ..\glue(\baselineskip) 30.0 ..\hbox(0.0+0.0)x345.0 (tl2e3.aux) -LaTeX Font Warning: Some font shapes were not available, defaults substituted. From 1811d99e2d6530e9104ba8100615ec9276099202 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Mon, 7 Oct 2019 10:36:15 +0200 Subject: [PATCH 03/55] t1lmr.fd no longer available if search is not enabled --- base/build.lua | 2 +- base/config-search.lua | 8 ++++++++ base/doc/ltnews31.tex | 16 ++++++++++++++++ .../tlb-nfssaxes-001.lvt | 0 .../tlb-nfssaxes-001.tlg | 0 .../tlb-nfssaxes-002.lvt | 0 .../tlb-nfssaxes-002.tlg | 0 7 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 base/config-search.lua rename base/{testfiles => testfiles-search}/tlb-nfssaxes-001.lvt (100%) rename base/{testfiles => testfiles-search}/tlb-nfssaxes-001.tlg (100%) rename base/{testfiles => testfiles-search}/tlb-nfssaxes-002.lvt (100%) rename base/{testfiles => testfiles-search}/tlb-nfssaxes-002.tlg (100%) diff --git a/base/build.lua b/base/build.lua index f4c5de39c..508cda383 100644 --- a/base/build.lua +++ b/base/build.lua @@ -139,7 +139,7 @@ unpackdeps = { } indexstyle = "source2e.ist" -- Allow for TU test -checkconfigs = {"build","config-TU"} +checkconfigs = {"build","config-TU","config-search"} update_tag = update_tag_base diff --git a/base/config-search.lua b/base/config-search.lua new file mode 100644 index 000000000..49d8de25a --- /dev/null +++ b/base/config-search.lua @@ -0,0 +1,8 @@ +-- Test with search tree enabled + +-- checkengines = {"etex" } -- use all engines + +checksearch = true +testfiledir = "./testfiles-search" + +testsuppdir = testfiledir .. "/support" diff --git a/base/doc/ltnews31.tex b/base/doc/ltnews31.tex index 2a8eeb185..d92188dab 100644 --- a/base/doc/ltnews31.tex +++ b/base/doc/ltnews31.tex @@ -144,6 +144,22 @@ \section{Experiences with the \LaTeX\texttt{-dev} formats} +\section{Extending the shape management with NFSS} + +\emph{write} + + + +\section{Extending the series management with NFSS} + +\emph{write} + + + +\section{Emphasis handling generalized} + +\emph{write} + diff --git a/base/testfiles/tlb-nfssaxes-001.lvt b/base/testfiles-search/tlb-nfssaxes-001.lvt similarity index 100% rename from base/testfiles/tlb-nfssaxes-001.lvt rename to base/testfiles-search/tlb-nfssaxes-001.lvt diff --git a/base/testfiles/tlb-nfssaxes-001.tlg b/base/testfiles-search/tlb-nfssaxes-001.tlg similarity index 100% rename from base/testfiles/tlb-nfssaxes-001.tlg rename to base/testfiles-search/tlb-nfssaxes-001.tlg diff --git a/base/testfiles/tlb-nfssaxes-002.lvt b/base/testfiles-search/tlb-nfssaxes-002.lvt similarity index 100% rename from base/testfiles/tlb-nfssaxes-002.lvt rename to base/testfiles-search/tlb-nfssaxes-002.lvt diff --git a/base/testfiles/tlb-nfssaxes-002.tlg b/base/testfiles-search/tlb-nfssaxes-002.tlg similarity index 100% rename from base/testfiles/tlb-nfssaxes-002.tlg rename to base/testfiles-search/tlb-nfssaxes-002.tlg From 6d5c9f567a5814c50f23d13caf767591e1622368 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Mon, 7 Oct 2019 11:19:28 +0200 Subject: [PATCH 04/55] mumble ... a leftover \CheckSum --- base/cmfonts.fdd | 1 - 1 file changed, 1 deletion(-) diff --git a/base/cmfonts.fdd b/base/cmfonts.fdd index 00aa2ed64..a016cb814 100644 --- a/base/cmfonts.fdd +++ b/base/cmfonts.fdd @@ -26,7 +26,6 @@ % extension .ins) which are part of the distribution. % % \fi -% \CheckSum{295} % %\iffalse This is a META comment % From 1d36e80c7fbf8c53a55a8e133114997a920eaa11 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Mon, 7 Oct 2019 14:04:51 +0200 Subject: [PATCH 05/55] Testing for an empty arguments is dangerous ... --- base/nfssaxes.tex | 11 ++++++--- base/testfiles-search/tlb-nfssaxes-003.lvt | 26 ++++++++++++++++++++++ base/testfiles-search/tlb-nfssaxes-003.tlg | 4 ++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 base/testfiles-search/tlb-nfssaxes-003.lvt create mode 100644 base/testfiles-search/tlb-nfssaxes-003.tlg diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index a747f6fde..380840e50 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -136,13 +136,18 @@ % This now defines the new \cs{f@series}: % \begin{macrocode} \def\merge@font@series@#1#2#3\@nil{% + \def\@reserveda{#3}% \edef\f@series{% % \end{macrocode} % If the third argument is empty there is no database entry for the % combination and the second argument holds the new series so we % return that. +% +% Originally the test was simply \verb=\ifx!#3!= but that actually +% dies if \texttt{\#3} starts with a conditional and in the +% definition of \cs{AmSfont} that is actually the case. % \begin{macrocode} - \ifx!#3!% + \ifx\@reserveda\@empty #2% \else % \end{macrocode} @@ -182,7 +187,6 @@ - % \section{Changing the shape} % % Rules for managing shapes (i.e., essentially building in an ``sc'' @@ -328,8 +332,9 @@ % Same game now, except that we look at shapes not series values. % \begin{macrocode} \def\merge@font@shape@#1#2#3\@nil{% + \def\@reserveda{#3}% \edef\f@shape{% - \ifx!#3!% + \ifx\@reserveda\@empty #2% \else \expandafter \ifx diff --git a/base/testfiles-search/tlb-nfssaxes-003.lvt b/base/testfiles-search/tlb-nfssaxes-003.lvt new file mode 100644 index 000000000..334f8e098 --- /dev/null +++ b/base/testfiles-search/tlb-nfssaxes-003.lvt @@ -0,0 +1,26 @@ +\documentclass{article} + +\input{test2e} + + +\def\showresult#1#2{#2\typeout{\detokenize{#2} -> \csname f@#1\endcsname}} + + +\begin{document} + +\START + +% as used in the definition of \AmSfont + +\makeatletter + +\showresult{series}{\usefont{OMS}{cmsy}{\if\expandafter\@car\f@series\@nil bb\else m\fi}{n}} + +\fontseries{bx}\selectfont + +\showresult{series}{\usefont{OMS}{cmsy}{\if\expandafter\@car\f@series\@nil bb\else m\fi}{n}} + + + + +\stop diff --git a/base/testfiles-search/tlb-nfssaxes-003.tlg b/base/testfiles-search/tlb-nfssaxes-003.tlg new file mode 100644 index 000000000..a448558c4 --- /dev/null +++ b/base/testfiles-search/tlb-nfssaxes-003.tlg @@ -0,0 +1,4 @@ +This is a generated file for the LaTeX2e validation system. +Don't change this file in any respect. +\usefont {OMS}{cmsy}{\if \expandafter \@car \f@series \@nil bb\else m\fi }{n} -> m +\usefont {OMS}{cmsy}{\if \expandafter \@car \f@series \@nil bb\else m\fi }{n} -> b From 9c9fc68b48274f2cb2ab4570c36de746041fec26 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Mon, 7 Oct 2019 23:49:30 +0200 Subject: [PATCH 06/55] implementing mweights.sty (more or less) --- base/nfssaxes.tex | 223 ++++++++++++++++++++++++++++++++++++- base/testfiles/tlb0130.lvt | 2 +- 2 files changed, 223 insertions(+), 2 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 380840e50..03c4f7dea 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -359,7 +359,7 @@ % \section{Supporting nested emphasis} - +% % By default \LaTeXe{} supports two levels of nested emphasis: if % the current font has an upright shape then it switches to % \cs{itshape} otherwise to \cs{eminnershape} (which defaults to @@ -521,3 +521,224 @@ +% \section{Custom series settings for main document families} +% +% One problem with the \NFSS{} approach of handling the series axis +% turned out to be that (especially with respect to ``boldness'') +% different font families implemented different strategies. For +% example, with Computer Modern fonts you normally only have +% \texttt{bx} whereas most PostScript fonts offered only \texttt{b} +% but not \texttt{bx}. As a result \LaTeX's standard setting for +% \cs{bfdefault} didn't work with such fonts, but if it got changed +% to produce \texttt{b}, then that didn't work with Computer Modern +% if the fonts got combined (e.g., using Computer Modern Typewriter +% with such fonts). +% +% The solution back then was to provide substitution rules in the +% font \textt{.fd} such that if a \texttt{bx} series got requested +% the \texttt{b} series got used. While this works in that +% particular case, it isn't a very +% general solution. For example, if you happen to have a font family that +% has several weights you may want to typeset the whole document +% in a somewhat lighter or darker font but if you then modify +% \cs{mddefault} to allow for this, then of course your change only +% works with that particular family but not with the typewriter +% or sans serif family you also want to use. +% +% A better solution was provided by the \texttt{mweights} package by +% Bob Tennent that offers defaults on the level of the three main +% font families in the document: for ``rm'', ``sf'' and ``tt'' so +% that font packages could define defaults for the sans serif +% document font by providing \cs{bfseries@sf} which then was used +% when \cs{bfseries} got executed and the current family was the +% \cs{sffamily}. +% +% \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 +% arguments: +% \begin{description} +% \item[document family interface:] Can either be \texttt{rm}, +% \texttt{sf} or \texttt{tt}. +% \item[document series interface:] Can be \textt{md} or +% \texttt{bf}. +% \item[series value:] This is the value that is going to be used +% with the combination is requested. +% \end{description} +% +% For example, \verb=DeclareFontSeriesDefault{rm}{bf}{sb}= would +% use \texttt{sb} (semi-bold) when \cs{rmfamily} \cs{bfseries} is +% asked for. + +% \begin{macro}{\DeclareFontSeriesDefault} +% +% \begin{macrocode} +\def\DeclareFontSeriesDefault#1#2#3{% + \ifcsname #2series@#1\endcsname % supported are + % \[md/bf]series@[rm/sf/tt] + \expandafter\edef + \csname #2series@#1\endcsname{#3}% + \else + \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% + {First argument must be 'rm', 'sf', or 'tt'. \MessageBreak + Second argument must be 'md' or 'bf'.} + \fi +} +% \end{macrocode} +% \end{macro} + + + + + +\def\mweights@init{% + \edef\rmdef@ult{\rmdefault}% + \edef\sfdef@ult{\sfdefault}% + \edef\ttdef@ult{\ttdefault}% + \edef\bfdef@ult{\bfdefault}% + \edef\mddef@ult{\mddefault}% + \edef\famdef@ult{\familydefault}% +} + + +% We initialize things at the end of the format. Later on they may +% get overwritten in the preamble or a package +% \cs{DeclareFontSeriesDefault}. + +\edef\mdseries@rm{\mddefault} +\edef\bfseries@rm{\bfdefault} +\edef\mdseries@sf{\mddefault} +\edef\bfseries@sf{\bfdefault} +\edef\mdseries@tt{\mddefault} +\edef\bfseries@tt{\bfdefault} + +\AtBeginDocument{% + \mweights@init +% \end{macrocode} +% +% \begin{macrocode} + \ifx\famdef@ult\rmdef@ult \rmfamily + \else\ifx\famdef@ult\sfdef@ult \sffamily + \else\ifx\famdef@ult\ttdef@ult \ttfamily + \fi\fi\fi +}% + + +\DeclareRobustCommand\bfseries{% + \mweights@init + \not@math@alphabet\bfseries\mathbf + \fontseries{% + \ifx\f@family\rmdef@ult + \bfseries@rm + \else + \ifx\f@family\sfdef@ult + \bfseries@sf + \else + \ifx\f@family\ttdef@ult + \bfseries@tt + \else + \bfdefault + \fi + \fi + \fi + }% + \selectfont +} + + +\DeclareRobustCommand\mdseries{% + \mweights@init + \not@math@alphabet\mdseries\relax + \fontseries{% + \ifx\f@family\rmdef@ult + \mdseries@rm + \else + \ifx\f@family\sfdef@ult + \mdseries@sf + \else + \ifx\f@family\ttdef@ult + \mdseries@tt + \else + \mddefault + \fi + \fi + \fi + }% + \selectfont +} + + +\DeclareRobustCommand\rmfamily{% + \mweights@init + \not@math@alphabet\rmfamily\mathrm + % change the current series before changing the family + \ifx\f@family\sfdef@ult + \ifx\f@series\mdseries@sf \fontseries\mdseries@rm + \else\ifx\f@series\bfseries@sf \fontseries\bfseries@rm + \else\ifx\f@series\mddef@ult \fontseries\mdseries@rm + \else\ifx\f@series\bfdef@ult \fontseries\bfseries@rm + \fi\fi\fi\fi +% + \else\ifx\f@family\ttdef@ult + \ifx\f@series\mdseries@tt \fontseries\mdseries@rm + \else\ifx\f@series\bfseries@tt \fontseries\bfseries@rm + \else\ifx\f@series\mddef@ult \fontseries\mdseries@rm + \else\ifx\f@series\bfdef@ult \fontseries\bfseries@rm + \fi\fi\fi\fi +% + \fi\fi + \fontfamily\rmdefault\selectfont} + + +\DeclareRobustCommand\sffamily{% + \mweights@init + \not@math@alphabet\sffamily\mathsf + % change the current series before changing the family + \ifx\f@family\rmdef@ult + \ifx\f@series\mdseries@rm \fontseries\mdseries@sf + \else\ifx\f@series\bfseries@rm \fontseries\bfseries@sf + \else\ifx\f@series\mddef@ult \fontseries\mdseries@sf + \else\ifx\f@series\bfdef@ult \fontseries\bfseries@sf + \fi\fi\fi\fi +% + \else\ifx\f@family\ttdef@ult + \ifx\f@series\mdseries@tt \fontseries\mdseries@sf + \else\ifx\f@series\bfseries@tt \fontseries\bfseries@sf + \else\ifx\f@series\mddef@ult \fontseries\mdseries@sf + \else\ifx\f@series\bfdef@ult \fontseries\bfseries@sf + \fi\fi\fi\fi +% + \fi\fi + \fontfamily\sfdefault\selectfont} + + +\DeclareRobustCommand\ttfamily{% + \mweights@init + \not@math@alphabet\ttfamily\mathtt + % change the current series before changing the family + \ifx\f@family\rmdef@ult + \ifx\f@series\mdseries@rm \fontseries\mdseries@tt + \else\ifx\f@series\bfseries@rm \fontseries\bfseries@tt + \else\ifx\f@series\mddef@ult \fontseries\mdseries@tt + \else\ifx\f@series\bfdef@ult \fontseries\bfseries@tt + \fi\fi\fi\fi +% + \else\ifx\f@family\rmdef@ult + \ifx\f@series\mdseries@rm \fontseries\mdseries@tt + \else\ifx\f@series\bfseries@rm \fontseries\bfseries@tt + \else\ifx\f@series\mddef@ult \fontseries\mdseries@tt + \else\ifx\f@series\bfdef@ult \fontseries\bfseries@tt + \fi\fi\fi\fi +% + \fi\fi + \fontfamily\ttdefault\selectfont} + + + +% pretend that mweights already got loaded \ldots + +\expandafter\let\csname ver@mweights.sty\endcsname\fmtversion + + +% ^^A Possible issue with tudscr.cls -- needs checking diff --git a/base/testfiles/tlb0130.lvt b/base/testfiles/tlb0130.lvt index 54c52da85..76ca3ce49 100644 --- a/base/testfiles/tlb0130.lvt +++ b/base/testfiles/tlb0130.lvt @@ -47,13 +47,13 @@ \setlength{\textheight}{22cm} \pagestyle{empty} + \OMIT \begin{document} \TIMO -\makeatletter $\psi_{n'}^{k}$ From 0d36068bf94717b5f41373519dd66ef0f5f01479 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Tue, 8 Oct 2019 14:07:50 +0200 Subject: [PATCH 07/55] mainly more documentation --- base/nfssaxes.tex | 369 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 285 insertions(+), 84 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 03c4f7dea..be535da69 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -27,19 +27,24 @@ % \end{macrocode} % \end{macro} % -% \subsection{Mappin rules for series changes} +% \subsection{Mapping rules for series changes} % % The rules set up use explicit series values not \cs{..default} % indirections; my current feeling is that this is in fact better. % % With 9 weights and 9 width classes this table is getting a bit large % in the end (324 entries) but on the other hand it doesn't change and -% accessing speed and it is not \emph{that} large. +% accessing speed and it is fast this way. % -% \emph{What is missing so far, is a way to state that I want to revert, say -% the weight to ``regular'' but keep the width or vize versa. That -% would probably need a new letter due to the double use of ``m''. --- -% not quite sure what I meant when I wrote that sentence!} +% We could alternatively split the axis and maintain weight and width +% separately, but that would take more processing time and would not +% allow for setting up explicit exceptions nicely (not sure that that +% would ever get used though). +% +% \emph{What is missing, is a way to state on document level that one +% wants to revert, say, the weight to ``regular'' but keep the width +% or vize versa. But maybe this is overkill and \cs{bfseries} and +% \cs{mdseries} is all that people need in practice.} % % \begin{macrocode} \DeclareFontSeriesChangeRule {m}{c} {c} {m} @@ -356,6 +361,53 @@ % \end{macro} +% This code implements one aspect of what the package \pkg{fontaxes} +% provide. So its redefinitions for the vairous shape commands, +% such as \cs{itshape} should no longer happen. +% +% For initial testing we simply undo them at begin document, but of +% course the correct way would be to update that package to simply +% use the kernel functionality when running with a new kernel. +% +% \begin{macrocode} +\AtBeginDocument{% +% \end{macrocode} +% I use \cs{protected} here not \cs{DeclareRobustCommand} to avoid +% extra status lines that would change test results in the test suite. +% \begin{macrocode} + \protected\def\upshape + {\not@math@alphabet\upshape\relax + \fontshape\updefault\selectfont}% + \protected\def\slshape + {\not@math@alphabet\slshape\relax + \fontshape\sldefault\selectfont}% + \protected\def\scshape + {\not@math@alphabet\scshape\relax + \fontshape\scdefault\selectfont}% + \protected\def\itshape + {\not@math@alphabet\itshape\mathit + \fontshape\itdefault\selectfont}% + \protected\def\ulcshape + {\not@math@alphabet\ulcshape\relax + \fontshape{ulc}\selectfont}% +} +% \end{macrocode} +% +% The \pkg{fontaxes} package also implements two further shapes, +% namely \cs{swshape} and \cs{sscshape}. They could now easily be +% integrated by specifying a few further table entries such as +% \begin{macrocode} +%\DeclareFontShapeChangeRule {n}{sw} {sw} {n} +%\DeclareFontShapeChangeRule {it}{sw} {sw} {it} +%\DeclareFontShapeChangeRule {sc}{sw} {scsw} {sc} +% ... +% \end{macrocode} +% Again that should happen directly in \pkg{fontaxes} or maybe +% directly in the kernel (even though there are currently only a few fonts +% that support swash letters or ``spaced small capitals''). +% + + % \section{Supporting nested emphasis} @@ -560,29 +612,63 @@ % arguments: % \begin{description} % \item[document family interface:] Can either be \texttt{rm}, -% \texttt{sf} or \texttt{tt}. +% \texttt{sf} or \texttt{tt}. This is optional and if not given the +% overall default. % \item[document series interface:] Can be \textt{md} or % \texttt{bf}. % \item[series value:] This is the value that is going to be used % with the combination is requested. % \end{description} % -% For example, \verb=DeclareFontSeriesDefault{rm}{bf}{sb}= would +% For example, \verb=\DeclareFontSeriesDefault[rm]{bf}{sb}= would % use \texttt{sb} (semi-bold) when \cs{rmfamily} \cs{bfseries} is % asked for. - +% +% If used without the optional argument, e.g., +% \verb=\DeclareFontSeriesDefault{bf}{b}= then this is like +% redefining \cs{bfdefault} or \cs{mddefault}. +% +% If some family specify defaults aren't given, e.g. if there are +% no declarations for, say, \textttt{tt} then the format defaults +% of \cs{mddefault} and \cs{bfdefault} are assumed. If those are +% later changed this is \emph{not} reflected!\footnote{I see no +% easy way to achieve this without compromising compatibility with +% existing packages that currently use \pkg{mweights} and directly +% define (some) of the \cs{mdseries@..} commands but not others.} +% +% +% % \begin{macro}{\DeclareFontSeriesDefault} -% +% The command to declare font series defaults for the ``rm'', ``sf'' or +% ``tt'' family. +% \begin{macrocode} +\newcommand\DeclareFontSeriesDefault[3][]{% + \def\@reserveda{#1}% +% \end{macrocode} +% No optional argument: set up general default. +% \begin{macrocode} + \ifx\@resereda\@empty + \ifcsname #2series\endcsname % supported are + % \[md/bf]default + \expandafter\def + \csname #2default\endcsname{#3}% + \else + \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% + {Mandatory first argument must be 'md' or 'bf'.} + \fi +% \end{macrocode} +% Optional argument given, set up specific default. % \begin{macrocode} -\def\DeclareFontSeriesDefault#1#2#3{% - \ifcsname #2series@#1\endcsname % supported are - % \[md/bf]series@[rm/sf/tt] - \expandafter\edef - \csname #2series@#1\endcsname{#3}% \else - \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% - {First argument must be 'rm', 'sf', or 'tt'. \MessageBreak - Second argument must be 'md' or 'bf'.} + \ifcsname #2series@#1\endcsname % supported are + % \[md/bf]series@[rm/sf/tt] + \expandafter\edef + \csname #2series@#1\endcsname{#3}% + \else + \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% + {Optional first argument must be 'rm', 'sf', or 'tt'. \MessageBreak + Second argument must be 'md' or 'bf'.} + \fi \fi } % \end{macrocode} @@ -591,8 +677,44 @@ +% \begin{macro}{\mdseries@rm} +% \begin{macro}{\mdseries@sf} +% \begin{macro}{\mdseries@tt} +% \begin{macro}{\bfseries@rm} +% \begin{macro}{\bfseries@sf} +% \begin{macro}{\bfseries@tt} +% We initialize the family specific defaulst at the end of the +% format generation. Later on they may get overwritten in the +% preamble or a package via \cs{DeclareFontSeriesDefault} (or +% possibly directly). +% \begin{macrocode} +\edef\mdseries@rm{\mddefault} +\edef\bfseries@rm{\bfdefault} +\edef\mdseries@sf{\mddefault} +\edef\bfseries@sf{\bfdefault} +\edef\mdseries@tt{\mddefault} +\edef\bfseries@tt{\bfdefault} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} + + -\def\mweights@init{% +% \begin{macro}{\expand@font@defaults} +% +% The family specific defaults are fully expanded, i.e., they are +% defined via \cs{edef} inside \cs{DeclareFontSeriesDefault}. +% However, the overall defaults, e.g., \cs{bfdefault} may have been +% redefined by the user and thus may not be fully expanded. So to +% enable reliable comparison we make expanded versions of +% them. That we rerun each time. The alternative would be to only +% allow for changes before begin document. +% \begin{macrocode} +\def\expand@font@defaults{% \edef\rmdef@ult{\rmdefault}% \edef\sfdef@ult{\sfdefault}% \edef\ttdef@ult{\ttdefault}% @@ -600,145 +722,224 @@ \edef\mddef@ult{\mddefault}% \edef\famdef@ult{\familydefault}% } - - -% We initialize things at the end of the format. Later on they may -% get overwritten in the preamble or a package -% \cs{DeclareFontSeriesDefault}. - -\edef\mdseries@rm{\mddefault} -\edef\bfseries@rm{\bfdefault} -\edef\mdseries@sf{\mddefault} -\edef\bfseries@sf{\bfdefault} -\edef\mdseries@tt{\mddefault} -\edef\bfseries@tt{\bfdefault} - -\AtBeginDocument{% - \mweights@init % \end{macrocode} -% +% % \begin{macrocode} - \ifx\famdef@ult\rmdef@ult \rmfamily - \else\ifx\famdef@ult\sfdef@ult \sffamily - \else\ifx\famdef@ult\ttdef@ult \ttfamily - \fi\fi\fi -}% +\expand@font@defaults +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\bfseries} +% This document command switches to the bold series. +% \begin{macrocode} \DeclareRobustCommand\bfseries{% - \mweights@init \not@math@alphabet\bfseries\mathbf +% \end{macrocode} +% In the original \NFSS{} definition it then called \cs{fontseries} +% with the value \cs{bfdefault}. In the new scheme we have more +% alternatives and therefore check if the current family +% (\cs{f@family}) is the current \cs{rmdef@ult}, \cs{sfdef@ult} or +% \cs{ttdef@ult} and the select the correct family default in that case. +% \begin{macrocode} + \expand@font@defaults \fontseries{% - \ifx\f@family\rmdef@ult - \bfseries@rm - \else - \ifx\f@family\sfdef@ult - \bfseries@sf - \else - \ifx\f@family\ttdef@ult - \bfseries@tt - \else - \bfdefault - \fi - \fi - \fi + \ifx\f@family\rmdef@ult \bfseries@rm + \else\ifx\f@family\sfdef@ult \bfseries@sf + \else\ifx\f@family\ttdef@ult \bfseries@tt +% \end{macrocode} +% If not \cs{bfdefault} is used. +% \begin{macrocode} + \else \bfdefault + \fi\fi\fi }% \selectfont } +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\mdseries} +% This document command switches to the medium series. +% \begin{macrocode} \DeclareRobustCommand\mdseries{% - \mweights@init \not@math@alphabet\mdseries\relax + \expand@font@defaults \fontseries{% - \ifx\f@family\rmdef@ult - \mdseries@rm - \else - \ifx\f@family\sfdef@ult - \mdseries@sf - \else - \ifx\f@family\ttdef@ult - \mdseries@tt - \else - \mddefault - \fi - \fi - \fi + \ifx\f@family\rmdef@ult \mdseries@rm + \else\ifx\f@family\sfdef@ult \mdseries@sf + \else\ifx\f@family\ttdef@ult \mdseries@tt + \else \mddefault + \fi\fi\fi }% \selectfont } +% \end{macrocode} +% \end{macro} +% \begin{macro}{\rmfamily} +% Here are the document level commands for changing the main font +% families. +% \begin{macrocode} \DeclareRobustCommand\rmfamily{% - \mweights@init \not@math@alphabet\rmfamily\mathrm % change the current series before changing the family +% \end{macrocode} +% If families are changed then we have to do a bit more work. +% In the original \NFSS implementation +% a family change kept encoding, series shape and size unchanged +% but now we can't any +% longer simply reuse the current series value. Instead we may have +% to change it from one family default to the next. +% \begin{macrocode} + \expand@font@defaults +% \end{macrocode} +% Thus, if the current family is the sans family +% \begin{macrocode} \ifx\f@family\sfdef@ult - \ifx\f@series\mdseries@sf \fontseries\mdseries@rm +% \end{macrocode} +% and if we using the medium series of the sans family +% \begin{macrocode} + \ifx\f@series\mdseries@sf +% \end{macrocode} +% then lets switch to the medium series for the serif family +% \begin{macrocode} + \fontseries\mdseries@rm +% \end{macrocode} +% and if we use the bold series of the sans family switch to the +% bold default of the serif family: +% \begin{macrocode} \else\ifx\f@series\bfseries@sf \fontseries\bfseries@rm +% \end{macrocode} +% However, the sans family may not have any specific defaults set, +% so we also compare with the verall defaults. +% \begin{macrocode} \else\ifx\f@series\mddef@ult \fontseries\mdseries@rm \else\ifx\f@series\bfdef@ult \fontseries\bfseries@rm +% \end{macrocode} +% If neither test was true we leave the series alone. This way a +% special manual setting such as \verb=\fontseries{lc}= is not +% undone if the family changes (of course there may not be any +% support for it in the new family but then the \NFSS{} +% substitution kicks in and sorts it out). +% \begin{macrocode} \fi\fi\fi\fi % +% \end{macrocode} +% We need to do the same if the current family is the typewriter family: +% \begin{macrocode} \else\ifx\f@family\ttdef@ult \ifx\f@series\mdseries@tt \fontseries\mdseries@rm \else\ifx\f@series\bfseries@tt \fontseries\bfseries@rm \else\ifx\f@series\mddef@ult \fontseries\mdseries@rm \else\ifx\f@series\bfdef@ult \fontseries\bfseries@rm \fi\fi\fi\fi -% +% \end{macrocode} +% +% \begin{macrocode} \fi\fi +% \end{macrocode} +% With these preparations for series out of the way we can now +% change the font family to \cs{rmdefault}. +% \begin{macrocode} \fontfamily\rmdefault\selectfont} - - +% \end{macrocode} +% +% \begin{macro}{\sffamily} +% \begin{macro}{\ttfamily} +% The definitions for \cs{sffamily} and \cs{ttfamily} are similar, +% the differences are only in what font families get checked. +% \begin{macrocode} \DeclareRobustCommand\sffamily{% - \mweights@init \not@math@alphabet\sffamily\mathsf - % change the current series before changing the family + \expand@font@defaults \ifx\f@family\rmdef@ult \ifx\f@series\mdseries@rm \fontseries\mdseries@sf \else\ifx\f@series\bfseries@rm \fontseries\bfseries@sf \else\ifx\f@series\mddef@ult \fontseries\mdseries@sf \else\ifx\f@series\bfdef@ult \fontseries\bfseries@sf \fi\fi\fi\fi -% \else\ifx\f@family\ttdef@ult \ifx\f@series\mdseries@tt \fontseries\mdseries@sf \else\ifx\f@series\bfseries@tt \fontseries\bfseries@sf \else\ifx\f@series\mddef@ult \fontseries\mdseries@sf \else\ifx\f@series\bfdef@ult \fontseries\bfseries@sf \fi\fi\fi\fi -% \fi\fi \fontfamily\sfdefault\selectfont} - - +% \end{macrocode} +% +% \begin{macrocode} \DeclareRobustCommand\ttfamily{% - \mweights@init \not@math@alphabet\ttfamily\mathtt - % change the current series before changing the family + \expand@font@defaults \ifx\f@family\rmdef@ult \ifx\f@series\mdseries@rm \fontseries\mdseries@tt \else\ifx\f@series\bfseries@rm \fontseries\bfseries@tt \else\ifx\f@series\mddef@ult \fontseries\mdseries@tt \else\ifx\f@series\bfdef@ult \fontseries\bfseries@tt \fi\fi\fi\fi -% \else\ifx\f@family\rmdef@ult \ifx\f@series\mdseries@rm \fontseries\mdseries@tt \else\ifx\f@series\bfseries@rm \fontseries\bfseries@tt \else\ifx\f@series\mddef@ult \fontseries\mdseries@tt \else\ifx\f@series\bfdef@ult \fontseries\bfseries@tt \fi\fi\fi\fi -% \fi\fi \fontfamily\ttdefault\selectfont} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} + + + + + + +% \begin{macro}{\AtBeginDocument} +% +% If the document preamble has changed the \cs{familydefault} or if the +% if the \cs{rmdefault} contains a new font family, we have to +% adjust the series defaults accordingly, before starting typesetting. So we run \cs{rmfamily}, +% \cs{sffamily} or \cs{ttfamily} depending on the situation which +% does that (as a sideeffect) for us. +% \begin{macrocode} +\AtBeginDocument{% + \expand@font@defaults +% \end{macrocode} +% +% \begin{macrocode} + \ifx\famdef@ult\rmdef@ult \rmfamily + \else\ifx\famdef@ult\sfdef@ult \sffamily + \else\ifx\famdef@ult\ttdef@ult \ttfamily + \fi\fi\fi +}% +% \end{macrocode} +% \end{macro} -% pretend that mweights already got loaded \ldots + +% As the kernel code now implements the same functionality as +% \pkg{mweights}, albeit internally coded slightly differently, +% that package shouldn't be loaded any more. We therefore pretend +% that it already got loaded. Thus, a font package that tries to +% load it and then sets \cs{mdseries@..}, etc.\ will continue to +% work but will now use the kernel code. +% +% Of course, mid-term such package should probably use +% \cs{DeclareFontSeriesDefault} instead of making using low-level +% definitions. +% +% \begin{macrocode} \expandafter\let\csname ver@mweights.sty\endcsname\fmtversion +% \end{macrocode} + % ^^A Possible issue with tudscr.cls -- needs checking From 81f6a3a362e4ca474aee3039c399e3c056780e6b Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Tue, 8 Oct 2019 16:09:15 +0200 Subject: [PATCH 08/55] added swshape (but not yet sscshape) --- base/nfssaxes.tex | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index be535da69..d9afb89c3 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -225,6 +225,7 @@ % and I think that needs to be preserved. % % \begin{macro}{\ulcshape} +% \begin{macro}{\textulc} % To request going back to upper/lowercase we need a new % command. It uses \texttt{ulc} as shape name but this shape is % virtual, i.e., it doesn't exist as a real shape, it is only used @@ -237,6 +238,39 @@ \DeclareTextFontCommand{\textulc}{\ulcshape} % back to upper/lower case % \end{macrocode} % \end{macro} +% \end{macro} +% +% \begin{macro}{\swshape} +% \begin{macro}{\textsw} +% \begin{macro}{\swdefault} +% New command to select swash shape. +% \begin{macrocode} +\DeclareRobustCommand\swshape + {\not@math@alphabet\swshape\relax + \fontshape\swdefault\selectfont} +\DeclareTextFontCommand{\textsw}{\swshape} +\newcommand\swdefault{sw} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% +% \begin{macro}{\sscshape} +% \begin{macro}{\textssc} +% \begin{macro}{\sscdefault} +% New command to select spaced small capitals. +% \begin{macrocode} +\DeclareRobustCommand\sscshape + {\not@math@alphabet\sscshape\relax + \fontshape\sscdefault\selectfont} +\DeclareTextFontCommand{\textssc}{\sscshape} +\newcommand\sscdefault{ssc} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} % % % @@ -246,6 +280,7 @@ \DeclareFontShapeChangeRule {n}{n} {n} {} \DeclareFontShapeChangeRule {n}{it} {it} {sl} \DeclareFontShapeChangeRule {n}{sl} {sl} {it} +\DeclareFontShapeChangeRule {n}{sw} {sw} {} \DeclareFontShapeChangeRule {n}{sc} {sc} {} \DeclareFontShapeChangeRule {n}{ulc} {n} {} % \end{macrocode} @@ -254,6 +289,7 @@ \DeclareFontShapeChangeRule {it}{n} {n} {} \DeclareFontShapeChangeRule {it}{it} {it} {} \DeclareFontShapeChangeRule {it}{sl} {sl} {it} +\DeclareFontShapeChangeRule {it}{sw} {sw} {} \DeclareFontShapeChangeRule {it}{sc} {scit} {scsl} % or sc or it as second default? \DeclareFontShapeChangeRule {it}{ulc} {it} {} % \end{macrocode} @@ -262,6 +298,7 @@ \DeclareFontShapeChangeRule {sl}{n} {n} {} \DeclareFontShapeChangeRule {sl}{it} {it} {sl} \DeclareFontShapeChangeRule {sl}{sl} {sl} {} +\DeclareFontShapeChangeRule {sl}{sw} {sw} {} \DeclareFontShapeChangeRule {sl}{sc} {scsl} {scit} % sc or sl as second default? \DeclareFontShapeChangeRule {sl}{ulc} {sl} {} % \end{macrocode} @@ -270,6 +307,7 @@ \DeclareFontShapeChangeRule {sc}{n} {n} {} \DeclareFontShapeChangeRule {sc}{it} {scit} {scsl} \DeclareFontShapeChangeRule {sc}{sl} {scsl} {scit} +\DeclareFontShapeChangeRule {sc}{sw} {scsw} {sc} % ???? \DeclareFontShapeChangeRule {sc}{sc} {sc} {} \DeclareFontShapeChangeRule {sc}{ulc} {n} {} % \end{macrocode} @@ -278,6 +316,7 @@ \DeclareFontShapeChangeRule {scit}{n} {sc} {} \DeclareFontShapeChangeRule {scit}{it} {scit} {} \DeclareFontShapeChangeRule {scit}{sl} {scsl} {scit} +\DeclareFontShapeChangeRule {scit}{sw} {scsw} {sc} % or scit? \DeclareFontShapeChangeRule {scit}{sc} {scit} {} \DeclareFontShapeChangeRule {scit}{ulc} {it} {} % \end{macrocode} @@ -294,9 +333,19 @@ \DeclareFontShapeChangeRule {scsl}{n} {sc} {} \DeclareFontShapeChangeRule {scsl}{it} {scit} {scsl} \DeclareFontShapeChangeRule {scsl}{sl} {scsl} {} +\DeclareFontShapeChangeRule {scsl}{sw} {scsw} {sc} % or scsl? \DeclareFontShapeChangeRule {scsl}{sc} {scsl} {} \DeclareFontShapeChangeRule {scsl}{ulc} {sl} {} % \end{macrocode} +% +% \begin{macrocode} +\DeclareFontShapeChangeRule {scsw}{n} {sc} {} +\DeclareFontShapeChangeRule {scsw}{it} {scit} {scsw} +\DeclareFontShapeChangeRule {scsw}{sl} {scsl} {} +\DeclareFontShapeChangeRule {scsw}{sw} {scsw} {} +\DeclareFontShapeChangeRule {scsw}{sc} {scsw} {} +\DeclareFontShapeChangeRule {scsw}{ulc} {sw} {} +% \end{macrocode} % By the way, fontspec uses \cs{itscdefault} etc.\ whereas in the From e84bc11c2534d561d4e97a591db77e9488c27c7a Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Tue, 8 Oct 2019 23:40:23 +0200 Subject: [PATCH 09/55] provide substitution info in log --- base/nfssaxes.tex | 91 ++++++++++++---------- base/testfiles-search/tlb-nfssaxes-001.tlg | 10 +++ base/testfiles-search/tlb-nfssaxes-002.tlg | 8 ++ base/testfiles-search/tlb-nfssaxes-003.tlg | 2 + base/testfiles/tl2e3.tlg | 6 ++ base/testfiles/tnfss3.tlg | 6 ++ 6 files changed, 84 insertions(+), 39 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index d9afb89c3..f4177ae99 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -141,8 +141,6 @@ % This now defines the new \cs{f@series}: % \begin{macrocode} \def\merge@font@series@#1#2#3\@nil{% - \def\@reserveda{#3}% - \edef\f@series{% % \end{macrocode} % If the third argument is empty there is no database entry for the % combination and the second argument holds the new series so we @@ -152,40 +150,57 @@ % dies if \texttt{\#3} starts with a conditional and in the % definition of \cs{AmSfont} that is actually the case. % \begin{macrocode} - \ifx\@reserveda\@empty - #2% - \else + \def\@reserveda{#3}% + \ifx\@reserveda\@empty + \edef\f@series{#2}% + \else % \end{macrocode} % Otherwise we check if the desired result for the series % (\texttt{\#1}) exists for the font family and the current shape. % \begin{macrocode} - \expandafter \ifx - \csname \f@encoding /\f@family /#1/\f@shape \endcsname - \relax + \edef\@reserveda{\f@encoding /\f@family /#1/\f@shape}% + \ifcsname \@reserveda \endcsname % \end{macrocode} -% If not, then we try the alternate result (\texttt{\#2}). +% If the desired result is available then we use that: % \begin{macrocode} - \expandafter \ifx - \csname \f@encoding /\f@family /#2/\f@shape \endcsname - \relax + \edef\f@series{#1}% % \end{macrocode} -% If that doesn't exist either, then we use the requested series unmodified. +% If not, then we try the alternate result (\texttt{\#2}). % \begin{macrocode} - #3% + \else + \ifcsname \f@encoding /\f@family /#2/\f@shape \endcsname % \end{macrocode} % If the alternate result exist we use that % \begin{macrocode} - \else - #2% - \fi + \edef\f@series{#2}% + \@font@shape@subst@warning +% \end{macrocode} +% If that doesn't exist either, then we use the requested series unmodified. +% \begin{macrocode} + \else + \edef\f@series{#3}% % \end{macrocode} -% and if the desired result is available then we use that: +% We issue a warning that we didn't managed to change to the desired font. % \begin{macrocode} - \else - #1% - \fi + \@font@shape@subst@warning + \fi \fi -}} + \fi +} +% \end{macrocode} +% It is possible that the previous font and the new one are +% actually identical (and the font wasn not found because it still +% needs loading) in which case a warning would look rather odd. So +% we make a quick check for that (which is the reason why we defined +% \cs{@reserveda} above. +% \begin{macrocode} +\def\@font@shape@subst@warning{% + \edef\@reservedb{\curr@fontshape}% + \ifx\@reserveda\@reservedb \else + \@font@warning{Font shape `\@reserveda' undefined\MessageBreak + using `\@reservedb' instead}% + \fi +} % \end{macrocode} % \end{macro} @@ -387,25 +402,23 @@ % \begin{macrocode} \def\merge@font@shape@#1#2#3\@nil{% \def\@reserveda{#3}% - \edef\f@shape{% - \ifx\@reserveda\@empty - #2% + \ifx\@reserveda\@empty + \edef\f@shape{#2}% + \else + \edef\@reserveda{\f@encoding /\f@family /\f@series/#1}% + \ifcsname \@reserveda\endcsname + \edef\f@shape{#1}% \else - \expandafter \ifx - \csname \f@encoding /\f@family /\f@series/#1\endcsname - \relax - \expandafter \ifx - \csname \f@encoding /\f@family /\f@series/#2\endcsname - \relax - #3% - \else - #2% - \fi - \else - #1% - \fi + \ifcsname \f@encoding /\f@family /\f@series/#2\endcsname + \edef\f@shape{#2}% + \@font@shape@subst@warning + \else + \edef\f@shape{#3}% + \@font@shape@subst@warning + \fi \fi -}} + \fi +} % \end{macrocode} % \end{macro} diff --git a/base/testfiles-search/tlb-nfssaxes-001.tlg b/base/testfiles-search/tlb-nfssaxes-001.tlg index 51ed476fb..b55ce06c5 100644 --- a/base/testfiles-search/tlb-nfssaxes-001.tlg +++ b/base/testfiles-search/tlb-nfssaxes-001.tlg @@ -4,6 +4,8 @@ LaTeX Font Info: Trying to load font information for T1+lmr on input line ... =========== Testing standard shape declarations ========== \upshape -> n \scshape -> sc +LaTeX Font Warning: Font shape `T1/lmr/m/scit' undefined +(Font) using `T1/lmr/m/scsl' instead on input line .... \itshape -> scsl \upshape -> sc \upshape -> n @@ -14,17 +16,25 @@ LaTeX Font Info: Trying to load font information for T1+lmr on input line ... =========== Testing low-level \fontshape declarations ========== \fontshape{n} -> n \fontshape{sc} -> sc +LaTeX Font Warning: Font shape `T1/lmr/m/scit' undefined +(Font) using `T1/lmr/m/scsl' instead on input line .... \fontshape{it} -> scsl \fontshape{sl} -> scsl \fontshape{n} -> sc \fontshape{ulc} -> n =========== Testing low-level \fontseries declarations ========== \fontseries{bx} -> bx +LaTeX Font Warning: Font shape `T1/lmr/lx/n' undefined +(Font) using `T1/lmr/l/n' instead on input line .... \fontseries{l} -> l LaTeX Font Warning: Font shape `T1/lmr/l/n' undefined (Font) using `T1/lmr/m/n' instead on input line .... +LaTeX Font Warning: Font shape `T1/lmr/c/n' undefined +(Font) using `T1/lmr/m/n' instead on input line .... \fontseries{c} -> m \fontseries{m} -> m +LaTeX Font Warning: Font shape `T1/lmr/c/n' undefined +(Font) using `T1/lmr/m/n' instead on input line .... \fontseries{c} -> m \fontseries{b} -> b \fontseries{bx} -> bx diff --git a/base/testfiles-search/tlb-nfssaxes-002.tlg b/base/testfiles-search/tlb-nfssaxes-002.tlg index f76a4045b..d18769cdd 100644 --- a/base/testfiles-search/tlb-nfssaxes-002.tlg +++ b/base/testfiles-search/tlb-nfssaxes-002.tlg @@ -11,17 +11,25 @@ default nesting of emph extended nesting of emph using it,n+sc,it+sc -> it -> sc +LaTeX Font Warning: Font shape `OT1/cmr/m/scit' undefined +(Font) using `OT1/cmr/m/it' instead on input line .... -> it -> n -> it -> sc +LaTeX Font Warning: Font shape `OT1/cmr/m/scit' undefined +(Font) using `OT1/cmr/m/it' instead on input line .... -> it extended nesting of emph using it,n+sc,it+sc in T1/lmr LaTeX Font Info: Trying to load font information for T1+lmr on input line .... -> it -> sc +LaTeX Font Warning: Font shape `T1/lmr/m/scit' undefined +(Font) using `T1/lmr/m/scsl' instead on input line .... -> scsl -> n -> it -> sc +LaTeX Font Warning: Font shape `T1/lmr/m/scit' undefined +(Font) using `T1/lmr/m/scsl' instead on input line .... -> scsl diff --git a/base/testfiles-search/tlb-nfssaxes-003.tlg b/base/testfiles-search/tlb-nfssaxes-003.tlg index a448558c4..c225b5e3c 100644 --- a/base/testfiles-search/tlb-nfssaxes-003.tlg +++ b/base/testfiles-search/tlb-nfssaxes-003.tlg @@ -1,4 +1,6 @@ This is a generated file for the LaTeX2e validation system. Don't change this file in any respect. \usefont {OMS}{cmsy}{\if \expandafter \@car \f@series \@nil bb\else m\fi }{n} -> m +LaTeX Font Warning: Font shape `OMS/cmsy/bx/n' undefined +(Font) using `OMS/cmsy/b/n' instead on input line .... \usefont {OMS}{cmsy}{\if \expandafter \@car \f@series \@nil bb\else m\fi }{n} -> b diff --git a/base/testfiles/tl2e3.tlg b/base/testfiles/tl2e3.tlg index a3dc7aee0..a6e23da22 100644 --- a/base/testfiles/tl2e3.tlg +++ b/base/testfiles/tl2e3.tlg @@ -18,10 +18,16 @@ LaTeX Font Info: Font shape `OT1/cmtt/bx/it' in size <9> not available (Font) Font shape `OT1/cmtt/m/it' tried instead on input line .... LaTeX Font Info: Font shape `OT1/cmtt/bx/it' in size <12> not available (Font) Font shape `OT1/cmtt/m/it' tried instead on input line .... +LaTeX Font Warning: Font shape `OT1/cmr/m/scit' undefined +(Font) using `OT1/cmr/m/sc' instead on input line .... +LaTeX Font Warning: Font shape `OT1/cmr/m/scit' undefined +(Font) using `OT1/cmr/m/it' instead on input line .... LaTeX Font Warning: Font shape `OT1/cmss/m/sc' in size <8> not available (Font) Font shape `OT1/cmr/m/sc' tried instead on input line .... LaTeX Font Warning: Font shape `OT1/cmss/m/sc' in size <14.4> not available (Font) Font shape `OT1/cmr/m/sc' tried instead on input line .... +LaTeX Font Warning: Font shape `OT1/cmtt/m/scsl' undefined +(Font) using `OT1/cmtt/m/sl' instead on input line .... LaTeX Font Info: Font shape `OT1/cmtt/bx/sl' in size <14.4> not available (Font) Font shape `OT1/cmtt/m/n' tried instead on input line .... LaTeX Font Info: Font shape `OT1/cmtt/bx/sl' in size <10> not available diff --git a/base/testfiles/tnfss3.tlg b/base/testfiles/tnfss3.tlg index ba98ddc87..7e98f8a17 100644 --- a/base/testfiles/tnfss3.tlg +++ b/base/testfiles/tnfss3.tlg @@ -19,10 +19,16 @@ LaTeX Font Info: Font shape `OT1/cmtt/bx/it' in size <9> not available (Font) Font shape `OT1/cmtt/m/it' tried instead on input line .... LaTeX Font Info: Font shape `OT1/cmtt/bx/it' in size <12> not available (Font) Font shape `OT1/cmtt/m/it' tried instead on input line .... +LaTeX Font Warning: Font shape `OT1/cmr/m/scit' undefined +(Font) using `OT1/cmr/m/sc' instead on input line .... +LaTeX Font Warning: Font shape `OT1/cmr/m/scit' undefined +(Font) using `OT1/cmr/m/it' instead on input line .... LaTeX Font Warning: Font shape `OT1/cmss/m/sc' in size <8> not available (Font) Font shape `OT1/cmr/m/sc' tried instead on input line .... LaTeX Font Warning: Font shape `OT1/cmss/m/sc' in size <14.4> not available (Font) Font shape `OT1/cmr/m/sc' tried instead on input line .... +LaTeX Font Warning: Font shape `OT1/cmtt/m/scsl' undefined +(Font) using `OT1/cmtt/m/sl' instead on input line .... LaTeX Font Info: Font shape `OT1/cmtt/bx/sl' in size <14.4> not available (Font) Font shape `OT1/cmtt/m/n' tried instead on input line .... LaTeX Font Info: Font shape `OT1/cmtt/bx/sl' in size <10> not available From 8b53f8701a0d32be5a2b08ad7a395a0e6aa1a8e4 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Wed, 9 Oct 2019 14:05:43 +0200 Subject: [PATCH 10/55] correct implementation of \emforce --- base/nfssaxes.tex | 7 ++- base/testfiles-search/tlb-nfssaxes-004.lvt | 73 ++++++++++++++++++++++ base/testfiles-search/tlb-nfssaxes-004.tlg | 49 +++++++++++++++ 3 files changed, 126 insertions(+), 3 deletions(-) create mode 100644 base/testfiles-search/tlb-nfssaxes-004.lvt create mode 100644 base/testfiles-search/tlb-nfssaxes-004.tlg diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index f4177ae99..98ca03c77 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -501,10 +501,11 @@ % In such a case one has to use \cs{emforce} to which directs the % mechanism to use the level even if the font attributes haven't changed. % +% \DecsribeMacro\emreset % If the nesting is so deep, that the specified levels are % exhausted then \cs{emreset} is used as a final set of % declarations (which by default returns -% back to the upright shape). ThisAny additional nesting levels will +% back to the upright shape). Any additional nesting levels will % then reuse the list from its beginning. % @@ -535,7 +536,7 @@ -% \begin{macro}{\emreset} +% \begin{macro}{\emrest} % Reset the font to upright (this needs to undo \texttt{sc} and % \textt{it} separately as \cs{upshape} no longer resets both in % one go). @@ -608,7 +609,7 @@ % If the test fails we are done and the declarations will be used. % Otherwise we will try the next declaration in the sequence. % \begin{macrocode} - \expandafter\ifx\csname\curr@fontshape/\f@size\em@force\endcsname\em@currfont + \expandafter\ifx\csname\curr@fontshape/\f@size\em@force\expandafter\endcsname\em@currfont \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update % \end{macrocode} % If \cs{emforce} was used, we have to undo its effect: diff --git a/base/testfiles-search/tlb-nfssaxes-004.lvt b/base/testfiles-search/tlb-nfssaxes-004.lvt new file mode 100644 index 000000000..740bf0f4b --- /dev/null +++ b/base/testfiles-search/tlb-nfssaxes-004.lvt @@ -0,0 +1,73 @@ +\documentclass{article} + +\input{test2e} + +\usepackage{color} + +\makeatletter +\def\showresult#1#2{#2\typeout{\detokenize{#2} -> \csname f@#1\endcsname}} +\def\showfont{\typeout{\f@encoding/\f@family/\f@series/\f@shape}} +\makeatother + +\begin{document} + +\START + +\typeout{========== std LaTeX ==========} +\emph{\showfont First +\emph{\showfont second +\emph{\showfont third +\emph{\showfont fourth +\emph{\showfont fifth}}}}} + +\typeout{========== it, sc, scit ==========} +\emfontdeclare{\itshape,\upshape\scshape,\itshape} +\emph{\showfont First +\emph{\showfont second +\emph{\showfont third +\emph{\showfont fourth +\emph{\showfont fifth}}}}} + + +\typeout{========== it, sc, scit, but with supported font ==========} +\fontfamily{qpl}\selectfont +\emfontdeclare{\itshape,\upshape\scshape,\itshape} +\emph{\showfont First +\emph{\showfont second +\emph{\showfont third +\emph{\showfont fourth +\emph{\showfont fifth}}}}} + + + +\typeout{========== it, sc, scit, but it already in force ==========} +\emfontdeclare{\itshape,\upshape\scshape,\itshape} +\textit{% italics already in force +\emph{\showfont First +\emph{\showfont second +\emph{\showfont third +\emph{\showfont fourth +\emph{\showfont fifth}}}}} +} + +\typeout{========== it, blue, bf, sc (but without emforce) ==========} +\emfontdeclare{\itshape,\color{blue},\bfseries,\color{black}\scshape} +\emph{\showfont First +\emph{\showfont second +\emph{\showfont third +\emph{\showfont fourth +\emph{\showfont fifth}}}}} + + + +\typeout{========== it, blue, bf, sc (now with emforce) ==========} +\emfontdeclare{\itshape,\color{blue}\emforce,\bfseries,\color{black}\scshape} +\emph{\showfont First +\emph{\showfont second +\emph{\showfont third +\emph{\showfont fourth +\emph{\showfont fifth}}}}} + + + +\stop diff --git a/base/testfiles-search/tlb-nfssaxes-004.tlg b/base/testfiles-search/tlb-nfssaxes-004.tlg new file mode 100644 index 000000000..e94eb1063 --- /dev/null +++ b/base/testfiles-search/tlb-nfssaxes-004.tlg @@ -0,0 +1,49 @@ +This is a generated file for the LaTeX2e validation system. +Don't change this file in any respect. +========== std LaTeX ========== +OT1/cmr/m/it +OT1/cmr/m/n +OT1/cmr/m/it +OT1/cmr/m/n +OT1/cmr/m/it +========== it, sc, scit ========== +OT1/cmr/m/it +OT1/cmr/m/sc +LaTeX Font Warning: Font shape `OT1/cmr/m/scit' undefined +(Font) using `OT1/cmr/m/it' instead on input line .... +OT1/cmr/m/it +OT1/cmr/m/n +OT1/cmr/m/it +========== it, sc, scit, but with supported font ========== +LaTeX Font Info: Trying to load font information for OT1+qpl on input line .... +OT1/qpl/m/it +OT1/qpl/m/sc +OT1/qpl/m/scit +OT1/qpl/m/n +OT1/qpl/m/it +========== it, sc, scit, but it already in force ========== +OT1/qpl/m/sc +OT1/qpl/m/scit +OT1/qpl/m/n +OT1/qpl/m/it +OT1/qpl/m/sc +========== it, blue, bf, sc (but without emforce) ========== +OT1/qpl/m/it +LaTeX Font Info: Font shape `OT1/qpl/bx/it' in size <10> not available +(Font) Font shape `OT1/qpl/b/it' tried instead on input line .... +OT1/qpl/bx/it +LaTeX Font Info: Font shape `OT1/qpl/bx/scit' in size <10> not available +(Font) Font shape `OT1/qpl/b/scit' tried instead on input line .... +OT1/qpl/bx/scit +LaTeX Font Info: Font shape `OT1/qpl/bx/n' in size <10> not available +(Font) Font shape `OT1/qpl/b/n' tried instead on input line .... +OT1/qpl/bx/n +OT1/qpl/bx/it +========== it, blue, bf, sc (now with emforce) ========== +OT1/qpl/m/it +OT1/qpl/m/it +OT1/qpl/bx/it +OT1/qpl/bx/scit +OT1/qpl/bx/n +[1 +] From 4488ca7ded467aaa9a5f77271acc178c8307974e Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Wed, 9 Oct 2019 15:18:34 +0200 Subject: [PATCH 11/55] need some more complex fonts with scit for testing --- support/texlive.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/support/texlive.sh b/support/texlive.sh index 88a29a705..bcb459c1b 100644 --- a/support/texlive.sh +++ b/support/texlive.sh @@ -45,6 +45,7 @@ tlmgr install \ lh \ lualibs \ luaotfload \ + tex-gyre \ url # Additional support for typesetting From b736db2c17159dd5034672aa6477bd01906f34e3 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Wed, 9 Oct 2019 14:47:47 +0100 Subject: [PATCH 12/55] Search tests depend on color .... --- base/config-search.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base/config-search.lua b/base/config-search.lua index 49d8de25a..449f1242c 100644 --- a/base/config-search.lua +++ b/base/config-search.lua @@ -6,3 +6,5 @@ checksearch = true testfiledir = "./testfiles-search" testsuppdir = testfiledir .. "/support" + +checkdeps = {maindir .. "/required/graphics"} From 085435fc7c27d517dcf44ec2b331af98871e803d Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Wed, 9 Oct 2019 16:08:51 +0200 Subject: [PATCH 13/55] don't use color (only pretend) --- base/config-search.lua | 2 - base/testfiles-search/tlb-nfssaxes-004.lvt | 14 +++-- base/testfiles-search/tlb-nfssaxes-004.tlg | 66 +++++++++++----------- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/base/config-search.lua b/base/config-search.lua index 449f1242c..49d8de25a 100644 --- a/base/config-search.lua +++ b/base/config-search.lua @@ -6,5 +6,3 @@ checksearch = true testfiledir = "./testfiles-search" testsuppdir = testfiledir .. "/support" - -checkdeps = {maindir .. "/required/graphics"} diff --git a/base/testfiles-search/tlb-nfssaxes-004.lvt b/base/testfiles-search/tlb-nfssaxes-004.lvt index 740bf0f4b..3604a5644 100644 --- a/base/testfiles-search/tlb-nfssaxes-004.lvt +++ b/base/testfiles-search/tlb-nfssaxes-004.lvt @@ -2,11 +2,13 @@ \input{test2e} -\usepackage{color} +% \usepackage{color} +% instead of loading color de do +\DeclareRobustCommand\color[1]{\def\currentcolor{#1}} +\color{black} \makeatletter -\def\showresult#1#2{#2\typeout{\detokenize{#2} -> \csname f@#1\endcsname}} -\def\showfont{\typeout{\f@encoding/\f@family/\f@series/\f@shape}} +\def\showfont{\typeout{\f@encoding/\f@family/\f@series/\f@shape \space (color: \currentcolor)}} \makeatother \begin{document} @@ -40,7 +42,7 @@ -\typeout{========== it, sc, scit, but it already in force ==========} +\typeout{========== it, sc, scit, but it already used ==========} \emfontdeclare{\itshape,\upshape\scshape,\itshape} \textit{% italics already in force \emph{\showfont First @@ -50,7 +52,7 @@ \emph{\showfont fifth}}}}} } -\typeout{========== it, blue, bf, sc (but without emforce) ==========} +\typeout{========== it, blue, bf, sc (but without \string\emforce) ==========} \emfontdeclare{\itshape,\color{blue},\bfseries,\color{black}\scshape} \emph{\showfont First \emph{\showfont second @@ -60,7 +62,7 @@ -\typeout{========== it, blue, bf, sc (now with emforce) ==========} +\typeout{========== it, blue, bf, sc (now with \string\emforce) ==========} \emfontdeclare{\itshape,\color{blue}\emforce,\bfseries,\color{black}\scshape} \emph{\showfont First \emph{\showfont second diff --git a/base/testfiles-search/tlb-nfssaxes-004.tlg b/base/testfiles-search/tlb-nfssaxes-004.tlg index e94eb1063..fd5041b32 100644 --- a/base/testfiles-search/tlb-nfssaxes-004.tlg +++ b/base/testfiles-search/tlb-nfssaxes-004.tlg @@ -1,49 +1,49 @@ This is a generated file for the LaTeX2e validation system. Don't change this file in any respect. ========== std LaTeX ========== -OT1/cmr/m/it -OT1/cmr/m/n -OT1/cmr/m/it -OT1/cmr/m/n -OT1/cmr/m/it +OT1/cmr/m/it (color: black) +OT1/cmr/m/n (color: black) +OT1/cmr/m/it (color: black) +OT1/cmr/m/n (color: black) +OT1/cmr/m/it (color: black) ========== it, sc, scit ========== -OT1/cmr/m/it -OT1/cmr/m/sc +OT1/cmr/m/it (color: black) +OT1/cmr/m/sc (color: black) LaTeX Font Warning: Font shape `OT1/cmr/m/scit' undefined (Font) using `OT1/cmr/m/it' instead on input line .... -OT1/cmr/m/it -OT1/cmr/m/n -OT1/cmr/m/it +OT1/cmr/m/it (color: black) +OT1/cmr/m/n (color: black) +OT1/cmr/m/it (color: black) ========== it, sc, scit, but with supported font ========== LaTeX Font Info: Trying to load font information for OT1+qpl on input line .... -OT1/qpl/m/it -OT1/qpl/m/sc -OT1/qpl/m/scit -OT1/qpl/m/n -OT1/qpl/m/it -========== it, sc, scit, but it already in force ========== -OT1/qpl/m/sc -OT1/qpl/m/scit -OT1/qpl/m/n -OT1/qpl/m/it -OT1/qpl/m/sc -========== it, blue, bf, sc (but without emforce) ========== -OT1/qpl/m/it +OT1/qpl/m/it (color: black) +OT1/qpl/m/sc (color: black) +OT1/qpl/m/scit (color: black) +OT1/qpl/m/n (color: black) +OT1/qpl/m/it (color: black) +========== it, sc, scit, but it already used ========== +OT1/qpl/m/sc (color: black) +OT1/qpl/m/scit (color: black) +OT1/qpl/m/n (color: black) +OT1/qpl/m/it (color: black) +OT1/qpl/m/sc (color: black) +========== it, blue, bf, sc (but without \emforce) ========== +OT1/qpl/m/it (color: black) LaTeX Font Info: Font shape `OT1/qpl/bx/it' in size <10> not available (Font) Font shape `OT1/qpl/b/it' tried instead on input line .... -OT1/qpl/bx/it +OT1/qpl/bx/it (color: blue) LaTeX Font Info: Font shape `OT1/qpl/bx/scit' in size <10> not available (Font) Font shape `OT1/qpl/b/scit' tried instead on input line .... -OT1/qpl/bx/scit +OT1/qpl/bx/scit (color: black) LaTeX Font Info: Font shape `OT1/qpl/bx/n' in size <10> not available (Font) Font shape `OT1/qpl/b/n' tried instead on input line .... -OT1/qpl/bx/n -OT1/qpl/bx/it -========== it, blue, bf, sc (now with emforce) ========== -OT1/qpl/m/it -OT1/qpl/m/it -OT1/qpl/bx/it -OT1/qpl/bx/scit -OT1/qpl/bx/n +OT1/qpl/bx/n (color: black) +OT1/qpl/bx/it (color: black) +========== it, blue, bf, sc (now with \emforce) ========== +OT1/qpl/m/it (color: black) +OT1/qpl/m/it (color: blue) +OT1/qpl/bx/it (color: blue) +OT1/qpl/bx/scit (color: black) +OT1/qpl/bx/n (color: black) [1 ] From 8cc1225607d76781fb7bb5d232ed04f7c4ac00ef Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Wed, 9 Oct 2019 17:25:09 +0200 Subject: [PATCH 14/55] \emfontdeclare needs robust \normalcolor --- base/nfssaxes.tex | 5 +++-- required/graphics/changes.txt | 5 +++++ required/graphics/color.dtx | 5 +++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 98ca03c77..cfb9a1fd0 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -541,8 +541,9 @@ % \textt{it} separately as \cs{upshape} no longer resets both in % one go). % \begin{macrocode} -\def\emreset{\fontshape{ulc}% in case sc is in use, e.g, changes scit -> it - \fontshape{n}% for all other cases +\DeclareRobustCommand\emreset{% + \fontshape{ulc}% in case sc is in use, e.g, changes scit -> it + \fontshape{n}% for all other cases } % \end{macrocode} % We could have used \verb=\fontshape{n}= twice, that would give diff --git a/required/graphics/changes.txt b/required/graphics/changes.txt index 085949886..b4783449d 100644 --- a/required/graphics/changes.txt +++ b/required/graphics/changes.txt @@ -4,6 +4,11 @@ completeness or accuracy and it contains some references to files that are not part of the distribution. ======================================================================= +2019-10-09 Frank Mittelbach + + * color.dtx (section{Default Colour}): + Make \normalcolor robust + ######################### # 2019-10-01 Release ######################### diff --git a/required/graphics/color.dtx b/required/graphics/color.dtx index 8de7d013a..01e8aca7e 100644 --- a/required/graphics/color.dtx +++ b/required/graphics/color.dtx @@ -19,7 +19,7 @@ % \ProvidesFile{color.drv} % \fi % \ProvidesFile{color.dtx} - [2016/07/10 v1.1e Standard LaTeX Color (DPC)] + [2019/10/09 v1.1f Standard LaTeX Color (DPC)] % % \iffalse %<*driver> @@ -684,8 +684,9 @@ % \changes{v0.2d}{1994/05/13} % {Stop changing \cs{reset@font}. Use the new \cs{normalfont} % instead.} +% \changes{v1.1f}{2019/10/09{Make \cs{normalcolor} robust} % \begin{macrocode} -\def\normalcolor{\let\current@color\default@color\set@color} +\DeclareRobustCommand\normalcolor{\let\current@color\default@color\set@color} % \end{macrocode} % \end{macro} % From e06ecc15cbb879d583688b8a8e060c9296536e94 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Wed, 9 Oct 2019 20:35:31 +0200 Subject: [PATCH 15/55] grrr --- required/graphics/color.dtx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/required/graphics/color.dtx b/required/graphics/color.dtx index 01e8aca7e..1685ead46 100644 --- a/required/graphics/color.dtx +++ b/required/graphics/color.dtx @@ -684,7 +684,7 @@ % \changes{v0.2d}{1994/05/13} % {Stop changing \cs{reset@font}. Use the new \cs{normalfont} % instead.} -% \changes{v1.1f}{2019/10/09{Make \cs{normalcolor} robust} +% \changes{v1.1f}{2019/10/09}{Make \cs{normalcolor} robust} % \begin{macrocode} \DeclareRobustCommand\normalcolor{\let\current@color\default@color\set@color} % \end{macrocode} From d62fed80a6e0803f792eb163cd639ddba898ef14 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Thu, 10 Oct 2019 15:19:47 +0200 Subject: [PATCH 16/55] change \bfdefault to "b" --- base/nfssaxes.tex | 43 ++++++++--- base/testfiles-search/tlb-nfssaxes-005.lvt | 76 +++++++++++++++++++ base/testfiles-search/tlb-nfssaxes-005.tlg | 80 ++++++++++++++++++++ base/testfiles/github-robust-0123.luatex.tlg | 2 +- base/testfiles/github-robust-0123.tlg | 2 +- base/testfiles/github-robust-0123.xetex.tlg | 2 +- 6 files changed, 193 insertions(+), 12 deletions(-) create mode 100644 base/testfiles-search/tlb-nfssaxes-005.lvt create mode 100644 base/testfiles-search/tlb-nfssaxes-005.tlg diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index cfb9a1fd0..74a5e2c36 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -610,7 +610,13 @@ % If the test fails we are done and the declarations will be used. % Otherwise we will try the next declaration in the sequence. % \begin{macrocode} - \expandafter\ifx\csname\curr@fontshape/\f@size\em@force\expandafter\endcsname\em@currfont + \expandafter\ifx\csname \curr@fontshape/\f@size\em@force +% \end{macrocode} +% For the comparison with \cs{ifx} we have to exand +% \cs{em@currfont} once as the relevant info is inside. +% \begin{macrocode} + \expandafter\endcsname + \em@currfont \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update % \end{macrocode} % If \cs{emforce} was used, we have to undo its effect: @@ -753,11 +759,29 @@ % possibly directly). % \begin{macrocode} \edef\mdseries@rm{\mddefault} -\edef\bfseries@rm{\bfdefault} \edef\mdseries@sf{\mddefault} -\edef\bfseries@sf{\bfdefault} \edef\mdseries@tt{\mddefault} -\edef\bfseries@tt{\bfdefault} +% \end{macrocode} +% +% Conceptual change: The \cs{bfdefault} will be \texttt{b} not +% \texttt{bx} because that is what it should be really for nearly +% every font except Computer/Latin Modern. +% +% To account for the fact that by default we typeset in CM or LM we +% set up the \cs{bfseries@..} defaults to use \texttt{bx} instead. +% +% This means that it behaves like before because if the default +% fonts are used then \cs{bfseries@rm} etc kick in and make +% \cs{textbf} use \texttt{bx}. However, if the font gets changed +% then \cs{bfdefault} will get used. +% \begin{macrocode} +\renewcommand\bfdefault{b} +% \end{macrocode} +% +% \begin{macrocode} +\edef\bfseries@rm{bx} +\edef\bfseries@sf{bx} +\edef\bfseries@tt{bx} % \end{macrocode} % \end{macro} % \end{macro} @@ -968,11 +992,12 @@ % \begin{macro}{\AtBeginDocument} % -% If the document preamble has changed the \cs{familydefault} or if the -% if the \cs{rmdefault} contains a new font family, we have to -% adjust the series defaults accordingly, before starting typesetting. So we run \cs{rmfamily}, -% \cs{sffamily} or \cs{ttfamily} depending on the situation which -% does that (as a sideeffect) for us. +% If the document preamble has changed the \cs{familydefault} or if +% the if the \cs{rmdefault} contains a new font family, we have to +% adjust the series defaults accordingly, before starting +% typesetting. So we run \cs{rmfamily}, \cs{sffamily} or +% \cs{ttfamily} depending on the situation which does that (as a +% sideeffect) for us. % \begin{macrocode} \AtBeginDocument{% \expand@font@defaults diff --git a/base/testfiles-search/tlb-nfssaxes-005.lvt b/base/testfiles-search/tlb-nfssaxes-005.lvt new file mode 100644 index 000000000..211cc04ba --- /dev/null +++ b/base/testfiles-search/tlb-nfssaxes-005.lvt @@ -0,0 +1,76 @@ +\documentclass{article} + +\input{test2e} + + +\makeatletter +\def\showfont#1{\typeout{#1: \f@encoding/\f@family/\f@series/\f@shape}} +\makeatother + +\begin{document} + +\START + +\typeout{========== std LaTeX OT1 ==========} + +\showfont{start} + +Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} +\showfont{toplevel} back +\textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} + +\sffamily +\showfont{sf} + +Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} +\showfont{toplevel} back +\textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} + +\ttfamily +\showfont{tt} + +Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} +\showfont{toplevel} back +\textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} + +\fontfamily{qpl} +\showfont{palatino} + +Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} +\showfont{toplevel} back +\textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} + + +\typeout{========== std LaTeX T1 ==========} + +\normalfont\fontencoding{T1}\selectfont +\showfont{start} + +Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} +\showfont{toplevel} back +\textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} + +\sffamily +\showfont{sf} + +Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} +\showfont{toplevel} back +\textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} + +\ttfamily +\showfont{tt} + +Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} +\showfont{toplevel} back +\textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} + +\fontfamily{qpl} +\showfont{palatino} + +Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} +\showfont{toplevel} back +\textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} + + + +\END diff --git a/base/testfiles-search/tlb-nfssaxes-005.tlg b/base/testfiles-search/tlb-nfssaxes-005.tlg new file mode 100644 index 000000000..dab9b2a5b --- /dev/null +++ b/base/testfiles-search/tlb-nfssaxes-005.tlg @@ -0,0 +1,80 @@ +This is a generated file for the LaTeX2e validation system. +Don't change this file in any respect. +========== std LaTeX OT1 ========== +start: OT1/cmr/m/n +bf: OT1/cmr/bx/n +italic inside: OT1/cmr/bx/it +toplevel: OT1/cmr/m/n +sl: OT1/cmr/m/sl +bf inside: OT1/cmr/bx/sl +sf: OT1/cmss/m/n +bf: OT1/cmss/bx/n +LaTeX Font Warning: Font shape `OT1/cmss/bx/it' undefined +(Font) using `OT1/cmss/bx/n' instead on input line .... +italic inside: OT1/cmss/bx/it +toplevel: OT1/cmss/m/n +sl: OT1/cmss/m/sl +LaTeX Font Warning: Font shape `OT1/cmss/bx/sl' undefined +(Font) using `OT1/cmss/bx/n' instead on input line .... +bf inside: OT1/cmss/bx/sl +tt: OT1/cmtt/m/n +LaTeX Font Info: Font shape `OT1/cmtt/bx/n' in size <10> not available +(Font) Font shape `OT1/cmtt/m/n' tried instead on input line .... +bf: OT1/cmtt/bx/n +LaTeX Font Info: Font shape `OT1/cmtt/bx/it' in size <10> not available +(Font) Font shape `OT1/cmtt/m/it' tried instead on input line .... +italic inside: OT1/cmtt/bx/it +toplevel: OT1/cmtt/m/n +sl: OT1/cmtt/m/sl +LaTeX Font Info: Font shape `OT1/cmtt/bx/sl' in size <10> not available +(Font) Font shape `OT1/cmtt/m/n' tried instead on input line .... +bf inside: OT1/cmtt/bx/sl +palatino: OT1/qpl/m/n +LaTeX Font Info: Trying to load font information for OT1+qpl on input line .... +bf: OT1/qpl/b/n +italic inside: OT1/qpl/b/it +toplevel: OT1/qpl/m/n +LaTeX Font Warning: Font shape `OT1/qpl/m/sl' in size <10> not available +(Font) Font shape `OT1/qpl/m/it' tried instead on input line .... +sl: OT1/qpl/m/sl +LaTeX Font Warning: Font shape `OT1/qpl/b/sl' in size <10> not available +(Font) Font shape `OT1/qpl/b/it' tried instead on input line .... +bf inside: OT1/qpl/b/sl +========== std LaTeX T1 ========== +start: T1/cmr/m/n +bf: T1/cmr/bx/n +italic inside: T1/cmr/bx/it +toplevel: T1/cmr/m/n +sl: T1/cmr/m/sl +bf inside: T1/cmr/bx/sl +LaTeX Font Info: Trying to load font information for T1+cmss on input line .... +sf: T1/cmss/m/n +bf: T1/cmss/bx/n +italic inside: T1/cmss/bx/it +toplevel: T1/cmss/m/n +sl: T1/cmss/m/sl +bf inside: T1/cmss/bx/sl +LaTeX Font Info: Trying to load font information for T1+cmtt on input line .... +tt: T1/cmtt/m/n +LaTeX Font Info: Font shape `T1/cmtt/bx/n' in size <10> not available +(Font) Font shape `T1/cmtt/m/n' tried instead on input line .... +bf: T1/cmtt/bx/n +LaTeX Font Info: Font shape `T1/cmtt/bx/it' in size <10> not available +(Font) Font shape `T1/cmtt/m/it' tried instead on input line .... +italic inside: T1/cmtt/bx/it +toplevel: T1/cmtt/m/n +sl: T1/cmtt/m/sl +LaTeX Font Warning: Font shape `T1/cmtt/bx/sl' undefined +(Font) using `T1/cmtt/bx/n' instead on input line .... +bf inside: T1/cmtt/bx/sl +palatino: T1/qpl/m/n +LaTeX Font Info: Trying to load font information for T1+qpl on input line .... +bf: T1/qpl/b/n +italic inside: T1/qpl/b/it +toplevel: T1/qpl/m/n +LaTeX Font Warning: Font shape `T1/qpl/m/sl' in size <10> not available +(Font) Font shape `T1/qpl/m/it' tried instead on input line .... +sl: T1/qpl/m/sl +LaTeX Font Warning: Font shape `T1/qpl/b/sl' in size <10> not available +(Font) Font shape `T1/qpl/b/it' tried instead on input line .... +bf inside: T1/qpl/b/sl diff --git a/base/testfiles/github-robust-0123.luatex.tlg b/base/testfiles/github-robust-0123.luatex.tlg index f3704f6a5..c21a2e323 100644 --- a/base/testfiles/github-robust-0123.luatex.tlg +++ b/base/testfiles/github-robust-0123.luatex.tlg @@ -447,7 +447,7 @@ and I'll forget about whatever was undefined. --------------------------------------- \bezier -> \bezier --------------------------------------- -\bfdefault -> bx +\bfdefault -> b --------------------------------------- \bfseries -> \bfseries --------------------------------------- diff --git a/base/testfiles/github-robust-0123.tlg b/base/testfiles/github-robust-0123.tlg index 0bec105ea..8c247c65d 100644 --- a/base/testfiles/github-robust-0123.tlg +++ b/base/testfiles/github-robust-0123.tlg @@ -439,7 +439,7 @@ l. ......fter\show\csname Downarrow\space\endcsname --------------------------------------- \bezier -> \bezier --------------------------------------- -\bfdefault -> bx +\bfdefault -> b --------------------------------------- \bfseries -> \bfseries --------------------------------------- diff --git a/base/testfiles/github-robust-0123.xetex.tlg b/base/testfiles/github-robust-0123.xetex.tlg index 8eda2ecdf..619582348 100644 --- a/base/testfiles/github-robust-0123.xetex.tlg +++ b/base/testfiles/github-robust-0123.xetex.tlg @@ -447,7 +447,7 @@ and I'll forget about whatever was undefined. --------------------------------------- \bezier -> \bezier --------------------------------------- -\bfdefault -> bx +\bfdefault -> b --------------------------------------- \bfseries -> \bfseries --------------------------------------- From 3fe15cdd377a5cdffb40ba37dcd0b8f1c95283bd Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Thu, 10 Oct 2019 17:38:32 +0200 Subject: [PATCH 17/55] update tlg --- base/testfiles-search/tlb-nfssaxes-004.tlg | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/base/testfiles-search/tlb-nfssaxes-004.tlg b/base/testfiles-search/tlb-nfssaxes-004.tlg index fd5041b32..71c17b58c 100644 --- a/base/testfiles-search/tlb-nfssaxes-004.tlg +++ b/base/testfiles-search/tlb-nfssaxes-004.tlg @@ -29,21 +29,15 @@ OT1/qpl/m/it (color: black) OT1/qpl/m/sc (color: black) ========== it, blue, bf, sc (but without \emforce) ========== OT1/qpl/m/it (color: black) -LaTeX Font Info: Font shape `OT1/qpl/bx/it' in size <10> not available -(Font) Font shape `OT1/qpl/b/it' tried instead on input line .... -OT1/qpl/bx/it (color: blue) -LaTeX Font Info: Font shape `OT1/qpl/bx/scit' in size <10> not available -(Font) Font shape `OT1/qpl/b/scit' tried instead on input line .... -OT1/qpl/bx/scit (color: black) -LaTeX Font Info: Font shape `OT1/qpl/bx/n' in size <10> not available -(Font) Font shape `OT1/qpl/b/n' tried instead on input line .... -OT1/qpl/bx/n (color: black) -OT1/qpl/bx/it (color: black) +OT1/qpl/b/it (color: blue) +OT1/qpl/b/scit (color: black) +OT1/qpl/b/n (color: black) +OT1/qpl/b/it (color: black) ========== it, blue, bf, sc (now with \emforce) ========== OT1/qpl/m/it (color: black) OT1/qpl/m/it (color: blue) -OT1/qpl/bx/it (color: blue) -OT1/qpl/bx/scit (color: black) -OT1/qpl/bx/n (color: black) +OT1/qpl/b/it (color: blue) +OT1/qpl/b/scit (color: black) +OT1/qpl/b/n (color: black) [1 ] From 6bb5867b0543eb514958a620733514e7e42a1c98 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Thu, 10 Oct 2019 19:44:25 +0200 Subject: [PATCH 18/55] more tests and more change rules --- base/nfssaxes.tex | 336 ++++++++++++++++++--- base/testfiles-search/tlb-nfssaxes-005.lvt | 16 + base/testfiles-search/tlb-nfssaxes-005.tlg | 27 ++ 3 files changed, 338 insertions(+), 41 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 74a5e2c36..f2e33e324 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -46,60 +46,314 @@ % or vize versa. But maybe this is overkill and \cs{bfseries} and % \cs{mdseries} is all that people need in practice.} % +% \emph{explain rationale} +% % \begin{macrocode} -\DeclareFontSeriesChangeRule {m}{c} {c} {m} -\DeclareFontSeriesChangeRule {m}{x} {x} {m} -\DeclareFontSeriesChangeRule {m}{m} {m} {} -\DeclareFontSeriesChangeRule {m}{b} {b} {bx} -\DeclareFontSeriesChangeRule {m}{bx} {bx} {b} -\DeclareFontSeriesChangeRule {m}{l} {l} {m} -\DeclareFontSeriesChangeRule {m}{sb} {sb} {b} +\DeclareFontSeriesChangeRule {bc}{b}{bc}{} +\DeclareFontSeriesChangeRule {bc}{c}{bc}{} +\DeclareFontSeriesChangeRule {bc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {bc}{el}{elc}{} +\DeclareFontSeriesChangeRule {bc}{l}{lc}{} +\DeclareFontSeriesChangeRule {bc}{m}{c}{} +\DeclareFontSeriesChangeRule {bc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {bc}{sl}{slc}{} +\DeclareFontSeriesChangeRule {bc}{ub}{ubc}{} +\DeclareFontSeriesChangeRule {bc}{ul}{ulc}{} +\DeclareFontSeriesChangeRule {bc}{x}{bx}{} % \end{macrocode} -% +% % \begin{macrocode} -\DeclareFontSeriesChangeRule {b}{c} {bc} {b} -\DeclareFontSeriesChangeRule {b}{x} {bx} {b} -\DeclareFontSeriesChangeRule {b}{m} {m} {} -\DeclareFontSeriesChangeRule {b}{b} {b} {bx} -\DeclareFontSeriesChangeRule {b}{bx} {bx} {b} -\DeclareFontSeriesChangeRule {b}{l} {l} {} -\DeclareFontSeriesChangeRule {b}{sb} {sb} {b} +\DeclareFontSeriesChangeRule {bx}{bx} {bx} {b} %<----- +\DeclareFontSeriesChangeRule {bx}{b} {b} {bx} %<----- +\DeclareFontSeriesChangeRule {bx}{b}{bx}{} +\DeclareFontSeriesChangeRule {bx}{c} {bc} {bx} %<----- +\DeclareFontSeriesChangeRule {bx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {bx}{el}{elx}{} +\DeclareFontSeriesChangeRule {bx}{l}{lx}{} % \end{macrocode} % +% Next rule would be logical, but would just result in many +% warnings with the default fonts. Without the rule it maps to ``m''. % \begin{macrocode} -\DeclareFontSeriesChangeRule {bx}{c} {bc} {bx} -\DeclareFontSeriesChangeRule {bx}{x} {bx} {} -\DeclareFontSeriesChangeRule {bx}{m} {m} {} -\DeclareFontSeriesChangeRule {bx}{b} {b} {bx} -\DeclareFontSeriesChangeRule {bx}{bx} {bx} {} -\DeclareFontSeriesChangeRule {bx}{l} {lx} {} -\DeclareFontSeriesChangeRule {bx}{sb} {sbx} {sb} +%\DeclareFontSeriesChangeRule {bx}{m}{x}{} %<----- mainly +% % \mdseries % \end{macrocode} -% +% % \begin{macrocode} -\DeclareFontSeriesChangeRule {l}{c} {lc} {l} % ? -\DeclareFontSeriesChangeRule {l}{x} {lx} {l} % ? -\DeclareFontSeriesChangeRule {l}{m} {m} {} -\DeclareFontSeriesChangeRule {l}{b} {b} {bx} -\DeclareFontSeriesChangeRule {l}{bx} {bx} {b} -\DeclareFontSeriesChangeRule {l}{l} {l} {} -\DeclareFontSeriesChangeRule {l}{sb} {sb} {b} % ? +\DeclareFontSeriesChangeRule {bx}{sb} {sbx} {} +\DeclareFontSeriesChangeRule {bx}{sl}{slx} {} +\DeclareFontSeriesChangeRule {bx}{ub}{ubx}{} +\DeclareFontSeriesChangeRule {bx}{ul}{ulx}{} +\DeclareFontSeriesChangeRule {bx}{x}{bx}{} % \end{macrocode} -% +% % \begin{macrocode} -\DeclareFontSeriesChangeRule {sb}{c} {sbc} {bc} %? -\DeclareFontSeriesChangeRule {sb}{x} {sbx} {bx} %? -\DeclareFontSeriesChangeRule {sb}{m} {m} {} -\DeclareFontSeriesChangeRule {sb}{b} {b} {} -\DeclareFontSeriesChangeRule {sb}{bx} {bx} {} -\DeclareFontSeriesChangeRule {sb}{l} {l} {} -\DeclareFontSeriesChangeRule {sb}{sb} {sb} {} +\DeclareFontSeriesChangeRule {b}{bx} {bx} {b} %<----- +\DeclareFontSeriesChangeRule {b}{c} {bc} {b} %<----- +\DeclareFontSeriesChangeRule {b}{sb} {sb} {b} %<----- +\DeclareFontSeriesChangeRule {b}{x} {bx} {b} %<----- % \end{macrocode} -% +% % \begin{macrocode} -\DeclareFontSeriesChangeRule {l}{c} {c} {m} % ? +\DeclareFontSeriesChangeRule {c}{bx} {bx} {b} %<----- +\DeclareFontSeriesChangeRule {c}{b}{bc}{} +\DeclareFontSeriesChangeRule {c}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {c}{el}{elc}{} +\DeclareFontSeriesChangeRule {c}{l}{lc}{} +\DeclareFontSeriesChangeRule {c}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {c}{sl}{slc}{} +\DeclareFontSeriesChangeRule {c}{ub}{ubc}{} +\DeclareFontSeriesChangeRule {c}{ul}{ulc}{} +\DeclareFontSeriesChangeRule {c}{x}{x}{m} %<----- +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {ebc}{b}{bc}{} +\DeclareFontSeriesChangeRule {ebc}{c}{ebc}{} +\DeclareFontSeriesChangeRule {ebc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {ebc}{el}{elc}{} +\DeclareFontSeriesChangeRule {ebc}{l}{lc}{} +\DeclareFontSeriesChangeRule {ebc}{m}{c}{} +\DeclareFontSeriesChangeRule {ebc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {ebc}{sl}{slc}{} +\DeclareFontSeriesChangeRule {ebc}{ub}{ubc}{} +\DeclareFontSeriesChangeRule {ebc}{ul}{ulc}{} +\DeclareFontSeriesChangeRule {ebc}{x}{ebx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {ebx}{b}{bx}{} +\DeclareFontSeriesChangeRule {ebx}{c}{ebc}{} +\DeclareFontSeriesChangeRule {ebx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {ebx}{el}{elx}{} +\DeclareFontSeriesChangeRule {ebx}{l}{lx}{} +\DeclareFontSeriesChangeRule {ebx}{m}{x}{} +\DeclareFontSeriesChangeRule {ebx}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {ebx}{sl}{slx}{} +\DeclareFontSeriesChangeRule {ebx}{ub}{ubx}{} +\DeclareFontSeriesChangeRule {ebx}{ul}{ulx}{} +\DeclareFontSeriesChangeRule {ebx}{x}{ebx}{} +\DeclareFontSeriesChangeRule {eb}{c}{ebc}{} +\DeclareFontSeriesChangeRule {eb}{x}{ebx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {elc}{b}{bc}{} +\DeclareFontSeriesChangeRule {elc}{c}{elc}{} +\DeclareFontSeriesChangeRule {elc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {elc}{el}{elc}{} +\DeclareFontSeriesChangeRule {elc}{l}{lc}{} +\DeclareFontSeriesChangeRule {elc}{m}{c}{} +\DeclareFontSeriesChangeRule {elc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {elc}{sl}{slc}{} +\DeclareFontSeriesChangeRule {elc}{ub}{ubc}{} +\DeclareFontSeriesChangeRule {elc}{ul}{ulc}{} +\DeclareFontSeriesChangeRule {elc}{x}{elx}{} +\DeclareFontSeriesChangeRule {elx}{b}{bx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {elx}{c}{elc}{} +\DeclareFontSeriesChangeRule {elx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {elx}{el}{elx}{} +\DeclareFontSeriesChangeRule {elx}{l}{lx}{} +\DeclareFontSeriesChangeRule {elx}{m}{x}{} +\DeclareFontSeriesChangeRule {elx}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {elx}{sl}{slx}{} +\DeclareFontSeriesChangeRule {elx}{ub}{ubx}{} +\DeclareFontSeriesChangeRule {elx}{ul}{ulx}{} +\DeclareFontSeriesChangeRule {elx}{x}{elx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {el}{c}{elc}{} +\DeclareFontSeriesChangeRule {el}{x}{elx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {lc}{b}{bc}{} +\DeclareFontSeriesChangeRule {lc}{c}{lc}{} +\DeclareFontSeriesChangeRule {lc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {lc}{el}{elc}{} +\DeclareFontSeriesChangeRule {lc}{l}{lc}{} +\DeclareFontSeriesChangeRule {lc}{m}{c}{} +\DeclareFontSeriesChangeRule {lc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {lc}{sl}{slc}{} +\DeclareFontSeriesChangeRule {lc}{ub}{ubc}{} +\DeclareFontSeriesChangeRule {lc}{ul}{ulc}{} +\DeclareFontSeriesChangeRule {lc}{x}{lx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {lx}{b}{bx}{} +\DeclareFontSeriesChangeRule {lx}{c}{lc}{} +\DeclareFontSeriesChangeRule {lx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {lx}{el}{elx}{} +\DeclareFontSeriesChangeRule {lx}{l}{lx}{} +\DeclareFontSeriesChangeRule {lx}{m}{x}{} +\DeclareFontSeriesChangeRule {lx}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {lx}{sl}{slx}{} +\DeclareFontSeriesChangeRule {lx}{ub}{ubx}{} +\DeclareFontSeriesChangeRule {lx}{ul}{ulx}{} +\DeclareFontSeriesChangeRule {lx}{x}{lx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {l}{bx} {bx} {b} %<----- +\DeclareFontSeriesChangeRule {l}{b} {b} {bx} %<----- +\DeclareFontSeriesChangeRule {l}{c} {c} {m} % ? %<----- +\DeclareFontSeriesChangeRule {l}{c} {lc} {l} % ? %<----- +\DeclareFontSeriesChangeRule {l}{sb} {sb} {b} % ? %<----- +\DeclareFontSeriesChangeRule {l}{x} {lx} {l} % ? %<----- +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {m}{bx} {bx} {b} %<----- +\DeclareFontSeriesChangeRule {m}{b} {b} {bx} %<----- +\DeclareFontSeriesChangeRule {m}{c} {c} {m} %<----- +\DeclareFontSeriesChangeRule {m}{l} {l} {m} %<----- +\DeclareFontSeriesChangeRule {m}{sb} {sb} {b} %<----- +\DeclareFontSeriesChangeRule {m}{x} {x} {m} %<----- +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {sbc}{b}{bc}{} +\DeclareFontSeriesChangeRule {sbc}{c}{sbc}{} +\DeclareFontSeriesChangeRule {sbc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {sbc}{el}{elc}{} +\DeclareFontSeriesChangeRule {sbc}{l}{lc}{} +\DeclareFontSeriesChangeRule {sbc}{m}{c}{} +\DeclareFontSeriesChangeRule {sbc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {sbc}{sl}{slc}{} +\DeclareFontSeriesChangeRule {sbc}{ub}{ubc}{} +\DeclareFontSeriesChangeRule {sbc}{ul}{ulc}{} +\DeclareFontSeriesChangeRule {sbc}{x}{sbx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {sbx}{b}{bx}{} +\DeclareFontSeriesChangeRule {sbx}{c}{sbc}{} +\DeclareFontSeriesChangeRule {sbx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {sbx}{el}{elx}{} +\DeclareFontSeriesChangeRule {sbx}{l}{lx}{} +\DeclareFontSeriesChangeRule {sbx}{m}{x}{} +\DeclareFontSeriesChangeRule {sbx}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {sbx}{sl}{slx}{} +\DeclareFontSeriesChangeRule {sbx}{ub}{ubx}{} +\DeclareFontSeriesChangeRule {sbx}{ul}{ulx}{} +\DeclareFontSeriesChangeRule {sbx}{x}{sbx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {sb}{c} {sbc} {bc} %? %<----- +\DeclareFontSeriesChangeRule {sb}{x} {sbx} {bx} %? %<----- +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {slc}{b}{bc}{} +\DeclareFontSeriesChangeRule {slc}{c}{slc}{} +\DeclareFontSeriesChangeRule {slc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {slc}{el}{elc}{} +\DeclareFontSeriesChangeRule {slc}{l}{lc}{} +\DeclareFontSeriesChangeRule {slc}{m}{c}{} +\DeclareFontSeriesChangeRule {slc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {slc}{sl}{slc}{} +\DeclareFontSeriesChangeRule {slc}{ub}{ubc}{} +\DeclareFontSeriesChangeRule {slc}{ul}{ulc}{} +\DeclareFontSeriesChangeRule {slc}{x}{slx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {slx}{b}{bx}{} +\DeclareFontSeriesChangeRule {slx}{c}{slc}{} +\DeclareFontSeriesChangeRule {slx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {slx}{el}{elx}{} +\DeclareFontSeriesChangeRule {slx}{l}{lx}{} +\DeclareFontSeriesChangeRule {slx}{m}{x}{} +\DeclareFontSeriesChangeRule {slx}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {slx}{sl}{slx}{} +\DeclareFontSeriesChangeRule {slx}{ub}{ubx}{} +\DeclareFontSeriesChangeRule {slx}{ul}{ulx}{} +\DeclareFontSeriesChangeRule {slx}{x}{slx}{} +\DeclareFontSeriesChangeRule {sl}{c}{slc}{} +\DeclareFontSeriesChangeRule {sl}{x}{slx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {ubc}{b}{bc}{} +\DeclareFontSeriesChangeRule {ubc}{c}{ubc}{} +\DeclareFontSeriesChangeRule {ubc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {ubc}{el}{elc}{} +\DeclareFontSeriesChangeRule {ubc}{l}{lc}{} +\DeclareFontSeriesChangeRule {ubc}{m}{c}{} +\DeclareFontSeriesChangeRule {ubc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {ubc}{sl}{slc}{} +\DeclareFontSeriesChangeRule {ubc}{ub}{ubc}{} +\DeclareFontSeriesChangeRule {ubc}{ul}{ulc}{} +\DeclareFontSeriesChangeRule {ubc}{x}{ubx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {ubx}{b}{bx}{} +\DeclareFontSeriesChangeRule {ubx}{c}{ubc}{} +\DeclareFontSeriesChangeRule {ubx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {ubx}{el}{elx}{} +\DeclareFontSeriesChangeRule {ubx}{l}{lx}{} +\DeclareFontSeriesChangeRule {ubx}{m}{x}{} +\DeclareFontSeriesChangeRule {ubx}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {ubx}{sl}{slx}{} +\DeclareFontSeriesChangeRule {ubx}{ub}{ubx}{} +\DeclareFontSeriesChangeRule {ubx}{ul}{ulx}{} +\DeclareFontSeriesChangeRule {ubx}{x}{ubx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {ub}{c}{ubc}{} +\DeclareFontSeriesChangeRule {ub}{x}{ubx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {ulc}{b}{bc}{} +\DeclareFontSeriesChangeRule {ulc}{c}{ulc}{} +\DeclareFontSeriesChangeRule {ulc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {ulc}{el}{elc}{} +\DeclareFontSeriesChangeRule {ulc}{l}{lc}{} +\DeclareFontSeriesChangeRule {ulc}{m}{c}{} +\DeclareFontSeriesChangeRule {ulc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {ulc}{sl}{slc}{} +\DeclareFontSeriesChangeRule {ulc}{ub}{ubc}{} +\DeclareFontSeriesChangeRule {ulc}{ul}{ulc}{} +\DeclareFontSeriesChangeRule {ulc}{x}{ulx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {ulx}{b}{bx}{} +\DeclareFontSeriesChangeRule {ulx}{c}{ulc}{} +\DeclareFontSeriesChangeRule {ulx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {ulx}{el}{elx}{} +\DeclareFontSeriesChangeRule {ulx}{l}{lx}{} +\DeclareFontSeriesChangeRule {ulx}{m}{x}{} +\DeclareFontSeriesChangeRule {ulx}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {ulx}{sl}{slx}{} +\DeclareFontSeriesChangeRule {ulx}{ub}{ubx}{} +\DeclareFontSeriesChangeRule {ulx}{ul}{ulx}{} +\DeclareFontSeriesChangeRule {ulx}{x}{ulx}{} +\DeclareFontSeriesChangeRule {ul}{c}{ulc}{} +\DeclareFontSeriesChangeRule {ul}{x}{ulx}{} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {x}{b}{bx}{} +\DeclareFontSeriesChangeRule {x}{c}{c}{} +\DeclareFontSeriesChangeRule {x}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {x}{el}{elx}{} +\DeclareFontSeriesChangeRule {x}{l}{lx}{} +\DeclareFontSeriesChangeRule {x}{m}{x}{} +\DeclareFontSeriesChangeRule {x}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {x}{sl}{slx}{} +\DeclareFontSeriesChangeRule {x}{ub}{ubx}{} +\DeclareFontSeriesChangeRule {x}{ul}{ulx}{} % \end{macrocode} -% % % \emph{rules need to get completed!} % diff --git a/base/testfiles-search/tlb-nfssaxes-005.lvt b/base/testfiles-search/tlb-nfssaxes-005.lvt index 211cc04ba..826defa6e 100644 --- a/base/testfiles-search/tlb-nfssaxes-005.lvt +++ b/base/testfiles-search/tlb-nfssaxes-005.lvt @@ -19,6 +19,8 @@ Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} \showfont{toplevel} back \textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} +\textbf{\showfont{bf} Some bold \textmd{\showfont{md} medium}\showfont{bf} more bold} + \sffamily \showfont{sf} @@ -26,6 +28,8 @@ Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} \showfont{toplevel} back \textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} +\textbf{\showfont{bf} Some bold \textmd{\showfont{md} medium}\showfont{bf} more bold} + \ttfamily \showfont{tt} @@ -33,6 +37,8 @@ Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} \showfont{toplevel} back \textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} +\textbf{\showfont{bf} Some bold \textmd{\showfont{md} medium}\showfont{bf} more bold} + \fontfamily{qpl} \showfont{palatino} @@ -40,6 +46,7 @@ Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} \showfont{toplevel} back \textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} +\textbf{\showfont{bf} Some bold \textmd{\showfont{md} medium}\showfont{bf} more bold} \typeout{========== std LaTeX T1 ==========} @@ -50,6 +57,8 @@ Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} \showfont{toplevel} back \textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} +\textbf{\showfont{bf} Some bold \textmd{\showfont{md} medium}\showfont{bf} more bold} + \sffamily \showfont{sf} @@ -57,6 +66,8 @@ Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} \showfont{toplevel} back \textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} +\textbf{\showfont{bf} Some bold \textmd{\showfont{md} medium}\showfont{bf} more bold} + \ttfamily \showfont{tt} @@ -64,13 +75,18 @@ Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} \showfont{toplevel} back \textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} +\textbf{\showfont{bf} Some bold \textmd{\showfont{md} medium}\showfont{bf} more bold} + \fontfamily{qpl} \showfont{palatino} +\textbf{\showfont{bf} Some bold \textmd{\showfont{md} medium}\showfont{bf} more bold} + Typesetting \textbf{\showfont{bf} bold \textit{\showfont{italic inside} italic}} \showfont{toplevel} back \textsl{\showfont{sl} slanted \textbf{\showfont{bf inside} bold}} +\textbf{\showfont{bf} Some bold \textmd{\showfont{md} medium}\showfont{bf} more bold} \END diff --git a/base/testfiles-search/tlb-nfssaxes-005.tlg b/base/testfiles-search/tlb-nfssaxes-005.tlg index dab9b2a5b..f62c52787 100644 --- a/base/testfiles-search/tlb-nfssaxes-005.tlg +++ b/base/testfiles-search/tlb-nfssaxes-005.tlg @@ -7,6 +7,9 @@ italic inside: OT1/cmr/bx/it toplevel: OT1/cmr/m/n sl: OT1/cmr/m/sl bf inside: OT1/cmr/bx/sl +bf: OT1/cmr/bx/n +md: OT1/cmr/m/n +bf: OT1/cmr/bx/n sf: OT1/cmss/m/n bf: OT1/cmss/bx/n LaTeX Font Warning: Font shape `OT1/cmss/bx/it' undefined @@ -17,6 +20,9 @@ sl: OT1/cmss/m/sl LaTeX Font Warning: Font shape `OT1/cmss/bx/sl' undefined (Font) using `OT1/cmss/bx/n' instead on input line .... bf inside: OT1/cmss/bx/sl +bf: OT1/cmss/bx/n +md: OT1/cmss/m/n +bf: OT1/cmss/bx/n tt: OT1/cmtt/m/n LaTeX Font Info: Font shape `OT1/cmtt/bx/n' in size <10> not available (Font) Font shape `OT1/cmtt/m/n' tried instead on input line .... @@ -29,6 +35,9 @@ sl: OT1/cmtt/m/sl LaTeX Font Info: Font shape `OT1/cmtt/bx/sl' in size <10> not available (Font) Font shape `OT1/cmtt/m/n' tried instead on input line .... bf inside: OT1/cmtt/bx/sl +bf: OT1/cmtt/bx/n +md: OT1/cmtt/m/n +bf: OT1/cmtt/bx/n palatino: OT1/qpl/m/n LaTeX Font Info: Trying to load font information for OT1+qpl on input line .... bf: OT1/qpl/b/n @@ -40,6 +49,9 @@ sl: OT1/qpl/m/sl LaTeX Font Warning: Font shape `OT1/qpl/b/sl' in size <10> not available (Font) Font shape `OT1/qpl/b/it' tried instead on input line .... bf inside: OT1/qpl/b/sl +bf: OT1/qpl/b/n +md: OT1/qpl/m/n +bf: OT1/qpl/b/n ========== std LaTeX T1 ========== start: T1/cmr/m/n bf: T1/cmr/bx/n @@ -47,6 +59,9 @@ italic inside: T1/cmr/bx/it toplevel: T1/cmr/m/n sl: T1/cmr/m/sl bf inside: T1/cmr/bx/sl +bf: T1/cmr/bx/n +md: T1/cmr/m/n +bf: T1/cmr/bx/n LaTeX Font Info: Trying to load font information for T1+cmss on input line .... sf: T1/cmss/m/n bf: T1/cmss/bx/n @@ -54,6 +69,9 @@ italic inside: T1/cmss/bx/it toplevel: T1/cmss/m/n sl: T1/cmss/m/sl bf inside: T1/cmss/bx/sl +bf: T1/cmss/bx/n +md: T1/cmss/m/n +bf: T1/cmss/bx/n LaTeX Font Info: Trying to load font information for T1+cmtt on input line .... tt: T1/cmtt/m/n LaTeX Font Info: Font shape `T1/cmtt/bx/n' in size <10> not available @@ -67,9 +85,15 @@ sl: T1/cmtt/m/sl LaTeX Font Warning: Font shape `T1/cmtt/bx/sl' undefined (Font) using `T1/cmtt/bx/n' instead on input line .... bf inside: T1/cmtt/bx/sl +bf: T1/cmtt/bx/n +md: T1/cmtt/m/n +bf: T1/cmtt/bx/n palatino: T1/qpl/m/n LaTeX Font Info: Trying to load font information for T1+qpl on input line .... bf: T1/qpl/b/n +md: T1/qpl/m/n +bf: T1/qpl/b/n +bf: T1/qpl/b/n italic inside: T1/qpl/b/it toplevel: T1/qpl/m/n LaTeX Font Warning: Font shape `T1/qpl/m/sl' in size <10> not available @@ -78,3 +102,6 @@ sl: T1/qpl/m/sl LaTeX Font Warning: Font shape `T1/qpl/b/sl' in size <10> not available (Font) Font shape `T1/qpl/b/it' tried instead on input line .... bf inside: T1/qpl/b/sl +bf: T1/qpl/b/n +md: T1/qpl/m/n +bf: T1/qpl/b/n From 5323f3736e101365110273055edb9dca11e09f57 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Thu, 10 Oct 2019 20:33:54 +0200 Subject: [PATCH 19/55] probably some more errors somewhere in the rules --- base/nfssaxes.tex | 1 - base/testfiles-search/tlb-nfssaxes-001.lvt | 43 ---------------------- base/testfiles-search/tlb-nfssaxes-001.tlg | 6 +-- 3 files changed, 3 insertions(+), 47 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index f2e33e324..024694dc8 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -201,7 +201,6 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {l}{bx} {bx} {b} %<----- \DeclareFontSeriesChangeRule {l}{b} {b} {bx} %<----- -\DeclareFontSeriesChangeRule {l}{c} {c} {m} % ? %<----- \DeclareFontSeriesChangeRule {l}{c} {lc} {l} % ? %<----- \DeclareFontSeriesChangeRule {l}{sb} {sb} {b} % ? %<----- \DeclareFontSeriesChangeRule {l}{x} {lx} {l} % ? %<----- diff --git a/base/testfiles-search/tlb-nfssaxes-001.lvt b/base/testfiles-search/tlb-nfssaxes-001.lvt index f88203b14..4346cfb52 100644 --- a/base/testfiles-search/tlb-nfssaxes-001.lvt +++ b/base/testfiles-search/tlb-nfssaxes-001.lvt @@ -59,46 +59,3 @@ Testing \verb=\fontseries= \END - -%--------------------------------- - -Testing \verb=\fontseries= - -\testseries{bx} \selectfont after ``{bx}'' -\testseries{l} \selectfont after ``{l}'' -\testseries{c} \selectfont after ``{c}'' % lc doesn't exist -\testseries{m} \selectfont after ``{m} `` -\testseries{c} \selectfont after ``{c} `` -\testseries{b} \selectfont after ``{b}'' -\testseries{bx} \selectfont after ``{bx}'' -\testseries{foo} \selectfont after ``{foo}'' -\testseries{m} \selectfont after ``{m}'' - -\fontfamily{lmr}\selectfont - -Testing \verb=\..shape=s - -Test -\showresult{shape}\upshape after upshape -\showresult{shape}\scshape after scshape -\showresult{shape}\itshape after itshape -\showresult{shape}\slshape after slshape -\showresult{shape}\upshape after upshape -\showresult{shape}\ulcshape after ulcshape - - -%--------------------------------- - -Testing \verb=\fontshape= - -\testshape{n} \selectfont after fontshape ``{n}'' -\testshape{sc} \selectfont after fontshape ``{sc}'' -\testshape{it} \selectfont after fontshape ``{it}'' -\testshape{sl} \selectfont after fontshape ``{sl}'' -\testshape{n} \selectfont after fontshape ``{n}'' -\testshape{ulc} \selectfont after fontshape ``{ulc}'' - -%--------------------------------- - - -\end{document} diff --git a/base/testfiles-search/tlb-nfssaxes-001.tlg b/base/testfiles-search/tlb-nfssaxes-001.tlg index b55ce06c5..60f055161 100644 --- a/base/testfiles-search/tlb-nfssaxes-001.tlg +++ b/base/testfiles-search/tlb-nfssaxes-001.tlg @@ -29,9 +29,9 @@ LaTeX Font Warning: Font shape `T1/lmr/lx/n' undefined \fontseries{l} -> l LaTeX Font Warning: Font shape `T1/lmr/l/n' undefined (Font) using `T1/lmr/m/n' instead on input line .... -LaTeX Font Warning: Font shape `T1/lmr/c/n' undefined -(Font) using `T1/lmr/m/n' instead on input line .... -\fontseries{c} -> m +LaTeX Font Warning: Font shape `T1/lmr/lc/n' undefined +(Font) using `T1/lmr/l/n' instead on input line .... +\fontseries{c} -> l \fontseries{m} -> m LaTeX Font Warning: Font shape `T1/lmr/c/n' undefined (Font) using `T1/lmr/m/n' instead on input line .... From fe51a1661ca83218b1b1fa4c45afcf8e2c8f04cc Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Thu, 10 Oct 2019 20:47:42 +0200 Subject: [PATCH 20/55] use "mm" as a special default for mdseries (with matching rules --- base/nfssaxes.tex | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 024694dc8..56ca7dd7a 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -85,6 +85,7 @@ \DeclareFontSeriesChangeRule {bx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {bx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {bx}{x}{bx}{} +\DeclareFontSeriesChangeRule {bx}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -92,6 +93,7 @@ \DeclareFontSeriesChangeRule {b}{c} {bc} {b} %<----- \DeclareFontSeriesChangeRule {b}{sb} {sb} {b} %<----- \DeclareFontSeriesChangeRule {b}{x} {bx} {b} %<----- +\DeclareFontSeriesChangeRule {b}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -105,6 +107,7 @@ \DeclareFontSeriesChangeRule {c}{ub}{ubc}{} \DeclareFontSeriesChangeRule {c}{ul}{ulc}{} \DeclareFontSeriesChangeRule {c}{x}{x}{m} %<----- +\DeclareFontSeriesChangeRule {c}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -119,6 +122,7 @@ \DeclareFontSeriesChangeRule {ebc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ebc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {ebc}{x}{ebx}{} +\DeclareFontSeriesChangeRule {ebc}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -133,8 +137,13 @@ \DeclareFontSeriesChangeRule {ebx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {ebx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {ebx}{x}{ebx}{} +\DeclareFontSeriesChangeRule {ebx}{mm}{m}{} +% \end{macrocode} +% +% \begin{macrocode} \DeclareFontSeriesChangeRule {eb}{c}{ebc}{} \DeclareFontSeriesChangeRule {eb}{x}{ebx}{} +\DeclareFontSeriesChangeRule {eb}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -149,10 +158,11 @@ \DeclareFontSeriesChangeRule {elc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {elc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {elc}{x}{elx}{} -\DeclareFontSeriesChangeRule {elx}{b}{bx}{} +\DeclareFontSeriesChangeRule {elc}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} +\DeclareFontSeriesChangeRule {elx}{b}{bx}{} \DeclareFontSeriesChangeRule {elx}{c}{elc}{} \DeclareFontSeriesChangeRule {elx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {elx}{el}{elx}{} @@ -163,11 +173,13 @@ \DeclareFontSeriesChangeRule {elx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {elx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {elx}{x}{elx}{} +\DeclareFontSeriesChangeRule {elx}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {el}{c}{elc}{} \DeclareFontSeriesChangeRule {el}{x}{elx}{} +\DeclareFontSeriesChangeRule {el}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -182,6 +194,7 @@ \DeclareFontSeriesChangeRule {lc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {lc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {lc}{x}{lx}{} +\DeclareFontSeriesChangeRule {lc}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -196,6 +209,7 @@ \DeclareFontSeriesChangeRule {lx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {lx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {lx}{x}{lx}{} +\DeclareFontSeriesChangeRule {lx}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -204,6 +218,7 @@ \DeclareFontSeriesChangeRule {l}{c} {lc} {l} % ? %<----- \DeclareFontSeriesChangeRule {l}{sb} {sb} {b} % ? %<----- \DeclareFontSeriesChangeRule {l}{x} {lx} {l} % ? %<----- +\DeclareFontSeriesChangeRule {l}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -213,6 +228,7 @@ \DeclareFontSeriesChangeRule {m}{l} {l} {m} %<----- \DeclareFontSeriesChangeRule {m}{sb} {sb} {b} %<----- \DeclareFontSeriesChangeRule {m}{x} {x} {m} %<----- +\DeclareFontSeriesChangeRule {m}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -227,6 +243,7 @@ \DeclareFontSeriesChangeRule {sbc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {sbc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {sbc}{x}{sbx}{} +\DeclareFontSeriesChangeRule {sbc}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -241,11 +258,13 @@ \DeclareFontSeriesChangeRule {sbx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {sbx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {sbx}{x}{sbx}{} +\DeclareFontSeriesChangeRule {sbx}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {sb}{c} {sbc} {bc} %? %<----- \DeclareFontSeriesChangeRule {sb}{x} {sbx} {bx} %? %<----- +\DeclareFontSeriesChangeRule {sb}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -260,6 +279,7 @@ \DeclareFontSeriesChangeRule {slc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {slc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {slc}{x}{slx}{} +\DeclareFontSeriesChangeRule {slc}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -276,6 +296,7 @@ \DeclareFontSeriesChangeRule {slx}{x}{slx}{} \DeclareFontSeriesChangeRule {sl}{c}{slc}{} \DeclareFontSeriesChangeRule {sl}{x}{slx}{} +\DeclareFontSeriesChangeRule {sl}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -290,6 +311,7 @@ \DeclareFontSeriesChangeRule {ubc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ubc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {ubc}{x}{ubx}{} +\DeclareFontSeriesChangeRule {sbc}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -304,11 +326,13 @@ \DeclareFontSeriesChangeRule {ubx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {ubx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {ubx}{x}{ubx}{} +\DeclareFontSeriesChangeRule {sbx}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {ub}{c}{ubc}{} \DeclareFontSeriesChangeRule {ub}{x}{ubx}{} +\DeclareFontSeriesChangeRule {ub}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -323,6 +347,7 @@ \DeclareFontSeriesChangeRule {ulc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ulc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {ulc}{x}{ulx}{} +\DeclareFontSeriesChangeRule {ulc}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -339,6 +364,7 @@ \DeclareFontSeriesChangeRule {ulx}{x}{ulx}{} \DeclareFontSeriesChangeRule {ul}{c}{ulc}{} \DeclareFontSeriesChangeRule {ul}{x}{ulx}{} +\DeclareFontSeriesChangeRule {ul}{mm}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -352,6 +378,7 @@ \DeclareFontSeriesChangeRule {x}{sl}{slx}{} \DeclareFontSeriesChangeRule {x}{ub}{ubx}{} \DeclareFontSeriesChangeRule {x}{ul}{ulx}{} +\DeclareFontSeriesChangeRule {x}{mm}{m}{} % \end{macrocode} % % \emph{rules need to get completed!} @@ -1010,11 +1037,6 @@ % format generation. Later on they may get overwritten in the % preamble or a package via \cs{DeclareFontSeriesDefault} (or % possibly directly). -% \begin{macrocode} -\edef\mdseries@rm{\mddefault} -\edef\mdseries@sf{\mddefault} -\edef\mdseries@tt{\mddefault} -% \end{macrocode} % % Conceptual change: The \cs{bfdefault} will be \texttt{b} not % \texttt{bx} because that is what it should be really for nearly @@ -1036,6 +1058,16 @@ \edef\bfseries@sf{bx} \edef\bfseries@tt{bx} % \end{macrocode} +% +% We also change the default for the medium series to a virtual +% \texttt{mm}. For this we have rules that it always reset both the +% weight and the width. +% \begin{macrocode} +\renewcommand\mddefault{mm} +\edef\mdseries@rm{\mddefault} +\edef\mdseries@sf{\mddefault} +\edef\mdseries@tt{\mddefault} +% \end{macrocode} % \end{macro} % \end{macro} % \end{macro} From 95e62e4cc3a0caa42655eee758bcd40c3df7e1a5 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Thu, 10 Oct 2019 22:29:04 +0200 Subject: [PATCH 21/55] change of approach: use m ?m and m? for series --- base/nfssaxes.tex | 119 +++++++++++++++++++++++++--------------------- 1 file changed, 64 insertions(+), 55 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 56ca7dd7a..d43560d44 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -46,7 +46,7 @@ % or vize versa. But maybe this is overkill and \cs{bfseries} and % \cs{mdseries} is all that people need in practice.} % -% \emph{explain rationale} +% \emph{explain rationale and m?/?m syntax} % % \begin{macrocode} \DeclareFontSeriesChangeRule {bc}{b}{bc}{} @@ -54,12 +54,13 @@ \DeclareFontSeriesChangeRule {bc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {bc}{el}{elc}{} \DeclareFontSeriesChangeRule {bc}{l}{lc}{} -\DeclareFontSeriesChangeRule {bc}{m}{c}{} \DeclareFontSeriesChangeRule {bc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {bc}{sl}{slc}{} \DeclareFontSeriesChangeRule {bc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {bc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {bc}{x}{bx}{} +\DeclareFontSeriesChangeRule {bc}{m?}{c}{} +\DeclareFontSeriesChangeRule {bc}{?m}{b}{} % \end{macrocode} % % \begin{macrocode} @@ -70,22 +71,13 @@ \DeclareFontSeriesChangeRule {bx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {bx}{el}{elx}{} \DeclareFontSeriesChangeRule {bx}{l}{lx}{} -% \end{macrocode} -% -% Next rule would be logical, but would just result in many -% warnings with the default fonts. Without the rule it maps to ``m''. -% \begin{macrocode} -%\DeclareFontSeriesChangeRule {bx}{m}{x}{} %<----- mainly -% % \mdseries -% \end{macrocode} -% -% \begin{macrocode} \DeclareFontSeriesChangeRule {bx}{sb} {sbx} {} \DeclareFontSeriesChangeRule {bx}{sl}{slx} {} \DeclareFontSeriesChangeRule {bx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {bx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {bx}{x}{bx}{} -\DeclareFontSeriesChangeRule {bx}{mm}{m}{} +\DeclareFontSeriesChangeRule {bx}{m?}{x}{} +\DeclareFontSeriesChangeRule {bx}{?m}{b}{} % \end{macrocode} % % \begin{macrocode} @@ -93,7 +85,8 @@ \DeclareFontSeriesChangeRule {b}{c} {bc} {b} %<----- \DeclareFontSeriesChangeRule {b}{sb} {sb} {b} %<----- \DeclareFontSeriesChangeRule {b}{x} {bx} {b} %<----- -\DeclareFontSeriesChangeRule {b}{mm}{m}{} +\DeclareFontSeriesChangeRule {b}{?m}{b}{} +\DeclareFontSeriesChangeRule {b}{m?}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -107,7 +100,8 @@ \DeclareFontSeriesChangeRule {c}{ub}{ubc}{} \DeclareFontSeriesChangeRule {c}{ul}{ulc}{} \DeclareFontSeriesChangeRule {c}{x}{x}{m} %<----- -\DeclareFontSeriesChangeRule {c}{mm}{m}{} +\DeclareFontSeriesChangeRule {c}{?m}{m}{} +\DeclareFontSeriesChangeRule {c}{m?}{c}{} % \end{macrocode} % % \begin{macrocode} @@ -116,13 +110,13 @@ \DeclareFontSeriesChangeRule {ebc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {ebc}{el}{elc}{} \DeclareFontSeriesChangeRule {ebc}{l}{lc}{} -\DeclareFontSeriesChangeRule {ebc}{m}{c}{} \DeclareFontSeriesChangeRule {ebc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {ebc}{sl}{slc}{} \DeclareFontSeriesChangeRule {ebc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ebc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {ebc}{x}{ebx}{} -\DeclareFontSeriesChangeRule {ebc}{mm}{m}{} +\DeclareFontSeriesChangeRule {ebc}{?m}{eb}{} +\DeclareFontSeriesChangeRule {ebc}{m?}{c}{} % \end{macrocode} % % \begin{macrocode} @@ -131,19 +125,20 @@ \DeclareFontSeriesChangeRule {ebx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {ebx}{el}{elx}{} \DeclareFontSeriesChangeRule {ebx}{l}{lx}{} -\DeclareFontSeriesChangeRule {ebx}{m}{x}{} \DeclareFontSeriesChangeRule {ebx}{sb}{sbx}{} \DeclareFontSeriesChangeRule {ebx}{sl}{slx}{} \DeclareFontSeriesChangeRule {ebx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {ebx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {ebx}{x}{ebx}{} -\DeclareFontSeriesChangeRule {ebx}{mm}{m}{} +\DeclareFontSeriesChangeRule {ebx}{?m}{eb}{} +\DeclareFontSeriesChangeRule {ebx}{m?}{x}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {eb}{c}{ebc}{} \DeclareFontSeriesChangeRule {eb}{x}{ebx}{} -\DeclareFontSeriesChangeRule {eb}{mm}{m}{} +\DeclareFontSeriesChangeRule {eb}{?m}{eb}{} +\DeclareFontSeriesChangeRule {eb}{m?}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -152,13 +147,13 @@ \DeclareFontSeriesChangeRule {elc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {elc}{el}{elc}{} \DeclareFontSeriesChangeRule {elc}{l}{lc}{} -\DeclareFontSeriesChangeRule {elc}{m}{c}{} \DeclareFontSeriesChangeRule {elc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {elc}{sl}{slc}{} \DeclareFontSeriesChangeRule {elc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {elc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {elc}{x}{elx}{} -\DeclareFontSeriesChangeRule {elc}{mm}{m}{} +\DeclareFontSeriesChangeRule {elc}{?m}{el}{} +\DeclareFontSeriesChangeRule {elc}{m?}{c}{} % \end{macrocode} % % \begin{macrocode} @@ -167,19 +162,20 @@ \DeclareFontSeriesChangeRule {elx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {elx}{el}{elx}{} \DeclareFontSeriesChangeRule {elx}{l}{lx}{} -\DeclareFontSeriesChangeRule {elx}{m}{x}{} \DeclareFontSeriesChangeRule {elx}{sb}{sbx}{} \DeclareFontSeriesChangeRule {elx}{sl}{slx}{} \DeclareFontSeriesChangeRule {elx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {elx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {elx}{x}{elx}{} -\DeclareFontSeriesChangeRule {elx}{mm}{m}{} +\DeclareFontSeriesChangeRule {elx}{?m}{el}{} +\DeclareFontSeriesChangeRule {elx}{m?}{x}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {el}{c}{elc}{} \DeclareFontSeriesChangeRule {el}{x}{elx}{} -\DeclareFontSeriesChangeRule {el}{mm}{m}{} +\DeclareFontSeriesChangeRule {el}{?m}{el}{} +\DeclareFontSeriesChangeRule {el}{m?}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -188,13 +184,13 @@ \DeclareFontSeriesChangeRule {lc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {lc}{el}{elc}{} \DeclareFontSeriesChangeRule {lc}{l}{lc}{} -\DeclareFontSeriesChangeRule {lc}{m}{c}{} \DeclareFontSeriesChangeRule {lc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {lc}{sl}{slc}{} \DeclareFontSeriesChangeRule {lc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {lc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {lc}{x}{lx}{} -\DeclareFontSeriesChangeRule {lc}{mm}{m}{} +\DeclareFontSeriesChangeRule {lc}{?m}{l}{} +\DeclareFontSeriesChangeRule {lc}{m?}{c}{} % \end{macrocode} % % \begin{macrocode} @@ -203,13 +199,13 @@ \DeclareFontSeriesChangeRule {lx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {lx}{el}{elx}{} \DeclareFontSeriesChangeRule {lx}{l}{lx}{} -\DeclareFontSeriesChangeRule {lx}{m}{x}{} \DeclareFontSeriesChangeRule {lx}{sb}{sbx}{} \DeclareFontSeriesChangeRule {lx}{sl}{slx}{} \DeclareFontSeriesChangeRule {lx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {lx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {lx}{x}{lx}{} -\DeclareFontSeriesChangeRule {lx}{mm}{m}{} +\DeclareFontSeriesChangeRule {lx}{?m}{l}{} +\DeclareFontSeriesChangeRule {lx}{m?}{x}{} % \end{macrocode} % % \begin{macrocode} @@ -218,7 +214,8 @@ \DeclareFontSeriesChangeRule {l}{c} {lc} {l} % ? %<----- \DeclareFontSeriesChangeRule {l}{sb} {sb} {b} % ? %<----- \DeclareFontSeriesChangeRule {l}{x} {lx} {l} % ? %<----- -\DeclareFontSeriesChangeRule {l}{mm}{m}{} +\DeclareFontSeriesChangeRule {l}{?m}{l}{} +\DeclareFontSeriesChangeRule {l}{m?}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -228,7 +225,8 @@ \DeclareFontSeriesChangeRule {m}{l} {l} {m} %<----- \DeclareFontSeriesChangeRule {m}{sb} {sb} {b} %<----- \DeclareFontSeriesChangeRule {m}{x} {x} {m} %<----- -\DeclareFontSeriesChangeRule {m}{mm}{m}{} +\DeclareFontSeriesChangeRule {m}{?m}{m}{} +\DeclareFontSeriesChangeRule {m}{m?}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -237,13 +235,13 @@ \DeclareFontSeriesChangeRule {sbc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {sbc}{el}{elc}{} \DeclareFontSeriesChangeRule {sbc}{l}{lc}{} -\DeclareFontSeriesChangeRule {sbc}{m}{c}{} \DeclareFontSeriesChangeRule {sbc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {sbc}{sl}{slc}{} \DeclareFontSeriesChangeRule {sbc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {sbc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {sbc}{x}{sbx}{} -\DeclareFontSeriesChangeRule {sbc}{mm}{m}{} +\DeclareFontSeriesChangeRule {sbc}{?m}{sb}{} +\DeclareFontSeriesChangeRule {sbc}{m?}{c}{} % \end{macrocode} % % \begin{macrocode} @@ -252,19 +250,20 @@ \DeclareFontSeriesChangeRule {sbx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {sbx}{el}{elx}{} \DeclareFontSeriesChangeRule {sbx}{l}{lx}{} -\DeclareFontSeriesChangeRule {sbx}{m}{x}{} \DeclareFontSeriesChangeRule {sbx}{sb}{sbx}{} \DeclareFontSeriesChangeRule {sbx}{sl}{slx}{} \DeclareFontSeriesChangeRule {sbx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {sbx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {sbx}{x}{sbx}{} -\DeclareFontSeriesChangeRule {sbx}{mm}{m}{} +\DeclareFontSeriesChangeRule {sbx}{?m}{sb}{} +\DeclareFontSeriesChangeRule {sbx}{m?}{x}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {sb}{c} {sbc} {bc} %? %<----- \DeclareFontSeriesChangeRule {sb}{x} {sbx} {bx} %? %<----- -\DeclareFontSeriesChangeRule {sb}{mm}{m}{} +\DeclareFontSeriesChangeRule {sb}{m?}{m}{} +\DeclareFontSeriesChangeRule {sb}{?m}{sb}{} % \end{macrocode} % % \begin{macrocode} @@ -273,13 +272,13 @@ \DeclareFontSeriesChangeRule {slc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {slc}{el}{elc}{} \DeclareFontSeriesChangeRule {slc}{l}{lc}{} -\DeclareFontSeriesChangeRule {slc}{m}{c}{} \DeclareFontSeriesChangeRule {slc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {slc}{sl}{slc}{} \DeclareFontSeriesChangeRule {slc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {slc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {slc}{x}{slx}{} -\DeclareFontSeriesChangeRule {slc}{mm}{m}{} +\DeclareFontSeriesChangeRule {slc}{?m}{sl}{} +\DeclareFontSeriesChangeRule {slc}{m?}{c}{} % \end{macrocode} % % \begin{macrocode} @@ -288,15 +287,20 @@ \DeclareFontSeriesChangeRule {slx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {slx}{el}{elx}{} \DeclareFontSeriesChangeRule {slx}{l}{lx}{} -\DeclareFontSeriesChangeRule {slx}{m}{x}{} \DeclareFontSeriesChangeRule {slx}{sb}{sbx}{} \DeclareFontSeriesChangeRule {slx}{sl}{slx}{} \DeclareFontSeriesChangeRule {slx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {slx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {slx}{x}{slx}{} +\DeclareFontSeriesChangeRule {slx}{m?}{x}{} +\DeclareFontSeriesChangeRule {slx}{?m}{sl}{} +% \end{macrocode} +% +% \begin{macrocode} \DeclareFontSeriesChangeRule {sl}{c}{slc}{} \DeclareFontSeriesChangeRule {sl}{x}{slx}{} -\DeclareFontSeriesChangeRule {sl}{mm}{m}{} +\DeclareFontSeriesChangeRule {sl}{m?}{m}{} +\DeclareFontSeriesChangeRule {sl}{?m}{sl}{} % \end{macrocode} % % \begin{macrocode} @@ -305,13 +309,13 @@ \DeclareFontSeriesChangeRule {ubc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {ubc}{el}{elc}{} \DeclareFontSeriesChangeRule {ubc}{l}{lc}{} -\DeclareFontSeriesChangeRule {ubc}{m}{c}{} \DeclareFontSeriesChangeRule {ubc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {ubc}{sl}{slc}{} \DeclareFontSeriesChangeRule {ubc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ubc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {ubc}{x}{ubx}{} -\DeclareFontSeriesChangeRule {sbc}{mm}{m}{} +\DeclareFontSeriesChangeRule {ubc}{m?}{c}{} +\DeclareFontSeriesChangeRule {ubc}{?m}{ub}{} % \end{macrocode} % % \begin{macrocode} @@ -320,19 +324,20 @@ \DeclareFontSeriesChangeRule {ubx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {ubx}{el}{elx}{} \DeclareFontSeriesChangeRule {ubx}{l}{lx}{} -\DeclareFontSeriesChangeRule {ubx}{m}{x}{} \DeclareFontSeriesChangeRule {ubx}{sb}{sbx}{} \DeclareFontSeriesChangeRule {ubx}{sl}{slx}{} \DeclareFontSeriesChangeRule {ubx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {ubx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {ubx}{x}{ubx}{} -\DeclareFontSeriesChangeRule {sbx}{mm}{m}{} +\DeclareFontSeriesChangeRule {ubx}{?m}{ub}{} +\DeclareFontSeriesChangeRule {ubx}{m?}{x}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {ub}{c}{ubc}{} \DeclareFontSeriesChangeRule {ub}{x}{ubx}{} -\DeclareFontSeriesChangeRule {ub}{mm}{m}{} +\DeclareFontSeriesChangeRule {ub}{?m}{m}{} +\DeclareFontSeriesChangeRule {ub}{m?}{ub}{} % \end{macrocode} % % \begin{macrocode} @@ -341,13 +346,13 @@ \DeclareFontSeriesChangeRule {ulc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {ulc}{el}{elc}{} \DeclareFontSeriesChangeRule {ulc}{l}{lc}{} -\DeclareFontSeriesChangeRule {ulc}{m}{c}{} \DeclareFontSeriesChangeRule {ulc}{sb}{sbc}{} \DeclareFontSeriesChangeRule {ulc}{sl}{slc}{} \DeclareFontSeriesChangeRule {ulc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ulc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {ulc}{x}{ulx}{} -\DeclareFontSeriesChangeRule {ulc}{mm}{m}{} +\DeclareFontSeriesChangeRule {ulc}{m?}{c}{} +\DeclareFontSeriesChangeRule {ulc}{?m}{ul}{} % \end{macrocode} % % \begin{macrocode} @@ -356,15 +361,20 @@ \DeclareFontSeriesChangeRule {ulx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {ulx}{el}{elx}{} \DeclareFontSeriesChangeRule {ulx}{l}{lx}{} -\DeclareFontSeriesChangeRule {ulx}{m}{x}{} \DeclareFontSeriesChangeRule {ulx}{sb}{sbx}{} \DeclareFontSeriesChangeRule {ulx}{sl}{slx}{} \DeclareFontSeriesChangeRule {ulx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {ulx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {ulx}{x}{ulx}{} +\DeclareFontSeriesChangeRule {ulx}{m?}{x}{} +\DeclareFontSeriesChangeRule {ulx}{?m}{ul}{} +% \end{macrocode} +% +% \begin{macrocode} \DeclareFontSeriesChangeRule {ul}{c}{ulc}{} \DeclareFontSeriesChangeRule {ul}{x}{ulx}{} -\DeclareFontSeriesChangeRule {ul}{mm}{m}{} +\DeclareFontSeriesChangeRule {ul}{m?}{m}{} +\DeclareFontSeriesChangeRule {ul}{?m}{ul}{} % \end{macrocode} % % \begin{macrocode} @@ -373,12 +383,12 @@ \DeclareFontSeriesChangeRule {x}{eb}{ebx}{} \DeclareFontSeriesChangeRule {x}{el}{elx}{} \DeclareFontSeriesChangeRule {x}{l}{lx}{} -\DeclareFontSeriesChangeRule {x}{m}{x}{} \DeclareFontSeriesChangeRule {x}{sb}{sbx}{} \DeclareFontSeriesChangeRule {x}{sl}{slx}{} \DeclareFontSeriesChangeRule {x}{ub}{ubx}{} \DeclareFontSeriesChangeRule {x}{ul}{ulx}{} -\DeclareFontSeriesChangeRule {x}{mm}{m}{} +\DeclareFontSeriesChangeRule {x}{m?}{x}{} +\DeclareFontSeriesChangeRule {x}{?m}{m}{} % \end{macrocode} % % \emph{rules need to get completed!} @@ -1059,11 +1069,10 @@ \edef\bfseries@tt{bx} % \end{macrocode} % -% We also change the default for the medium series to a virtual -% \texttt{mm}. For this we have rules that it always reset both the -% weight and the width. +% The default for the medium series is \texttt{m} and this will be +% interpreted as resetting both weight and width. To reset only one +% of them the virtual value \textt{?m} and \textt{m?} are available. % \begin{macrocode} -\renewcommand\mddefault{mm} \edef\mdseries@rm{\mddefault} \edef\mdseries@sf{\mddefault} \edef\mdseries@tt{\mddefault} From 31e9b1f3361b886b9ca884cf87af5a91867fcba1 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Fri, 11 Oct 2019 15:56:26 +0200 Subject: [PATCH 22/55] documentation and a few rule changes --- base/nfssaxes.tex | 59 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 13 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index d43560d44..2021e50e6 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -41,12 +41,47 @@ % allow for setting up explicit exceptions nicely (not sure that that % would ever get used though). % -% \emph{What is missing, is a way to state on document level that one -% wants to revert, say, the weight to ``regular'' but keep the width -% or vize versa. But maybe this is overkill and \cs{bfseries} and -% \cs{mdseries} is all that people need in practice.} +% Design considerations for mapping entries: +% \begin{itemize} +% \item % -% \emph{explain rationale and m?/?m syntax} +% We make \texttt{m} to reset both weight and width (as this is +% how it always worked). To reset just the width \textt{?m} is +% provided and to reset just the weight \texttt{m?}. +% +% \item +% +% If there is no table entry then the target series is used +% unconditionally. This means that any request to set both weight +% and width (e.g. \texttt{bx} or \texttt{ulc}) needs no table +% entries. +% for tht reason there are no entries which have a weight+width +% request (as second argument). +% +% \item +% +% Only a few entries have ``alterative'' values and perhaps most of +% them should get dropped. Or maybe not \ldots{} needs some thought +% perhaps. +% +% The idea is that you don't want the normal substitution to kick +% in because that would reset the shape first and it may be better +% to stay with \texttt{b} when a change to \texttt{c} is requested +% and \texttt{bc} doesn't exist, than to go to first change the +% shape to \texttt{n} and then find that \texttt{bc/n} doesn't +% exist either and thus ending up wth \texttt{m/n}. +% +% \item +% +% Also: while I did set up all nine standard weight values from +% \texttt{ul} to \textt{ub} I only bothered to provide entries for +% \texttt{c} and \texttt{x}, because other levels of +% compression/expansion are really really seldom. +% +% Could and perhaps should be eventually extended to cover the +% whole set. +% +% \end{itemize} % % \begin{macrocode} \DeclareFontSeriesChangeRule {bc}{b}{bc}{} @@ -64,8 +99,6 @@ % \end{macrocode} % % \begin{macrocode} -\DeclareFontSeriesChangeRule {bx}{bx} {bx} {b} %<----- -\DeclareFontSeriesChangeRule {bx}{b} {b} {bx} %<----- \DeclareFontSeriesChangeRule {bx}{b}{bx}{} \DeclareFontSeriesChangeRule {bx}{c} {bc} {bx} %<----- \DeclareFontSeriesChangeRule {bx}{eb}{ebx}{} @@ -391,7 +424,7 @@ \DeclareFontSeriesChangeRule {x}{?m}{m}{} % \end{macrocode} % -% \emph{rules need to get completed!} +% \emph{rules need to get completed/verified!} % % @@ -460,18 +493,18 @@ \else \ifcsname \f@encoding /\f@family /#2/\f@shape \endcsname % \end{macrocode} -% If the alternate result exist we use that +% If the alternate result exist we use that and also issue a +% warning (or rather a log entry) that we didn't managed to change +% to the desired font. % \begin{macrocode} \edef\f@series{#2}% \@font@shape@subst@warning % \end{macrocode} -% If that doesn't exist either, then we use the requested series unmodified. +% If that doesn't exist either, then we use the requested series unmodified +% (again with a warning). % \begin{macrocode} \else \edef\f@series{#3}% -% \end{macrocode} -% We issue a warning that we didn't managed to change to the desired font. -% \begin{macrocode} \@font@shape@subst@warning \fi \fi From 2e5635d6a3fa76a842e647c6e8632c5be82fcc90 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Fri, 11 Oct 2019 17:10:30 +0200 Subject: [PATCH 23/55] more documentation, more tests and dropping unnecessary shape rules --- base/nfssaxes.tex | 37 +++++++++++-------- base/testfiles-search/tlb-nfssaxes-001.lvt | 14 ++++++- base/testfiles-search/tlb-nfssaxes-001.tlg | 43 ++++++++++++++-------- 3 files changed, 62 insertions(+), 32 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 2021e50e6..6c1e2953c 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -613,40 +613,47 @@ % % % \subsection{Mapping rules for shape combinations} - +% +% Many of the entries are commented out as we will get that result +% without any entry. % \begin{macrocode} -\DeclareFontShapeChangeRule {n}{n} {n} {} +%\DeclareFontShapeChangeRule {n}{n} {n} {} \DeclareFontShapeChangeRule {n}{it} {it} {sl} \DeclareFontShapeChangeRule {n}{sl} {sl} {it} -\DeclareFontShapeChangeRule {n}{sw} {sw} {} -\DeclareFontShapeChangeRule {n}{sc} {sc} {} +%\DeclareFontShapeChangeRule {n}{sw} {sw} {} +%\DeclareFontShapeChangeRule {n}{sc} {sc} {} \DeclareFontShapeChangeRule {n}{ulc} {n} {} % \end{macrocode} % % \begin{macrocode} -\DeclareFontShapeChangeRule {it}{n} {n} {} -\DeclareFontShapeChangeRule {it}{it} {it} {} +%\DeclareFontShapeChangeRule {it}{n} {n} {} +%\DeclareFontShapeChangeRule {it}{it} {it} {} \DeclareFontShapeChangeRule {it}{sl} {sl} {it} -\DeclareFontShapeChangeRule {it}{sw} {sw} {} -\DeclareFontShapeChangeRule {it}{sc} {scit} {scsl} % or sc or it as second default? +%\DeclareFontShapeChangeRule {it}{sw} {sw} {} +% \end{macrocode} +% If neither \textt{scit} nor \texttt{scsl} exist then \texttt{sc} +% will be used as a fallback albeit with a log entry, so except for +% the latter there will be no change for CM or Latin Modern fonts. +% \begin{macrocode} +\DeclareFontShapeChangeRule {it}{sc} {scit} {scsl} \DeclareFontShapeChangeRule {it}{ulc} {it} {} % \end{macrocode} % % \begin{macrocode} -\DeclareFontShapeChangeRule {sl}{n} {n} {} +%\DeclareFontShapeChangeRule {sl}{n} {n} {} \DeclareFontShapeChangeRule {sl}{it} {it} {sl} -\DeclareFontShapeChangeRule {sl}{sl} {sl} {} -\DeclareFontShapeChangeRule {sl}{sw} {sw} {} -\DeclareFontShapeChangeRule {sl}{sc} {scsl} {scit} % sc or sl as second default? +%\DeclareFontShapeChangeRule {sl}{sl} {sl} {} +%\DeclareFontShapeChangeRule {sl}{sw} {sw} {} +\DeclareFontShapeChangeRule {sl}{sc} {scsl} {scit} \DeclareFontShapeChangeRule {sl}{ulc} {sl} {} % \end{macrocode} % % \begin{macrocode} -\DeclareFontShapeChangeRule {sc}{n} {n} {} +%\DeclareFontShapeChangeRule {sc}{n} {n} {} \DeclareFontShapeChangeRule {sc}{it} {scit} {scsl} \DeclareFontShapeChangeRule {sc}{sl} {scsl} {scit} -\DeclareFontShapeChangeRule {sc}{sw} {scsw} {sc} % ???? -\DeclareFontShapeChangeRule {sc}{sc} {sc} {} +\DeclareFontShapeChangeRule {sc}{sw} {scsw} {sw} +%\DeclareFontShapeChangeRule {sc}{sc} {sc} {} \DeclareFontShapeChangeRule {sc}{ulc} {n} {} % \end{macrocode} % diff --git a/base/testfiles-search/tlb-nfssaxes-001.lvt b/base/testfiles-search/tlb-nfssaxes-001.lvt index 4346cfb52..7f21036a4 100644 --- a/base/testfiles-search/tlb-nfssaxes-001.lvt +++ b/base/testfiles-search/tlb-nfssaxes-001.lvt @@ -17,7 +17,7 @@ \fontencoding{T1}\fontfamily{lmr}\selectfont -\typeout{=========== Testing standard shape declarations ==========} +\typeout{=========== Testing standard shape declarations LM ==========} Test \showresult{shape}\upshape after upshape @@ -31,6 +31,18 @@ Test \showresult{shape}\ulcshape after ulcshape +\typeout{=========== Testing standard shape declarations CM ==========} + +\fontfamily{cmr}\selectfont + +\showresult{shape}\upshape after upshape +\showresult{shape}\itshape after itshape +\showresult{shape}\scshape after scshape % should try scit/scsl then sc +\showresult{shape}\slshape after slshape % should try scsl/scit then sl +\showresult{shape}\ulcshape after ulcshape % no change +\showresult{shape}\upshape after upshape + + \typeout{=========== Testing low-level \string\fontshape\space declarations ==========} Testing \verb=\fontshape= diff --git a/base/testfiles-search/tlb-nfssaxes-001.tlg b/base/testfiles-search/tlb-nfssaxes-001.tlg index 60f055161..18a1fde03 100644 --- a/base/testfiles-search/tlb-nfssaxes-001.tlg +++ b/base/testfiles-search/tlb-nfssaxes-001.tlg @@ -1,7 +1,7 @@ This is a generated file for the LaTeX2e validation system. Don't change this file in any respect. LaTeX Font Info: Trying to load font information for T1+lmr on input line .... -=========== Testing standard shape declarations ========== +=========== Testing standard shape declarations LM ========== \upshape -> n \scshape -> sc LaTeX Font Warning: Font shape `T1/lmr/m/scit' undefined @@ -13,32 +13,43 @@ LaTeX Font Warning: Font shape `T1/lmr/m/scit' undefined \scshape -> scsl \upshape -> sc \ulcshape -> n +=========== Testing standard shape declarations CM ========== +\upshape -> n +\itshape -> it +LaTeX Font Warning: Font shape `T1/cmr/m/scit' undefined +(Font) using `T1/cmr/m/sc' instead on input line .... +\scshape -> sc +LaTeX Font Warning: Font shape `T1/cmr/m/scsl' undefined +(Font) using `T1/cmr/m/sl' instead on input line .... +\slshape -> sl +\ulcshape -> sl +\upshape -> n =========== Testing low-level \fontshape declarations ========== \fontshape{n} -> n \fontshape{sc} -> sc -LaTeX Font Warning: Font shape `T1/lmr/m/scit' undefined -(Font) using `T1/lmr/m/scsl' instead on input line .... -\fontshape{it} -> scsl -\fontshape{sl} -> scsl -\fontshape{n} -> sc +LaTeX Font Warning: Font shape `T1/cmr/m/scit' undefined +(Font) using `T1/cmr/m/it' instead on input line .... +\fontshape{it} -> it +\fontshape{sl} -> sl +\fontshape{n} -> n \fontshape{ulc} -> n =========== Testing low-level \fontseries declarations ========== \fontseries{bx} -> bx -LaTeX Font Warning: Font shape `T1/lmr/lx/n' undefined -(Font) using `T1/lmr/l/n' instead on input line .... +LaTeX Font Warning: Font shape `T1/cmr/lx/n' undefined +(Font) using `T1/cmr/l/n' instead on input line .... \fontseries{l} -> l -LaTeX Font Warning: Font shape `T1/lmr/l/n' undefined -(Font) using `T1/lmr/m/n' instead on input line .... -LaTeX Font Warning: Font shape `T1/lmr/lc/n' undefined -(Font) using `T1/lmr/l/n' instead on input line .... +LaTeX Font Warning: Font shape `T1/cmr/l/n' undefined +(Font) using `T1/cmr/m/n' instead on input line .... +LaTeX Font Warning: Font shape `T1/cmr/lc/n' undefined +(Font) using `T1/cmr/l/n' instead on input line .... \fontseries{c} -> l \fontseries{m} -> m -LaTeX Font Warning: Font shape `T1/lmr/c/n' undefined -(Font) using `T1/lmr/m/n' instead on input line .... +LaTeX Font Warning: Font shape `T1/cmr/c/n' undefined +(Font) using `T1/cmr/m/n' instead on input line .... \fontseries{c} -> m \fontseries{b} -> b \fontseries{bx} -> bx \fontseries{foo} -> foo -LaTeX Font Warning: Font shape `T1/lmr/foo/n' undefined -(Font) using `T1/lmr/m/n' instead on input line .... +LaTeX Font Warning: Font shape `T1/cmr/foo/n' undefined +(Font) using `T1/cmr/m/n' instead on input line .... \fontseries{m} -> m From 681a6d6cbb79ce51eaad3def5f706b14127d8857 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Sat, 12 Oct 2019 16:24:08 +0200 Subject: [PATCH 24/55] more rules --- base/nfssaxes.tex | 222 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 167 insertions(+), 55 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 6c1e2953c..f041de600 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -55,7 +55,7 @@ % unconditionally. This means that any request to set both weight % and width (e.g. \texttt{bx} or \texttt{ulc}) needs no table % entries. -% for tht reason there are no entries which have a weight+width +% For that reason there are no entries which have a weight+width % request (as second argument). % % \item @@ -86,6 +86,7 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {bc}{b}{bc}{} \DeclareFontSeriesChangeRule {bc}{c}{bc}{} +\DeclareFontSeriesChangeRule {bc}{ec}{bec} {bc} \DeclareFontSeriesChangeRule {bc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {bc}{el}{elc}{} \DeclareFontSeriesChangeRule {bc}{l}{lc}{} @@ -94,13 +95,12 @@ \DeclareFontSeriesChangeRule {bc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {bc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {bc}{x}{bx}{} -\DeclareFontSeriesChangeRule {bc}{m?}{c}{} -\DeclareFontSeriesChangeRule {bc}{?m}{b}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {bx}{b}{bx}{} \DeclareFontSeriesChangeRule {bx}{c} {bc} {bx} %<----- +\DeclareFontSeriesChangeRule {bx}{ec} {bec} {bx} %<----- \DeclareFontSeriesChangeRule {bx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {bx}{el}{elx}{} \DeclareFontSeriesChangeRule {bx}{l}{lx}{} @@ -109,17 +109,14 @@ \DeclareFontSeriesChangeRule {bx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {bx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {bx}{x}{bx}{} -\DeclareFontSeriesChangeRule {bx}{m?}{x}{} -\DeclareFontSeriesChangeRule {bx}{?m}{b}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {b}{bx} {bx} {b} %<----- \DeclareFontSeriesChangeRule {b}{c} {bc} {b} %<----- +\DeclareFontSeriesChangeRule {b}{ec} {bec} {b} %<----- \DeclareFontSeriesChangeRule {b}{sb} {sb} {b} %<----- \DeclareFontSeriesChangeRule {b}{x} {bx} {b} %<----- -\DeclareFontSeriesChangeRule {b}{?m}{b}{} -\DeclareFontSeriesChangeRule {b}{m?}{m}{} % \end{macrocode} % % \begin{macrocode} @@ -133,13 +130,12 @@ \DeclareFontSeriesChangeRule {c}{ub}{ubc}{} \DeclareFontSeriesChangeRule {c}{ul}{ulc}{} \DeclareFontSeriesChangeRule {c}{x}{x}{m} %<----- -\DeclareFontSeriesChangeRule {c}{?m}{m}{} -\DeclareFontSeriesChangeRule {c}{m?}{c}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {ebc}{b}{bc}{} \DeclareFontSeriesChangeRule {ebc}{c}{ebc}{} +\DeclareFontSeriesChangeRule {ebc}{ec}{ebec}{ebc} \DeclareFontSeriesChangeRule {ebc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {ebc}{el}{elc}{} \DeclareFontSeriesChangeRule {ebc}{l}{lc}{} @@ -148,13 +144,26 @@ \DeclareFontSeriesChangeRule {ebc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ebc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {ebc}{x}{ebx}{} -\DeclareFontSeriesChangeRule {ebc}{?m}{eb}{} -\DeclareFontSeriesChangeRule {ebc}{m?}{c}{} % \end{macrocode} % +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {ec}{bx} {bx} {b} %<----- +\DeclareFontSeriesChangeRule {ec}{b}{bec}{} +\DeclareFontSeriesChangeRule {ec}{eb}{ebec}{} +\DeclareFontSeriesChangeRule {ec}{el}{elec}{} +\DeclareFontSeriesChangeRule {ec}{l}{lec}{} +\DeclareFontSeriesChangeRule {ec}{sb}{sbec}{} +\DeclareFontSeriesChangeRule {ec}{sl}{slec}{} +\DeclareFontSeriesChangeRule {ec}{ub}{ubec}{} +\DeclareFontSeriesChangeRule {ec}{ul}{ulec}{} +\DeclareFontSeriesChangeRule {ec}{x}{x}{m} %<----- +% \end{macrocode} +% % \begin{macrocode} \DeclareFontSeriesChangeRule {ebx}{b}{bx}{} \DeclareFontSeriesChangeRule {ebx}{c}{ebc}{} +\DeclareFontSeriesChangeRule {ebx}{ec}{ebec}{} \DeclareFontSeriesChangeRule {ebx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {ebx}{el}{elx}{} \DeclareFontSeriesChangeRule {ebx}{l}{lx}{} @@ -163,20 +172,18 @@ \DeclareFontSeriesChangeRule {ebx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {ebx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {ebx}{x}{ebx}{} -\DeclareFontSeriesChangeRule {ebx}{?m}{eb}{} -\DeclareFontSeriesChangeRule {ebx}{m?}{x}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {eb}{c}{ebc}{} +\DeclareFontSeriesChangeRule {eb}{ec}{ebec}{} \DeclareFontSeriesChangeRule {eb}{x}{ebx}{} -\DeclareFontSeriesChangeRule {eb}{?m}{eb}{} -\DeclareFontSeriesChangeRule {eb}{m?}{m}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {elc}{b}{bc}{} \DeclareFontSeriesChangeRule {elc}{c}{elc}{} +\DeclareFontSeriesChangeRule {elc}{ec}{elec}{} \DeclareFontSeriesChangeRule {elc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {elc}{el}{elc}{} \DeclareFontSeriesChangeRule {elc}{l}{lc}{} @@ -185,13 +192,12 @@ \DeclareFontSeriesChangeRule {elc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {elc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {elc}{x}{elx}{} -\DeclareFontSeriesChangeRule {elc}{?m}{el}{} -\DeclareFontSeriesChangeRule {elc}{m?}{c}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {elx}{b}{bx}{} \DeclareFontSeriesChangeRule {elx}{c}{elc}{} +\DeclareFontSeriesChangeRule {elx}{ec}{elec}{} \DeclareFontSeriesChangeRule {elx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {elx}{el}{elx}{} \DeclareFontSeriesChangeRule {elx}{l}{lx}{} @@ -200,20 +206,18 @@ \DeclareFontSeriesChangeRule {elx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {elx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {elx}{x}{elx}{} -\DeclareFontSeriesChangeRule {elx}{?m}{el}{} -\DeclareFontSeriesChangeRule {elx}{m?}{x}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {el}{c}{elc}{} +\DeclareFontSeriesChangeRule {el}{ec}{elec}{} \DeclareFontSeriesChangeRule {el}{x}{elx}{} -\DeclareFontSeriesChangeRule {el}{?m}{el}{} -\DeclareFontSeriesChangeRule {el}{m?}{m}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {lc}{b}{bc}{} \DeclareFontSeriesChangeRule {lc}{c}{lc}{} +\DeclareFontSeriesChangeRule {lc}{ec}{lec}{} \DeclareFontSeriesChangeRule {lc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {lc}{el}{elc}{} \DeclareFontSeriesChangeRule {lc}{l}{lc}{} @@ -222,13 +226,12 @@ \DeclareFontSeriesChangeRule {lc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {lc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {lc}{x}{lx}{} -\DeclareFontSeriesChangeRule {lc}{?m}{l}{} -\DeclareFontSeriesChangeRule {lc}{m?}{c}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {lx}{b}{bx}{} \DeclareFontSeriesChangeRule {lx}{c}{lc}{} +\DeclareFontSeriesChangeRule {lx}{ec}{lec}{} \DeclareFontSeriesChangeRule {lx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {lx}{el}{elx}{} \DeclareFontSeriesChangeRule {lx}{l}{lx}{} @@ -237,34 +240,31 @@ \DeclareFontSeriesChangeRule {lx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {lx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {lx}{x}{lx}{} -\DeclareFontSeriesChangeRule {lx}{?m}{l}{} -\DeclareFontSeriesChangeRule {lx}{m?}{x}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {l}{bx} {bx} {b} %<----- \DeclareFontSeriesChangeRule {l}{b} {b} {bx} %<----- \DeclareFontSeriesChangeRule {l}{c} {lc} {l} % ? %<----- +\DeclareFontSeriesChangeRule {l}{ec} {lec} {l} % ? %<----- \DeclareFontSeriesChangeRule {l}{sb} {sb} {b} % ? %<----- \DeclareFontSeriesChangeRule {l}{x} {lx} {l} % ? %<----- -\DeclareFontSeriesChangeRule {l}{?m}{l}{} -\DeclareFontSeriesChangeRule {l}{m?}{m}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {m}{bx} {bx} {b} %<----- \DeclareFontSeriesChangeRule {m}{b} {b} {bx} %<----- \DeclareFontSeriesChangeRule {m}{c} {c} {m} %<----- +\DeclareFontSeriesChangeRule {m}{ec} {ec} {m} %<----- \DeclareFontSeriesChangeRule {m}{l} {l} {m} %<----- \DeclareFontSeriesChangeRule {m}{sb} {sb} {b} %<----- \DeclareFontSeriesChangeRule {m}{x} {x} {m} %<----- -\DeclareFontSeriesChangeRule {m}{?m}{m}{} -\DeclareFontSeriesChangeRule {m}{m?}{m}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {sbc}{b}{bc}{} \DeclareFontSeriesChangeRule {sbc}{c}{sbc}{} +\DeclareFontSeriesChangeRule {sbc}{ec}{sbec}{sbc} \DeclareFontSeriesChangeRule {sbc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {sbc}{el}{elc}{} \DeclareFontSeriesChangeRule {sbc}{l}{lc}{} @@ -273,13 +273,12 @@ \DeclareFontSeriesChangeRule {sbc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {sbc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {sbc}{x}{sbx}{} -\DeclareFontSeriesChangeRule {sbc}{?m}{sb}{} -\DeclareFontSeriesChangeRule {sbc}{m?}{c}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {sbx}{b}{bx}{} \DeclareFontSeriesChangeRule {sbx}{c}{sbc}{} +\DeclareFontSeriesChangeRule {sbx}{ec}{sbec}{} \DeclareFontSeriesChangeRule {sbx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {sbx}{el}{elx}{} \DeclareFontSeriesChangeRule {sbx}{l}{lx}{} @@ -288,20 +287,18 @@ \DeclareFontSeriesChangeRule {sbx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {sbx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {sbx}{x}{sbx}{} -\DeclareFontSeriesChangeRule {sbx}{?m}{sb}{} -\DeclareFontSeriesChangeRule {sbx}{m?}{x}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {sb}{c} {sbc} {bc} %? %<----- +\DeclareFontSeriesChangeRule {sb}{ec} {sbec} {bc} %? %<----- \DeclareFontSeriesChangeRule {sb}{x} {sbx} {bx} %? %<----- -\DeclareFontSeriesChangeRule {sb}{m?}{m}{} -\DeclareFontSeriesChangeRule {sb}{?m}{sb}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {slc}{b}{bc}{} \DeclareFontSeriesChangeRule {slc}{c}{slc}{} +\DeclareFontSeriesChangeRule {slc}{ec}{slec}{} \DeclareFontSeriesChangeRule {slc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {slc}{el}{elc}{} \DeclareFontSeriesChangeRule {slc}{l}{lc}{} @@ -310,13 +307,12 @@ \DeclareFontSeriesChangeRule {slc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {slc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {slc}{x}{slx}{} -\DeclareFontSeriesChangeRule {slc}{?m}{sl}{} -\DeclareFontSeriesChangeRule {slc}{m?}{c}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {slx}{b}{bx}{} \DeclareFontSeriesChangeRule {slx}{c}{slc}{} +\DeclareFontSeriesChangeRule {slx}{ec}{slec}{} \DeclareFontSeriesChangeRule {slx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {slx}{el}{elx}{} \DeclareFontSeriesChangeRule {slx}{l}{lx}{} @@ -325,20 +321,18 @@ \DeclareFontSeriesChangeRule {slx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {slx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {slx}{x}{slx}{} -\DeclareFontSeriesChangeRule {slx}{m?}{x}{} -\DeclareFontSeriesChangeRule {slx}{?m}{sl}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {sl}{c}{slc}{} +\DeclareFontSeriesChangeRule {sl}{ec}{slec}{} \DeclareFontSeriesChangeRule {sl}{x}{slx}{} -\DeclareFontSeriesChangeRule {sl}{m?}{m}{} -\DeclareFontSeriesChangeRule {sl}{?m}{sl}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {ubc}{b}{bc}{} \DeclareFontSeriesChangeRule {ubc}{c}{ubc}{} +\DeclareFontSeriesChangeRule {ubc}{ec}{ubec}{} \DeclareFontSeriesChangeRule {ubc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {ubc}{el}{elc}{} \DeclareFontSeriesChangeRule {ubc}{l}{lc}{} @@ -347,13 +341,12 @@ \DeclareFontSeriesChangeRule {ubc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ubc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {ubc}{x}{ubx}{} -\DeclareFontSeriesChangeRule {ubc}{m?}{c}{} -\DeclareFontSeriesChangeRule {ubc}{?m}{ub}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {ubx}{b}{bx}{} \DeclareFontSeriesChangeRule {ubx}{c}{ubc}{} +\DeclareFontSeriesChangeRule {ubx}{ec}{ubec}{} \DeclareFontSeriesChangeRule {ubx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {ubx}{el}{elx}{} \DeclareFontSeriesChangeRule {ubx}{l}{lx}{} @@ -362,20 +355,18 @@ \DeclareFontSeriesChangeRule {ubx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {ubx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {ubx}{x}{ubx}{} -\DeclareFontSeriesChangeRule {ubx}{?m}{ub}{} -\DeclareFontSeriesChangeRule {ubx}{m?}{x}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {ub}{c}{ubc}{} +\DeclareFontSeriesChangeRule {ub}{ec}{ubec}{} \DeclareFontSeriesChangeRule {ub}{x}{ubx}{} -\DeclareFontSeriesChangeRule {ub}{?m}{m}{} -\DeclareFontSeriesChangeRule {ub}{m?}{ub}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {ulc}{b}{bc}{} \DeclareFontSeriesChangeRule {ulc}{c}{ulc}{} +\DeclareFontSeriesChangeRule {ulc}{ec}{ulec}{ulc} \DeclareFontSeriesChangeRule {ulc}{eb}{ebc}{} \DeclareFontSeriesChangeRule {ulc}{el}{elc}{} \DeclareFontSeriesChangeRule {ulc}{l}{lc}{} @@ -384,13 +375,12 @@ \DeclareFontSeriesChangeRule {ulc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ulc}{ul}{ulc}{} \DeclareFontSeriesChangeRule {ulc}{x}{ulx}{} -\DeclareFontSeriesChangeRule {ulc}{m?}{c}{} -\DeclareFontSeriesChangeRule {ulc}{?m}{ul}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {ulx}{b}{bx}{} \DeclareFontSeriesChangeRule {ulx}{c}{ulc}{} +\DeclareFontSeriesChangeRule {ulx}{ec}{ulec}{} \DeclareFontSeriesChangeRule {ulx}{eb}{ebx}{} \DeclareFontSeriesChangeRule {ulx}{el}{elx}{} \DeclareFontSeriesChangeRule {ulx}{l}{lx}{} @@ -399,20 +389,18 @@ \DeclareFontSeriesChangeRule {ulx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {ulx}{ul}{ulx}{} \DeclareFontSeriesChangeRule {ulx}{x}{ulx}{} -\DeclareFontSeriesChangeRule {ulx}{m?}{x}{} -\DeclareFontSeriesChangeRule {ulx}{?m}{ul}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {ul}{c}{ulc}{} +\DeclareFontSeriesChangeRule {ul}{ec}{ulec}{} \DeclareFontSeriesChangeRule {ul}{x}{ulx}{} -\DeclareFontSeriesChangeRule {ul}{m?}{m}{} -\DeclareFontSeriesChangeRule {ul}{?m}{ul}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {x}{b}{bx}{} \DeclareFontSeriesChangeRule {x}{c}{c}{} +\DeclareFontSeriesChangeRule {x}{ec}{ec}{} \DeclareFontSeriesChangeRule {x}{eb}{ebx}{} \DeclareFontSeriesChangeRule {x}{el}{elx}{} \DeclareFontSeriesChangeRule {x}{l}{lx}{} @@ -420,8 +408,129 @@ \DeclareFontSeriesChangeRule {x}{sl}{slx}{} \DeclareFontSeriesChangeRule {x}{ub}{ubx}{} \DeclareFontSeriesChangeRule {x}{ul}{ulx}{} -\DeclareFontSeriesChangeRule {x}{m?}{x}{} +% \end{macrocode} +% +% Special rules for \texttt{m?}: +% \begin{macrocode} +\DeclareFontSeriesChangeRule {bc}{m?}{c}{} +\DeclareFontSeriesChangeRule {bx}{m?}{x}{} +\DeclareFontSeriesChangeRule {b}{m?}{m}{} +\DeclareFontSeriesChangeRule {c}{m?}{c}{} +\DeclareFontSeriesChangeRule {ebc}{m?}{c}{} +\DeclareFontSeriesChangeRule {ebx}{m?}{x}{} +\DeclareFontSeriesChangeRule {eb}{m?}{m}{} +\DeclareFontSeriesChangeRule {elc}{m?}{c}{} +\DeclareFontSeriesChangeRule {elx}{m?}{x}{} +\DeclareFontSeriesChangeRule {el}{m?}{m}{} +\DeclareFontSeriesChangeRule {lc}{m?}{c}{} +\DeclareFontSeriesChangeRule {lx}{m?}{x}{} +\DeclareFontSeriesChangeRule {l}{m?}{m}{} +\DeclareFontSeriesChangeRule {m}{m?}{m}{} +\DeclareFontSeriesChangeRule {sbc}{m?}{c}{} +\DeclareFontSeriesChangeRule {sbx}{m?}{x}{} +\DeclareFontSeriesChangeRule {sb}{m?}{m}{} +\DeclareFontSeriesChangeRule {slc}{m?}{c}{} +\DeclareFontSeriesChangeRule {slx}{m?}{x}{} +\DeclareFontSeriesChangeRule {sl}{m?}{m}{} +\DeclareFontSeriesChangeRule {ubc}{m?}{c}{} +\DeclareFontSeriesChangeRule {ubx}{m?}{x}{} +\DeclareFontSeriesChangeRule {ub}{m?}{ub}{} +\DeclareFontSeriesChangeRule {ulc}{m?}{c}{} +\DeclareFontSeriesChangeRule {ulx}{m?}{x}{} +\DeclareFontSeriesChangeRule {ul}{m?}{m}{} +\DeclareFontSeriesChangeRule {x}{m?}{x}{} + +\DeclareFontSeriesChangeRule {ec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {bec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {ebec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {elec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {lec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {sbec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {slec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {ubec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {ulec}{m?}{ec}{} +% \end{macrocode} +% +% Special rules for \texttt{?m}: +% \begin{macrocode} +\DeclareFontSeriesChangeRule {bc}{?m}{b}{} +\DeclareFontSeriesChangeRule {bx}{?m}{b}{} +\DeclareFontSeriesChangeRule {b}{?m}{b}{} +\DeclareFontSeriesChangeRule {c}{?m}{m}{} +\DeclareFontSeriesChangeRule {ebc}{?m}{eb}{} +\DeclareFontSeriesChangeRule {ebx}{?m}{eb}{} +\DeclareFontSeriesChangeRule {eb}{?m}{eb}{} +\DeclareFontSeriesChangeRule {elc}{?m}{el}{} +\DeclareFontSeriesChangeRule {elx}{?m}{el}{} +\DeclareFontSeriesChangeRule {el}{?m}{el}{} +\DeclareFontSeriesChangeRule {lc}{?m}{l}{} +\DeclareFontSeriesChangeRule {lx}{?m}{l}{} +\DeclareFontSeriesChangeRule {l}{?m}{l}{} +\DeclareFontSeriesChangeRule {m}{?m}{m}{} +\DeclareFontSeriesChangeRule {sbc}{?m}{sb}{} +\DeclareFontSeriesChangeRule {sbx}{?m}{sb}{} +\DeclareFontSeriesChangeRule {sb}{?m}{sb}{} +\DeclareFontSeriesChangeRule {slc}{?m}{sl}{} +\DeclareFontSeriesChangeRule {slx}{?m}{sl}{} +\DeclareFontSeriesChangeRule {sl}{?m}{sl}{} +\DeclareFontSeriesChangeRule {ubc}{?m}{ub}{} +\DeclareFontSeriesChangeRule {ubx}{?m}{ub}{} +\DeclareFontSeriesChangeRule {ub}{?m}{m}{} +\DeclareFontSeriesChangeRule {ulc}{?m}{ul}{} +\DeclareFontSeriesChangeRule {ulx}{?m}{ul}{} +\DeclareFontSeriesChangeRule {ul}{?m}{ul}{} \DeclareFontSeriesChangeRule {x}{?m}{m}{} + +\DeclareFontSeriesChangeRule {bec}{?m}{b}{} +\DeclareFontSeriesChangeRule {ec}{?m}{m}{} +\DeclareFontSeriesChangeRule {ebec}{?m}{eb}{} +\DeclareFontSeriesChangeRule {elec}{?m}{el}{} +\DeclareFontSeriesChangeRule {lec}{?m}{l}{} +\DeclareFontSeriesChangeRule {sbec}{?m}{sb}{} +\DeclareFontSeriesChangeRule {slec}{?m}{sl}{} +\DeclareFontSeriesChangeRule {ubec}{?m}{ub}{} +\DeclareFontSeriesChangeRule {ulec}{?m}{ul}{} +% \end{macrocode} +% +% Special rules for \texttt{mc}: +% \begin{macrocode} +\DeclareFontSeriesChangeRule {bc}{mc}{c}{} +\DeclareFontSeriesChangeRule {bx}{mc}{c}{} +\DeclareFontSeriesChangeRule {b}{mc}{c}{} +\DeclareFontSeriesChangeRule {c}{mc}{c}{} +\DeclareFontSeriesChangeRule {ec}{mc}{c}{} +\DeclareFontSeriesChangeRule {ebc}{mc}{c}{} +\DeclareFontSeriesChangeRule {ebx}{mc}{c}{} +\DeclareFontSeriesChangeRule {eb}{mc}{c}{} +\DeclareFontSeriesChangeRule {elc}{mc}{c}{} +\DeclareFontSeriesChangeRule {elx}{mc}{c}{} +\DeclareFontSeriesChangeRule {el}{mc}{c}{} +\DeclareFontSeriesChangeRule {lc}{mc}{c}{} +\DeclareFontSeriesChangeRule {lx}{mc}{c}{} +\DeclareFontSeriesChangeRule {l}{mc}{c}{} +\DeclareFontSeriesChangeRule {m}{mc}{c}{} +\DeclareFontSeriesChangeRule {sbc}{mc}{c}{} +\DeclareFontSeriesChangeRule {sbx}{mc}{c}{} +\DeclareFontSeriesChangeRule {sb}{mc}{c}{} +\DeclareFontSeriesChangeRule {slc}{mc}{c}{} +\DeclareFontSeriesChangeRule {slx}{mc}{c}{} +\DeclareFontSeriesChangeRule {sl}{mc}{c}{} +\DeclareFontSeriesChangeRule {ubc}{mc}{c}{} +\DeclareFontSeriesChangeRule {ubx}{mc}{c}{} +\DeclareFontSeriesChangeRule {ub}{mc}{c}{} +\DeclareFontSeriesChangeRule {ulc}{mc}{c}{} +\DeclareFontSeriesChangeRule {ulx}{mc}{c}{} +\DeclareFontSeriesChangeRule {ul}{mc}{c}{} +\DeclareFontSeriesChangeRule {x}{mc}{c}{} + +\DeclareFontSeriesChangeRule {bce}{mc}{ec}{} +\DeclareFontSeriesChangeRule {ebec}{mc}{ec}{} +\DeclareFontSeriesChangeRule {elec}{mc}{ec}{} +\DeclareFontSeriesChangeRule {lec}{mc}{ec}{} +\DeclareFontSeriesChangeRule {sbec}{mc}{ec}{} +\DeclareFontSeriesChangeRule {slec}{mc}{ec}{} +\DeclareFontSeriesChangeRule {ubec}{mc}{ec}{} +\DeclareFontSeriesChangeRule {ulec}{mc}{ec}{} % \end{macrocode} % % \emph{rules need to get completed/verified!} @@ -564,6 +673,7 @@ % % \begin{macro}{\ulcshape} % \begin{macro}{\textulc} +% \begin{macro}{\ulcdefault} % To request going back to upper/lowercase we need a new % command. It uses \texttt{ulc} as shape name but this shape is % virtual, i.e., it doesn't exist as a real shape, it is only used @@ -572,11 +682,13 @@ % \begin{macrocode} \DeclareRobustCommand\ulcshape {\not@math@alphabet\ulcshape\relax - \fontshape{ulc}\selectfont} + \fontshape\ulcdefault\selectfont} \DeclareTextFontCommand{\textulc}{\ulcshape} % back to upper/lower case +\newcommand\ulcdefault{ulc} % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\swshape} % \begin{macro}{\textsw} From 25ad9386ac95d3601c8248b52433f400c7887310 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Sat, 12 Oct 2019 20:04:17 +0200 Subject: [PATCH 25/55] fixing an issue that existed in mweights all the time --- base/nfssaxes.tex | 92 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 65 insertions(+), 27 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index f041de600..dae557fae 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -1331,6 +1331,15 @@ % \begin{macrocode} \expand@font@defaults % \end{macrocode} +% We have to do the testing while while the current family is still +% unchanged but we have to do the adjustment of the series after it +% got changed (because the new family might has different sets +% ofshapes available and we certainly don't want to see +% substituation going on. So we use \cs{target@series@value} to +% hold the target series (if any). +% \begin{macrocode} + \let\target@series@value\@empty +% \end{macrocode} % Thus, if the current family is the sans family % \begin{macrocode} \ifx\f@family\sfdef@ult @@ -1341,18 +1350,18 @@ % \end{macrocode} % then lets switch to the medium series for the serif family % \begin{macrocode} - \fontseries\mdseries@rm + \let\target@series@value\mdseries@rm % \end{macrocode} % and if we use the bold series of the sans family switch to the % bold default of the serif family: % \begin{macrocode} - \else\ifx\f@series\bfseries@sf \fontseries\bfseries@rm + \else\ifx\f@series\bfseries@sf \let\target@series@value\bfseries@rm % \end{macrocode} % However, the sans family may not have any specific defaults set, % so we also compare with the verall defaults. % \begin{macrocode} - \else\ifx\f@series\mddef@ult \fontseries\mdseries@rm - \else\ifx\f@series\bfdef@ult \fontseries\bfseries@rm + \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@rm + \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@rm % \end{macrocode} % If neither test was true we leave the series alone. This way a % special manual setting such as \verb=\fontseries{lc}= is not @@ -1366,10 +1375,10 @@ % We need to do the same if the current family is the typewriter family: % \begin{macrocode} \else\ifx\f@family\ttdef@ult - \ifx\f@series\mdseries@tt \fontseries\mdseries@rm - \else\ifx\f@series\bfseries@tt \fontseries\bfseries@rm - \else\ifx\f@series\mddef@ult \fontseries\mdseries@rm - \else\ifx\f@series\bfdef@ult \fontseries\bfseries@rm + \ifx\f@series\mdseries@tt \let\target@series@value\mdseries@rm + \else\ifx\f@series\bfseries@tt \let\target@series@value\bfseries@rm + \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@rm + \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@rm \fi\fi\fi\fi % \end{macrocode} % @@ -1379,7 +1388,24 @@ % With these preparations for series out of the way we can now % change the font family to \cs{rmdefault}. % \begin{macrocode} - \fontfamily\rmdefault\selectfont} + \fontfamily\rmdefault +% \end{macrocode} +% +% If \cs{target@series@value} is still empty there is nothing more +% to do other than selecting the new family. However, if not then +% we should update the font series now as well. But there is one +% further subtle issue. We may not have loaded an \textt{.fd} file +% for our target font family yet. In the past that was done in +% \cs{selectfont} if necessary but since we are now doing all the +% comparisons in \cs{fontseries} we need to make sure that the font +% family specifications are already loaded prior to calling +% \cs{fontseries}. +% \begin{macrocode} + \ifx\target@series@value\@empty \else + \begingroup\try@load@fontshape\endgroup + \fontseries\target@series@value + \fi + \selectfont} % \end{macrocode} % % \begin{macro}{\sffamily} @@ -1390,40 +1416,52 @@ \DeclareRobustCommand\sffamily{% \not@math@alphabet\sffamily\mathsf \expand@font@defaults + \let\target@series@value\@empty \ifx\f@family\rmdef@ult - \ifx\f@series\mdseries@rm \fontseries\mdseries@sf - \else\ifx\f@series\bfseries@rm \fontseries\bfseries@sf - \else\ifx\f@series\mddef@ult \fontseries\mdseries@sf - \else\ifx\f@series\bfdef@ult \fontseries\bfseries@sf + \ifx\f@series\mdseries@rm \let\target@series@value\mdseries@sf + \else\ifx\f@series\bfseries@rm \let\target@series@value\bfseries@sf + \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@sf + \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@sf \fi\fi\fi\fi \else\ifx\f@family\ttdef@ult - \ifx\f@series\mdseries@tt \fontseries\mdseries@sf - \else\ifx\f@series\bfseries@tt \fontseries\bfseries@sf - \else\ifx\f@series\mddef@ult \fontseries\mdseries@sf - \else\ifx\f@series\bfdef@ult \fontseries\bfseries@sf + \ifx\f@series\mdseries@tt \let\target@series@value\mdseries@sf + \else\ifx\f@series\bfseries@tt \let\target@series@value\bfseries@sf + \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@sf + \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@sf \fi\fi\fi\fi \fi\fi - \fontfamily\sfdefault\selectfont} + \fontfamily\sfdefault + \ifx\target@series@value\@empty \else + \begingroup\try@load@fontshape\endgroup + \fontseries\target@series@value + \fi + \selectfont} % \end{macrocode} % % \begin{macrocode} \DeclareRobustCommand\ttfamily{% \not@math@alphabet\ttfamily\mathtt \expand@font@defaults + \let\target@series@value\@empty \ifx\f@family\rmdef@ult - \ifx\f@series\mdseries@rm \fontseries\mdseries@tt - \else\ifx\f@series\bfseries@rm \fontseries\bfseries@tt - \else\ifx\f@series\mddef@ult \fontseries\mdseries@tt - \else\ifx\f@series\bfdef@ult \fontseries\bfseries@tt + \ifx\f@series\mdseries@rm \let\target@series@value\mdseries@tt + \else\ifx\f@series\bfseries@rm \let\target@series@value\bfseries@tt + \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@tt + \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@tt \fi\fi\fi\fi \else\ifx\f@family\rmdef@ult - \ifx\f@series\mdseries@rm \fontseries\mdseries@tt - \else\ifx\f@series\bfseries@rm \fontseries\bfseries@tt - \else\ifx\f@series\mddef@ult \fontseries\mdseries@tt - \else\ifx\f@series\bfdef@ult \fontseries\bfseries@tt + \ifx\f@series\mdseries@rm \let\target@series@value\mdseries@tt + \else\ifx\f@series\bfseries@rm \let\target@series@value\bfseries@tt + \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@tt + \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@tt \fi\fi\fi\fi \fi\fi - \fontfamily\ttdefault\selectfont} + \fontfamily\ttdefault + \ifx\target@series@value\@empty \else + \begingroup\try@load@fontshape\endgroup + \fontseries\target@series@value + \fi + \selectfont} % \end{macrocode} % \end{macro} % \end{macro} From e6f6aafecba3f5a6a9162389bdd06d7b6c5b0a68 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Sat, 12 Oct 2019 22:51:21 +0200 Subject: [PATCH 26/55] more rules, support ec and sc (available in noto fonts) --- base/nfssaxes.tex | 219 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 171 insertions(+), 48 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index dae557fae..0522248a9 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -86,11 +86,12 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {bc}{b}{bc}{} \DeclareFontSeriesChangeRule {bc}{c}{bc}{} -\DeclareFontSeriesChangeRule {bc}{ec}{bec} {bc} \DeclareFontSeriesChangeRule {bc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {bc}{ec}{bec} {bc} \DeclareFontSeriesChangeRule {bc}{el}{elc}{} \DeclareFontSeriesChangeRule {bc}{l}{lc}{} \DeclareFontSeriesChangeRule {bc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {bc}{sc}{bsc} {bc} \DeclareFontSeriesChangeRule {bc}{sl}{slc}{} \DeclareFontSeriesChangeRule {bc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {bc}{ul}{ulc}{} @@ -100,11 +101,12 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {bx}{b}{bx}{} \DeclareFontSeriesChangeRule {bx}{c} {bc} {bx} %<----- -\DeclareFontSeriesChangeRule {bx}{ec} {bec} {bx} %<----- \DeclareFontSeriesChangeRule {bx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {bx}{ec} {bec} {bx} %<----- \DeclareFontSeriesChangeRule {bx}{el}{elx}{} \DeclareFontSeriesChangeRule {bx}{l}{lx}{} \DeclareFontSeriesChangeRule {bx}{sb} {sbx} {} +\DeclareFontSeriesChangeRule {bx}{sc} {bsc} {bx} %<----- \DeclareFontSeriesChangeRule {bx}{sl}{slx} {} \DeclareFontSeriesChangeRule {bx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {bx}{ul}{ulx}{} @@ -116,6 +118,7 @@ \DeclareFontSeriesChangeRule {b}{c} {bc} {b} %<----- \DeclareFontSeriesChangeRule {b}{ec} {bec} {b} %<----- \DeclareFontSeriesChangeRule {b}{sb} {sb} {b} %<----- +\DeclareFontSeriesChangeRule {b}{sc} {bsc} {b} %<----- \DeclareFontSeriesChangeRule {b}{x} {bx} {b} %<----- % \end{macrocode} % @@ -135,11 +138,12 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {ebc}{b}{bc}{} \DeclareFontSeriesChangeRule {ebc}{c}{ebc}{} -\DeclareFontSeriesChangeRule {ebc}{ec}{ebec}{ebc} \DeclareFontSeriesChangeRule {ebc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {ebc}{ec}{ebec}{ebc} \DeclareFontSeriesChangeRule {ebc}{el}{elc}{} \DeclareFontSeriesChangeRule {ebc}{l}{lc}{} \DeclareFontSeriesChangeRule {ebc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {ebc}{sc}{ebsc}{ebc} \DeclareFontSeriesChangeRule {ebc}{sl}{slc}{} \DeclareFontSeriesChangeRule {ebc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ebc}{ul}{ulc}{} @@ -159,15 +163,29 @@ \DeclareFontSeriesChangeRule {ec}{ul}{ulec}{} \DeclareFontSeriesChangeRule {ec}{x}{x}{m} %<----- % \end{macrocode} +% +% \begin{macrocode} +\DeclareFontSeriesChangeRule {sc}{bx} {bx} {b} %<----- +\DeclareFontSeriesChangeRule {sc}{b}{bsc}{} +\DeclareFontSeriesChangeRule {sc}{eb}{ebsc}{} +\DeclareFontSeriesChangeRule {sc}{el}{elsc}{} +\DeclareFontSeriesChangeRule {sc}{l}{lsc}{} +\DeclareFontSeriesChangeRule {sc}{sb}{sbsc}{} +\DeclareFontSeriesChangeRule {sc}{sl}{slsc}{} +\DeclareFontSeriesChangeRule {sc}{ub}{ubsc}{} +\DeclareFontSeriesChangeRule {sc}{ul}{ulsc}{} +\DeclareFontSeriesChangeRule {sc}{x}{x}{m} %<----- +% \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {ebx}{b}{bx}{} \DeclareFontSeriesChangeRule {ebx}{c}{ebc}{} -\DeclareFontSeriesChangeRule {ebx}{ec}{ebec}{} \DeclareFontSeriesChangeRule {ebx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {ebx}{ec}{ebec}{} \DeclareFontSeriesChangeRule {ebx}{el}{elx}{} \DeclareFontSeriesChangeRule {ebx}{l}{lx}{} \DeclareFontSeriesChangeRule {ebx}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {ebx}{sc}{ebsc}{} \DeclareFontSeriesChangeRule {ebx}{sl}{slx}{} \DeclareFontSeriesChangeRule {ebx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {ebx}{ul}{ulx}{} @@ -177,17 +195,19 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {eb}{c}{ebc}{} \DeclareFontSeriesChangeRule {eb}{ec}{ebec}{} +\DeclareFontSeriesChangeRule {eb}{sc}{ebsc}{} \DeclareFontSeriesChangeRule {eb}{x}{ebx}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {elc}{b}{bc}{} \DeclareFontSeriesChangeRule {elc}{c}{elc}{} -\DeclareFontSeriesChangeRule {elc}{ec}{elec}{} \DeclareFontSeriesChangeRule {elc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {elc}{ec}{elec}{} \DeclareFontSeriesChangeRule {elc}{el}{elc}{} \DeclareFontSeriesChangeRule {elc}{l}{lc}{} \DeclareFontSeriesChangeRule {elc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {elc}{sc}{elsc}{} \DeclareFontSeriesChangeRule {elc}{sl}{slc}{} \DeclareFontSeriesChangeRule {elc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {elc}{ul}{ulc}{} @@ -197,11 +217,12 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {elx}{b}{bx}{} \DeclareFontSeriesChangeRule {elx}{c}{elc}{} -\DeclareFontSeriesChangeRule {elx}{ec}{elec}{} \DeclareFontSeriesChangeRule {elx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {elx}{ec}{elec}{} \DeclareFontSeriesChangeRule {elx}{el}{elx}{} \DeclareFontSeriesChangeRule {elx}{l}{lx}{} \DeclareFontSeriesChangeRule {elx}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {elx}{sc}{elsc}{} \DeclareFontSeriesChangeRule {elx}{sl}{slx}{} \DeclareFontSeriesChangeRule {elx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {elx}{ul}{ulx}{} @@ -211,17 +232,19 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {el}{c}{elc}{} \DeclareFontSeriesChangeRule {el}{ec}{elec}{} +\DeclareFontSeriesChangeRule {el}{sc}{elsc}{} \DeclareFontSeriesChangeRule {el}{x}{elx}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {lc}{b}{bc}{} \DeclareFontSeriesChangeRule {lc}{c}{lc}{} -\DeclareFontSeriesChangeRule {lc}{ec}{lec}{} \DeclareFontSeriesChangeRule {lc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {lc}{ec}{lec}{} \DeclareFontSeriesChangeRule {lc}{el}{elc}{} \DeclareFontSeriesChangeRule {lc}{l}{lc}{} \DeclareFontSeriesChangeRule {lc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {lc}{sc}{lsc}{} \DeclareFontSeriesChangeRule {lc}{sl}{slc}{} \DeclareFontSeriesChangeRule {lc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {lc}{ul}{ulc}{} @@ -231,11 +254,12 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {lx}{b}{bx}{} \DeclareFontSeriesChangeRule {lx}{c}{lc}{} -\DeclareFontSeriesChangeRule {lx}{ec}{lec}{} \DeclareFontSeriesChangeRule {lx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {lx}{ec}{lec}{} \DeclareFontSeriesChangeRule {lx}{el}{elx}{} \DeclareFontSeriesChangeRule {lx}{l}{lx}{} \DeclareFontSeriesChangeRule {lx}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {lx}{sc}{lsc}{} \DeclareFontSeriesChangeRule {lx}{sl}{slx}{} \DeclareFontSeriesChangeRule {lx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {lx}{ul}{ulx}{} @@ -248,6 +272,7 @@ \DeclareFontSeriesChangeRule {l}{c} {lc} {l} % ? %<----- \DeclareFontSeriesChangeRule {l}{ec} {lec} {l} % ? %<----- \DeclareFontSeriesChangeRule {l}{sb} {sb} {b} % ? %<----- +\DeclareFontSeriesChangeRule {l}{sc} {lsc} {l} % ? %<----- \DeclareFontSeriesChangeRule {l}{x} {lx} {l} % ? %<----- % \end{macrocode} % @@ -258,17 +283,19 @@ \DeclareFontSeriesChangeRule {m}{ec} {ec} {m} %<----- \DeclareFontSeriesChangeRule {m}{l} {l} {m} %<----- \DeclareFontSeriesChangeRule {m}{sb} {sb} {b} %<----- +\DeclareFontSeriesChangeRule {m}{sc} {sc} {m} %<----- \DeclareFontSeriesChangeRule {m}{x} {x} {m} %<----- % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {sbc}{b}{bc}{} \DeclareFontSeriesChangeRule {sbc}{c}{sbc}{} -\DeclareFontSeriesChangeRule {sbc}{ec}{sbec}{sbc} \DeclareFontSeriesChangeRule {sbc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {sbc}{ec}{sbec}{sbc} \DeclareFontSeriesChangeRule {sbc}{el}{elc}{} \DeclareFontSeriesChangeRule {sbc}{l}{lc}{} \DeclareFontSeriesChangeRule {sbc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {sbc}{sc}{sbsc}{sbc} \DeclareFontSeriesChangeRule {sbc}{sl}{slc}{} \DeclareFontSeriesChangeRule {sbc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {sbc}{ul}{ulc}{} @@ -278,11 +305,12 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {sbx}{b}{bx}{} \DeclareFontSeriesChangeRule {sbx}{c}{sbc}{} -\DeclareFontSeriesChangeRule {sbx}{ec}{sbec}{} \DeclareFontSeriesChangeRule {sbx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {sbx}{ec}{sbec}{} \DeclareFontSeriesChangeRule {sbx}{el}{elx}{} \DeclareFontSeriesChangeRule {sbx}{l}{lx}{} \DeclareFontSeriesChangeRule {sbx}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {sbx}{sc}{sbsc}{} \DeclareFontSeriesChangeRule {sbx}{sl}{slx}{} \DeclareFontSeriesChangeRule {sbx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {sbx}{ul}{ulx}{} @@ -291,18 +319,20 @@ % % \begin{macrocode} \DeclareFontSeriesChangeRule {sb}{c} {sbc} {bc} %? %<----- -\DeclareFontSeriesChangeRule {sb}{ec} {sbec} {bc} %? %<----- +\DeclareFontSeriesChangeRule {sb}{ec} {sbec} {sbc} %? %<----- +\DeclareFontSeriesChangeRule {sb}{sc} {sbsc} {sbc} %? %<----- \DeclareFontSeriesChangeRule {sb}{x} {sbx} {bx} %? %<----- % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {slc}{b}{bc}{} \DeclareFontSeriesChangeRule {slc}{c}{slc}{} -\DeclareFontSeriesChangeRule {slc}{ec}{slec}{} \DeclareFontSeriesChangeRule {slc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {slc}{ec}{slec}{} \DeclareFontSeriesChangeRule {slc}{el}{elc}{} \DeclareFontSeriesChangeRule {slc}{l}{lc}{} \DeclareFontSeriesChangeRule {slc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {slc}{sc}{slsc}{} \DeclareFontSeriesChangeRule {slc}{sl}{slc}{} \DeclareFontSeriesChangeRule {slc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {slc}{ul}{ulc}{} @@ -312,11 +342,12 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {slx}{b}{bx}{} \DeclareFontSeriesChangeRule {slx}{c}{slc}{} -\DeclareFontSeriesChangeRule {slx}{ec}{slec}{} \DeclareFontSeriesChangeRule {slx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {slx}{ec}{slec}{} \DeclareFontSeriesChangeRule {slx}{el}{elx}{} \DeclareFontSeriesChangeRule {slx}{l}{lx}{} \DeclareFontSeriesChangeRule {slx}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {slx}{sc}{slsc}{} \DeclareFontSeriesChangeRule {slx}{sl}{slx}{} \DeclareFontSeriesChangeRule {slx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {slx}{ul}{ulx}{} @@ -326,17 +357,19 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {sl}{c}{slc}{} \DeclareFontSeriesChangeRule {sl}{ec}{slec}{} +\DeclareFontSeriesChangeRule {sl}{sc}{slsc}{} \DeclareFontSeriesChangeRule {sl}{x}{slx}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {ubc}{b}{bc}{} \DeclareFontSeriesChangeRule {ubc}{c}{ubc}{} -\DeclareFontSeriesChangeRule {ubc}{ec}{ubec}{} \DeclareFontSeriesChangeRule {ubc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {ubc}{ec}{ubec}{} \DeclareFontSeriesChangeRule {ubc}{el}{elc}{} \DeclareFontSeriesChangeRule {ubc}{l}{lc}{} \DeclareFontSeriesChangeRule {ubc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {ubc}{sc}{ubsc}{} \DeclareFontSeriesChangeRule {ubc}{sl}{slc}{} \DeclareFontSeriesChangeRule {ubc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ubc}{ul}{ulc}{} @@ -346,11 +379,12 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {ubx}{b}{bx}{} \DeclareFontSeriesChangeRule {ubx}{c}{ubc}{} -\DeclareFontSeriesChangeRule {ubx}{ec}{ubec}{} \DeclareFontSeriesChangeRule {ubx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {ubx}{ec}{ubec}{} \DeclareFontSeriesChangeRule {ubx}{el}{elx}{} \DeclareFontSeriesChangeRule {ubx}{l}{lx}{} \DeclareFontSeriesChangeRule {ubx}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {ubx}{sc}{ubsc}{} \DeclareFontSeriesChangeRule {ubx}{sl}{slx}{} \DeclareFontSeriesChangeRule {ubx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {ubx}{ul}{ulx}{} @@ -360,17 +394,19 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {ub}{c}{ubc}{} \DeclareFontSeriesChangeRule {ub}{ec}{ubec}{} +\DeclareFontSeriesChangeRule {ub}{sc}{ubsc}{} \DeclareFontSeriesChangeRule {ub}{x}{ubx}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {ulc}{b}{bc}{} \DeclareFontSeriesChangeRule {ulc}{c}{ulc}{} -\DeclareFontSeriesChangeRule {ulc}{ec}{ulec}{ulc} \DeclareFontSeriesChangeRule {ulc}{eb}{ebc}{} +\DeclareFontSeriesChangeRule {ulc}{ec}{ulec}{ulc} \DeclareFontSeriesChangeRule {ulc}{el}{elc}{} \DeclareFontSeriesChangeRule {ulc}{l}{lc}{} \DeclareFontSeriesChangeRule {ulc}{sb}{sbc}{} +\DeclareFontSeriesChangeRule {ulc}{sc}{ulsc}{ulc} \DeclareFontSeriesChangeRule {ulc}{sl}{slc}{} \DeclareFontSeriesChangeRule {ulc}{ub}{ubc}{} \DeclareFontSeriesChangeRule {ulc}{ul}{ulc}{} @@ -380,11 +416,12 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {ulx}{b}{bx}{} \DeclareFontSeriesChangeRule {ulx}{c}{ulc}{} -\DeclareFontSeriesChangeRule {ulx}{ec}{ulec}{} \DeclareFontSeriesChangeRule {ulx}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {ulx}{ec}{ulec}{} \DeclareFontSeriesChangeRule {ulx}{el}{elx}{} \DeclareFontSeriesChangeRule {ulx}{l}{lx}{} \DeclareFontSeriesChangeRule {ulx}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {ulx}{sc}{ulsc}{} \DeclareFontSeriesChangeRule {ulx}{sl}{slx}{} \DeclareFontSeriesChangeRule {ulx}{ub}{ubx}{} \DeclareFontSeriesChangeRule {ulx}{ul}{ulx}{} @@ -394,17 +431,19 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {ul}{c}{ulc}{} \DeclareFontSeriesChangeRule {ul}{ec}{ulec}{} +\DeclareFontSeriesChangeRule {ul}{sc}{ulsc}{} \DeclareFontSeriesChangeRule {ul}{x}{ulx}{} % \end{macrocode} % % \begin{macrocode} \DeclareFontSeriesChangeRule {x}{b}{bx}{} \DeclareFontSeriesChangeRule {x}{c}{c}{} -\DeclareFontSeriesChangeRule {x}{ec}{ec}{} \DeclareFontSeriesChangeRule {x}{eb}{ebx}{} +\DeclareFontSeriesChangeRule {x}{ec}{ec}{} \DeclareFontSeriesChangeRule {x}{el}{elx}{} \DeclareFontSeriesChangeRule {x}{l}{lx}{} \DeclareFontSeriesChangeRule {x}{sb}{sbx}{} +\DeclareFontSeriesChangeRule {x}{sc}{sc}{} \DeclareFontSeriesChangeRule {x}{sl}{slx}{} \DeclareFontSeriesChangeRule {x}{ub}{ubx}{} \DeclareFontSeriesChangeRule {x}{ul}{ulx}{} @@ -413,124 +452,208 @@ % Special rules for \texttt{m?}: % \begin{macrocode} \DeclareFontSeriesChangeRule {bc}{m?}{c}{} +\DeclareFontSeriesChangeRule {bec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {bsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {bx}{m?}{x}{} \DeclareFontSeriesChangeRule {b}{m?}{m}{} \DeclareFontSeriesChangeRule {c}{m?}{c}{} \DeclareFontSeriesChangeRule {ebc}{m?}{c}{} +\DeclareFontSeriesChangeRule {ebec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {ebsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {ebx}{m?}{x}{} \DeclareFontSeriesChangeRule {eb}{m?}{m}{} +\DeclareFontSeriesChangeRule {ec}{m?}{ec}{} \DeclareFontSeriesChangeRule {elc}{m?}{c}{} +\DeclareFontSeriesChangeRule {elec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {elsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {elx}{m?}{x}{} \DeclareFontSeriesChangeRule {el}{m?}{m}{} \DeclareFontSeriesChangeRule {lc}{m?}{c}{} +\DeclareFontSeriesChangeRule {lec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {lsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {lx}{m?}{x}{} \DeclareFontSeriesChangeRule {l}{m?}{m}{} \DeclareFontSeriesChangeRule {m}{m?}{m}{} \DeclareFontSeriesChangeRule {sbc}{m?}{c}{} +\DeclareFontSeriesChangeRule {sbec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {sbsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {sbx}{m?}{x}{} \DeclareFontSeriesChangeRule {sb}{m?}{m}{} +\DeclareFontSeriesChangeRule {sc}{m?}{sc}{} \DeclareFontSeriesChangeRule {slc}{m?}{c}{} +\DeclareFontSeriesChangeRule {slec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {slsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {slx}{m?}{x}{} \DeclareFontSeriesChangeRule {sl}{m?}{m}{} \DeclareFontSeriesChangeRule {ubc}{m?}{c}{} +\DeclareFontSeriesChangeRule {ubec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {ubsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {ubx}{m?}{x}{} \DeclareFontSeriesChangeRule {ub}{m?}{ub}{} \DeclareFontSeriesChangeRule {ulc}{m?}{c}{} +\DeclareFontSeriesChangeRule {ulec}{m?}{ec}{} +\DeclareFontSeriesChangeRule {ulsc}{m?}{sc}{} \DeclareFontSeriesChangeRule {ulx}{m?}{x}{} \DeclareFontSeriesChangeRule {ul}{m?}{m}{} \DeclareFontSeriesChangeRule {x}{m?}{x}{} - -\DeclareFontSeriesChangeRule {ec}{m?}{ec}{} -\DeclareFontSeriesChangeRule {bec}{m?}{ec}{} -\DeclareFontSeriesChangeRule {ebec}{m?}{ec}{} -\DeclareFontSeriesChangeRule {elec}{m?}{ec}{} -\DeclareFontSeriesChangeRule {lec}{m?}{ec}{} -\DeclareFontSeriesChangeRule {sbec}{m?}{ec}{} -\DeclareFontSeriesChangeRule {slec}{m?}{ec}{} -\DeclareFontSeriesChangeRule {ubec}{m?}{ec}{} -\DeclareFontSeriesChangeRule {ulec}{m?}{ec}{} % \end{macrocode} % % Special rules for \texttt{?m}: % \begin{macrocode} \DeclareFontSeriesChangeRule {bc}{?m}{b}{} +\DeclareFontSeriesChangeRule {bec}{?m}{b}{} +\DeclareFontSeriesChangeRule {bsc}{?m}{b}{} +\DeclareFontSeriesChangeRule {bsc}{?m}{b}{} \DeclareFontSeriesChangeRule {bx}{?m}{b}{} \DeclareFontSeriesChangeRule {b}{?m}{b}{} \DeclareFontSeriesChangeRule {c}{?m}{m}{} \DeclareFontSeriesChangeRule {ebc}{?m}{eb}{} +\DeclareFontSeriesChangeRule {ebec}{?m}{eb}{} +\DeclareFontSeriesChangeRule {ebsc}{?m}{eb}{} +\DeclareFontSeriesChangeRule {ebsc}{?m}{eb}{} \DeclareFontSeriesChangeRule {ebx}{?m}{eb}{} \DeclareFontSeriesChangeRule {eb}{?m}{eb}{} +\DeclareFontSeriesChangeRule {ec}{?m}{m}{} \DeclareFontSeriesChangeRule {elc}{?m}{el}{} +\DeclareFontSeriesChangeRule {elec}{?m}{el}{} +\DeclareFontSeriesChangeRule {elsc}{?m}{el}{} +\DeclareFontSeriesChangeRule {elsc}{?m}{el}{} \DeclareFontSeriesChangeRule {elx}{?m}{el}{} \DeclareFontSeriesChangeRule {el}{?m}{el}{} \DeclareFontSeriesChangeRule {lc}{?m}{l}{} +\DeclareFontSeriesChangeRule {lec}{?m}{l}{} +\DeclareFontSeriesChangeRule {lsc}{?m}{l}{} +\DeclareFontSeriesChangeRule {lsc}{?m}{l}{} \DeclareFontSeriesChangeRule {lx}{?m}{l}{} \DeclareFontSeriesChangeRule {l}{?m}{l}{} \DeclareFontSeriesChangeRule {m}{?m}{m}{} \DeclareFontSeriesChangeRule {sbc}{?m}{sb}{} +\DeclareFontSeriesChangeRule {sbec}{?m}{sb}{} +\DeclareFontSeriesChangeRule {sbsc}{?m}{sb}{} +\DeclareFontSeriesChangeRule {sbsc}{?m}{sb}{} \DeclareFontSeriesChangeRule {sbx}{?m}{sb}{} \DeclareFontSeriesChangeRule {sb}{?m}{sb}{} +\DeclareFontSeriesChangeRule {sc}{?m}{m}{} +\DeclareFontSeriesChangeRule {sc}{?m}{m}{} \DeclareFontSeriesChangeRule {slc}{?m}{sl}{} +\DeclareFontSeriesChangeRule {slec}{?m}{sl}{} +\DeclareFontSeriesChangeRule {slsc}{?m}{sl}{} +\DeclareFontSeriesChangeRule {slsc}{?m}{sl}{} \DeclareFontSeriesChangeRule {slx}{?m}{sl}{} \DeclareFontSeriesChangeRule {sl}{?m}{sl}{} \DeclareFontSeriesChangeRule {ubc}{?m}{ub}{} +\DeclareFontSeriesChangeRule {ubec}{?m}{ub}{} +\DeclareFontSeriesChangeRule {ubsc}{?m}{ub}{} +\DeclareFontSeriesChangeRule {ubsc}{?m}{ub}{} \DeclareFontSeriesChangeRule {ubx}{?m}{ub}{} \DeclareFontSeriesChangeRule {ub}{?m}{m}{} \DeclareFontSeriesChangeRule {ulc}{?m}{ul}{} +\DeclareFontSeriesChangeRule {ulec}{?m}{ul}{} +\DeclareFontSeriesChangeRule {ulsc}{?m}{ul}{} +\DeclareFontSeriesChangeRule {ulsc}{?m}{ul}{} \DeclareFontSeriesChangeRule {ulx}{?m}{ul}{} \DeclareFontSeriesChangeRule {ul}{?m}{ul}{} \DeclareFontSeriesChangeRule {x}{?m}{m}{} - -\DeclareFontSeriesChangeRule {bec}{?m}{b}{} -\DeclareFontSeriesChangeRule {ec}{?m}{m}{} -\DeclareFontSeriesChangeRule {ebec}{?m}{eb}{} -\DeclareFontSeriesChangeRule {elec}{?m}{el}{} -\DeclareFontSeriesChangeRule {lec}{?m}{l}{} -\DeclareFontSeriesChangeRule {sbec}{?m}{sb}{} -\DeclareFontSeriesChangeRule {slec}{?m}{sl}{} -\DeclareFontSeriesChangeRule {ubec}{?m}{ub}{} -\DeclareFontSeriesChangeRule {ulec}{?m}{ul}{} % \end{macrocode} % % Special rules for \texttt{mc}: % \begin{macrocode} +\DeclareFontSeriesChangeRule {bce}{mc}{c}{} \DeclareFontSeriesChangeRule {bc}{mc}{c}{} +\DeclareFontSeriesChangeRule {bsc}{mc}{c}{} \DeclareFontSeriesChangeRule {bx}{mc}{c}{} \DeclareFontSeriesChangeRule {b}{mc}{c}{} \DeclareFontSeriesChangeRule {c}{mc}{c}{} -\DeclareFontSeriesChangeRule {ec}{mc}{c}{} \DeclareFontSeriesChangeRule {ebc}{mc}{c}{} +\DeclareFontSeriesChangeRule {ebec}{mc}{c}{} +\DeclareFontSeriesChangeRule {ebsc}{mc}{c}{} +\DeclareFontSeriesChangeRule {ebsc}{mc}{c}{} \DeclareFontSeriesChangeRule {ebx}{mc}{c}{} \DeclareFontSeriesChangeRule {eb}{mc}{c}{} +\DeclareFontSeriesChangeRule {ec}{mc}{c}{} \DeclareFontSeriesChangeRule {elc}{mc}{c}{} +\DeclareFontSeriesChangeRule {elec}{mc}{c}{} +\DeclareFontSeriesChangeRule {elsc}{mc}{c}{} \DeclareFontSeriesChangeRule {elx}{mc}{c}{} \DeclareFontSeriesChangeRule {el}{mc}{c}{} \DeclareFontSeriesChangeRule {lc}{mc}{c}{} +\DeclareFontSeriesChangeRule {lec}{mc}{c}{} +\DeclareFontSeriesChangeRule {lsc}{mc}{c}{} \DeclareFontSeriesChangeRule {lx}{mc}{c}{} \DeclareFontSeriesChangeRule {l}{mc}{c}{} \DeclareFontSeriesChangeRule {m}{mc}{c}{} \DeclareFontSeriesChangeRule {sbc}{mc}{c}{} +\DeclareFontSeriesChangeRule {sbec}{mc}{c}{} +\DeclareFontSeriesChangeRule {sbsc}{mc}{c}{} \DeclareFontSeriesChangeRule {sbx}{mc}{c}{} \DeclareFontSeriesChangeRule {sb}{mc}{c}{} +\DeclareFontSeriesChangeRule {sc}{mc}{c}{} \DeclareFontSeriesChangeRule {slc}{mc}{c}{} +\DeclareFontSeriesChangeRule {slec}{mc}{c}{} +\DeclareFontSeriesChangeRule {slsc}{mc}{c}{} \DeclareFontSeriesChangeRule {slx}{mc}{c}{} \DeclareFontSeriesChangeRule {sl}{mc}{c}{} \DeclareFontSeriesChangeRule {ubc}{mc}{c}{} +\DeclareFontSeriesChangeRule {ubec}{mc}{c}{} +\DeclareFontSeriesChangeRule {ubsc}{mc}{c}{} \DeclareFontSeriesChangeRule {ubx}{mc}{c}{} \DeclareFontSeriesChangeRule {ub}{mc}{c}{} \DeclareFontSeriesChangeRule {ulc}{mc}{c}{} +\DeclareFontSeriesChangeRule {ulec}{mc}{c}{} +\DeclareFontSeriesChangeRule {ulsc}{mc}{c}{} \DeclareFontSeriesChangeRule {ulx}{mc}{c}{} \DeclareFontSeriesChangeRule {ul}{mc}{c}{} \DeclareFontSeriesChangeRule {x}{mc}{c}{} - -\DeclareFontSeriesChangeRule {bce}{mc}{ec}{} -\DeclareFontSeriesChangeRule {ebec}{mc}{ec}{} -\DeclareFontSeriesChangeRule {elec}{mc}{ec}{} -\DeclareFontSeriesChangeRule {lec}{mc}{ec}{} -\DeclareFontSeriesChangeRule {sbec}{mc}{ec}{} -\DeclareFontSeriesChangeRule {slec}{mc}{ec}{} -\DeclareFontSeriesChangeRule {ubec}{mc}{ec}{} -\DeclareFontSeriesChangeRule {ulec}{mc}{ec}{} +% \end{macrocode} +% +% +% Special rules for \texttt{mec}: +% \begin{macrocode} +\DeclareFontSeriesChangeRule {bce}{mec}{ec}{} +\DeclareFontSeriesChangeRule {bc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {bsc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {bx}{mec}{ec}{} +\DeclareFontSeriesChangeRule {b}{mec}{ec}{} +\DeclareFontSeriesChangeRule {c}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ebc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ebec}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ebsc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ebx}{mec}{ec}{} +\DeclareFontSeriesChangeRule {eb}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ec}{mec}{ec}{} +\DeclareFontSeriesChangeRule {elc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {elec}{mec}{ec}{} +\DeclareFontSeriesChangeRule {elsc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {elx}{mec}{ec}{} +\DeclareFontSeriesChangeRule {el}{mec}{ec}{} +\DeclareFontSeriesChangeRule {lc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {lec}{mec}{ec}{} +\DeclareFontSeriesChangeRule {lsc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {lx}{mec}{ec}{} +\DeclareFontSeriesChangeRule {l}{mec}{ec}{} +\DeclareFontSeriesChangeRule {m}{mec}{ec}{} +\DeclareFontSeriesChangeRule {sbc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {sbec}{mec}{ec}{} +\DeclareFontSeriesChangeRule {sbsc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {sbx}{mec}{ec}{} +\DeclareFontSeriesChangeRule {sb}{mec}{ec}{} +\DeclareFontSeriesChangeRule {sc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {slc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {slec}{mec}{ec}{} +\DeclareFontSeriesChangeRule {slsc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {slx}{mec}{ec}{} +\DeclareFontSeriesChangeRule {sl}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ubc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ubec}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ubsc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ubx}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ub}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ulc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ulec}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ulsc}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ulx}{mec}{ec}{} +\DeclareFontSeriesChangeRule {ul}{mec}{ec}{} +\DeclareFontSeriesChangeRule {x}{mec}{ec}{} % \end{macrocode} % % \emph{rules need to get completed/verified!} From a0bac60e5dfe5d184f99ff1622db020ca2b8f3a7 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Sun, 13 Oct 2019 17:27:54 +0200 Subject: [PATCH 27/55] dropping m's when determining the target series --- base/nfssaxes.tex | 162 ++++++++++++++++------------------------------ 1 file changed, 54 insertions(+), 108 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 0522248a9..66cf4a6d5 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -51,12 +51,21 @@ % % \item % +% We do support ``\texttt{m}\textit{width}'' and +% ``\textit{weight}\texttt{m}'', e.g., \texttt{mec} to mean ``go to +% medium weight and extra-condensed width''. At the end of the +% process we automatically drop any leftover \texttt{m} in the +% series name (unless it is just a single \texttt{m}). +% +% +% \item +% % If there is no table entry then the target series is used % unconditionally. This means that any request to set both weight % and width (e.g. \texttt{bx} or \texttt{ulc}) needs no table % entries. -% For that reason there are no entries which have a weight+width -% request (as second argument). +% For that reason there are no entries which have a weight+width as +% request (i.e., second argument). % % \item % @@ -75,8 +84,8 @@ % % Also: while I did set up all nine standard weight values from % \texttt{ul} to \textt{ub} I only bothered to provide entries for -% \texttt{c} and \texttt{x}, because other levels of -% compression/expansion are really really seldom. +% \texttt{ec}, \texttt{sc}, \texttt{c} and \texttt{x}, because other levels of +% compression/expansion are not in any real fonts that I know. % % Could and perhaps should be eventually extended to cover the % whole set. @@ -449,6 +458,12 @@ \DeclareFontSeriesChangeRule {x}{ul}{ulx}{} % \end{macrocode} % +% +% Special rules for \texttt{lm} etc.\ aren't needed because the +% target{lm} is used which is reduced to \texttt{l} +% automatically. Same for \texttt{mc} and friends. Only \texttt{?m} +% and \texttt{m?} need rules. +% % Special rules for \texttt{m?}: % \begin{macrocode} \DeclareFontSeriesChangeRule {bc}{m?}{c}{} @@ -556,106 +571,7 @@ \DeclareFontSeriesChangeRule {x}{?m}{m}{} % \end{macrocode} % -% Special rules for \texttt{mc}: -% \begin{macrocode} -\DeclareFontSeriesChangeRule {bce}{mc}{c}{} -\DeclareFontSeriesChangeRule {bc}{mc}{c}{} -\DeclareFontSeriesChangeRule {bsc}{mc}{c}{} -\DeclareFontSeriesChangeRule {bx}{mc}{c}{} -\DeclareFontSeriesChangeRule {b}{mc}{c}{} -\DeclareFontSeriesChangeRule {c}{mc}{c}{} -\DeclareFontSeriesChangeRule {ebc}{mc}{c}{} -\DeclareFontSeriesChangeRule {ebec}{mc}{c}{} -\DeclareFontSeriesChangeRule {ebsc}{mc}{c}{} -\DeclareFontSeriesChangeRule {ebsc}{mc}{c}{} -\DeclareFontSeriesChangeRule {ebx}{mc}{c}{} -\DeclareFontSeriesChangeRule {eb}{mc}{c}{} -\DeclareFontSeriesChangeRule {ec}{mc}{c}{} -\DeclareFontSeriesChangeRule {elc}{mc}{c}{} -\DeclareFontSeriesChangeRule {elec}{mc}{c}{} -\DeclareFontSeriesChangeRule {elsc}{mc}{c}{} -\DeclareFontSeriesChangeRule {elx}{mc}{c}{} -\DeclareFontSeriesChangeRule {el}{mc}{c}{} -\DeclareFontSeriesChangeRule {lc}{mc}{c}{} -\DeclareFontSeriesChangeRule {lec}{mc}{c}{} -\DeclareFontSeriesChangeRule {lsc}{mc}{c}{} -\DeclareFontSeriesChangeRule {lx}{mc}{c}{} -\DeclareFontSeriesChangeRule {l}{mc}{c}{} -\DeclareFontSeriesChangeRule {m}{mc}{c}{} -\DeclareFontSeriesChangeRule {sbc}{mc}{c}{} -\DeclareFontSeriesChangeRule {sbec}{mc}{c}{} -\DeclareFontSeriesChangeRule {sbsc}{mc}{c}{} -\DeclareFontSeriesChangeRule {sbx}{mc}{c}{} -\DeclareFontSeriesChangeRule {sb}{mc}{c}{} -\DeclareFontSeriesChangeRule {sc}{mc}{c}{} -\DeclareFontSeriesChangeRule {slc}{mc}{c}{} -\DeclareFontSeriesChangeRule {slec}{mc}{c}{} -\DeclareFontSeriesChangeRule {slsc}{mc}{c}{} -\DeclareFontSeriesChangeRule {slx}{mc}{c}{} -\DeclareFontSeriesChangeRule {sl}{mc}{c}{} -\DeclareFontSeriesChangeRule {ubc}{mc}{c}{} -\DeclareFontSeriesChangeRule {ubec}{mc}{c}{} -\DeclareFontSeriesChangeRule {ubsc}{mc}{c}{} -\DeclareFontSeriesChangeRule {ubx}{mc}{c}{} -\DeclareFontSeriesChangeRule {ub}{mc}{c}{} -\DeclareFontSeriesChangeRule {ulc}{mc}{c}{} -\DeclareFontSeriesChangeRule {ulec}{mc}{c}{} -\DeclareFontSeriesChangeRule {ulsc}{mc}{c}{} -\DeclareFontSeriesChangeRule {ulx}{mc}{c}{} -\DeclareFontSeriesChangeRule {ul}{mc}{c}{} -\DeclareFontSeriesChangeRule {x}{mc}{c}{} -% \end{macrocode} -% -% -% Special rules for \texttt{mec}: -% \begin{macrocode} -\DeclareFontSeriesChangeRule {bce}{mec}{ec}{} -\DeclareFontSeriesChangeRule {bc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {bsc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {bx}{mec}{ec}{} -\DeclareFontSeriesChangeRule {b}{mec}{ec}{} -\DeclareFontSeriesChangeRule {c}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ebc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ebec}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ebsc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ebx}{mec}{ec}{} -\DeclareFontSeriesChangeRule {eb}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ec}{mec}{ec}{} -\DeclareFontSeriesChangeRule {elc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {elec}{mec}{ec}{} -\DeclareFontSeriesChangeRule {elsc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {elx}{mec}{ec}{} -\DeclareFontSeriesChangeRule {el}{mec}{ec}{} -\DeclareFontSeriesChangeRule {lc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {lec}{mec}{ec}{} -\DeclareFontSeriesChangeRule {lsc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {lx}{mec}{ec}{} -\DeclareFontSeriesChangeRule {l}{mec}{ec}{} -\DeclareFontSeriesChangeRule {m}{mec}{ec}{} -\DeclareFontSeriesChangeRule {sbc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {sbec}{mec}{ec}{} -\DeclareFontSeriesChangeRule {sbsc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {sbx}{mec}{ec}{} -\DeclareFontSeriesChangeRule {sb}{mec}{ec}{} -\DeclareFontSeriesChangeRule {sc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {slc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {slec}{mec}{ec}{} -\DeclareFontSeriesChangeRule {slsc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {slx}{mec}{ec}{} -\DeclareFontSeriesChangeRule {sl}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ubc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ubec}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ubsc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ubx}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ub}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ulc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ulec}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ulsc}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ulx}{mec}{ec}{} -\DeclareFontSeriesChangeRule {ul}{mec}{ec}{} -\DeclareFontSeriesChangeRule {x}{mec}{ec}{} -% \end{macrocode} -% +% % \emph{rules need to get completed/verified!} % % @@ -707,7 +623,7 @@ % \begin{macrocode} \def\@reserveda{#3}% \ifx\@reserveda\@empty - \edef\f@series{#2}% + \set@target@series{#2}% \else % \end{macrocode} % Otherwise we check if the desired result for the series @@ -718,7 +634,7 @@ % \end{macrocode} % If the desired result is available then we use that: % \begin{macrocode} - \edef\f@series{#1}% + \set@target@series{#1}% % \end{macrocode} % If not, then we try the alternate result (\texttt{\#2}). % \begin{macrocode} @@ -729,14 +645,14 @@ % warning (or rather a log entry) that we didn't managed to change % to the desired font. % \begin{macrocode} - \edef\f@series{#2}% + \set@target@series{#2}% \@font@shape@subst@warning % \end{macrocode} % If that doesn't exist either, then we use the requested series unmodified % (again with a warning). % \begin{macrocode} \else - \edef\f@series{#3}% + \set@target@series{#3}% \@font@shape@subst@warning \fi \fi @@ -760,6 +676,36 @@ % \end{macro} +% \begin{macro}{\set@target@series} +% \begin{macro}{\series@drop@one@m} +% The combined series value determined by the mapping may still +% contain an \texttt{m} that we have to remove (as the \texttt{.fd} +% files use \texttt{c} not \texttt{mc} to denote a medium weight +% condensed series. We do this in all branches above because a user +% might have written +%\begin{verbatim} +\DeclareFontSeriesChangeRule {m}{sc}{msc}{mc} +%\end{verbatim} +% instead of of using \texttt{sc} and \textt{c} as needed in the +% \textt{.fd} file. +% \begin{macrocode} +\def\set@target@series#1{% +% \end{macrocode} +% We need to \cs{edef} the argument first in case it starts with a +% conditional. +% \begin{macrocode} + \edef\f@series{#1}% + \edef\f@series{\expandafter\series@drop@one@m\f@series mm\series@drop@one@m}% +} +% \end{macrocode} +% Drop up to two \texttt{m}s but keep one if that makes the series +% value empty. +% \begin{macrocode} +\def\series@drop@one@m#1m#2m#3\series@drop@one@m{% + \ifx\relax#1#2\relax m\else#1#2\fi +} +% \end{macrocode} +% \end{macro} % \section{Changing the shape} From b84abccc5d9ac5f15c44c5bd2e5043cb39f0d57a Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Mon, 14 Oct 2019 14:13:28 +0200 Subject: [PATCH 28/55] maybe? --- base/nfssaxes.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 66cf4a6d5..e651a2c5b 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -286,7 +286,7 @@ % \end{macrocode} % % \begin{macrocode} -\DeclareFontSeriesChangeRule {m}{bx} {bx} {b} %<----- +\DeclareFontSeriesChangeRule {m}{bx} {bx} {b} %<----- maybe better ``m''? \DeclareFontSeriesChangeRule {m}{b} {b} {bx} %<----- \DeclareFontSeriesChangeRule {m}{c} {c} {m} %<----- \DeclareFontSeriesChangeRule {m}{ec} {ec} {m} %<----- From 3eac296544fce1d3f24b14c8891f821d4468b079 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Mon, 14 Oct 2019 14:00:49 +0100 Subject: [PATCH 29/55] Typo [ci skip] --- base/nfssaxes.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 66cf4a6d5..7809d5009 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -887,7 +887,7 @@ % \begin{macro}{\fontshape} % Again the \cs{fontshape} now has to do a lookup to get to its new % value in \cs{f@shape}. The method is exactly the same as in -% \csπfontseries}. +% \cs{fontseries}. % \begin{macrocode} \DeclareRobustCommand\fontshape[1]{\merge@font@shape{#1}} % \end{macrocode} From 7291066054cdf05be809477dce49441ab9b3cbf4 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Mon, 14 Oct 2019 14:01:48 +0100 Subject: [PATCH 30/55] Typo [ci skip] --- base/nfssaxes.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 7809d5009..2af68511c 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -1038,7 +1038,7 @@ \protected@edef\emfontdeclare@clist{\zap@space#1, \@empty\emforce\emreset}% } % \end{macrocode} -% By default the ist is empty, in which case \cs{eminnershape} is +% By default the it is empty, in which case \cs{eminnershape} is % used by \LaTeX. % \begin{macrocode} \let\emfontdeclare@clist\@empty From e4eb7c4314d52a1176dc38c145d2dcc6098eb886 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Thu, 17 Oct 2019 11:51:18 +0200 Subject: [PATCH 31/55] more on \swshape --- base/nfssaxes.tex | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 535b7086e..8423c157a 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -963,6 +963,9 @@ \protected\def\ulcshape {\not@math@alphabet\ulcshape\relax \fontshape{ulc}\selectfont}% + \protected\swshape + {\not@math@alphabet\swshape\relax + \fontshape\swdefault\selectfont}% } % \end{macrocode} % @@ -975,10 +978,35 @@ %\DeclareFontShapeChangeRule {sc}{sw} {scsw} {sc} % ... % \end{macrocode} -% Again that should happen directly in \pkg{fontaxes} or maybe -% directly in the kernel (even though there are currently only a few fonts -% that support swash letters or ``spaced small capitals''). +% For \cs{swshape} I have already done that above (even though there are +% currently only a few fonts +% that support swash letters). For ``spaced small capitals'' there a +% none among the free fonts. Nevertheless, perhaps that should also be integrated +% in the kernel so that the existing \pkg{fontaxes} support continues to +% work in full. % +% +% +% \subsubsection{Packages that need checking or updating} +% +% These package use \cs{fontprimaryshape} +%\begin{verbatim} +%./baskervaldx/Baskervaldx.sty +%./baskervillef/baskervillef.sty +%./ebgaramond/ebgaramond.sty +%./fontaxes/fontaxes.sty +%\end{verbatim} +% +% +% These package use \cs{fontsecondaryshape} +%\begin{verbatim} +%./baskervaldx/Baskervaldx.sty +%./inriafonts/InriaSans.sty +%./inriafonts/InriaSerif.sty +%./baskervillef/baskervillef.sty +%./ebgaramond/ebgaramond.sty +%./fontaxes/fontaxes.sty +%\end{verbatim} From a1d2b16f38bb856dc88101775f6e41a792629389 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Thu, 17 Oct 2019 12:04:43 +0200 Subject: [PATCH 32/55] mumble --- base/nfssaxes.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 8423c157a..cdc64d0aa 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -963,7 +963,7 @@ \protected\def\ulcshape {\not@math@alphabet\ulcshape\relax \fontshape{ulc}\selectfont}% - \protected\swshape + \protected\def\swshape {\not@math@alphabet\swshape\relax \fontshape\swdefault\selectfont}% } From 8f3f68c91a0547dfea724011089239d46758dbce Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Tue, 22 Oct 2019 10:58:45 +0200 Subject: [PATCH 33/55] still working on getting the logic right --- base/nfssaxes.tex | 78 +++++++++++++++++++--- base/testfiles-search/tlb-nfssaxes-006.lvt | 45 +++++++++++++ base/testfiles-search/tlb-nfssaxes-006.tlg | 20 ++++++ 3 files changed, 132 insertions(+), 11 deletions(-) create mode 100644 base/testfiles-search/tlb-nfssaxes-006.lvt create mode 100644 base/testfiles-search/tlb-nfssaxes-006.tlg diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index cdc64d0aa..e9d37f0e2 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -1273,6 +1273,14 @@ % \[md/bf]series@[rm/sf/tt] \expandafter\edef \csname #2series@#1\endcsname{#3}% +% \end{macrocode} +% +% If the interface is used we remove the frozen kernel +% default. This way, we know that something was explicitly set up +% (even if the setup has the same value as the default). +% \begin{macrocode} + \expandafter\let + \csname #2series@#1@kernel\endcsname\@undefined \else \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% {Optional first argument must be 'rm', 'sf', or 'tt'. \MessageBreak @@ -1292,7 +1300,7 @@ % \begin{macro}{\bfseries@rm} % \begin{macro}{\bfseries@sf} % \begin{macro}{\bfseries@tt} -% We initialize the family specific defaulst at the end of the +% We initialize the family specific default at the end of the % format generation. Later on they may get overwritten in the % preamble or a package via \cs{DeclareFontSeriesDefault} (or % possibly directly). @@ -1313,9 +1321,16 @@ % \end{macrocode} % % \begin{macrocode} -\edef\bfseries@rm{bx} -\edef\bfseries@sf{bx} -\edef\bfseries@tt{bx} +\def\bfseries@rm{bx} +\def\bfseries@sf{bx} +\def\bfseries@tt{bx} +% \end{macrocode} +% +% Frozen version of the kernel defaults so we can see if they have changed. +% \begin{macrocode} +\let\bfseries@rm@kernel\bfseries@rm +\let\bfseries@sf@kernel\bfseries@sf +\let\bfseries@tt@kernel\bfseries@tt % \end{macrocode} % % The default for the medium series is \texttt{m} and this will be @@ -1500,7 +1515,15 @@ % \begin{macrocode} \ifx\target@series@value\@empty \else \begingroup\try@load@fontshape\endgroup - \fontseries\target@series@value +% \end{macrocode} +% Updating the series in this case means directly changing +% \cs{f@series} to the target value. We don't want to go through +% \cs{fontseries} because that would apply the mappings and then +% \texttt{bx + b} would keep \texttt{bx} instead of changing to +% \texttt{b} as desired. +% as +% \begin{macrocode} + \let\f@series\target@series@value \fi \selectfont} % \end{macrocode} @@ -1530,7 +1553,7 @@ \fontfamily\sfdefault \ifx\target@series@value\@empty \else \begingroup\try@load@fontshape\endgroup - \fontseries\target@series@value + \let\f@series\target@series@value \fi \selectfont} % \end{macrocode} @@ -1556,7 +1579,7 @@ \fontfamily\ttdefault \ifx\target@series@value\@empty \else \begingroup\try@load@fontshape\endgroup - \fontseries\target@series@value + \let\f@series\target@series@value \fi \selectfont} % \end{macrocode} @@ -1573,6 +1596,43 @@ % \begin{macro}{\AtBeginDocument} % +% \begin{macrocode} +\AtBeginDocument{% +% \end{macrocode} +% +% We only want \texttt{bx} in \cs{bfseries@rm} if the Roman font is +% Computer Modern or Latin Modern, otherwise it should be +% \texttt{b}. It was set to \texttt{bx} in the kernel so that any +% font use with the default families in the preamble get this +% value. Now at the real document start we check if the fonts have +% been changed. If there was a \cs{DeclareFontSeriesDefault} +% declaration or \cs{bfseries@rm} was directly altered then it +% differs from \cs{bfseries@rm@kernel} and we do nothing. +% Otherwise we check if \cs{rmdefault} is one of the CM/LM font +% families and if so we keep \texttt{bx} otherwise we change it to +% \texttt{b}. +% +% This approach doesn't cover one case: CM/LM got changed to a +% different family that supports \texttt{bx}, but the support +% package for that family used \verb=\def\bfseries@rm{bx}= instead +% of using \cs{DeclareFontSeriesDefault}. In that case the code +% here changes it to \texttt{b}. Solution: use the +% \cs{DeclareFontSeriesDefault} interface. +% \begin{macrocode} + \ifx\bfseries@rm@kernel\bfseries@rm + \expandafter\in@\expandafter{\rmdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% + \ifin@ \else \def\bfseries@rm{b}\fi\fi +% \end{macrocode} +% Same approach for \cs{bfseries@sf} and \cs{bfseries@tt}: +% \begin{macrocode} + \ifx\bfseries@sf@kernel\bfseries@sf + \expandafter\in@\expandafter{\sfdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% + \ifin@ \else \def\bfseries@sf{b}\fi\fi + \ifx\bfseries@tt@kernel\bfseries@tt + \expandafter\in@\expandafter{\ttdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% + \ifin@ \else \def\bfseries@tt{b}\fi\fi +% \end{macrocode} +% % If the document preamble has changed the \cs{familydefault} or if % the if the \cs{rmdefault} contains a new font family, we have to % adjust the series defaults accordingly, before starting @@ -1580,11 +1640,7 @@ % \cs{ttfamily} depending on the situation which does that (as a % sideeffect) for us. % \begin{macrocode} -\AtBeginDocument{% \expand@font@defaults -% \end{macrocode} -% -% \begin{macrocode} \ifx\famdef@ult\rmdef@ult \rmfamily \else\ifx\famdef@ult\sfdef@ult \sffamily \else\ifx\famdef@ult\ttdef@ult \ttfamily diff --git a/base/testfiles-search/tlb-nfssaxes-006.lvt b/base/testfiles-search/tlb-nfssaxes-006.lvt new file mode 100644 index 000000000..b9d3e4a5f --- /dev/null +++ b/base/testfiles-search/tlb-nfssaxes-006.lvt @@ -0,0 +1,45 @@ +\documentclass{article} + +\input{test2e} + + +\makeatletter +\def\showfont#1{\typeout{#1: \f@encoding/\f@family/\f@series/\f@shape}} +\makeatother + + +\renewcommand\sfdefault{qpl} % Palatino (with "b") +\renewcommand\ttdefault{lmtt} + + +\begin{document} + +\START + +\makeatletter + \show\bfseries@rm + \show\bfseries@sf + \show\bfseries@tt +\makeatother + + \showfont{start} + +\bfseries \showfont{bfseries} + +\OMIT +\sffamily +\TIMO + \showfont{sffamily} + +\mdseries \showfont{mdseries} + +\OMIT +\ttfamily +\TIMO + \showfont{ttfamily} + +\bfseries \showfont{bfseries} + +\rmfamily \showfont{rmfamily} + +\END diff --git a/base/testfiles-search/tlb-nfssaxes-006.tlg b/base/testfiles-search/tlb-nfssaxes-006.tlg new file mode 100644 index 000000000..7a06d0869 --- /dev/null +++ b/base/testfiles-search/tlb-nfssaxes-006.tlg @@ -0,0 +1,20 @@ +This is a generated file for the LaTeX2e validation system. +Don't change this file in any respect. +> \bfseries@rm=macro: +->bx. +l. ... \show\bfseries@rm +> \bfseries@sf=macro: +->b. +l. ... \show\bfseries@sf +> \bfseries@tt=macro: +->bx. +l. ... \show\bfseries@tt +start: OT1/cmr/m/n +bfseries: OT1/cmr/bx/n +sffamily: OT1/qpl/b/n +mdseries: OT1/qpl/m/n +ttfamily: OT1/lmtt/m/n +LaTeX Font Info: Font shape `OT1/lmtt/bx/n' in size <10> not available +(Font) Font shape `OT1/lmtt/b/n' tried instead on input line .... +bfseries: OT1/lmtt/bx/n +rmfamily: OT1/cmr/bx/n From d6d41c0031380d107f5c411f1015874728f1b55c Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Wed, 23 Oct 2019 11:11:37 +0200 Subject: [PATCH 34/55] more tests --- base/testfiles-search/tlb-nfssaxes-006.lvt | 4 +++- base/testfiles-search/tlb-nfssaxes-006.tlg | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/base/testfiles-search/tlb-nfssaxes-006.lvt b/base/testfiles-search/tlb-nfssaxes-006.lvt index b9d3e4a5f..48f3ae16a 100644 --- a/base/testfiles-search/tlb-nfssaxes-006.lvt +++ b/base/testfiles-search/tlb-nfssaxes-006.lvt @@ -9,7 +9,9 @@ \renewcommand\sfdefault{qpl} % Palatino (with "b") -\renewcommand\ttdefault{lmtt} +\renewcommand\ttdefault{lmtt} + +\DeclareFontSeriesDefault[tt]{bf}{b} \begin{document} diff --git a/base/testfiles-search/tlb-nfssaxes-006.tlg b/base/testfiles-search/tlb-nfssaxes-006.tlg index 7a06d0869..6adf502ba 100644 --- a/base/testfiles-search/tlb-nfssaxes-006.tlg +++ b/base/testfiles-search/tlb-nfssaxes-006.tlg @@ -7,14 +7,12 @@ l. ... \show\bfseries@rm ->b. l. ... \show\bfseries@sf > \bfseries@tt=macro: -->bx. +->b. l. ... \show\bfseries@tt start: OT1/cmr/m/n bfseries: OT1/cmr/bx/n sffamily: OT1/qpl/b/n mdseries: OT1/qpl/m/n ttfamily: OT1/lmtt/m/n -LaTeX Font Info: Font shape `OT1/lmtt/bx/n' in size <10> not available -(Font) Font shape `OT1/lmtt/b/n' tried instead on input line .... -bfseries: OT1/lmtt/bx/n +bfseries: OT1/lmtt/b/n rmfamily: OT1/cmr/bx/n From 958e6fefdd638a6dcf8a3bb24e76e59067666a6c Mon Sep 17 00:00:00 2001 From: Will Robertson Date: Fri, 25 Oct 2019 22:06:25 +1030 Subject: [PATCH 35/55] nfssaxes doc typos --- base/nfssaxes.tex | 57 ++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index e9d37f0e2..c1356ee42 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -13,10 +13,10 @@ % \item[\texttt{\#1}] current \cs{f@series} % \item[\texttt{\#2}] requested new series % \item[\texttt{\#3}] result (if that exist for the given font family -% \item[\texttt{\#4}] alternative result (if \textt{\#3} does not exist) +% \item[\texttt{\#4}] alternative result (if \texttt{\#3} does not exist) % \end{itemize} % If an \texttt{.fd} file has its own substitution rules then -% \texttt{\#3} exist and thus \textt{\#4} is not applied. +% \texttt{\#3} exist and thus \texttt{\#4} is not applied. % % If there is no matching database entry or if neither the result % nor the alternate result exist in the font family the requested @@ -46,7 +46,7 @@ % \item % % We make \texttt{m} to reset both weight and width (as this is -% how it always worked). To reset just the width \textt{?m} is +% how it always worked). To reset just the width \texttt{?m} is % provided and to reset just the weight \texttt{m?}. % % \item @@ -83,7 +83,7 @@ % \item % % Also: while I did set up all nine standard weight values from -% \texttt{ul} to \textt{ub} I only bothered to provide entries for +% \texttt{ul} to \texttt{ub} I only bothered to provide entries for % \texttt{ec}, \texttt{sc}, \texttt{c} and \texttt{x}, because other levels of % compression/expansion are not in any real fonts that I know. % @@ -686,8 +686,8 @@ %\begin{verbatim} \DeclareFontSeriesChangeRule {m}{sc}{msc}{mc} %\end{verbatim} -% instead of of using \texttt{sc} and \textt{c} as needed in the -% \textt{.fd} file. +% instead of of using \texttt{sc} and \texttt{c} as needed in the +% \texttt{.fd} file. % \begin{macrocode} \def\set@target@series#1{% % \end{macrocode} @@ -706,6 +706,7 @@ } % \end{macrocode} % \end{macro} +% \end{macro} % \section{Changing the shape} @@ -733,11 +734,11 @@ % second time it changes then \texttt{sc} back to normal. Maybe % that's not a bad way to handle it, so I've done that below too. % The alternative would be to provide something like \cs{noscshape} -% as the \pkg{slantsc} package does. +% as the \textsf{slantsc} package does. % % That sort of approach doesn't seem possible with the series as % \cs{bfseries} produces \texttt{bx} (normally) and \cs{mdseries} -% reverts that back to \texttt{{m} (ie no bold and normal width) +% reverts that back to \texttt{m} (ie no bold and normal width) % and I think that needs to be preserved. % % \begin{macro}{\ulcshape} @@ -812,7 +813,7 @@ \DeclareFontShapeChangeRule {it}{sl} {sl} {it} %\DeclareFontShapeChangeRule {it}{sw} {sw} {} % \end{macrocode} -% If neither \textt{scit} nor \texttt{scsl} exist then \texttt{sc} +% If neither \texttt{scit} nor \texttt{scsl} exist then \texttt{sc} % will be used as a fallback albeit with a log entry, so except for % the latter there will be no change for CM or Latin Modern fonts. % \begin{macrocode} @@ -934,7 +935,7 @@ % \end{macro} -% This code implements one aspect of what the package \pkg{fontaxes} +% This code implements one aspect of what the package \textsf{fontaxes} % provide. So its redefinitions for the vairous shape commands, % such as \cs{itshape} should no longer happen. % @@ -969,7 +970,7 @@ } % \end{macrocode} % -% The \pkg{fontaxes} package also implements two further shapes, +% The \textsf{fontaxes} package also implements two further shapes, % namely \cs{swshape} and \cs{sscshape}. They could now easily be % integrated by specifying a few further table entries such as % \begin{macrocode} @@ -982,7 +983,7 @@ % currently only a few fonts % that support swash letters). For ``spaced small capitals'' there a % none among the free fonts. Nevertheless, perhaps that should also be integrated -% in the kernel so that the existing \pkg{fontaxes} support continues to +% in the kernel so that the existing \textsf{fontaxes} support continues to % work in full. % % @@ -1023,8 +1024,8 @@ % but instead of providing a fixed one \LaTeX{} now offers a % general mechanism that allows to define arbitrary sequences. % -% \DeclareMacro\emfontdeclare -% \DeclareMacro\emforce +% \DescribeMacro\emfontdeclare +% \DescribeMacro\emforce % % \emph{decide name! maybe \cs{DeclareEmSequence} ???} % @@ -1040,7 +1041,7 @@ % In such a case one has to use \cs{emforce} to which directs the % mechanism to use the level even if the font attributes haven't changed. % -% \DecsribeMacro\emreset +% \DescribeMacro\emreset % If the nesting is so deep, that the specified levels are % exhausted then \cs{emreset} is used as a final set of % declarations (which by default returns @@ -1052,7 +1053,7 @@ % % \begin{macro}{\emfontdeclare} % -% \cs{emfontdeclare| expects a clist of declaration. Spaces in the +% \cs{emfontdeclare} expects a clist of declaration. Spaces in the % argument are dropped to avoid surious spaces in the output. The % declarations are additive. At the very end the shape is reset % using |\emreset| and |\emforce| so that this case is never @@ -1077,7 +1078,7 @@ % \begin{macro}{\emrest} % Reset the font to upright (this needs to undo \texttt{sc} and -% \textt{it} separately as \cs{upshape} no longer resets both in +% \texttt{it} separately as \cs{upshape} no longer resets both in % one go). % \begin{macrocode} \DeclareRobustCommand\emreset{% @@ -1184,7 +1185,7 @@ % \section{Custom series settings for main document families} % -% One problem with the \NFSS{} approach of handling the series axis +% One problem with the NFSS approach of handling the series axis % turned out to be that (especially with respect to ``boldness'') % different font families implemented different strategies. For % example, with Computer Modern fonts you normally only have @@ -1196,7 +1197,7 @@ % with such fonts). % % The solution back then was to provide substitution rules in the -% font \textt{.fd} such that if a \texttt{bx} series got requested +% font \texttt{.fd} such that if a \texttt{bx} series got requested % the \texttt{b} series got used. While this works in that % particular case, it isn't a very % general solution. For example, if you happen to have a font family that @@ -1223,7 +1224,7 @@ % \item[document family interface:] Can either be \texttt{rm}, % \texttt{sf} or \texttt{tt}. This is optional and if not given the % overall default. -% \item[document series interface:] Can be \textt{md} or +% \item[document series interface:] Can be \texttt{md} or % \texttt{bf}. % \item[series value:] This is the value that is going to be used % with the combination is requested. @@ -1238,11 +1239,11 @@ % redefining \cs{bfdefault} or \cs{mddefault}. % % If some family specify defaults aren't given, e.g. if there are -% no declarations for, say, \textttt{tt} then the format defaults +% no declarations for, say, \texttt{tt} then the format defaults % of \cs{mddefault} and \cs{bfdefault} are assumed. If those are % later changed this is \emph{not} reflected!\footnote{I see no % easy way to achieve this without compromising compatibility with -% existing packages that currently use \pkg{mweights} and directly +% existing packages that currently use \textsf{mweights} and directly % define (some) of the \cs{mdseries@..} commands but not others.} % % @@ -1335,7 +1336,7 @@ % % The default for the medium series is \texttt{m} and this will be % interpreted as resetting both weight and width. To reset only one -% of them the virtual value \textt{?m} and \textt{m?} are available. +% of them the virtual value \texttt{?m} and \texttt{m?} are available. % \begin{macrocode} \edef\mdseries@rm{\mddefault} \edef\mdseries@sf{\mddefault} @@ -1383,7 +1384,7 @@ \DeclareRobustCommand\bfseries{% \not@math@alphabet\bfseries\mathbf % \end{macrocode} -% In the original \NFSS{} definition it then called \cs{fontseries} +% In the original NFSS definition it then called \cs{fontseries} % with the value \cs{bfdefault}. In the new scheme we have more % alternatives and therefore check if the current family % (\cs{f@family}) is the current \cs{rmdef@ult}, \cs{sfdef@ult} or @@ -1435,7 +1436,7 @@ % change the current series before changing the family % \end{macrocode} % If families are changed then we have to do a bit more work. -% In the original \NFSS implementation +% In the original NFSS implementation % a family change kept encoding, series shape and size unchanged % but now we can't any % longer simply reuse the current series value. Instead we may have @@ -1478,7 +1479,7 @@ % If neither test was true we leave the series alone. This way a % special manual setting such as \verb=\fontseries{lc}= is not % undone if the family changes (of course there may not be any -% support for it in the new family but then the \NFSS{} +% support for it in the new family but then the NFSS % substitution kicks in and sorts it out). % \begin{macrocode} \fi\fi\fi\fi @@ -1506,7 +1507,7 @@ % If \cs{target@series@value} is still empty there is nothing more % to do other than selecting the new family. However, if not then % we should update the font series now as well. But there is one -% further subtle issue. We may not have loaded an \textt{.fd} file +% further subtle issue. We may not have loaded an \texttt{.fd} file % for our target font family yet. In the past that was done in % \cs{selectfont} if necessary but since we are now doing all the % comparisons in \cs{fontseries} we need to make sure that the font @@ -1652,7 +1653,7 @@ % As the kernel code now implements the same functionality as -% \pkg{mweights}, albeit internally coded slightly differently, +% \textsf{mweights}, albeit internally coded slightly differently, % that package shouldn't be loaded any more. We therefore pretend % that it already got loaded. Thus, a font package that tries to % load it and then sets \cs{mdseries@..}, etc.\ will continue to From 3c253cc446dfd78cef1538e9be0d05825da21c3a Mon Sep 17 00:00:00 2001 From: Will Robertson Date: Tue, 29 Oct 2019 09:28:05 +1030 Subject: [PATCH 36/55] missing slash --- base/nfssaxes.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index c1356ee42..92cbf8487 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -608,7 +608,7 @@ % \end{macro} -% \begin{macro}{merge@font@series@} +% \begin{macro}{\merge@font@series@} % This now defines the new \cs{f@series}: % \begin{macrocode} \def\merge@font@series@#1#2#3\@nil{% From 4aa054cb1864f1284fe36d8cf21afe754eb128eb Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Tue, 29 Oct 2019 11:51:36 +0100 Subject: [PATCH 37/55] forgot rules starting in "sw" --- base/nfssaxes.tex | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index e9d37f0e2..a8b710c20 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -872,6 +872,15 @@ \DeclareFontShapeChangeRule {scsw}{sc} {scsw} {} \DeclareFontShapeChangeRule {scsw}{ulc} {sw} {} % \end{macrocode} +% +% \begin{macrocode} +%\DeclareFontShapeChangeRule {sw}{n} {n} {} +%\DeclareFontShapeChangeRule {sw}{it} {it} {} +%\DeclareFontShapeChangeRule {sw}{sl} {sl} {} +%\DeclareFontShapeChangeRule {sw}{sw} {sw} {} +\DeclareFontShapeChangeRule {sw}{sc} {scsw} {} +\DeclareFontShapeChangeRule {sw}{ulc} {sw} {} +% \end{macrocode} % By the way, fontspec uses \cs{itscdefault} etc.\ whereas in the From 1ec6f74149b2762d9110d9ee577617f585181a66 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Mon, 4 Nov 2019 18:09:41 +0100 Subject: [PATCH 38/55] use "up" for \upshape provide \normalshape make sure \usefont picks up the font without adjustments in shape or series fix comands using \accent --- base/doc.dtx | 4 +- base/nfssaxes.tex | 87 ++++- base/slides.dtx | 8 +- base/testfiles-search/tlb-nfssaxes-001.lvt | 3 +- base/testfiles-search/tlb-nfssaxes-001.tlg | 3 +- base/testfiles-search/tlb-nfssaxes-007.lvt | 25 ++ base/testfiles-search/tlb-nfssaxes-007.tlg | 7 + base/testfiles/github-robust-0123.luatex.tlg | 2 +- base/testfiles/github-robust-0123.tlg | 2 +- base/testfiles/github-robust-0123.xetex.tlg | 2 +- base/testfiles/tlb2133.luatex.tlg | 318 +++++++++++++++++++ base/testfiles/tlb2133.lvt | 25 +- base/testfiles/tlb2133.tlg | 112 +++++-- base/testfiles/tlb2133.xetex.tlg | 268 ++++++++++++++++ 14 files changed, 804 insertions(+), 62 deletions(-) create mode 100644 base/testfiles-search/tlb-nfssaxes-007.lvt create mode 100644 base/testfiles-search/tlb-nfssaxes-007.tlg create mode 100644 base/testfiles/tlb2133.luatex.tlg create mode 100644 base/testfiles/tlb2133.xetex.tlg diff --git a/base/doc.dtx b/base/doc.dtx index 971bb6053..bb7975d24 100644 --- a/base/doc.dtx +++ b/base/doc.dtx @@ -1453,13 +1453,13 @@ \usefont\encodingdefault \ttdefault \mddefault - \updefault + \shapedefault }% \else \def\MacroFont{\fontencoding\encodingdefault \fontfamily\ttdefault \fontseries\mddefault - \fontshape\updefault + \fontshape\shapedefault \small}% \fi }{} diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 1e52b6e5e..c0491d507 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -608,6 +608,7 @@ % \end{macro} + % \begin{macro}{\merge@font@series@} % This now defines the new \cs{f@series}: % \begin{macrocode} @@ -621,6 +622,7 @@ % dies if \texttt{\#3} starts with a conditional and in the % definition of \cs{AmSfont} that is actually the case. % \begin{macrocode} +%\ifcat\expandafter X\detokenize{#1}X% \def\@reserveda{#3}% \ifx\@reserveda\@empty \set@target@series{#2}% @@ -628,7 +630,11 @@ % \end{macrocode} % Otherwise we check if the desired result for the series % (\texttt{\#1}) exists for the font family and the current shape. +% As the \texttt{.fd} is perhaps not loaded yet, we first +% have to do that, otherwise the test would fail even if the face +% is actually available. % \begin{macrocode} + \maybe@load@fontshape \edef\@reserveda{\f@encoding /\f@family /#1/\f@shape}% \ifcsname \@reserveda \endcsname % \end{macrocode} @@ -660,7 +666,7 @@ } % \end{macrocode} % It is possible that the previous font and the new one are -% actually identical (and the font wasn not found because it still +% actually identical (and the font was not found because it still % needs loading) in which case a warning would look rather odd. So % we make a quick check for that (which is the reason why we defined % \cs{@reserveda} above. @@ -675,13 +681,14 @@ % \end{macrocode} % \end{macro} +\def\maybe@load@fontshape{\begingroup\try@load@fontshape\endgroup} % \begin{macro}{\set@target@series} % \begin{macro}{\series@drop@one@m} % The combined series value determined by the mapping may still % contain an \texttt{m} that we have to remove (as the \texttt{.fd} % files use \texttt{c} not \texttt{mc} to denote a medium weight -% condensed series. We do this in all branches above because a user +% condensed series, etc.). We do this in all branches above because a user % might have written %\begin{verbatim} \DeclareFontSeriesChangeRule {m}{sc}{msc}{mc} @@ -805,6 +812,7 @@ %\DeclareFontShapeChangeRule {n}{sw} {sw} {} %\DeclareFontShapeChangeRule {n}{sc} {sc} {} \DeclareFontShapeChangeRule {n}{ulc} {n} {} +\DeclareFontShapeChangeRule {n}{up} {n} {} % \end{macrocode} % % \begin{macrocode} @@ -819,6 +827,7 @@ % \begin{macrocode} \DeclareFontShapeChangeRule {it}{sc} {scit} {scsl} \DeclareFontShapeChangeRule {it}{ulc} {it} {} +\DeclareFontShapeChangeRule {it}{up} {n} {} % \end{macrocode} % % \begin{macrocode} @@ -828,6 +837,7 @@ %\DeclareFontShapeChangeRule {sl}{sw} {sw} {} \DeclareFontShapeChangeRule {sl}{sc} {scsl} {scit} \DeclareFontShapeChangeRule {sl}{ulc} {sl} {} +\DeclareFontShapeChangeRule {sl}{up} {n} {} % \end{macrocode} % % \begin{macrocode} @@ -837,15 +847,17 @@ \DeclareFontShapeChangeRule {sc}{sw} {scsw} {sw} %\DeclareFontShapeChangeRule {sc}{sc} {sc} {} \DeclareFontShapeChangeRule {sc}{ulc} {n} {} +\DeclareFontShapeChangeRule {sc}{up} {sc} {} % \end{macrocode} % % \begin{macrocode} -\DeclareFontShapeChangeRule {scit}{n} {sc} {} +%\DeclareFontShapeChangeRule {scit}{n} {n} {} \DeclareFontShapeChangeRule {scit}{it} {scit} {} \DeclareFontShapeChangeRule {scit}{sl} {scsl} {scit} \DeclareFontShapeChangeRule {scit}{sw} {scsw} {sc} % or scit? \DeclareFontShapeChangeRule {scit}{sc} {scit} {} \DeclareFontShapeChangeRule {scit}{ulc} {it} {} +\DeclareFontShapeChangeRule {scit}{up} {sc} {} % \end{macrocode} % The previous rule assumes that if \texttt{scit} exists then % \texttt{it} exists as well. If not, the mechanism will save @@ -857,21 +869,23 @@ % that this isn't worth the effort. % % \begin{macrocode} -\DeclareFontShapeChangeRule {scsl}{n} {sc} {} +%\DeclareFontShapeChangeRule {scsl}{n} {n} {} \DeclareFontShapeChangeRule {scsl}{it} {scit} {scsl} \DeclareFontShapeChangeRule {scsl}{sl} {scsl} {} \DeclareFontShapeChangeRule {scsl}{sw} {scsw} {sc} % or scsl? \DeclareFontShapeChangeRule {scsl}{sc} {scsl} {} \DeclareFontShapeChangeRule {scsl}{ulc} {sl} {} +\DeclareFontShapeChangeRule {scsl}{up} {sc} {} % \end{macrocode} % % \begin{macrocode} -\DeclareFontShapeChangeRule {scsw}{n} {sc} {} +%\DeclareFontShapeChangeRule {scsw}{n} {n} {} \DeclareFontShapeChangeRule {scsw}{it} {scit} {scsw} \DeclareFontShapeChangeRule {scsw}{sl} {scsl} {} \DeclareFontShapeChangeRule {scsw}{sw} {scsw} {} \DeclareFontShapeChangeRule {scsw}{sc} {scsw} {} \DeclareFontShapeChangeRule {scsw}{ulc} {sw} {} +\DeclareFontShapeChangeRule {scsw}{up} {sc} {} % \end{macrocode} % % \begin{macrocode} @@ -881,6 +895,7 @@ %\DeclareFontShapeChangeRule {sw}{sw} {sw} {} \DeclareFontShapeChangeRule {sw}{sc} {scsw} {} \DeclareFontShapeChangeRule {sw}{ulc} {sw} {} +\DeclareFontShapeChangeRule {sw}{up} {n} {} % \end{macrocode} @@ -919,13 +934,16 @@ % % \begin{macro}{\merge@font@shape@} -% Same game now, except that we look at shapes not series values. +% Same game now, except that we look at shapes not series values +% and we can set the shape without the complication of dropping +% ``m''s from the name as we had to for the series. % \begin{macrocode} \def\merge@font@shape@#1#2#3\@nil{% \def\@reserveda{#3}% \ifx\@reserveda\@empty \edef\f@shape{#2}% \else + \maybe@load@fontshape \edef\@reserveda{\f@encoding /\f@family /\f@series/#1}% \ifcsname \@reserveda\endcsname \edef\f@shape{#1}% @@ -957,6 +975,7 @@ % \end{macrocode} % I use \cs{protected} here not \cs{DeclareRobustCommand} to avoid % extra status lines that would change test results in the test suite. +% % \begin{macrocode} \protected\def\upshape {\not@math@alphabet\upshape\relax @@ -979,6 +998,13 @@ } % \end{macrocode} % +% Perhaps one should also provide \cs{normalseries}? +% \begin{macrocode} + \protected\def\normalshape + {\not@math@alphabet\normalshape\relax + \fontshape\shapedefault\selectfont}% +% \end{macrocode} +% % The \textsf{fontaxes} package also implements two further shapes, % namely \cs{swshape} and \cs{sscshape}. They could now easily be % integrated by specifying a few further table entries such as @@ -995,6 +1021,28 @@ % in the kernel so that the existing \textsf{fontaxes} support continues to % work in full. % +% +% \begin{macrocode} +\def\updefault{up} +\def\shapedefault{n} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareRobustCommand\usefont[4]{% +% \end{macrocode} +% \cs{fontencoding} needs to do some setup work so we call that, +% but family, series and shape use be used as is so we directly set +% them. If we would call \cs{fontseries} or \cs{fontshape} as it +% was done in the past, they would now interact with the existing +% series and shape which is not desired if we intend to use an +% explicit font shape! +% \begin{macrocode} + \fontencoding{#1}% + \edef\f@family{#2}% + \edef\f@series{#3}% + \edef\f@shape{#4}\selectfont + \ignorespaces} +% \end{macrocode} % % % \subsubsection{Packages that need checking or updating} @@ -1524,7 +1572,7 @@ % \cs{fontseries}. % \begin{macrocode} \ifx\target@series@value\@empty \else - \begingroup\try@load@fontshape\endgroup + \maybe@load@fontshape % \end{macrocode} % Updating the series in this case means directly changing % \cs{f@series} to the target value. We don't want to go through @@ -1562,7 +1610,7 @@ \fi\fi \fontfamily\sfdefault \ifx\target@series@value\@empty \else - \begingroup\try@load@fontshape\endgroup + \maybe@load@fontshape \let\f@series\target@series@value \fi \selectfont} @@ -1588,7 +1636,7 @@ \fi\fi \fontfamily\ttdefault \ifx\target@series@value\@empty \else - \begingroup\try@load@fontshape\endgroup + \maybe@load@fontshape \let\f@series\target@series@value \fi \selectfont} @@ -1601,6 +1649,27 @@ +% \begin{macro}{\add@accent} +% +% \begin{macrocode} +\def\add@accent#1#2{\hmode@bgroup + \let\hmode@start@before@group\@firstofone + \setbox\@tempboxa\hbox{#2% + \global\mathchardef\accent@spacefactor\spacefactor}% +% \end{macrocode} +% The accent primitive doesn't allow things \cs{begingroup} to +% interfere between accent and base character. Therefore we need to +% avoid that. As we don't have to load the fontshape in this case +% (as that happened in the box above if necessary, we simply +% disable that part of the code temporaily. +% We also ignore \cs{ignorespaces} which has the same issue and may +% show up as part of \cs{normalfont} if that is used. +% \begin{macrocode} + \let\maybe@load@fontshape\relax + \let\ignorespaces\relax + \accent#1 #2\egroup\spacefactor\accent@spacefactor} + % \end{macrocode} +% \end{macro} diff --git a/base/slides.dtx b/base/slides.dtx index 54cfaa20f..c532db445 100644 --- a/base/slides.dtx +++ b/base/slides.dtx @@ -53,7 +53,7 @@ %<*driver> \ProvidesFile{slides.drv} % - [2016/03/29 v2.4a + [2019/11/04 v2.4b %<+class> Standard LaTeX document class] %<+cmd> SLiTeX definitions] % \end{macrocode} @@ -419,6 +419,12 @@ \def\sldefault{sl} \def\bfdefault{bx} % \end{macrocode} +% As |\fontshape| gets redefined we need to make sure that the default +% for |\upshape| is no longer \texttt{up} but again \texttt{n}. +% \changes{v2.4b}{2019/11/04}{Explicitly set \cs{updefault}} +% \begin{macrocode} +\def\updefault{n} +% \end{macrocode} % % % Since the number of parameters to set are very large it seems diff --git a/base/testfiles-search/tlb-nfssaxes-001.lvt b/base/testfiles-search/tlb-nfssaxes-001.lvt index 7f21036a4..e5ca2fe58 100644 --- a/base/testfiles-search/tlb-nfssaxes-001.lvt +++ b/base/testfiles-search/tlb-nfssaxes-001.lvt @@ -24,7 +24,8 @@ Test \showresult{shape}\scshape after scshape \showresult{shape}\itshape after itshape \showresult{shape}\upshape after upshape -\showresult{shape}\upshape after upshape +\showresult{shape}\upshape after upshape % no change any longer +\showresult{shape}\ulcshape after ulcshape \showresult{shape}\slshape after slshape \showresult{shape}\scshape after scshape \showresult{shape}\upshape after upshape diff --git a/base/testfiles-search/tlb-nfssaxes-001.tlg b/base/testfiles-search/tlb-nfssaxes-001.tlg index 18a1fde03..a022df3c3 100644 --- a/base/testfiles-search/tlb-nfssaxes-001.tlg +++ b/base/testfiles-search/tlb-nfssaxes-001.tlg @@ -8,7 +8,8 @@ LaTeX Font Warning: Font shape `T1/lmr/m/scit' undefined (Font) using `T1/lmr/m/scsl' instead on input line .... \itshape -> scsl \upshape -> sc -\upshape -> n +\upshape -> sc +\ulcshape -> n \slshape -> sl \scshape -> scsl \upshape -> sc diff --git a/base/testfiles-search/tlb-nfssaxes-007.lvt b/base/testfiles-search/tlb-nfssaxes-007.lvt new file mode 100644 index 000000000..b912dd0e4 --- /dev/null +++ b/base/testfiles-search/tlb-nfssaxes-007.lvt @@ -0,0 +1,25 @@ +\documentclass{article} + +\input{test2e} + + +\makeatletter +\def\showfont#1{\typeout{#1: \f@encoding/\f@family/\f@series/\f@shape}} +\makeatother + + +\renewcommand\rmdefault{qpl} + +\begin{document} + +\START + +\showfont{start} + +\bfseries\normalfont \showfont{bfseries} +\scshape\normalfont \showfont{scshape} +\itshape\normalfont \showfont{itshape} + +\scshape\itshape\normalfont \showfont{scshape+itshape} + +\END diff --git a/base/testfiles-search/tlb-nfssaxes-007.tlg b/base/testfiles-search/tlb-nfssaxes-007.tlg new file mode 100644 index 000000000..3fa926057 --- /dev/null +++ b/base/testfiles-search/tlb-nfssaxes-007.tlg @@ -0,0 +1,7 @@ +This is a generated file for the LaTeX2e validation system. +Don't change this file in any respect. +start: OT1/qpl/m/n +bfseries: OT1/qpl/m/n +scshape: OT1/qpl/m/n +itshape: OT1/qpl/m/n +scshape+itshape: OT1/qpl/m/n diff --git a/base/testfiles/github-robust-0123.luatex.tlg b/base/testfiles/github-robust-0123.luatex.tlg index c21a2e323..5edf7ee93 100644 --- a/base/testfiles/github-robust-0123.luatex.tlg +++ b/base/testfiles/github-robust-0123.luatex.tlg @@ -2049,7 +2049,7 @@ and I'll forget about whatever was undefined. --------------------------------------- \upbracefill -> \upbracefill --------------------------------------- -\updefault -> n +\updefault -> up --------------------------------------- \updownarrow -> \updownarrow --------------------------------------- diff --git a/base/testfiles/github-robust-0123.tlg b/base/testfiles/github-robust-0123.tlg index 8c247c65d..2ed7e4407 100644 --- a/base/testfiles/github-robust-0123.tlg +++ b/base/testfiles/github-robust-0123.tlg @@ -2033,7 +2033,7 @@ l. ......fter\show\csname Downarrow\space\endcsname --------------------------------------- \upbracefill -> \upbracefill --------------------------------------- -\updefault -> n +\updefault -> up --------------------------------------- \updownarrow -> \updownarrow --------------------------------------- diff --git a/base/testfiles/github-robust-0123.xetex.tlg b/base/testfiles/github-robust-0123.xetex.tlg index 619582348..ab0c9d226 100644 --- a/base/testfiles/github-robust-0123.xetex.tlg +++ b/base/testfiles/github-robust-0123.xetex.tlg @@ -2049,7 +2049,7 @@ and I'll forget about whatever was undefined. --------------------------------------- \upbracefill -> \upbracefill --------------------------------------- -\updefault -> n +\updefault -> up --------------------------------------- \updownarrow -> \updownarrow --------------------------------------- diff --git a/base/testfiles/tlb2133.luatex.tlg b/base/testfiles/tlb2133.luatex.tlg new file mode 100644 index 000000000..4d30dcf0e --- /dev/null +++ b/base/testfiles/tlb2133.luatex.tlg @@ -0,0 +1,318 @@ +This is a generated file for the LaTeX2e validation system. +Don't change this file in any respect. +(tlb2133.aux) +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line .... +LaTeX Font Info: ... okay on input line .... +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line .... +LaTeX Font Info: ... okay on input line .... +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line .... +LaTeX Font Info: ... okay on input line .... +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line .... +LaTeX Font Info: ... okay on input line .... +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line .... +LaTeX Font Info: ... okay on input line .... +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line .... +LaTeX Font Info: ... okay on input line .... +Completed box being shipped out [1] +\vbox(633.0+0.0)x407.0, direction TLT +.\glue 16.0 +.\vbox(617.0+0.0)x345.0, shifted 62.0, direction TLT +..\vbox(12.0+0.0)x345.0, glue set 12.0fil, direction TLT +...\glue 0.0 plus 1.0fil +...\hbox(0.0+0.0)x345.0, direction TLT +..\glue 25.0 +..\glue(\lineskip) 0.0 +..\vbox(550.0+0.0)x345.0, glue set 431.95386fil, direction TLT +...\write-{} +...\glue(\topskip) 0.78398 +...\hbox(9.21602+2.49939)x345.0, glue set 280.51208fil, direction TLT +....\localpar +.....\localinterlinepenalty=0 +.....\localbrokenpenalty=0 +.....\localleftbox=null +.....\localrightbox=null +....\hbox(0.0+0.0)x15.0, direction TLT +....\T1/cmr/m/n/10 X +....\glue(\spaceskip) 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 s +....\T1/cmr/m/n/10 e +....\T1/cmr/m/n/10 l +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\kern-1.11084 (accent) +....\hbox(6.63332+0.0)x4.99878, shifted -2.5827, direction TLT +.....\T1/cmr/m/n/10 ^^D +....\kern-3.88794 (accent) +....\T1/cmr/m/n/10 l +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 0.53848 +...\hbox(8.96213+2.49939)x345.0, glue set 263.0719fil, direction TLT +....\localpar +.....\localinterlinepenalty=0 +.....\localbrokenpenalty=0 +.....\localleftbox=null +.....\localrightbox=null +....\hbox(0.0+0.0)x15.0, direction TLT +....\T1/cmr/m/n/10 X +....\glue(\spaceskip) 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 i +....\T1/cmr/m/n/10 g +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\kern-1.11084 (accent) +....\hbox(6.63332+0.0)x4.99878, shifted -2.32881, direction TLT +.....\T1/cmr/m/n/10 ^^D +....\kern-3.88794 (accent) +....\T1/cmr/m/n/10 i +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 n +....\T1/cmr/m/n/10 o +....\kern-0.27771 (font) +....\T1/cmr/m/n/10 w +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 2.00244 +...\hbox(7.49817+2.49939)x345.0, glue set 229.469fil, direction TLT +....\localpar +.....\localinterlinepenalty=0 +.....\localbrokenpenalty=0 +.....\localleftbox=null +.....\localrightbox=null +....\hbox(0.0+0.0)x15.0, direction TLT +....\T1/cmr/m/n/10 X +....\glue(\spaceskip) 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 n +....\T1/cmr/m/n/10 e +....\T1/cmr/m/n/10 w +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\kern0.27771 (accent) +....\T1/cmr/m/n/10 ^^D +....\kern-5.27649 (accent) +....\T1/cmr/m/n/10 n +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 n +....\T1/cmr/m/n/10 o +....\kern-0.27771 (font) +....\T1/cmr/m/n/10 w +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 1.23596 +...\hbox(8.26465+2.49939)x345.0, glue set 239.7304fil, direction TLT +....\localpar +.....\localinterlinepenalty=0 +.....\localbrokenpenalty=0 +.....\localleftbox=null +.....\localrightbox=null +....\hbox(0.0+0.0)x15.0, direction TLT +....\T1/cmr/m/n/10 X +....\glue(\spaceskip) 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 l +....\T1/cmr/m/n/10 a +....\T1/cmr/m/n/10 r +....\T1/cmr/m/n/10 g +....\T1/cmr/m/n/10 e +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ^^D +....\T1/cmr/m/n/12 l +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 s +....\T1/cmr/m/n/10 t +....\T1/cmr/m/n/10 i +....\T1/cmr/m/n/10 l +....\T1/cmr/m/n/10 l +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 b +....\T1/cmr/m/n/10 a +....\T1/cmr/m/n/10 d +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 0.28459 +...\hbox(9.21602+2.49939)x345.0, glue set 284.95544fil, direction TLT +....\localpar +.....\localinterlinepenalty=0 +.....\localbrokenpenalty=0 +.....\localleftbox=null +.....\localrightbox=null +....\hbox(0.0+0.0)x15.0, direction TLT +....\T1/cmr/m/n/10 X +....\glue(\spaceskip) 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 s +....\T1/cmr/m/n/10 l +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\kern0.03706 (accent) +....\hbox(6.63332+0.0)x4.99878, shifted -2.5827, direction TLT +.....\T1/cmr/m/n/10 ^^D +....\kern-5.03584 (accent) +....\T1/cmr/m/sl/10 l +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 2.6134 +...\hbox(6.8872+0.0)x345.0, glue set 297.05893fil, direction TLT +....\localpar +.....\localinterlinepenalty=0 +.....\localbrokenpenalty=0 +.....\localleftbox=null +.....\localrightbox=null +....\hbox(0.0+0.0)x15.0, direction TLT +....\T1/cmr/m/n/10 X +....\glue(\spaceskip) 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 t +....\T1/cmr/m/n/10 s +....\T1/cmr/m/n/10 l +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ^^D +....\T1/cmr/m/sl/10 l +....\kern0.39346 (italic) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 2.78398 +...\hbox(9.21602+2.49939)x345.0, glue set 279.40125fil, direction TLT +....\localpar +.....\localinterlinepenalty=0 +.....\localbrokenpenalty=0 +.....\localleftbox=null +.....\localrightbox=null +....\hbox(0.0+0.0)x15.0, direction TLT +....\T1/cmr/m/n/10 X +....\glue(\spaceskip) 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 n +....\T1/cmr/m/n/10 s +....\T1/cmr/m/n/10 l +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\kern0.03706 (accent) +....\hbox(6.63332+0.0)x4.99878, shifted -2.5827, direction TLT +.....\T1/cmr/m/n/10 ^^D +....\kern-5.03584 (accent) +....\T1/cmr/m/sl/10 l +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 0.2707 +...\hbox(9.2299+2.49939)x345.0, glue set 280.70648fil, direction TLT +....\localpar +.....\localinterlinepenalty=0 +.....\localbrokenpenalty=0 +.....\localleftbox=null +.....\localrightbox=null +....\hbox(0.0+0.0)x15.0, direction TLT +....\T1/cmr/m/n/10 X +....\glue(\spaceskip) 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 b +....\kern-0.27771 (font) +....\T1/cmr/m/n/10 x +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\kern-0.90256 (accent) +....\hbox(6.63332+0.0)x4.99878, shifted -2.59659, direction TLT +.....\T1/cmr/m/n/10 ^^D +....\kern-4.09622 (accent) +....\T1/cmr/bx/n/10 l +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 0.2707 +...\hbox(9.2299+2.49939)x345.0, glue set 282.65045fil, direction TLT +....\localpar +.....\localinterlinepenalty=0 +.....\localbrokenpenalty=0 +.....\localleftbox=null +.....\localrightbox=null +....\hbox(0.0+0.0)x15.0, direction TLT +....\T1/cmr/m/n/10 X +....\glue(\spaceskip) 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 b +....\T1/cmr/m/n/10 f +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\kern-0.90256 (accent) +....\hbox(6.63332+0.0)x4.99878, shifted -2.59659, direction TLT +.....\T1/cmr/m/n/10 ^^D +....\kern-4.09622 (accent) +....\T1/cmr/bx/n/10 l +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 2.59952 +...\hbox(6.9011+0.0)x345.0, glue set 295.1474fil, direction TLT +....\localpar +.....\localinterlinepenalty=0 +.....\localbrokenpenalty=0 +.....\localleftbox=null +.....\localrightbox=null +....\hbox(0.0+0.0)x15.0, direction TLT +....\T1/cmr/m/n/10 X +....\glue(\spaceskip) 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 t +....\T1/cmr/m/n/10 b +....\T1/cmr/m/n/10 f +....\glue(\spaceskip) 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ^^D +....\kern0.0 (italic) +....\T1/cmr/bx/n/10 l +....\kern0.0 (italic) +....\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 +..\glue(\baselineskip) 23.5849 +..\hbox(6.4151+0.0)x345.0, glue set 170.00061fil, direction TLT +...\glue 0.0 plus 1.0fil +...\T1/cmr/m/n/10 1 +...\glue 0.0 plus 1.0fil +(tlb2133.aux) diff --git a/base/testfiles/tlb2133.lvt b/base/testfiles/tlb2133.lvt index 58c6e8471..298b3a440 100644 --- a/base/testfiles/tlb2133.lvt +++ b/base/testfiles/tlb2133.lvt @@ -18,6 +18,7 @@ % Everything before this is ignored by the test system. \START + \begin{document} @@ -31,37 +32,31 @@ \setbox0 \hbox {\large l } % OK: - X sel \"{\selectfont l} + X sel \"{\selectfont l} (ok) % BAD (ignorespaces): - X ig \"{\ignorespaces i} - - % BAD (ignorespaces in usefont in normalfont): - X nor \"{\normalfont n} + X ig \"{\ignorespaces i} (now ok) - \def\usefont#1#2#3#4{\fontencoding{#1}\fontfamily{#2}% - \fontseries{#3}\fontshape{#4}\selectfont} - - % OK: - X new \"{\normalfont n} + % OK: (ignorespaces in usefont in normalfont): + X new \"{\normalfont n} (ok) (now ok) % BAD (Why ???): - X lar \"{\large l} + X large \"{\large l} (still bad) % OK: - X sl \"{\sl l} + X sl \"{\sl l} (ok) % BAD (group, maybe fixable?): X tsl \"{\textsl{l}} % OK: - X nsl \"{\normalfont\fontshape{sl}\selectfont l} + X nsl \"{\normalfont\fontshape{sl}\selectfont l} (ok) % OK: - X bx \"{\fontseries{bx}\selectfont l} + X bx \"{\fontseries{bx}\selectfont l} (ok) % OK: - X bf \"{\bf l} + X bf \"{\bf l} (ok) % BAD (group, maybe fixable?): X tbf \"{\textbf{l}} diff --git a/base/testfiles/tlb2133.tlg b/base/testfiles/tlb2133.tlg index 786725963..2a2907689 100644 --- a/base/testfiles/tlb2133.tlg +++ b/base/testfiles/tlb2133.tlg @@ -22,10 +22,10 @@ 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 419.95514fil +..\vbox(550.0+0.0)x345.0, glue set 431.95386fil ...\write-{} ...\glue(\topskip) 0.78398 -...\hbox(9.21602+0.0)x345.0, glue set 301.89575fil +...\hbox(9.21602+2.49939)x345.0, glue set 280.51208fil ....\hbox(0.0+0.0)x15.0 ....\T1/cmr/m/n/10 X ....\glue 3.33252 plus 1.66458 minus 1.11194 @@ -38,41 +38,44 @@ Completed box being shipped out [1] .....\T1/cmr/m/n/10 ^^D ....\kern -3.88794 (for accent) ....\T1/cmr/m/n/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) ....\penalty 10000 ....\glue(\parfillskip) 0.0 plus 1.0fil ....\glue(\rightskip) 0.0 ...\glue(\parskip) 0.0 plus 1.0 -...\glue(\baselineskip) 5.1128 -...\hbox(6.8872+1.94397)x345.0, glue set 300.28503fil +...\glue(\baselineskip) 0.53848 +...\hbox(8.96213+2.49939)x345.0, glue set 263.0719fil ....\hbox(0.0+0.0)x15.0 ....\T1/cmr/m/n/10 X ....\glue 3.33252 plus 1.66458 minus 1.11194 ....\T1/cmr/m/n/10 i ....\T1/cmr/m/n/10 g ....\glue 3.33252 plus 1.66626 minus 1.11084 -....\T1/cmr/m/n/10 ^^D +....\kern -1.11084 (for accent) +....\hbox(6.63332+0.0)x4.99878, shifted -2.32881 +.....\T1/cmr/m/n/10 ^^D +....\kern -3.88794 (for accent) ....\T1/cmr/m/n/10 i -....\penalty 10000 -....\glue(\parfillskip) 0.0 plus 1.0fil -....\glue(\rightskip) 0.0 -...\glue(\parskip) 0.0 plus 1.0 -...\glue(\baselineskip) 3.16882 -...\hbox(6.8872+0.0)x345.0, glue set 290.81512fil -....\hbox(0.0+0.0)x15.0 -....\T1/cmr/m/n/10 X -....\glue 3.33252 plus 1.66458 minus 1.11194 +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( ....\T1/cmr/m/n/10 n ....\T1/cmr/m/n/10 o -....\T1/cmr/m/n/10 r +....\kern-0.27771 +....\T1/cmr/m/n/10 w ....\glue 3.33252 plus 1.66626 minus 1.11084 -....\T1/cmr/m/n/10 ^^D -....\T1/cmr/m/n/10 n +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) ....\penalty 10000 ....\glue(\parfillskip) 0.0 plus 1.0fil ....\glue(\rightskip) 0.0 ...\glue(\parskip) 0.0 plus 1.0 -...\glue(\baselineskip) 5.1128 -...\hbox(6.8872+0.0)x345.0, glue set 293.06458fil +...\glue(\baselineskip) 2.00244 +...\hbox(7.49817+2.49939)x345.0, glue set 229.469fil ....\hbox(0.0+0.0)x15.0 ....\T1/cmr/m/n/10 X ....\glue 3.33252 plus 1.66458 minus 1.11194 @@ -84,27 +87,56 @@ Completed box being shipped out [1] ....\T1/cmr/m/n/10 ^^D ....\kern -5.27649 (for accent) ....\T1/cmr/m/n/10 n +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 n +....\T1/cmr/m/n/10 o +....\kern-0.27771 +....\T1/cmr/m/n/10 w +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) ....\penalty 10000 ....\glue(\parfillskip) 0.0 plus 1.0fil ....\glue(\rightskip) 0.0 ...\glue(\parskip) 0.0 plus 1.0 -...\glue(\baselineskip) 3.73535 -...\hbox(8.26465+0.0)x345.0, glue set 295.88335fil +...\glue(\baselineskip) 1.23596 +...\hbox(8.26465+2.49939)x345.0, glue set 239.7304fil ....\hbox(0.0+0.0)x15.0 ....\T1/cmr/m/n/10 X ....\glue 3.33252 plus 1.66458 minus 1.11194 ....\T1/cmr/m/n/10 l ....\T1/cmr/m/n/10 a ....\T1/cmr/m/n/10 r +....\T1/cmr/m/n/10 g +....\T1/cmr/m/n/10 e ....\glue 3.33252 plus 1.66626 minus 1.11084 ....\T1/cmr/m/n/10 ^^D ....\T1/cmr/m/n/12 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 s +....\T1/cmr/m/n/10 t +....\T1/cmr/m/n/10 i +....\T1/cmr/m/n/10 l +....\T1/cmr/m/n/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 b +....\T1/cmr/m/n/10 a +....\T1/cmr/m/n/10 d +....\T1/cmr/m/n/10 ) ....\penalty 10000 ....\glue(\parfillskip) 0.0 plus 1.0fil ....\glue(\rightskip) 0.0 ...\glue(\parskip) 0.0 plus 1.0 -...\glue(\baselineskip) 2.78398 -...\hbox(9.21602+0.0)x345.0, glue set 306.33911fil +...\glue(\baselineskip) 0.28459 +...\hbox(9.21602+2.49939)x345.0, glue set 284.95544fil ....\hbox(0.0+0.0)x15.0 ....\T1/cmr/m/n/10 X ....\glue 3.33252 plus 1.66458 minus 1.11194 @@ -116,11 +148,16 @@ Completed box being shipped out [1] .....\T1/cmr/m/n/10 ^^D ....\kern -5.03584 (for accent) ....\T1/cmr/m/sl/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) ....\penalty 10000 ....\glue(\parfillskip) 0.0 plus 1.0fil ....\glue(\rightskip) 0.0 ...\glue(\parskip) 0.0 plus 1.0 -...\glue(\baselineskip) 5.1128 +...\glue(\baselineskip) 2.6134 ...\hbox(6.8872+0.0)x345.0, glue set 297.05893fil ....\hbox(0.0+0.0)x15.0 ....\T1/cmr/m/n/10 X @@ -137,7 +174,7 @@ Completed box being shipped out [1] ....\glue(\rightskip) 0.0 ...\glue(\parskip) 0.0 plus 1.0 ...\glue(\baselineskip) 2.78398 -...\hbox(9.21602+0.0)x345.0, glue set 300.78491fil +...\hbox(9.21602+2.49939)x345.0, glue set 279.40125fil ....\hbox(0.0+0.0)x15.0 ....\T1/cmr/m/n/10 X ....\glue 3.33252 plus 1.66458 minus 1.11194 @@ -150,12 +187,17 @@ Completed box being shipped out [1] .....\T1/cmr/m/n/10 ^^D ....\kern -5.03584 (for accent) ....\T1/cmr/m/sl/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) ....\penalty 10000 ....\glue(\parfillskip) 0.0 plus 1.0fil ....\glue(\rightskip) 0.0 ...\glue(\parskip) 0.0 plus 1.0 -...\glue(\baselineskip) 2.7701 -...\hbox(9.2299+0.0)x345.0, glue set 302.09015fil +...\glue(\baselineskip) 0.2707 +...\hbox(9.2299+2.49939)x345.0, glue set 280.70648fil ....\hbox(0.0+0.0)x15.0 ....\T1/cmr/m/n/10 X ....\glue 3.33252 plus 1.66458 minus 1.11194 @@ -168,12 +210,17 @@ Completed box being shipped out [1] .....\T1/cmr/m/n/10 ^^D ....\kern -4.09622 (for accent) ....\T1/cmr/bx/n/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) ....\penalty 10000 ....\glue(\parfillskip) 0.0 plus 1.0fil ....\glue(\rightskip) 0.0 ...\glue(\parskip) 0.0 plus 1.0 -...\glue(\baselineskip) 2.7701 -...\hbox(9.2299+0.0)x345.0, glue set 304.03412fil +...\glue(\baselineskip) 0.2707 +...\hbox(9.2299+2.49939)x345.0, glue set 282.65045fil ....\hbox(0.0+0.0)x15.0 ....\T1/cmr/m/n/10 X ....\glue 3.33252 plus 1.66458 minus 1.11194 @@ -185,11 +232,16 @@ Completed box being shipped out [1] .....\T1/cmr/m/n/10 ^^D ....\kern -4.09622 (for accent) ....\T1/cmr/bx/n/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) ....\penalty 10000 ....\glue(\parfillskip) 0.0 plus 1.0fil ....\glue(\rightskip) 0.0 ...\glue(\parskip) 0.0 plus 1.0 -...\glue(\baselineskip) 5.0989 +...\glue(\baselineskip) 2.59952 ...\hbox(6.9011+0.0)x345.0, glue set 295.1474fil ....\hbox(0.0+0.0)x15.0 ....\T1/cmr/m/n/10 X diff --git a/base/testfiles/tlb2133.xetex.tlg b/base/testfiles/tlb2133.xetex.tlg new file mode 100644 index 000000000..2a2907689 --- /dev/null +++ b/base/testfiles/tlb2133.xetex.tlg @@ -0,0 +1,268 @@ +This is a generated file for the LaTeX2e validation system. +Don't change this file in any respect. +(tlb2133.aux) +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line .... +LaTeX Font Info: ... okay on input line .... +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line .... +LaTeX Font Info: ... okay on input line .... +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line .... +LaTeX Font Info: ... okay on input line .... +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line .... +LaTeX Font Info: ... okay on input line .... +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line .... +LaTeX Font Info: ... okay on input line .... +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line .... +LaTeX Font Info: ... okay on input line .... +Completed box being shipped out [1] +\vbox(633.0+0.0)x407.0 +.\glue 16.0 +.\vbox(617.0+0.0)x345.0, shifted 62.0 +..\vbox(12.0+0.0)x345.0, glue set 12.0fil +...\glue 0.0 plus 1.0fil +...\hbox(0.0+0.0)x345.0 +..\glue 25.0 +..\glue(\lineskip) 0.0 +..\vbox(550.0+0.0)x345.0, glue set 431.95386fil +...\write-{} +...\glue(\topskip) 0.78398 +...\hbox(9.21602+2.49939)x345.0, glue set 280.51208fil +....\hbox(0.0+0.0)x15.0 +....\T1/cmr/m/n/10 X +....\glue 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 s +....\T1/cmr/m/n/10 e +....\T1/cmr/m/n/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\kern -1.11084 (for accent) +....\hbox(6.63332+0.0)x4.99878, shifted -2.5827 +.....\T1/cmr/m/n/10 ^^D +....\kern -3.88794 (for accent) +....\T1/cmr/m/n/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 0.53848 +...\hbox(8.96213+2.49939)x345.0, glue set 263.0719fil +....\hbox(0.0+0.0)x15.0 +....\T1/cmr/m/n/10 X +....\glue 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 i +....\T1/cmr/m/n/10 g +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\kern -1.11084 (for accent) +....\hbox(6.63332+0.0)x4.99878, shifted -2.32881 +.....\T1/cmr/m/n/10 ^^D +....\kern -3.88794 (for accent) +....\T1/cmr/m/n/10 i +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 n +....\T1/cmr/m/n/10 o +....\kern-0.27771 +....\T1/cmr/m/n/10 w +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 2.00244 +...\hbox(7.49817+2.49939)x345.0, glue set 229.469fil +....\hbox(0.0+0.0)x15.0 +....\T1/cmr/m/n/10 X +....\glue 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 n +....\T1/cmr/m/n/10 e +....\T1/cmr/m/n/10 w +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\kern 0.27771 (for accent) +....\T1/cmr/m/n/10 ^^D +....\kern -5.27649 (for accent) +....\T1/cmr/m/n/10 n +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 n +....\T1/cmr/m/n/10 o +....\kern-0.27771 +....\T1/cmr/m/n/10 w +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 1.23596 +...\hbox(8.26465+2.49939)x345.0, glue set 239.7304fil +....\hbox(0.0+0.0)x15.0 +....\T1/cmr/m/n/10 X +....\glue 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 l +....\T1/cmr/m/n/10 a +....\T1/cmr/m/n/10 r +....\T1/cmr/m/n/10 g +....\T1/cmr/m/n/10 e +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ^^D +....\T1/cmr/m/n/12 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 s +....\T1/cmr/m/n/10 t +....\T1/cmr/m/n/10 i +....\T1/cmr/m/n/10 l +....\T1/cmr/m/n/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 b +....\T1/cmr/m/n/10 a +....\T1/cmr/m/n/10 d +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 0.28459 +...\hbox(9.21602+2.49939)x345.0, glue set 284.95544fil +....\hbox(0.0+0.0)x15.0 +....\T1/cmr/m/n/10 X +....\glue 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 s +....\T1/cmr/m/n/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\kern 0.03706 (for accent) +....\hbox(6.63332+0.0)x4.99878, shifted -2.5827 +.....\T1/cmr/m/n/10 ^^D +....\kern -5.03584 (for accent) +....\T1/cmr/m/sl/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 2.6134 +...\hbox(6.8872+0.0)x345.0, glue set 297.05893fil +....\hbox(0.0+0.0)x15.0 +....\T1/cmr/m/n/10 X +....\glue 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 t +....\T1/cmr/m/n/10 s +....\T1/cmr/m/n/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ^^D +....\T1/cmr/m/sl/10 l +....\kern 0.39346 +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 2.78398 +...\hbox(9.21602+2.49939)x345.0, glue set 279.40125fil +....\hbox(0.0+0.0)x15.0 +....\T1/cmr/m/n/10 X +....\glue 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 n +....\T1/cmr/m/n/10 s +....\T1/cmr/m/n/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\kern 0.03706 (for accent) +....\hbox(6.63332+0.0)x4.99878, shifted -2.5827 +.....\T1/cmr/m/n/10 ^^D +....\kern -5.03584 (for accent) +....\T1/cmr/m/sl/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 0.2707 +...\hbox(9.2299+2.49939)x345.0, glue set 280.70648fil +....\hbox(0.0+0.0)x15.0 +....\T1/cmr/m/n/10 X +....\glue 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 b +....\kern-0.27771 +....\T1/cmr/m/n/10 x +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\kern -0.90256 (for accent) +....\hbox(6.63332+0.0)x4.99878, shifted -2.59659 +.....\T1/cmr/m/n/10 ^^D +....\kern -4.09622 (for accent) +....\T1/cmr/bx/n/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 0.2707 +...\hbox(9.2299+2.49939)x345.0, glue set 282.65045fil +....\hbox(0.0+0.0)x15.0 +....\T1/cmr/m/n/10 X +....\glue 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 b +....\T1/cmr/m/n/10 f +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\kern -0.90256 (for accent) +....\hbox(6.63332+0.0)x4.99878, shifted -2.59659 +.....\T1/cmr/m/n/10 ^^D +....\kern -4.09622 (for accent) +....\T1/cmr/bx/n/10 l +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ( +....\T1/cmr/m/n/10 o +....\T1/cmr/m/n/10 k +....\T1/cmr/m/n/10 ) +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue(\parskip) 0.0 plus 1.0 +...\glue(\baselineskip) 2.59952 +...\hbox(6.9011+0.0)x345.0, glue set 295.1474fil +....\hbox(0.0+0.0)x15.0 +....\T1/cmr/m/n/10 X +....\glue 3.33252 plus 1.66458 minus 1.11194 +....\T1/cmr/m/n/10 t +....\T1/cmr/m/n/10 b +....\T1/cmr/m/n/10 f +....\glue 3.33252 plus 1.66626 minus 1.11084 +....\T1/cmr/m/n/10 ^^D +....\kern 0.0 +....\T1/cmr/bx/n/10 l +....\kern 0.0 +....\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 +..\glue(\baselineskip) 23.5849 +..\hbox(6.4151+0.0)x345.0, glue set 170.00061fil +...\glue 0.0 plus 1.0fil +...\T1/cmr/m/n/10 1 +...\glue 0.0 plus 1.0fil +(tlb2133.aux) From ac274cd42e83ca97d11719adb9f7961ac15ea68e Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Mon, 4 Nov 2019 19:32:01 +0100 Subject: [PATCH 39/55] fontspec uses \updefault for math font setup but should use \shapedefault in the future (accept for now) --- required/amsmath/testfiles-TU/tlb-utex-004.luatex.tlg | 1 + required/amsmath/testfiles-TU/tlb-utex-004.xetex.tlg | 1 + required/amsmath/testfiles-TU/tlb-utex-005.luatex.tlg | 1 + required/amsmath/testfiles-TU/tlb-utex-005.xetex.tlg | 1 + 4 files changed, 4 insertions(+) diff --git a/required/amsmath/testfiles-TU/tlb-utex-004.luatex.tlg b/required/amsmath/testfiles-TU/tlb-utex-004.luatex.tlg index aba436ca1..ff6212d50 100644 --- a/required/amsmath/testfiles-TU/tlb-utex-004.luatex.tlg +++ b/required/amsmath/testfiles-TU/tlb-utex-004.luatex.tlg @@ -3,3 +3,4 @@ Don't change this file in any respect. This test has error at begin document due to the special font setup in the test suite [1 ] (tlb-utex-004.aux) +LaTeX Font Warning: Some font shapes were not available, defaults substituted. diff --git a/required/amsmath/testfiles-TU/tlb-utex-004.xetex.tlg b/required/amsmath/testfiles-TU/tlb-utex-004.xetex.tlg index aba436ca1..ff6212d50 100644 --- a/required/amsmath/testfiles-TU/tlb-utex-004.xetex.tlg +++ b/required/amsmath/testfiles-TU/tlb-utex-004.xetex.tlg @@ -3,3 +3,4 @@ Don't change this file in any respect. This test has error at begin document due to the special font setup in the test suite [1 ] (tlb-utex-004.aux) +LaTeX Font Warning: Some font shapes were not available, defaults substituted. diff --git a/required/amsmath/testfiles-TU/tlb-utex-005.luatex.tlg b/required/amsmath/testfiles-TU/tlb-utex-005.luatex.tlg index 3aac12a4e..a740ca841 100644 --- a/required/amsmath/testfiles-TU/tlb-utex-005.luatex.tlg +++ b/required/amsmath/testfiles-TU/tlb-utex-005.luatex.tlg @@ -3,3 +3,4 @@ Don't change this file in any respect. This test has error at begin document due to the special font setup in the test suite [1 ] (tlb-utex-005.aux) +LaTeX Font Warning: Some font shapes were not available, defaults substituted. diff --git a/required/amsmath/testfiles-TU/tlb-utex-005.xetex.tlg b/required/amsmath/testfiles-TU/tlb-utex-005.xetex.tlg index 3aac12a4e..a740ca841 100644 --- a/required/amsmath/testfiles-TU/tlb-utex-005.xetex.tlg +++ b/required/amsmath/testfiles-TU/tlb-utex-005.xetex.tlg @@ -3,3 +3,4 @@ Don't change this file in any respect. This test has error at begin document due to the special font setup in the test suite [1 ] (tlb-utex-005.aux) +LaTeX Font Warning: Some font shapes were not available, defaults substituted. From e91ca8655f0a881cbcab304af41864496e608039 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Sun, 3 Nov 2019 10:28:38 +0000 Subject: [PATCH 40/55] Update for new iftex package --- support/texlive.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/support/texlive.sh b/support/texlive.sh index bcb459c1b..dc5b6726f 100644 --- a/support/texlive.sh +++ b/support/texlive.sh @@ -40,7 +40,7 @@ tlmgr install \ ec \ fontspec \ hyperref \ - ifxetex \ + iftex \ oberdiek \ lh \ lualibs \ @@ -62,7 +62,6 @@ tlmgr install \ geometry \ graphics-def \ helvetic \ - ifluatex \ imakeidx \ ly1 \ makeindex \ From 9b383e7a86d57c6cc6e12d030cd6bd75006596f1 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Mon, 4 Nov 2019 22:00:53 +0000 Subject: [PATCH 41/55] Shorten the log a bit --- build-config.lua | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/build-config.lua b/build-config.lua index f69acd096..086d5af68 100644 --- a/build-config.lua +++ b/build-config.lua @@ -220,4 +220,33 @@ function checkinit_hook() return fmt(options["engine"] or checkengines,testdir) end -function docinit_hook() return fmt({"pdftex"},typesetdir) end \ No newline at end of file +function docinit_hook() return fmt({"pdftex"},typesetdir) end + +-- Somewhat shorten the log +local function shorttex(file,dir) + local dir = dir or "." + return runcmd(typesetexe .. " -interaction=batchmode \"" .. typesetcmds + .. "\\input " .. file .. "\"", + dir,{"TEXINPUTS","LUAINPUTS"}) +end + +typeset = typeset or function(file,dir) + dir = dir or "." + local errorlevel = shorttex(file,dir) + if errorlevel ~= 0 then + return errorlevel + end + local name = jobname(file) + errorlevel = biber(name,dir) + bibtex(name,dir) + if errorlevel ~= 0 then + return errorlevel + end + for i = 2,typesetruns do + errorlevel = + makeindex(name,dir,".glo",".gls",".glg",glossarystyle) + + makeindex(name,dir,".idx",".ind",".ilg",indexstyle) + + tex(file,dir) + if errorlevel ~= 0 then break end + end + return errorlevel +end From 4b2edcc07b4adffca726829b7f4224888ac65a31 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Tue, 5 Nov 2019 07:26:07 +0000 Subject: [PATCH 42/55] More work on shortening log --- build-config.lua | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/build-config.lua b/build-config.lua index 086d5af68..fe98d29f0 100644 --- a/build-config.lua +++ b/build-config.lua @@ -225,28 +225,24 @@ function docinit_hook() return fmt({"pdftex"},typesetdir) end -- Somewhat shorten the log local function shorttex(file,dir) local dir = dir or "." - return runcmd(typesetexe .. " -interaction=batchmode \"" .. typesetcmds + return runcmd('pdftex -interaction=batchmode "&pdflatex" "' .. typesetcmds .. "\\input " .. file .. "\"", - dir,{"TEXINPUTS","LUAINPUTS"}) + dir,{"TEXINPUTS","TEXFORMATS"}) end -typeset = typeset or function(file,dir) +function typeset(file,dir) dir = dir or "." - local errorlevel = shorttex(file,dir) - if errorlevel ~= 0 then - return errorlevel - end local name = jobname(file) - errorlevel = biber(name,dir) + bibtex(name,dir) + local errorlevel = tex(file,dir) if errorlevel ~= 0 then return errorlevel end - for i = 2,typesetruns do + for i = 2,typesetruns - 1 do errorlevel = makeindex(name,dir,".glo",".gls",".glg",glossarystyle) + makeindex(name,dir,".idx",".ind",".ilg",indexstyle) + - tex(file,dir) - if errorlevel ~= 0 then break end + shorttex(file,dir) + if errorlevel ~= 0 then return errorlevel end end - return errorlevel + return tex(file,dir) end From e4db68bc86877fcded463d1d2a853109bbd27164 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Wed, 6 Nov 2019 19:49:18 +0000 Subject: [PATCH 43/55] Shorten log when typesetting --- build-config.lua | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/build-config.lua b/build-config.lua index fe98d29f0..9519ca304 100644 --- a/build-config.lua +++ b/build-config.lua @@ -42,15 +42,13 @@ typesetsuppfiles = typesetsuppfiles or {"color.cfg", "graphics.cfg", "ltxdoc.cfg", "ltxguide.cfg"} -- Ensure the local format file is used -typesetexe = 'pdftex -interaction=nonstopmode "&pdflatex"' -typesetopts = "" - --- Force finding the format file -function tex(file,dir) +function tex(file,dir,mode) local dir = dir or "." - return runcmd(typesetexe .. " " .. typesetopts .. " \"" .. typesetcmds - .. "\\input " .. file .. "\"", - dir,{"TEXINPUTS","TEXFORMATS"}) + local mode = mode or "nonstopmode" + return runcmd( + 'pdftex -fmt=pdflatex -interaction=" .. mode .. " -jobname="' .. + string.match(file,"^[^.]*") .. '" "\\input ' .. file .. '"', + dir,{"TEXINPUTS","TEXFORMATS","LUAINPUTS"}) end -- Build TDS-style zips @@ -222,14 +220,7 @@ end function docinit_hook() return fmt({"pdftex"},typesetdir) end --- Somewhat shorten the log -local function shorttex(file,dir) - local dir = dir or "." - return runcmd('pdftex -interaction=batchmode "&pdflatex" "' .. typesetcmds - .. "\\input " .. file .. "\"", - dir,{"TEXINPUTS","TEXFORMATS"}) -end - +-- Shorten second run function typeset(file,dir) dir = dir or "." local name = jobname(file) @@ -241,7 +232,7 @@ function typeset(file,dir) errorlevel = makeindex(name,dir,".glo",".gls",".glg",glossarystyle) + makeindex(name,dir,".idx",".ind",".ilg",indexstyle) + - shorttex(file,dir) + tex(file,dir,"batchmode") if errorlevel ~= 0 then return errorlevel end end return tex(file,dir) From 5c2f4cab211077f1f178517701739dc851f2ee6d Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Wed, 6 Nov 2019 19:54:23 +0000 Subject: [PATCH 44/55] Mumble --- build-config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-config.lua b/build-config.lua index 9519ca304..cf0c29d71 100644 --- a/build-config.lua +++ b/build-config.lua @@ -46,7 +46,7 @@ function tex(file,dir,mode) local dir = dir or "." local mode = mode or "nonstopmode" return runcmd( - 'pdftex -fmt=pdflatex -interaction=" .. mode .. " -jobname="' .. + 'pdftex -fmt=pdflatex -interaction=' .. mode .. ' -jobname="' .. string.match(file,"^[^.]*") .. '" "\\input ' .. file .. '"', dir,{"TEXINPUTS","TEXFORMATS","LUAINPUTS"}) end From 9270aa610b542cf403c8eaa39aa27d548c4a2341 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Mon, 11 Nov 2019 18:16:15 +0100 Subject: [PATCH 45/55] oops, merged too much --- base/build.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base/build.lua b/base/build.lua index b68b41db8..de6e43d20 100644 --- a/base/build.lua +++ b/base/build.lua @@ -36,6 +36,7 @@ installfiles = "sample2e.tex", "small2e.tex", "testpage.tex", + "nfssaxes.tex", } sourcefiles = { @@ -51,6 +52,7 @@ sourcefiles = "sample2e.tex", "small2e.tex", "testpage.tex", + "nfssaxes.tex", } textfiles = { From 1930b5037248694c0cf89446ff3d16627334c366 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Tue, 12 Nov 2019 00:13:11 +0100 Subject: [PATCH 46/55] copy paste error --- base/nfssaxes.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index c0491d507..b5de8bd2a 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -1528,7 +1528,7 @@ \else\ifx\f@series\bfseries@sf \let\target@series@value\bfseries@rm % \end{macrocode} % However, the sans family may not have any specific defaults set, -% so we also compare with the verall defaults. +% so we also compare with the overall defaults. % \begin{macrocode} \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@rm \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@rm @@ -1627,9 +1627,9 @@ \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@tt \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@tt \fi\fi\fi\fi - \else\ifx\f@family\rmdef@ult - \ifx\f@series\mdseries@rm \let\target@series@value\mdseries@tt - \else\ifx\f@series\bfseries@rm \let\target@series@value\bfseries@tt + \else\ifx\f@family\sfdef@ult + \ifx\f@series\mdseries@sf \let\target@series@value\mdseries@tt + \else\ifx\f@series\bfseries@sf \let\target@series@value\bfseries@tt \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@tt \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@tt \fi\fi\fi\fi From b58f39c4e825940e596aade8bee7fa8bc839d24c Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Tue, 12 Nov 2019 12:57:43 +0100 Subject: [PATCH 47/55] comment changed --- base/nfssaxes.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index b5de8bd2a..8de3da102 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -998,7 +998,7 @@ } % \end{macrocode} % -% Perhaps one should also provide \cs{normalseries}? +% \cs{normalshape} resets both sub-axes if the default rules are used. % \begin{macrocode} \protected\def\normalshape {\not@math@alphabet\normalshape\relax From 64e8c8a48296c37a766a44490948653c2d4d31e7 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Thu, 21 Nov 2019 14:43:02 +0100 Subject: [PATCH 48/55] documentation update --- base/nfssaxes.tex | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 8de3da102..e11781043 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -67,6 +67,11 @@ % For that reason there are no entries which have a weight+width as % request (i.e., second argument). % +% In particular this is also true for cases involving \texttt{m}, +% e.g., \texttt{bm} (bold medium width) which automatially gets +% reduced result in \texttt{b} or \texttt{mc} (medium weight +% condensed) which becomes \texttt{c} as a result. +% % \item % % Only a few entries have ``alterative'' values and perhaps most of @@ -286,7 +291,7 @@ % \end{macrocode} % % \begin{macrocode} -\DeclareFontSeriesChangeRule {m}{bx} {bx} {b} %<----- maybe better ``m''? +\DeclareFontSeriesChangeRule {m}{bx} {bx} {b} %<----- \DeclareFontSeriesChangeRule {m}{b} {b} {bx} %<----- \DeclareFontSeriesChangeRule {m}{c} {c} {m} %<----- \DeclareFontSeriesChangeRule {m}{ec} {ec} {m} %<----- From f4cb3b3c0ed057ea7beb08d9d7e7971f35105725 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Tue, 26 Nov 2019 19:00:29 +0100 Subject: [PATCH 49/55] support \DeclareFontFamilySubstitution --- base/nfssaxes.tex | 87 ++++++++++++++++++++++ base/testfiles-search/tlb-nfssaxes-008.lvt | 32 ++++++++ base/testfiles-search/tlb-nfssaxes-008.tlg | 9 +++ 3 files changed, 128 insertions(+) create mode 100644 base/testfiles-search/tlb-nfssaxes-008.lvt create mode 100644 base/testfiles-search/tlb-nfssaxes-008.tlg diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index e11781043..f49a0af03 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -686,7 +686,14 @@ % \end{macrocode} % \end{macro} + +% \begin{macro}{\maybe@load@fontshape} +% +% \begin{macrocode} \def\maybe@load@fontshape{\begingroup\try@load@fontshape\endgroup} +% \end{macrocode} +% \end{macro} + % \begin{macro}{\set@target@series} % \begin{macro}{\series@drop@one@m} @@ -1752,4 +1759,84 @@ + +% \begin{macro}{\DeclareFontFamilySubstitution} +% The idea for this macro is stolen from the \texttt{substitutefont} +% package, with some modifications and a new name. +% +% Its purpose is to provide characters in a special encoding tht +% are not available in the current font family to be taken from a +% different family that is visually compatible (or not if you +% choose badly). For example, you can match the GFS Didot Greek +% characters with \TeX{} Gyre Pagella (Palatino) by specifying +%\begin{verbatim} +% \DeclareFontFamilySubstitution{LGR}{qpl}{udidot} +%\end{verbatim} +% This way if you ask for the \texttt{LGR} encoding in for the +% \textt{qpl} family you get the characters from the +% \texttt{udidot} family substituted. +% +% we need to ensure that the macro is defined with +% \cs{nfss@catcodes} in force (not quite sure why at the moment to +% be honest). +% \begin{macrocode} +\begingroup +\nfss@catcodes +\gdef\DeclareFontFamilySubstitution#1#2#3{% +% \end{macrocode} +% We only provide a set of silent substitutions. The package also +% (re)declared the family, but this is incorrect in my eyes and it +% is better to handle that differently. +% +% Of course the family \verb=#1#2.fd= may still needs loading at +% this point and so we arange for this. +% \begin{macrocode} +% \DeclareFontFamily{#1}{#2}{}% + \begingroup + \fontencoding{#1}\fontfamily{#2}\try@load@fontshape + \fontfamily{#3}\try@load@fontshape +% \end{macrocode} +% +% \begin{macrocode} + \DeclareFontShape{#1}{#2}{m}{it}{<->ssub * #3/m/it}{}% + \DeclareFontShape{#1}{#2}{m}{n}{<->ssub * #3/m/n}{}% + \DeclareFontShape{#1}{#2}{m}{sc}{<->ssub * #3/m/sc}{}% + \DeclareFontShape{#1}{#2}{m}{sl}{<->ssub * #3/m/sl}{}% +% \end{macrocode} +% These days a few more shapes might be around, so we declare those +% too. If they don't exist then after the first substitution normal +% fallbacks will happen. +% \begin{macrocode} + \DeclareFontShape{#1}{#2}{m}{sw}{<->ssub * #3/m/sw}{}% + \DeclareFontShape{#1}{#2}{m}{scit}{<->ssub * #3/m/scit}{}% + \DeclareFontShape{#1}{#2}{m}{scsl}{<->ssub * #3/m/scsl}{}% +% \end{macrocode} +% Same game with \texttt{b} and \texttt{bx}, for other weights you +% are on your own: +% \begin{macrocode} + \DeclareFontShape{#1}{#2}{b}{it}{<->ssub * #3/b/it}{}% + \DeclareFontShape{#1}{#2}{b}{n}{<->ssub * #3/b/n}{}% + \DeclareFontShape{#1}{#2}{b}{scit}{<->ssub * #3/b/scit}{}% + \DeclareFontShape{#1}{#2}{b}{scsl}{<->ssub * #3/b/scsl}{}% + \DeclareFontShape{#1}{#2}{b}{sc}{<->ssub * #3/b/sc}{}% + \DeclareFontShape{#1}{#2}{b}{sl}{<->ssub * #3/b/sl}{}% + \DeclareFontShape{#1}{#2}{b}{sw}{<->ssub * #3/b/sw}{}% + \DeclareFontShape{#1}{#2}{bx}{it}{<->ssub * #3/bx/it}{}% + \DeclareFontShape{#1}{#2}{bx}{n}{<->ssub * #3/bx/n}{}% + \DeclareFontShape{#1}{#2}{bx}{scit}{<->ssub * #3/bx/scit}{}% + \DeclareFontShape{#1}{#2}{bx}{scsl}{<->ssub * #3/bx/scsl}{}% + \DeclareFontShape{#1}{#2}{bx}{sc}{<->ssub * #3/bx/sc}{}% + \DeclareFontShape{#1}{#2}{bx}{sl}{<->ssub * #3/bx/sl}{}% + \DeclareFontShape{#1}{#2}{bx}{sw}{<->ssub * #3/bx/sw}{}% + \endgroup +} +\endgroup +% \end{macrocode} +% \end{macro} + + + + + + % ^^A Possible issue with tudscr.cls -- needs checking diff --git a/base/testfiles-search/tlb-nfssaxes-008.lvt b/base/testfiles-search/tlb-nfssaxes-008.lvt new file mode 100644 index 000000000..346f43113 --- /dev/null +++ b/base/testfiles-search/tlb-nfssaxes-008.lvt @@ -0,0 +1,32 @@ +\documentclass{article} + +\input{test2e} + + + +\makeatletter +\def\showfont#1{\typeout{#1: \f@encoding/\f@family/\f@series/\f@shape}} +\makeatother + +\usepackage[LGR,T1]{fontenc} + +\renewcommand\rmdefault{qpl} % not yet loaded + +\DeclareFontFamilySubstitution{LGR}{qpl}{udidot} + +\begin{document} + +\START + +\showfont{start} + +\fontencoding{LGR}\selectfont + +\showfont{LGR} + + +\fontencoding{T1}\selectfont + +\showfont{T1} + +\END diff --git a/base/testfiles-search/tlb-nfssaxes-008.tlg b/base/testfiles-search/tlb-nfssaxes-008.tlg new file mode 100644 index 000000000..68369e3cf --- /dev/null +++ b/base/testfiles-search/tlb-nfssaxes-008.tlg @@ -0,0 +1,9 @@ +This is a generated file for the LaTeX2e validation system. +Don't change this file in any respect. +start: T1/qpl/m/n +LaTeX Font Info: Font shape `LGR/qpl/m/n' in size <10> not available +(Font) Font shape `LGR/udidot/m/n' tried instead on input line .... +LaTeX Font Info: Font shape `LGR/udidot/m/n' will be +(Font) scaled to size 10.39993pt on input line .... +LGR: LGR/qpl/m/n +T1: T1/qpl/m/n From 3ba2db27d24d4dd8be3f9465b03f0c91fdb83514 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Thu, 28 Nov 2019 13:10:14 +0100 Subject: [PATCH 50/55] Added \LoadFontDefinitionFile (discussion in TLC was incorrect) --- base/nfssaxes.tex | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index f49a0af03..473a12bb9 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -1788,12 +1788,14 @@ % (re)declared the family, but this is incorrect in my eyes and it % is better to handle that differently. % -% Of course the family \verb=#1#2.fd= may still needs loading at -% this point and so we arange for this. -% \begin{macrocode} -% \DeclareFontFamily{#1}{#2}{}% - \begingroup - \fontencoding{#1}\fontfamily{#2}\try@load@fontshape +% Of course the families may still need loading at +% this point and so we arange for this. Otherwise we might run into +% trouble because the necessary \cs{DeclareFontFamily} has not been +% seen. +% \begin{macrocode} +% \begingroup + \LoadFontDefinitionFile{#1}{#2}% + \LoadFontDefinitionFile{#1}{#3}% \fontfamily{#3}\try@load@fontshape % \end{macrocode} % @@ -1828,7 +1830,7 @@ \DeclareFontShape{#1}{#2}{bx}{sc}{<->ssub * #3/bx/sc}{}% \DeclareFontShape{#1}{#2}{bx}{sl}{<->ssub * #3/bx/sl}{}% \DeclareFontShape{#1}{#2}{bx}{sw}{<->ssub * #3/bx/sw}{}% - \endgroup +% \endgroup } \endgroup % \end{macrocode} @@ -1837,6 +1839,18 @@ +% \begin{macro}{\LoadFontDefinitionFile} +% +% \begin{macrocode} +\def\LoadFontDefinitionFile#1#2{% + \begingroup + \edef\f@encoding{#1}% + \edef\f@family{#2}% + \try@load@fontshape + \endgroup +} +% \end{macrocode} +% \end{macro} % ^^A Possible issue with tudscr.cls -- needs checking From 15e3ec96a5634fe4f4cfd537a878bf45e70406a8 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Thu, 28 Nov 2019 17:40:53 +0100 Subject: [PATCH 51/55] removed some leftover code --- base/nfssaxes.tex | 3 --- 1 file changed, 3 deletions(-) diff --git a/base/nfssaxes.tex b/base/nfssaxes.tex index 473a12bb9..31f255167 100644 --- a/base/nfssaxes.tex +++ b/base/nfssaxes.tex @@ -1793,10 +1793,8 @@ % trouble because the necessary \cs{DeclareFontFamily} has not been % seen. % \begin{macrocode} -% \begingroup \LoadFontDefinitionFile{#1}{#2}% \LoadFontDefinitionFile{#1}{#3}% - \fontfamily{#3}\try@load@fontshape % \end{macrocode} % % \begin{macrocode} @@ -1830,7 +1828,6 @@ \DeclareFontShape{#1}{#2}{bx}{sc}{<->ssub * #3/bx/sc}{}% \DeclareFontShape{#1}{#2}{bx}{sl}{<->ssub * #3/bx/sl}{}% \DeclareFontShape{#1}{#2}{bx}{sw}{<->ssub * #3/bx/sw}{}% -% \endgroup } \endgroup % \end{macrocode} From 69f67052aa0bcb8178c17bec81e96881e8057288 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Wed, 18 Dec 2019 14:44:47 +0100 Subject: [PATCH 52/55] code moved into the kernel (and rollback provided) --- base/00-TODO-nfssaxes.tex | 58 + base/build.lua | 2 - base/changes.txt | 34 + base/cmfonts.fdd | 6 +- base/doc.dtx | 3 +- base/doc/source2e.tex | 2 + base/fontdef.dtx | 37 +- base/format.ins | 1 + base/ltfinal.dtx | 12 +- base/ltfntcmd.dtx | 35 +- base/{nfssaxes.tex => ltfssaxes.dtx} | 1136 ++++------------- base/ltfssbas.dtx | 154 ++- base/ltfssini.dtx | 786 +++++++++++- base/ltoutenc.dtx | 17 +- base/testfiles-search/tlb-nfssaxes-002.lvt | 4 +- base/testfiles-search/tlb-nfssaxes-004.lvt | 12 +- .../testfiles/tlb-latexrelease-003.luatex.tlg | 40 +- base/testfiles/tlb-latexrelease-003.tlg | 40 +- base/testfiles/tlb-latexrelease-003.xetex.tlg | 40 +- 19 files changed, 1452 insertions(+), 967 deletions(-) create mode 100644 base/00-TODO-nfssaxes.tex rename base/{nfssaxes.tex => ltfssaxes.dtx} (52%) diff --git a/base/00-TODO-nfssaxes.tex b/base/00-TODO-nfssaxes.tex new file mode 100644 index 000000000..4570132c3 --- /dev/null +++ b/base/00-TODO-nfssaxes.tex @@ -0,0 +1,58 @@ + + + + +% By the way, fontspec uses \cs{itscdefault} etc.\ whereas in the +% \texttt{.fd} files it is always called \texttt{scit}. I +% personally kind of think ``\texttt{itsc}'' reads better than +% ``\texttt{scit}'' but with more than 700 fonts (in T1 encoding) +% having \texttt{scit} and none the other I think the name is now +% given. +% + + + +% The \textsf{fontaxes} package also implements two further shapes, +% namely \cs{swshape} and \cs{sscshape}. They could now easily be +% integrated by specifying a few further table entries such as +% \begin{macrocode} +%\DeclareFontShapeChangeRule {n}{sw} {sw} {n} +%\DeclareFontShapeChangeRule {it}{sw} {sw} {it} +%\DeclareFontShapeChangeRule {sc}{sw} {scsw} {sc} +% ... +% \end{macrocode} +% For \cs{swshape} I have already done that above (even though there are +% currently only a few fonts +% that support swash letters). For ``spaced small capitals'' there a +% none among the free fonts. Nevertheless, perhaps that should also be integrated +% in the kernel so that the existing \textsf{fontaxes} support continues to +% work in full. +% +% +% +% +% \subsubsection{Packages that need checking or updating} +% +% These package use \cs{fontprimaryshape} +%\begin{verbatim} +%./baskervaldx/Baskervaldx.sty +%./baskervillef/baskervillef.sty +%./ebgaramond/ebgaramond.sty +%./fontaxes/fontaxes.sty +%\end{verbatim} +% +% +% These package use \cs{fontsecondaryshape} +%\begin{verbatim} +%./baskervaldx/Baskervaldx.sty +%./inriafonts/InriaSans.sty +%./inriafonts/InriaSerif.sty +%./baskervillef/baskervillef.sty +%./ebgaramond/ebgaramond.sty +%./fontaxes/fontaxes.sty +%\end{verbatim} + + + + +% ^^A Possible issue with tudscr.cls -- needs checking diff --git a/base/build.lua b/base/build.lua index de6e43d20..b68b41db8 100644 --- a/base/build.lua +++ b/base/build.lua @@ -36,7 +36,6 @@ installfiles = "sample2e.tex", "small2e.tex", "testpage.tex", - "nfssaxes.tex", } sourcefiles = { @@ -52,7 +51,6 @@ sourcefiles = "sample2e.tex", "small2e.tex", "testpage.tex", - "nfssaxes.tex", } textfiles = { diff --git a/base/changes.txt b/base/changes.txt index a83adde21..3c5cc90c4 100644 --- a/base/changes.txt +++ b/base/changes.txt @@ -4,6 +4,40 @@ completeness or accuracy and it contains some references to files that are not part of the distribution. ======================================================================= +2019-12-18 Frank Mittelbach + + * ltoutenc.dtx: improve \add@accent + +2019-12-17 Frank Mittelbach + + * fontdef.dtx (subsection{Defaults}): Set + \shapedefault explicitly to "n" not \updefault + \bfdefault set to to "b" not "bx" (but bx for CM fonts) + \updefault set to to "up" not "n" + +2019-12-17 Frank Mittelbach + + * ltfssini.dtx (section{Supporting nested emphasis}): + Support nested \emph sequences a generalization \eminnershape. + See ltnews31 for details. + * ltfssini.dtx (section{Custom series settings for main document families}): + Provide custom series settings a la mweights + + +2019-12-17 Frank Mittelbach + + * ltfssaxes.dtx: Code for additional series and shape axes added + See ltnews31 for details. + +2019-12-16 Frank Mittelbach + + * doc.dtx (subsection{Macros surrounding the `definition parts'}): + Use \shapedefault not \updefault for extended NFSS + +2019-12-16 Frank Mittelbach + + * cmfonts.fdd: Provide substitutions for cmtt/bx/sl + 2019-12-02 Frank Mittelbach * cmfonts.fdd: Silent warning for cmss/it substitution (gh/172)} diff --git a/base/cmfonts.fdd b/base/cmfonts.fdd index 7cfc8f24e..b7b97ccf1 100644 --- a/base/cmfonts.fdd +++ b/base/cmfonts.fdd @@ -67,7 +67,7 @@ %<*driver, > \ProvidesFile{cmfonts.drv} % - [2019/12/02 v2.5i Standard LaTeX font definitions] + [2019/12/16 v2.5j Standard LaTeX font definitions] % %<*driver> \documentclass{ltxdoc} @@ -1025,6 +1025,10 @@ %<+Ucmtt>\DeclareFontShape{U}{cmtt}{bx}{it}% %<-nowarn> {<->sub*cmtt/m/it}{} %<+nowarn> {<->ssub*cmtt/m/it}{} +% \end{macrocode} +% +% \changes{v2.5j}{2019/12/16}{Provide substitutions for cmtt/bx/sl} +% \begin{macrocode} %<+OT1cmtt>\DeclareFontShape{OT1}{cmtt}{bx}{sl} %<-nowarn> {<->sub*cmtt/m/n}{} %<+nowarn> {<->ssub*cmtt/m/n}{} diff --git a/base/doc.dtx b/base/doc.dtx index f5e3988b6..e752b6472 100644 --- a/base/doc.dtx +++ b/base/doc.dtx @@ -35,7 +35,7 @@ %<+package|shortvrb>\NeedsTeXFormat{LaTeX2e}[1994/12/01] %<+package> \ProvidesPackage{doc} %<+shortvrb>\ProvidesPackage{shortvrb} -%<+package|shortvrb> [2019/11/10 v2.1k +%<+package|shortvrb> [2019/12/16 v2.1l %<+package|shortvrb> Standard LaTeX documentation package (FMi)] %\catcode`\<=12 % @@ -1448,6 +1448,7 @@ % bothered since doc-sources should be up-to-date but since the % request came from someone called David Carlisle \ldots :-) % \changes{v1.9y}{1996/01/26}{Support compat mode} +% \changes{v2.1l}{2019/12/16}{Use \cs{shapedefault} not \cs{updefault} for extended NFSS} % \begin{macrocode} \def\MacroFont{\small \usefont\encodingdefault diff --git a/base/doc/source2e.tex b/base/doc/source2e.tex index d34dabfa4..4f1644304 100644 --- a/base/doc/source2e.tex +++ b/base/doc/source2e.tex @@ -266,6 +266,8 @@ \DocInclude{ltfssbas} % NFSS Base macros + \DocInclude{ltfssbas} % NFSS Axes handling (new in 2020) + \DocInclude{ltfsstrc} % NFSS Tracing (and tracefnt.sty) \DocInclude{ltfsscmp} % NFSS1 Compatibility diff --git a/base/fontdef.dtx b/base/fontdef.dtx index c9c5f5d77..0b2ae35a5 100644 --- a/base/fontdef.dtx +++ b/base/fontdef.dtx @@ -39,7 +39,7 @@ %\ProvidesFile{fontdef.drv} % \fi % \ProvidesFile{fontdef.dtx} -%<-latexrelease> [2019/09/21 v3.0d LaTeX Kernel +%<-latexrelease> [2019/12/17 v3.0e LaTeX Kernel % \iftrue (\else %(Text %(Math @@ -442,8 +442,9 @@ % \begin{macro}{\bfdefault} % \begin{macro}{\mddefault} % Series changing commands are influenced by the following hooks. +% \changes{v3.0e}{2019/12/17}{Set \cs{bfdefault} to ``b''} % \begin{macrocode} -\newcommand\bfdefault{bx} +\newcommand\bfdefault{b} % overwritten below \newcommand\mddefault{m} % \end{macrocode} % \end{macro} @@ -453,18 +454,39 @@ % \begin{macro}{\sldefault} % \begin{macro}{\scdefault} % \begin{macro}{\updefault} +% % Shape changing commands use the following hooks. +% \changes{v3.0e}{2019/12/17}{Set \cs{updefault} to ``up''} % \begin{macrocode} \newcommand\itdefault{it} \newcommand\sldefault{sl} \newcommand\scdefault{sc} -\newcommand\updefault{n} +\newcommand\updefault{up} % overwritten below % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % + +% \begin{macrocode} +% +%<*text|latexrelease> +%\IncludeInRelease{2020/02/02}% +% {\updefault}{font defaults change}% +\renewcommand\updefault{up} +\renewcommand\bfdefault{b} +% +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}% +% {\updefault}{font defaults change}% +% +%\renewcommand\updefault{n} +%\renewcommand\bfdefault{bx} +%\EndIncludeInRelease +%<*text> +% \end{macrocode} +% % \begin{macro}{\familydefault} % \begin{macro}{\seriesdefault} % \begin{macro}{\shapedefault} @@ -477,7 +499,14 @@ % \begin{macrocode} \newcommand\familydefault{\rmdefault} \newcommand\seriesdefault{\mddefault} -\newcommand\shapedefault{\updefault} +% \end{macrocode} +% In previous releases \cs{shapedefault} pointed to \cs{updefault} +% which resolved to \texttt{n}, but these days that is no longer +% the case (and \texttt{up} is wrong when you want to do a +% reset. So we now use \texttt{n} explicitly. +% \begin{macrocode} +% \changes{v3.0e}{2019/12/17}{Set \cs{shapedefault} explicitly to ``n''} +\newcommand\shapedefault{n} % \end{macrocode} % \end{macro} % \end{macro} diff --git a/base/format.ins b/base/format.ins index d06004455..8c203699d 100644 --- a/base/format.ins +++ b/base/format.ins @@ -173,6 +173,7 @@ the system are in the document `cfgguide.tex'. \from{ltcounts.dtx}{2ekernel} \from{ltlength.dtx}{2ekernel} \from{ltfssbas.dtx}{2ekernel} + \from{ltfssaxes.dtx}{2ekernel} \from{ltfsstrc.dtx}{2ekernel} % \from{ltfsscmp.dtx}{compat,2ekernel} \from{ltfssdcl.dtx}{compat,2ekernel} diff --git a/base/ltfinal.dtx b/base/ltfinal.dtx index e91e7bffc..d6ce5910a 100644 --- a/base/ltfinal.dtx +++ b/base/ltfinal.dtx @@ -1124,12 +1124,22 @@ % \end{macro} % \end{macro} % +% \subsection{Some last minute initializations \ldots} +% +% This initializes the 2020/02/02 extensions to NFSS after any changes +% in the preamble. +% \begin{macrocode} +\AtBeginDocument{\reinstall@nfss@defs\init@series@setup} +% \end{macrocode} +% +% +% % \subsection{Do some temporary work for pre-release} % % This is a good place to load code that hasn't yet been % integrated into the other files \ldots % \begin{macrocode} -\input nfssaxes.tex +%\input ... % \end{macrocode} % % \subsection{Dumping the format} diff --git a/base/ltfntcmd.dtx b/base/ltfntcmd.dtx index e214057bc..ec86c5770 100644 --- a/base/ltfntcmd.dtx +++ b/base/ltfntcmd.dtx @@ -32,7 +32,7 @@ %<*driver> % \fi \ProvidesFile{ltfntcmd.dtx} - [2019/01/27 v3.4b LaTeX Kernel (Font commands)] + [2019/12/17 v3.4c LaTeX Kernel (Font commands)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltfntcmd.dtx} @@ -391,6 +391,39 @@ % \end{macro} % \end{macro} % \end{macro} + + +% \begin{macro}{textulc} +% \begin{macro}{textsw} +% \begin{macro}{textssc} +% \begin{macro}{textnormalshape} +% +% \changes{v3.4c}{2019/12/17}{Macro added} +% \begin{macrocode} +% +%<*2ekernel|latexrelease> +%\IncludeInRelease{2020/02/02}% +% {\textulc}{Additional text commands}% +\DeclareTextFontCommand{\textulc}{\ulcshape} +\DeclareTextFontCommand{\textsw}{\swshape} +\DeclareTextFontCommand{\textssc}{\sscshape} +\DeclareTextFontCommand{\textnormalshape}{\normalshape} +% +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}% +% {\textulc}{Additional text commands}% +% +%\let\textulc\@undefined +%\let\textsw\@undefined +%\let\textssc\@undefined +%\let\textnormalshape\@undefined +%\EndIncludeInRelease +%<*2ekernel> +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}{\emph} % \changes{v3.0a}{1993/12/11}{Macro changed} diff --git a/base/nfssaxes.tex b/base/ltfssaxes.dtx similarity index 52% rename from base/nfssaxes.tex rename to base/ltfssaxes.dtx index 31f255167..bfca785eb 100644 --- a/base/nfssaxes.tex +++ b/base/ltfssaxes.dtx @@ -1,7 +1,107 @@ - +% \iffalse meta-comment +% +% Copyright (C) 2019 +% The LaTeX3 Project and any individual authors listed elsewhere +% in this file. +% +% This file is part of the LaTeX base system. +% ------------------------------------------- +% +% It may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% 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 2008 or later. +% +% This file has the LPPL maintenance status "maintained". +% +% The list of all files belonging to the LaTeX base distribution is +% given in the file `manifest.txt'. See also `legal.txt' for additional +% information. +% +% The list of derived (unpacked) files belonging to the distribution +% and covered by LPPL is defined by the unpacking scripts (with +% extension .ins) which are part of the distribution. +% +% \fi +% \iffalse +%%% From File: ltfssbas.dtx +%% Copyright (C) 1989-2002 Frank Mittelbach and Rainer Sch\"opf +% +%<*driver> +% \fi +% +% +\ProvidesFile{ltfssaxes.dtx} + [2019/12/16 v1.0a LaTeX Kernel (NFSS Axes handing)] +% \iffalse +\documentclass{ltxdoc} +\begin{document} +\DocInput{ltfssaxes.dtx} +\end{document} +% +% \fi +% +% +% +% +% \GetFileInfo{ltfssaxes.dtx} +% \title{A new font selection scheme for \TeX{} macro packages\\ +% (Axes Handling)\thanks +% {This file has version number +% \fileversion\ dated \filedate}} +% +% \author{Frank Mittelbach} +% +% \MaintainedByLaTeXTeam{latex} +% \maketitle +% +% This file contains the implementation for handling extra axes +% splitting the series and the values into sub-categories. selection +% commands. See other parts of the \LaTeX\ distribution, or \emph{The +% \LaTeX\ Companion} for higher level documentation of the +% \LaTeX\ Font Selection Scheme. +% +% +% +% \StopEventually{} +% +% Everything in the this file got introduced 2020/02/02, so we do a +% single rollback (for now). +% \begin{macrocode} +%<*2ekernel> +% +%<*2ekernel|latexrelease> +%\IncludeInRelease{2020/02/02}% +% {\DeclareFontSeriesChangeRule}{Series change rules}% +% \end{macrocode} +% +% +% % \section{Changing the font series} % -% \emph{write intro} +% In the original NFSS implementation the series was a single +% attribute stored in \cs{f@series} and so one always had to specify +% both weight and width together. This means it was impossible to +% typeset, a paragraph in a condensed font and inside have a few words +% in bold weight (but still condensed) without doing this manually by +% requesting \verb=\fontseries{bc}\selectfont=. +% +% The new implementation now works differently by looking both at the +% current value of \cs{f@series} and the requested new series and out +% of that combination selects a resulting series value. Thus, if the +% current series is \texttt{c} and we ask for \texttt{b} we now get +% \texttt{bc}. +% +% This is done by consulting a simple lookup table. This table is +% configurable (though most likely that flexibility will seldom of +% ever be needed) Adding or changing entries in this table are done +% with \cs{DeclareFontSeriesChangeRule}. +% +% \subsection{The series lookup table} +% % % \begin{macro}{\DeclareFontSeriesChangeRule} % The \cs{DeclareFontSeriesChangeRule} defines entries in a simple @@ -130,9 +230,9 @@ % \begin{macrocode} \DeclareFontSeriesChangeRule {b}{bx} {bx} {b} %<----- \DeclareFontSeriesChangeRule {b}{c} {bc} {b} %<----- -\DeclareFontSeriesChangeRule {b}{ec} {bec} {b} %<----- +\DeclareFontSeriesChangeRule {b}{ec} {bec} {b} %<----- \DeclareFontSeriesChangeRule {b}{sb} {sb} {b} %<----- -\DeclareFontSeriesChangeRule {b}{sc} {bsc} {b} %<----- +\DeclareFontSeriesChangeRule {b}{sc} {bsc} {b} %<----- \DeclareFontSeriesChangeRule {b}{x} {bx} {b} %<----- % \end{macrocode} % @@ -166,7 +266,7 @@ % % % \begin{macrocode} -\DeclareFontSeriesChangeRule {ec}{bx} {bx} {b} %<----- +\DeclareFontSeriesChangeRule {ec}{bx} {bx} {b} %<----- \DeclareFontSeriesChangeRule {ec}{b}{bec}{} \DeclareFontSeriesChangeRule {ec}{eb}{ebec}{} \DeclareFontSeriesChangeRule {ec}{el}{elec}{} @@ -175,11 +275,11 @@ \DeclareFontSeriesChangeRule {ec}{sl}{slec}{} \DeclareFontSeriesChangeRule {ec}{ub}{ubec}{} \DeclareFontSeriesChangeRule {ec}{ul}{ulec}{} -\DeclareFontSeriesChangeRule {ec}{x}{x}{m} %<----- +\DeclareFontSeriesChangeRule {ec}{x}{x}{m} %<----- % \end{macrocode} % % \begin{macrocode} -\DeclareFontSeriesChangeRule {sc}{bx} {bx} {b} %<----- +\DeclareFontSeriesChangeRule {sc}{bx} {bx} {b} %<----- \DeclareFontSeriesChangeRule {sc}{b}{bsc}{} \DeclareFontSeriesChangeRule {sc}{eb}{ebsc}{} \DeclareFontSeriesChangeRule {sc}{el}{elsc}{} @@ -188,7 +288,7 @@ \DeclareFontSeriesChangeRule {sc}{sl}{slsc}{} \DeclareFontSeriesChangeRule {sc}{ub}{ubsc}{} \DeclareFontSeriesChangeRule {sc}{ul}{ulsc}{} -\DeclareFontSeriesChangeRule {sc}{x}{x}{m} %<----- +\DeclareFontSeriesChangeRule {sc}{x}{x}{m} %<----- % \end{macrocode} % % \begin{macrocode} @@ -464,12 +564,13 @@ % \end{macrocode} % % -% Special rules for \texttt{lm} etc.\ aren't needed because the -% target{lm} is used which is reduced to \texttt{l} +% Special rules for \texttt{lm} etc.\ aren't needed because if the +% target \texttt{lm} is request it will used if there is no rule +% and that id then reduced to \texttt{l} % automatically. Same for \texttt{mc} and friends. Only \texttt{?m} % and \texttt{m?} need rules. % -% Special rules for \texttt{m?}: +% So here are the special rules for \texttt{m?}: % \begin{macrocode} \DeclareFontSeriesChangeRule {bc}{m?}{c}{} \DeclareFontSeriesChangeRule {bec}{m?}{ec}{} @@ -518,7 +619,7 @@ \DeclareFontSeriesChangeRule {x}{m?}{x}{} % \end{macrocode} % -% Special rules for \texttt{?m}: +% And there the special rules for \texttt{?m}: % \begin{macrocode} \DeclareFontSeriesChangeRule {bc}{?m}{b}{} \DeclareFontSeriesChangeRule {bec}{?m}{b}{} @@ -577,9 +678,7 @@ % \end{macrocode} % % -% \emph{rules need to get completed/verified!} -% -% + % \subsection{Changing to a new series} % @@ -643,7 +742,10 @@ \edef\@reserveda{\f@encoding /\f@family /#1/\f@shape}% \ifcsname \@reserveda \endcsname % \end{macrocode} -% If the desired result is available then we use that: +% If the desired result is available then we use that. However, we +% do need some post-processing because we need to drop surplus +% \texttt{m}s due to the way naming convention was designed in the +% '90s (sigh). % \begin{macrocode} \set@target@series{#1}% % \end{macrocode} @@ -685,18 +787,26 @@ } % \end{macrocode} % \end{macro} - - +% +% +% +% % \begin{macro}{\maybe@load@fontshape} -% +% A small helper that we use a couple of times: try loading a +% fontshape (in a group because \cs{try@load@fontshape} normalizes +% catcodes). % \begin{macrocode} \def\maybe@load@fontshape{\begingroup\try@load@fontshape\endgroup} % \end{macrocode} % \end{macro} - - +% +% +% % \begin{macro}{\set@target@series} % \begin{macro}{\series@drop@one@m} +% +% Finally the code for normalizing the \cs{f@series} value. +% % The combined series value determined by the mapping may still % contain an \texttt{m} that we have to remove (as the \texttt{.fd} % files use \texttt{c} not \texttt{mc} to denote a medium weight @@ -728,12 +838,14 @@ % \end{macro} -% \section{Changing the shape} + +% \section{Changing the shape} % -% Rules for managing shapes (i.e., essentially building in an ``sc'' +% Shapes are also split in two axes (though it could be more if +% that is desirable), essentially building in an ``sc'' % axis). % -% \emph{write intro} +% % % \begin{macro}{\DeclareFontShapeChangeRule} % The database for shapes is done in exactly the same way, only @@ -748,17 +860,17 @@ % % There is kind of the same problem with returning back from % \texttt{sc} to normal. It sort of needs its own letter. In -% fontspec this is solved by the first time \cs{upshape} changes +% \texttt{fontspec} this was solved by the first time \cs{upshape} changes % \texttt{it} or \texttt{sl} back (so only \texttt{sc} remains) and % second time it changes then \texttt{sc} back to normal. Maybe -% that's not a bad way to handle it, so I've done that below too. -% The alternative would be to provide something like \cs{noscshape} -% as the \textsf{slantsc} package does. +% that's not a bad way to handle it, but decided for a slightly +% different approach: \texttt{n} always returns to ``normal'', ie +% resets everything and \texttt{up} changes italic or slanted to +% upright and \texttt{ulc} undoes small caps. +% +% So we now offer +% \cs{normalshape} and \cs{textnormalshape}. % -% That sort of approach doesn't seem possible with the series as -% \cs{bfseries} produces \texttt{bx} (normally) and \cs{mdseries} -% reverts that back to \texttt{m} (ie no bold and normal width) -% and I think that needs to be preserved. % % \begin{macro}{\ulcshape} % \begin{macro}{\textulc} @@ -772,7 +884,6 @@ \DeclareRobustCommand\ulcshape {\not@math@alphabet\ulcshape\relax \fontshape\ulcdefault\selectfont} -\DeclareTextFontCommand{\textulc}{\ulcshape} % back to upper/lower case \newcommand\ulcdefault{ulc} % \end{macrocode} % \end{macro} @@ -782,12 +893,17 @@ % \begin{macro}{\swshape} % \begin{macro}{\textsw} % \begin{macro}{\swdefault} -% New command to select swash shape. +% New command to select a swash shape. The standard rules put this +% in the same category as italics or slanted, i.e., if you ask for +% it then italics are undone. One could provide more complicated +% rules so that \texttt{it} + \texttt{sw} becomes \texttt{swit} but +% given that there are only very few fonts that have swash letters +% that level of flexibility (these days) would be just resulting in +% a lot of combinations that do not exist. % \begin{macrocode} \DeclareRobustCommand\swshape {\not@math@alphabet\swshape\relax \fontshape\swdefault\selectfont} -\DeclareTextFontCommand{\textsw}{\swshape} \newcommand\swdefault{sw} % \end{macrocode} % \end{macro} @@ -799,12 +915,18 @@ % \begin{macro}{\sscshape} % \begin{macro}{\textssc} % \begin{macro}{\sscdefault} -% New command to select spaced small capitals. +% New command to select spaced small capitals. This is only here +% because \texttt{fontaxes} offered it. There isn't a single free +% font that supports it. However, some commercial ones do, so we +% offer it so that at some point \texttt{fontaxes} could be +% retired. +% +% So far there aren't any rules for it---probably there should be +% some putting it in the same category as \texttt{sc}. % \begin{macrocode} \DeclareRobustCommand\sscshape {\not@math@alphabet\sscshape\relax \fontshape\sscdefault\selectfont} -\DeclareTextFontCommand{\textssc}{\sscshape} \newcommand\sscdefault{ssc} % \end{macrocode} % \end{macro} @@ -824,7 +946,7 @@ %\DeclareFontShapeChangeRule {n}{sw} {sw} {} %\DeclareFontShapeChangeRule {n}{sc} {sc} {} \DeclareFontShapeChangeRule {n}{ulc} {n} {} -\DeclareFontShapeChangeRule {n}{up} {n} {} +\DeclareFontShapeChangeRule {n}{up} {n} {} % \end{macrocode} % % \begin{macrocode} @@ -839,7 +961,7 @@ % \begin{macrocode} \DeclareFontShapeChangeRule {it}{sc} {scit} {scsl} \DeclareFontShapeChangeRule {it}{ulc} {it} {} -\DeclareFontShapeChangeRule {it}{up} {n} {} +\DeclareFontShapeChangeRule {it}{up} {n} {} % \end{macrocode} % % \begin{macrocode} @@ -849,7 +971,7 @@ %\DeclareFontShapeChangeRule {sl}{sw} {sw} {} \DeclareFontShapeChangeRule {sl}{sc} {scsl} {scit} \DeclareFontShapeChangeRule {sl}{ulc} {sl} {} -\DeclareFontShapeChangeRule {sl}{up} {n} {} +\DeclareFontShapeChangeRule {sl}{up} {n} {} % \end{macrocode} % % \begin{macrocode} @@ -869,7 +991,7 @@ \DeclareFontShapeChangeRule {scit}{sw} {scsw} {sc} % or scit? \DeclareFontShapeChangeRule {scit}{sc} {scit} {} \DeclareFontShapeChangeRule {scit}{ulc} {it} {} -\DeclareFontShapeChangeRule {scit}{up} {sc} {} +\DeclareFontShapeChangeRule {scit}{up} {sc} {} % \end{macrocode} % The previous rule assumes that if \texttt{scit} exists then % \texttt{it} exists as well. If not, the mechanism will save @@ -887,7 +1009,7 @@ \DeclareFontShapeChangeRule {scsl}{sw} {scsw} {sc} % or scsl? \DeclareFontShapeChangeRule {scsl}{sc} {scsl} {} \DeclareFontShapeChangeRule {scsl}{ulc} {sl} {} -\DeclareFontShapeChangeRule {scsl}{up} {sc} {} +\DeclareFontShapeChangeRule {scsl}{up} {sc} {} % \end{macrocode} % % \begin{macrocode} @@ -897,7 +1019,7 @@ \DeclareFontShapeChangeRule {scsw}{sw} {scsw} {} \DeclareFontShapeChangeRule {scsw}{sc} {scsw} {} \DeclareFontShapeChangeRule {scsw}{ulc} {sw} {} -\DeclareFontShapeChangeRule {scsw}{up} {sc} {} +\DeclareFontShapeChangeRule {scsw}{up} {sc} {} % \end{macrocode} % % \begin{macrocode} @@ -907,16 +1029,8 @@ %\DeclareFontShapeChangeRule {sw}{sw} {sw} {} \DeclareFontShapeChangeRule {sw}{sc} {scsw} {} \DeclareFontShapeChangeRule {sw}{ulc} {sw} {} -\DeclareFontShapeChangeRule {sw}{up} {n} {} +\DeclareFontShapeChangeRule {sw}{up} {n} {} % \end{macrocode} - - -% By the way, fontspec uses \cs{itscdefault} etc.\ whereas in the -% \texttt{.fd} files it is always called \texttt{scit}. I -% personally kind of think ``\texttt{itsc}'' reads better than -% ``\texttt{scit}'' but with more than 700 fonts (in T1 encoding) -% having \texttt{scit} and none the other I think the name is now -% given. % % % \subsection{Changing to a new shape} @@ -972,23 +1086,41 @@ } % \end{macrocode} % \end{macro} - - -% This code implements one aspect of what the package \textsf{fontaxes} -% provide. So its redefinitions for the vairous shape commands, -% such as \cs{itshape} should no longer happen. % -% For initial testing we simply undo them at begin document, but of -% course the correct way would be to update that package to simply -% use the kernel functionality when running with a new kernel. % +% +% \begin{macro}{\normalshape} +% +% \cs{normalshape} resets both sub-axes if the default rules are used. % \begin{macrocode} -\AtBeginDocument{% +\protected\def\normalshape + {\not@math@alphabet\normalshape\relax + \fontshape\shapedefault\selectfont}% % \end{macrocode} -% I use \cs{protected} here not \cs{DeclareRobustCommand} to avoid -% extra status lines that would change test results in the test suite. +% \end{macro} +% +% +% +% +% \section{Make sure we win \ldots} +% +% This code implements one aspect of what the package \textsf{fontaxes} +% provide. So its redefinitions for the various shape commands, +% such as \cs{itshape} should no longer happen. We therefore force +% the standard definitions at \cs{AtBeginDocument} (later when this +% is defined. Once +% \texttt{fontaxes} is no longer doing such redefinitions that could +% be taken out again. +% +% We use a separate macro so that we can easily disable this (in +% case of rollback). +% +% \begin{macro}{\reinstall@nfss@defs} % +% I use \cs{protected} here not \cs{DeclareRobustCommand} to avoid +% extra status lines. % \begin{macrocode} +\def\reinstall@nfss@defs{% \protected\def\upshape {\not@math@alphabet\upshape\relax \fontshape\updefault\selectfont}% @@ -1007,847 +1139,53 @@ \protected\def\swshape {\not@math@alphabet\swshape\relax \fontshape\swdefault\selectfont}% + \protected\def\sscshape + {\not@math@alphabet\sscshape\relax + \fontshape\sscdefault\selectfont}% } % \end{macrocode} -% -% \cs{normalshape} resets both sub-axes if the default rules are used. -% \begin{macrocode} - \protected\def\normalshape - {\not@math@alphabet\normalshape\relax - \fontshape\shapedefault\selectfont}% -% \end{macrocode} -% -% The \textsf{fontaxes} package also implements two further shapes, -% namely \cs{swshape} and \cs{sscshape}. They could now easily be -% integrated by specifying a few further table entries such as -% \begin{macrocode} -%\DeclareFontShapeChangeRule {n}{sw} {sw} {n} -%\DeclareFontShapeChangeRule {it}{sw} {sw} {it} -%\DeclareFontShapeChangeRule {sc}{sw} {scsw} {sc} -% ... -% \end{macrocode} -% For \cs{swshape} I have already done that above (even though there are -% currently only a few fonts -% that support swash letters). For ``spaced small capitals'' there a -% none among the free fonts. Nevertheless, perhaps that should also be integrated -% in the kernel so that the existing \textsf{fontaxes} support continues to -% work in full. -% -% -% \begin{macrocode} -\def\updefault{up} -\def\shapedefault{n} -% \end{macrocode} -% -% \begin{macrocode} -\DeclareRobustCommand\usefont[4]{% -% \end{macrocode} -% \cs{fontencoding} needs to do some setup work so we call that, -% but family, series and shape use be used as is so we directly set -% them. If we would call \cs{fontseries} or \cs{fontshape} as it -% was done in the past, they would now interact with the existing -% series and shape which is not desired if we intend to use an -% explicit font shape! -% \begin{macrocode} - \fontencoding{#1}% - \edef\f@family{#2}% - \edef\f@series{#3}% - \edef\f@shape{#4}\selectfont - \ignorespaces} -% \end{macrocode} -% -% -% \subsubsection{Packages that need checking or updating} -% -% These package use \cs{fontprimaryshape} -%\begin{verbatim} -%./baskervaldx/Baskervaldx.sty -%./baskervillef/baskervillef.sty -%./ebgaramond/ebgaramond.sty -%./fontaxes/fontaxes.sty -%\end{verbatim} -% -% -% These package use \cs{fontsecondaryshape} -%\begin{verbatim} -%./baskervaldx/Baskervaldx.sty -%./inriafonts/InriaSans.sty -%./inriafonts/InriaSerif.sty -%./baskervillef/baskervillef.sty -%./ebgaramond/ebgaramond.sty -%./fontaxes/fontaxes.sty -%\end{verbatim} - - - - -% \section{Supporting nested emphasis} -% -% By default \LaTeXe{} supports two levels of nested emphasis: if -% the current font has an upright shape then it switches to -% \cs{itshape} otherwise to \cs{eminnershape} (which defaults to -% \cs{upshape}). This means nested emphasis will ocssilate between -% italic and upright shapes. -% -% Sometimes it would be nice to allow for a more lengthly sequence, -% but instead of providing a fixed one \LaTeX{} now offers a -% general mechanism that allows to define arbitrary sequences. -% -% \DescribeMacro\emfontdeclare -% \DescribeMacro\emforce -% -% \emph{decide name! maybe \cs{DeclareEmSequence} ???} -% -% This declaration expects a comma separated list of (font) change -% declarations corresponding to increasing levels of emphasis. -% The mechanism tries to be ``smart'' and verifies that the -% declarations actually alter the font. If not it will ignore this -% level and tries the next one---the assumption being that -% there was a manual font change in the document to the font that -% is now supposed to be used for emphasis. Of course, this only -% works if the declarations in the list actually change the font -% and not, say, just the color. -% In such a case one has to use \cs{emforce} to which directs the -% mechanism to use the level even if the font attributes haven't changed. -% -% \DescribeMacro\emreset -% If the nesting is so deep, that the specified levels are -% exhausted then \cs{emreset} is used as a final set of -% declarations (which by default returns -% back to the upright shape). Any additional nesting levels will -% then reuse the list from its beginning. - -% -% -% -% \begin{macro}{\emfontdeclare} -% -% \cs{emfontdeclare} expects a clist of declaration. Spaces in the -% argument are dropped to avoid surious spaces in the output. The -% declarations are additive. At the very end the shape is reset -% using |\emreset| and |\emforce| so that this case is never -% skipped.\footnote{Maybe we should not add \cs{emforce} but allow -% that case to be skipped as well. Of course, that might result in -% an endless loop if somebody defines a sequence without any font -% change and without \cs{emforce} but \ldots} -% Further nested calls restart at the beginning. -% \begin{macrocode} -\def\emfontdeclare#1{% - \protected@edef\emfontdeclare@clist{\zap@space#1, \@empty\emforce\emreset}% -} -% \end{macrocode} -% By default the it is empty, in which case \cs{eminnershape} is -% used by \LaTeX. -% \begin{macrocode} -\let\emfontdeclare@clist\@empty -% \end{macrocode} -% \end{macro} - - - -% \begin{macro}{\emrest} -% Reset the font to upright (this needs to undo \texttt{sc} and -% \texttt{it} separately as \cs{upshape} no longer resets both in -% one go). -% \begin{macrocode} -\DeclareRobustCommand\emreset{% - \fontshape{ulc}% in case sc is in use, e.g, changes scit -> it - \fontshape{n}% for all other cases -} -% \end{macrocode} -% We could have used \verb=\fontshape{n}= twice, that would give -% the same result with the default set of shape rules. % \end{macro} - - - -% \begin{macro}{\em} -% The new definition for \cs{em} (and implicitly \cs{emph} is like -% it was before if \cs{emfontdeclare@clist} is empty. -% \begin{macrocode} -\DeclareRobustCommand\em{% - \@nomath\em - \ifx\emfontdeclare@clist\@empty - \ifdim \fontdimen\@ne\font >\z@ - \eminnershape \else \itshape \fi - \else -% \end{macrocode} -% But if not we use the list to decide how to do emphasis. % -% We use the current font to check if the declarations have any -% effect, so even a size change is allowed and identified as a -% modification (but a color change, for example, isn't). So first -% we save the current status. -% \begin{macrocode} - \edef\em@currfont{\csname\curr@fontshape/\f@size\endcsname}% -% \end{macrocode} -% Then we grab the next element from the list and check if it can -% be used. -% \begin{macrocode} - \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update - \fi -} -% \end{macrocode} -% \end{macro} - - - -% \begin{macro}{\do@emfont@update} -% We know that the list (if not empty) has at least 2 elements -% separated by a comma, so we pick up the first in \texttt{\#1} and -% the rest in \texttt{\#2}. -% \begin{macrocode} -\def\do@emfont@update#1,#2\do@emfont@update{% -% \end{macrocode} -% First action is to alter the list and move the first entry to the end -% \begin{macrocode} - \def\emfontdeclare@clist{#2,#1}% -% \end{macrocode} -% Then we execute current declaration. Appending |\selectfont| means one -% can write just |\fontshape{it}}| and that works then too. -% \begin{macrocode} -% \typeout{Use: \detokenize{#1}}% - #1\selectfont -% \end{macrocode} -% We then compare the current font with our saved version, but with -% a slight twist: we add \cs{em@force} at the end of the -% name. Normally this is empty so has no effect but if there was an -% \cs{emforce} as part of \texttt{\#1} it will append a |/| to the -% font name (making it invalid) thus this will then always fail the -% test. % -% If the test fails we are done and the declarations will be used. -% Otherwise we will try the next declaration in the sequence. -% \begin{macrocode} - \expandafter\ifx\csname \curr@fontshape/\f@size\em@force -% \end{macrocode} -% For the comparison with \cs{ifx} we have to exand -% \cs{em@currfont} once as the relevant info is inside. -% \begin{macrocode} - \expandafter\endcsname - \em@currfont - \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update -% \end{macrocode} -% If \cs{emforce} was used, we have to undo its effect: -% \begin{macrocode} - \else - \let\em@force\@empty - \fi -} -% \end{macrocode} -% \end{macro} - - - -% \begin{macro}{\emforce} -% \begin{macro}{\em@force} -% The definition of \cs{emforce} is simple: change \cs{em@force} to -% make the above test always invalid. -% \begin{macrocode} -\protected\def\emforce{\def\em@force{/}} -\let\em@force\@empty -% \end{macrocode} -% \end{macro} -% \end{macro} - - - -% \section{Custom series settings for main document families} -% -% One problem with the NFSS approach of handling the series axis -% turned out to be that (especially with respect to ``boldness'') -% different font families implemented different strategies. For -% example, with Computer Modern fonts you normally only have -% \texttt{bx} whereas most PostScript fonts offered only \texttt{b} -% but not \texttt{bx}. As a result \LaTeX's standard setting for -% \cs{bfdefault} didn't work with such fonts, but if it got changed -% to produce \texttt{b}, then that didn't work with Computer Modern -% if the fonts got combined (e.g., using Computer Modern Typewriter -% with such fonts). -% -% The solution back then was to provide substitution rules in the -% font \texttt{.fd} such that if a \texttt{bx} series got requested -% the \texttt{b} series got used. While this works in that -% particular case, it isn't a very -% general solution. For example, if you happen to have a font family that -% has several weights you may want to typeset the whole document -% in a somewhat lighter or darker font but if you then modify -% \cs{mddefault} to allow for this, then of course your change only -% works with that particular family but not with the typewriter -% or sans serif family you also want to use. -% -% A better solution was provided by the \texttt{mweights} package by -% Bob Tennent that offers defaults on the level of the three main -% font families in the document: for ``rm'', ``sf'' and ``tt'' so -% that font packages could define defaults for the sans serif -% document font by providing \cs{bfseries@sf} which then was used -% when \cs{bfseries} got executed and the current family was the -% \cs{sffamily}. -% -% \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 -% arguments: -% \begin{description} -% \item[document family interface:] Can either be \texttt{rm}, -% \texttt{sf} or \texttt{tt}. This is optional and if not given the -% overall default. -% \item[document series interface:] Can be \texttt{md} or -% \texttt{bf}. -% \item[series value:] This is the value that is going to be used -% with the combination is requested. -% \end{description} -% -% For example, \verb=\DeclareFontSeriesDefault[rm]{bf}{sb}= would -% use \texttt{sb} (semi-bold) when \cs{rmfamily} \cs{bfseries} is -% asked for. -% -% If used without the optional argument, e.g., -% \verb=\DeclareFontSeriesDefault{bf}{b}= then this is like -% redefining \cs{bfdefault} or \cs{mddefault}. -% -% If some family specify defaults aren't given, e.g. if there are -% no declarations for, say, \texttt{tt} then the format defaults -% of \cs{mddefault} and \cs{bfdefault} are assumed. If those are -% later changed this is \emph{not} reflected!\footnote{I see no -% easy way to achieve this without compromising compatibility with -% existing packages that currently use \textsf{mweights} and directly -% define (some) of the \cs{mdseries@..} commands but not others.} -% -% -% -% \begin{macro}{\DeclareFontSeriesDefault} -% The command to declare font series defaults for the ``rm'', ``sf'' or -% ``tt'' family. -% \begin{macrocode} -\newcommand\DeclareFontSeriesDefault[3][]{% - \def\@reserveda{#1}% -% \end{macrocode} -% No optional argument: set up general default. -% \begin{macrocode} - \ifx\@resereda\@empty - \ifcsname #2series\endcsname % supported are - % \[md/bf]default - \expandafter\def - \csname #2default\endcsname{#3}% - \else - \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% - {Mandatory first argument must be 'md' or 'bf'.} - \fi -% \end{macrocode} -% Optional argument given, set up specific default. -% \begin{macrocode} - \else - \ifcsname #2series@#1\endcsname % supported are - % \[md/bf]series@[rm/sf/tt] - \expandafter\edef - \csname #2series@#1\endcsname{#3}% -% \end{macrocode} -% -% If the interface is used we remove the frozen kernel -% default. This way, we know that something was explicitly set up -% (even if the setup has the same value as the default). -% \begin{macrocode} - \expandafter\let - \csname #2series@#1@kernel\endcsname\@undefined - \else - \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% - {Optional first argument must be 'rm', 'sf', or 'tt'. \MessageBreak - Second argument must be 'md' or 'bf'.} - \fi - \fi -} -% \end{macrocode} -% \end{macro} - - - - -% \begin{macro}{\mdseries@rm} -% \begin{macro}{\mdseries@sf} -% \begin{macro}{\mdseries@tt} -% \begin{macro}{\bfseries@rm} -% \begin{macro}{\bfseries@sf} -% \begin{macro}{\bfseries@tt} -% We initialize the family specific default at the end of the -% format generation. Later on they may get overwritten in the -% preamble or a package via \cs{DeclareFontSeriesDefault} (or -% possibly directly). -% -% Conceptual change: The \cs{bfdefault} will be \texttt{b} not -% \texttt{bx} because that is what it should be really for nearly -% every font except Computer/Latin Modern. -% -% To account for the fact that by default we typeset in CM or LM we -% set up the \cs{bfseries@..} defaults to use \texttt{bx} instead. -% -% This means that it behaves like before because if the default -% fonts are used then \cs{bfseries@rm} etc kick in and make -% \cs{textbf} use \texttt{bx}. However, if the font gets changed -% then \cs{bfdefault} will get used. -% \begin{macrocode} -\renewcommand\bfdefault{b} -% \end{macrocode} -% -% \begin{macrocode} -\def\bfseries@rm{bx} -\def\bfseries@sf{bx} -\def\bfseries@tt{bx} -% \end{macrocode} -% -% Frozen version of the kernel defaults so we can see if they have changed. -% \begin{macrocode} -\let\bfseries@rm@kernel\bfseries@rm -\let\bfseries@sf@kernel\bfseries@sf -\let\bfseries@tt@kernel\bfseries@tt -% \end{macrocode} -% -% The default for the medium series is \texttt{m} and this will be -% interpreted as resetting both weight and width. To reset only one -% of them the virtual value \texttt{?m} and \texttt{m?} are available. -% \begin{macrocode} -\edef\mdseries@rm{\mddefault} -\edef\mdseries@sf{\mddefault} -\edef\mdseries@tt{\mddefault} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} - - - -% \begin{macro}{\expand@font@defaults} -% -% The family specific defaults are fully expanded, i.e., they are -% defined via \cs{edef} inside \cs{DeclareFontSeriesDefault}. -% However, the overall defaults, e.g., \cs{bfdefault} may have been -% redefined by the user and thus may not be fully expanded. So to -% enable reliable comparison we make expanded versions of -% them. That we rerun each time. The alternative would be to only -% allow for changes before begin document. -% \begin{macrocode} -\def\expand@font@defaults{% - \edef\rmdef@ult{\rmdefault}% - \edef\sfdef@ult{\sfdefault}% - \edef\ttdef@ult{\ttdefault}% - \edef\bfdef@ult{\bfdefault}% - \edef\mddef@ult{\mddefault}% - \edef\famdef@ult{\familydefault}% -} -% \end{macrocode} -% -% \begin{macrocode} -\expand@font@defaults -% \end{macrocode} -% \end{macro} - - - -% \begin{macro}{\bfseries} -% This document command switches to the bold series. -% \begin{macrocode} -\DeclareRobustCommand\bfseries{% - \not@math@alphabet\bfseries\mathbf -% \end{macrocode} -% In the original NFSS definition it then called \cs{fontseries} -% with the value \cs{bfdefault}. In the new scheme we have more -% alternatives and therefore check if the current family -% (\cs{f@family}) is the current \cs{rmdef@ult}, \cs{sfdef@ult} or -% \cs{ttdef@ult} and the select the correct family default in that case. -% \begin{macrocode} - \expand@font@defaults - \fontseries{% - \ifx\f@family\rmdef@ult \bfseries@rm - \else\ifx\f@family\sfdef@ult \bfseries@sf - \else\ifx\f@family\ttdef@ult \bfseries@tt -% \end{macrocode} -% If not \cs{bfdefault} is used. -% \begin{macrocode} - \else \bfdefault - \fi\fi\fi - }% - \selectfont -} -% \end{macrocode} -% \end{macro} - - - -% \begin{macro}{\mdseries} -% This document command switches to the medium series. -% \begin{macrocode} -\DeclareRobustCommand\mdseries{% - \not@math@alphabet\mdseries\relax - \expand@font@defaults - \fontseries{% - \ifx\f@family\rmdef@ult \mdseries@rm - \else\ifx\f@family\sfdef@ult \mdseries@sf - \else\ifx\f@family\ttdef@ult \mdseries@tt - \else \mddefault - \fi\fi\fi - }% - \selectfont -} -% \end{macrocode} -% \end{macro} - - -% \begin{macro}{\rmfamily} -% Here are the document level commands for changing the main font -% families. -% \begin{macrocode} -\DeclareRobustCommand\rmfamily{% - \not@math@alphabet\rmfamily\mathrm - % change the current series before changing the family -% \end{macrocode} -% If families are changed then we have to do a bit more work. -% In the original NFSS implementation -% a family change kept encoding, series shape and size unchanged -% but now we can't any -% longer simply reuse the current series value. Instead we may have -% to change it from one family default to the next. -% \begin{macrocode} - \expand@font@defaults -% \end{macrocode} -% We have to do the testing while while the current family is still -% unchanged but we have to do the adjustment of the series after it -% got changed (because the new family might has different sets -% ofshapes available and we certainly don't want to see -% substituation going on. So we use \cs{target@series@value} to -% hold the target series (if any). -% \begin{macrocode} - \let\target@series@value\@empty -% \end{macrocode} -% Thus, if the current family is the sans family -% \begin{macrocode} - \ifx\f@family\sfdef@ult -% \end{macrocode} -% and if we using the medium series of the sans family -% \begin{macrocode} - \ifx\f@series\mdseries@sf -% \end{macrocode} -% then lets switch to the medium series for the serif family -% \begin{macrocode} - \let\target@series@value\mdseries@rm -% \end{macrocode} -% and if we use the bold series of the sans family switch to the -% bold default of the serif family: -% \begin{macrocode} - \else\ifx\f@series\bfseries@sf \let\target@series@value\bfseries@rm -% \end{macrocode} -% However, the sans family may not have any specific defaults set, -% so we also compare with the overall defaults. -% \begin{macrocode} - \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@rm - \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@rm -% \end{macrocode} -% If neither test was true we leave the series alone. This way a -% special manual setting such as \verb=\fontseries{lc}= is not -% undone if the family changes (of course there may not be any -% support for it in the new family but then the NFSS -% substitution kicks in and sorts it out). -% \begin{macrocode} - \fi\fi\fi\fi -% -% \end{macrocode} -% We need to do the same if the current family is the typewriter family: -% \begin{macrocode} - \else\ifx\f@family\ttdef@ult - \ifx\f@series\mdseries@tt \let\target@series@value\mdseries@rm - \else\ifx\f@series\bfseries@tt \let\target@series@value\bfseries@rm - \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@rm - \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@rm - \fi\fi\fi\fi -% \end{macrocode} -% -% \begin{macrocode} - \fi\fi -% \end{macrocode} -% With these preparations for series out of the way we can now -% change the font family to \cs{rmdefault}. -% \begin{macrocode} - \fontfamily\rmdefault -% \end{macrocode} -% -% If \cs{target@series@value} is still empty there is nothing more -% to do other than selecting the new family. However, if not then -% we should update the font series now as well. But there is one -% further subtle issue. We may not have loaded an \texttt{.fd} file -% for our target font family yet. In the past that was done in -% \cs{selectfont} if necessary but since we are now doing all the -% comparisons in \cs{fontseries} we need to make sure that the font -% family specifications are already loaded prior to calling -% \cs{fontseries}. -% \begin{macrocode} - \ifx\target@series@value\@empty \else - \maybe@load@fontshape -% \end{macrocode} -% Updating the series in this case means directly changing -% \cs{f@series} to the target value. We don't want to go through -% \cs{fontseries} because that would apply the mappings and then -% \texttt{bx + b} would keep \texttt{bx} instead of changing to -% \texttt{b} as desired. -% as -% \begin{macrocode} - \let\f@series\target@series@value - \fi - \selectfont} -% \end{macrocode} -% -% \begin{macro}{\sffamily} -% \begin{macro}{\ttfamily} -% The definitions for \cs{sffamily} and \cs{ttfamily} are similar, -% the differences are only in what font families get checked. -% \begin{macrocode} -\DeclareRobustCommand\sffamily{% - \not@math@alphabet\sffamily\mathsf - \expand@font@defaults - \let\target@series@value\@empty - \ifx\f@family\rmdef@ult - \ifx\f@series\mdseries@rm \let\target@series@value\mdseries@sf - \else\ifx\f@series\bfseries@rm \let\target@series@value\bfseries@sf - \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@sf - \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@sf - \fi\fi\fi\fi - \else\ifx\f@family\ttdef@ult - \ifx\f@series\mdseries@tt \let\target@series@value\mdseries@sf - \else\ifx\f@series\bfseries@tt \let\target@series@value\bfseries@sf - \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@sf - \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@sf - \fi\fi\fi\fi - \fi\fi - \fontfamily\sfdefault - \ifx\target@series@value\@empty \else - \maybe@load@fontshape - \let\f@series\target@series@value - \fi - \selectfont} -% \end{macrocode} -% -% \begin{macrocode} -\DeclareRobustCommand\ttfamily{% - \not@math@alphabet\ttfamily\mathtt - \expand@font@defaults - \let\target@series@value\@empty - \ifx\f@family\rmdef@ult - \ifx\f@series\mdseries@rm \let\target@series@value\mdseries@tt - \else\ifx\f@series\bfseries@rm \let\target@series@value\bfseries@tt - \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@tt - \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@tt - \fi\fi\fi\fi - \else\ifx\f@family\sfdef@ult - \ifx\f@series\mdseries@sf \let\target@series@value\mdseries@tt - \else\ifx\f@series\bfseries@sf \let\target@series@value\bfseries@tt - \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@tt - \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@tt - \fi\fi\fi\fi - \fi\fi - \fontfamily\ttdefault - \ifx\target@series@value\@empty \else - \maybe@load@fontshape - \let\f@series\target@series@value - \fi - \selectfont} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} - - - - - -% \begin{macro}{\add@accent} -% -% \begin{macrocode} -\def\add@accent#1#2{\hmode@bgroup - \let\hmode@start@before@group\@firstofone - \setbox\@tempboxa\hbox{#2% - \global\mathchardef\accent@spacefactor\spacefactor}% -% \end{macrocode} -% The accent primitive doesn't allow things \cs{begingroup} to -% interfere between accent and base character. Therefore we need to -% avoid that. As we don't have to load the fontshape in this case -% (as that happened in the box above if necessary, we simply -% disable that part of the code temporaily. -% We also ignore \cs{ignorespaces} which has the same issue and may -% show up as part of \cs{normalfont} if that is used. -% \begin{macrocode} - \let\maybe@load@fontshape\relax - \let\ignorespaces\relax - \accent#1 #2\egroup\spacefactor\accent@spacefactor} - % \end{macrocode} -% \end{macro} - - - -% \begin{macro}{\AtBeginDocument} -% -% \begin{macrocode} -\AtBeginDocument{% -% \end{macrocode} -% -% We only want \texttt{bx} in \cs{bfseries@rm} if the Roman font is -% Computer Modern or Latin Modern, otherwise it should be -% \texttt{b}. It was set to \texttt{bx} in the kernel so that any -% font use with the default families in the preamble get this -% value. Now at the real document start we check if the fonts have -% been changed. If there was a \cs{DeclareFontSeriesDefault} -% declaration or \cs{bfseries@rm} was directly altered then it -% differs from \cs{bfseries@rm@kernel} and we do nothing. -% Otherwise we check if \cs{rmdefault} is one of the CM/LM font -% families and if so we keep \texttt{bx} otherwise we change it to -% \texttt{b}. -% -% This approach doesn't cover one case: CM/LM got changed to a -% different family that supports \texttt{bx}, but the support -% package for that family used \verb=\def\bfseries@rm{bx}= instead -% of using \cs{DeclareFontSeriesDefault}. In that case the code -% here changes it to \texttt{b}. Solution: use the -% \cs{DeclareFontSeriesDefault} interface. -% \begin{macrocode} - \ifx\bfseries@rm@kernel\bfseries@rm - \expandafter\in@\expandafter{\rmdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% - \ifin@ \else \def\bfseries@rm{b}\fi\fi -% \end{macrocode} -% Same approach for \cs{bfseries@sf} and \cs{bfseries@tt}: -% \begin{macrocode} - \ifx\bfseries@sf@kernel\bfseries@sf - \expandafter\in@\expandafter{\sfdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% - \ifin@ \else \def\bfseries@sf{b}\fi\fi - \ifx\bfseries@tt@kernel\bfseries@tt - \expandafter\in@\expandafter{\ttdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% - \ifin@ \else \def\bfseries@tt{b}\fi\fi -% \end{macrocode} -% -% If the document preamble has changed the \cs{familydefault} or if -% the if the \cs{rmdefault} contains a new font family, we have to -% adjust the series defaults accordingly, before starting -% typesetting. So we run \cs{rmfamily}, \cs{sffamily} or -% \cs{ttfamily} depending on the situation which does that (as a -% sideeffect) for us. -% \begin{macrocode} - \expand@font@defaults - \ifx\famdef@ult\rmdef@ult \rmfamily - \else\ifx\famdef@ult\sfdef@ult \sffamily - \else\ifx\famdef@ult\ttdef@ult \ttfamily - \fi\fi\fi -}% -% \end{macrocode} -% \end{macro} - - - -% As the kernel code now implements the same functionality as -% \textsf{mweights}, albeit internally coded slightly differently, -% that package shouldn't be loaded any more. We therefore pretend -% that it already got loaded. Thus, a font package that tries to -% load it and then sets \cs{mdseries@..}, etc.\ will continue to -% work but will now use the kernel code. -% -% Of course, mid-term such package should probably use -% \cs{DeclareFontSeriesDefault} instead of making using low-level -% definitions. -% -% \begin{macrocode} -\expandafter\let\csname ver@mweights.sty\endcsname\fmtversion -% \end{macrocode} - - - - -% \begin{macro}{\DeclareFontFamilySubstitution} -% The idea for this macro is stolen from the \texttt{substitutefont} -% package, with some modifications and a new name. -% -% Its purpose is to provide characters in a special encoding tht -% are not available in the current font family to be taken from a -% different family that is visually compatible (or not if you -% choose badly). For example, you can match the GFS Didot Greek -% characters with \TeX{} Gyre Pagella (Palatino) by specifying -%\begin{verbatim} -% \DeclareFontFamilySubstitution{LGR}{qpl}{udidot} -%\end{verbatim} -% This way if you ask for the \texttt{LGR} encoding in for the -% \textt{qpl} family you get the characters from the -% \texttt{udidot} family substituted. +% Supporting rollback \ldots +% \begin{macrocode} +% +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}% +% {\DeclareFontSeriesChangeRule}{Series change rules}% +% +%\DeclareRobustCommand\fontseries[1]{\edef\f@series{#1}} +%\DeclareRobustCommand\fontshape [1]{\edef\f@shape{#1}} +% +%\let\DeclareFontSeriesChangeRule\@undefined +%\let\merge@font@series\@undefined +%\let\merge@font@series@\@undefined +%\let\@font@shape@subst@warning\@undefined +%\let\maybe@load@fontshape\@undefined +%\let\set@target@series\@undefined +%\let\series@drop@one@m\@undefined +%\let\DeclareFontShapeChangeRule\@undefined +%\let\merge@font@shape\@undefined +%\let\merge@font@shape@\@undefined +%\let\normalshape\@undefined +%\let\ulcshape\@undefined +%\let\ulcdefault\@undefined +%\let\swshape\@undefined +%\let\swdefault\@undefined +%\let\sscshape\@undefined +%\let\sscdefault\@undefined +%\let\normalshape\@undefined +% \end{macrocode} +% This is always called in \cs{document} so don't make it undefined. +% \begin{macrocode} +% +%\let\reinstall@nfss@defs\relax +%\EndIncludeInRelease +%<*2ekernel> +% +% \end{macrocode} +% +% \Finale % -% we need to ensure that the macro is defined with -% \cs{nfss@catcodes} in force (not quite sure why at the moment to -% be honest). -% \begin{macrocode} -\begingroup -\nfss@catcodes -\gdef\DeclareFontFamilySubstitution#1#2#3{% -% \end{macrocode} -% We only provide a set of silent substitutions. The package also -% (re)declared the family, but this is incorrect in my eyes and it -% is better to handle that differently. -% -% Of course the families may still need loading at -% this point and so we arange for this. Otherwise we might run into -% trouble because the necessary \cs{DeclareFontFamily} has not been -% seen. -% \begin{macrocode} - \LoadFontDefinitionFile{#1}{#2}% - \LoadFontDefinitionFile{#1}{#3}% -% \end{macrocode} -% -% \begin{macrocode} - \DeclareFontShape{#1}{#2}{m}{it}{<->ssub * #3/m/it}{}% - \DeclareFontShape{#1}{#2}{m}{n}{<->ssub * #3/m/n}{}% - \DeclareFontShape{#1}{#2}{m}{sc}{<->ssub * #3/m/sc}{}% - \DeclareFontShape{#1}{#2}{m}{sl}{<->ssub * #3/m/sl}{}% -% \end{macrocode} -% These days a few more shapes might be around, so we declare those -% too. If they don't exist then after the first substitution normal -% fallbacks will happen. -% \begin{macrocode} - \DeclareFontShape{#1}{#2}{m}{sw}{<->ssub * #3/m/sw}{}% - \DeclareFontShape{#1}{#2}{m}{scit}{<->ssub * #3/m/scit}{}% - \DeclareFontShape{#1}{#2}{m}{scsl}{<->ssub * #3/m/scsl}{}% -% \end{macrocode} -% Same game with \texttt{b} and \texttt{bx}, for other weights you -% are on your own: -% \begin{macrocode} - \DeclareFontShape{#1}{#2}{b}{it}{<->ssub * #3/b/it}{}% - \DeclareFontShape{#1}{#2}{b}{n}{<->ssub * #3/b/n}{}% - \DeclareFontShape{#1}{#2}{b}{scit}{<->ssub * #3/b/scit}{}% - \DeclareFontShape{#1}{#2}{b}{scsl}{<->ssub * #3/b/scsl}{}% - \DeclareFontShape{#1}{#2}{b}{sc}{<->ssub * #3/b/sc}{}% - \DeclareFontShape{#1}{#2}{b}{sl}{<->ssub * #3/b/sl}{}% - \DeclareFontShape{#1}{#2}{b}{sw}{<->ssub * #3/b/sw}{}% - \DeclareFontShape{#1}{#2}{bx}{it}{<->ssub * #3/bx/it}{}% - \DeclareFontShape{#1}{#2}{bx}{n}{<->ssub * #3/bx/n}{}% - \DeclareFontShape{#1}{#2}{bx}{scit}{<->ssub * #3/bx/scit}{}% - \DeclareFontShape{#1}{#2}{bx}{scsl}{<->ssub * #3/bx/scsl}{}% - \DeclareFontShape{#1}{#2}{bx}{sc}{<->ssub * #3/bx/sc}{}% - \DeclareFontShape{#1}{#2}{bx}{sl}{<->ssub * #3/bx/sl}{}% - \DeclareFontShape{#1}{#2}{bx}{sw}{<->ssub * #3/bx/sw}{}% -} -\endgroup -% \end{macrocode} -% \end{macro} - - - - -% \begin{macro}{\LoadFontDefinitionFile} -% -% \begin{macrocode} -\def\LoadFontDefinitionFile#1#2{% - \begingroup - \edef\f@encoding{#1}% - \edef\f@family{#2}% - \try@load@fontshape - \endgroup -} -% \end{macrocode} -% \end{macro} -% ^^A Possible issue with tudscr.cls -- needs checking diff --git a/base/ltfssbas.dtx b/base/ltfssbas.dtx index da9dab5d3..26885e902 100644 --- a/base/ltfssbas.dtx +++ b/base/ltfssbas.dtx @@ -35,7 +35,7 @@ % % \ProvidesFile{ltfssbas.dtx} - [2019/08/27 v3.2d LaTeX Kernel (NFSS Basic Macros)] + [2019/12/17 v3.2e LaTeX Kernel (NFSS Basic Macros)] % \iffalse \documentclass{ltxdoc} \begin{document} @@ -800,16 +800,11 @@ % \begin{macro}{\f@shape} % \begin{macrocode} \DeclareRobustCommand\fontfamily[1]{\edef\f@family{#1}} -\DeclareRobustCommand\fontseries[1]{\edef\f@series{#1}} -\DeclareRobustCommand\fontshape [1]{\edef\f@shape{#1}} % \end{macrocode} -% Some handy abbreviation if you want to get some particular font -% in the current size. If also the size should change one has to -% issue a |\fontsize| command first. +% There are now defined later (and differently). % \begin{macrocode} -\DeclareRobustCommand\usefont[4]{\fontencoding{#1}\fontfamily{#2}% - \fontseries{#3}\fontshape{#4}\selectfont - \ignorespaces} +%\DeclareRobustCommand\fontseries[1]{\edef\f@series{#1}} +%\DeclareRobustCommand\fontshape [1]{\edef\f@shape{#1}} % \end{macrocode} % \end{macro} % \end{macro} @@ -819,6 +814,31 @@ % \end{macro} % % +% +% \begin{macro}{\usefont} +% Some handy abbreviation if you want to get some particular font +% in the current size. If also the size should change one has to +% issue a |\fontsize| command first. +% +% \cs{fontencoding} needs to do some setup work so we call that, +% but instead of calling \cs{fontfamily}, \cs{fontseries} and +% \cs{fontshape} it earlier versions of this code did, we now set +% \cs{f@family}, etc.\ directly. If we would call \cs{fontseries} +% or \cs{fontshape} as it +% was done in the past, they would now interact with the existing +% series and shape which is not desired if we intend to use an +% explicit font shape! +% \changes{v3.2e}{2019/12/17}{Don't call \cs{fontseries} or \cs{fontshape}} +% \begin{macrocode} +\DeclareRobustCommand\usefont[4]{\fontencoding{#1}% + \edef\f@family{#2}% + \edef\f@series{#3}% + \edef\f@shape{#4}\selectfont + \ignorespaces} +% \end{macrocode} +% \end{macro} +% +% % \begin{macro}{\linespread} % \changes{v2.1j}{1994/05/12}{New macro} % \changes{v2.1p}{1994/05/16}{Remove surplus braces} @@ -1269,6 +1289,122 @@ % \end{macro} % % +% +% \begin{macro}{\LoadFontDefinitionFile} +% Load and \texttt{.fd} files for some encoding and family (if it exists). +% \begin{macrocode} +% +%<*2ekernel|latexrelease> +%\IncludeInRelease{2020/02/02}% +% {\LoadFontDefinitionFile}{Loading .fd files}% +\def\LoadFontDefinitionFile#1#2{% + \begingroup + \edef\f@encoding{#1}% + \edef\f@family{#2}% + \try@load@fontshape + \endgroup +} +% +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}% +% {\LoadFontDefinitionFile}{Loading .fd files}% +% +%\let\LoadFontDefinitionFile\@undefined +%\EndIncludeInRelease +%<*2ekernel> +% \end{macrocode} +% \end{macro} +% +% +% + +% \begin{macro}{\DeclareFontFamilySubstitution} +% The idea for this macro is stolen from the \texttt{substitutefont} +% package, with some modifications and a new name. +% +% Its purpose is to provide characters in a special encoding tht +% are not available in the current font family to be taken from a +% different family that is visually compatible (or not if you +% choose badly). For example, you can match the GFS Didot Greek +% characters with \TeX{} Gyre Pagella (Palatino) by specifying +%\begin{verbatim} +% \DeclareFontFamilySubstitution{LGR}{qpl}{udidot} +%\end{verbatim} +% This way if you ask for the \texttt{LGR} encoding in for the +% \textt{qpl} family you get the characters from the +% \texttt{udidot} family substituted. +% +% We need to ensure that the macro is defined with +% \cs{nfss@catcodes} in force (not quite sure why at the moment to +% be honest). +% \begin{macrocode} +% +%<*2ekernel|latexrelease> +%\IncludeInRelease{2020/02/02}% +% {\DeclareFontFamilySubstitution}{Provide family substituation}% +\begingroup +\nfss@catcodes +\gdef\DeclareFontFamilySubstitution#1#2#3{% +% \end{macrocode} +% We only provide a set of silent substitutions. The package also +% (re)declared the family, but this is incorrect in my eyes and it +% is better to handle that differently. +% +% Of course the families may still need loading at +% this point and so we arange for this. Otherwise we might run into +% trouble because the necessary \cs{DeclareFontFamily} has not been +% seen. +% \begin{macrocode} + \LoadFontDefinitionFile{#1}{#2}% + \LoadFontDefinitionFile{#1}{#3}% +% \end{macrocode} +% +% \begin{macrocode} + \DeclareFontShape{#1}{#2}{m}{it}{<->ssub * #3/m/it}{}% + \DeclareFontShape{#1}{#2}{m}{n}{<->ssub * #3/m/n}{}% + \DeclareFontShape{#1}{#2}{m}{sc}{<->ssub * #3/m/sc}{}% + \DeclareFontShape{#1}{#2}{m}{sl}{<->ssub * #3/m/sl}{}% +% \end{macrocode} +% These days a few more shapes might be around, so we declare those +% too. If they don't exist then after the first substitution normal +% fallbacks will happen. +% \begin{macrocode} + \DeclareFontShape{#1}{#2}{m}{sw}{<->ssub * #3/m/sw}{}% + \DeclareFontShape{#1}{#2}{m}{scit}{<->ssub * #3/m/scit}{}% + \DeclareFontShape{#1}{#2}{m}{scsl}{<->ssub * #3/m/scsl}{}% +% \end{macrocode} +% Same game with \texttt{b} and \texttt{bx}, for other weights you +% are on your own: +% \begin{macrocode} + \DeclareFontShape{#1}{#2}{b}{it}{<->ssub * #3/b/it}{}% + \DeclareFontShape{#1}{#2}{b}{n}{<->ssub * #3/b/n}{}% + \DeclareFontShape{#1}{#2}{b}{scit}{<->ssub * #3/b/scit}{}% + \DeclareFontShape{#1}{#2}{b}{scsl}{<->ssub * #3/b/scsl}{}% + \DeclareFontShape{#1}{#2}{b}{sc}{<->ssub * #3/b/sc}{}% + \DeclareFontShape{#1}{#2}{b}{sl}{<->ssub * #3/b/sl}{}% + \DeclareFontShape{#1}{#2}{b}{sw}{<->ssub * #3/b/sw}{}% + \DeclareFontShape{#1}{#2}{bx}{it}{<->ssub * #3/bx/it}{}% + \DeclareFontShape{#1}{#2}{bx}{n}{<->ssub * #3/bx/n}{}% + \DeclareFontShape{#1}{#2}{bx}{scit}{<->ssub * #3/bx/scit}{}% + \DeclareFontShape{#1}{#2}{bx}{scsl}{<->ssub * #3/bx/scsl}{}% + \DeclareFontShape{#1}{#2}{bx}{sc}{<->ssub * #3/bx/sc}{}% + \DeclareFontShape{#1}{#2}{bx}{sl}{<->ssub * #3/bx/sl}{}% + \DeclareFontShape{#1}{#2}{bx}{sw}{<->ssub * #3/bx/sw}{}% +} +\endgroup +% +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}% +% {\DeclareFontFamilySubstitution}{Provide family substituation}% +% +%\let\DeclareFontFamilySubstitution\@undefined +%\EndIncludeInRelease +%<*2ekernel> +% \end{macrocode} +% \end{macro} +% +% +% % \begin{macro}{\DeclareErrorFont} % Declare the last resort shape! We assume that in this fontshape % there is a 10pt font but it doesn't really matter. We only loose diff --git a/base/ltfssini.dtx b/base/ltfssini.dtx index b073a5cc3..f44496c73 100644 --- a/base/ltfssini.dtx +++ b/base/ltfssini.dtx @@ -36,7 +36,7 @@ % % \ProvidesFile{ltfssini.dtx} - [2019/08/27 v3.1d LaTeX Kernel (NFSS Initialisation)] + [2019/12/17 v3.1e LaTeX Kernel (NFSS Initialisation)] % \iffalse \documentclass{ltxdoc} \begin{document} @@ -157,26 +157,28 @@ % Now we define the standard font change commands. % We don't allow the use of |\rmfamily| etc.\ in math mode. % +% (Actually most are now defined further down in the file.) +% % First the changes to another \emph{family}: % \begin{macrocode} -\DeclareRobustCommand\rmfamily - {\not@math@alphabet\rmfamily\mathrm - \fontfamily\rmdefault\selectfont} -\DeclareRobustCommand\sffamily - {\not@math@alphabet\sffamily\mathsf - \fontfamily\sfdefault\selectfont} -\DeclareRobustCommand\ttfamily - {\not@math@alphabet\ttfamily\mathtt - \fontfamily\ttdefault\selectfont} +%\DeclareRobustCommand\rmfamily +% {\not@math@alphabet\rmfamily\mathrm +% \fontfamily\rmdefault\selectfont} +%\DeclareRobustCommand\sffamily +% {\not@math@alphabet\sffamily\mathsf +% \fontfamily\sfdefault\selectfont} +%\DeclareRobustCommand\ttfamily +% {\not@math@alphabet\ttfamily\mathtt +% \fontfamily\ttdefault\selectfont} % \end{macrocode} % Then the commands changing the \emph{series}: % \begin{macrocode} -\DeclareRobustCommand\bfseries - {\not@math@alphabet\bfseries\mathbf - \fontseries\bfdefault\selectfont} -\DeclareRobustCommand\mdseries - {\not@math@alphabet\mdseries\relax - \fontseries\mddefault\selectfont} +%\DeclareRobustCommand\bfseries +% {\not@math@alphabet\bfseries\mathbf +% \fontseries\bfdefault\selectfont} +%\DeclareRobustCommand\mdseries +% {\not@math@alphabet\mdseries\relax +% \fontseries\mddefault\selectfont} \DeclareRobustCommand\upshape {\not@math@alphabet\upshape\relax \fontshape\updefault\selectfont} @@ -195,30 +197,751 @@ % \end{macrocode} % % +% +% +% \section{Custom series settings for main document families} +% +% This section was introduced 2020/02/02 and for now we support a +% full rollback (may need splitting later). +% \changes{v3.1e}{2019/12/17}{Provide custom series settings a la mweights} +% \begin{macrocode} +% +%<*2ekernel|latexrelease> +%\IncludeInRelease{2020/02/02}% +% {\DeclareFontSeriesDefault}{Custom series}% +% \end{macrocode} +% +% One problem with the NFSS approach of handling the series axis +% turned out to be that (especially with respect to ``boldness'') +% different font families implemented different strategies. For +% example, with Computer Modern fonts you normally only have +% \texttt{bx} whereas most PostScript fonts offered only \texttt{b} +% but not \texttt{bx}. As a result \LaTeX's standard setting for +% \cs{bfdefault} didn't work with such fonts, but if it got changed +% to produce \texttt{b}, then that didn't work with Computer Modern +% if the fonts got combined (e.g., using Computer Modern Typewriter +% with such fonts). +% +% The solution back then was to provide substitution rules in the +% font \texttt{.fd} such that if a \texttt{bx} series got requested +% the \texttt{b} series got used. While this works in that +% particular case, it isn't a very +% general solution. For example, if you happen to have a font family that +% has several weights you may want to typeset the whole document +% in a somewhat lighter or darker font but if you then modify +% \cs{mddefault} to allow for this, then of course your change only +% works with that particular family but not with the typewriter +% or sans serif family you also want to use. +% +% A better solution was provided by the \texttt{mweights} package by +% Bob Tennent that offers defaults on the level of the three main +% font families in the document: for ``rm'', ``sf'' and ``tt'' so +% that font packages could define defaults for the sans serif +% document font by providing \cs{bfseries@sf} which then was used +% when \cs{bfseries} got executed and the current family was the +% \cs{sffamily}. +% +% \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 +% arguments: +% \begin{description} +% \item[document family interface:] Can either be \texttt{rm}, +% \texttt{sf} or \texttt{tt}. This is optional and if not given the +% overall default. +% \item[document series interface:] Can be \texttt{md} or +% \texttt{bf}. +% \item[series value:] This is the value that is going to be used +% with the combination is requested. +% \end{description} +% +% For example, \verb=\DeclareFontSeriesDefault[rm]{bf}{sb}= would +% use \texttt{sb} (semi-bold) when \cs{rmfamily} \cs{bfseries} is +% asked for. +% +% If used without the optional argument, e.g., +% \verb=\DeclareFontSeriesDefault{bf}{b}= then this is like +% redefining \cs{bfdefault} or \cs{mddefault}. +% +% If some family specify defaults aren't given, e.g. if there are +% no declarations for, say, \texttt{tt} then the format defaults +% of \cs{mddefault} and \cs{bfdefault} are assumed. If those are +% later changed this is \emph{not} reflected!\footnote{I see no +% easy way to achieve this without compromising compatibility with +% existing packages that currently use \textsf{mweights} and directly +% define (some) of the \cs{mdseries@..} commands but not others.} +% +% +% +% \begin{macro}{\DeclareFontSeriesDefault} +% The command to declare font series defaults for the ``rm'', ``sf'' or +% ``tt'' family. +% \begin{macrocode} +\newcommand\DeclareFontSeriesDefault[3][]{% + \def\@reserveda{#1}% +% \end{macrocode} +% No optional argument: set up general default. +% \begin{macrocode} + \ifx\@resereda\@empty + \ifcsname #2series\endcsname % supported are + % \[md/bf]default + \expandafter\def + \csname #2default\endcsname{#3}% + \else + \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% + {Mandatory first argument must be 'md' or 'bf'.} + \fi +% \end{macrocode} +% Optional argument given, set up specific default. +% \begin{macrocode} + \else + \ifcsname #2series@#1\endcsname % supported are + % \[md/bf]series@[rm/sf/tt] + \expandafter\edef + \csname #2series@#1\endcsname{#3}% +% \end{macrocode} +% +% If the interface is used we remove the frozen kernel +% default. This way, we know that something was explicitly set up +% (even if the setup has the same value as the default). +% \begin{macrocode} + \expandafter\let + \csname #2series@#1@kernel\endcsname\@undefined + \else + \@latex@error{Wrong syntax for \string\DeclareFontSeriesDefault}% + {Optional first argument must be 'rm', 'sf', or 'tt'. \MessageBreak + Second argument must be 'md' or 'bf'.} + \fi + \fi +} +% \end{macrocode} +% \end{macro} + + + + +% \begin{macro}{\mdseries@rm} +% \begin{macro}{\mdseries@sf} +% \begin{macro}{\mdseries@tt} +% \begin{macro}{\bfseries@rm} +% \begin{macro}{\bfseries@sf} +% \begin{macro}{\bfseries@tt} +% We initialize the family specific default at the end of the +% format generation. Later on they may get overwritten in the +% preamble or a package via \cs{DeclareFontSeriesDefault} (or +% possibly directly). +% +% Conceptual change: The \cs{bfdefault} will be \texttt{b} not +% \texttt{bx} because that is what it should be really for nearly +% every font except Computer/Latin Modern. +% +% To account for the fact that by default we typeset in CM or LM we +% set up the \cs{bfseries@..} defaults to use \texttt{bx} instead. +% +% This means that it behaves like before because if the default +% fonts are used then \cs{bfseries@rm} etc kick in and make +% \cs{textbf} use \texttt{bx}. However, if the font gets changed +% then \cs{bfdefault} will get used. +% +% \begin{macrocode} +\def\bfseries@rm{bx} +\def\bfseries@sf{bx} +\def\bfseries@tt{bx} +% \end{macrocode} +% +% Frozen version of the kernel defaults so we can see if they have changed. +% \begin{macrocode} +\let\bfseries@rm@kernel\bfseries@rm +\let\bfseries@sf@kernel\bfseries@sf +\let\bfseries@tt@kernel\bfseries@tt +% \end{macrocode} +% +% The default for the medium series is \texttt{m} and this will be +% interpreted as resetting both weight and width. To reset only one +% of them the virtual value \texttt{?m} and \texttt{m?} are available. +% \begin{macrocode} +\def\mdseries@rm{m} +\def\mdseries@sf{m} +\def\mdseries@tt{m} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} + + + +% \begin{macro}{\expand@font@defaults} +% +% The family specific defaults are fully expanded, i.e., they are +% defined via \cs{edef} inside \cs{DeclareFontSeriesDefault}. +% However, the overall defaults, e.g., \cs{bfdefault} may have been +% redefined by the user and thus may not be fully expanded. So to +% enable reliable comparison we make expanded versions of +% them. That we rerun each time. The alternative would be to only +% allow for changes before begin document. +% \begin{macrocode} +\def\expand@font@defaults{% + \edef\rmdef@ult{\rmdefault}% + \edef\sfdef@ult{\sfdefault}% + \edef\ttdef@ult{\ttdefault}% + \edef\bfdef@ult{\bfdefault}% + \edef\mddef@ult{\mddefault}% + \edef\famdef@ult{\familydefault}% +} +% \end{macrocode} +% +% \end{macro} + + + +% \begin{macro}{\bfseries} +% This document command switches to the bold series. +% \begin{macrocode} +\DeclareRobustCommand\bfseries{% + \not@math@alphabet\bfseries\mathbf +% \end{macrocode} +% In the original NFSS definition it then called \cs{fontseries} +% with the value \cs{bfdefault}. In the new scheme we have more +% alternatives and therefore check if the current family +% (\cs{f@family}) is the current \cs{rmdef@ult}, \cs{sfdef@ult} or +% \cs{ttdef@ult} and the select the correct family default in that case. +% \begin{macrocode} + \expand@font@defaults + \fontseries{% + \ifx\f@family\rmdef@ult \bfseries@rm + \else\ifx\f@family\sfdef@ult \bfseries@sf + \else\ifx\f@family\ttdef@ult \bfseries@tt +% \end{macrocode} +% If not \cs{bfdefault} is used. +% \begin{macrocode} + \else \bfdefault + \fi\fi\fi + }% + \selectfont +} +% \end{macrocode} +% \end{macro} + + + +% \begin{macro}{\mdseries} +% This document command switches to the medium series. +% \begin{macrocode} +\DeclareRobustCommand\mdseries{% + \not@math@alphabet\mdseries\relax + \expand@font@defaults + \fontseries{% + \ifx\f@family\rmdef@ult \mdseries@rm + \else\ifx\f@family\sfdef@ult \mdseries@sf + \else\ifx\f@family\ttdef@ult \mdseries@tt + \else \mddefault + \fi\fi\fi + }% + \selectfont +} +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\rmfamily} +% Here are the document level commands for changing the main font +% families. +% \begin{macrocode} +\DeclareRobustCommand\rmfamily{% + \not@math@alphabet\rmfamily\mathrm + % change the current series before changing the family +% \end{macrocode} +% If families are changed then we have to do a bit more work. +% In the original NFSS implementation +% a family change kept encoding, series shape and size unchanged +% but now we can't any +% longer simply reuse the current series value. Instead we may have +% to change it from one family default to the next. +% \begin{macrocode} + \expand@font@defaults +% \end{macrocode} +% We have to do the testing while while the current family is still +% unchanged but we have to do the adjustment of the series after it +% got changed (because the new family might has different sets +% ofshapes available and we certainly don't want to see +% substituation going on. So we use \cs{target@series@value} to +% hold the target series (if any). +% \begin{macrocode} + \let\target@series@value\@empty +% \end{macrocode} +% Thus, if the current family is the sans family +% \begin{macrocode} + \ifx\f@family\sfdef@ult +% \end{macrocode} +% and if we using the medium series of the sans family +% \begin{macrocode} + \ifx\f@series\mdseries@sf +% \end{macrocode} +% then lets switch to the medium series for the serif family +% \begin{macrocode} + \let\target@series@value\mdseries@rm +% \end{macrocode} +% and if we use the bold series of the sans family switch to the +% bold default of the serif family: +% \begin{macrocode} + \else\ifx\f@series\bfseries@sf \let\target@series@value\bfseries@rm +% \end{macrocode} +% However, the sans family may not have any specific defaults set, +% so we also compare with the overall defaults. +% \begin{macrocode} + \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@rm + \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@rm +% \end{macrocode} +% If neither test was true we leave the series alone. This way a +% special manual setting such as \verb=\fontseries{lc}= is not +% undone if the family changes (of course there may not be any +% support for it in the new family but then the NFSS +% substitution kicks in and sorts it out). +% \begin{macrocode} + \fi\fi\fi\fi +% +% \end{macrocode} +% We need to do the same if the current family is the typewriter family: +% \begin{macrocode} + \else\ifx\f@family\ttdef@ult + \ifx\f@series\mdseries@tt \let\target@series@value\mdseries@rm + \else\ifx\f@series\bfseries@tt \let\target@series@value\bfseries@rm + \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@rm + \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@rm + \fi\fi\fi\fi +% \end{macrocode} +% +% \begin{macrocode} + \fi\fi +% \end{macrocode} +% With these preparations for series out of the way we can now +% change the font family to \cs{rmdefault}. +% \begin{macrocode} + \fontfamily\rmdefault +% \end{macrocode} +% +% If \cs{target@series@value} is still empty there is nothing more +% to do other than selecting the new family. However, if not then +% we should update the font series now as well. But there is one +% further subtle issue. We may not have loaded an \texttt{.fd} file +% for our target font family yet. In the past that was done in +% \cs{selectfont} if necessary but since we are now doing all the +% comparisons in \cs{fontseries} we need to make sure that the font +% family specifications are already loaded prior to calling +% \cs{fontseries}. +% \begin{macrocode} + \ifx\target@series@value\@empty \else + \maybe@load@fontshape +% \end{macrocode} +% Updating the series in this case means directly changing +% \cs{f@series} to the target value. We don't want to go through +% \cs{fontseries} because that would apply the mappings and then +% \texttt{bx + b} would keep \texttt{bx} instead of changing to +% \texttt{b} as desired. +% as +% \begin{macrocode} + \let\f@series\target@series@value + \fi + \selectfont} +% \end{macrocode} +% +% \begin{macro}{\sffamily} +% \begin{macro}{\ttfamily} +% The definitions for \cs{sffamily} and \cs{ttfamily} are similar, +% the differences are only in what font families get checked. +% \begin{macrocode} +\DeclareRobustCommand\sffamily{% + \not@math@alphabet\sffamily\mathsf + \expand@font@defaults + \let\target@series@value\@empty + \ifx\f@family\rmdef@ult + \ifx\f@series\mdseries@rm \let\target@series@value\mdseries@sf + \else\ifx\f@series\bfseries@rm \let\target@series@value\bfseries@sf + \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@sf + \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@sf + \fi\fi\fi\fi + \else\ifx\f@family\ttdef@ult + \ifx\f@series\mdseries@tt \let\target@series@value\mdseries@sf + \else\ifx\f@series\bfseries@tt \let\target@series@value\bfseries@sf + \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@sf + \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@sf + \fi\fi\fi\fi + \fi\fi + \fontfamily\sfdefault + \ifx\target@series@value\@empty \else + \maybe@load@fontshape + \let\f@series\target@series@value + \fi + \selectfont} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareRobustCommand\ttfamily{% + \not@math@alphabet\ttfamily\mathtt + \expand@font@defaults + \let\target@series@value\@empty + \ifx\f@family\rmdef@ult + \ifx\f@series\mdseries@rm \let\target@series@value\mdseries@tt + \else\ifx\f@series\bfseries@rm \let\target@series@value\bfseries@tt + \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@tt + \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@tt + \fi\fi\fi\fi + \else\ifx\f@family\sfdef@ult + \ifx\f@series\mdseries@sf \let\target@series@value\mdseries@tt + \else\ifx\f@series\bfseries@sf \let\target@series@value\bfseries@tt + \else\ifx\f@series\mddef@ult \let\target@series@value\mdseries@tt + \else\ifx\f@series\bfdef@ult \let\target@series@value\bfseries@tt + \fi\fi\fi\fi + \fi\fi + \fontfamily\ttdefault + \ifx\target@series@value\@empty \else + \maybe@load@fontshape + \let\f@series\target@series@value + \fi + \selectfont} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \begin{macro}{\init@series@setup} +% This is code to be run at begin document \ldots +% \begin{macrocode} +\def\init@series@setup{% +% \end{macrocode} +% +% We only want \texttt{bx} in \cs{bfseries@rm} if the roman font is +% Computer Modern or Latin Modern, otherwise it should be +% \texttt{b}. It was set to \texttt{bx} in the kernel so that any +% font use with the default families in the preamble get this +% value. Now at the real document start we check if the fonts have +% been changed. If there was a \cs{DeclareFontSeriesDefault} +% declaration or \cs{bfseries@rm} was directly altered then it +% differs from \cs{bfseries@rm@kernel} and we do nothing. +% Otherwise we check if \cs{rmdefault} is one of the CM/LM font +% families and if so we keep \texttt{bx} otherwise we change it to +% \texttt{b}. +% +% This approach doesn't cover one case: CM/LM got changed to a +% different family that supports \texttt{bx}, but the support +% package for that family used \verb=\def\bfseries@rm{bx}= instead +% of using \cs{DeclareFontSeriesDefault}. In that case the code +% here changes it to \texttt{b}. Solution: use the +% \cs{DeclareFontSeriesDefault} interface. +% \begin{macrocode} + \ifx\bfseries@rm@kernel\bfseries@rm + \expandafter\in@\expandafter{\rmdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% + \ifin@ \else \def\bfseries@rm{b}\fi\fi +% \end{macrocode} +% Same approach for \cs{bfseries@sf} and \cs{bfseries@tt}: +% \begin{macrocode} + \ifx\bfseries@sf@kernel\bfseries@sf + \expandafter\in@\expandafter{\sfdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% + \ifin@ \else \def\bfseries@sf{b}\fi\fi + \ifx\bfseries@tt@kernel\bfseries@tt + \expandafter\in@\expandafter{\ttdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}% + \ifin@ \else \def\bfseries@tt{b}\fi\fi +% \end{macrocode} +% +% If the document preamble has changed the \cs{familydefault} or if +% the if the \cs{rmdefault} contains a new font family, we have to +% adjust the series defaults accordingly, before starting +% typesetting. +% +% On the other hand if we still typeset in CM or LM then +% \cs{bfdefault} is wrong since it is now saying \texttt{b} and not +% \texttt{bx}. + +% To fix this we run \cs{rmfamily}, \cs{sffamily} or +% \cs{ttfamily} depending on the situation and this will correct +% the setup for us. +% \begin{macrocode} + \expand@font@defaults + \ifx\famdef@ult\rmdef@ult \rmfamily + \else\ifx\famdef@ult\sfdef@ult \sffamily + \else\ifx\famdef@ult\ttdef@ult \ttfamily + \fi\fi\fi +}% +% \end{macrocode} +% \end{macro} +% +% +% +% As the kernel code now implements the same functionality as +% \textsf{mweights}, albeit internally coded slightly differently, +% that package shouldn't be loaded any more. We therefore pretend +% that it already got loaded. Thus, a font package that tries to +% load it and then sets \cs{mdseries@..}, etc.\ will continue to +% work but will now use the kernel code. +% +% Of course, mid-term such package should probably use +% \cs{DeclareFontSeriesDefault} instead of making using low-level +% definitions. +% +% \begin{macrocode} +\expandafter\let\csname ver@mweights.sty\endcsname\fmtversion +% \end{macrocode} +% +% +% +% \begin{macrocode} +% +%\EndIncludeInRelease +%\IncludeInRelease{0000/00/00}% +% {\DeclareFontSeriesDefault}{Custom series}% +% +%\let\DeclareFontSeriesDefault\@undefined +%\let\bfseries@rm\@undefined +%\let\bfseries@sf\@undefined +%\let\bfseries@tt\@undefined +%\let\bfseries@rm@kernel\@undefined +%\let\bfseries@sf@kernel\@undefined +%\let\bfseries@tt@kernel\@undefined +%\let\mdseries@rm\@undefined +%\let\mdseries@sf\@undefined +%\let\mdseries@tt\@undefined +%\let\expand@font@defaults\@undefined +%\expandafter\let\csname ver@mweights.sty\endcsname\@undefined +% +%\DeclareRobustCommand\bfseries +% {\not@math@alphabet\bfseries\mathbf +% \fontseries\bfdefault\selectfont} +%\DeclareRobustCommand\mdseries +% {\not@math@alphabet\mdseries\relax +% \fontseries\mddefault\selectfont} +%\DeclareRobustCommand\rmfamily +% {\not@math@alphabet\rmfamily\mathrm +% \fontfamily\rmdefault\selectfont} +%\DeclareRobustCommand\sffamily +% {\not@math@alphabet\sffamily\mathsf +% \fontfamily\sfdefault\selectfont} +%\DeclareRobustCommand\ttfamily +% {\not@math@alphabet\ttfamily\mathtt +% \fontfamily\ttdefault\selectfont} +% \end{macrocode} +% This is always called in \cs{document} so don't make it undefined. +% \begin{macrocode} +%\let\init@series@setup\relax +% +%\EndIncludeInRelease +%<*2ekernel> +% \end{macrocode} + +% +% +% +% \section{Supporting nested emphasis} +% +% By default \LaTeXe{} supports two levels of nested emphasis: if +% the current font has an upright shape then it switches to +% \cs{itshape} otherwise to \cs{eminnershape} (which defaults to +% \cs{upshape}). This means nested emphasis will ocssilate between +% italic and upright shapes. +% +% Sometimes it would be nice to allow for a more lengthly sequence, +% but instead of providing a fixed one \LaTeX{} now offers a +% general mechanism that allows to define arbitrary sequences. +% +% \DescribeMacro\DeclareEmphSequence +% \DescribeMacro\emforce +% +% This declaration expects a comma separated list of (font) change +% declarations corresponding to increasing levels of emphasis. +% The mechanism tries to be ``smart'' and verifies that the +% declarations actually alter the font. If not it will ignore this +% level and tries the next one---the assumption being that +% there was a manual font change in the document to the font that +% is now supposed to be used for emphasis. Of course, this only +% works if the declarations in the list actually change the font +% and not, say, just the color. +% In such a case one has to use \cs{emforce} to which directs the +% mechanism to use the level even if the font attributes haven't changed. +% +% \DescribeMacro\emreset +% If the nesting is so deep, that the specified levels are +% exhausted then \cs{emreset} is used as a final set of +% declarations (which by default returns +% back to the upright shape). Any additional nesting levels will +% then reuse the list from its beginning. +% +% +% +% \begin{macro}{\DeclareEmphSequence} +% +% \cs{DeclareEmphSequence} expects a clist of declaration. Spaces in the +% argument are dropped to avoid surious spaces in the output. The +% declarations are additive. At the very end the shape is reset +% using |\emreset| and |\emforce| so that this case is never +% skipped.\footnote{Maybe we should not add \cs{emforce} but allow +% that case to be skipped as well. Of course, that might result in +% an endless loop if somebody defines a sequence without any font +% change and without \cs{emforce} but \ldots} +% Further nested calls restart at the beginning. +% \changes{v3.1e}{2019/12/17}{Provide \cs{emph} sequences} +% \begin{macrocode} +% +%<*2ekernel|latexrelease> +%\IncludeInRelease{2020/02/02}% +% {\DeclareEmphSequence}{Nested emph}% +\def\DeclareEmphSequence#1{% + \protected@edef\emfontdeclare@clist{\zap@space#1, \@empty\emforce\emreset}% +} +% \end{macrocode} +% By default the it is empty, in which case \cs{eminnershape} is +% used by \LaTeX. +% \begin{macrocode} +\let\emfontdeclare@clist\@empty +% \end{macrocode} +% \end{macro} + + + +% \begin{macro}{\emrest} +% Reset the font to upright (this needs to undo \texttt{sc} and +% \texttt{it} separately as \cs{upshape} no longer resets both in +% one go). +% \begin{macrocode} +\DeclareRobustCommand\emreset{% + \fontshape{ulc}% in case sc is in use, e.g, changes scit -> it + \fontshape{n}% for all other cases +} +% \end{macrocode} +% We could have used \verb=\fontshape{n}= twice, that would give +% the same result with the default set of shape rules. +% \end{macro} + + + +% \begin{macro}{\em} +% The new definition for \cs{em} (and implicitly \cs{emph} is like +% it was before if \cs{emfontdeclare@clist} is empty. +% \begin{macrocode} +\DeclareRobustCommand\em{% + \@nomath\em + \ifx\emfontdeclare@clist\@empty + \ifdim \fontdimen\@ne\font >\z@ + \eminnershape \else \itshape \fi + \else +% \end{macrocode} +% But if not we use the list to decide how to do emphasis. +% +% We use the current font to check if the declarations have any +% effect, so even a size change is allowed and identified as a +% modification (but a color change, for example, isn't). So first +% we save the current status. +% \begin{macrocode} + \edef\em@currfont{\csname\curr@fontshape/\f@size\endcsname}% +% \end{macrocode} +% Then we grab the next element from the list and check if it can +% be used. +% \begin{macrocode} + \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update + \fi +} +% \end{macrocode} +% +% \begin{macrocode} +\def\eminnershape{\upshape} +% \end{macrocode} +% \end{macro} +% +% +% +% \begin{macro}{\do@emfont@update} +% We know that the list (if not empty) has at least 2 elements +% separated by a comma, so we pick up the first in \texttt{\#1} and +% the rest in \texttt{\#2}. +% \begin{macrocode} +\def\do@emfont@update#1,#2\do@emfont@update{% +% \end{macrocode} +% First action is to alter the list and move the first entry to the end +% \begin{macrocode} + \def\emfontdeclare@clist{#2,#1}% +% \end{macrocode} +% Then we execute current declaration. Appending |\selectfont| means one +% can write just |\fontshape{it}}| and that works then too. +% \begin{macrocode} +% \typeout{Use: \detokenize{#1}}% + #1\selectfont +% \end{macrocode} +% We then compare the current font with our saved version, but with +% a slight twist: we add \cs{em@force} at the end of the +% name. Normally this is empty so has no effect but if there was an +% \cs{emforce} as part of \texttt{\#1} it will append a |/| to the +% font name (making it invalid) thus this will then always fail the +% test. +% +% If the test fails we are done and the declarations will be used. +% Otherwise we will try the next declaration in the sequence. +% \begin{macrocode} + \expandafter\ifx\csname \curr@fontshape/\f@size\em@force +% \end{macrocode} +% For the comparison with \cs{ifx} we have to exand +% \cs{em@currfont} once as the relevant info is inside. +% \begin{macrocode} + \expandafter\endcsname + \em@currfont + \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update +% \end{macrocode} +% If \cs{emforce} was used, we have to undo its effect: +% \begin{macrocode} + \else + \let\em@force\@empty + \fi +} +% \end{macrocode} +% \end{macro} + + + +% \begin{macro}{\emforce} +% \begin{macro}{\em@force} +% The definition of \cs{emforce} is simple: change \cs{em@force} to +% make the above test always invalid. +% \begin{macrocode} +\protected\def\emforce{\def\em@force{/}} +\let\em@force\@empty +% +%\EndIncludeInRelease +% \end{macrocode} +% \end{macro} +% \end{macro} + + + % % \begin{macro}{\em} % \changes{v1.2b}{1990/01/28}{Call to \cs{@nomath} added.} % \changes{v3.1a}{2015/01/09}{Allow \cs{emph} to produce small caps (latexrelease)} % \begin{macro}{\eminnershape} % \changes{v3.1a}{2015/01/09}{macro added (latexrelease)} +% +% These are the older definitions for \cs{em}, prior to 2020. +% % We also have to define the {\em emphasize\/} font change command % (i.e.\ |\em|). This command will look is the current font is % sloped (i.e.\ has a positive |\fontdimen1|) and will then % select either |\upshape| or |\itshape|. % \begin{macrocode} -% -%\IncludeInRelease{2015/01/01}{\eminnershape}{\eminnershape}% -%<*2ekernel|latexrelease> -\DeclareRobustCommand\em - {\@nomath\em \ifdim \fontdimen\@ne\font >\z@ - \eminnershape \else \itshape \fi}% -% \end{macrocode} -% -% \begin{macrocode} -\def\eminnershape{\upshape}% -% +%\IncludeInRelease{2015/01/01}{\DeclareEmphSequence}{Nested emph}% +%\let\DeclareEmphSequence\@undefined +%\let\emfontdeclare@clist\@undefined +%\let\emreset\@undefined +%\let\do@emfont@update\@undefined +%\let\emforce\@undefined +%\let\em@force\@undefined +% +%\DeclareRobustCommand\em +% {\@nomath\em \ifdim \fontdimen\@ne\font >\z@ +% \eminnershape \else \itshape \fi}% %\EndIncludeInRelease -%\IncludeInRelease{0000/00/00}{\eminnershape}{\eminnershape}% +% +%\IncludeInRelease{0000/00/00}{\DeclareEmphSequence}{Nested emph}% %\DeclareRobustCommand\em % {\@nomath\em \ifdim \fontdimen\@ne\font >\z@ % \upshape \else \itshape \fi}% @@ -230,6 +953,12 @@ % \end{macro} % % + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% % \begin{macro}{\not@math@alphabet} % This function generates an error message when it is called in % math mode. The same function should be defined in @@ -528,6 +1257,7 @@ \let\@addtofilelist\@gobble % \end{macrocode} % +% % Ditto for math although I don't think that we will get a lot of % customisation :-) % \begin{macrocode} diff --git a/base/ltoutenc.dtx b/base/ltoutenc.dtx index 39e288956..eed613de2 100644 --- a/base/ltoutenc.dtx +++ b/base/ltoutenc.dtx @@ -45,7 +45,7 @@ %<*driver> % \fi \ProvidesFile{ltoutenc.dtx} - [2019/11/22 v2.0l LaTeX Kernel (font encodings)] + [2019/12/18 v2.0m LaTeX Kernel (font encodings)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltoutenc.dtx} @@ -834,8 +834,23 @@ % {Explicitly set \cs{spacefactor} after \cs{accent} (pr/2877)} % \begin{macrocode} \global\mathchardef\accent@spacefactor\spacefactor}% +% \end{macrocode} +% The accent primitive doesn't allow things \cs{begingroup} to +% interfere between accent and base character. Therefore we need to +% avoid that (they are some hidden inside \cs{maybe@load@fontshape}). +% As we don't have to load the fontshape in this case +% (as that happened in the box above if necessary, we simply +% disable that part of the code temporaily. +% We also ignore \cs{ignorespaces} which has the same issue and may +% show up as part of \cs{normalfont} if that is used. +% \changes{v2.0m}{2019/12/18}{Avoid code that breaks \cs{accent}} +% \begin{macrocode} + \let\maybe@load@fontshape\relax + \let\ignorespaces\relax \accent#1 #2\egroup\spacefactor\accent@spacefactor} % \end{macrocode} +% +% % Default definition for |\accent@spacefactor| prevents a horrible % death of the above macro inside an unprotected |\edef|. % \changes{v1.9w}{1999/10/28}{Give \cs{accent@spacefactor} a default diff --git a/base/testfiles-search/tlb-nfssaxes-002.lvt b/base/testfiles-search/tlb-nfssaxes-002.lvt index ba6fbae04..e92c5aa08 100644 --- a/base/testfiles-search/tlb-nfssaxes-002.lvt +++ b/base/testfiles-search/tlb-nfssaxes-002.lvt @@ -27,7 +27,7 @@ \typeout{extended nesting of emph using it,n+sc,it+sc} -\emfontdeclare{\fontshape{it},\fontshape{n}\fontshape{sc},\fontshape{it}} +\DeclareEmphSequence{\fontshape{it},\fontshape{n}\fontshape{sc},\fontshape{it}} \emph{ Foo \showresult{shape}{} @@ -44,7 +44,7 @@ \fontencoding{T1}\fontfamily{lmr}\selectfont -\emfontdeclare{\fontshape{it},\fontshape{n}\fontshape{sc},\fontshape{it}} +\DeclareEmphSequence{\fontshape{it},\fontshape{n}\fontshape{sc},\fontshape{it}} \emph{ Foo \showresult{shape}{} \emph{ Bar \showresult{shape}{} diff --git a/base/testfiles-search/tlb-nfssaxes-004.lvt b/base/testfiles-search/tlb-nfssaxes-004.lvt index 3604a5644..eb360a9fb 100644 --- a/base/testfiles-search/tlb-nfssaxes-004.lvt +++ b/base/testfiles-search/tlb-nfssaxes-004.lvt @@ -3,7 +3,7 @@ \input{test2e} % \usepackage{color} -% instead of loading color de do +% instead of loading color we do \DeclareRobustCommand\color[1]{\def\currentcolor{#1}} \color{black} @@ -23,7 +23,7 @@ \emph{\showfont fifth}}}}} \typeout{========== it, sc, scit ==========} -\emfontdeclare{\itshape,\upshape\scshape,\itshape} +\DeclareEmphSequence{\itshape,\upshape\scshape,\itshape} \emph{\showfont First \emph{\showfont second \emph{\showfont third @@ -33,7 +33,7 @@ \typeout{========== it, sc, scit, but with supported font ==========} \fontfamily{qpl}\selectfont -\emfontdeclare{\itshape,\upshape\scshape,\itshape} +\DeclareEmphSequence{\itshape,\upshape\scshape,\itshape} \emph{\showfont First \emph{\showfont second \emph{\showfont third @@ -43,7 +43,7 @@ \typeout{========== it, sc, scit, but it already used ==========} -\emfontdeclare{\itshape,\upshape\scshape,\itshape} +\DeclareEmphSequence{\itshape,\upshape\scshape,\itshape} \textit{% italics already in force \emph{\showfont First \emph{\showfont second @@ -53,7 +53,7 @@ } \typeout{========== it, blue, bf, sc (but without \string\emforce) ==========} -\emfontdeclare{\itshape,\color{blue},\bfseries,\color{black}\scshape} +\DeclareEmphSequence{\itshape,\color{blue},\bfseries,\color{black}\scshape} \emph{\showfont First \emph{\showfont second \emph{\showfont third @@ -63,7 +63,7 @@ \typeout{========== it, blue, bf, sc (now with \string\emforce) ==========} -\emfontdeclare{\itshape,\color{blue}\emforce,\bfseries,\color{black}\scshape} +\DeclareEmphSequence{\itshape,\color{blue}\emforce,\bfseries,\color{black}\scshape} \emph{\showfont First \emph{\showfont second \emph{\showfont third diff --git a/base/testfiles/tlb-latexrelease-003.luatex.tlg b/base/testfiles/tlb-latexrelease-003.luatex.tlg index 100546422..a667b2ae0 100644 --- a/base/testfiles/tlb-latexrelease-003.luatex.tlg +++ b/base/testfiles/tlb-latexrelease-003.luatex.tlg @@ -182,15 +182,31 @@ Skipping: [....-..-..] Make math delimiters robust on input line .... Applying: [....-..-..] Make math delimiters robust on input line .... Skipping: [....-..-..] make delimiters robust on input line .... Applying: [....-..-..] make delimiters robust on input line .... -Skipping: [....-..-..] \eminnershape on input line .... -Applying: [....-..-..] \eminnershape on input line .... +Skipping: [....-..-..] Custom series on input line .... +Applying: [....-..-..] Custom series on input line .... +LaTeX Info: Redefining \bfseries on input line .... +LaTeX Info: Redefining \mdseries on input line .... +LaTeX Info: Redefining \rmfamily on input line .... +LaTeX Info: Redefining \sffamily on input line .... +LaTeX Info: Redefining \ttfamily on input line .... +Skipping: [....-..-..] Nested emph on input line .... +Skipping: [....-..-..] Nested emph on input line .... +Applying: [....-..-..] Nested emph on input line .... LaTeX Info: Redefining \em on input line .... Skipping: [....-..-..] TU encoding default on input line .... Applying: [....-..-..] TU encoding default on input line .... +Skipping: [....-..-..] font defaults change on input line .... +Applying: [....-..-..] font defaults change on input line .... Skipping: [....-..-..] Start LR-mode on input line .... Applying: [....-..-..] Start LR-mode on input line .... +Skipping: [....-..-..] Additional text commands on input line .... +Applying: [....-..-..] Additional text commands 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 .... +Applying: [....-..-..] Loading .fd files on input line .... +Skipping: [....-..-..] Provide family substituation on input line .... +Applying: [....-..-..] Provide family substituation on input line .... Skipping: [....-..-..] No side effects please on input line .... Applying: [....-..-..] No side effects please on input line .... Skipping: [....-..-..] Font substituation in preamble on input line .... @@ -492,19 +508,35 @@ Applying: [....-..-..] Make math delimiters robust on input line .... Already applied: [....-..-..] Make math delimiters robust on input line .... Applying: [....-..-..] make delimiters robust on input line .... Already applied: [....-..-..] make delimiters robust on input line .... -Applying: [....-..-..] \eminnershape on input line .... +Skipping: [....-..-..] Custom series on input line .... +Applying: [....-..-..] Custom series on input line .... +LaTeX Info: Redefining \bfseries on input line .... +LaTeX Info: Redefining \mdseries on input line .... +LaTeX Info: Redefining \rmfamily on input line .... +LaTeX Info: Redefining \sffamily on input line .... +LaTeX Info: Redefining \ttfamily on input line .... +Skipping: [....-..-..] Nested emph on input line .... +Applying: [....-..-..] Nested emph on input line .... LaTeX Info: Redefining \em on input line .... -Already applied: [....-..-..] \eminnershape on input line .... +Already applied: [....-..-..] Nested emph on input line .... Applying: [....-..-..] TU encoding default on input line .... Already applied: [....-..-..] TU encoding default on input line .... +Skipping: [....-..-..] font defaults change on input line .... +Applying: [....-..-..] font defaults change on input line .... Applying: [....-..-..] Start LR-mode on input line .... LaTeX Info: Redefining \big on input line .... LaTeX Info: Redefining \Big on input line .... LaTeX Info: Redefining \bigg on input line .... LaTeX Info: Redefining \Bigg on input line .... Already applied: [....-..-..] Start LR-mode on input line .... +Skipping: [....-..-..] Additional text commands on input line .... +Applying: [....-..-..] Additional text commands 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 .... +Applying: [....-..-..] Loading .fd files on input line .... +Skipping: [....-..-..] Provide family substituation on input line .... +Applying: [....-..-..] Provide family substituation on input line .... Applying: [....-..-..] No side effects please on input line .... Already applied: [....-..-..] No side effects please on input line .... Applying: [....-..-..] Font substituation in preamble on input line .... diff --git a/base/testfiles/tlb-latexrelease-003.tlg b/base/testfiles/tlb-latexrelease-003.tlg index 2b0283b0f..ec558e78c 100644 --- a/base/testfiles/tlb-latexrelease-003.tlg +++ b/base/testfiles/tlb-latexrelease-003.tlg @@ -180,15 +180,31 @@ Skipping: [....-..-..] Make math delimiters robust on input line .... Applying: [....-..-..] Make math delimiters robust on input line .... Skipping: [....-..-..] make delimiters robust on input line .... Applying: [....-..-..] make delimiters robust on input line .... -Skipping: [....-..-..] \eminnershape on input line .... -Applying: [....-..-..] \eminnershape on input line .... +Skipping: [....-..-..] Custom series on input line .... +Applying: [....-..-..] Custom series on input line .... +LaTeX Info: Redefining \bfseries on input line .... +LaTeX Info: Redefining \mdseries on input line .... +LaTeX Info: Redefining \rmfamily on input line .... +LaTeX Info: Redefining \sffamily on input line .... +LaTeX Info: Redefining \ttfamily on input line .... +Skipping: [....-..-..] Nested emph on input line .... +Skipping: [....-..-..] Nested emph on input line .... +Applying: [....-..-..] Nested emph on input line .... LaTeX Info: Redefining \em on input line .... Skipping: [....-..-..] TU encoding default on input line .... Applying: [....-..-..] TU encoding default on input line .... +Skipping: [....-..-..] font defaults change on input line .... +Applying: [....-..-..] font defaults change on input line .... Skipping: [....-..-..] Start LR-mode on input line .... Applying: [....-..-..] Start LR-mode on input line .... +Skipping: [....-..-..] Additional text commands on input line .... +Applying: [....-..-..] Additional text commands 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 .... +Applying: [....-..-..] Loading .fd files on input line .... +Skipping: [....-..-..] Provide family substituation on input line .... +Applying: [....-..-..] Provide family substituation on input line .... Skipping: [....-..-..] No side effects please on input line .... Applying: [....-..-..] No side effects please on input line .... Skipping: [....-..-..] Font substituation in preamble on input line .... @@ -484,19 +500,35 @@ Applying: [....-..-..] Make math delimiters robust on input line .... Already applied: [....-..-..] Make math delimiters robust on input line .... Applying: [....-..-..] make delimiters robust on input line .... Already applied: [....-..-..] make delimiters robust on input line .... -Applying: [....-..-..] \eminnershape on input line .... +Skipping: [....-..-..] Custom series on input line .... +Applying: [....-..-..] Custom series on input line .... +LaTeX Info: Redefining \bfseries on input line .... +LaTeX Info: Redefining \mdseries on input line .... +LaTeX Info: Redefining \rmfamily on input line .... +LaTeX Info: Redefining \sffamily on input line .... +LaTeX Info: Redefining \ttfamily on input line .... +Skipping: [....-..-..] Nested emph on input line .... +Applying: [....-..-..] Nested emph on input line .... LaTeX Info: Redefining \em on input line .... -Already applied: [....-..-..] \eminnershape on input line .... +Already applied: [....-..-..] Nested emph on input line .... Applying: [....-..-..] TU encoding default on input line .... Already applied: [....-..-..] TU encoding default on input line .... +Skipping: [....-..-..] font defaults change on input line .... +Applying: [....-..-..] font defaults change on input line .... Applying: [....-..-..] Start LR-mode on input line .... LaTeX Info: Redefining \big on input line .... LaTeX Info: Redefining \Big on input line .... LaTeX Info: Redefining \bigg on input line .... LaTeX Info: Redefining \Bigg on input line .... Already applied: [....-..-..] Start LR-mode on input line .... +Skipping: [....-..-..] Additional text commands on input line .... +Applying: [....-..-..] Additional text commands 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 .... +Applying: [....-..-..] Loading .fd files on input line .... +Skipping: [....-..-..] Provide family substituation on input line .... +Applying: [....-..-..] Provide family substituation on input line .... Applying: [....-..-..] No side effects please on input line .... Already applied: [....-..-..] No side effects please on input line .... Applying: [....-..-..] Font substituation in preamble on input line .... diff --git a/base/testfiles/tlb-latexrelease-003.xetex.tlg b/base/testfiles/tlb-latexrelease-003.xetex.tlg index 9b6502683..92665246a 100644 --- a/base/testfiles/tlb-latexrelease-003.xetex.tlg +++ b/base/testfiles/tlb-latexrelease-003.xetex.tlg @@ -180,15 +180,31 @@ Skipping: [....-..-..] Make math delimiters robust on input line .... Applying: [....-..-..] Make math delimiters robust on input line .... Skipping: [....-..-..] make delimiters robust on input line .... Applying: [....-..-..] make delimiters robust on input line .... -Skipping: [....-..-..] \eminnershape on input line .... -Applying: [....-..-..] \eminnershape on input line .... +Skipping: [....-..-..] Custom series on input line .... +Applying: [....-..-..] Custom series on input line .... +LaTeX Info: Redefining \bfseries on input line .... +LaTeX Info: Redefining \mdseries on input line .... +LaTeX Info: Redefining \rmfamily on input line .... +LaTeX Info: Redefining \sffamily on input line .... +LaTeX Info: Redefining \ttfamily on input line .... +Skipping: [....-..-..] Nested emph on input line .... +Skipping: [....-..-..] Nested emph on input line .... +Applying: [....-..-..] Nested emph on input line .... LaTeX Info: Redefining \em on input line .... Skipping: [....-..-..] TU encoding default on input line .... Applying: [....-..-..] TU encoding default on input line .... +Skipping: [....-..-..] font defaults change on input line .... +Applying: [....-..-..] font defaults change on input line .... Skipping: [....-..-..] Start LR-mode on input line .... Applying: [....-..-..] Start LR-mode on input line .... +Skipping: [....-..-..] Additional text commands on input line .... +Applying: [....-..-..] Additional text commands 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 .... +Applying: [....-..-..] Loading .fd files on input line .... +Skipping: [....-..-..] Provide family substituation on input line .... +Applying: [....-..-..] Provide family substituation on input line .... Skipping: [....-..-..] No side effects please on input line .... Applying: [....-..-..] No side effects please on input line .... Skipping: [....-..-..] Font substituation in preamble on input line .... @@ -493,19 +509,35 @@ Applying: [....-..-..] Make math delimiters robust on input line .... Already applied: [....-..-..] Make math delimiters robust on input line .... Applying: [....-..-..] make delimiters robust on input line .... Already applied: [....-..-..] make delimiters robust on input line .... -Applying: [....-..-..] \eminnershape on input line .... +Skipping: [....-..-..] Custom series on input line .... +Applying: [....-..-..] Custom series on input line .... +LaTeX Info: Redefining \bfseries on input line .... +LaTeX Info: Redefining \mdseries on input line .... +LaTeX Info: Redefining \rmfamily on input line .... +LaTeX Info: Redefining \sffamily on input line .... +LaTeX Info: Redefining \ttfamily on input line .... +Skipping: [....-..-..] Nested emph on input line .... +Applying: [....-..-..] Nested emph on input line .... LaTeX Info: Redefining \em on input line .... -Already applied: [....-..-..] \eminnershape on input line .... +Already applied: [....-..-..] Nested emph on input line .... Applying: [....-..-..] TU encoding default on input line .... Already applied: [....-..-..] TU encoding default on input line .... +Skipping: [....-..-..] font defaults change on input line .... +Applying: [....-..-..] font defaults change on input line .... Applying: [....-..-..] Start LR-mode on input line .... LaTeX Info: Redefining \big on input line .... LaTeX Info: Redefining \Big on input line .... LaTeX Info: Redefining \bigg on input line .... LaTeX Info: Redefining \Bigg on input line .... Already applied: [....-..-..] Start LR-mode on input line .... +Skipping: [....-..-..] Additional text commands on input line .... +Applying: [....-..-..] Additional text commands 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 .... +Applying: [....-..-..] Loading .fd files on input line .... +Skipping: [....-..-..] Provide family substituation on input line .... +Applying: [....-..-..] Provide family substituation on input line .... Applying: [....-..-..] No side effects please on input line .... Already applied: [....-..-..] No side effects please on input line .... Applying: [....-..-..] Font substituation in preamble on input line .... From fb61dd4c4700bd64befe5fac5588d83bd03bb4e2 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Wed, 18 Dec 2019 16:23:27 +0100 Subject: [PATCH 53/55] l3news31 updates (and \textnormalshape dropped) --- base/doc/ltnews31.tex | 43 ++++++++++++++++++++++++++++++++++++++----- base/ltfntcmd.dtx | 3 --- base/ltfssaxes.dtx | 4 ++-- base/ltfssbas.dtx | 2 +- base/ltfssini.dtx | 13 ++++--------- 5 files changed, 45 insertions(+), 20 deletions(-) diff --git a/base/doc/ltnews31.tex b/base/doc/ltnews31.tex index 96c040b0c..30893ce77 100644 --- a/base/doc/ltnews31.tex +++ b/base/doc/ltnews31.tex @@ -192,10 +192,15 @@ \section{Experiences with the \LaTeX\texttt{-dev} formats} \emph{write} -In TeXLive 2020 the Lua\LaTeX{} format will use the new LuaHB\TeX{} engine, which is Lua\TeX{} with an embedded HarfBuzz library. -HarfBuzz can be used by setting a suitable renderer in the font declaration. An interface for that is provided by \pkg{fontspec}. -This additional font renderer will greatly improve the shaping of various scripts, which are currently handled correctly only by \XeTeX{}. -To simplify the testing of the new engine, binaries have been added to MiKTeX and TeXLive 2019 and both have changed the Lua\LaTeX-dev format to use it. +In TeXLive 2020 the Lua\LaTeX{} format will use the new LuaHB\TeX{} +engine, which is Lua\TeX{} with an embedded HarfBuzz library. +HarfBuzz can be used by setting a suitable renderer in the font +declaration. An interface for that is provided by \pkg{fontspec}. +This additional font renderer will greatly improve the shaping of +various scripts, which are currently handled correctly only by +\XeTeX{}. To simplify the testing of the new engine, binaries have +been added to MiKTeX and TeXLive 2019 and both have changed the +Lua\LaTeX-dev format to use it. \section{Improved load-times for \pkg{expl3}} @@ -241,8 +246,36 @@ \section{Extending the series management with NFSS} \section{Emphasis handling generalized} -\emph{write} +With previous releases of \LaTeX{} nested \cs{emph} commands +automatically alternated between italics and upright. This mechanism +has now been generalized and you can now specify for arbitrary nesting +levels how emphasis should be handled. +The declaration \cs{DeclareEmphSequence} expects a comma separated +list of font declarations corresponding to increasing levels of +emphasis. For example, +\begin{verbatim} + \DeclareEmphSequence{\itshape,% + \upshape\scshape,\itshape} +\end{verbatim} +uses italics for the first, small capitals for the second, and italic +small capitals for the third level (provided you use a font that +supports these shapes). If there are a more nesting levels than +provided, \LaTeX{} uses the declarations stored in \cs{emreset} (by +default \cs{ulcshape}\cs{upshape}) for the next level and then +restarts the list. + +The mechanism tries to be \enquote{smart} and verifies that the given +declarations actually alter the current font. If not it continues and +tries the next level---the assumption being that there was already a +manual font change in the document to the font that is now supposed to +be used for emphasis. +% +Of course, this only works if the declarations in the list entries +actually change the font and not, for example, just the color. In such +a scenario one has to add \cs{emforce} to the entry which directs the +mechanism to use the level, even if the font attributes appear to be +unchanged. diff --git a/base/ltfntcmd.dtx b/base/ltfntcmd.dtx index ec86c5770..443cd0a66 100644 --- a/base/ltfntcmd.dtx +++ b/base/ltfntcmd.dtx @@ -396,7 +396,6 @@ % \begin{macro}{textulc} % \begin{macro}{textsw} % \begin{macro}{textssc} -% \begin{macro}{textnormalshape} % % \changes{v3.4c}{2019/12/17}{Macro added} % \begin{macrocode} @@ -407,7 +406,6 @@ \DeclareTextFontCommand{\textulc}{\ulcshape} \DeclareTextFontCommand{\textsw}{\swshape} \DeclareTextFontCommand{\textssc}{\sscshape} -\DeclareTextFontCommand{\textnormalshape}{\normalshape} % %\EndIncludeInRelease %\IncludeInRelease{0000/00/00}% @@ -416,7 +414,6 @@ %\let\textulc\@undefined %\let\textsw\@undefined %\let\textssc\@undefined -%\let\textnormalshape\@undefined %\EndIncludeInRelease %<*2ekernel> % \end{macrocode} diff --git a/base/ltfssaxes.dtx b/base/ltfssaxes.dtx index bfca785eb..225cf6496 100644 --- a/base/ltfssaxes.dtx +++ b/base/ltfssaxes.dtx @@ -868,8 +868,8 @@ % resets everything and \texttt{up} changes italic or slanted to % upright and \texttt{ulc} undoes small caps. % -% So we now offer -% \cs{normalshape} and \cs{textnormalshape}. +% So we now offer \cs{normalshape} (using \cs{shapedefault} which is normally the same as +% calling both \cs{ulcshape} and \cs{upshape}, only more efficient. % % % \begin{macro}{\ulcshape} diff --git a/base/ltfssbas.dtx b/base/ltfssbas.dtx index 26885e902..50b90f1d0 100644 --- a/base/ltfssbas.dtx +++ b/base/ltfssbas.dtx @@ -1331,7 +1331,7 @@ % \DeclareFontFamilySubstitution{LGR}{qpl}{udidot} %\end{verbatim} % This way if you ask for the \texttt{LGR} encoding in for the -% \textt{qpl} family you get the characters from the +% \texttt{qpl} family you get the characters from the % \texttt{udidot} family substituted. % % We need to ensure that the macro is defined with diff --git a/base/ltfssini.dtx b/base/ltfssini.dtx index f44496c73..c0fdfe20d 100644 --- a/base/ltfssini.dtx +++ b/base/ltfssini.dtx @@ -802,17 +802,12 @@ % \begin{macro}{\emrest} -% Reset the font to upright (this needs to undo \texttt{sc} and -% \texttt{it} separately as \cs{upshape} no longer resets both in -% one go). +% Reset the font to upright and upper/lower case. With the default rules +% using \cs{shapedefault} does that for us but to be on the safe side we +% do it like this: % \begin{macrocode} -\DeclareRobustCommand\emreset{% - \fontshape{ulc}% in case sc is in use, e.g, changes scit -> it - \fontshape{n}% for all other cases -} +\DeclareRobustCommand\emreset{\upshape\ulcshape} % \end{macrocode} -% We could have used \verb=\fontshape{n}= twice, that would give -% the same result with the default set of shape rules. % \end{macro} From 5d0802c5b1d9ec06a4c87e9c86a19d194bcda11f Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Thu, 19 Dec 2019 09:14:20 +0100 Subject: [PATCH 54/55] leftover \end{macro} --- base/ltfntcmd.dtx | 1 - 1 file changed, 1 deletion(-) diff --git a/base/ltfntcmd.dtx b/base/ltfntcmd.dtx index 443cd0a66..8f0683029 100644 --- a/base/ltfntcmd.dtx +++ b/base/ltfntcmd.dtx @@ -420,7 +420,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} % % \begin{macro}{\emph} % \changes{v3.0a}{1993/12/11}{Macro changed} From f36b92b21b42e955a41392546e56c720480b85a8 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Fri, 20 Dec 2019 12:12:57 +0100 Subject: [PATCH 55/55] documentation for the new features in ltnews31 --- base/changes.txt | 8 +- base/doc/ltnews31.tex | 174 +++++++++++++++++++++++++++++++++++++++--- base/ltfssbas.dtx | 2 +- 3 files changed, 168 insertions(+), 16 deletions(-) diff --git a/base/changes.txt b/base/changes.txt index 3c5cc90c4..7134417fc 100644 --- a/base/changes.txt +++ b/base/changes.txt @@ -13,16 +13,18 @@ are not part of the distribution. * fontdef.dtx (subsection{Defaults}): Set \shapedefault explicitly to "n" not \updefault \bfdefault set to to "b" not "bx" (but bx for CM fonts) - \updefault set to to "up" not "n" + \updefault set to to "up" not "n". + Part of extending the series and shape handling, see ltnews31. 2019-12-17 Frank Mittelbach * ltfssini.dtx (section{Supporting nested emphasis}): Support nested \emph sequences a generalization \eminnershape. See ltnews31 for details. - * ltfssini.dtx (section{Custom series settings for main document families}): - Provide custom series settings a la mweights + * ltfssini.dtx (section{Custom series settings for main document families}): + Provide custom series settings a la mweights package. + See ltnews31 for details. 2019-12-17 Frank Mittelbach diff --git a/base/doc/ltnews31.tex b/base/doc/ltnews31.tex index 30893ce77..ad65dd5c6 100644 --- a/base/doc/ltnews31.tex +++ b/base/doc/ltnews31.tex @@ -232,19 +232,144 @@ \section{Improved load-times for \pkg{expl3}} -\section{Extending the shape management with NFSS} - -\emph{write} - - - -\section{Extending the series management with NFSS} - -\emph{write} - +\section{Improvements to \LaTeX{}'s font selection mechanisms (NFSS)} + + +\subsection{Extending the shape management of NFSS} + +Over time more and more fonts have become available for use with +\LaTeX{}. Many such font families offer additional shapes, e.g., small +caps italics (\texttt{scit}), small caps slanted (\texttt{scsl} or +swash letters (\texttt{sw}). By using \cs{fontshape} those shapes can +be explicitly selected and for the swash letter shapes there is also +\cs{swshape} and \cs{textsw} available. + +In the original font selection implementation a request to new shape +always a canceled the current one. With the 2020 release of \LaTeX{} +this has changed and \cs{fontshape} can now be used to combine small +capitals with italics, slanted or swash letters, either by explicitly +asking for \texttt{scit}, etc., or by asking for italics when typesetting +already in small caps and so forth. + +Using \cs{upshape} will still change italics or slanted back to an +upright shape but will not any longer alter the small caps setting. To +change small capitals back to upper/lower case you can now use +\cs{ulcshape} (or \cs{textulc}) which in turn will not change the font +with respect to italics, slanted or swash. Finally, if you want to +reset the shape back to normal you can use \cs{normalshape} which is a +shorthand for \cs{upshape}\cs{ulcshape}. + +The way how shapes combine with each other is not hardwired but is +customizable and extensible if there is ever a need for it. The +mappings are defined through \cs{DeclareFontShapeChangeRule} and the +details for developers are documented in \texttt{source2e.pdf}. + +The ideas for this interface extension has been pioneered in +\pkg{fontspec} by Will Roberson for Unicode engines and in +\pkg{fontaxes} by Andreas Bühmann and Michael Ummels for \pdfTeX{} and +used in many font support packages. + + + +\subsection{Extending the series management of NFSS} + +Many of the the newer font families also come provided with additional +weights (thin, semi-bold, ultra-bold, etc.\@) or several running lengths +such a condensed or extra-condensed. In some cases the number of +different series values is really impressive, for example, Noto Sans +offers 36 from ultra-light extra condensed to ultra-bold medium width. + +Already in its original design NFSS supported 9 weight levels from +ultra-light (\texttt{ul}) to ultra-bold (\texttt{ub}) and also 9 width +levels from ultra-condensed (\texttt{uc}) to ultra-expanded +(\texttt{ux}) so more than enough even for a font family like Noto +Sans. Unfortunately, some font support packages nevertheless invented +their own names so in the last years you could find all kind of +non-standard series names like \texttt{k}, \texttt{i}, \texttt{j} and +others making it impossible to combine different fonts successfully +using the standard NFSS mechanisms. + +Over the course of the last year a small number of individuals, +notably, Bob Tennent, Michael Sharpe and Marc Penninga worked hard to +bring this unsatisfying situation back under control and today we are +happy to report and the internal font support files for more than a +hundred font families are back to follow the standard NFSS conventions +so that combing them is now again rather nice and easy (of course, +there is still the task of choosing combinations that visually work +well together, but from a technical perspective they can now easily +matched). + + +In the original font selection implementation a request to series +always canceled the current one. This was reasonable because there +were nearly no fonts available that offered anything other than a +medium or a bold series. Now that this has changed and families such +as Noto Sans are available, combing weight and width into a single +attribute is no longer appropriate. With the 2020 release of \LaTeX{} +the series management therefore changed to allow for independently +setting the weight and the width attribute of the series. + +For most users this change will be largely transparent as \LaTeX{} +offers only \cs{textbf} or \cs{bfseries} to select a bolder face (and +\cs{textmd} and \cs{mdseries} to return to a medium series) but no +high-level command for selecting a condensed face, etc. However, with +the NFSS low-level interface, it is now possible to ask for, say, +\verb=\fontseries{c}\selectfont= in a marginal note to get a condensed +face and that would still allow using \cs{textbf} inside. This then would +select a bold condensed face and not a rather odd-looking +bold-extended face in the middle of condensed type. + +The expectation is that this is largely used by class and package +designers, but given that the low-level NFSS commands are usable on +the document level and not really difficult to apply, there are +probably also a number of users who will enjoy using the new +possibilities that bring \LaTeX{} back into the front league when it +comes to font usage. + +The way how different series values combine with each other is not +hardwired but is again customizable and extensible. The mappings are +defined through \cs{DeclareFontSeriesChangeRule} and the details for +developers are documented in \texttt{source2e.pdf}. + + +%\[ * \quad * \quad * \] + +\subsection{Font series defaults per document family} + +With additional weights and widths available in many font families it +becomes more likely that somebody wants to match, say, a medium weight +serif family with a semi-light sans serif family or that with one +family one wants to use the bold-extend face when \cs{textbf} is used +while with another it should be bold (not extended) or semibold, etc. + +In the past this kind of extension was made available with the +\pkg{mweights} package by Bob Tennent which has been used in many font +support packages. + +With the 2020 release of \LaTeX{} this feature is now available out +of the box. In addition we also offer a document-level interface to adjust the +behavior high-level series commands \cs{textbf}, \cs{textmd} and their +declaration forms \cs{bfseries} and \cs{mdseries} so that they can +have different effects for the serif, sans serif and typewriter +families used in a document. + +For example, specifying +\begin{verbatim} + \DeclareFontSeriesDefault[rm]{bf}{sb} + \DeclareFontSeriesDefault[tt]{md}{lc} +\end{verbatim} +in the document preamble would result in \cs{textbf} producing +semi-bold (\texttt{sb}) when typesetting in roman typeface and second +declaration means that typewriter is by default (medium series) using +a light-condensed face. The optional argument here can be either +\texttt{rm}, \texttt{sf} or \texttt{tt} to indicate one of the three +main font families in a document; if omitted you will change the +overall document default instead. In the first mandatory argument you +specify either \texttt{md} or \texttt{bf} and the second mandatory +argument then gives the desired series value in NFSS nomenclature. -\section{Emphasis handling generalized} +\subsection{Emphasis handling generalized} With previous releases of \LaTeX{} nested \cs{emph} commands automatically alternated between italics and upright. This mechanism @@ -258,7 +383,7 @@ \section{Emphasis handling generalized} \DeclareEmphSequence{\itshape,% \upshape\scshape,\itshape} \end{verbatim} -uses italics for the first, small capitals for the second, and italic +uses italics for the first, small capitals for the second, and italic small capitals for the third level (provided you use a font that supports these shapes). If there are a more nesting levels than provided, \LaTeX{} uses the declarations stored in \cs{emreset} (by @@ -279,6 +404,31 @@ \section{Emphasis handling generalized} +\subsection{Providing font family substitutions} + +Given that \pdfTeX{} can only handle fonts with up to 256 glyphs a +single font encoding can only support a few languages. The \texttt{T1} +encoding, for example, does support many of the Latin based scripts, +but if you want to write in Greek or Russian you need to switch +encodings to \texttt{LGR} or \texttt{T2A}. Given that not every font +family offers glyphs in such encodings, you may end up with some +default family (e.g., Computer Modern) that doesn’t blend in well +chosen document font. For such cases NFSS now offers +\cs{DeclareFontFamilySubstitution}, for example: +\begin{verbatim} + \DeclareFontFamilySubstitution{LGR} + {Montserrat-LF}{IBMPlexSans-TLF} +\end{verbatim} +tells \LaTeX{} that if you are typesetting in the sans serif font +\texttt{Montserrat-LF} and the Greek encoding \texttt{LGR} is asked +for, then \LaTeX{} should use \texttt{IBMPlexSans-TLF} to fulfill the +encoding request. + +The code is based on ideas from the \texttt{substitutefont} +package by Günter Milde, but implemented differently. + + + \section{Other changes to the \LaTeX{} kernel} \emph{added \texttt{alias} size function} diff --git a/base/ltfssbas.dtx b/base/ltfssbas.dtx index 50b90f1d0..8f8bf638c 100644 --- a/base/ltfssbas.dtx +++ b/base/ltfssbas.dtx @@ -1320,7 +1320,7 @@ % \begin{macro}{\DeclareFontFamilySubstitution} % The idea for this macro is stolen from the \texttt{substitutefont} -% package, with some modifications and a new name. +% package by Günter Milde, with some modifications and a new name. % % Its purpose is to provide characters in a special encoding tht % are not available in the current font family to be taken from a