acro 打印单数和复数

acro 打印单数和复数

我定义了一个这样的首字母缩略词:

    \DeclareAcronym{LSTM}{
      short = LSTM ,
      long  = long short-term memory,
      long-plural = long short-term memories
    }

问题:使用\acp{LSTM}打印单数复数形式(即“长短期记忆长短期记忆 (LSTM)“)。

这可能是什么原因呢?

血管内皮生长因子

\documentclass{article}
\usepackage{acro}
\usepackage{mfirstuc}% provides \capitalisewords
\acsetup{
    list-long-format=\capitalisewords,
      extra-style=comma,
      list-style   = lof,
      list-heading = subsubsection*,
      list-short-format={\bfseries},
    only-used=false,
    list-style = longtable}
    
    \DeclareAcronym{LSTM}{
      short = LSTM ,
      long  = long short-term memory,
      long-plural = long short-term memories
    }

\begin{document}
    \acp{LSTM}
\end{document}

答案1

属性long-plural(以及其他复数属性,如short-plural)也许应该称为long-plural-ending。默认情况下,它的值为s,并附加到的值long。因此,缩写定义如下

\DeclareAcronym{LSTM}{
  short = LSTM ,
  long  = long short-term memory
}

会得到长复数long short-term memorys。为了得到不同的形式,你应该这样做

\DeclareAcronym{LSTM}{
  short = LSTM ,
  long  = long short-term memory,
  long-plural-form = long short-term memories
}

它将打印长复数为long short-term memories


如果你这样做

\DeclareAcronym{LSTM}{
  short = LSTM ,
  long  = long short-term memory,
  long-plural = long short-term memories
}

就像在您的 MWE 中一样,long short-term memories它被附加到long short-term memory并导致long short-term memorylong short-term memories

相关内容