summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/base/ltfssbas.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/base/ltfssbas.dtx')
-rw-r--r--Master/texmf-dist/source/latex/base/ltfssbas.dtx234
1 files changed, 115 insertions, 119 deletions
diff --git a/Master/texmf-dist/source/latex/base/ltfssbas.dtx b/Master/texmf-dist/source/latex/base/ltfssbas.dtx
index 5766fb2a93f..502f22f6fda 100644
--- a/Master/texmf-dist/source/latex/base/ltfssbas.dtx
+++ b/Master/texmf-dist/source/latex/base/ltfssbas.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright 1993-2014
+% Copyright 1993-2015
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file.
%
@@ -30,17 +30,12 @@
%%% From File: ltfssbas.dtx
%% Copyright (C) 1989-2002 Frank Mittelbach and Rainer Sch\"opf
%
-%<def1>\ProvidesFile{autofss1.sty}
-%<def1> [2002/10/02 v3.0x NFSS autoload file 1]
-%<def2>\ProvidesFile{autofss2.sty}
-%<def2> [2002/10/02 v3.0x NFSS autoload file 2]
-%
%<*driver>
% \fi
%
%
\ProvidesFile{ltfssbas.dtx}
- [2014/09/29 v3.0x LaTeX Kernel (NFSS Basic Macros)]
+ [2015/04/07 v3.1a LaTeX Kernel (NFSS Basic Macros)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -56,7 +51,7 @@
%<+checkmem>\CHECKMEM
% \fi
%
-% \CheckSum{1089}
+% \CheckSum{1155}
%
%
% \GetFileInfo{ltfssbas.dtx}
@@ -67,6 +62,7 @@
%
% \author{Frank Mittelbach \and Rainer Sch\"opf}
%
+% \MaintainedByLaTeXTeam{latex}
% \maketitle
%
% This file contains the main implementation of the `low level' font
@@ -152,18 +148,10 @@
% \cs{ifmmode} added in \cs{math@group}}
% \changes{v2.1w}{1994/11/17}
% {\cs{@tempa} to \cs{reserved@a}}
+% \changes{v3.0z}{2015/02/21}
+% {Removed autoload code}
%
%
-% \section{Autoloading parts of NFSS}
-%
-% This code is set up in a way that some parts of it can be kept
-% separate and will only be loaded if needed.
-%
-% If we are producing an autoload version of \LaTeXe{} then all those
-% parts with \textsf{def1} or \textsf{def2} docstrip guards will be
-% placed into the autoloadable files \texttt{autofss1.sty} and
-% \texttt{autofss2.sty}.
-%
% The `2ekernel' code ensures that a |\usepackage{autofss1}| is
% essentially ignored if a `full' format is being used that has
% picture mode already in the format.
@@ -174,9 +162,6 @@
%<2ekernel>\expandafter\let\csname ver@autofss1.sty\endcsname\fmtversion
% \end{macrocode}
%
-% The autoload file \texttt{autofss2} is a specialty because it
-% contains
-% code which will be completely local, ie loaded every time again.
%
% \section{Preliminary macros}
%
@@ -188,10 +173,9 @@
% |\@nomath| is used by most macros that will have no effect
% in math mode. It issues a warning message.
% \begin{macrocode}
-%<*2ekernel|autoload>
+%<*2ekernel>
\def\@nomath#1{\relax\ifmmode
\@font@warning{Command \noexpand#1invalid in math mode}\fi}
-%</2ekernel|autoload>
% \end{macrocode}
% \end{macro}
%
@@ -212,7 +196,6 @@
% The |\relax| at the beginning is necessary to prevent
% \TeX{} from scanning too far in certain situations.
% \begin{macrocode}
-%<*2ekernel|def1>
\gdef\no@alphabet@error#1{\relax \ifmmode
\@latex@error{Math\space alphabet\space identifier\space
\noexpand#1is\space undefined\space in\space math\space
@@ -223,11 +206,6 @@
or\space use\space the\space \noexpand\SetMathAlphabet\space
command.}
\fi}
-%</2ekernel|def1>
-%<*autoload>
-\gdef\no@alphabet@error{\relax \ifmmode
- \expandafter\try@sizes\expandafter\no@alphabet@error \fi}
-%</autoload>
% \end{macrocode}
% \end{macro}
%
@@ -248,11 +226,12 @@
% {(DPC) No need to redefine \cs{newfam} as not outer}
% \changes{v3.0b}{1995/05/27}
% {(FMi) But a need to define \cs{new@mathgroup}}
+% \changes{v3.0y}{2014/12/30}
+% {move allocation to ltplain.}
% \begin{macrocode}
-%<*2ekernel|autoload>
-\def\new@mathgroup{\alloc@8\mathgroup\chardef\sixt@@n}
+%\def\new@mathgroup{\alloc@8\mathgroup\chardef\sixt@@n}
\let\mathgroup\fam
-\let\newfam\new@mathgroup
+%\let\newfam\new@mathgroup
\@onlypreamble\new@mathgroup
% \end{macrocode}
% \end{macro}
@@ -323,7 +302,6 @@
\global\expandafter\let\expandafter#1\the\font
\endgroup
}
-%</2ekernel|autoload>
% \end{macrocode}
% \end{macro}
%
@@ -333,7 +311,6 @@
% \begin{macro}{\do@subst@correction}
%
% \begin{macrocode}
-%<*2ekernel|autoload>
\def\do@subst@correction{%
\xdef\subst@correction{%
\font@name
@@ -672,21 +649,55 @@
%
% \begin{macro}{\@DeclareMathSizes}
% \changes{v3.0p}{1996/07/26}{use faster \cs{if} test}
+% This modification by Michael J. Downes on comp.text.tex on 2002/10/17
+% allows the user to have settings such as\\
+% |\DeclareMathSizes{9.5dd}{9.5dd}{7.4dd}{6.6dd}|.
+% \changes{v3.0y}{2015/01/11}{Allow arbitrary units (latexrelease)}
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\@DeclareMathSizes}%
+%<latexrelease> {Arbitrary units in \DeclareMathSizes}%
+%<*2ekernel|latexrelease>
+\def\@DeclareMathSizes #1#2#3#4#5{%
+ \@defaultunits\dimen@ #2pt\relax\@nnil
+ \if $#3$%
+ \expandafter\let\csname S@\strip@pt\dimen@\endcsname\math@fontsfalse
+ \else
+ \@defaultunits\dimen@ii #3pt\relax\@nnil
+ \@defaultunits\@tempdima #4pt\relax\@nnil
+ \@defaultunits\@tempdimb #5pt\relax\@nnil
+ \toks@{#1}%
+ \expandafter\xdef\csname S@\strip@pt\dimen@\endcsname{%
+ \gdef\noexpand\tf@size{\strip@pt\dimen@ii}%
+ \gdef\noexpand\sf@size{\strip@pt\@tempdima}%
+ \gdef\noexpand\ssf@size{\strip@pt\@tempdimb}%
+ \the\toks@
+ }%
+ \fi
+}%
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@DeclareMathSizes}%
+%<latexrelease> {Arbitrary units in \DeclareMathSizes}%
+%<latexrelease>\def\@DeclareMathSizes#1#2#3#4#5{%
+%<latexrelease> \@defaultunits\dimen@#2pt\relax\@nnil
+%<latexrelease> \if$#3$%
+%<latexrelease> \expandafter \let
+%<latexrelease> \csname S@\strip@pt\dimen@\endcsname
+%<latexrelease> \math@fontsfalse
+%<latexrelease> \else
+%<latexrelease> \expandafter \gdef
+%<latexrelease> \csname S@\strip@pt\dimen@\endcsname
+%<latexrelease> {\gdef\tf@size{#3}\gdef\sf@size{#4}%
+%<latexrelease> \gdef\ssf@size{#5}%
+%<latexrelease> #1%
+%<latexrelease> }%
+%<latexrelease> \fi}%
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
% \begin{macrocode}
-\def\@DeclareMathSizes#1#2#3#4#5{%
- \@defaultunits\dimen@#2pt\relax\@nnil
- \if$#3$%
- \expandafter \let
- \csname S@\strip@pt\dimen@\endcsname
- \math@fontsfalse
- \else
- \expandafter \gdef
- \csname S@\strip@pt\dimen@\endcsname
- {\gdef\tf@size{#3}\gdef\sf@size{#4}%
- \gdef\ssf@size{#5}%
- #1%
- }%
- \fi}
\@onlypreamble\@DeclareMathSizes
% \end{macrocode}
% \end{macro}
@@ -1088,7 +1099,6 @@
% \changes{v1.9a}{1992/07/26}{}
% \begin{macrocode}
\def\curr@fontshape{\f@encoding/\f@family/\f@series/\f@shape}
-%</2ekernel|autoload>
% \end{macrocode}
% \end{macro}
%
@@ -1096,7 +1106,6 @@
% Now we can tackle the problem of defining a new font.
% \changes{v1.9a}{1992/07/26}{}
% \begin{macrocode}
-%<*2ekernel|def2|autoload>
\def\define@newfont{%
% \end{macrocode}
% We have already mentioned that the \textsf{token} list that
@@ -1156,62 +1165,10 @@
% |\escapechar| by closing the group.
% \begin{macrocode}
\endgroup}
-%</2ekernel|def2|autoload>
-% \end{macrocode}
-%
-%
-% As |autofss2.sty| only makes local definitions it is re-loaded
-% for each font, to save some string memory in the kernel, and to
-% speed up the loading of some packages which may load fonts
-% The code is actually pre-loaded into the kernel and removed
-% at |\begin{document}|. The |\ifx| test below ensures that
-% if |\usepackage{autofss2}| appears in the preamble, then the code
-% is not removed at this time. Can not use |\AtBeginDocument| here
-% as it is not defined yet! Listing all the commands like this
-% is not ideal as any changes to the |autofss2.sty| need to be
-% reflected here, but this seems the most memory efficient mechanism
-% as it avoids the use of an extra csname to store the list.
-%
-% This is currently disabled, so the `autofss2' code remains
-% in the kernel, and |autofss2.sty| is not generated in the current
-% public release.
-% \changes{v3.0l}{1995/10/26}
-% {(DPC) disable autofss2 for now}
-% \begin{macrocode}
-%<*autoloadxxx>
-\expandafter\def\expandafter\@begindocumenthook\expandafter{%
- \expandafter\ifx\csname ver@autofss2.sty\endcsname\relax
- \gdef\define@newfont{%
- \begingroup
- \makeatletter\nfss@catcodes
- \catcode`\#6\relax
- \@@input autofss2.sty\relax\define@newfont
- \endgroup}%
- \begingroup
- \def\do##1{\global\let##1\@undefined}%
- \do\extract@sizefn
- \do\try@simple@size
- \do\set@simple@size@args
- \do\extract@rangefontinfo
- \do\is@range
- \do\check@range
- \do\check@single
- \do\set@size@funct@args
- \do\set@size@funct@args@
- \do\try@size@range
- \do\empty@sfcnt
- \do\gen@sfcnt
- \do\genb@sfcnt
- \do\sub@sfcnt
- \do\subf@sfcnt
- \do\fixed@sfcnt
- \endgroup
- \fi}
-%</autoloadxxx>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*2ekernel|autoload>
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
\def\try@load@fontshape{%
\expandafter
\ifx\csname \f@encoding+\f@family\endcsname\relax
@@ -1369,6 +1326,10 @@
% But if the defaults are set incorrectly one deserves nothing else!
% \changes{v1.9a}{1992/07/26}{}
% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2015/01/01}{\wrong@fontshape}%
+%<latexrelease> {Font substituation in preamble}%
+%<*2ekernel|latexrelease>
\def\wrong@fontshape{%
\csname D@\f@encoding\endcsname % install defaults if in math
% \end{macrocode}
@@ -1398,10 +1359,23 @@
% If this is still undefined, try the default \emph{family}.
% Otherwise give up. We never try to change the encoding scheme!
% \changes{v1.9a}{1992/07/26}{}
+% \changes{v3.1a}{2015/04/07}{Try loading fd file if family has changed}
% \begin{macrocode}
\expandafter
\ifx\csname\curr@fontshape\endcsname\relax
\let\f@family\default@family
+% \end{macrocode}
+% If we change the font family and we are in the preamble then the
+% corresponding \texttt{.fd} file may not been loaded
+% yet. Therefore we try this now. Otherwise equating the requested
+% font shape with the finally selected fontshape below will fail
+% and can result in ``NFSS tables corruped''. After begin document
+% that will not happen as all \texttt{.fd} files involved in
+% substituation are loaded at |\begin{document}|.
+% \begin{macrocode}
+ \begingroup
+ \try@load@fontshape
+ \endgroup
\fi \fi
\fi
% \end{macrocode}
@@ -1473,6 +1447,40 @@
% the defaults are not well defined.
% \begin{macrocode}
\pickup@font}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\wrong@fontshape}%
+%<latexrelease> {Font substituation in preamble}%
+%<latexrelease>\def\wrong@fontshape{%
+%<latexrelease> \csname D@\f@encoding\endcsname % install defaults if in math
+%<latexrelease> \edef\reserved@a{\csname\curr@fontshape\endcsname}%
+%<latexrelease> \ifx\last@fontshape\reserved@a
+%<latexrelease> \errmessage{Corrupted NFSS tables}%
+%<latexrelease> \error@fontshape
+%<latexrelease> \else
+%<latexrelease> \let\f@shape\default@shape
+%<latexrelease> \expandafter\ifx\csname\curr@fontshape\endcsname\relax
+%<latexrelease> \let\f@series\default@series
+%<latexrelease> \expandafter
+%<latexrelease> \ifx\csname\curr@fontshape\endcsname\relax
+%<latexrelease> \let\f@family\default@family
+%<latexrelease> \fi \fi
+%<latexrelease> \fi
+%<latexrelease> \@font@warning{Font shape `\expandafter\string\reserved@a'
+%<latexrelease> \expandafter\@gobble\string\@undefined\MessageBreak
+%<latexrelease> using `\curr@fontshape' instead\@wrong@font@char}%
+%<latexrelease> \global\let\last@fontshape\reserved@a
+%<latexrelease> \gdef\@defaultsubs{%
+%<latexrelease> \@font@warning{Some font shapes were not available, defaults
+%<latexrelease> substituted.\@gobbletwo}}%
+%<latexrelease> \global\expandafter\expandafter\expandafter\let
+%<latexrelease> \expandafter\reserved@a
+%<latexrelease> \csname\curr@fontshape\endcsname
+%<latexrelease> \xdef\font@name{%
+%<latexrelease> \csname\curr@fontshape/\f@size\endcsname}%
+%<latexrelease> \pickup@font}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -1733,7 +1741,6 @@
% \begin{macrocode}
\let\math@bgroup\bgroup
\def\math@egroup#1{#1\egroup}
-%</2ekernel|autoload>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1745,7 +1752,6 @@
% a more elaborate interface
% is under testing in mthscale.sty.
% \begin{macrocode}
-%<*2ekernel|def1>
\gdef\calculate@math@sizes{%
\@font@info{Calculating\space math\space sizes\space for\space
size\space <\f@size>}%
@@ -1757,10 +1763,6 @@
\gdef\noexpand\sf@size{\strip@pt\@tempdimb}%
\gdef\noexpand\ssf@size{\strip@pt\dimen@}%
\noexpand\math@fontstrue}}
-%</2ekernel|def1>
-%<*autoload>
-\def\calculate@math@sizes{\try@sizes\calculate@math@sizes}
-%</autoload>
% \end{macrocode}
% \end{macro}
%
@@ -1773,7 +1775,6 @@
% 1 to |\defaultscriptratio| to |\defaultscriptscriptratio|.\\
% By default this is 1 to .7 to .5.
% \begin{macrocode}
-%<*2ekernel|autoload>
\def\defaultscriptratio{.7}
\def\defaultscriptscriptratio{.5}
% \end{macrocode}
@@ -1801,8 +1802,6 @@
% \texttt{plain.tex} uses |\tenrm|. We have also made some further
% adjustments for its use in \LaTeX.
% \begin{macrocode}
-%</2ekernel|autoload>
-%<*2ekernel|autoerr>
\gdef\showhyphens#1{%
\setbox0\vbox{%
\color@begingroup
@@ -1811,9 +1810,6 @@
\normalfont
\pretolerance\m@ne\tolerance\m@ne\hbadness\z@\showboxdepth\z@\ #1%
\color@endgroup}}
-%</2ekernel|autoerr>
-%<autoload>\def\showhyphens{\@autoerr\showhyphens}
-%<*2ekernel|autoload>
% \end{macrocode}
% \end{macro}
%
@@ -1903,7 +1899,7 @@
% \end{macro}
%
% \begin{macrocode}
-%</2ekernel|autoload>
+%</2ekernel>
% \end{macrocode}
%
% \Finale