-
-
Notifications
You must be signed in to change notification settings - Fork 281
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
Reference slide number (question) #291
Comments
That's a great question, but I don't have an answer. It might be possible to implement an R function to calculate the page number based on a ref_slide = function(input, name) {
ctx = slide_context(......) # you'll need to extend this function
n = ctx$n
sprintf('[Page %d](%s#%d)', n, with_ext(input, '.html'), n)
} Then you can write an inline R expression in the Rmd source:
|
Thanks, @yihui. In the end, I made an
That's a bit hacky and, more importantly, I think very specialised to what I need to do, rather than a general function that people may use... But perhaps it may give inspiration for something better? |
Hi all,
I have a set of slides arranged in a folder with the following structure
(with a view of publishing the whole lot under the
static/slides
folder of a course website).I can cross-ref to another lecture (eg using the code
I know I can point the link to the
#name-of-the-slide
tag, sayusing the code
in the relevant .Rmd file.
But is there a way for me to have as output something like
where the "5" is automatically mapped from the link I'm giving (say,
../lecture1/#some-slide
)?I hope this is clear enough and I'm using the right format to ask the question! :-)
Thanks
Gianluca
The text was updated successfully, but these errors were encountered: