HOWTO: Easy full-page images in LaTeX

The was the most useful thing I leaned all semester. If you want to have a full-page borderless image in a LaTeX document you have two real choices: You can go down the path of defining a custom box within the document, and wrestle with the specifics of setting this box, and filling it with content.

Or you can just convert the image into a suitably-sized PDF and added in a single line with pdfpages. There are two easy steps for this, assuming you have the package installed (on Ubuntu it is part of the texlive-latex-recommended package):

  1. Add this line to your header: \usepackage{pdfpages}
  2. At the point at which you want to add the image, add this line: \includepdf{FILE.pdf}, where FILE is the name of the file.

The next thing you need to do is convert the image file to a PDF. Resize it in the image tool of your choice and then export it. I had problems exporting from Photoshop to PDF (LaTeX chokes on the file), so I switched to using Imagemagick:

mogrify -format pdf $file.jpg

4 Comments:

Zoya Street

Commented Wednesday August 21, 2013 at 21:06

This is great! Just might save my book. Any chance you’ve managed to make this work without breaking pages (i.e. like a float but not a float)?

Zoya Street

Commented Wednesday August 21, 2013 at 21:11

Oh ignore my last message I just found it. Just need to use the afterpage package. Sorry for bothering you.

Mark

Commented Friday August 23, 2013 at 20:46

Grand, glad you got it sorted. :D

Damitr

Commented Thursday January 30, 2014 at 11:11

Thanks. It helped a lot.

D

Say something witty:

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>