My goal is to realize this layout for a book (possibly using fancyhdr, but I'm open to everything):
where the current layout is represented in grey. In other words, I want :
- to put the page numbering on the footer of each page (except part title pages)
- to put the name of the current part on even (non-special) pages (with the format shown in the picture: PART I: XXX) + a line under it
- to put the name of the current chapter on odd (non-special) pages (with the format shown in the picture: CHAPTER I: XXX) + a line under it
What I name "special pages" are the pages of part title or the first page of each chapter.
- How to do that?
- From a professional editor point of view, what alignments should I choose for the header on even pages (part title on the left/center/right?) and for the header on odd pages (chapter title on the left/center/right?) (is there a prefered/more "natural" alignment?)
Here is an example of a basic document:
\documentclass[11pt,a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{hyperref}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{fancyhdr}
\usepackage{lipsum}
%Note: this is a very preliminary attempt...,
%Fancier solutions are welcome
%The page numbering does not work correctly
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhead[LE]{\thepart} %How do I get the part name in capital letters
\fancyhead[RO]{\thechapter} %How do I get the chapter name in capital letters
\begin{document}
\mainmatter
\part{Premiere partie}
\chapter{Premier chapitre}
\lipsum
\lipsum
\lipsum
\lipsum
\chapter{Second chapitre}
\lipsum
\lipsum
\lipsum
\lipsum
\part{Deuxieme partie}
\chapter{Troisieme chapitre}
\lipsum
\lipsum
\lipsum
\lipsum
\chapter{Quatrieme chapitre}
\lipsum
\lipsum
\lipsum
\lipsum
\end{document}
0pt
would return you to the default which includes a rule forfancyhdr
. What have you tried usingfancyhdr
? Have you tried anything? Nothing in your code even attempts to create the layout you describe.fancyhdr
?