Is it possible to somehow tell pandoc to carry the names of styles from original HTML to .docx?
I understand that in order to tune the actual styles, I should be using reference.docx file generated by pandoc. However, reference.docx is limited to what styles it has to: headings, body text, block text, etc.
I'd like to:
specify "myStyle" style in the input HTML (via a "class" attribute, via any other HTML attribute or even via a filter code written in Lua),
<html> <body> <p>Hello</p> <p class="myStyle">World!</p> </body> </html>add a custom "myStyle" to
reference.docxusing Word,run a
html->docxconversion an expectpandocgenerate a paragraph element with "myStyle" (instead ofBodyText, which I believe it sets by default), so the end result looks like this (contents ofword/document.xmlinside the resultingoutput.docxwas cut for brevity):<w:p> <w:pPr> <w:pStyle w:val="BodyText" /> </w:pPr> <w:r> <w:txml:space="preserve">Hello</w:t> </w:r> </w:p> <w:p> <w:pPr> <w:pStyle w:val="myStyle" /> </w:pPr> <w:r> <w:txml:space="preserve">World!</w:t> </w:r> </w:p>
There's some evidence styleId can be passed around, but I don't really understand it and am unable to find any documentation about it.
Doc on filtering in Lua states you can access attrs when manipulating a pandoc.div, but it says nothing about whether any of the attrs will be interpreted by pandoc in any meaningful way.


