[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: fixed leftover \substdefault and added a test to check that case (02312cd7)

Frank Mittelbach frank.mittelbach at latex-project.org
Wed Jan 22 16:21:15 CET 2020


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/02312cd74bb639bf725eb4ff53e0e34ab77323cc

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

commit 02312cd74bb639bf725eb4ff53e0e34ab77323cc
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Wed Jan 22 16:21:15 2020 +0100

    fixed leftover \substdefault and added a test to check that case


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

02312cd74bb639bf725eb4ff53e0e34ab77323cc
 base/build.lua                                     |   2 +
 base/changes.txt                                   |   5 +
 base/lttextcomp.dtx                                |   6 +-
 .../{tlb-textcomp-006.lvt => tlb-textcomp-007.lvt} |  19 ++-
 base/testfiles-legacy/tlb-textcomp-007.tlg         | 165 +++++++++++++++++++++
 support/t1lmss.fd                                  |  46 ++++++
 support/t1lmtt.fd                                  |  81 ++++++++++
 7 files changed, 317 insertions(+), 7 deletions(-)

diff --git a/base/build.lua b/base/build.lua
index bf6ac159..4286b9c7 100644
--- a/base/build.lua
+++ b/base/build.lua
@@ -119,6 +119,8 @@ unpacksuppfiles =
     "UShyphen.tex",
     "ot1lmr.fd",
     "t1lmr.fd",
+    "t1lmss.fd",
+    "t1lmtt.fd",
     "ts1lmr.fd",
     "pdflatex.ini",
     "pdftexconfig.tex"
diff --git a/base/changes.txt b/base/changes.txt
index d9c5101c..2ccb1fce 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -4,6 +4,11 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2020-01-22  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* lttextcomp.dtx: The overall default is \textcompsubstdefault
+	not \substdefault
+
 2020-01-20  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* ltfssdcl.dtx (section{Interface Commands}):
diff --git a/base/lttextcomp.dtx b/base/lttextcomp.dtx
index e48c8c2d..047234e7 100644
--- a/base/lttextcomp.dtx
+++ b/base/lttextcomp.dtx
@@ -33,7 +33,7 @@
 %
 %
 \ProvidesFile{lttextcomp.dtx}
-             [2020/01/22 v1.0a LaTeX Kernel (text companion symbols)]
+             [2020/01/22 v1.0b LaTeX Kernel (text companion symbols)]
 % \iffalse
 \documentclass{ltxdoc}
 \begin{document}
@@ -332,6 +332,8 @@
 
 %  \begin{macro}{\tc at subst}
 %    
+% \changes{v1.0b}{2020/01/22}{The overall default is \cs{textcompsubstdefault}
+%      not \cs{substdefault}}
 %    \begin{macrocode}
 \def\tc at subst#1{%
    \tc at errorwarn
@@ -347,7 +349,7 @@
       \else\ifx\f at family\ttdef at ult
          \fontfamily\ttsubstdefault
       \else
-        \fontfamily\substdefault
+         \fontfamily\textcompsubstdefault
       \fi\fi\fi
 %    \end{macrocode}
 %    Whatever default was chosen, we claim now (locally hopefully)
diff --git a/base/testfiles-legacy/tlb-textcomp-006.lvt b/base/testfiles-legacy/tlb-textcomp-007.lvt
similarity index 50%
copy from base/testfiles-legacy/tlb-textcomp-006.lvt
copy to base/testfiles-legacy/tlb-textcomp-007.lvt
index 95398a5f..f76a5ba7 100644
--- a/base/testfiles-legacy/tlb-textcomp-006.lvt
+++ b/base/testfiles-legacy/tlb-textcomp-007.lvt
@@ -6,10 +6,19 @@
 
 \showoutput
 
+\usepackage[T1]{fontenc}
+
+\renewcommand\rmsubstdefault{\XX cmr}
+\renewcommand\sfsubstdefault{\XX cmss}
+\renewcommand\ttsubstdefault{\XX cmtt}
+\renewcommand\textcompsubstdefault{\XX cmss}
 
 \renewcommand\rmdefault{lmr}
+\renewcommand\sfdefault{lmss}
 \renewcommand\ttdefault{lmtt}
+
 \DeclareEncodingSubset{TS1}{lmr}     {3}  % pretend LM doesn't have oldstyle
+\DeclareEncodingSubset{TS1}{lmss}    {3}  % pretend LM doesn't have oldstyle
 \DeclareEncodingSubset{TS1}{lmtt}    {3}  % pretend LM doesn't have oldstyle
 
 % in the test suite lmtt is not available, so there is some "no file found"
@@ -19,15 +28,15 @@
 
 \START
 
-\typeout{oldstyle in cmr cmss or cmtt from TS1}
+          LMR + cmr   \oldstylenums{123,4}  % here cmr gets substituted + \XX error show \rmsubstdefault
 
-          LMR + cmr   \oldstylenums{123,4}  % here cmr gets substituted
+\sffamily CMSS + cmss \oldstylenums{567.8}  % this should give cmss + \XX error show \sfsubstdefault
 
-\sffamily CMSS + cmss \oldstylenums{567.8}  % this should give cmss
+\ttfamily LMTT + cmtt \oldstylenums{0.99}   % this should give cmtt + \XX error show \ttsubstdefault
 
-\ttfamily LMTT + cmtt \oldstylenums{0.99}   % this should give cmtt
+\renewcommand\ttdefault{cmtt}   % now tt not one of the rm/sf/tt ... so \textcompsubstdefault should appear
 
-\ttfamily LMTT + oms  \legacyoldstylenums{12.34} % this should now comes from OMS
+LMTT + cmss \oldstylenums{987} % should come out with cmss oldstyles
 
 \end{document}
 
diff --git a/base/testfiles-legacy/tlb-textcomp-007.tlg b/base/testfiles-legacy/tlb-textcomp-007.tlg
new file mode 100644
index 00000000..e6d11297
--- /dev/null
+++ b/base/testfiles-legacy/tlb-textcomp-007.tlg
@@ -0,0 +1,165 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+LaTeX Info: Oldstyle digits unavailable for family lmr.
+            Default oldstyle digits used instead on input line ....
+! Undefined control sequence.
+\rmsubstdefault ->\XX 
+                      cmr
+l. ...          LMR + cmr   \oldstylenums{123,4}
+                                                 % here cmr gets substituted...
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+LaTeX Font Info:    Trying to load font information for T1+lmss on input line ....
+LaTeX Info: Oldstyle digits unavailable for family lmss.
+            Default oldstyle digits used instead on input line ....
+! Undefined control sequence.
+\sfsubstdefault ->\XX 
+                      cmss
+l. ...\sffamily CMSS + cmss \oldstylenums{567.8}
+                                                 % this should give cmss + \...
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+LaTeX Font Info:    Trying to load font information for TS1+cmss on input line ....
+LaTeX Font Info:    Trying to load font information for T1+lmtt on input line ....
+LaTeX Info: Oldstyle digits unavailable for family lmtt.
+            Default oldstyle digits used instead on input line ....
+! Undefined control sequence.
+\ttsubstdefault ->\XX 
+                      cmtt
+l. ...\ttfamily LMTT + cmtt \oldstylenums{0.99}
+                                                 % this should give cmtt + \...
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+LaTeX Font Info:    Trying to load font information for TS1+cmtt on input line ....
+LaTeX Info: Oldstyle digits unavailable for family lmtt.
+            Default oldstyle digits used instead on input line ....
+! Undefined control sequence.
+\textcompsubstdefault ->\XX 
+                            cmss
+l. ...LMTT + cmss \oldstylenums{987}
+                                    % should come out with cmss oldstyles
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+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 503.94617fil
+...\write-{}
+...\glue(\topskip) 3.11125
+...\hbox(6.88875+1.94397)x345.0, glue set 249.97766fil
+....\hbox(0.0+0.0)x15.0
+....\T1/lmr/m/n/10 L
+....\T1/lmr/m/n/10 M
+....\T1/lmr/m/n/10 R
+....\glue 3.33333 plus 1.66498 minus 1.11221
+....\T1/lmr/m/n/10 +
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\T1/lmr/m/n/10 c
+....\T1/lmr/m/n/10 m
+....\T1/lmr/m/n/10 r
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\TS1/cmr/m/n/10 1
+....\TS1/cmr/m/n/10 2
+....\TS1/cmr/m/n/10 3
+....\TS1/cmr/m/n/10 ,
+....\TS1/cmr/m/n/10 4
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 3.11153
+...\hbox(6.9445+1.94397)x345.0, glue set 243.14415fil
+....\hbox(0.0+0.0)x15.0
+....\T1/lmss/m/n/10 C
+....\T1/lmss/m/n/10 M
+....\T1/lmss/m/n/10 S
+....\T1/lmss/m/n/10 S
+....\glue 3.33333 plus 1.66498 minus 1.11221
+....\T1/lmss/m/n/10 +
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\T1/lmss/m/n/10 c
+....\T1/lmss/m/n/10 m
+....\T1/lmss/m/n/10 s
+....\T1/lmss/m/n/10 s
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\TS1/cmss/m/n/10 5
+....\TS1/cmss/m/n/10 6
+....\TS1/cmss/m/n/10 7
+....\TS1/cmss/m/n/10 .
+....\TS1/cmss/m/n/10 8
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 4.06554
+...\hbox(5.9905+2.22168)x345.0, glue set 246.00531fil
+....\hbox(0.0+0.0)x15.0
+....\T1/lmtt/m/n/10 L
+....\T1/lmtt/m/n/10 M
+....\T1/lmtt/m/n/10 T
+....\T1/lmtt/m/n/10 T
+....\glue 5.24998
+....\T1/lmtt/m/n/10 +
+....\glue 5.24998
+....\T1/lmtt/m/n/10 c
+....\T1/lmtt/m/n/10 m
+....\T1/lmtt/m/n/10 t
+....\T1/lmtt/m/n/10 t
+....\glue 5.24998
+....\TS1/cmtt/m/n/10 0
+....\TS1/cmtt/m/n/10 .
+....\TS1/cmtt/m/n/10 9
+....\TS1/cmtt/m/n/10 9
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 3.22437
+...\hbox(6.55396+1.94397)x345.0, glue set 252.00385fil
+....\hbox(0.0+0.0)x15.0
+....\T1/lmtt/m/n/10 L
+....\T1/lmtt/m/n/10 M
+....\T1/lmtt/m/n/10 T
+....\T1/lmtt/m/n/10 T
+....\glue 5.24998
+....\T1/lmtt/m/n/10 +
+....\glue 5.24998
+....\T1/lmtt/m/n/10 c
+....\T1/lmtt/m/n/10 m
+....\T1/lmtt/m/n/10 s
+....\T1/lmtt/m/n/10 s
+....\glue 5.24998
+....\TS1/cmss/m/n/10 9
+....\TS1/cmss/m/n/10 8
+....\TS1/cmss/m/n/10 7
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue -1.94397
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.70276
+..\hbox(6.29724+0.0)x345.0, glue set 170.0fil
+...\glue 0.0 plus 1.0fil
+...\T1/lmr/m/n/10 1
+...\glue 0.0 plus 1.0fil
+(tlb-textcomp-007.aux)
diff --git a/support/t1lmss.fd b/support/t1lmss.fd
new file mode 100644
index 00000000..2e39d6e9
--- /dev/null
+++ b/support/t1lmss.fd
@@ -0,0 +1,46 @@
+% This file belongs to the Latin Modern package. The work is released
+% under the GUST Font License. See the MANIFEST-Latin-Modern.txt and
+% README-Latin-Modern.txt files for the details. For the most recent version of
+% this license see http://www.gust.org.pl/fonts/licenses/GUST-FONT-LICENSE.txt
+% or http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt
+
+\ProvidesFile{t1lmss.fd}[2009/10/30 v1.6 Font defs for Latin Modern]
+\DeclareFontFamily{T1}{lmss}{}
+\DeclareFontShape{T1}{lmss}{m}{n}
+     {<-8.5> ec-lmss8
+      <8.5-9.5> ec-lmss9      <9.5-11>  ec-lmss10
+      <11-15.5> ec-lmss12     <15.5-> ec-lmss17
+      }{}
+\DeclareFontShape{T1}{lmss}{m}{it}
+      {<->ssub*lmss/m/sl}{}
+\DeclareFontShape{T1}{lmss}{m}{sl}
+     {<-8.5> ec-lmsso8
+      <8.5-9.5> ec-lmsso9      <9.5-11>  ec-lmsso10
+      <11-15.5> ec-lmsso12     <15.5-> ec-lmsso17
+      }{}
+%%%%%%% Font/shape undefined, therefore substituted
+\DeclareFontShape{T1}{lmss}{m}{sc}
+     {<->sub*lmr/m/sc}{}
+\DeclareFontShape{T1}{lmss}{b}{n}
+     {<->ssub * lmss/bx/n}{}
+\DeclareFontShape{T1}{lmss}{b}{sl}
+     {<->ssub * lmss/bx/sl}{}
+\DeclareFontShape{T1}{lmss}{b}{it}
+     {<->ssub * lmss/bx/it}{}
+%%%%%%%% semibold condensed series
+\DeclareFontShape{T1}{lmss}{sbc}{n}
+     {<-> ec-lmssdc10}{}
+\DeclareFontShape{T1}{lmss}{sbc}{sl}
+     {<-> ec-lmssdo10}{}
+\DeclareFontShape{T1}{lmss}{sbc}{it}
+     {<->ssub*lmss/sbc/sl}{}
+%%%%%%%%% bold extended series
+\DeclareFontShape{T1}{lmss}{bx}{n}
+     {<-> ec-lmssbx10}{}
+\DeclareFontShape{T1}{lmss}{bx}{sl}
+     {<-> ec-lmssbo10}{}
+\DeclareFontShape{T1}{lmss}{bx}{it}
+     {<->ssub*lmss/bx/sl}{}
+\endinput
+%%
+%% End of file `t1lmss.fd'.
diff --git a/support/t1lmtt.fd b/support/t1lmtt.fd
new file mode 100644
index 00000000..d86b86e0
--- /dev/null
+++ b/support/t1lmtt.fd
@@ -0,0 +1,81 @@
+% This file belongs to the Latin Modern package. The work is released
+% under the GUST Font License. See the MANIFEST-Latin-Modern.txt and
+% README-Latin-Modern.txt files for the details. For the most recent version of
+% this license see http://www.gust.org.pl/fonts/licenses/GUST-FONT-LICENSE.txt
+% or http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt
+
+\ProvidesFile{t1lmtt.fd}[2009/10/30 v1.6 Font defs for Latin Modern]
+\DeclareFontFamily{T1}{lmtt}{\hyphenchar \font\m at ne}
+
+\ifx\lmtt at use@light at as@normal\@empty
+% macro defined, so we use the light variant as medium (m), and
+% medium as semi-bold (sb):
+\DeclareFontShape{T1}{lmtt}{sb}{n}
+     {<-8.5>   ec-lmtt8     <8.5-9.5> ec-lmtt9
+      <9.5-11> ec-lmtt10    <11->     ec-lmtt12
+      }{}
+\DeclareFontShape{T1}{lmtt}{sb}{it}
+     {<-> ec-lmtti10}{}
+\DeclareFontShape{T1}{lmtt}{sb}{sl}
+     {<-> ec-lmtto10}{}
+\DeclareFontShape{T1}{lmtt}{sb}{sc}
+     {<-> ec-lmtcsc10}{}
+\DeclareFontShape{T1}{lmtt}{sb}{scsl}
+     {<-> ec-lmtcso10}{}
+%%%%%%%% light (l), light condensed (lc), and dark (b) variants:
+\DeclareFontShape{T1}{lmtt}{m}{n}
+     {<-> ec-lmtl10}{}
+\DeclareFontShape{T1}{lmtt}{m}{it}
+     {<->sub*lmtt/l/sl}{}
+\DeclareFontShape{T1}{lmtt}{m}{sl}
+     {<-> ec-lmtlo10}{}
+\DeclareFontShape{T1}{lmtt}{c}{n}
+     {<-> ec-lmtlc10}{}
+\DeclareFontShape{T1}{lmtt}{c}{it}
+     {<->sub*lmtt/lc/sl}{}
+\DeclareFontShape{T1}{lmtt}{c}{sl}
+     {<-> ec-lmtlco10}{}
+\else
+% usual setup of variants:
+\DeclareFontShape{T1}{lmtt}{m}{n}
+     {<-8.5>   ec-lmtt8     <8.5-9.5> ec-lmtt9
+      <9.5-11> ec-lmtt10    <11->     ec-lmtt12
+      }{}
+\DeclareFontShape{T1}{lmtt}{m}{it}
+     {<-> ec-lmtti10}{}
+\DeclareFontShape{T1}{lmtt}{m}{sl}
+     {<-> ec-lmtto10}{}
+\DeclareFontShape{T1}{lmtt}{m}{sc}
+     {<-> ec-lmtcsc10}{}
+\DeclareFontShape{T1}{lmtt}{m}{scsl}
+     {<-> ec-lmtcso10}{}
+%%%%%%%% light (l), light condensed (lc), and dark (b) variants:
+\DeclareFontShape{T1}{lmtt}{l}{n}
+     {<-> ec-lmtl10}{}
+\DeclareFontShape{T1}{lmtt}{l}{it}
+     {<->sub*lmtt/l/sl}{}
+\DeclareFontShape{T1}{lmtt}{l}{sl}
+     {<-> ec-lmtlo10}{}
+\DeclareFontShape{T1}{lmtt}{lc}{n}
+     {<-> ec-lmtlc10}{}
+\DeclareFontShape{T1}{lmtt}{lc}{it}
+     {<->sub*lmtt/lc/sl}{}
+\DeclareFontShape{T1}{lmtt}{lc}{sl}
+     {<-> ec-lmtlco10}{}
+\fi
+% bold is always bold (b):
+\DeclareFontShape{T1}{lmtt}{b}{n}
+     {<-> ec-lmtk10}{}
+\DeclareFontShape{T1}{lmtt}{b}{it}
+     {<->sub*lmtt/b/sl}{}
+\DeclareFontShape{T1}{lmtt}{b}{sl}
+{<-> ec-lmtko10}{}
+\DeclareFontShape{T1}{lmtt}{bx}{it}
+     {<->sub*lmtt/b/sl}{}
+\DeclareFontShape{T1}{lmtt}{bx}{n}
+     {<->ssub*lmtt/b/n}{}
+\DeclareFontShape{T1}{lmtt}{bx}{sl}
+     {<->ssub*lmtt/b/sl}{}
+\endinput
+%%
+%% End of file `t1lmtt.fd'.





More information about the latex3-commits mailing list