-
Install the "LaTeX Workshop" extension by James Yu
- Open VS Code
- Go to Extensions (or press
Cmd+Shift+X
) - Search for "LaTeX Workshop"
- Click Install
-
Restart VS Code after installation
Once everything is set up:
- Open
draft_1.tex
in VS Code - Click the "Build LaTeX Project" button (or use the keyboard shortcut)
- A PDF preview should appear automatically
If you don't see the preview:
- Look for "View LaTeX PDF" button in the LaTeX Workshop sidebar
- Or find
draft_1.pdf
in your file explorer
To build this document locally, you'll need:
- A LaTeX distribution
- A text editor with LaTeX support (VS Code recommended)
- Install BasicTeX using Homebrew:
brew install --cask basictex
- Install required LaTeX packages:
sudo tlmgr update --self
sudo tlmgr --verify-repo=none install latexmk
sudo tlmgr install geometry
sudo tlmgr install hyperref
sudo tlmgr install listings
sudo tlmgr install amsmath
sudo tlmgr install xcolor
sudo tlmgr install graphics
sudo tlmgr install tools
- Create build directory:
mkdir build
draft_1.tex
- Main LaTeX source filebuild/
- Directory containing compiled PDF and auxiliary files.gitignore
- Configured to exclude LaTeX auxiliary files
- Make changes to
draft_1.tex
- Build to verify changes (press the Play button top right)
- Commit only the source files (auxiliary files are ignored)