I have the following code for my footer:
\usepackage{fancyhdr}
\lhead{}
\rhead{}
\chead{My very important and long title that is not being centered as I would like to \newline Very Myself}
\cfoot{\thepage}
\setlength{\headheight}{14pt}
but it is not centered:
How can I center it? I am using \documentclass[11pt,a4paper]{article}
Best Answer
Use
\\
and not\newline
. The behavior is easily reproducible:gives
Here's the code for you
The command
\\
changes its meaning when in a\centering
context, which is in force in\chead
, whilst\newline
doesn't.