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
MiKTeX homepage

On the download page, choose the installer that matches your operating system.

MiKTeX download page

Install MiKTeX

  1. Download the installer from the official MiKTeX download page for your platform.
  2. Finish the normal installer flow, then open MiKTeX Console once after installation.
  3. Run updates in MiKTeX Console before moving on, so the package database is current.
  4. Keep on-demand package installation enabled, since that is the working assumption of this guide.
  5. Confirm that latexmk is 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.

MiKTeX Linux install docs

The installer itself is straightforward. The first real checkpoint is that the setup wizard reaches its completion screen without errors.

MiKTeX setup wizard completion screen

After setup, search for latexmk in MiKTeX Console and confirm that the package is available for installation.

MiKTeX Console package search for latexmk

If latexmk is missing, let MiKTeX install it and wait for the package operation to finish.

MiKTeX package installation progress window

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 Perl

After install, open a new terminal and verify:

perl --version
where perl
latexmk -v
Strawberry Perl download page

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.

VS Code with a hidden MiKTeX package installation prompt preview

When the package dialog appears, allow MiKTeX to install the missing package so the build can continue.

MiKTeX package installation dialog for a missing package

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.