pypandoc icon indicating copy to clipboard operation
pypandoc copied to clipboard

extra_args=['--latex-engine=xelatex', '-V', 'mainfont="Font Name"'] doesn't work

Open jumasheff opened this issue 10 years ago • 6 comments

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 for immediate help. ...

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).

jumasheff avatar Aug 02 '15 18:08 jumasheff

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.

bebraw avatar Aug 02 '15 18:08 bebraw

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.

jumasheff avatar Aug 04 '15 16:08 jumasheff

Cannot promise to investigate it in a week, but I'll definitely debug it in the following month.

Ok. Cool. :+1:

bebraw avatar Aug 04 '15 16:08 bebraw

@jumasheff Any luck?

bebraw avatar Sep 17 '15 07:09 bebraw

@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 avatar Sep 17 '15 08:09 jumasheff

@jumasheff No worries. Thanks for getting back. :+1:

bebraw avatar Sep 17 '15 08:09 bebraw