Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a document with .5cm margins; I want to include a long image which will span the width of the page, ignoring margins. I don't care about the whole image being visible (or which part of the image is visible, to be honest) so long as it spans the width. At present the image goes off the right-hand side of the page but its left edge is aligned to the margin.

\documentclass[a5paper,twoside]{article}
\usepackage{graphicx}
\usepackage[a5paper,margin=0.7in]{geometry}

\begin{document}

\newgeometry{margin=.5cm} %tiny margins

Text here.

\vfill

\begin{center}
\hspace{-1cm} \includegraphics[height=4cm]{image}
\end{center}

\vfill

Some text here (not very much).

\end{document}

Bonus question: it would also be very helpful if someone could explain how to position the image a set distance from the base of the page, as opposed to just using \vfills to space things out.

share|improve this question
2  
remove the center environment and use \hspace*{-whatever} the * form prevents space being discarded at start of line but a negative hspace after the image as well (and dont put a word space between the \hspace and the `\includegraphics. –  David Carlisle Oct 22 '13 at 21:04
add comment

1 Answer 1

up vote 3 down vote accepted

For horizontal placement that ignores margins, use Center figure that is wider than \textwidth. For vertical (say) 2cm from the bottom of the text block, use

\vspace*{\fill}

% Your image goes here
\noindent
\makebox[\textwidth]{\includegraphics[..]{...}}%

\vspace*{2cm}

If you have a single line of text at the bottom and you also want the image to be 2cm from the baseline, then use a strut:

\vspace*{\fill}

% Your image goes here
\noindent
\makebox[\textwidth]{\includegraphics[..]{...}}%

\rule{0pt}{2cm}Some text here (not very much).

Here's a complete MWE:

enter image description here

\documentclass[a5paper,twoside]{article}
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\usepackage[a5paper,margin=5mm,showframe]{geometry}

\begin{document}

\vspace*{\fill}

\noindent\makebox[\textwidth]{\includegraphics[width=\textwidth,height=4cm]{example-image-a}}%

\vspace*{2cm}

\newpage


\vspace*{\fill}

\noindent\makebox[\textwidth]{\includegraphics[width=\textwidth,height=4cm]{example-image-a}}%

\rule{1pt}{2cm}Some text here (not very much).

\end{document}

Note the difference in height placement when you use text with descenders.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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