On Feb 18, 2009, at 10:25 AM, Juergen Spitzmueller wrote:

Hubert Christiaen wrote:

It' s indeed a bit strange that float figures are not automatically
centered.

LyX outputs whatever the class defines, and most classes define it to be
raggedright (by default).

You may do it yourself by entering in an ERT frame
'\begin{center}' before and '\end{center}' after the code for the picture.
That's the way I solved the problem.

Better use \centering, because the center environment adds extra whitespace around the figure (LyX itself inserts \begin{centering... \end{centering} if
you use the paragraph dialog, which is equivalent to \centering).

Jürgen

An easier solution for centering all your floats is given by Herbert Voss' Tips and Tricks page
add the lines below to your preamble

Centering all floats
If you want to center for example all of your uncentered figures, you can do this with
\makeatletter
      \renewenvironment{figure}[1][]{%
           \...@float{figure}%
     \centering
   }{%
      \...@float
   }
\makeatother

Reply via email to