1

I have different words with same acronym (FE finite element/ferroelectric). I've found two similar discussions, though none of them were using acro package. I was wondering is it possible to do it with acro? Thanks!

Acronyms for same abbreviations with different meaning

Same acronym for two words

4
  • @wayne can you please explain what you mean by “do it” mean? Two acronyms can easily have the same short form if that's what you mean.
    – cgnieder
    Commented Jan 20, 2021 at 19:03
  • It gives error if I \DeclareAcronym{A} for both "a" and "aa".
    – wayne
    Commented Jan 23, 2021 at 19:03
  • @wayne I'm sorry, without an @mention I'm not notitified about your comment. I still don't understand what you want: you can do \DeclareAcronym{xx}{ short = xx , long = bla} and \DeclareAcronym{yy}{ short = xx , long = blub}. Can't you give a real world example about what you want to achieve?
    – cgnieder
    Commented Jan 29, 2021 at 19:09
  • Hi, what you suggest gives two item in the list: - xx bla, xx blub. Though what I want is one item in the list as: xx bla/blub
    – wayne
    Commented Jan 30, 2021 at 0:16

1 Answer 1

2

We can define two acronyms with a common short form, and then exclude one from the list and redefine how the other appears to essentially merge them in the list entry.

\documentclass{article}
\usepackage{acro}

\DeclareAcronym{xx}{
    short = xx,
    long = blah,
    list = blah/blub,
}
\DeclareAcronym{yy}{
    short = xx,
    long = blub,
    tag = dupe,
}

\begin{document}

Foo \ac{xx} bar \ac{yy}
bat \ac{xx} baz \ac{yy}

\printacronyms[exclude={dupe}]
\end{document}

This is essentially an abuse of design and probably for good reason as the two acronyms share a short form making the short form ambiguous (it's possible if the acronyms share a short-form due to a close similarity then this is an xy question and can be better implemented in acro in a more intended manner). As such the two definitions are closely interconnected and a change to one may require an update to the other.

Unintended consequences may also happen if trying to use the single key, although they could in principle be accounted for using the likes of \acuse and \acroifused.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .