[latex3-commits] [git/LaTeX3-latex3-latex2e] nfssaxes: more documentation, more tests and dropping unnecessary shape rules (2e5635d6)
Frank Mittelbach
frank.mittelbach at latex-project.org
Fri Oct 11 17:10:30 CEST 2019
Repository : https://github.com/latex3/latex2e
On branch : nfssaxes
Link : https://github.com/latex3/latex2e/commit/2e5635d6a3fa76a842e647c6e8632c5be82fcc90
>---------------------------------------------------------------
commit 2e5635d6a3fa76a842e647c6e8632c5be82fcc90
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Fri Oct 11 17:10:30 2019 +0200
more documentation, more tests and dropping unnecessary shape rules
>---------------------------------------------------------------
2e5635d6a3fa76a842e647c6e8632c5be82fcc90
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 2021e50e..6c1e2953 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 4346cfb5..7f21036a 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 60f05516..18a1fde0 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
More information about the latex3-commits
mailing list