pypandoc
pypandoc copied to clipboard
extra_args=['--latex-engine=xelatex', '-V', 'mainfont="Font Name"'] doesn't work
My conversion class looks like this:
class PandocPDFConverter(object): def generate_output(self, docx_file, **kwargs): extra_args = [ '--latex-engine=xelatex', '-V', 'mainfont="Noto Serif"' ] output = pypandoc.convert(docx_file, 'pdf', outputfile='test.pdf', extra_args=extra_args)
... and it doesn't output PDF file. However, when the same arguments are passed during conversion from command line, everything works fine. Error message: RuntimeError: Pandoc died with exitcode "43" during conversation: ! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H
l.18 \setmainfont{"Noto Serif"}
pandoc: Error producing PDF from TeX source
But when when I change 'mainfont="Noto Serif"' with 'mainfont="[NotoSerif-Regular.ttf]"' conversion goes well.
P.S. IMHO, you meant to write "conversion", not "conversation" (pypandoc.py, line No 214).
But when when I change 'mainfont="Noto Serif"' with 'mainfont="[NotoSerif-Regular.ttf]"' conversion goes well.
Would you have time to debug this? I wonder what's up with that.
IMHO, you meant to write "conversion", not "conversation" (pypandoc.py, line No 214).
Fixed. Thanks for pointing this out.
Would you have time to debug this? I wonder what's up with that.
Cannot promise to investigate it in a week, but I'll definitely debug it in the following month.
Cannot promise to investigate it in a week, but I'll definitely debug it in the following month.
Ok. Cool. :+1:
@jumasheff Any luck?
@juho I am a bit busy, sorry :(
Best regards / Урматым менен / С уважением, Murat Jumashev / Мурат Жумашев
2015-09-17 13:21 GMT+06:00 Juho Vepsäläinen [email protected]:
@jumasheff https://github.com/jumasheff Any luck?
— Reply to this email directly or view it on GitHub https://github.com/bebraw/pypandoc/issues/61#issuecomment-140990564.
@jumasheff No worries. Thanks for getting back. :+1: