5

I am writing an article with a header on the first page only; the header includes a logo. Here is a MWE using fancyhdr:

\documentclass[a4paper]{article}
\usepackage{fancyhdr,graphicx}
\usepackage{lipsum}

\pagestyle{plain}
\fancyhf{}

\fancyhead[L]{
  \large \textsf{Address line 1\\
    Address line 2\\
    Address line 3}}

\fancyhead[R]{\raisebox{-0.4\height}{
    \includegraphics[width=32mm]{example-image-a}}}

\fancyfoot[C]{\thepage}

\setlength\headheight{68.3pt}

\renewcommand{\headrulewidth}{0pt}

% \title{\flushleft{This is the title}}
% \date{}

\begin{document}
% \maketitle

\section*{A section}

\thispagestyle{fancy}
\lipsum[1-7]

\end{document}

With this approach, the text on page 2 starts below where the header would be if it were included on this page.

How do I get the text to start at the "top" of page 2 instead?

3

Don't consider the content at the top of page 1 as being a header. Instead, set it as part of a regular document. That way you don't have to worry about influencing the header space (or \headheight) and how it may affect subsequent pages.

enter image description here

\documentclass{article}

\usepackage{graphicx,lipsum}

\begin{document}

\noindent
\begin{tabular}[t]{@{}l}
  \large\sffamily Address line 1 \\
  \large\sffamily Address line 2 \\
  \large\sffamily Address line 3
\end{tabular}
\hfill
\raisebox{\dimexpr.8\baselineskip-\height}{\includegraphics[width=32mm]{example-image}}

\section*{A section}
\lipsum[1-7]

\end{document}

The above solution is independent of fancyhdr or geometry, so you can add that without affecting the resulting output/layout.

2

A simple patch could be the following:

\documentclass[a4paper]{article}
\usepackage{fancyhdr,graphicx}
\usepackage{mwe}

\fancypagestyle{fancylogo}{%
    \fancyhf{}%
    \fancyhead[L]{xxx%
        \parbox[t][0pt][t]{.6\textwidth}{%
            \large \textsf{%
                Address line 1\\%
                Address line 2\\%
                Address line 3%
            }%
        }%
    }%
    \fancyhead[R]{%
        \parbox[b][0pt][t]{.3\textwidth}{%
            \vspace{-1cm}% adjust as needed
            \includegraphics[width=32mm]{image-a}%
        }%
    }%
    \fancyfoot[C]{\thepage}%
    \renewcommand{\headrulewidth}{0pt}
}



\begin{document}

\vspace*{24pt} % or whatever is needed

\section*{A section}
\thispagestyle{fancylogo}
\lipsum[1-7]

\end{document}

A neater solution could make use of the geometry package to change the page layout of the first page, but for a simple situation like this I think it would be overkill.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.