0

I'm using Lyx and would like to place a figure that spans the text width. No matter what I try, the left margin of the figure is indented, and the right margin sticks out.

There's this post: Scale image to page width? but I don't understand the raw Latex and how to apply it in Lyx.

And there's this one: LyX: set width of image to 100% of page width which is pretty old, and none of the suggested methods worked, although I might be doing something incorrect.

Thanks

Torbjørn T.
  • 206,688
Yoni
  • 286
  • If you set the width of the image to be 100% of the text width, and it's inside a figure float, then it will do what I think you ask. Do you want the image to be wider than the text block? – Torbjørn T. Dec 11 '16 at 07:20
  • Thank you, can you tell me specifically what I need to type and where? I tried adding various TeX code both inside and just outside the figure float, and to the left and to the right of the image itself, and it didn't work. Maybe I should've mentioned that I changed the page margins in Document -> Settings. Also, I'm using Hebrew, hence Document Class is set to Hebrew Article, but my guess is that it's irrelevant... – Yoni Dec 11 '16 at 08:40
  • Have you provided a \noindent instruction immediately ahead of the code that inserts the graphic? – Mico Dec 11 '16 at 08:59
  • 1
    You didn't answer my question: do you want the image to be wider than the text block? Another question: did you insert the image inside a figure float? (I.e. Insert -> Float -> Figure). As for what and where to type, when you insert an image you can choose to set the width, and one of the units available is Text width %. Choose that, and set the value to 100. – Torbjørn T. Dec 11 '16 at 09:05
  • @Torbjørn T. 1) I'm not sure if you mean the text inside the figure 9 – Yoni Dec 11 '16 at 09:30
  • I mean the area between the left and right margin. If you have a page that has just text, then the area on the page that is covered by the text is the text block. – Torbjørn T. Dec 11 '16 at 09:33
  • @Torbjørn T. For both questions: 1) I want the figure to be exactly the size of the text block; 2) Ineed I inserted it inside a figure float. And now I finally understand how to set the Text Width property properly, thank you! (sorry for the above extra comment, it double clicked...) – Yoni Dec 11 '16 at 09:40
  • Did you try to uncheck the indentation from the paragraph settings in LyX? Provide a image of your LyX input and the PDF output, so that it is easier for use to understand what you are trying to do. – berkus Jul 05 '17 at 08:29

1 Answers1

1

When you insert an image in LyX, you will see a window like this:

enter image description here

To make the image the width of the text block, check the Set width box, and in the list of possible units (where it says cm in the image above), choose Text Width %. Write 100 in the value field:

enter image description here

Torbjørn T.
  • 206,688