大写字母部分

大写字母部分

对于不是专有名词的短语,我希望每个单词的首字母不大写,除非它是句子的开头,在这种情况下短语的首字母大写。但这不适用于acro。此代码如下。

\documentclass{article}
\usepackage{acro}

% class `abbrev': abbreviations:
\DeclareAcronym{CNO}{
  short = CNO ,
  long  = Clasificador Nacional de Ocupaciones ,
  class = acro
  }


% class `nomencl': nomenclature
\DeclareAcronym{e0}{
  short = \ensuremath{e_0} ,
  long  = Esperanza de vida al nacer ,
  sort  = e_0 ,
  class = nomencl
  }


\begin{document}
\section*{List of acronyms}
\addcontentsline{lof}{section}{List of acronyms}

\ac{evn} Si yo vengo escribien y el \ac{CNO} aperece primero y luego \ac{CNO}, \ac{ONU} and \ac{evn} are abbreviations whereas \ac{e0}.

\printacronyms

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

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

\printacronyms[include-classes=acro,name=Acronimos]

\end{document}

答案1

这似乎可以实现你想要的效果:

\documentclass{article}
\usepackage{acro}
\usepackage{mfirstuc}% provides \capitalisewords

\acsetup{
  uc-cmd = \capitalisewords ,
  list-caps = true
}
\MFUnocap{de}% prevent `de' from being capitalised

% class `abbrev': abbreviations:
\DeclareAcronym{CNO}{
  short = CNO ,
  long  = clasificador nacional de ocupaciones ,
  class = acro
}

% class `nomencl': nomenclature
\DeclareAcronym{e0}{
  short = \ensuremath{e_0} ,
  long  = {{esperanza de vida al nacer}} , % two sets of braces!
  sort  = e_0 ,
  class = nomencl
}


\begin{document}

\Ac{CNO} foo. Pero si \ac{e0} bar

\bigskip

\acf{CNO} vs \Acf{CNO} \par
\acf{e0} vs \Acf{e0}

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

\printacronyms[include-classes=acro,name=Acronimos]

\end{document}

在此处输入图片描述

答案2

如果我理解正确的话,您正在寻找\Ac{}必须在句子开头使用的命令。

% arara: pdflatex

\documentclass{article}
\usepackage{acro}
\DeclareAcronym{CNO}{
  short = CNO ,
  long  = Clasificador Nacional de Ocupaciones
  }
\DeclareAcronym{e0}{
  short = \ensuremath{e_0} ,
  long  = esperanza de vida al nacer ,
  sort  = e_0
  }

\begin{document}
\Ac{CNO} foo. \Ac{e0} bar, \ac{CNO} foo \ac{e0} bar.
\end{document}

如果您正在谈论首字母缩略词列表的大写形式的问题,您可以尝试:

\let\firstchar\lowercase
\let\oldprintacronyms\printacronyms
\def\printacronyms{\let\firstchar\uppercase\oldprintacronyms}

\DeclareAcronym{e0}{ short = \ensuremath{e_0} , long = \firstchar{e}speranza de vida al nacer , sort = e_0 } 

相关内容