3

I am trying to convert a txt file (markdown) to docx using pandoc with a special MS Word template. I'm doing it this way:

pandoc -s --reference-docx=/path/to/my/template.dotx -o outfield.docx file.md

The problem is that I have set up my template with a special "Body Paragraph" style, separate from the "Normal" style (because the various headings, etc. all are based on the "Normal" style. Is there a way to tell pandoc that when it converts normal paragraph text that it should be styled using my special "Body Paragraph" style?

1 Answer 1

5

pandoc 1.19.2.1 uses three styles for body text: Normal, Body Text, and First Paragraph, which are based onto each other in this order. If you want a specific styling of your body text only, you should hence edit the Body Text style in the template, not the Normal style as changes to the Normal style -- as you already mentioned -- propagate to other styles as well.

See the part on the --reference-docx option in the 'Options Affecting Specific Writers' section of the pandoc user manual.

This feature might exist pre-1.19.2.1 version, I don't know when this has been introduced.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.