When I insert an image into LyX and set it to 100% page width, its left side is not at the farthest most edge of the left page. Instead it starts where the text margin is, and since it's too large to display, it cuts off on the right. Is there a way to set a different margin for figures than that of the text?

  • Not sure about lyx but if you can go into the code then you can use the adjustwidth environment from the changepage package
    – cmhughes
    Feb 7, 2012 at 21:05

2 Answers 2


The horizontal image shift is due to the paragraph indent if you don't place the image inside a figure environment. To avoid this without inserting a figure environment, insert an ERT (or Ctrl+L) just before the image that contains \noindent. This removes the paragraph indent so that the image will fit within the text block.

  • the margin is still there. did you mean \nomargin? I tried that but it didn't work either.
    – waspinator
    Feb 10, 2012 at 19:50
  • @waspinator: It sounds like the original problem deals with the image being pushed out into the right margin. This is typically caused when the image is set to the text block width \textwidth but with a paragraph indent. Hence the suggestion to use \noindent, which removes the paragraph indent. Are you actually setting the image to the text block width, or the page width?
    – Werner
    Feb 10, 2012 at 19:54
  • I set the image to page width since it's large. Basically I wanted to apply a different margin to the image than the text. Thanks.
    – waspinator
    Feb 14, 2012 at 22:14
  • @waspinator: Well, if you want to modify the text block margins on the fly, than can also be done using the changepage package. You could update your original question with some more detail on specifically what you're after. You could even provide a screen shot, even if its produce in something else (like MS Word). It really helps in assessing what your best options are.
    – Werner
    Feb 14, 2012 at 22:22

To make your graphics span the full paper widht, you need a negative \hskip to compensate for the left margin. Hence, add something like this in an ERT box directly before your graphics:


This assumes, however, that the float will be placed on an odd page. Depending on the document class and layout options, the page margins on odd and even pages may differ. To take this into accout requires a somewhat bigger effort. Add the following to your preamble (Document->Settings->LaTeX Preamble):



The ERT box directly before your graphics does then become:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .