# Inserting not centered image in Latex

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...

-
Wasn't it required to use either \centering or a center environment inside the figure to get a centered image? So just remove that? –  Joey Jul 23 '11 at 7:10
well, I do not have \begin{center} or anything similar –  cMinor Jul 23 '11 at 7:11
add comment

## migrated from stackoverflow.comJul 24 '11 at 3:37

This question came from our site for professional and enthusiast programmers.

## 3 Answers

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.

-
add comment

Simply do:

\hspace*{-1.5in}
\includegraphics[height=0.8\textheight]{image.png}\\

-
add comment

The standard method for centering an image slightly larger than the line width is to say

\begin{figure}
\centering
\makebox[\columnwidth]{\includegraphics[...]{...}}


However, trying to set the image not wider than the line width is better.

-
add comment