I would like to use the mathpazo font for my document. I want oldstylenums in the TOC, in chapter + section headings, in column headings and as page numbers. When entering numbers in "normal" text, I want to have normal numbers by default.
At the moment, I achieve this behaviour by loading the mathpazo-package with the option "osf" (=oldstyle figures) and typesetting each number within the text in math mode (like "...the proportionality factor is $57$ for..."). This doesn't seem elegant to me and I am looking for an improvement.
My plan is to redefine \thepage, \thechapter, \thesection and some other macros separately to make them use oldstylenums, so package mathpazo can be loaded without the option "osf".
Now the problem: I have to use the hyperref package and somehow the combination of documentclass scrbook (KOMA-Script), hyperref and mathpazo does not work. I do not understand the cause. The following example document does not compile on my system:
Code: Select all
\documentclass{scrbook}
\usepackage{hyperref}
\usepackage[sc]{mathpazo}
\renewcommand*{\thepage}{\oldstylenums{\arabic{page}}}
\author{The Author}
\title{The Title}
\begin{document}
\maketitle
\tableofcontents
\chapter{foo}
abc
\chapter{bar}
def
\end{document}
Code: Select all
! TeX capacity exceeded, sorry [input stack size=5000].
\par@update ->\let \par@update
\default@par@update \par@updaterelative
l.12 \tableofcontents
No pages of output.
The error disappears when using "book" instead of "scrbook". This is no option for me.
The error also disappears when inserting "\usepackage{textcomp}" after loading mathpazo but then, I do *not* have oldstylenums as page numbers (and I do not understand the reason) so this is also no option.
The error also disappears when commenting out "\maketitle" (which seems very surprising to me). When twice compiling the document with "\maketitle" commented out, I have the intended result, but of course I need to use \maketitle.
I really like to understand what is going wrong here and I want to have a really clean and reasonable document setup. Any help would be really appreciated. Thanks in advance.