自动编译latex文件的简单程序

Simple program that automatically compiles latex file

我正在使用基于 unix 的 OS 并且我正在尝试制作一个小的 bash 程序来一直编译我的 tex 文件,这样我就不需要做每一次.. 它似乎编译得很好,但它不会创建任何 PDF 文件.. 我对为什么它不这样做感到有点困惑。

代码如下:

#!/bin/bash
while true
do
    pdflatex -synctex=1 -interaction=nonstopmode /Users/Johnathan/Documents/Bachelor/Rp/bachelor.tex
done

bash 没问题。我忘了 运行 它在正确的目录中。我保留它已经输出到开始了..