Step 1
LaTeX Installation
Install MiKTeX, enable on-demand package installation, and verify the base toolchain is ready.
Outcome
MiKTeX, Perl, and latexmk are installed and available from a new terminal.
Before you start
- Permission to install software on the computer.
- A stable internet connection for installers and LaTeX packages.
Verification state
- Status
- Needs review
- Environment
- Windows is the detailed screenshot path; macOS and Linux use command-based guidance.
- Workflow
- MiKTeX, Perl, latexmk, and on-demand package installation.
- Last verified
- Pending a current-product walkthrough.
- Operating-system support
- Windows detailed; macOS and Linux summary with terminal verification.
Download MiKTeX
Download it from the MiKTeX website.
Official MiKTeX downloads
On the download page, choose the installer that matches your operating system.
Install MiKTeX
- Download the installer from the official MiKTeX download page for your platform.
- Finish the normal installer flow, then open MiKTeX Console once after installation.
- Run updates in MiKTeX Console before moving on, so the package database is current.
- Keep on-demand package installation enabled, since that is the working assumption of this guide.
- Confirm that
latexmkis available. If it is missing, install it through MiKTeX Console before continuing.
Linux is supported, but setup details vary by distribution. Follow the official MiKTeX Linux installation docs for distro-specific steps.
The installer itself is straightforward. The first real checkpoint is that the setup wizard reaches its completion screen without errors.
After setup, search for latexmk in MiKTeX Console and confirm that the package is available for installation.
If latexmk is missing, let MiKTeX install it and wait for the package operation to finish.
Perl Installation
latexmk and later latexdiff-style workflows depend on Perl-based tools. Operating-system-specific installation and verification steps are below.
Windows
For this guide, treat Windows as the default path. Install MiKTeX first, then install Strawberry Perl as a required dependency so later latexmk/latexdiff workflows do not fail because Perl is missing.
Open the official Strawberry Perl site and install it before running the checks.
Strawberry PerlAfter install, open a new terminal and verify:
perl --version
where perl
latexmk -v
macOS / Linux
macOS environments usually expose Perl already (/usr/bin/perl), while Linux varies by distribution. In both environments, verify from Terminal before moving on.
perl --version
which perl
latexmk -v
If perl is not found, install a Perl runtime first, then rerun the checks.
Package auto-installation
When a build pauses mid-compile, MiKTeX is likely fetching a missing package. On Windows, the dialog can appear behind the editor or as a small taskbar preview — look for it before assuming the build has hung.
If a build seems to pause, look for the MiKTeX package-install prompt. On Windows, it can appear behind the editor or as a small taskbar preview.
When the package dialog appears, allow MiKTeX to install the missing package so the build can continue.
Common problems
- A package-install prompt may be hidden behind VS Code during the first build.
- A newly installed command may require closing and reopening the terminal.
Completion check
A new terminal prints version information for both perl --version and latexmk -v.