margin figure's label counter

Ehud Behar ehud.behar at protonmail.com
Sat Jul 16 19:03:32 UTC 2022


I want to define a new float in my document - margin figure.

I defined a new float using a module file with a Style:

Float
Type marginfigure
GuiName MarginFigure
NumberWithin figure # <————
RefPrefix fig
more commands etc.
End

The document class is book, and inside chapter 1, as you can see in the attached image, I inserted a regular figure, followed by a margin figure. The margin figure counter in the editor is 1.1.1, since it is in chapter one, and it inherited the first number inside the figure counter.

I want the margin figure to have the label 1.2 (which logically makes more sense if you treat figure and marginfigure on an equal footing).

What amendments should I make to the Style to get it changed the way I want?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220716/93e004c9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: counters.png
Type: image/png
Size: 73951 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220716/93e004c9/attachment-0001.png>


More information about the lyx-users mailing list