5

Why the headlines in the TOC are in \normalfont and not in \spacedlowsmallcaps as the rest of the document? How can I make it \spacedlowsmallcaps?

\documentclass[%
                headinclude,%
                footinclude,%
                10pt,%
%               openany%
                ]{scrbook}

\usepackage[%
            pdfspacing%
            ]{classicthesis}

\begin{document}
\pagestyle{scrheadings}
\tableofcontents
\chapter{graphic test}
\section{graphic test}
\section{graphic test}
\chapter{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\chapter{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\chapter{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\chapter{graphic test}
\section{graphic test}
\chapter{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\chapter{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\chapter{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\chapter{graphic test}
\section{graphic test}
\chapter{graphic test}
\section{graphic test}
\chapter{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\chapter{graphic test}
\section{graphic test}
\chapter{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\chapter{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\section{graphic test}
\end{document}

Finally I have used the following:

\renewcommand*{\tocbasic@listhead}[1]{%
  \@ifundefined{tocbasic@listhead@\@currext}{%
    \begingroup\expandafter\expandafter\expandafter\endgroup
    \expandafter\ifx\csname chapter\endcsname\relax
      \expandafter\def\csname tocbasic@listhead@\@currext\endcsname##1{%
        \iftocfeature{\@currext}{leveldown}{%
          \iftocfeature{\@currext}{numbered}{%
            \subsection[##1]{##1}%
          }{%
            \subsection*{##1}%
            \ifx\@mkboth\@gobbletwo\else\markright{\spacedlowsmallcaps{##1}}\fi
            \iftocfeature{\@currext}{totoc}{%
              \addcontentsline{toc}{subsection}{##1}%
            }{}%
          }%
        }{%
          \iftocfeature{\@currext}{numbered}{%
            \section[##1]{##1}%
          }{%
            \section*{##1}%
            \@mkboth{\spacedlowsmallcaps{##1}}{\spacedlowsmallcaps{##1}}%
            \iftocfeature{\@currext}{totoc}{%
              \addcontentsline{toc}{section}{##1}%
            }{}%
          }%
        }%
      }%
    \else
      \expandafter\def\csname tocbasic@listhead@\@currext\endcsname##1{%
        \iftocfeature{\@currext}{leveldown}{%
          \iftocfeature{\@currext}{numbered}{%
            \section{##1}%
          }{%
            \section*{##1}%
            \iftocfeature{\@currext}{totoc}{%
              \addcontentsline{toc}{section}{##1}%
            }{}%
            \ifx\@mkboth\@gobbletwo\else\markright{\spacedlowsmallcaps{##1}}\fi
          }%
        }{%
          \iftocfeature{\@currext}{numbered}{%
            \chapter[##1]{##1}%
          }{%
            \chapter*{##1}%
            \@mkboth{\spacedlowsmallcaps{##1}}{\spacedlowsmallcaps{##1}}%
            \iftocfeature{\@currext}{totoc}{%
              \addcontentsline{toc}{chapter}{##1}%
            }{}%
          }%
        }%
      }%
    \fi
  }{}%
  \csname tb@@beforehead@hook\endcsname
  \csname tb@\@currext @beforehead@hook\endcsname
  \csname tocbasic@listhead@\@currext\endcsname{#1}%
  \csname tb@\@currext @afterhead@hook\endcsname
  \csname tb@@afterhead@hook\endcsname
}
  • 2
    Because ClassicThesis is buggy? – egreg Dec 18 '12 at 20:53
  • @egreg yes, and it's a shame because I really like some of the features it provides. – Gonzalo Medina Dec 18 '12 at 22:33
  • @GonzaloMedina I'm trying to make a package that fix all these problems and that provide all that the normal classicthesis don't provide already from default. Soon it will be finished and then I'll tell you ; D – Aurelius Dec 19 '12 at 14:11
  • I'm a bit confused. The headlines in the classicthesis.pdf of the TOC are in smallcaps. What am I missing...? – Jörg Aug 30 '13 at 10:31
4

This patch seems to give the expected result; it should work also for lists of figures and tables.

\documentclass[ 
  headinclude, 
  footinclude,%
  10pt,%
%  openany%
 ]{scrbook}

\usepackage[
  pdfspacing 
 ]{classicthesis}

\usepackage{regexpatch}
\makeatletter
\xpatchcmd*{\tocbasic@listhead}{\MakeMarkcase}{\spacedlowsmallcaps}{}{}
\makeatother

\pagestyle{scrheadings}

\begin{document}
\tableofcontents
...

enter image description here

You might also try the following:

\renewcommand{\MakeMarkcase}[1]{\spacedlowsmallcaps{#1}}
  • I have finally used the code in my question... – Aurelius Dec 19 '12 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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