TransWikia.com

Automatically generating pdf files from multiple latex files

TeX - LaTeX Asked by SchmiPi on November 22, 2020

I generate 50 similar latex files through python. Now I need all these files as pdfs. Is there a way to do this automatically in some way? The file names are Version 1, …, Version 50.

Example file:

documentclass[12pt,a4paper]{scrartcl}

usepackage{mathtools}

begin{document}
    begin{equation*} 
    begin{array}{rl} 
    min        & 2x_1 - 5x_2 + 1x_3 - 7x_4 [1ex] 
    text{s.t.} & -4x_1 + 9x_2 + 1x_3 - 7x_4 = 0 [1ex]
    & 0 leq x leq 6
    end{array} 
    end{equation*}
end{document}

One Answer

in bash,

for i in *.tex; do pdflatex $i; done 

other shells would be similar, or of course you could loop in python

Answered by David Carlisle on November 22, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP