0

I'd like to have margins (top, bottom, left, right) all equal to 15 mm (not including any footers or headers). I'd like the foot/header to be both halfways between main text and end of page, so that they still appear when printed. This is achieved by the code below. However, it looks a bit ad hoc.

Is there a better way to achieve that result?

Incidentally, even though the margins look the same on my pdf viewer, the lower margin is smaller than the upper when printed. Is this just a printer misconfiguration issue/artifact?

Also, I'm puzzled by how the xcolor pakage changes positions of footer, as seen by uncommenting/commenting the two relevant lines

\documentclass[a4paper,11pt]{article}

\usepackage[margin=15mm,headsep=4mm,footskip=7mm]{geometry}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage[usenames,dvipsnames,table]{xcolor}

\pagestyle{fancy}
\fancyhead{}
\fancyhead[C]{\small abc - DE}
%\fancyhead[C]{\color{gray} \small abc - DE}
\fancyfoot{}
\fancyfoot[C]{\small CCC - Page 1 of 1}
%\fancyfoot[C]{\color{gray} \small CCC - Page 1 of 1}
\renewcommand{\headrulewidth}{0pt}

\begin{document}
\lipsum[1-10]    
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.