I am trying to import an eps image of a flow diagram I created using Excel and exported as eps image using OpenOffice Impress. I followed the guide https://youtu.be/I4ZXTieTiAc to do this. I want to fit the image to paper width (to fit within defined paper margins), and not necessarily text width, because the journal I am submitting to uses two columns layout and I want the image to span the width of the paper minus the margins. To do this, I tried to implement the following codes:

\usepackage[letterpaper, left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}


\includegraphics[width=\paperwidth, keepaspectratio]{myimage.eps}


Above is just a testing example. In actual implementation, I am using \documentclass[journal = iecred,manuscript=article]{achemso} for document class for the journal I am submitting to. In any case, the image fails to scale, and ends up going outside the page to the right, although the image is properly fitted to the left margin. Setting width to \textwidth works, however, I want to scale it to paper width. Any ideas what might be causing the issue, and what I can do about it?

EDIT: From Displaying a wide figure in a two-column document, I realized for the result I wanted, I just had to use figure* instead of figure and use width=\textwidth. I still don't understand why width=\paperwidth would not work though.

  • 1
    Paperwitdth would only work if there is no left margin I guess. Are you sure that you want a picture that has absolutely no margin/padding to be paper margins? – Dr. Manuel Kuehner Mar 8 '17 at 6:50
  • @Dr.ManuelKuehner Specifically, I want the image to fit within defined margins. As you can see in the test codes, I am defining the margins, however, the image still goes out of the page to the right. It's fitted to the left margin properly though. – dylee Mar 8 '17 at 6:55
  • Should yor final results looks like this?: tex.stackexchange.com/a/30988/124842 ... two column width + margin? – Bobyandbob Mar 8 '17 at 7:40
  • @Bobyandbob Actually, yes, and thank you. I realized for what I needed, I just had to use figure* instead of figure and width=\textwidth for what I needed to do. I still don't understand why width=\paperwidth would not work, but I suppose this will do. – dylee Mar 8 '17 at 8:24
  • To set a paper-wide instead of text-wide image you need to use either \includepdf from pdfpages (yes, it can input not only PDFs) or a package like eso-pic or textpos. Only if the image's resulting height is less than \textheight you may use something like \centerline{\includegraphics[width=\paperwidth,height=\textheight,keepaspectratio]{…}}. – Schweinebacke Mar 8 '17 at 8:42

You have specified

\usepackage[letterpaper, left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}

so you have 2cm left and right margin, so \paperwidth (the width of the paper or pdf viewer) is 4cm wider than \textwidth (the width of the text block between those margins)



will set the image flush to the left margin but sticking 4cm into the right, which will be 2cm off the paper.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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