On 24/08/16 18:25, Haines Brown wrote:
> Alain Ketterlin <al...@universite-de-strasbourg.fr.invalid> writes:
[...]
>>> This does as I expect, but I want to make the chapter titles lower
>>> case.
>>
>> book.cls itself changes chapter marks into uppercase. Redefining
>> \chaptermark would probably be the easiest.
>
> Perhaps, but redefining seems intimidating.
That's the only way to do it: if you \MakeLowercase (even if it worked),
it would make *all* the title lowercase.
IMHO it was a Really Bad Idea to uppercase the marks in LaTeX by default
(one of the very few areas where LL missed the point).
I snipped the definition of \chaptermark out of book.cls and just
removed the string \MakeUppercase (and got rid of the extra # in both
cases):
\documentclass{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[LO]{\slshape \leftmark}
\makeatletter
\def\chaptermark#1{%
\markboth {{% removed \MakeUppercase
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\@chapapp\ \thechapter. \ %
\fi
\fi
#1}}{}}%
\makeatother
\begin{document}
\chapter{Introduction}
Stuff
\clearpage
More stuff
\clearpage
Yet more stuff
\end{document}
[...]
>>> \fancyhead[LO]{\nouppercase\slshape\leftmark}
>>
>> \nouppercase takes an argument (\slshape here, which is probably not
>> what you want). Try \slshape\nouppercase{\leftmark} instead. (Untested.)
>
> Thanks Alain, your suggestion worked nicely. But I'm wondering why you
> said \slshape is probably not what I want. Do you mean \itshape is
> preferable?
No. I think he meant that \nouppercase REQUIRES a TEXT argument in curly
braces: \nouppercase{\leftmark}, for example. Putting \slshape after it
makes it try to operate on \slshape instead of on \leftmark.
///Peter