HOWTO: Easy full-page images in LaTeX

in code

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 in your document where you wish to add the image, add: \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

March 20

in me

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