How to install LaTeX locally on your PC
Hi, today I will describe how I installed MiKTeX, a TeX distribution, locally on my PC, along with my usual go-to workflow. Often, I faced issues regarding compile time on Overleaf. Hence, why not locally work with LaTeX?
So, let’s see the steps to install MiKTeX. I will also show how we can install packages, followed by a simple script to compile our project with multiple files without flooding our project directory.
Installation
- Install python. (not needed for MiKTeX, but it is useful for the script I will be sharing).
- Install VSCode (I prefer this, but any other editor would work).
- Go to MiKTeX and choose your OS and download.

- Follow the steps at https://miktex.org/howto/install-miktex, they are pretty self explanatory.
- Once MiKTeX is installed, you can search for MiKTeX Console on the Windows search bar and open it as administrator.

- Open Command Prompt, and type
where pdflatex
. If it shows a valid path under MiKTeX, your TeX Distribution has been installed!

Installing Packages
Under the Packages tab, you can easily search for a package and install it.

Writing and Compiling a Project.
I will be using a sample project (My Intro to Quantum Physics Assignment 2). It contains subfiles and images so that it would be a good demonstration.
- Open VSCode and create your project.

- Create a file called compile.py.
- Now, all you need to do is open the terminal (press
Ctrl + `
), and type incompile.py main.tex
. PressEnter
if any known errors come up. MiKTeX may also prompt you to install packages if needed. The compilation will continue.
- Now,
main.pdf
will be saved in your project directory. You can also open the pdf in split screen view in VSCode to get more of an overleaf feel.

Enjoy Reading This Article?
Here are some more articles you might like to read next: