On 2010-10-07, Julien Rioux wrote:
> On 06/10/2010 10:47 PM, Joel Schiff wrote:
>> When I insert an image into a float box, I have the cursor to the left
>> of the Figure #, and press return, insert the image, but the image
>> always ends up on the left hand side of the box, even in the dvi file.
>> Of course I want all images centered on the page but cannot get this to
>> happen.
>> I must be doing something wrong as this is very basic. Sorry if this has
>> been asked before.
This is the LaTeX default setting and therefore also LyX's default.
(There has been a long discussion about this some years ago.)
> With the cursor next to the image, hit menu "Edit > Paragraph settings"
> and select centered alignment.
However, this method inserts additional vertical space before and
after the image, as it creates a LaTeX environment. See the Source:
\begin{figure}
\begin{centering}
\includegraphics[width=0.9\textwidth]{E-to-T}
\par\end{centering}
The LaTeX FAQ recommends using the \centering macro instead:
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{E-to-T}
Unfortunately, this must be written as raw LaTeX code (ERT).
It would be nice if LyX could support this or, at least, document it
in the Embedded Objects manual.
Günter