Set up your AI-assisted technical writing environment: Visual Studio Code with the Claude Code extension, and a working LaTeX distribution (pdflatex).
Make sure you have the following before you begin.
Download and install VS Code for your operating system.
Go to the VS Code website
Visit code.visualstudio.com and click the download button for your OS.
Install VS Code
macOS: Open the downloaded .dmg file and drag Visual Studio Code to your Applications folder.
Windows: Run the downloaded .exe installer and follow the setup wizard. Check “Add to PATH” when prompted.
Launch VS Code
Open Visual Studio Code from your Applications (macOS) or Start Menu (Windows) to verify it works.
The Claude Code CLI requires Node.js 18 or higher.
Download Node.js
Visit nodejs.org and download the LTS version (20 or later recommended).
Install and verify
Open the downloaded .pkg file and follow the installer. Then open Terminal and verify:
node --version
v20.x.x or higher.
Download Node.js
Visit nodejs.org and download the LTS version (20 or later recommended).
Install and verify
Run the .msi installer and follow the setup wizard. Then open Command Prompt and verify:
node --version
Install Claude Code globally via npm.
Open your terminal
macOS: Press Cmd + Space, type Terminal, and press Enter.
Windows: Press Win, type cmd, and click Open.
Install Claude Code globally
npm install -g @anthropic-ai/claude-code
sudo. Windows: Do not run Command Prompt as Administrator. Both can cause permission issues.
Authenticate
Run claude for the first time. Your browser will open for a one-time sign-in.
claude
Log in with your Claude.ai account (Pro or Max plan).
Verify the installation
claude doctor
claude doctor checks your installation type, version, and connectivity. All items should show green.
Add the Claude Code extension to Visual Studio Code.
Open VS Code
Launch Visual Studio Code on your computer.
Open the Extensions panel
Click the Extensions icon in the left sidebar, or press:
Cmd + Shift + X (macOS) / Ctrl + Shift + X (Windows)
Search for “Claude Code”
Type Claude Code in the search bar. Look for the official extension by Anthropic.
Install the extension
Click the Install button on the Claude Code extension.
Authenticate with your Claude account
After installation, open the Claude Code panel in VS Code. It will prompt you to sign in. Your browser will open for a one-time authentication.
Log in with your Claude Pro or Max plan account.
Verify the setup
After signing in, the Claude Code panel should show a chat interface inside VS Code.
Install a LaTeX distribution so that the pdflatex command works in your terminal. This is required for compiling research papers.
Download MacTeX
Go to tug.org/mactex and download MacTeX.pkg (full distribution, ~5 GB).
tlmgr.
Run the installer
Open the downloaded .pkg and follow the installer. MacTeX adds pdflatex, bibtex, latexmk, and other tools to /Library/TeX/texbin.
Restart your terminal
Quit and reopen Terminal so it picks up the updated PATH. Then verify:
pdflatex --version
pdfTeX 3.141592653-2.6-1.40.xx (TeX Live 20XX).
pdflatex: command not found, ensure /Library/TeX/texbin is on your PATH. You can append this line to ~/.zshrc:
export PATH="/Library/TeX/texbin:$PATH" — then run source ~/.zshrc.
Download MiKTeX
Go to miktex.org/download and download the Basic MiKTeX Installer for Windows (basic-miktex-x64.exe).
pdflatex.
Run the installer
Launch the .exe installer and follow the setup wizard. When asked, choose:
Update MiKTeX (recommended)
After installation, open MiKTeX Console from the Start Menu and click Check for updates. Apply any pending updates.
Restart Command Prompt
Close and reopen Command Prompt so it picks up the new PATH. Then verify:
pdflatex --version
MiKTeX-pdfTeX 4.x (...).
pdflatex is not recognized, the installer may not have added MiKTeX to your PATH. Reopen the installer and choose “Modify”, or add C:\Users\<you>\AppData\Local\Programs\MiKTeX\miktex\bin\x64 to your system PATH manually.
Required to compile and preview .tex files directly inside VS Code.
Open the Extensions panel in VS Code
Cmd + Shift + X (macOS) / Ctrl + Shift + X (Windows)
Search for “LaTeX Workshop”
Type LaTeX Workshop in the search bar. Look for the extension by James Yu.
Install the extension
Click the Install button. The extension auto-detects the pdflatex you installed in Part 5.
Compile a .tex file
Open a .tex file in VS Code and build it:
To open the generated PDF side-by-side, press Cmd + Alt + V (macOS) / Ctrl + Alt + V (Windows).
(Recommended) Use pdflatex as the default recipe
By default LaTeX Workshop tries latexmk first. To force pdflatex, open VS Code settings (Cmd/Ctrl + ,), search for latex-workshop.latex.recipe.default, and set it to first after adding this to your settings.json:
"latex-workshop.latex.tools": [
{
"name": "pdflatex",
"command": "pdflatex",
"args": ["-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%"]
},
{
"name": "bibtex",
"command": "bibtex",
"args": ["%DOCFILE%"]
}
],
"latex-workshop.latex.recipes": [
{
"name": "pdflatex × bibtex × pdflatex × pdflatex",
"tools": ["pdflatex", "bibtex", "pdflatex", "pdflatex"]
},
{
"name": "pdflatex",
"tools": ["pdflatex"]
}
]
\cite{...}); the second is faster for documents without bibliography.
Run the following commands in your terminal. Each should print a version string.
# Node.js / npm
node --version
npm --version
# Claude Code CLI
claude --version
# LaTeX
pdflatex --version
As a final smoke test, build a tiny LaTeX document:
echo "\documentclass{article}\begin{document}Hello AI-Assist Writing!\end{document}" > hello.tex
pdflatex hello.tex
hello.pdf is generated, your LaTeX setup is working correctly.