Latest news 2019-12-05: new blog post "RSS Feeds and Other Notifications."

Bug Tracker

ID40
StatusClosed (Fixed)
Categoryglossaries
Version3.07
Summary\textup on plural not applied with smallcaps and garmondx font

Report

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.

Karl

MWE

\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}

Comment from Karl
Date: 2013-10-01 05:05:27 CDT

This is not a glossaries bug.

My apologies. This line:

This is the \textsc{c\textup{a}ll}.

doesn't work in the above MWE either, so I guess it's a garamondx problem.

Comment from Karl
Date: 2013-10-02 04:22:40 CDT

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.

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.

Add comment.

Watch This Report

If you would like to be notified whenever updates are made to this report, please fill in your email address in the box below and click on "Notify Me of Changes" button. (Please ensure the address is valid.) Your details won't be passed on to third parties in line with this site's Privacy Policy.

If you supply your name, it will be used in the email greeting, which provides a more personal message, otherwise you'll just get a generic greeting. If you have previously supplied your name when signing up for notifications, you don't need to resupply it unless you want to change it.

If you have previously subscribed to notifications for this report, you can unsubscribe by clicking on the "Stop Notification" button.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional.)
E mail:
Confirm E mail:
Confirm Bug ID:

To unsubscribe from all notifications use the notifications page.

Comment

You can append a comment to the report using the form below. Comments are checked first before being added. Any spam or offensive content will be removed first according to this site's Terms of Website Use. Please bear in mind that I develop and maintain free software in my spare time. If you want commerical level support then you can hire a TeX consultant.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional. If provided, it will be shown with the comment.)
Confirm Bug ID:

You can use the following markup:

[pre]Displayed verbatim[/pre]
[tt]monospace text[/tt]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

Click on the Preview button to preview the message.

Return to list.

© 2019 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs