Learn how to get started with writing LaTeX on Windows. This guide assumes a Windows 10 or 11 and a Visual Studio Code installation.
We will be using Visual Studio Code, the most popular code editor out today, along with some extensions:
- Python: Support extension for Python
- Remote - WSL: Virtual environment integration with WSL
- LaTeX Workshop: Support extension for LaTeX
As per the official Microsoft description, "The Windows Subsystem for Linux lets developers run a GNU/Linux environment." Put into simple terms, you can use a Linux environment without waiting an hour for your dual-boot or VM configuration to load. Still confused? Check out this video.
We'll be using version 2
since it's supposedly faster. You can check out the official Microsoft Comparison here. Install and configure with:
wsl --install
wsl --set-default-version 2
A simple installation isn't enough, so you'll need to enable a feature to use WSL.
- Navigate to
Task Manager
through 🪟 or with Ctrl+Shift+Esc.- Make sure
Virtualization
is enabled in theCPU
section of your task manager'sPerformance
page
- Make sure
- Navigate to
Turn Windows features on or off
through the Windows search bar - Enable
Windows Subsystem for Linux
if it isn't already
Now go ahead and reboot your computer.
The most popular and beginner-friendly Linux distribution out there, Ubuntu has collaborated with Microsoft to make WSL possible. This is the Linux distribution that we'll be running atop WSL.
Install Ubuntu from the Microsoft Store. Once finished, enter Ubuntu through the 🪟, and it'll bring up a window and start installing the distribution.
Once finished, launch the app and run its installation course. Then you'll be prompted to enter a username, which you can just set to your Windows username, or whatever you like. Same goes for your password, although it's advisable to keep this the same as your Windows password so you don't have to reach for a sticky note or use your brain every time. Your keyboard won't output to the screen while you type out your password, as this is an intentional feature to keep your credentials secure.
root
, run the following in PowerShell (retrieved from issue) to briefly reinstall and re-enter a username.
wsl --unregister Ubuntu
ubuntu install --ui=none
Install the tools to compile LaTeX locally with:
sudo apt update
sudo apt install texlive-full -y
Now start a LaTeX project with:
mkdir ~/proj && cd $_
touch main.tex && code .
Edit your main.tex
file with a template from Overleaf, and simply save for the LaTeX Workshop extension to compile it into a PDF. Check out autoCV to set up CI/CD to push edits to your online portfolio/site.