Latest news 2025-07-09: New blog post: The Problem of Name Clashes and Lost Resources for Digital Historians (RISC OS ARMTeX).

Bug Tracker RSS feed

ID 307🔗
Date: 2025-06-29 14:29:08
Last update: 2025-07-01 09:39:11
Status Open
Sign in if you want to bump this report.
Category glossaries
Version 4.53
Summary Acronym commands prevent kerning

Return to Search Results

Sign in to subscribe to notifications about this report.

Description

Without using the package, there is negative kerning between "P." (\kern-0.83334 in the .log).
With acronym commands, which expand to the same text, kerning between "P." is prevented.

This is analogous to https://tex.stackexchange.com/questions/680723/acro-package-bug-with-kerning, but with the glossaries package.

MWE

Download (173B)

\documentclass{article}
\usepackage[nomain,acronym]{glossaries}

\newacronym{op}{OP}{Operator}

\begin{document}

\showoutput

OP. foo.

\acrshort{op}. foo.

\end{document}

Evaluation

The problem is the same as that mentioned in the referenced TeX on StackExchange question for the acro package. It can be demonstrated with \index which is essentially the same mechanism as used by both glossaries and acro:

\documentclass{article}

\begin{document}

\showoutput

OP.

OP\index{OP}.

\end{document}
However, the problem is not just the indexing whatsit but also the first use conditional, which can be demonstrated with:
\documentclass{article}

\begin{document}
\newif\iffirstuse
\firstusetrue

\showoutput

OP.

OP\firstusefalse.

\end{document}
The indexing whatsit can be moved to the start with glossaries-extra's wrgloss setting:
\usepackage[nomain,acronym]{glossaries-extra}

\setabbreviationstyle[acronym]{short-long}

\newacronym{op}{OP}{Operator}

\GlsXtrSetDefaultGlsOpts{wrgloss=before}
However, the conditional can only be changed after the link text because the link text depends on that conditional. This unfortunately means that there's no fix for this issue.

The only workaround is to move the punctuation into the link text with the final optional argument. For example, with just the base glossaries package:

\acroshort{op}[.]
Or with glossaries-extra:
\glsxtrshort{op}[.]
Or with either:
\gls{op}[.]

Comments

0 comments.


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. All guest comments have to be manually checked before they appear on the page. There are too many bots trying to spam the site to allow unauthenticated users to post without verification.

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=307

Return to Search Results