Skip to content

Commit

Permalink
additions to ltnews31; compatibility rule for \upshape; \fontshapefor…
Browse files Browse the repository at this point in the history
…ce and \fontseriesforce added
  • Loading branch information
FrankMittelbach committed Jan 8, 2020
1 parent 3ea69f7 commit cd3c2aa
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,6 +1,8 @@
*.*#
*.*~
*.aux
*.fdb_latexmk
*.fls
*.glo
*.log
*.out
Expand Down
38 changes: 36 additions & 2 deletions base/doc/ltnews31.tex
Expand Up @@ -209,7 +209,16 @@ \subsection{Extending the shape management of NFSS}
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}.

Expand Down Expand Up @@ -482,6 +491,25 @@ \subsection{Ensure that \cs{\textbackslash} remains robust}
\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}

Expand Down Expand Up @@ -513,15 +541,21 @@ \subsection{Ensure that \texttt{multicols} is not losing text}
%
\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?}



Expand Down
42 changes: 41 additions & 1 deletion base/ltfssaxes.dtx
Expand Up @@ -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@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
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -1045,6 +1076,13 @@
% \end{macro}
%
%
% \begin{macro}{\fontshapeforce}
% The unconditional version:
% \begin{macrocode}
\DeclareRobustCommand\fontshapeforce[1]{\edef\f@shape{#1}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\merge@font@shape}
% Look up the database entry (if existing) and act accordingly.
% \begin{macrocode}
Expand Down Expand Up @@ -1156,6 +1194,8 @@
%<latexrelease>
%<latexrelease>\DeclareRobustCommand\fontseries[1]{\edef\f@series{#1}}
%<latexrelease>\DeclareRobustCommand\fontshape [1]{\edef\f@shape{#1}}
%<latexrelease>\let\fontseriesforce\@undefined
%<latexrelease>\let\fontshapeforce\@undefined
%<latexrelease>
%<latexrelease>\let\DeclareFontSeriesChangeRule\@undefined
%<latexrelease>\let\merge@font@series\@undefined
Expand Down

0 comments on commit cd3c2aa

Please sign in to comment.