I am using pandoc to convert .txt to .pdf. I was trying to use the font Adobe Garamond Pro which I installed on my Mac, but I couldn't generate a .pdf file with the font (it keeps displaying the document with the default font.) I installed MacTex.

mainfont: Adobe Garamond Pro
fontsize: 12pt
documentclass: article 
 pandoc test.txt -s -o test.pdf --pdf-engine=lualatex -C 

Okay now it's working, except the fact that every letter is now bold. Not sure why-- I double checked that I installed also regular font for Adobe Garamond Pro, and I can use it in other apps such as Microsoft Word. Any idea to fix it?

enter image description here

  • 1
    Welcome. I guess your snippet is from your yaml front matter. Maybe try converting to Latex and look at the .tex file to find out which font commands are produced: pandoc -s test.txt -o test.tex.
    – lukeflo
    Commented Aug 28, 2023 at 5:24
  • Furthermore, Your -V argument seems useless since you're not defining a variable after it. --pdf-engine works without such an modificator. Try to remove the -V, maybe it prevents the --pdf-engine argument from working properly.
    – lukeflo
    Commented Aug 28, 2023 at 5:32
  • 1
    If you want to use fonts installed in your system, you need to use xelatex or lualatex engines. Try this answer if your engine is pdflatex. There's also a link to LaTeX Font Catalogue.
    – Celdor
    Commented Aug 28, 2023 at 8:07
  • 1
    Assuming you're using either XeLaTeX or LuaLaTeX to compile your document, have you tried loading the fontspec package and issuing the instruction \setmainfont{Adobe Garamond Pro}?
    – Mico
    Commented Aug 28, 2023 at 8:42
  • Oh I guess deleting -V argument seems working! But it uses for some reason bold font so every letter got bold...
    – kcho17
    Commented Aug 28, 2023 at 13:01

1 Answer 1


Since it seems to solve the problem, I post my suggestion as answer:

The argument -V in the pandoc command expects a following variable. Thus, it interprets the --pdf-engine argument as variable and prevents that the latter is processed properly. Deleting the -V argument lets pandoc handle the --pdf-engine argument correcty.

Why it works only with xelatex instead of lualatex is hard to find out without further informations. But as long as no special lua attributes are needed, xelatex is all good.

You must log in to answer this question.

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