# RunProcess Does not Stop

I want to convert a latex file to a pdf file, using Mathematica. To do that, I installed MikTex and the I can run the following command in cmd:

lualatex main.txt


It works and it creates the pdf. So now, I wanted to let it run through MAthematica.

What I did was:

SetDirectory[NotebookDirectory[] <> "...PATH"]
RunProcess[{"lualatex", "main.txt"}]


... It starts to do something, but it does not end ? When I run itfrom cmd it takes about 20s to finish.

Anyone knows how to fix it ?

• Yes, it's almost certainly this. To force the process to quit on error, use -halt-on-error -interaction=nonstopmode. I use these in MaTeX. tex.stackexchange.com/a/451013/6302 – Szabolcs Jul 8 '19 at 8:44