[Tex/LaTex] Error while using “acro” package for abbreviations

acro

When I tried using acro for generating abbreviations and nomenclature, I got the following errors and warnings. I also attached the code below for your reference. I use MiKTeX Console 2.9.7429 and texstudio 2.12.22 currently.

LaTeX3 Error: The key 'acro/list/include-classes' is unknown and is being(LaTeX3) ignored. ...include-classes=abbrev, name=Abbreviation]
LaTeX3 Error: The key 'acro/list/include-classes' is unknown and is being(LaTeX3) ignored. ...include-classes=nomencl,name=Nomenclature]
On line 6:(acro) The property `class' is deprecated. Use property `tag'(acro) instead.
On line 11:(acro) The property `class' is deprecated. Use property `tag'(acro) instead.
On line 16:(acro) The property `class' is deprecated. Use property `tag'(acro) instead.
On line 20:(acro) The property `class' is deprecated. Use property `tag'(acro) instead.
On line 24:(acro) The property `class' is deprecated. Use property `tag'(acro) instead.

My code is:

\documentclass{report}
\usepackage{acro}
\DeclareAcronym{alpha}{
    short = \ensuremath{\alpha},
    long  = Dyadic Dilation,
    class = nomencl}
\DeclareAcronym{v}{
    short = \ensuremath{v},
    long  = Velocity,
    class = nomencl}
\DeclareAcronym{V}{
    short = \ensuremath{V},
    long  = Volume,
    class = nomencl}
\DeclareAcronym{Wab}{
    short = \ensuremath{W_{(\alpha,b)}},
    long  = Wavelet Coefficients,
    class = abbrev}
\DeclareAcronym{VHDL}{
    short = VHDL,
    long  = VHSIC Hardware Description Language,
    class = abbrev}
\begin{document}
    \ac{alpha}\\ \ac{Wab}
    \printacronyms[include-classes=abbrev, name=Abbreviation]
    \printacronyms[include-classes=nomencl,name=Nomenclature]
\end{document}

I think in the last two \printacronyms[] statements, include-classes is giving problem. Because of which, both alpha and Wab is printed in both abbreviation and nomenclature as shown below.

enter image description here

enter image description here

enter image description here

Any help is well appreciated!

Best Answer

With version 3 of the acro package quite some changes to the user interface were made. To make your example code (which was written for version 2) compilable, replace class with tag in all \DeclareAcronym commands (This is exactly what the four warnings tell you to do). To also get rid of the error messages, replace the include-classes=... options with include=....

Here is the complete MWE:

\documentclass{report}
\usepackage{acro}
\DeclareAcronym{alpha}{
    short = \ensuremath{\alpha},
    long  = Dyadic Dilation,
    tag   = nomencl}
\DeclareAcronym{v}{
    short = \ensuremath{v},
    long  = Velocity,
    tag   = nomencl}
\DeclareAcronym{V}{
    short = \ensuremath{V},
    long  = Volume,
    tag   = nomencl}
\DeclareAcronym{Wab}{
    short = \ensuremath{W_{(\alpha,b)}},
    long  = Wavelet Coefficients,
    tag   = abbrev}
\DeclareAcronym{VHDL}{
    short = VHDL,
    long  = VHSIC Hardware Description Language,
    tag   = abbrev}
\begin{document}
    \ac{alpha}\\ \ac{Wab}
    \printacronyms[include=abbrev, name=Abbreviation]
    \printacronyms[include=nomencl,name=Nomenclature]
\end{document}
Related Question