Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

enter image description here

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.

share|improve this question
1  
@Sveinung As case-change is a new tag, please consider to replace it with capitalization, or at least to add the latter tag. (BTW, +1 for your answer.) –  lockstep Aug 4 '12 at 13:49
1  
@lockstep Thank you for finding the correct tag. –  Sveinung Aug 4 '12 at 13:52
add comment

1 Answer 1

up vote 7 down vote accepted

The error is due to the fact that classicthesis upper- and lowercase the headings. Try using the package textcase with the overload 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):

\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}

One comment regarding the typography: You should format the acronym as the text, i.e. in spaced small caps (ref:Bringhurst).

share|improve this answer
    
Great, now it works (and I guess it is the same reason why indexes did not work either)! I am not sure I understood your last remark, do you mean I should enclose the acronym with \textsc? Like \acro{GRASP}{\textsc{Greedy Randomized Adaptive Search Procedure}}? Or like \acro{\textsc{GRASP}}{Greedy Randomized Adaptive Search Procedure}? Is there a way to make it automatic? –  Claudio Aug 4 '12 at 14:27
    
In classicthesis acronyms is typeset with space small caps, as Bringhurst recommends in his book. classicthesis has a command, \spacedlowsmallcaps, which do that. I tried to redefined the relevant command in acronym (see section 2.2 in the acronym’s manual), but it did not work. I suggest you ask a new question regarding that, because then one of the gurus for certain will come up with a solution. –  Sveinung Aug 4 '12 at 16:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.