Reputation: 267
I am trying to learn Basics of Markdown and Pandoc to speed up my academic writing.
I would like to ask whether it possible to define font family and font size, when converting from Markdown (.md) file to Word-2016 (.docx) file? I tried two methods:
---
mainfont: "Palatino"
---
to the *.md file.
-- variable mainfont="Palatino"
to the command line when converting files. Neither method produces desired font change. Could anyone advise on the proper method of setting the font, if it is possible to do so during the conversion procedure?
Edit: I have followed guidelines presented in the article "Sustainable Authorship" on programminghistorian.org, where they suggest using mainfont: times
in YAML. I would like to know why it is not working for me.
My question is not duplicate, I do not need different fonts/styles for text body and headings. I need to have everything uniformly converted into "Arial" or "Palatino".
Edit: I have tried to create a reference .docx file, however, I cannot understand how to make changes to the reference file, so these changes are implemented when Pandoc converting my markdown to .docx.
Upvotes: 2
Views: 2464
Reputation: 39209
As mentioned in the MANUAL, the mainfont
variable doesn't work for docx output, only PDF/LaTeX/ConTeX etc..
For Word, you need to use the --reference-doc option.
See also https://stackoverflow.com/a/34609460/214446
Upvotes: 2