2

I'm using the acro package to organize my acronyms. I want to highlight newly introduced acronys by printing the first long form in bold font. However, if the newly introduced acronym is introduced as a plural form, only the name itself is bold, but not the plural "s".

\documentclass[]{article}

\usepackage{acro}
\usepackage{csquotes}

\DeclareAcronym{CD}{
        short = CD ,
        long = Compact Disc ,
        long-format = \textbf
}

\begin{document}
\acp{CD}
\end{document}

The result is Compact Discs (CDs) instead of Compact Discs (CDs).

  • The expected behaior should have a bold s. Did you file a bug report or suggest it tot the package maintainer? – thymaro Jan 14 '18 at 16:11
  • I'm unsure that this is a straight-out bug (if it were, it should be reported directly to bitbucket.org/cgnieder/acro/issues). For long-format=\textbf the s probably should be typeset bold, but (as with the example in the acro documentation) using long-format=\scshape it's likely that the s should be typeset normally rather than as small caps. Probably the addition of some plural-format key to the package is necessary. – Dai Bowen Jan 14 '18 at 18:34
  • I haven't filed a bug report yet, but will do so. Let's see what happens. – W. Alpha Jan 15 '18 at 19:13
2

As of acro v2.8 the format-include-endings key can be used in \acsetup to include the endings in all short-format/long-format commands. This cannot currently be applied on an acronym by acronym basis.

\documentclass{article}
\usepackage{acro}
\acsetup{format-include-endings}

\DeclareAcronym{CD}{
        short = CD ,
        long = Compact Disc,
        long-format = \textbf,
}

\begin{document}
\acp{CD}
\end{document}

Prior to 2.8, or to selectively include endings in the format of certain acronyms only, this can be bodged by (ab)using the long-plural key which expects text only, to be appended to the long form to give the plural form, thus this may well not work perfectly or cease to work without warning. This can be done as

\documentclass{article}
\usepackage{acro}

\DeclareAcronym{CD}{
        short = CD ,
        long = Compact Disc,
        long-format = \textbf,
        long-plural = \textbf{s},
}

\begin{document}
\acp{CD}
\end{document}
| improve this answer | |
  • 1
    There actually is the (apparently undocumented) option format-include-endings – it is, however, buggy and doesn't work :( – cgnieder Jan 23 '18 at 8:34
  • @clemens ah, acro is so thoroughly documented I'm surprised by undocumented features. Do you want me to add something in the answer or just leave it until you can add a better answer? – Dai Bowen Jan 23 '18 at 9:18
  • Maybe wait until I update acro. The option is useless until then – cgnieder Jan 23 '18 at 9:44
  • I just uploaded v2.8 to CTAN with the fix: bitbucket.org/cgnieder/acro/issues/99 – cgnieder Jan 30 '18 at 17:07
  • @clemens am I right in saying it cannot currently be used in \DeclareAcronym so cannot be selectively applied to acronyms yet? – Dai Bowen Feb 3 '18 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.