I have troubles using acronym package with classicthesis package when I put an acronym in a section name. The least reproducible example I could come up with is this:
\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}
If I run Latex (three times) I got this warning:
...
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
...
And in the PDF the section title says grasp!
, while other entries are correctly replaced with the acronym.
The only related line I found in the log file (is that the transcript file?) says this:
Package acronym Info: Label `acro:GRASP' newly defined as it shall be overridden
although it is yet undefined on input line 27.
But I have no idea how to fix it.
If I comment out the two classicthesis related lines everything is fine.
Best Answer
The error is due to the fact that
classicthesis
upper- and lowercase the headings. Try using the packagetextcase
with theoverload
option and enclose the acronym-command with a\NoCaseChange
in titles and heading. This MWE compiled fine for me (only one warning regarding an overfull box):One comment regarding the typography: You should format the acronym as the text, i.e. in spaced small caps (ref:Bringhurst).