Latest news 2021-06-05: New blog post: Dickimaw Books Site Account.

Bug Tracker

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.

🔗Comment from Karl
Date: 2013-10-02 10:22:40

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.
Replying to Comment #14:

Name (optional):

Are you human? Please confirm the bug report ID (which can be found at the top of this page) or login if you have an account.

Comment:

You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

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

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

You can use the Preview button to review your message formatting before submitting.

🔗Comment from Karl
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.

Replying to Comment #15:

Name (optional):

Are you human? Please confirm the bug report ID (which can be found at the top of this page) or login if you have an account.

Comment:

You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

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

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

You can use the Preview button to review your message formatting before submitting.


Add Comment

Name (optional):

Are you human? Please confirm the bug report ID (which can be found at the top of this page) or login if you have an account.

Comment:

You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

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

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

You can use the Preview button to review your message formatting before submitting.

Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=40