先说一下动机, 我头脑一热安装了 mactex 2023, 安装以后慢了 8 倍, 我想要重新用回 texlive 2018. 通过修改 PATH, 终端我可以用 2018 的 xelatex 正常编译文件了. 但是 org mode 预览还是出了错. 我调试了一下, 发现
/usr/local/texlive/2018/bin/x86_64-darwin/xelatex --shell-escape -interaction nonstopmode -output-directory=/Users/quebec/Downloads/ ../../Downloads/tmp.tex
的结果会有这样几行:
kpathsea: Running mktexfmt xelatex.fmt
mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
mktexfmt: /usr/local/texlive/2018/texmf-dist/web2c/fmtutil.cnf
mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
mktexfmt: /Users/quebec/Library/texlive/2023/texmf-config/web2c/fmtutil.cnf
mktexfmt [INFO]: writing formats under /Users/quebec/Library/texlive/2023/texmf-var/web2c
mktexfmt [INFO]: --- remaking xelatex with xetex
mktexfmt: running `xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini' ...
This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023) (INITEX)
restricted \write18 enabled.
entering extended mode
我不知道它为什么会用 2023 的文件, 然后转到用 2023 的 xetex 中.
我在终端执行同样的命令:
/usr/local/texlive/2018/bin/x86_64-darwin/xelatex --shell-escape -interaction nonstopmode -output-directory=/Users/quebec/Downloads/ ../../Downloads/tmp.tex
能正常生成 pdf, 没有任何问题. 一模一样的命令, 区别只是 shell-command 与终端运行的区别, 结果怎么会不一样?