Is there a way to force the URL nav number "myxaringan.html#35" to be the same as the page number displayed on the slide? I'm interested in typing "myxaringan.html#35" and being taken to the 35th slide (currently it does not do this). This would help with navigating a long xaringan presentation, which I've found can be tricky. I think it's also strange in terms of user interface to have the URL "myxaringan.html#35" take you to page 17 or something, if you have a lot of transitions, etc.
I asked this question on RStudio Community (more details about some ideas I have there) and am happy to update my answer based on your feedback here!
Thank you for all your work on this package, it's made including R code in presentations a breeze!
By filing an issue to this repo, I promise that
xfun::session_info('xaringan'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('yihui/xaringan').I understand that my issue may be closed if I don't fulfill my promises.
Yes! There is an option countIncrementalSlides that when TRUE each new slide is counted individually, regardless of whether or not it is incremental.
For the exact same reason as you, I always set this in the YAML header for my xaringan slides:
output:
xaringan::moon_reader:
nature:
countIncrementalSlides: true
slideNumberFormat: "%current%"
I also usually add the slideNumberFormat: "%current%" to make sure that only the current slide number is shown to avoid audience anxiety when they see Slide 10 of 130.
Interesting. Could this be a candidate for a change of the current default?
Most helpful comment
Yes! There is an option
countIncrementalSlidesthat whenTRUEeach new slide is counted individually, regardless of whether or not it is incremental.For the exact same reason as you, I always set this in the YAML header for my xaringan slides:
I also usually add the
slideNumberFormat: "%current%"to make sure that only the current slide number is shown to avoid audience anxiety when they seeSlide 10 of 130.