0

I created header and footer for my quote, but then decided to change colour. Works nicely except for \lfoot, where I get a linespacing when I change the colour. How can I prevent this?

\documentclass[a4paper,12p]{article}

\setlength{\voffset}{-1.5cm}
\setlength{\textheight}{650pt}
\setlength{\hoffset}{-1.5cm}
\setlength{\textwidth}{450pt}

\usepackage{color}
\definecolor{teal}{RGB}{76,177,155}
\definecolor{light-gray}{gray}{0.4}

\usepackage{fancyhdr}       %% allow header, footer
\setlength{\headheight}{15.2pt}
\pagestyle{fancy}
\fancyhf{}
\lhead{\color{teal} \monthyeardate\today}
\chead{\color{light-gray} bla}
\rhead{\color{light-gray} page \thepage}
\lfoot{38 years of excellence}
\rfoot{\textbf{\color{light-gray}Neutral}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}

\begin{document}

 bla \\

\end{document}

Black header works nicely Gray header gives me extra line

1 Answer 1

1

After I got rid of all the errors that appeared, there was no problem coloring \lfoot as well. Specifically, I got \monthyeardate from here. Then I'd use xcolor and also geometry.

\documentclass[a4paper,12pt]{article}
% you should not use the next four lines:
% \setlength{\voffset}{-1.5cm}
% \setlength{\textheight}{650pt}
% \setlength{\hoffset}{-1.5cm}
% \setlength{\textwidth}{450pt}
% rather, use the geometry package instead

\usepackage{datetime}
\newdateformat{monthyeardate}{% https://tex.stackexchange.com/a/212264
  \monthname[\THEMONTH], \THEYEAR}

\usepackage{xcolor}

\definecolor{teal}{RGB}{76,177,155}
\definecolor{light-gray}{gray}{0.4}

\usepackage{fancyhdr}       %% allow header, footer
\setlength{\headheight}{15.2pt}
\pagestyle{fancy}
\fancyhf{}
\lhead{\textcolor{teal}{\monthyeardate\today}}
\chead{\textcolor{light-gray}{bla}}
\rhead{\textcolor{light-gray}{page \number\value{page}}}
\lfoot{\textcolor{teal}{38 years of excellence}}
\rfoot{\bfseries\textcolor{light-gray}{Neutral}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}

\begin{document}

 bla 

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .