4

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

2
  • 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, 2011 at 7:10
  • well, I do not have \begin{center} or anything similar
    – edgarmtze
    Jul 23, 2011 at 7:11

3 Answers 3

8

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.

4

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.

3

Simply do:

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .