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 use elsarticle 2 docment page in LyX.

I put figure in left column partion and use

\resizebox{3.4in}{!}{ Figure.png } 

to make it smaller

But I still need to align the figure to left of the page

How to do this in LyX?

share|improve this question

1 Answer 1

The resizing can already be done in \includegraphics with the width option. If the figure starts a new paragraph, add \noindent. If there are centering commands before (\centering or environment center), then you might consider removing them. Otherwise it can be put to the left by \hfill\null. The \null prevents that the \hfill is skipped by the paragraph end. A third method uses \leftline (unlike \mbox) it does not switch into horizontal mode).

\documentclass[12pt]{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
  \noindent
  \includegraphics[width=3.4in]{Figure}
  \caption{Figure caption}
\end{figure}
\begin{figure}
  \centering
  \includegraphics[width=3.4in]{Figure}\hfill\null
  \caption{Figure caption}
\end{figure}
\begin{figure}
  \centering
  \leftline{%
    \includegraphics[width=3.4in]{Figure}%
  }
  \caption{Figure caption}
\end{figure}
\end{document}

Result

share|improve this answer
    
adjustbox also provides some keys to align images to the right, left or center. They can be exported for \includegraphics. –  Martin Scharrer Sep 11 '12 at 19:42
1  
i don't know how to add this code in lyx, this is the existing code form code viewer but i can't edit it? \begin{figure} \begin{centering} \resizebox{3.4in}{!}{ \includegraphics[clip]{tae1}} \par\end{centering} so how to add the working \includegraphics[width=3.4in]{Figure}\hfill\null –  mero Sep 11 '12 at 21:05

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.