Graphics, Figures & TablesMultiple images in a footer?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
focused energy
Posts: 3
Joined: Wed Jun 09, 2010 1:02 am

Multiple images in a footer?

Post by focused energy »

Good Day,

I am trying to place two rows of images in a footer. I am using the fancyhdr package but I'm new to LaTeX and I don't quite know how to place multiple images in the footer and/or perhaps create an array within the footer.

Below is the fancyhdr code I have in my sty file. I have a series of images I want in the footer (university logos and a stretched design bar similar to the header image). The first row of the footer would have the logos of the universities and then the second row would have a single image.

Code: Select all

\setlength{\oddsidemargin}{0 in}
\setlength{\topmargin}{0pt}
\setlength{\textwidth}{6.5in}
\setlength{\marginparsep}{0in}
\setlength{\marginparwidth}{0in}
\setlength{\marginparpush}{0pt}
\setlength{\hoffset}{0pt}
\setlength{\voffset}{-1in}

\setlength{\headheight}{.75in}
\setlength{\headsep}{25pt}
\setlength{\footskip}{.75in}

\setlength{\textheight}{11in}
\advance\textheight by-\headheight
\advance\textheight by-\headsep
\advance\textheight by-\footskip

\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhfoffset{1in}

\lhead{\includegraphics[height=\headheight,width=8.5in]{header.eps}}
\chead{}
\rhead{}
\lfoot{}
\lfoot{\includegraphics[height=\footskip,width=8.5in]{footer.eps}}
\cfoot{}
\rfoot{}

\pagestyle{fancy}
I would now like to have a row of logos just above the footer.eps. Is this possible? Or will I need to modify the footer.eps in gimp or photoshop and actually add the logos to a single eps file? Ideally I won't have to do that.

Thanks for your help!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Multiple images in a footer?

Post by gmedina »

Hi,

why not simply using something like the following?

Code: Select all

\documentclass{article}
\usepackage{fancyhdr}
\usepackage{lipsum}% jus to generate filler text for the example
\pagestyle{fancy}

\fancyhf{}
\fancyfoot[C]{\vspace*{1pt} % adds a little vertical space
  \rule{3cm}{2cm}\hfill\rule{3cm}{2cm}\hfill\rule{3cm}{2cm}\\[4mm]% first row of evenly spaced images
  \hfil\rule{.6\linewidth}{0.5cm}\hfil% second row (a centered image)
}
\begin{document}

\lipsum[1-30]

\end{document}
I used black rectangles to simulate actual images, but you can use (after loading the graphicx package in the preamble, of course) the standard \includegraphics command.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Multiple images in a footer?

Post by localghost »

This is not related to the problem, but it is strongly recommended to use the geometry package for setting up page and paper dimensions. Lengths like \hoffset and \voffset should never be modified unless you have a hardware problem with your printer.


Best regards and welcome to the board
Thorsten
focused energy
Posts: 3
Joined: Wed Jun 09, 2010 1:02 am

Re: Multiple images in a footer?

Post by focused energy »

Hello gmedina, thank you very much for helping out and providing some code. At what point would I place \includegraphics in what you wrote?

Thorsten, I will definitely provide accolades for gmedina and submit this as formal solution to my query.

Kind Regards.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Multiple images in a footer?

Post by gmedina »

focused energy wrote:...At what point would I place \includegraphics in what you wrote?..
Instead of the \rule commands. For example, assuming the graphic files are logo1.eps, logo2.eps, logo3.eps and footer.eps, you could do something like the following:

Code: Select all

\documentclass{article}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{lipsum}% jus to generate filler text for the example
\pagestyle{fancy}

\fancyhf{}
\fancyfoot[C]{\vspace*{1pt} % adds a little vertical space
  \includegraphics[width=3cm]{logo1}\hfill\includegraphics[width=3cm]{logo2}\hfill\includegraphics[width=3cm]{logo3}\\[4mm]% first row of evenly spaced images
  \hfil\includegraphics[width=7cm]{footer}\hfil% second row (a centered image)
}
\begin{document}

\lipsum[1-30]

\end{document}
Of course, use the options for the \includegraphics command that best suit your needs and modify my example according to your needs.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
focused energy
Posts: 3
Joined: Wed Jun 09, 2010 1:02 am

Re: Multiple images in a footer?

Post by focused energy »

Thank you very very much.
Post Reply