我有使用问题缩写包装经典论文当我在部分名称中放入首字母缩写词时,我通常会使用 package 来表示。我能想到的最难复制的示例是:
\documentclass{scrreprt}
% If I remove the option 'pdfspacing' I got this error:
%
% ! Argument of \@acl has an extra }.
% <inserted text>
% \par
%l.21 \section{\acl{GRASP}}
\usepackage[pdfspacing]{classicthesis}
\usepackage{acronym}
\begin{document}
\tableofcontents{}
\chapter{Algorithms}
Details about algorithms.
\section{\acl{GRASP}}
Initial solutions are constructed using \ac{GRASP}.
\chapter{Acronyms}
\begin{acronym}
\acro{GRASP}{Greedy Randomized Adaptive Search Procedure}
\end{acronym}
\end{document}
如果我运行 Latex(三次),我会收到以下警告:
...
Package acronym Warning: Acronym `grasp' is not defined on input line 25.
LaTeX Font Warning: Font shape `OT1/pplj/bx/sc' undefined
(Font) using `OT1/pplj/bx/n' instead on input line 25.
[2]
Chapter 2.
[3] (C:\Users\claudio\Desktop\text\thesis.aux)
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
)
(see the transcript file for additional information)pdfTeX warning (dest): name
{GRASP} has been referenced but does not exist, replaced by a fixed one
...
并且在 PDF 中,章节标题为grasp!
,而其他条目则正确地用首字母缩略词替换。
我在日志文件(那是记录文件吗?)中找到的唯一相关行是这样的:
Package acronym Info: Label `acro:GRASP' newly defined as it shall be overridden
although it is yet undefined on input line 27.
但我不知道如何解决这个问题。
如果我注释掉与 classicthesis 相关的两条线,一切都很好。
答案1
错误是由于classicthesis
标题的大小写问题造成的。尝试使用textcase
带有overload
选项的包,并在标题和标题中使用 a 括住缩写命令\NoCaseChange
。这个 MWE 对我来说编译得很好(只有一个关于框过满的警告):
\documentclass{scrreprt}
\usepackage[overload]{textcase}
\usepackage[pdfspacing]{classicthesis}
\usepackage{acronym}
\begin{document}
\tableofcontents{}
\chapter{Algorithms}
Details about algorithms.
\section{\NoCaseChange{\acl{GRASP}}}
Initial solutions are constructed using \ac{GRASP}.
\chapter{Acronyms}
\begin{acronym}
\acro{GRASP}{Greedy Randomized Adaptive Search Procedure}
\end{acronym}
\end{document}
关于排版的一个评论:您应该将首字母缩略词格式化为文本,IE. 用间隔小写字母 (参考:布林赫斯特)。