-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Due to a quirk in pdftex (see https://mailman.ntg.nl/pipermail/ntg-pdftex/2022-February/004340.html), the test for font equality in \es@xlsc can under some circumstances yield a wrong result. As this issue probably won't be fixed in pdftex, I suggest to change the test from comparing the fonts' \csname to their \fontname:
\documentclass{book}
\usepackage[spanish]{babel}
\usepackage{microtype}
\makeatletter
\def\es@xlsc#1#2#3{%
\leavevmode
\hbox{%
\scshape\selectfont
\expandafter\ifx\csname\f@encoding/\f@family/\f@series
/n/\f@size\expandafter\endcsname
\csname\curr@fontshape/\f@size\endcsname
% --- instead of the above three lines:
% \edef\@tempa{\expandafter\fontname\csname\f@encoding/\f@family/\f@series/n/\f@size\endcsname}%
% \edef\@tempb{\expandafter\fontname\csname\curr@fontshape/\f@size\endcsname}%
% \ifx\@tempa\@tempb
\csname S@\f@size\endcsname
\fontsize\sf@size\z@\selectfont
\PackageWarning{spanish}{Replacing `\curr@fontshape' by
\MessageBreak faked small caps}%
#1{#3}%
\else
#2{#3}%
\fi}}
\makeatother
\begin{document}
\frontmatter
\tableofcontents
\chapter{A}
\mainmatter
\chapter{B}
\end{document}
(I haven't really checked whether \@tempa and \@tempb are safe to use here.)
The above is a more minimised version of the example from here: https://tex.stackexchange.com/questions/633441
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels