I would like to redefine the \thechapter
command in the aim to use the eurb10
font only for the chapter number.
I try something like :
\newfont{\ChapNumbFont}{eurb10}
\renewcommand \thechapter {\ChapNumbFont{\@arabic\c@chapter}\normalfont}
But the chapter number font size is not correctly scaled in section, subsection…
It seems to use only the "normal" size and cannot "scaled" it.
What I'm doing wrong ?
PS : I'm using a book class strongly customized.
Answer
Thanks to Ulrike Fischer comment, I use this trick:
\renewcommand \thechapter {{\fontencoding{U}\fontfamily{eur}\fontseries{b}\selectfont\@arabic\c@chapter}}
There is a still a little font size difference.
Best Answer
You can use something like this to call the font in a scalable way:
Be aware that the "U" in
\fontencoding
means "unknown". So you can't rely on chars to be on standard positions. (But the numbers should be ok.)You shouldn't put the font switching command in
\thechapter
:\thechapter
is used in a lot of places. The font switch will e.g. end also in the headers, the toc and will be used when you reference a chapter as it will be stored with the label: