Appearance
Support Latex in VSCode on macOS
Install BasicTeX
BasicTeX is a much smaller alternate TeX Distribution for users who do not want to download the full TeX Live, or have unreliable internet connections.
It contains all of the standard tools needed to write TeX documents, including TeX, LaTeX, pdfTeX, MetaFont, dvips, MetaPost, and XeTeX.
BasicTeX only contains the TeX Live piece of the full distribution; it does not contain GUI programs or Ghostscript. To use TeX on the Mac, it suffices to install BasicTeX and a front end.
shell
$ brew install --cask basictex
$ which pdflatex
/Library/TeX/texbin/pdflatex
Add path to your ~/.bash_profile
file.
shell
export PATH="/Library/TeX/texbin:$PATH"
Download Packages
- Update the TeX Live Manager
shell
$ sudo tlmgr update --self
- Update all packages already installed by BasicTex
shell
$ sudo tlmgr update --all
- Install other necessary packages
shell
$ sudo tlmgr install latexmk latexindent synctex chktex
Install LaTeX Workshop VSCode Plugin
LaTeX Workshop is an extension for Visual Studio Code, aiming to provide core features for LaTeX typesetting with Visual Studio Code.
- Open the
.tex
file in the VSCode (make surePATH
environment variable has changed) . - Build (
Cmd + Option + B
, by default). - View the result (
Cmd + Option + V
, by default)