On Thu, Apr 25, 2013 at 3:33 PM, Vincent van Ravesteijn <v...@lyx.org> wrote: > Op 19-3-2013 4:35, Scott Kostyshak schreef: > >> When inserting a graphic or table whose width is larger than >> \textwidth, the extra width spills over to the right margin. This >> might be desired in some cases, but in other cases it is nice to >> center the graphic or table on the page. Using \centerline{}, the >> extra width is split evenly across the left and right margins. >> >> The following .lyx file shows a couple of ways to address this: >> http://paste.debian.net/242737/. One way is to sandwich the table or >> graphic between '\centerline{' and '}' ERT boxes. Another way is to >> use the adjustbox package. I'm not sure if there are advantages to one >> over the other, but since \centerline does not require another >> package, I propose to use it over the adjustbox package. >> >> I would like to implement support for it in the tabular settings and >> graphics settings as a check box. >> >> The option could be labelled one of the following: >> >> (1) "center across both margins" >> (2) "center on page across both margins" >> (3) "center a wide table" / "center a wide graphic" >> > > It should be clear that this option is only used when the image is too wide. > > If you want to implement this, you need to detect when an image is too > wide.. How do you plan to dot that ?
I was not planning on doing that. I was thinking that in many cases the user knows when it is too large and would manually set this option. There has been some very preliminary discussion (in the email thread on the GSoC horizontal scrollbar project) of parsing the log for specific overfull hboxes; but I do not think it makes sense to automatically detect this and set \centerline without the user knowing. Scott