cgnieder / acro

acronyms for LaTeX
LaTeX Project Public License v1.3c
41 stars 9 forks source link

Option single not working #175

Closed dersimn closed 4 years ago

dersimn commented 4 years ago

No matter if one or two \ac appear in the text, and no matter how I specify the single option, it always prints fooooooo baaaaaar (foo bar) in text.

\documentclass{article}

\usepackage{acro}

\DeclareAcronym{fb}{
    %single = true,
    %single = false,
    short = foo bar,
    long = fooooooo baaaaaar,
}

\begin{document}
\ac{fb}
%\ac{fb}

\vspace{5cm}
\printacronyms
\end{document}

Build with:

xelatex test.tex
xelatex test.tex

If I understand the documentation right, the default is single = false i.e. having only one occurrence of an acronym should not put it onto the Acronym list (and only print the long form at this once occurrence)?

cgnieder commented 4 years ago

You have mistaken the single property for the single option. The former is described as:

single = {<text>} If provided <text> will be used instead of the long form if the acronym is only used a single time and the option single has been set […].

There is still a bug: the single option works but the single property is not used :(

\documentclass{article}

\usepackage{acro}
\acsetup{single=true}

\DeclareAcronym{fb}{
  single = single description ,
  short = foo bar ,
  long = fooooooo baaaaaar
}

\begin{document}

\ac{fb}

\printacronyms

\end{document}

image