2

How can I force an uppercase number in the subsection header of classicthesis? As oldstyle numbers are used through classicthesis, this causes a problem for headers where abbreviations containing numbers are used. For the section headers, this isn't a problem as small caps are used.

Small caps section header

But for subsection and below, normal size font is used. For this, abbreviations containing numbers don't look right.

Normal text subsection header

How can I force this 0 to be an uppercase number?

EDIT: I'm using pdftex to compile.

MWE:

\documentclass{scrbook}

\usepackage{classicthesis}
\setcounter{secnumdepth}{4}

\begin{document}
\mainmatter
\pagestyle{scrheadings}
%\phantomsection
\pdfbookmark[1]{\contentsname}{tableofcontents}
\setcounter{tocdepth}{2} % <-- 2 includes up to subsections in the ToC
\setcounter{secnumdepth}{3} % <-- 3 numbers up to subsubsections
\manualmark
\markboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}
\tableofcontents
\automark[section]{chapter}
\renewcommand{\chaptermark}[1]{\markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}}}
\renewcommand{\sectionmark}[1]{\markright{\textsc{\thesection}\enspace\spacedlowsmallcaps{#1}}}
\chapter{A}
Text
\section{TAAR13c}
Text
\subsection{TMD0 interface mutants}
Text

\end{document}
2

For xelatex or lualatex use

\chapter{A}
Text
\section[TAAR\liningnums{13}c]{TAAR13c}
Text
\subsection{TMD\liningnums{0} interface mutants}
Text

For pdflatex you can define a command \liningnums{...}

enter image description here

enter image description here

  • Hi, thanks for the reply. I'm using pdftex, so unfortunately those suggestions don't work. How can I define a command to do that for pdftex? – anothersimonharris May 10 at 18:37
  • define: \def\liningnumbers#1{{\fontfamily{ppl}\selectfont#1}} and then use for example: \liningnumbers{01234567890} – user187802 May 10 at 19:07
  • Great, works like a charm – thanks! – anothersimonharris May 10 at 19:13
1

It seems that your font is MinionPro, which means that the MinionPro package is loaded. Therefore, you can use \figureversion{lf} to change from text figures to lining figures:

\subsection{\figureversion{lf}TMD0 interface mutants}

Your MWE does not load MinionPro, but I assume you do that in the "real" source file. If you do not have MinionPro installed, you can load the package fontaxes instead, which worked perfectly on my system with the Palatino font classicthesis uses as standard font.

\documentclass{scrbook}
\usepackage{classicthesis}
% \usepackage{MiniorPro}        %% <- Load MinionPro to get access to \figureversion
\usepackage{fontaxes}           %% <- or fontaxes, which works with Palatino, 
                                %%    if you do not have MinioPro installed
\setcounter{secnumdepth}{4}

\begin{document}
\mainmatter
\pagestyle{scrheadings}
%\phantomsection
\pdfbookmark[1]{\contentsname}{tableofcontents}
\setcounter{tocdepth}{2} % <-- 2 includes up to subsections in the ToC
\setcounter{secnumdepth}{3} % <-- 3 numbers up to subsubsections
\manualmark
\markboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}
\tableofcontents
\automark[section]{chapter}
\renewcommand{\chaptermark}[1]{\markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}}}
\renewcommand{\sectionmark}[1]{\markright{\textsc{\thesection}\enspace\spacedlowsmallcaps{#1}}}
\chapter{A}
Text
\section{TAAR13c}
Text
\subsection{\figureversion{lf}TMD0 interface mutants}   %% <- With \figureversion
\subsection{TMD0 interface mutants}                     %% <- Without \figureversion
Text

\end{document}

enter image description here

  • Hi, thanks for the reply. The figure version command seems to work i.e. there is no error, but it doesn't change anything – what should it do? – anothersimonharris May 10 at 18:41
  • @anothersimonharris It seems that you have to load the package minionpro explicitly. At least, if I did, it worked, but I have installed that font. If you do not have minionpro, you can use fontaxessee updated MWE. – Sveinung May 10 at 19:06

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.