Skip to content
Discussion options

You must be logged in to vote

This isn't super straightforward right now but it's likely possible if you are willing to do some hacking. If you are only targeting HTML you could use CSS counters (https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Counter_Styles/Using_CSS_counters)

Another approach would be to use a pandoc filter (https://quarto.org/docs/authoring/filters.html). Note that you can arrange for your filter to run before or after quarto (where quarto will actually be doing the numbering). A key thing to know is that if you write a function to intercept headers you can actually return a list of elements from the filter (so the Header is e.g. replaced with Header,Paragraph)

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@pwseo
Comment options

@jjallaire
Comment options

@ratnanil
Comment options

Answer selected by pwseo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants