我希望缩写列表以大写字母打印。但是,我希望正文中的缩写字母为小写字母。我使用glossaries
package 作为以下示例。您能帮忙吗?
\documentclass[a4paper]{report}
\usepackage[style=long, toc, smallcaps]{glossaries}
\makeglossaries
\newacronym{acr}{acr}{Acronym}
\begin{document}
This is an \gls{acr}. An \gls{acr} should be in small caps.
The first column in the follwoing list of acronyms should be in normal caps.
\printglossary[title={List of Acronyms}]
\end{document}
答案1
第 123 页词汇表的用户手册内容如下:
\glossaryentryfield{<label>}{<formatted name>}{<desc>}{<symbol>}{<number list>}
此宏指示对给定的词汇表条目执行的操作。请注意,
<formatted name>
将始终采用 形式\glsnamefont{<name>}
。这允许用户为条目名称设置给定的字体,不管使用的词汇表样式。
考虑到这一点,解决您的问题的一个方法是改变的定义\glsnamefont
:
\documentclass[a4paper]{report}
\usepackage[style=long,smallcaps]{glossaries}
\newacronym{acr}{acr}{Acronym}
\renewcommand{\glsnamefont}[1]{\MakeUppercase{#1}}
\immediate\write18{makeglossaries \jobname} % run (pdf)latex twice with --shell-escape
\makeglossaries
\begin{document}
\gls{acr}; \gls{acr}.
\printglossary[title={List of Acronyms}]
\end{document}
答案2
\acronymfont
改变您想要排版列表时的含义(但我不认为这是一个好主意)。
\documentclass[a4paper]{report}
\usepackage[style=long, toc, smallcaps]{glossaries}
\makeglossaries
\newacronym{acr}{acr}{Acronym}
\begin{document}
This is an \gls{acr}. An \gls{acr} should be in small caps.
The first column in the following list of acronyms should be in normal caps.
\begingroup
\let\clearpage\relax % this line is just not to have a page break
\renewcommand{\acronymfont}[1]{\MakeUppercase{#1}}
\printglossary[title={List of Acronyms}]
\endgroup
\end{document}