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

custom slide numbering and navigation - vertical/horizontal instead of default horizontal/vertical #3578

Open
ethanryan opened this issue Feb 15, 2024 · 0 comments

Comments

@ethanryan
Copy link

I'm ordering my reveal.js presentation so our slides display in horizontal rows that are stacked on top of each other vertically.

So if I have a deck with six slides ordered in two vertical stacks:
1.1 2.1 3.1
1.2 2.2
1.3 2.3

I'm instead displaying the slides like this:

1.1 1.2 1.3
2.1 2.2 2.3
3.1

I've achieved this with some reformatting, but now slide numbering and navigation isn't working as expected.

The configuration options docs say that slideNumber can accept a function: https://revealjs.com/config/

// Can optionally be set as a string that specifies the number formatting:
// - "h.v": Horizontal . vertical slide number (default)
// - "h/v": Horizontal / vertical slide number
// - "c": Flattened slide number
// - "c/t": Flattened slide number / total slides
//
// Alternatively, you can provide a function that returns the slide
// number for the current slide. The function should take in a slide
// object and return an array with one string [slideNumber] or
// three strings [n1,delimiter,n2]. See #formatSlideNumber().
slideNumber: false,

how can I access the slide object to pass to my custom formatSlideNumber? everything i've tried fails.

or is this something that needs to be after the initialization?

an example would be great.

also in general: an option to display slides horizontally, then vertically, instead of vertically, then horizontally, would be great. in others, other ways to present slides.

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

1 participant