Print text in specific style to Word #2657
-
Is there a way to call out what style you want all the text to be printed to in Word. I want to create custom styles, but it seems the only ones that are available are the Headers. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi @Rhys-Bergeron, Thanks for your question. To customise the style of Word documents, you need to provide a reference document. See details at https://quarto.org/docs/output-formats/ms-word-templates.html.
Can you be more clear of what you are trying to do? I was able to change the font family. I had to change it in each style type as documented in https://quarto.org/docs/output-formats/ms-word-templates.html. It's a little time consuming but it does the job. |
Beta Was this translation helpful? Give feedback.
-
First, each component in Markdown will be translated in a docx component with a default style apply to them. Best way to see what component (code, list, header, ...) is associated to what style is to add the component in a document, and then compile to docx and look in the resulting document which style is applied. You can use this document as based for tweaking and provide as non default reference doc. If I understand correctly your use case is also creating new styles from scratch in your template docx document, and then you want to be able to use them (apply them) from your source If that is the case, you can do that for DOCX document using Custom style feature from Pandoc: https://pandoc.org/MANUAL.html#custom-styles. It appears we don't have mention to that in our doc and we should probably add it. Syntax would be for inline style
and ::: {custom-style="Poetry"}
| A Bird came down the Walk---
| He did not know I saw---
::: for paragraph style You can also reference existing style and not just new one. Hope it helps |
Beta Was this translation helpful? Give feedback.
First, each component in Markdown will be translated in a docx component with a default style apply to them. Best way to see what component (code, list, header, ...) is associated to what style is to add the component in a document, and then compile to docx and look in the resulting document which style is applied. You can use this document as based for tweaking and provide as non default reference doc.
If I understand correctly your use case is also creating new styles from scratch in your template docx document, and then you want to be able to use them (apply them) from your source
.qmd
file.…