Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I need to change my headers from uppercase to lowercase using fancyhdr. How do I do that?

\documentclass[10pt,cleardoublepage=empty,twoside]{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\fancyhead[lo]{\slshape\nouppercase{\rightmark}}
\fancyhead[re]{\slshape\nouppercase{\leftmark}}
\fancyhead[ro,le]{\thepage}
\fancyhead{}
\fancyhead[C]{{My Header Title}}

\renewcommand{\chaptermark}[1]{%
\markboth{\MakeUppercase{%
\chaptername}\ \thechapter.%
\ #1}{}}
\pagestyle{headings}
\usepackage{setspace}
\usepackage{array}
\usepackage{amsmath}
\usepackage{covington}
\usepackage[danish,english]{babel}
\usepackage{tipa}
\usepackage{natbib}
\usepackage{float}
\usepackage{graphicx}
\usepackage{titlesec}
\usepackage{typearea}
\usepackage[a5paper]{geometry}
\usepackage{tocbibind} 

\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}%per allineamento a sx delle colonne

\renewcommand{\bibname}{References} 
\usepackage[toc,page]{appendix}
\usepackage{longtable}
\usepackage{caption}

\hyphenation{Boont-ling}


\usepackage[bitstream-charter]{mathdesign}
\usepackage[T1]{fontenc} 
\usepackage{microtype}
\usepackage{multirow}

\usepackage{morefloats}
\usepackage{booktabs}
\newcolumntype{R}{>{\raggedleft\arraybackslash}p{2cm}}
\usepackage[bottom,norule]{footmisc}
\setlength\belowcaptionskip{1\baselineskip} 
\usepackage{lscape} 
\usepackage[hidelinks]{hyperref} 
\usepackage{bookmark}


\begin{document}

\frontmatter

Something here.

\tableofcontents
\listoffigures
\listoftables

\mainmatter  

\chapter{Lorem}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.



\chapter{Ipsum}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.



\chapter{dolor}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.



\end{document}
share|improve this question
3  
Read the documentation of fancyhdr, section 9 "the scoops of LaTeX marks". –  Ulrike Fischer Nov 21 '12 at 12:29
2  
I'm asking why you don't look at the code I provided you in this answer, where \nouppercase is used (with which, of course, headers come out not all uppercase). –  egreg Nov 21 '12 at 12:36
    
@egreg I did but still all uppercase! –  Costanza Nov 21 '12 at 14:48
    
@UlrikeFischer I did, I added the code provided there, still doesn't work. –  Costanza Nov 21 '12 at 14:50
    
@Costi: Then you did something wrong. But as long as you don't show what you are actually doing nobody will be able to correct your code. –  Ulrike Fischer Nov 21 '12 at 14:52

2 Answers 2

up vote 5 down vote accepted

Your code has some wrong parts.

First

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\fancyhead[lo]{\slshape\nouppercase{\rightmark}}
\fancyhead[re]{\slshape\nouppercase{\leftmark}}
\fancyhead[ro,le]{\thepage}
\fancyhead{}
\fancyhead[C]{{My Header Title}}

The last two lines cancel out the settings made before, so they should be removed.

Second

\renewcommand{\chaptermark}[1]{%
\markboth{\MakeUppercase{%
\chaptername}\ \thechapter.%
\ #1}{}}

This code is useless and should be removed.

Third

\pagestyle{headings}

This line reverts to the standard headings of the book class, which use uppercase. Remove it.

share|improve this answer
    
Thanks so much. Now it works! –  Costanza Nov 21 '12 at 20:29
    
It does work, but now there's another problem. The page number exceeds the margins. –  Costanza Nov 21 '12 at 20:33
2  
Put the call to geometry before fancyhdr and remove the call to typearea –  egreg Nov 21 '12 at 20:45
    
That does the trick!! –  Costanza Nov 21 '12 at 20:59

\lowercase{} can do that.

\documentclass{report}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[C]{\lowercase{My Header Title}}

\begin{document}
Hello World!
\end{document}
share|improve this answer
    
thanks, but that doesn't do it. Maybe there's a conflict with other packages. –  Costanza Nov 21 '12 at 12:27
    
\lowercase will not work with header generated with e.g. \leftmark. You need \nouppercase from the fancyhdr package. –  Ulrike Fischer Nov 21 '12 at 12:30
    
What should I do with this:\renewcommand{\headrulewidth}{0pt} \fancyhf{} \fancyhead[lo]{\slshape\nouppercase{\rightmark}} \fancyhead[re]{\slshape\nouppercase{\leftmark}} \fancyhead[ro,le]{\thepage} \fancyhead{} \fancyhead[C]{\lowercase{My Header Title}} –  Costanza Nov 21 '12 at 13:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.