Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slide number in ?print-pdf of deck with vertical slides is wrong #3198

Closed
michaelmyc opened this issue Apr 23, 2022 · 3 comments
Closed

Slide number in ?print-pdf of deck with vertical slides is wrong #3198

michaelmyc opened this issue Apr 23, 2022 · 3 comments

Comments

@michaelmyc
Copy link

I'm using latest 4.3.1 release of reveal.js, and I'm trying to enable slide numbers in a deck with vertical slides. The slide numbers work fine in presentation mode, but the ?print-pdf generated page would jump numbers when encountering vertical slides.

I'm using the following html to create vertical slides:

<section>
    Horizontal Slide 1
</section>
<section>
    <section>
        Vertical Slide 1
    </section>
    <section>
        Vertical Slide 2
    </section>
</section>

I'm expecting to see "1" for "Horizontal Slide 1", "2" for "Vertical Slide 1", and "3" for "Vertical Slide 2". However, I'm seeing "1", "3", and "4" respectively. The slide number also doesn't respect the custom "c/t" config I placed in Reveal.initialize(). I'm suspecting the slide numbers in ?print-pdf is generated separately by numbering the <section> and rendering those that has content. This seems to be the wrong logic to me if vertical slides are present. Also, I'd love to see the pdf line numbers to respect line number formatting.

image

@michaelmyc
Copy link
Author

A quick scan of the source code confirms my suspicions. I'll take a look at how complex this fix would be. I'll open a PR if it seems simple to solve.

@hakimel
Copy link
Owner

hakimel commented Apr 25, 2022

This was recently fixed in master but isn't available in a release yet, see #3182

@kamua
Copy link

kamua commented Aug 9, 2022

#3182 fixes the PDF page numbering for fragment group, but not for vertical slides in format "h . v".

xieby1 added a commit to xieby1/markdown_revealjs that referenced this issue May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants