# [texhax] Place graphic on every page but first

Schwartz, Steven J s.schwartz at imperial.ac.uk
Mon Aug 19 18:27:16 CEST 2013

Jerry,

Jerry wrote on 2013-08-18:
----------------
> I am using the "textpos" package to position an image at a specific
> location on every page but the first one in a document I am working on.
> Specifically, the image is placed in the heading. The "fancyhdr"
> package does not place the image high enough in the heading. The
> "fancyhdr" package also incorrectly places the text in the other
> header fields when I use it to place an image in the header.
>
> This is how I am using it at present:
>
> \begin{textblock*}{30pt}[0,0](0.0in,-0.9in)
> \includegraphics[scale=0.10]{../img/logo_1200x1200} \end{textblock*}

An alternative approach is to put the graphic inside a box or environment of some kind and then use that environment's positioning commands to place the image, e.g. here's one I use with fancyhdr:

\lfoot{\begin{tabular}{l} \\[1.0em] \includegraphics[height=0.8cm]{imperial-logo-cropped}\end{tabular}}

which pushes the image down by a linespace plus 1em. Putting it in a parbox and specifying positional alignment, adding some (positive or negative) \vspace, or some other construct may also help the positioning. Also, as an alternative to fancyhdr, you could construct your own header. For example (untested but based on some working bits),

\begin{tabular}{@{}p{0.4\textwidth}@{}p{0.2\textwidth}@{}p{0.4\textwidth}@{}}% 3 fields
\parbox[b]{0.4\textwidth}{\flushleft Left bit} \\
\parbox[b]{0.2\textwidth}{Page=\thepage}\\
\parbox[b]{0.4\textwidth}{\flushright\includegraphics[]{logo}}\\
\end{tabular}
}

You can, of course, use \leftmark or \rightmark in the above, e.g., instead of "Left bit". This approach may help you control the alignment of the different parts of the header.

> Using it this way works fine, except, I need to place it on every page
> but the first. I cannot figure out how to do that without entering
> manual page breaks and then entering the code. The is a lot of work in a 63 page document.
> Especially, when the page break locations are subject to change.
>
> I am trying to find a package that will allow me do that, but have not
> found one as yet.

You can just test the page number inside the code that builds the header, e.g. (untested)

\lfoot{\ifthenelse{\thepage=1}{}{\includegraphics[]{logo}}}

which will put nothing in the leftfoot on the first page due to the blank {} and insert your logo on all subsequent pages.

I've used all these different ideas at one time or another, and I'm sure you can combine them to get what you want.

HTH
Steve

--------------------------------------------------------------------
Professor Steven J Schwartz        Phone:  +44 (0)207 594 7660
Head, Space & Atmospheric Physics  Fax:    +44 (0)207 594 7772
Director, Imperial Space Lab       www.imperial.ac.uk/spacelab
The Blackett Laboratory            Email:  s.schwartz at imperial.ac.uk
Imperial College London            Office: Huxley 6M67A
London SW7 2AZ, UK                 Web:    www.sp.ph.ic.ac.uk/~sjs
--------------------------------------------------------------------