1

This question already has an answer here:

As you can see in the picture below, the diagram is shifted to the left. The code I am using to display this image is give below:

\begin{center}
\includegraphics[width=\textwidth]{"Law 2".png}
\end{center}

The name of the image file is "Law 2". How should I go about fixing this problem? I've also read answers to a related question, but, since I am a beginner in Latex, it's difficult for me to understand their logic. So, an ideal answer would be one that strictly deals with my case.
enter image description here

Update 1

After trying \fbox{\includegraphics{"Law 2".png}} I got, the following:

enter image description here

Update 2

After trying \fbox{\includegraphics[width=\textwidth]{"Law 2".png}} I got the following picture:

enter image description here

marked as duplicate by Werner, user13907, Stefan Pinnow, Mensch, user36296 Jun 16 '16 at 18:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Perhaps, there's a lot of white space on the left boundary of the image? If this is the case, the center environment will use this white space too in order to provide the 'correct` filling. Use \fbox{\includegraphics{...}} and you will see the amount of white space. – user31729 Jun 16 '16 at 17:47
  • 3
    Probably, the bounding box of the graphics file is wider than what see. To check this point,, use \fbox{\includegraphics{Law_2.png} (note I replaced the blank space in the file name with an underscore). – Bernard Jun 16 '16 at 17:50
  • 2
    What happens if you try \fbox{\includegraphics[width=\textwidth]{"Law 2".png}}? Looks like much of the white space is part of the image, so maybe cropping it (either with an external program or latex) might help. – user36296 Jun 16 '16 at 17:57
  • 3
    Do \includegraphics[trim=20 0 0 0,width=\textwidth]{Law2.png} (avoid spaces in file names, but the trick with quotes can work). Experiment with various values instead of 20 until you get a satisfying output (keep \fbox during the attempts). Or clip the image with some specialized software. – egreg Jun 16 '16 at 17:58
  • 1
    Offtopic: but are you sure that the image should not have a caption? – user36296 Jun 16 '16 at 18:00

Browse other questions tagged or ask your own question.