I use Lyx 2.1.
I want to frame the figures. I inserted a simple box and I put the figure inside it.
But, I encountered these errors :
floatslyx
I use Lyx 2.1.
I want to frame the figures. I inserted a simple box and I put the figure inside it.
But, I encountered these errors :
Best Answer
Three different ways, for three different scenarios.
1. Frame tightly enclosing image
Step by step:
Add a Figure float, with Insert --> Float --> Figure, or the button on the toolbar.
Add a framebox with Insert --> Box --> Simple frame inside the Figure float.
Right click the box and choose Settings.
Set the Inner box to None, and remove the checkmark from the Width box:
Insert the image inside this box, with Insert --> Graphics or the button on the toolbar.
2. Just image inside frame, frame width of the text
If the caption should not be inside the frame, go to Document --> Settings --> LaTeX preamble, and add the following:
This will make all your figures (added with Insert --> Float --> Figure, or the corresponding button on the toolbar) framed.
If you want the caption a little further away from the frame in this case, replace the three code lines above with
3. Both caption and image inside frame
You can use Peter Grill's answer to Rounded corner colored box around figure. For a simple black frame, and add this code to the LaTeX preamble:
This will make figures, including the caption, framed.