![在 Texshop for Mac OS 中,我无法创建自动解析 tex 文件名的个人 shell 脚本](https://linux22.com/image/413165/%E5%9C%A8%20Texshop%20for%20Mac%20OS%20%E4%B8%AD%EF%BC%8C%E6%88%91%E6%97%A0%E6%B3%95%E5%88%9B%E5%BB%BA%E8%87%AA%E5%8A%A8%E8%A7%A3%E6%9E%90%20tex%20%E6%96%87%E4%BB%B6%E5%90%8D%E7%9A%84%E4%B8%AA%E4%BA%BA%20shell%20%E8%84%9A%E6%9C%AC.png)
我在 /usr/local/bin 中有一个个人可执行 shell 脚本,内容如下:
#!/bin/sh
pdflatex --file-line-error --synctex=1 -output-dir=outfolder "mytexfile.tex"
但是,每次我使用首选项中的此脚本在 Texshop 中运行排版(CMD-T)时,它都会打印:
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex)
restricted \write18 enabled.
**
然后,当我按下 Enter 键时,我得到:
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex)
restricted \write18 enabled.
**
Please type the name of your input file.
**
如果指定了输入文件,则编译。有没有办法自动完成这个?谢谢。
答案1
如果没有指定文件,则提示**
是预期行为。检查路径中是否有其他同名命令,且命令"mytexfile.tex"
末尾没有