polylux icon indicating copy to clipboard operation
polylux copied to clipboard

uncover etc. increases figure count

Open Roger-luo opened this issue 2 years ago • 5 comments

this currently increases the figure count even if the figure is not inside the uncover block.

Roger-luo avatar Sep 15 '23 04:09 Roger-luo

This is hard to fix without something like https://github.com/andreasKroepelin/polylux/issues/67

I wonder why you would use figures in slides, though? Especially numbered ones.

andreasKroepelin avatar Sep 15 '23 08:09 andreasKroepelin

Oh I have a side-by-side slide, that has text inside uncover on the left, but have one figure on the right, but in this case the figure number increases

Roger-luo avatar Sep 15 '23 14:09 Roger-luo

I find I can workaround this by using my own counter

#let figure_num = counter("figure_num")

#show figure: it => align(center)[
    #it.body
    #if it.caption != none [
        #text(size: 0.7em, [
            #it.supplement
            #counter("figure_num").step()
            #counter("figure_num").display():
            #it.caption
        ])
    ]
]

Roger-luo avatar Sep 15 '23 14:09 Roger-luo

also applies to the page counter. IMO the uncovered slides should keep the same slide number.

BeastyBlacksmith avatar Mar 27 '24 12:03 BeastyBlacksmith

That's what you can use #logic.logical-slide.display() for.

andreasKroepelin avatar Mar 31 '24 08:03 andreasKroepelin