Acro 仅打印一个班级的最终条目

Acro 仅打印一个班级的最终条目

我尝试打印所有通过定义的首字母缩略词\DeclareAcronym(不仅仅是全文中提到的首字母缩略词),但只打印了命名法部分的最后一个首字母缩略词(无论它是哪一个)。为什么会发生这种情况?我该怎么做才能解决这个问题?

以下是我的序言中包含的 acro:

\usepackage[]{acro}           % to make acronym/symbol glossary
\acsetup{}
\acuseall

我的symbols-page.tex

\printacronyms[include-classes=abbrev,name=Abbreviations]
\printacronyms[include-classes=nomencl,name=Nomenclature]

在我的symbols.tex

% class `abbrev': abbreviations:
\DeclareAcronym{crf}{
  short = CRF ,
  long  = conditional random field ,
  class = abbrev
}

...

\DeclareAcronym{voi}{
  short = VOI ,
  long  = value of information ,
  class = abbrev
}

\DeclareAcronym{dmtsp}{
  short = DMTSP ,
  long  = dynamic multi-target search problem ,
  class = abbrev
}


% class `nomencl': nomenclature

\DeclareAcronym{k}{
  short = $k$ ,
  long  = Discrete time index ,
  sort  = a ,
  class = nomencl
}

...

\DeclareAcronym{X_k}{
  short = $X_k$ ,
  long  = $n$-dimensional vector of state variables at time $k$ ,
  sort  = a ,
  class = nomencl
}

\DeclareAcronym{D_k}{
  short = $D_k$ ,
  long  = Random variable of softmax class selected at time $k$ ,
  sort  = a ,
  class = nomencl
}

答案1

您的类命名法的首字母缩写都包含字段sort = a。显然,此字段必须具有唯一值,否则第二个条目将覆盖第一个条目,第三个条目将覆盖第二个条目。删除 -fields sort,或将其更改为如下内容:

\DeclareAcronym{k}{
  short = $k$ ,
  long  = Discrete time index ,
  sort  = a ,
  class = nomencl
}

\DeclareAcronym{X_k}{
  short = $X_k$ ,
  long  = $n$-dimensional vector of state variables at time $k$ ,
  sort  = b ,
  class = nomencl
}

\DeclareAcronym{D_k}{
  short = $D_k$ ,
  long  = Random variable of softmax class selected at time $k$ ,
  sort  = c ,
  class = nomencl
}

答案2

此错误行为已在 v2.6 中修复:

\documentclass{article}

\usepackage{acro}[2016/07/20] % v2.6 or newer
\DeclareAcronym{foo}{
  short = f ,
  long  = foo ,
  sort = a
}
\DeclareAcronym{bar}{
  short = b ,
  long  = bar ,
  sort = d
}
\DeclareAcronym{baz}{
  short = bz ,
  long  = baz ,
  sort = a
}

\begin{document}

\acuseall

\printacronyms

\end{document}

在此处输入图片描述

相关内容