I want to add a letter prefix to my section (and subsection) numbers, so that 101, 101.1, 101.1.1 become S101, S101.1, S101.1.1 but I'm not sure how to implement. Document headers reproduced below. I just use the #section# , ##subsection## and ###subsubsection### tags.
documentclass: article
output:
pdf_document:
number_sections: yes
toc: no
toc_depth: '1'
word_document:
toc: no
toc_depth: '1'
html_document:
df_print: paged
number_sections: yes
toc: no
toc_depth: '1'
pandoc_args:
- --number-sections
- --number-offset=300
I think Pandoc does not support this by default for now. You'll need to apply customized solution according to your desired output.
Which format do you want ?
For HTML, it would be some JS and CSS
For PDF, it would be some latex in header to modify the number
For Word, it would a reference document with the Title1 style numbered with letter.(the easiest )
You'll find a some details is this answer by @rlesur that is still up to date on SO
Otherwise, you'll need to hack I guess by pre processing the markdown to add the letters and not letting pandoc do it itself, or using lua filters for pandoc but that is not the easiest.
Does this works? I surprised because Pandoc manual says it is only for HTML outputs. Pandoc - Pandoc User’s Guide
Also, number_sections: yes is the same as adding --number-sections, isn't it ?