# markboth: How to use to insert a nouppercase heading in LaTeX

A friend of mine asked me to solve the following issue in $LaTeX$: in his master thesis he made use of the command markboth to insert the string “Elenco delle figure” (“List of figures”) on the upper corner of the heading of table the of contents. This modify works however, at the second building of the source file, he got the inserted string (“Elenco delle figure” in this specific case) in capital letters just in the first page after the title (as you can see in the pictures below).

So the problem is: in $LaTeX$ markboth has been set by default to produce uppercase heading.

To modify this setting, just put the patchcmd code snippet before begin{document}, loading the required package xpatch as follow:

documentclass[a4paper,12pt,twoside]{book}
usepackage[utf8x]{inputenc}
usepackage[italian]{babel}
usepackage{fancyhdr}
usepackage{xpatch}

[…]

makeatletter
%% patch listoffigures not to issue @mkboth but markboth
patchcmd{listoffigures}
{@mkboth{MakeUppercaselistfigurename}{MakeUppercaselistfigurename}}
{}{}
makeatother

begin{document}

tableofcontentsmarkboth{Indice}{}
newpage
listoffiguresmarkboth{Elenco delle figure}{}
newpage
listoftables
newpage

end{document}

[…]

And the result is what my friend was looking for!

Happy hacking!