I am having trouble with align figures to the center of a page. I want to have them slightly broader than the text, i.e. an overhang to both sides of the page. I have tried using wrap figure-float, but this always puts some text next to the picture, which is not desired and looks senseless.
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?
LaTeX forum ⇒ LyX ⇒ Figure alignment
-
- Site Moderator
- Posts: 531
- Joined: Sat Sep 01, 2012 6:38 am
One way is to use ERT to wrap your figure in
To do this, make an ERT before your figure with
and then another ERT after your figure with
\centerline{}
To do this, make an ERT before your figure with
\centerline{
and then another ERT after your figure with
}
[quote="scottkosty"]One way is to use ERT to wrap your figure in
Both should work and if they don't a
minimal working example (MWE) is needed to see what happens...
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.
\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: 531
- Joined: Sat Sep 01, 2012 6:38 am
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.
Good to know. It's nice to have LaTeX experts around here to correct my sloppy habits.
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.
This is indeed what I think is the case here. But yes, an MWE is always useful.
Who is online
Users browsing this forum: No registered users and 4 guests