[Tex/LaTex] How to combine hyperref and classicthesis without errors using (dvi)latex.

classicthesisdvihyperref

I'm trying to get this document to work using the latex command.

\documentclass{scrreprt}
\usepackage[english]{babel}
\usepackage{subfig}
\usepackage{hyperref}
\usepackage{classicthesis}%
\begin{document}
\chapter{Intro}
\label{chap:intro}
\end{document}

I keep running into the following error:

(/usr/local/texlive/2010/texmf-dist/tex/latex/microtype/mt-ppl.cfg)
Chapter 1.
! Use of \@chapter doesn't match its definition.
\@uclclist ->\oe 
                 \OE \o \O \ae \AE \dh \DH \dj \DJ \l \L \ng \NG \ss \SS \th...
l.7 \chapter{Intro}

I know it's the combination of hyperref and classicthesis that causes this, but I don't know a good way around it other then disabling hyperref. Does anybody have an elegant way to make this example work?

Best Answer

classicthesis loads the package hyperref by using pdflatex. By latex-ps-pdf the packages decides not to load hyperref and to disclaim some features.

\documentclass{scrreprt}
\usepackage[english]{babel}
\usepackage{subfig}

\let\myoldchap=\chapter
\usepackage{classicthesis}%
\usepackage{hyperref}
\renewcommand{\tocEntry}[1]{% for bib, etc.
 \texorpdfstring{\spacedlowsmallcaps{#1}}{#1}%
    }


\renewcommand*{\chapter}{\secdef{\Chap}{\ChapS}}
\renewcommand\ChapS[1]{\myoldchap*{#1}}%
\renewcommand\Chap[2][]{%
    \myoldchap[\texorpdfstring{\spacedlowsmallcaps{#1}}{#1}]{#2}%
         }


\begin{document}
\chapter{Intro}
\label{chap:intro}
\end{document}

The order is very important. First save the orig-chapter before loading classicthesis which also redefines chapter

Related Question