
How to Run LaTeX Projects Locally (for Free) On Windows
How to Run LaTeX Projects Locally (for Free) On Windows êŽë š
LaTeX is a high-quality typesetting system that is widely used in technical, academic, and scientific writing. Itâs very popular in academia, especially in fields like mathematics, physics, computer science, and engineering.
LaTeX is not a word processor like Microsoft Word â rather, itâs a document preparation system that allows you to focus on the content of your writing while it handles the formatting. If you use LaTeX to write your formal documents (like a CV, rĂ©sumĂ©, or research paper), then you donât need to worry about the formatting and structure, as everything can be done using LaTeX scripts.
If you use LaTeX to write your academic or research papers, you might be familiar with website-based applications like Overleaf. Overleaf is a website that allows anyone to read, write, and compile LaTeX scripts online.
These sites are okay for small tasks or compilations, or if you need only a little bit of free collaboration. But if you need to work on bigger projects or need to conduct many collaborative tasks, then the free tier may be insufficient. And in my opinion, the paid subscription costs too much.
But donât worry: running LaTeX locally may be the perfect solution for you. I know this because I also faced a similar situation, and this simply changed my life! I also keep all of the tracks in Git (GitHub, GitLab, and so on) along with unlimited collaboration opportunities and compilation. And the great thing is, all of these are completely free as itâs all happening on my local machine.
So in this article, I am going to discuss the methods in detail. I have also created an in-depth video for you to understand how this works.
Video Tutorial
Resources Youâll Need:
This entire guide is available in one of my GitHub projects named FahimFBA/Install-LaTeX
. The live website is available here (fahimfba.github.io/Install-LaTeX as well. I would highly appreciate it if you star (â) the repository. Also, you can create issues there if you face any problems. Any kind of good contribution is also welcome here.
You can install LaTeX on any major operating system (Windows, MacOS, and Linux-based OSes). But in this article, I am only going to talk about the Windows operating system.
Here, Iâm using the latest Windows 11 operating system, but the same procedure should be applicable to all of the Windows-based operating systems that are going to come out in the future. Windows 10 should also be okay too.
I am going to use the popular Visual Studio Code as my editor. It is a 100% free and robust editor thatâs very popular among devs all over the world. If you donât already have it, go ahead and install it before proceeding further.

To work on LaTeX files, youâll need a specific compiler. I am going to use MikTeX. There are other tools out there, but this is the best tool right now (according to me!). It is completely free and supports all major operating systems as well. It also has a built-in IDE, but we are going to use VS Code as our main editor.

Download the Windows executable file from the Download section.

After the download is finished, install the executable. At the end of the installation, keep the tick in âCheck for updates nowâ.

You will find the MikTeX console in your taskbar. Open that.

Go to the âUpdatesâ tab and click âUpdate nowâ. It will install all of those packages.

At the end, it will prompt you to close the console. Click âOKâ. Open MiKTeX again.

Thatâs it for this tool.
The commands we are going to execute for building the LaTeX files are dependent on Perl. As the Windows operating system doesnât come with a built-in Perl compiler, we are going to install the Strawberry Perl.

Download the latest MSI package from it.

Install the executable after it gets finished downloading the application.
We need to add Perlâs path to the system environment. To do that, go into the location where it has been installed. By default, it gets installed inside C:\Strawberry\perl\bin
directory. Copy the path.
Now search for âenvâ in the Windows search bar until you find something called âEdit the system environment variableâ.

Now click on âEnvironment VariablesâŠâ.

Now select âPathâ from âSystem variablesâ and click âEditâ.

Click âNewâ. Paste the path. Now exit every windows sequentially by clicking on âOKâ in each window.

Visual Code Studio Extensions
We need some extensions in VS Code to streamline our workflow.
First, letâs get LaTeX Workshop. It is the core extension for working with LaTeX files inside VS Code Studio.

Next, youâll need Rewrap. It is an amazing tool that lets you wrap longer lines. It helps you work in a long line in separate lines without breaking any structure or sentence.

Build the LaTeX File
Whenever you want to build any LaTeX file inside VS Code studio, simply open that file in it. Then open the command palette using Ctrl+Shift+P.
Search for LaTeX Workshop: Build with recipe
and go there. It will start building the file. Whenever it prompts you to install any missing package, untick the box that says Always show this dialog
and press âInstallâ. I do this because clicking on âInstallâ on hundreds of prompt windows for building a LaTeX file is very difficult for me.

After it finishes building the LaTeX file, you will get the output PDF file inside VS Code. You can open the PDF file directly in VS Code.
If you want to go into any specific line in the code from the output PDF file like Overleaf, simply click on that specific portion in the PDF by pressing the Ctrl key. It will immediately take you to the code part where it belongs.
Thatâs it! Itâs now running on your local machine and there are no restrictions or limitation to it, literally! Also, for collaboration and keeping track of the history, using Git is the best option, like I do.
Conclusion
Thanks for reading this short tutorial. I hope it helped you interact more easily with LaTeX.
You can follow me on GitHub (FahimFBA
), LinkedIn (fahimfba
), and YouTube (FahimAmin
) to get more content like this. Also, my website is always available for you!