Step 1
LaTeX Installation
Install MiKTeX, enable on-demand package installation, and verify the base toolchain is ready.
Why MiKTeX
MiKTeX is the default distribution for this guide. It starts lightweight, works well for first-time users, and installs missing packages as you need them.
Download MiKTeX
Download it from the MiKTeX website.
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.
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.
Platform notes
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.
- Strawberry Perl (official): https://strawberryperl.com/
- After install, open a new terminal and verify:
perl --version
where perl
latexmk -v
macOS
Use the official MiKTeX installer for macOS. macOS environments usually expose Perl already (/usr/bin/perl), but you should 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.
Linux
Linux is supported, but setup details vary by distribution. Follow MiKTeX’s official Linux installation page for your distro and package manager, then verify the toolchain with commands below.
- MiKTeX Linux install docs (official): https://miktex.org/howto/install-miktex-unx
Recommended post-install checks:
perl --version
which perl
latexmk -v
miktex --version
If latexmk is missing, install it from MiKTeX Console or your distro/MiKTeX package flow, then re-check.
Perl requirement
latexmk and latexdiff-style workflows both depend on Perl.
perl --version
latexmk -v
On Windows, install Strawberry Perl if Perl is missing. On macOS and Linux, verify that Perl is already available before you proceed.
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.
Before proceeding
Confirm that MiKTeX Console opens and latexmk -v runs without errors. If your workflow uses Perl-based tools, verify perl --version as well.