acro icon indicating copy to clipboard operation
acro copied to clipboard

Feature request: Local acronym reset inside `\caption`

Open SamThilmany opened this issue 4 months ago • 0 comments

Hi Clemens,

thank you for maintaining the excellent acro package! I would like to suggest a feature that could be very useful in academic publishing.

Motivation

Many academic journals require that all abbreviations be spelled out in captions, even if they have already been defined in the main text. At the same time, in the body of the text, acronyms are usually only expanded on first use.

Currently, with acro, this means the user has to remember to manually use \acl{} in the caption the first time, and then switch back to \ac{} for later uses. This is error-prone and easy to forget.

Feature request

It would be very helpful if acro could “reset” acronym usage locally within a \captioni.e., inside both the optional short caption and the mandatory long caption arguments. That way, within each caption, acronyms would behave as though they are being used for the first time:

  • the first occurrence expands the acronym fully,
  • subsequent occurrences in the same caption use the short form.

Example (desired behavior)

\DeclareAcronym{cd}{
    short = CD ,
    long  = Compact Disc
}

\begin{figure}
    \includegraphics{example}
    \caption[Illustration of a \ac{cd}]
            {Illustration of a \ac{cd} with labeling of the reflective surface of the \ac{cd}.}
\end{figure}

Desired result:

  • Short caption → “Illustration of a Compact Disc (CD)”
  • Long caption → “Illustration of a Compact Disc (CD) with labeling of the reflective surface of the CD.”

while still allowing the document body to use acronyms independently of caption usage.

Benefits

  • Fewer user errors when preparing journal submissions
  • Cleaner workflow for authors who must adhere to journal style guides
  • Consistency across figures and tables

Thanks for considering this feature!

SamThilmany avatar Aug 25 '25 11:08 SamThilmany