JelteF / PyLaTeX

A Python library for creating LaTeX files
https://jeltef.github.io/PyLaTeX/
MIT License
2.24k stars 287 forks source link

Texify to tableofcontents #353

Open EnriqueDiazCLS opened 2 years ago

EnriqueDiazCLS commented 2 years ago

We are trying to use the next command for the compiler:

self.doc.generate_pdf(file_name,compiler='texify',compiler_args=['pdf','synctex','-clean'], clean_tex=False)

This configuration is a copy from TeXworks

image

But when I run it with PyLatex I get the next error:

Sorry, but texify did not succeed.

Command '['texify', 'pdf', 'synctex', '-clean', '--interaction=nonstopmode', 'C:\ESAPPS\AirbusReport\HR8956AAG12 - MMI-3.tex']' returned non-zero exit status 1.

marijnschraagen commented 2 years ago

Maybe the extra hyphen in '-clean' is the problem, i.e., use compiler_args=['pdf','synctex','clean'] instead. Or maybe the combination of spaces and hyphens in the filename confuses texify into thinking that there are additional options (although that would be a bug), you could try a simpler filename like C:\ESAPPS\AirbusReport\HR8956AAG12MMI3.tex.