LyX ⇒ Figure alignment
Figure alignment
I also tried to increase the width to 120% textwidth. This works fine, but the overhang is only on the left side of the page, even when setting the Paragraph Style to center.
I am using the book class. Is it possible that this causes problems?
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Figure alignment
\centerline{}
To do this, make an ERT before your figure with
\centerline{
and then another ERT after your figure with
}
Figure alignment
\centerline{}
.\centerline
is not a recommended LaTeX command... The alternatives usually are putting \centering
inside the {figure}
environment (which I assume LyX's center option does?) or if the figure is non-floating (i.e. no {figure}
putting the whole thing in a {center}
environment.Both should work and if they don't a

I often encountered the case that people thought their images weren't centered when in fact they were but had uneven white margins on the different sides... No way to know without MWE.
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Figure alignment
Good to know. It's nice to have LaTeX experts around here to correct my sloppy habits.cgnieder wrote:scottkosty wrote:One way is to use ERT to wrap your figure in\centerline{}
.\centerline
is not a recommended LaTeX command... The alternatives usually are putting\centering
inside the{figure}
environment (which I assume LyX's center option does?) or if the figure is non-floating (i.e. no{figure}
putting the whole thing in a{center}
environment.
This is indeed what I think is the case here. But yes, an MWE is always useful.cgnieder wrote: I often encountered the case that people thought their images weren't centered when in fact they were but had uneven white margins on the different sides... No way to know without MWE.