Bug Tracker
I’m currently working on a major new version of the datatool package. This may take a while. Please be patient. (Experimental version available for testing.)
ID | 40🔗 |
---|---|
Date: | 2013-09-30 15:59:15 |
Status | Closed (Fixed) |
Category | glossaries |
Version | 3.07 |
Summary | \textup on plural not applied with smallcaps and garmondx font |
Sign in to subscribe to notifications about this report.
Description
When using garamondx package and the smallcaps option,\glspl{}
calls (apparently) don't apply the \textup{}
to the \glspluralsuffix
and it remains as a small cap.
My MWE includes a workaround, but I fear this will break something else.
MWE
Download (525B)
\documentclass{article} \usepackage{garamondx} \usepackage[acronym,smallcaps]{glossaries} % % This is a workaround (with line above commented out) % \usepackage[acronym]{glossaries} % \renewcommand*{\newacronymhook}{% % \edef\tmp{\noexpand\textsc{\the\glsshorttok}}% % \expandafter\glsshorttok\expandafter{\tmp}% % } % \renewcommand*{\acrpluralsuffix}{\textup{\glspluralsuffix}} % % End of workaround \newacronym{SNR}{snr}{signal-to-noise ratio} \begin{document} This is the call to the \glspl{SNR}. \end{document}
Evaluation
I could add a check to see if \textulc
has been defined and, if it has, use that instead of \textup
in the definition of \acrpluralsuffix
.
Update 2013-10-09
Added \glstextup
to version 3.09a (experimental release) which checks for the existence of \textulc
. (If another command is required, \glstextup
can be redefined as required.)
Once the new version has stabilized I'll upload it to CTAN.
Update 2013-11-14
I've now uploaded glossaries version 4.0 to CTAN.
Comments
2 comments.
Date: 2013-10-02 10:22:40
I have received the following from the author of Garamondx:
The problems you reported are a consequence of the use of the fontaxes package within garamondx. (The same problems occur with other packages that call fontaxes, such as MinionPro, libertine and fbb.) In over-simplified terms, fontaxes combines the effects of most font-changing commands, so that, for example, \textsc{\textit{a}}}
results in italic small caps a rather than just italic a, as would be normal for the default LaTeX commands. Likewise, \textsc{\textup{a}}
in unmodified LaTeX has the same effect as just \textup{a}
, but with fontaxes, the result is upright small caps.
To solve your problem, fontaxes provides another command, \textulc
, which breaks from enclosing small caps, resulting in upper or lower case text with other attributes (eg, bold, italic) preserved.
If you substitute \textulc
for \textup
in the definition of \acrpluralsuffix
, then you seem to get what you want. Another solution is to redefine \textup
to its normal LaTeX definition, but this might have unforeseen consequences within fontaxes.
And, sure enough, this MWE seems to work:
\documentclass{article} \usepackage{garamondx} \usepackage[acronym,smallcaps]{glossaries} \renewcommand*{\acrpluralsuffix}{\textulc{\glspluralsuffix}} \newacronym{SNR}{snr}{signal-to-noise ratio} \begin{document} This is the call to the \glspl{SNR}. \end{document}
Could this fix be woven into the next release of glossaries?
Thank you.
Add Comment
Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=40
Date: 2013-10-02 10:22:40
This is not a glossaries bug.
My apologies. This line:
doesn't work in the above MWE either, so I guess it's a garamondx problem.