0

I am trying to convert docx to pdf with pandoc on mac (BasicTeX). The output font is a serif font and I want to change it to a sans-serif font.

I tried using -V mainfont=Helvetica and -V mainfont=helvetica with many other system installed fonts, but with no luck. I get an error pandoc: fontfamily=Helvetica: openBinaryFile: does not exist (No such file or directory).

On the MacTeX website it says "BasicTeX is very much smaller, and yet has most files, FONTS, and programs to process TeX, so this is a rapid way to get a working TeX".

And on this stackexhange question someone says all TeX fonts are available for MacTeX.

So I looked up the list of available fonts, and got only errors.

My question is: how do I select the output font for pandoc?

Here is exactly what I tried for reference:

pandoc -o Cover\ Letter.pdf -V fontsize=12pt mainfont=Helvetica Cover\ Letter.docx
1
  • You are missing -V before mainfont=Helvetica
    – DG'
    Commented Feb 3, 2021 at 9:13

1 Answer 1

0

From the user's guide:

mainfontoptions, sansfontoptions, monofontoptions, mathfontoptions, CJKoptions options to use with mainfont, sansfont, monofont, mathfont, CJKmainfont in xelatex and lualatex.

That means, that you have to tell pandoc to use either xelatex or lualatex with the option --pdf-engine=

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .