is it possible to define different \headerheight for head and foot respectively? For example, there is a logo image in the header which needs a large \headerheight and only text is in foot which needs a small \headerheight. Or does it have two variables to control the heights of foot and head respectively?
- 262,582
- 3,239
2 Answers
if you want to see your page layout with the given values, then print it:
\documentclass[twoside]{article}
\usepackage{layout}
\begin{document}
\layout
\end{document}

The height of the header is given by \headheight (not \headerheight). The distance between the baseline of the header and the top of the page text is then given by \headersep.
The height of the footer is defined differently. The dimension \footskip states in what distance the baseline of the footer is set to the bottom of the page text. Have a look at the manuals of fancyhdr and geometry, both show a nice drawing explaining all page related dimensions.
If you use fancyhdr for your header and footer it tells you automatically which dimension is to small and to what value you have to set it. This can then be done using geometry:
\documentclass{article}
\usepackage[head=30pt,foot=<..>]{geometry}
\usepackage{fancyhdr}
\fancyhead{}
\fancyfoot{}
\fancyhead[c]{\Huge LOGO}
\fancyfoot[c]{Some normal text}
\pagestyle{fancy}
% Disable header and footer rules
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\begin{document}
Text ...
\end{document}
Without the head= setting fancyhdr showed the following warning:
Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 30.0pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.
- 250,273
- 262,582
\settototalheight\headheight{\maxof{\leftheadercalc}{\rightheadercalc}{\midheadercalc}}. so how can i set this value to head in geometry? – warem Feb 13 '11 at 14:01\leftheadercalc,\rightheadercalc,\midheadercalcare newcommand definition of the real content of head. in tex, how to set value to a variable especially it is in preamble. – warem Feb 13 '11 at 14:07geometryshould work. However AFAIK it stoes sets thehead=value in\headheightandfoot=in\footskip. Check its manual again for the details. – Martin Scharrer Feb 13 '11 at 14:13footskip.:( – warem Feb 14 '11 at 09:26\footskipin my answer. – Martin Scharrer Feb 14 '11 at 09:52\footskipmeans the distance from the bottom of the last line of text in the body to the bottom of the footer. it doesn't control footer height. there is\footheightin LaTeX2.09 but it doesn't exist in current release. so how to define footer height now? – warem Feb 14 '11 at 14:29\footskipstates in what distance the baseline of the footer is set to the bottom of the page text." There is no direct dimension which controls the foot height. You need to set\footskipto a large enough number and reduce\textheightappropriately. – Martin Scharrer Feb 14 '11 at 15:14\footskipby tex itself. then i have to update the values for my bundle of files manually.:( – warem Feb 15 '11 at 01:57\footskipautomatically then you should have asked this as part of your question. Maybe you should open a new one asking about this. – Martin Scharrer Feb 15 '11 at 02:13\footskipautomatically today and found that it can be set a correct value by using the method i mentioned in my above comment, say,\settototalheight\footskip{\maxof{\leftfootercalc}{\rightfootercalc}{\midfootercalc}}where\leftfootercalc,\rightfootercalc,\midfootercalcare newcommand definition of the real content of footer. this didn't work yesterday due to other errors. for a newbie, misunderstanding some concept could lead to unpredictable errors. anyway, thanks a lot. – warem Feb 15 '11 at 07:59