Skip to content

Commit

Permalink
Merge branch 'develop' into nfssaxes
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankMittelbach committed Dec 2, 2019
2 parents 79cd055 + 305f3f0 commit d9dfee6
Show file tree
Hide file tree
Showing 8 changed files with 142 additions and 11 deletions.
5 changes: 5 additions & 0 deletions base/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ are not part of the distribution.
* ltclass.dtx (section{Implementation}): Initialize
\...-h@@k only when loading the package or class (gh/198)

2019-10-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* ltfsstrc.dtx (subsection{Sizefunctions}):
Added 'alias' size function (mainly for autoinst fonts)

#########################
# 2019-10-01 PL 3 Release
#########################
Expand Down
91 changes: 84 additions & 7 deletions base/doc/fntguide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
\author{\copyright~Copyright 1995--2019, \LaTeX3 Project Team.\\
All rights reserved.}

\date{July 2019}
\date{October 2019}

\begin{document}

Expand Down Expand Up @@ -170,7 +170,7 @@ \section{Text fonts}
This section describes the commands available to class and package
writers for specifying and selecting fonts.

\subsection{Text font attributes}
\subsection{Text font attributes} \label{sec:textfontattributes}

Every text font in \LaTeX{} has five \emph{attributes}:
\begin{description}
Expand Down Expand Up @@ -1214,6 +1214,13 @@ \subsection{Size functions}
\item[ssub]
Silent variant of `sub', only loggings.

\item[alias]
\NEWfeature{2019/10/15}
Same as `ssub' but with a different logging message. Intended for
cases where the substitution is only done to change the name, e.g.,
going from \texttt{regular} series to the official name \texttt{m}. In
that case given a warning that some shape is not found is not correct.

\item[subf]
Like the empty function but issues a warning that it has to substitute
the external font \m{fontarg} because the desired font shape was not
Expand Down Expand Up @@ -1603,6 +1610,9 @@ \subsection{Default definitions}
\DeclareFontSubstitution{T1}{cmr}{m}{n}
\end{verbatim}




\subsection{Case changing}
\label{sec:case}

Expand Down Expand Up @@ -1810,15 +1820,25 @@ \subsection{Naming conventions}
start with |E|, whilst |U| is for Unknown or Unclassified encodings.

\item
Font family names should contain up to five lower case letters.
Where possible, these should conform to the \emph{Filenames for fonts}
font naming scheme.
\NEWdescription{2019/10/15}
Font family names should contain only upper and lower case letters and
hyphen characters. Where possible, these should conform to the
\emph{Filenames for fonts} font naming scheme of the scheme
implemented by \texttt{autoinst} with suffixes such as \texttt{-LF},
\texttt{-OsF}, etc.\ to indicate different figure styles.

\item
Font series names should contain up to four lower case letters.
\NEWdescription{2019/10/15}
Font series names should contain up to four lower case letters. If at
all possible standard names as suggested in
Section~\ref{sec:textfontattributes} should be used. Font specific
names such as \texttt{regular} or \texttt{black}, etc.\ should be at
least aliased to a corresponding standard name.

\item
Font shapes should contain up to two letters lower case.
\NEWdescription{2019/10/15}
Font shapes should contain up to four letters lower case. Use the
names suggested in Section~\ref{sec:textfontattributes}.

\item
Names for symbol fonts are built from lower and upper case letters
Expand All @@ -1844,6 +1864,63 @@ \subsection{Naming conventions}
Note that commands defined in this way must be robust, in case they
get put into a section title or other moving argument.



\subsection{The order of declaration}


\NEWdescription{2019/10/15}
\NFSS{} forces you to give all declarations in a specific order so
that it can check whether you have specified all necessary
information. If you declare objects in the wrong order, it will
complain. Here are the dependencies that you have to obey:
\begin{itemize}
\item
|\DeclareFontFamily| checks that the encoding scheme was previously
declared with |\DeclareFontEncoding|.

\item
|\DeclareFontShape| checks that the font
family was declared to be available in the requested
encoding (|\DeclareFontFamily|).

\item
|\DeclareSymbolFont| checks that the encoding scheme is valid.

\item
|\SetSymbolFont| additionally ensures that the requested math
version was declared (|\DeclareMathVersion|) and that the requested
symbol font was declared (|\DeclareSymbolFont|).


\item
|\DeclareSymbolFontAlphabet| checks that the command name for the
alphabet identifier can be used and that the symbol font was declared.

\item
|\DeclareMathAlphabet| checks that the chosen command name can be
used and that the encoding scheme was declared.

\item
|\SetMathAlphabet| checks that the alphabet identifier was
previously declared with |\DeclareMathAlphabet| or
|\DeclareSymbolFontAlphabet| and that the math version and the
encoding scheme are known.

\item
|\DeclareMathSymbol| makes sure that the command name can be used
(i.e., is undefined or was previously declared to be a math symbol)
and that the symbol font was previously declared.

\item
When the |\begin{document}| command is reached, \NFSS{} makes
some additional checks---for example, verifying that substitution
defaults for every encoding scheme point to known font shape group
declarations.
\end{itemize}



\section{If you need to know more \ldots}

\NEWdescription{1996/06/01}
Expand Down
3 changes: 3 additions & 0 deletions base/doc/ltnews31.tex
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ \section{Emphasis handling generalized}

\section{Other changes to the \LaTeX{} kernel}

\emph{added \texttt{alias} size function}

\emph{fixed gh52}

\emph{fixed gh172}
Expand All @@ -259,6 +261,7 @@ \section{Other changes to the \LaTeX{} kernel}
\emph{fixed gh203}



\section{Changes to packages in the \pkg{tools} category}

\emph{fixed gh190}
Expand Down
2 changes: 1 addition & 1 deletion base/latexrelease.ins
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ extension .ins) which are part of the distribution.
\from{fontdef.dtx} {latexrelease}% (covering fontmath and fonttext)
\from{ltfntcmd.dtx} {latexrelease}% empty
\from{ltfssbas.dtx} {latexrelease}%
\from{ltfsstrc.dtx} {latexrelease}% empty
\from{ltfsstrc.dtx} {latexrelease}%
\from{ltfsscmp.dtx} {latexrelease}%
\from{ltpageno.dtx} {latexrelease}% empty
\from{ltxref.dtx} {latexrelease}% empty
Expand Down
40 changes: 37 additions & 3 deletions base/ltfsstrc.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
%
%<package>\NeedsTeXFormat{LaTeX2e}[1995/05/16]
%<package>\ProvidesPackage{tracefnt}
%<package> [2015/02/21 v3.0k Standard LaTeX package (font tracing)]
%<package> [2019/10/11 v3.0l Standard LaTeX package (font tracing)]
% \fi
% \ProvidesFile{ltfsstrc.dtx}
% [2015/02/21 v3.0k LaTeX Kernel (NFSS tracing)]
% [2019/10/11 v3.0l LaTeX Kernel (NFSS tracing)]
%
% \iffalse
%<+checkmem>\CHECKMEM
Expand Down Expand Up @@ -1731,7 +1731,7 @@
% the optional argument (if present) is ignored. The font encoding
% scheme cannot be changed. Therefore, the first thing we do is to
% prepend the encoding scheme.
% \changes{v2.0b}{1992/07/26}{}
% {documentation fixes}
% \begin{macrocode}
\DeclareSizeFunction{sub}{\sub@sfcnt\@font@warning}
\DeclareSizeFunction{ssub}{\sub@sfcnt\@font@info}
Expand Down Expand Up @@ -1787,6 +1787,40 @@
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@font@aliasinfo}
% \changes{v3.0l}{2019/10/11}{Added 'alias' size function}
% Sometimes a substitution is only done to map a long font name to
% a standard shape or series, e.g.,
%\begin{verbatim}
%\DeclareFontShape{T1}{Roboto-LF}{b}{it}{<-> alias * Roboto-LF/bold/it}{}
%\end{verbatim}
% Using the \texttt{ssub} function in that case will give a strange
% (and incorrect) warning. As an alternative we therefore offer the
% size function \texttt{alias}. It will still add some info into
% the \texttt{.log} file, but no longer complains that the font
% shape is not available. It is implemented by grabbing the default
% warning text and replacing it with a new one.
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
%<latexrelease>\IncludeInRelease{2020/02/01}%
%<latexrelease> {\@font@aliasinfo}{alias size function}%
\DeclareSizeFunction{alias}{\sub@sfcnt\@font@aliasinfo}
\def\@font@aliasinfo#1{%
\@font@info{Font\space shape\space `\curr@fontshape'\space
aliased\space to\MessageBreak `\mandatory@arg'}%
}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\@font@aliasinfo}{alias size function}%
%<latexrelease>\let\s@fct@alias\@undefined
%<latexrelease>\let\@font@aliasinfo\@undefined
%<latexrelease>
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\s@fct@subf}
% The |subf| size function allows substitution of another font. The
Expand Down
4 changes: 4 additions & 0 deletions base/testfiles/tlb-latexrelease-003.luatex.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ Skipping: [....-..-..] Font substituation in preamble on input line ....
Applying: [....-..-..] Font substituation in preamble on input line ....
Skipping: [....-..-..] XeTeX support for \showhyphens on input line ....
Applying: [....-..-..] XeTeX support for \showhyphens on input line ....
Skipping: [....-..-..] alias size function on input line ....
Applying: [....-..-..] alias size function on input line ....
Skipping: [....-..-..] NFSS version1 commands on input line ....
Applying: [....-..-..] NFSS version1 commands on input line ....
Skipping: [....-..-..] Add \labelformat and \Ref on input line ....
Expand Down Expand Up @@ -510,6 +512,8 @@ Already applied: [....-..-..] Font substituation in preamble on input line ....
Applying: [....-..-..] XeTeX support for \showhyphens on input line ....
LaTeX Info: Redefining \showhyphens on input line ....
Already applied: [....-..-..] XeTeX support for \showhyphens on input line ....
Skipping: [....-..-..] alias size function on input line ....
Applying: [....-..-..] alias size function on input line ....
Applying: [....-..-..] NFSS version1 commands on input line ....
Already applied: [....-..-..] NFSS version1 commands on input line ....
Applying: [....-..-..] Add \labelformat and \Ref on input line ....
Expand Down
4 changes: 4 additions & 0 deletions base/testfiles/tlb-latexrelease-003.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ Skipping: [....-..-..] Font substituation in preamble on input line ....
Applying: [....-..-..] Font substituation in preamble on input line ....
Skipping: [....-..-..] XeTeX support for \showhyphens on input line ....
Applying: [....-..-..] XeTeX support for \showhyphens on input line ....
Skipping: [....-..-..] alias size function on input line ....
Applying: [....-..-..] alias size function on input line ....
Skipping: [....-..-..] NFSS version1 commands on input line ....
Applying: [....-..-..] NFSS version1 commands on input line ....
Skipping: [....-..-..] Add \labelformat and \Ref on input line ....
Expand Down Expand Up @@ -502,6 +504,8 @@ Already applied: [....-..-..] Font substituation in preamble on input line ....
Applying: [....-..-..] XeTeX support for \showhyphens on input line ....
LaTeX Info: Redefining \showhyphens on input line ....
Already applied: [....-..-..] XeTeX support for \showhyphens on input line ....
Skipping: [....-..-..] alias size function on input line ....
Applying: [....-..-..] alias size function on input line ....
Applying: [....-..-..] NFSS version1 commands on input line ....
Already applied: [....-..-..] NFSS version1 commands on input line ....
Applying: [....-..-..] Add \labelformat and \Ref on input line ....
Expand Down
4 changes: 4 additions & 0 deletions base/testfiles/tlb-latexrelease-003.xetex.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ Skipping: [....-..-..] Font substituation in preamble on input line ....
Applying: [....-..-..] Font substituation in preamble on input line ....
Skipping: [....-..-..] XeTeX support for \showhyphens on input line ....
Applying: [....-..-..] XeTeX support for \showhyphens on input line ....
Skipping: [....-..-..] alias size function on input line ....
Applying: [....-..-..] alias size function on input line ....
Skipping: [....-..-..] NFSS version1 commands on input line ....
Applying: [....-..-..] NFSS version1 commands on input line ....
Skipping: [....-..-..] Add \labelformat and \Ref on input line ....
Expand Down Expand Up @@ -511,6 +513,8 @@ Already applied: [....-..-..] Font substituation in preamble on input line ....
Applying: [....-..-..] XeTeX support for \showhyphens on input line ....
LaTeX Info: Redefining \showhyphens on input line ....
Already applied: [....-..-..] XeTeX support for \showhyphens on input line ....
Skipping: [....-..-..] alias size function on input line ....
Applying: [....-..-..] alias size function on input line ....
Applying: [....-..-..] NFSS version1 commands on input line ....
Already applied: [....-..-..] NFSS version1 commands on input line ....
Applying: [....-..-..] Add \labelformat and \Ref on input line ....
Expand Down

0 comments on commit d9dfee6

Please sign in to comment.