[Tex/LaTex] Inserting not centered image in Latex

graphicshorizontal alignment

I do not have any problem inserting images on LaTex, but As I have a big image when inserting It with:

\includegraphics[height=0.8\textheight]{image.png}\

It appears centered, as it is a little big, I would like to be inserted from the most left side (not in center)

  • How do you modify that line to add image in the left and not in the center of document?
  • Is it possible to change margin just for this image, then return margins as original place?

I put an example of something like I am getting…And the one I am searching for…

enter image description here

Best Answer

If you want your image to be exactly the width of the text (or \linewidth actually), then you should use

\includegraphics[width=\linewidth]{image}

This way the image will always be centered if it was wider than \linewidth to start with. If, however, the image has a width less than \linewidth, then it will always be typeset 'starting on the left' if there is nothing preceding it. It may be, if you do not put the image in a figure environment - but in a paragraph rather - that a paragraph indent could cause it to shift over to the right. In that case, use

\noindent \includegraphics[width=\linewidth]{image}

Using a fixed spacing (like \hspace*{-1.5in}) to move a figure left (or right, with positive length) may look visually effective, but it not always truly accurate. Hence the suggestion to use relative lengths (like width=\linewidth) which depend on other parameters set by LaTeX.

Related Question