Closed petaflot closed 3 years ago
works with default engine, not with xelatex or lualatex.
but default engine has very poor unicode support :-/
You can make latexmk use luatex or xelatax under the hood by using the -luatex or -xelatex flag. See this issue for an example: https://github.com/JelteF/PyLaTeX/issues/105
On Mon, 5 Jul 2021, 00:03 Engrenage, @.***> wrote:
works with default engine, not with xelatex or lualatex.
but default engine has very poor unicode support :-/
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/JelteF/PyLaTeX/issues/334#issuecomment-873671029, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3YJSBJ2QQBPSX25VMYPLTWDLEBANCNFSM47ZPOD3A .
I have tried a few things, such as
doc.generate_pdf(destFilename, clean=True, compiler = 'latexmk -f -xelatex -interaction=nonstopmode -output-directory=' + output_dir, extra_compiler_args = "--xelatex")
doc.generate_pdf(destFilename, clean=True, compiler = 'latexmk', extra_compiler_args = "--xelatex")
and got output like
pylatex.errors.CompilerError: No LaTex compiler was found
TypeError: generate_pdf() got an unexpected keyword argument 'extra_compiler_args'
as far as I'm concerned, the issue is not resolved :-/
since subprocess is being used and requires commands and args to be in a list, I'm not surprised. Data on #105 is obviously obsolete.
This should do it (note compiler_args
instead of extra_compiler_args
, and passing in a list):
doc.generate_pdf(destFilename, clean=True, compiler = 'latexmk', compiler_args = ["--xelatex"])
This is also document here: https://jeltef.github.io/PyLaTeX/current/pylatex/pylatex.document.html#pylatex.document.Document.generate_pdf
I've been playing with the complex report example... I noticed the total number of pages in the footer is often (but not always) set to '???' instead of an actual number.
I have not been able to figure out what causes it to work or fail.