0

I'm trying to create a pdf file from a latex file (some/directory/something.tex). It works but the pdf is not stored in the same directory as the latex File. After all it is stored in the directory where I execute the python script. Where can I change the location for saving the pdf?

proc = subprocess.Popen(['pdflatex', some/directory/something.tex]) proc.communicate()

thomkell
  • 195
  • 1
  • 11
  • 2
    [This question and answer](https://stackoverflow.com/questions/1685157/how-can-i-specify-working-directory-for-popen) will probably help. You either need to specify the directory/file to pdflatex or change your working directory. – IamFr0ssT Mar 23 '22 at 10:19
  • 1
    Don't specify an latex output directory, this will cause much more problems with latex than it solves. Either switch into the folder of your tex file or have a look at https://github.com/reitzig/ltx2any – samcarter_is_at_topanswers.xyz Mar 23 '22 at 10:32

0 Answers0