For all my documents, I created a template.tex file which is imported in all my files. But it says that I got those issues :
/home/rperrod/rp/PERSO/LaTeX/Test/template/t.tex:20: Undefined control sequence. [ \setlength{\footheight}{10mm}]
/home/rperrod/rp/PERSO/LaTeX/Test/template/t.tex:20: LaTeX Error: Missing \begin{document}. [ \setlength{\footheight}{10mm}]
/home/rperrod/rp/PERSO/LaTeX/Test/template/t.tex:25: Undefined control sequence. [ \allowdisplaybreaks]
Heres my test file :
\documentclass[a4paper, 12pt]{article}
\usepackage[english, french]{babel}
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{varwidth}
%----------- My template file ---------
\geometry{
a4paper,
left=16mm,
top=16mm,
bottom=16mm,
right=16mm
}
\pagestyle{fancy}
\fancyhf{}
\setlength{\headheight}{10mm}
\lhead{\textsc{Some Text}}
\rhead{\textsc{SOME} Text}
\setlength{\footheight}{10mm}
\rfoot{\thepage}
\date{}
\author{}
\allowdisplaybreaks
%-----------------------------------
\title{I'm a giraffe}
\begin{document}
\maketitle\thispagestyle{fancy}
Lorem ipsum
\section{Colorado}
\newpage
\newpage
\section{Says}
\newpage
\section{Giraaaaaaaaaaaaaaaffe}
\end{document}
Where's the issue ? I just copied this from my friend and for him, it works. Did I forget a certain package ?
Best Answer
It is better to include
headheight
andfootskip
(notfootheight
) in the geometry definition, rather than separately with\setlength
.\documentclass[a4paper, 12pt]{article}