问题描述
系统:Mac OS
应用场景:在TextStudio使用Latex写论文
错误:编译论文时报以下错误:
Error: Could not start the command: pdflatex -synctex=1 -interaction=nonstopmode "*".tex
解决方法
打开终端,输入which pdflatex
查找该命令的位置
which pdflatex
终端输出结果:
/Library/TeX/texbin/pdflatex
然后将/Library/TeX/texbin/
加入环境变量PATH
sudo vi /etc/profile
在末位加入
export LATEX_HOME=/Library/TeX/texbin
export PATH = $PATH:$LATEX_HOME
重新加载配置文件
source /etc/profile