I'm using sharelatex to write a report document, i'm using a template (thesis template) to write it. I have a problem at the very beginning...

The package graphicx is used with the option DVIPS (\usepackage[dvips]{graphicx}) but the logo (picture) inserted in the first page does not appear:

\begin{figure}[htbp] \begin{center} \includegraphics[width=3.5cm]{./pictures/logopm} \end{center} \end{figure}

(i verified all my paths and extensions are corect), so i have this pdf: enter image description here

so, the picture doesnt appear, but when i remove the option[dvips] and replace by : \usepackage{graphicx} or \usepackage[pdftex]{graphicx} .. the picture appear but the whole document text is shifted on the right side, without modifying anything else!! like that :

enter image description here

So i dont want that my document be shifted each time i insert a picture in.

I thanks you very much if somebody can provide an answer, i think it's little thing... Have a nice day !

  • 1
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Phelype Oleinik Mar 1 '18 at 15:10
  • 1
    Sounds as if your template is buggy ... – Ulrike Fischer Mar 1 '18 at 15:14
  • 1
    you should almost never use the dvips or pdftex options, let the package choose tthe correct option depending whether you are using pdftex or latex. If you specify the wrong option most things will not work. – David Carlisle Mar 1 '18 at 15:14
  • ok thanks a lot, but when i dont specify the options dvips, – Alex Mar 1 '18 at 15:20
  • 1
    your latex is probably specifying A4 but you are viewing in US letter (or the other way round). You have not shown any relevant code, perhaps you just need to add [a4paper] to the documentclass line – David Carlisle Mar 1 '18 at 15:22

You have


Which if you use pdflatex will default the [pdftex] option and as well as allowing graphics inclusion using pdftex-specific code it declares the page size in the pdf to match the declare A4 page size.

If you do not load graphics, or you load it in a form where it can not work, by specifying an incorrect driver option such as dvips then the page size declared in the PDF will be whatever size was specified when TeX was installed, which (if you are in Italy) ought to be A4 but could be US letter. If you typeset an A4 document but use a PDf page size for US letter then the effect is as you describe, the layout within the text block is correct but the text block will be mis-placed on the page.

| improve this answer | |
  • \usepackage{graphicx} (not graphics)? – Zarko Mar 1 '18 at 20:27
  • @Zarko same thing in this case:-) (all the driver option stuff, and setting the page size is in graphics and only applies to graphicx as that includes graphics – David Carlisle Mar 1 '18 at 20:27

I'm working with this exact template for my thesis at Politecnico of Milan.

The solution I found was to comment the lines:


I've also changed the graphic package from




It is currently working fine, preserving the page format.

| improve this answer | |

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.