LyX display of align counters
Scott Kostyshak
skostysh at lyx.org
Fri Feb 18 16:03:01 UTC 2022
On Fri, Feb 18, 2022 at 02:52:35PM +0100, Daniel via lyx-users wrote:
> On 17/02/2022 14:06, Scott Kostyshak via lyx-users wrote:
> > I like to renumber my align numbers within frame. e.g., Instead of "equation
> > 3", I essentially use them as "3rd line of equation on this frame" which makes
> > it easy for students to ask questions and refer to the line number.
> >
> > I do this with the following LaTeX code in the preamble:
> >
> > \AtBeginEnvironment{align}{\setcounter{equation}{0}}
> >
> > I'm greedy and would like to adapt the LyX layout to show the same.
> >
> > Specifying "Within" frame seems to almost do what I want:
> >
> > Counter equation
> > Within frame
> > End
> >
> > However, if I'm on Frame 10, it will show 10.1, 10.2, etc..., where I would
> > prefer just 1, 2, ...
> >
> > If the above can't be tweaked to work, perhaps a different approach to using
> > "Within" would be to have the Frame layout reset the equation counter to 0?
> >
> > Scott
>
> Maybe you could provide a minimal example of the frame setup you have? I
> guess you are working with some "frame" counter definition.
Ah indeed there is some interaction with another local patch I have
applied. I don't think the patch is necessary to reproduce the issue in
this thread (without it, it seems LyX marks them as #.1, #.2, #.3, #.4;
but for completeness I attach it (it is against current master).
I also attach an example .lyx file. I saved it as 2.3.x format just for
simplicity, but I am testing on current master. Note that the LyX file
has a preamble (that resets the counter to 0 in LaTeX) as well as a
local layout (that specifies the Within).
I also attach a screenshot, which has Frame number patch applied.
Instead of the equation labels "1.1, 1.2, 2.1, 2.2", I would prefer
"1, 2, 1, 2" in the LyX display.
Thanks,
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-beamer.layout-display-frame-number-in-LyX-display.patch
Type: text/x-diff
Size: 2800 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220218/698ea0d7/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.23.lyx
Type: application/x-lyx
Size: 2465 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220218/698ea0d7/attachment-0001.lyx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot1645200067.png
Type: image/png
Size: 22700 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220218/698ea0d7/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220218/698ea0d7/attachment-0001.asc>
More information about the lyx-users
mailing list