[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: additions to ltnews31; compatibility rule for \upshape; \fontshapeforce and \fontseriesforce added (cd3c2aab)

Frank Mittelbach frank.mittelbach at latex-project.org
Wed Jan 8 14:35:58 CET 2020


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

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

commit cd3c2aab9f74ecb1a02b607ccad45e35875c80c3
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Wed Jan 8 14:35:58 2020 +0100

    additions to ltnews31; compatibility rule for \upshape; \fontshapeforce and \fontseriesforce added


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

cd3c2aab9f74ecb1a02b607ccad45e35875c80c3
 .gitignore            |  2 ++
 base/doc/ltnews31.tex | 38 ++++++++++++++++++++++++++++++++++++--
 base/ltfssaxes.dtx    | 42 +++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 79 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index f87ea66e..afc5e7f7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,8 @@
 *.*#
 *.*~
 *.aux
+*.fdb_latexmk
+*.fls
 *.glo
 *.log
 *.out
diff --git a/base/doc/ltnews31.tex b/base/doc/ltnews31.tex
index a6f21148..321dd947 100644
--- a/base/doc/ltnews31.tex
+++ b/base/doc/ltnews31.tex
@@ -209,7 +209,16 @@ 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
+with respect to italics, slanted or swash.
+%
+There is one exception: for compatibility reasons \cs{upshape} will
+change small capitals back to upright (\texttt{n} shape), if the
+current shape is \texttt{sc}. This is done so that something like
+\cs{scshape}\allowbreak\texttt{...}\allowbreak\cs{upshape} continues
+to work, but we suggested that you don't use that deprecated method in
+new documents.
+
+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}.
 
@@ -482,6 +491,25 @@ typesetting was used.
 \githubissue{203}
 
 
+\subsection{Allow more write streams with   \texttt{filecontents} in \LuaTeX}
+
+\emph{write}
+%
+\githubissue{238}
+
+
+
+
+\section{Changes to packages in the \pkg{graphics} category}
+
+\subsection{Make color/graphics user-level commands robust}
+
+\emph{write}
+%
+\githubissue{208}
+
+
+
 
 \section{Changes to packages in the \pkg{tools} category}
 
@@ -513,15 +541,21 @@ registers available.
 %
 \githubissue{237}
 
+\subsection{Allow spaces in \cs{hhline} arguments}
 
+\emph{write}
+%
+\githubissue{242}
 
-\section{Changes to packages in the \pkg{amsmath} category}
 
+\section{Changes to packages in the \pkg{amsmath} category}
 
+\emph{anything?}
 
 
 \section{Documentation updates}
 
+\emph{anything?}
 
 
 
diff --git a/base/ltfssaxes.dtx b/base/ltfssaxes.dtx
index 225cf649..62c97f38 100644
--- a/base/ltfssaxes.dtx
+++ b/base/ltfssaxes.dtx
@@ -682,6 +682,18 @@
 
 % \subsection{Changing to a new series}
 %
+
+%  \begin{macro}{\fontseriesforce}
+%    To change unconditionally to a new series you can use
+%    \cs{fontseriesforce}. If course, if the series doesn't exist for
+%    the current family substitution still happens, but there is not
+%    dependency on the current series.
+%    \begin{macrocode}
+\DeclareRobustCommand\fontseriesforce[1]{\edef\f at series{#1}}
+%    \end{macrocode}
+%  \end{macro}
+%
+%
 %  \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
@@ -981,7 +993,26 @@
 \DeclareFontShapeChangeRule {sc}{sw}  {scsw}  {sw}   
 %\DeclareFontShapeChangeRule {sc}{sc}  {sc}    {}
 \DeclareFontShapeChangeRule {sc}{ulc} {n}     {}
-\DeclareFontShapeChangeRule {sc}{up} {sc}     {}
+%    \end{macrocode}
+%
+%    The next rule might be a bit surprising and rightly so. Correct
+%    would be that \texttt{sc} is not affected by \texttt{up}, i.e.,
+%    remains \texttt{sc} as showed in the commented out rule. However,
+%    for nearly three decades commands such as \upshape{sc} or
+%    \cs{textup} changed small caps back to the ``normal'' shape. So
+%    for backward compatibility we keep hat behavior.
+%
+%    As a result you are currently typesetting in \texttt{scit} or
+%    \texttt{scsl} using \cs{upshape} twice will return you to the
+%    normal shape too, the first will change to \texttt{sc} and the
+%    second (because of the rule below) change that to
+%    \texttt{n}. This is the way \texttt{fontspec} implemented its
+%    version on this interface, so this rule means we are also
+%    compatible with the way \texttt{fontspec} behaved. Still it
+%    remains an odditywhic I would rather liked to have avoided.
+%    \begin{macrocode}
+%\DeclareFontShapeChangeRule {sc}{up} {sc}     {}
+\DeclareFontShapeChangeRule {sc}{up} {n}     {}
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -1045,6 +1076,13 @@
 %  \end{macro}
 %
 %
+%  \begin{macro}{\fontshapeforce}
+%    The unconditional version:
+%    \begin{macrocode}
+\DeclareRobustCommand\fontshapeforce[1]{\edef\f at shape{#1}}
+%    \end{macrocode}
+%  \end{macro}
+%
 %  \begin{macro}{\merge at font@shape}
 %    Look up the database entry (if existing) and act accordingly.
 %    \begin{macrocode}
@@ -1156,6 +1194,8 @@
 %<latexrelease>
 %<latexrelease>\DeclareRobustCommand\fontseries[1]{\edef\f at series{#1}}
 %<latexrelease>\DeclareRobustCommand\fontshape [1]{\edef\f at shape{#1}}
+%<latexrelease>\let\fontseriesforce\@undefined
+%<latexrelease>\let\fontshapeforce\@undefined
 %<latexrelease>
 %<latexrelease>\let\DeclareFontSeriesChangeRule\@undefined
 %<latexrelease>\let\merge at font@series\@undefined





More information about the latex3-commits mailing list