I am trying to convert a .md file to a .pdf using a specific TTF font.
Pandoc doesn't work unless the .ttf is in the same directory as the .md file.  Is that normal?

This works:
pandoc in.md --pdf-engine=xelatex -V mainfont="font.ttf" -o test.pdf

I get a PDF in my specific font.

But this fails:
pandoc in.md --pdf-engine=xelatex -V mainfont="fonts/fontname/font.ttf" -o test.pdf

It gives the error:

Error producing PDF.
! Missing number, treated as zero.
<to be read again>
                   f
l.19 \fi

I know Pandoc can read the directory, because if I try to use a .ttf which doesn't exist, I get the error "! Package fontspec Error: The font "fonts/foo/bar" cannot be found."

Is this a bug, or me not understanding how to use Pandoc properly (a distinct possibility!)

Thanks

pandoc 2.19.2
Compiled with pandoc-types 1.22.2.1, texmath 0.12.5.2, skylighting 0.13,
citeproc 0.8.0.1, ipynb 0.2, hslua 2.2.1
Scripting engine: Lua 5.4
Ubuntu: 22.04

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/62aceeb4-46d0-4079-9c5b-1be3dd5e2bben%40googlegroups.com.