一种 macOS 系统下的 $\LaTeX$ 最小安装方法
BasicTeX + CTeX + VS Code (LaTeX Workshop)
TL;DR
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| brew install basictex
sudo tlmgr update --self sudo tlmgr update texlive-scripts sudo tlmgr update --all sudo tlmgr install ctex
sudo tlmgr install latexmk echo '$pdflatex = "xelatex %O %S";' > ~/.latexmkrc
sudo tlmgr install latexindent sudo cpan Log::Log4perl sudo cpan Log::Dispatch sudo cpan YAML::Tiny sudo cpan File::HomeDir sudo cpan Unicode::GCString
|
Full story
- 先决条件:
- Homebrew
- Visual Studio Code
- 装 basictex:
- 装 ctex:
参考 tex.stackexchange: Cannot install ctex via tlmgr: “Unknown option: status-file” when running fmtutil-sys
1 2 3 4 5
| sudo tlmgr update --self sudo tlmgr update texlive-scripts sudo tlmgr update --all sudo tlmgr install ctex
|
装 VS Code 插件:
See James-Yu/LaTeX-Workshop
装 latexmk,配置 pdfTex => XeLaTeX
参考 tex.stackexchange: How to make LaTeXmk work with XeLaTeX and biber
1 2 3
| sudo tlmgr install latexmk echo '$pdflatex = "xelatex %O %S";' > ~/.latexmkrc
|
- 装缩进处理程序:
参考 James-Yu/LaTeX-Workshop #376 Formatting failed error
1 2 3 4 5 6 7
| sudo tlmgr install latexindent sudo cpan Log::Log4perl sudo cpan Log::Dispatch sudo cpan YAML::Tiny sudo cpan File::HomeDir sudo cpan Unicode::GCString
|
Upgrade
如果不幸需要更新大版本:(TexLive 2021 -> 2022)
1 2 3
| brew upgrade basictex
fmtutil-user --all
|