My macOS VSCode + LaTeX Setup

Local LaTeX environment

Install MacTeX through homebrew.

brew install --cask mactex-no-gui

I personally do not use the GUI apps that come with MacTeX. To save some precious disk space, I would leave them out by installing the -no-gui version.

VSCode Setup

Install VSCode and the following LaTeX-Workshop extension.

That’s your one-stop destination for a complete LaTeX experience in VSCode.

Snippets

If you have used texpad.com before, VSCode + LaTeX Workshop achieves 99% of the texpad experience for free.

For example, you could quickly insert commonly used environments with builtin snippets:

Navigation

I like to split a LaTeX project into several sub TeX files. VSCode handles this flawlessly. The TOC can bring you anywhere across different files.

cmd + click on the PDF will also bring you to the corresponding line in the code.

TODOs

Usually I will leave some TODO comments in the TeX file to remind myself what are the next steps. I use the TODO tree to help my quickly find all TODOs in the entire project and navigate.

Apply the following trick to make it work with TeX:

EOF

That’s pretty much it! It should take less than 30 minutes to setup and it’s super easy to get used to it. If you are familiar with GitHub, it also works well with Overleaf. Just setup a git repository on GitHub and sync it with Overleaf.

The only thing I will complain is that VSCode is a memory monster. It will eat up to 2G of RAM in my current setup. 16G of RAM is hardly enough nowadays.

Last updated: November 12, 2021

Check out more posts from Alan Chen.

Powered by thread.pub.