3

I'm using ClassicThesis with the acronym package like this (MWE):

\documentclass{scrbook}
\usepackage{classicthesis}
\usepackage{acronym}
\begin{document}
\begin{acronym}
\acro{MAP}{Maximum A Posteriori}
\end{acronym}
Document text with an acronym: \ac{MAP}.
\end{document}

When compiling with pdflatex in Linux (three times), I get this kind of warning:

pdfTeX warning (dest): name{MAP} has been referenced but does not exist, replaced by a fixed one

I checked Acronyms in section names with classic thesis and Classicthesis: Capital abbreviations for acronyms in Acronym section, but those are slightly different questions due to ClassicThesis changing the case in headings. Instead, I get that kind of warning consistently for all acronyms (uppercase, lowercase and mixed case).

I attempted \PassOptionsToPackage{printonlyused,smaller}{acronym} as in the example file classicthesis-config.tex, but that does not seem to remove the warning. I'm not even sure that \PassOptionsToPackage is the best solution. Any suggestion? (In my full document I also need to load package hyperref.)

1
  • This seems to be clearly the fault of classicthesis . Removing it and loading hyperref directly works. classicthesis is often the cause of errors. Don't use it!
    – user31729
    Jan 16, 2017 at 20:47

1 Answer 1

4

Not so ugly workaround:

\documentclass{scrbook}

\usepackage{classicthesis}
\usepackage{acronym}
\usepackage{etoolbox}

\makeatletter
\AtBeginEnvironment{acronym}{%
  \def\NRorg@descriptionlabel#1{\hspace{\labelsep}#1}%
  \setkomafont{descriptionlabel}{\normalfont}%
  \renewcommand*{\aclabelfont}[1]{\spacedlowsmallcaps{#1}}%
}
\makeatother

\begin{document}

\begin{acronym}
\acro{MAP}{Maximum A Posteriori}
\end{acronym}

Document text with an acronym: \ac{MAP}.

Document text with an acronym: \ac{MAP}.

\end{document}

Apparently, classicthesis redefines \descriptionlabel in a way that produces conflicts.

4
  • Yes it does redefine it. I was just about to provide basically the same answer.
    – user31729
    Jan 16, 2017 at 21:20
  • @ChristianHupfer Found a much less ugly one
    – egreg
    Jan 16, 2017 at 21:31
  • Thanks! Now I have a problem with \aclabelfont, because I'm still using TeXLive 2013. I'll update and try again. Jan 16, 2017 at 23:02
  • The workaround works perfectly with TeXLive 2016 in Ubuntu 14.04, thanks again. Jan 18, 2017 at 11:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .