Am trying to use
\ifthenelse
from the ifthen package to vary the size of \headheight
within a document. Would like this to be larger for the first page and then smaller (possibly at its defaults size) for each subsequent page. I had thought I could accomplish this using code like the following.
\ifthenelse{\thepage=1} {\setlength\headheight{72pt}} {\setlength\headheight{0pt}}
Unfortunately, that's not working for some reason. Below is some code that, for the most part, replicates what I'm trying to do. Can anyone help me understand why the snippet of code above is not working, as well as what the code should look like? In the code below, there are some
\iftenelse
statements that do work, but I found I wasn't able to use the same approach to producing variable head heights.
\documentclass{article} %% Margins %% \setlength{\textwidth}{6.5in} \setlength{\oddsidemargin}{0in} %%%% Packages %%%% \usepackage[usenames,dvipsnames]{color} \usepackage[lastpage,user]{zref} \usepackage{fancyhdr} \usepackage{ifthen} \usepackage{parskip} \usepackage{enumitem} \usepackage{amssymb} \usepackage{soul} \usepackage[ pdftex, pdfstartpage=1, pdfpagemode=UseOutlines, bookmarks, bookmarksopen, pdfstartview=Fit, pdfview=Fit, colorlinks, linktocpage, linkcolor=blue, citecolor=blue, pagebackref=true] {hyperref} %%%% Headers/Footers %%%% \setlength\headheight{72pt} \renewcommand\headrule{{\color{BrickRed} \hrule height 1pt width\headwidth}} \pagestyle{fancy} \definecolor{light-gray}{gray}{0.65} \lhead{\ifthenelse{\thepage = 1} {\textcolor{light-gray}{My Name} \\ [4ex] \vspace{36pt} \textcolor{light-gray}{Telephone Number}} {\textcolor{light-gray}{My Name}}} \rhead{\ifthenelse{\thepage = 1} {\textcolor{light-gray}{Page \thepage \ of \zpageref{LastPage}} \\ [4ex] \vspace{36pt} \textcolor{light-gray}{Email Address}} {\textcolor{light-gray}{Page \thepage \ of \zpageref{LastPage}}}} \chead{\ifthenelse{\thepage = 1} {{\large\bfseries MY NAME, TITLE} \\ Address Line 2 \\ Address Line 3 \\ Address Line 4 \\ [1ex]} {}} \cfoot{} %%%% Bullet Points %%%% \renewcommand\labelitemi{$\square$} %%%% Main Document %%%% \begin{document} Some text \newpage More text \end{document}
I'd be interested in knowing if those
\ifthenelse
statements are well-specified, or if they are ugly but still functional.Thanks,
Paul