I'm attempting to make my own headers for a book I'm writing. I want to alternate between two headings: "Left" and "Right" My problem is: I'm not getting the Left and Right printing out when I use \markboth
.
The code is
\documentclass{book}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{graphics,color}
\usepackage[superscript]{cite}
\begin{document}
\pagestyle{myheadings}
\markboth{Right}{Left}
First page
\newpage
Second page
\newpage
Third page
\newpage
Fourth page
\end{document}
This provides:
2nd page:
But I want like this (below):
2nd page:
3rd:
4th:
Best Answer
The pictures you post of the desired output include a rule under the header and reducted margins. For setting the margins the best choice is to use the
geometry
package. For the headers thefancyhdr
package provides the required facilities. Using your syntax (which really hasRight
andLeft
the wrong way round), you can write:\pagestyle{empty}
ensures the first page (or the page that command is on) has no headers.To use
\markboth
the standard way around you should use: