How to Install LaTeX in Windows 10
Installing LaTeX on Windows 10 might seem like a daunting task, but it’s simpler than you think. With just a few steps, you can have this powerful typesetting system up and running. All you need to do is download and install the necessary software, and you’ll be ready to create professional-quality documents in no time.
In this section, we’ll go through the steps to install LaTeX on your Windows 10 computer. By the end of these steps, you’ll have LaTeX installed and ready to use for all your typesetting needs.
Step 1: Download MiKTeX
First, go to the MiKTeX website and download the latest version of MiKTeX.
MiKTeX is a popular LaTeX distribution for Windows. It provides all the LaTeX tools you need in one package. Just visit the MiKTeX website, and look for the download link for Windows.
Step 2: Run the MiKTeX Installer
Next, find the downloaded MiKTeX installer file and double-click it to start the installation.
Follow the on-screen instructions to complete the setup. You’ll be asked to choose installation settings like the installation directory and whether to install missing packages automatically.
Step 3: Download and Install an Editor
Download and install a LaTeX editor like TeXworks or TeXstudio.
While MiKTeX provides the core LaTeX system, you’ll need an editor to write your LaTeX documents. Both TeXworks and TeXstudio are great free options that work well with MiKTeX.
Step 4: Open the LaTeX Editor
After the editor is installed, open it to start using LaTeX.
To ensure everything was installed correctly, open your chosen editor. You should see a blank document where you can start typing your LaTeX code.
Step 5: Compile a Sample Document
Write a simple LaTeX document and compile it to see if LaTeX is working correctly.
Type a basic LaTeX document in your editor and compile it. This will create a PDF file, showing that LaTeX is functioning as it should.
Once you’ve completed these steps, you’ll have LaTeX installed on your Windows 10 computer, ready for creating all sorts of documents.
Tips for Installing LaTeX in Windows 10
- Choose the right distribution: MiKTeX is popular for Windows, but there are other options like TeX Live.
- Check for updates: Make sure to update MiKTeX regularly to get the latest packages and features.
- Install an integrated editor: TeXworks and TeXstudio are user-friendly and integrate well with MiKTeX.
- Use online resources: Websites like Overleaf offer online LaTeX editors if you have issues with local installations.
- Learn the basics: Familiarize yourself with basic LaTeX commands to get started quickly.
Frequently Asked Questions about Installing LaTeX in Windows 10
How much space does MiKTeX require?
MiKTeX typically requires around 2GB of disk space, but this can vary depending on the packages you install.
Can I install LaTeX without admin rights?
Yes, MiKTeX offers a portable version that can be installed without administrative privileges.
Is there a difference between MiKTeX and TeX Live?
Yes, MiKTeX is designed for Windows whereas TeX Live is cross-platform and can be used on Windows, Mac, and Linux.
What if I encounter errors during the installation?
Check the MiKTeX log files for detailed error messages and consult the MiKTeX documentation or forums for troubleshooting.
Can I uninstall MiKTeX easily?
Yes, you can uninstall MiKTeX through the Control Panel, like any other software on Windows.
Summary
- Download MiKTeX.
- Run the MiKTeX Installer.
- Download and install an editor.
- Open the LaTeX editor.
- Compile a sample document.
Conclusion
Installing LaTeX in Windows 10 doesn’t have to be a headache. By following the steps laid out in this guide, you’ll have a powerful typesetting system at your fingertips in no time. Whether you’re working on academic papers, books, or even just fancy documents, LaTeX can elevate your work to a professional level. Don’t forget to explore and learn more about LaTeX commands and packages; there’s always something new to discover. And if you run into problems, plenty of resources and communities are available to help you troubleshoot. Happy typesetting!
Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.
Read his full bio here.
8 min read
Share this post
Published in General
By Scholarly
8 min read
Share this post
Introduction
LaTeX is a powerful typesetting system widely used in academia and professional writing. It allows users to create high-quality documents with complex mathematical equations, scientific symbols, and professional formatting. In this guide, we will walk you through the step-by-step process of installing LaTeX on a Windows computer.
Benefits of LaTeX
Before we dive into the installation process, let’s explore some of the benefits of using LaTeX:
- Professional Typesetting: LaTeX provides precise control over document layout, ensuring a polished and professional appearance.
- Mathematical Equations: LaTeX excels at typesetting complex mathematical equations and formulas, making it a popular choice among scientists, mathematicians, and engineers.
- Cross-Referencing and Citations: LaTeX simplifies the process of cross-referencing figures, tables, equations, and citations, enhancing document organization and readability.
- Version Control: LaTeX integrates seamlessly with version control systems like Git, allowing for efficient collaboration and tracking of document changes.
- Wide Range of Templates: LaTeX offers a vast collection of templates for various document types, including research papers, theses, CVs, and presentations.
Step 1: Downloading MiKTeX
The first step in installing LaTeX on Windows is to download and install MiKTeX, a popular LaTeX distribution for Windows. Follow these steps:
- Visit the MiKTeX website at https://miktex.org/.
- Click on the ‘Download’ button to download the MiKTeX installer.
- Run the installer and follow the on-screen instructions to complete the installation.
Step 2: Configuring MiKTeX
Once MiKTeX is installed, you need to configure it to ensure smooth operation. Here’s what you need to do:
- Open the MiKTeX Console from the Start menu.
- In the MiKTeX Console, click on ‘Settings’ to open the settings window.
- In the settings window, click on the ‘General’ tab.
- Click on ‘Refresh FNDB’ to update the file name database.
- Click on ‘Update Formats’ to update the LaTeX formats.
Step 3: Choosing an Editor
While MiKTeX provides a command-line interface for compiling LaTeX documents, most users prefer using a dedicated LaTeX editor for a more user-friendly experience. Here are some popular options:
- TeXstudio: A feature-rich LaTeX editor with an intuitive interface.
- TeXmaker: A cross-platform LaTeX editor with built-in PDF viewer and code completion.
- Overleaf: An online LaTeX editor with real-time collaboration features.
Choose an editor that suits your preferences and install it on your Windows computer.
Step 4: Writing Your First LaTeX Document
Now that you have MiKTeX installed and an editor set up, it’s time to write your first LaTeX document. Follow these steps:
- Open your preferred LaTeX editor.
- Create a new document and save it with a .tex extension.
- Write your LaTeX code, including document class, packages, and content.
- Save the document.
- Use the editor’s compile command to generate a PDF output.
Conclusion
Congratulations! You have successfully installed LaTeX on your Windows computer and are ready to unleash its power for creating professional documents. Remember to explore the vast LaTeX community and resources to enhance your typesetting skills and make the most out of this versatile tool.
Installing LaTeX opens up a world of possibilities for academics, researchers, and professionals, allowing them to create visually appealing and well-structured documents. With its extensive features and flexibility, LaTeX remains a top choice for those seeking high-quality typesetting. Start your LaTeX journey today and elevate your document creation experience.
Complete step-by-step guide for setting up LaTeX on Windows with MiKTeX, VS Code, and automatic formatting using latexindent
This guide will help you set up a complete LaTeX environment on Windows with MiKTeX, VS Code, and automatic formatting with latexindent
.
Prerequisites
- Windows 10/11
- Package manager (Chocolatey, Winget, or Scoop)
- VS Code (or install it during this process)
Step 1: Install MiKTeX
Choose one of the following methods:
Option A: Using Winget (Recommended)
winget install MiKTeX.MiKTeX
Option B: Using Chocolatey
Option C: Using Scoop
Step 2: Update MiKTeX and Configure
- Open a new terminal and update MiKTeX:
- Or use MiKTeX Console (GUI):
- Open MiKTeX Console from Start menu
- Go to «Updates» tab and install all updates
- In Settings > General, set «Package installation» to «Always install missing packages on-the-fly»
Step 3: Install Strawberry Perl
latexindent
requires Perl. Install Strawberry Perl:
winget install StrawberryPerl.StrawberryPerl
Important: Close and reopen your terminal after installation!
Step 4: Configure Perl Environment
If you have multiple Perl installations, you might need to prioritize Strawberry Perl:
- Check which Perl is being used:
where perl
perl --version
- If the wrong Perl is being used, temporarily set the correct path:
set PATH=C:\Strawberry\perl\bin;C:\Strawberry\c\bin;%PATH%
Step 5: Install Required Perl Modules
Install the modules needed by latexindent
:
cpan YAML::Tiny cpan File::HomeDir cpan Log::Log4perl cpan Log::Dispatch
Step 6: Install MiKTeX Packages
Install the required LaTeX packages:
miktex packages install latexindent miktex packages install latexmk
Step 7: Create latexindent Wrapper Script
- Create a directory for scripts (if it doesn’t exist):
- Create
C:\dev\scripts\latexindent.bat
:
@echo off C:\Strawberry\perl\bin\perl.exe "%LOCALAPPDATA%\Programs\MiKTeX\scripts\latexindent\latexindent.pl" %*
- Add the scripts directory to your PATH:
setx PATH "%PATH%;C:\dev\scripts"
Note: Close and reopen your terminal after this step!
Step 8: Install and Configure VS Code
- Install VS Code (if not already installed):
winget install Microsoft.VisualStudioCode
- Install LaTeX Workshop extension:
code --install-extension James-Yu.latex-workshop
Step 9: Configure VS Code Settings
Open VS Code settings (Ctrl+,), click the JSON icon in the top right, and add:
{ "editor.wordWrap": "on", "editor.formatOnSave": true, // LaTeX Workshop configuration "latex-workshop.latex.tools": [ { "name": "latexmk", "command": "latexmk", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "-pdf", "%DOC%" ] } ], "latex-workshop.latex.recipes": [ { "name": "latexmk", "tools": [ "latexmk" ] } ], "latex-workshop.view.pdf.viewer": "tab", "latex-workshop.latex.clean.fileTypes": [ "*.aux", "*.bbl", "*.blg", "*.idx", "*.ind", "*.lof", "*.lot", "*.out", "*.toc", "*.acn", "*.acr", "*.alg", "*.glg", "*.glo", "*.gls", "*.fls", "*.log", "*.fdb_latexmk", "*.snm", "*.nav", "*.dvi" ], "latex-workshop.latex.autoBuild.run": "onSave", // LaTeX formatting configuration "latex-workshop.formatting.latex": "latexindent", "latex-workshop.formatting.latexindent.path": "latexindent", "latex-workshop.formatting.latexindent.args": [ "-c", "%DIR%/", "%TMPFILE%", "-y=defaultIndent: '%INDENT%'" ], // Language-specific formatting settings "[latex]": { "editor.defaultFormatter": "James-Yu.latex-workshop", "editor.formatOnSave": true }, "[json]": { "editor.defaultFormatter": "vscode.json-language-features" }, "[jsonc]": { "editor.defaultFormatter": "vscode.json-language-features" } }
Step 10: Test Your Setup
- Create a test file
test.tex
:
\documentclass{article} \usepackage{amsmath} \begin{document} \title{LaTeX Test} \author{Your Name} \maketitle \section{Introduction} This is a test document. \subsection{Math Test} Here's an equation: \begin{equation} E = mc^2 \end{equation} \begin{itemize} \item First item \item Second item \item Third item \end{itemize} \begin{enumerate} \item One \item Two \item Three \end{enumerate} \end{document}
- Open the file in VS Code
- Save it (Ctrl+S) — it should auto-format the indentation
- Build it (Ctrl+Alt+B) — it should create a PDF
Troubleshooting
Issue: latexindent
not found
- Make sure Perl is in your PATH:
perl --version
- Check if latexindent works directly:
C:\Strawberry\perl\bin\perl.exe "%LOCALAPPDATA%\Programs\MiKTeX\scripts\latexindent\latexindent.pl" --version
- Ensure
C:\dev\scripts
is in your PATH:echo %PATH%
Issue: Multiple Perl installations conflicting
- Check which Perl is being used:
where perl
- Temporarily override PATH:
set PATH=C:\Strawberry\perl\bin;%PATH%
- Or uninstall conflicting Perl installations
Issue: LaTeX packages missing
- Enable automatic installation in MiKTeX Console
- Or install manually:
miktex packages install <package-name>
Issue: «LaTeX formatter is set to ‘none'»
- Ensure your settings.json includes:
"latex-workshop.formatting.latex": "latexindent"
- Restart VS Code after changing settings
Additional Tips
-
Keep MiKTeX updated regularly:
-
For manual formatting in VS Code:
- Right-click and select «Format Document»
- Or use keyboard shortcut:
Shift+Alt+F
-
View LaTeX Workshop output for debugging:
- View → Output → Select «LaTeX Workshop» from dropdown
-
Common LaTeX packages you might want to install:
miktex packages install amsmath amssymb graphicx hyperref babel geometry
References
- MiKTeX Documentation
- LaTeX Workshop Wiki
- latexindent Documentation
Last updated: January 2025
Tested on: Windows 11, MiKTeX 24.1, VS Code 1.85+, LaTeX Workshop 10.0+
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:
1. GitHub Repository
This entire guide is available in one of my GitHub projects named 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.
2. Operating System
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.
3. Editor
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.
4. LaTeX Compiler/IDE
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.
5. Perl
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, LinkedIn, and YouTube to get more content like this. Also, my website is always available for you!
Learn to code for free. freeCodeCamp’s open source curriculum has helped more than 40,000 people get jobs as developers. Get started
The Basics
The core of LaTeX is a backend software package that complies the LaTeX code (.tex file) and creates the final document (PDF). There are a few different programs available to do this depending on the operating system of the user. The LaTeX Project provides information about how to install LaTeX on Windows, Macs, and Linux, as well as online services. Instruction on how to install the most common LaTeX programs for Windows and Mac can be found in the «Installation for Windows» and «Installation for Mac OS X» sections below.
Aside from the back end software required to run LaTeX it is highly recommend that users install a text editor. A text editor is a frontend software that can be used to create .tex file used by the compiler. Text editor programs such as TeXwork, TexStudio, TexMaker, and TexShop provide a friendly interface for users. Often these front end programs include help menus, wizards for creating LaTeX objects, drop down menus for inserting symbols or altering text, and many other features that will support both new and experienced LaTeX users. You will find more information about these frontend programs in the «LaTeX Interfaces» box below.
Installation for Windows
For a Windows computer it is strongly recommend that you use the common MiKTeX editor. The MiKTeX/about page contains several links including how to install, deploy, and update MiKTeX. A basic set of installation instruction can be found below, but if you are having trouble be sure to check the MiKTeX page (click the previous install hyperlink):
- Download MiKTeX (make sure you choice the right option either basic MiKTeX 64 or basic MiKTeX 32 depending on your computer)
- After the download is complete run the installer. During the installation you will be prompted to select the paper size. It is recommend that you choice letter (this can be changed later if needed).
- Once the installation is complete it is recommend that you check for any updates. The update wizard can be found through the Windows start menu. Following the steps provided by the update wizard should be a simple, but if you are having trouble instructions can be found by clicking the update hyperlink above.
- With everything installed and updated the last step is to try typesetting. MiKTeX comes with a front end text editor built in, TexWork. To open TeXwork go to Start > All Programs > MiKTeX > TeXwork.
At this point you may want to play around and try typesetting your own document. For your first document you should go to the Getting Started: Creating a document page. Once you have gone through that if you are looking for some additional ideas or exercises go to the Exercises tab.
Installation for Mac OS X
For Mac OS X it is strongly recommended that you use MacTex. Information about MacTex can be found on their main page. It is recommended that you click the link «download MacTex». This link will take you to a page with the download package, as well as, the instructions for downloading MacTex. If you are having trouble locating you can download package. Follow the instruction on that page or the simple instructions listed below:
- Click on «MacTex.pkg» near the top of the page to begin the download.
- One the download is complete open the package and following along the installation wizard.
- The «MacTex.pkg» contains several different programs and documents. If you did not change the path during installation these items should appear in a folder with the following location Application/TeX.
- The two most important items contained in the TeX folder are TeX Live Utility a program that you can use to update MacTex, and TeXShop a front end text editor. It is recommended that your run Tex Live Utility before getting started to check for updates.
With everything installed and up to date you may want to play around and try typesetting your own document, to do this open TeXShop. For your first document you should go to the Getting Started: Creating a document tab. Once you have gone through that if you are looking for some additional ideas or exercises go to the Exercises tab.
When starting a new document in TeXShop you may want to begin by going to File > New from Stationary > AMS-Article this will open a text editor with a standard template for creating an article. You will see other templates in New from Stationary that you may want to use in the future, such as beamer for creating slide show.
LaTeX Interfaces
As mentioned before the use of a front end text editor program is strongly encouraged. These programs help to increase the readability of LaTeX code during the editing process. Many of these programs contain wizards that can speed of the creation of certain LaTeX objects such as tables, they have overlays when using commands to provide information and to make sure the inputs are formatted properly, and they often have toolbars that simplify the use of certain common commands and symbols. Both the MiKTeX and MacTex downloads discussed above include a text editor, but you may want to look around to find the one you like best. I for example use TexStudio, a popular text editor. A comparison of various editors are available.
To illustrate how powerful a good text editor can be look at the two codes below. The first is written in notepad, for the new user it can be very difficult to follow this code and equally difficult to edit. The second image is the same code written in TexStudio. In TexStudio the code is automatically color coded. The color coding makes it much easier to tell the difference between comments, equations, text, commands, and other LaTeX structures.
Notepad
TexStudio
Installation for Linux and online platforms
For instructions on how to download LaTeX for Linux visit the The LaTeX project website or download Tex Live
The LaTeX project also has links for different online platforms that can be used to edit, view, and download .tex and PDF files.
Overleaf
NYU is providing free Overleaf Professional accounts for all students, faculty and staff who would like to use a collaborative, online LaTeX editor for their projects. Overleaf Professional accounts provide real-time track changes, unlimited collaborators, and full document history.
Overleaf is designed to make the process of writing, editing and producing your research papers and project reports much quicker for both you and your collaborators. Overleaf can also be linked to other services such as reference managers to best fit into your workflow.
Claim your free Overleaf Professional account on Overleaf by signing up. You’ll need to verify a NYU email address in order to receive your free Overleaf Professional account.