使用“acro”包缩写时出错

使用“acro”包缩写时出错

当我尝试使用acro它来生成缩写和术语时,我得到了以下错误和警告。我还附上了下面的代码供您参考。我目前使用 MiKTeX Console 2.9.7429 和 texstudio 2.12.22。

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.

我的代码是:

\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}

我认为最后两个 \printacronyms[]语句 include-classes有问题。因此,和都alphaWab缩写和术语打印出来,如下所示。

在此处输入图片描述

在此处输入图片描述

在此处输入图片描述

非常感谢您的帮助!

答案1

软件包版本 3acro对用户界面进行了相当大的更改。要使您的示例代码(为版本 2 编写)可编译,请在所有命令class中用替换(这正是四个警告告诉您要做的操作)。要消除错误消息,请将选项替换为。tag\DeclareAcronyminclude-classes=...include=...

以下是完整的 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}

相关内容