Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com Jul 24 '11 at 3:37

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

1  
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

3 Answers 3

up vote 6 down vote accepted

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.

share|improve this answer

Simply do:

\hspace*{-1.5in}
\includegraphics[height=0.8\textheight]{image.png}\\
share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.