Hi everyone I'm trying to include pictures in my work this is my set up:



\setlength{\oddsidemargin} {2. cm}
\setlength{\evensidemargin} {2. cm}
\addtolength{\oddsidemargin} {-0.4 cm}
\addtolength{\evensidemargin} {-0.4 cm}

\renewcommand{\captionfont}{\normalfont \sffamily \itshape \small}


\thispagestyle{empty} \normalfont \cleardoublepage
\thispagestyle{empty}  \cleardoublepage
\thispagestyle{empty} \vspace*{.75truecm} \cleardoublepage
\thispagestyle{empty} \vspace*{.75truecm} \normalfont \cleardoublepage
\pagestyle{plain}\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\ #1}{}} 
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}         



% ---- Bibliography ----


\renewcommand{\chaptermark}[1]{\markboth{\appendixname\ \thechapter.\ #1}{}} 
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}         




I read all the previous posts on the subject I tried everything the only thing that seems to work is removing dvips from graphicx, the problem is that as soon as I remove dvips the images re-appear but all the text shifts to right and it's impossible to read properly.

I don't know if might be useful but I'm working with Overleaf

Before After

(The names in the pictures are not real names)

  • Please make this into something self contained. We don't have that contents of those files, so cannot test your code. dvips should not be added as an option to graphicx if needed it will automatically detect it. Exactly which formats do your image exist in? There is no information about it.
    – daleif
    Mar 25, 2020 at 10:13
  • Hi daleif i've tried png, eps, jpg and pdf with the same results, I'll try to update the file
    – Antonio
    Mar 25, 2020 at 10:17
  • Your geometry settings for the margins are wrong. Use a package like geometry to do this correctly. Mar 25, 2020 at 10:17
  • And are those images cropped correctly? you can visualise the size of the image via \fbox{\includegraphics{....}}, so my guess is that there is excessive white space in some of them. But we don't know since we cannot see your images or your code for images.
    – daleif
    Mar 25, 2020 at 10:19
  • @daleif stop looking at the graphics. The problem is simply that with the correct graphicx option \pdfpagewidth is set and so one can see the wrong geometry settings. Mar 25, 2020 at 10:20

1 Answer 1


You are setting \paperwidth to 16cm, but you are not changing the text width, so your text actually doesn't fit on the paper. When loading graphicx without any option, graphicx will also ensure that the background in the pdf viewer is set to 16cm and this gives you the impression that the text suddently shifts.

Use geometry to setup the page size instead of setting \paperwidth and \oddsidemargin etc manually:



  • Thanks Ulrike, that was exactly the problem, after setting geometry as package and commenting \setlength everything went back to normal.
    – Antonio
    Mar 25, 2020 at 10:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .