1

I wish to control the default settings for the following parameters of added figures in LyX:

  1. Conditionally fit figure size to text width if figure is too large. I saw a solution here, and I think that's fine, but I'm providing the requirement so that the overall solution would take it into account.
  2. Set the alignment of the figure to "Center" (currently I'm doing it through paragraph settings of the figure's line, is there a more elegant way to do it?)
  3. Set the figure's placement option to "Here if possible".
CarLaTeX
  • 62,716
Yoni
  • 286

1 Answers1

3

I can give you a partly solution to your questions.

Ad 3. You can put in the preamble

\renewcommand{\fps@figure}{ht}

which changes the default placement to here if possible, than top.

Other possibility is to change the options in the layout, here is an example of a definition of SCfigure environment I have made for my file

# Side caption figure
Float
    Type          SCfigure
    GuiName       "Figure (side caption)"
    Placement     htbp
    Extension     loscf
    NumberWithin  none
    Style         plain
    ListCommand   empty
    ListName      "List of Figures (side caption): does nothing, use List of Figures instead"
    RefPrefix     fig
    IsPredefined  1
    UsesFloatPkg  0
End

You can than chose the SCfigure similarly as figure environment.

also I have fond this method, that could probably work: here

I think you can use this method to solve 1,2 and 3.

Mirai
  • 61