Closed Lextuga007 closed 1 year ago
Aha! Thanks for this. Took me a sec to realise why: ###
is needed in Quarto presentation tabsets, since ##
demarcates a new slide.
This is deeper than I thought. Maybe there's three solutions:
##
, though presentation makers will have to adjust manually because it will break their document.###
, recognising that 'regular' Quarto users might need to adjust (though it won't break their document).##
and one to ###
(the latter labelled as 'presentation version' or something).Bonus and perhaps best approach (?):
##
in tabsets if detection fails).Which of these do you think makes the most sense?
I hadn't realised you could use tabsets in presentations (I'll have a go now!) 😲
I like bonus approach the best as I'm thinking of a very new Quarto audience. RMarkdown allowed for #, ## and ##, ### tabsests so this is slightly different.
I smashed something together in #12. I'd like to 'test' it a little before merging. You are very welcome to try it out as well! In short, there's a helper function .is_revealjs()
that returns a logical. If TRUE
, it adds an extra #
to the tabset header in stamp_tabset()
.
Hm, I overegged that. Level 2 tabset headers don't cause a slide-demarcation problem in Quarto presentations. This demo code renders to produce two slides with functioning tabsets, despite one using level 2 tab titles.
In other words, #11 is totally viable and I now have an excuse to write a blogpost to memorialise my cunning solution and mildly shame myself for overengineering!
Wow! So the ::: seems to demarcate the section and ## doesn't trigger a new slide - nice spot!
It works with ### but ## is what is in the Quarto documentation https://quarto.org/docs/interactive/layout.html#tabset-panel and most people start with # as the header.