Zettlr LogoZettlr Documentation
Setup
Troubleshooting
FAQ
  • About Zettlr
  • Download Zettlr
  • GitHub
  • English
  • Español
  • Deutsch
  • Français
  • Italiano
  • 日本語
  • Português
  • Русский
Setup
Troubleshooting
FAQ
  • About Zettlr
  • Download Zettlr
  • GitHub
  • English
  • Español
  • Deutsch
  • Français
  • Italiano
  • 日本語
  • Português
  • Русский
  • Welcome
  • Getting started

    • Setup
    • Migrating from Obsidian
    • Migrating to a New Computer
    • Installing LaTeX
    • A Note on Security
    • Get involved
    • Troubleshooting
  • First Time Users

    • First Steps
    • Workspaces
    • Creating Files and Folders
    • Writing Markdown
    • Importing Word- and other Documents into Zettlr
    • Exporting Files
  • Interface

    • File Manager
      • Workspaces and Root Files
      • Choosing Which Files To Display
      • File Manager Appearance (Modes)
      • The File List
      • Properties
      • Filtering
      • Global Search
      • Projects
    • Split View
      • Document Tab Bar
      • Markdown Editor
      • Code Editor
      • Image Viewer
      • PDF Viewer
    • Sidebar
      • Table of Contents
      • References
      • Related Files
      • Other Files
  • Writing

    • Markdown Editor
      • Markdown Compendium
      • Appearance
      • Search
      • Autocomplete
      • Footnotes
      • Citations
      • Working With Comments
      • Status Bar
      • Table Editor
      • Text Transforms
      • Snippets
      • YAML Front Matter
    • Language & Style
      • Spellchecking
      • LanguageTool
      • Markdown Syntax
      • Autocorrect and Magic Quotes
      • Readability
    • Scientific & Technical
      • Math
      • Code Blocks
      • Mermaid Diagrams
      • Pomodoro Timer
      • Writing Statistics
    • Exporting
      • Exporting Workflow
      • Defaults Files (Profiles)
      • Selecting the PDF Engine
      • Assets Manager
      • Custom Templates and Reference Documents
      • Custom Commands
      • Printing and Previewing
      • Lua Filters
    • PKMS & Zettelkasten
      • The Zettelkasten method
      • Graph View
      • Tag Manager
  • Guides
    • Custom CSS
    • Reference Manager Integration
    • Setting up LanguageTool locally
    • Presentations
    • Submitting to a Journal using a LaTeX Template
    • Zettlr as a Portable App
  • Reference
    • Keyboard Shortcuts
    • Settings
    • Frequently Asked Questions

Installing LaTeX

Installing LaTeX

Zettlr allows exporting your documents and projects into a variety of file formats, including PDF. Zettlr offers two ways of exporting to PDF: Via Zettlr itself and with the help of an external program called LaTeX. Out of the box, Zettlr supports an export format called "Simple PDF". This will export a file to HTML and then “print” it, similar to how browsers print websites.

To export more advanced PDF files, you'll need to install LaTeX. LaTeX is a typesetting language that allows for a large amount of customization, but because it is a relatively large program, it does not come bundled with Zettlr. Here we show you how to install it.

Tip

Zettlr supports several engines to create PDF files, not just LaTeX. For example, Zettlr also supports Tectonic or Typst. Across this documentation, we focus on LaTeX, as it is the most reliable system for creating PDF files. You can select which PDF-engine you want to use by modifying your export profiles ("Defaults files"). If you do not wish to use LaTeX for PDF exports, you do not need to install LaTeX. We have written an easy guide to choosing the right PDF engine here in the documentation.

LaTeX distributions usually come in two flavors: A “full” installation featuring a host of graphical programs for writing TeX directly, and a “minimal” installation that only contains the actual compilers. Zettlr is happy with only a minimal installation (because it just needs the compiler), but if you want to fiddle around with LaTeX more you are free to install the full package.

Note

Especially if you only install the minimal setup, you'll need to install additional packages afterwards. Read to the end of this guide to see how.

Windows

Installing LaTeX on Windows works just like any other program. Simply download and install one of the following:

  • The minimal setup: MikTeX (download)
  • The full setup: TeX Live (download)

macOS

Similar to Windows, macOS also features simple installers that will install one of the two versions:

  • The minimal setup: Basic TeX (download)
  • The full setup: MacTeX (download)

Linux

Linux distributions commonly have several LaTeX packages available to install directly from your software manager. If you're running the Flatpak version, you must install the Flatpak TeX Live extension, rather than a TeX distribution from your system software manager. There are also minimal and full packages. We list options for common distributions below.

Note

It doesn't really matter which of the versions you install, but there is one requirement: You need to install the xetex binary, since that is the compiler that Zettlr uses by default. If in doubt, consult your distribution's manual for more information on how to correctly install TeX.

Debian/Ubuntu

The minimal setup with the XeLaTeX compiler:

$ sudo apt install texlive-base texlive-xetex

The full setup:

$ sudo apt install texlive-full

Fedora/RHEL

Fedora offers three distributions, basic, medium, and full. Install one of these:

$ sudo dnf install texlive-scheme-basic
$ sudo dnf install texlive-scheme-medium
$ sudo dnf install texlive-scheme-full

Flatpak

Install the texlive plugin for Flatpak (be warned, it is the full version and thus quite large):

$ flatpak install org.freedesktop.Sdk.Extension.texlive

Installing Additional Packages

Most LaTeX features come in the form of packages. By default, minimal installations only come with a basic set of packages. The default template that Zettlr uses requires a few additional packages to be present on your system. You'll need to install these packages, but they are often just a few Kilobytes large so they won't occupy much disk space. Even with the large or full installations, some packages might be missing.

We recommend you don't install packages unless Zettlr complains during exports. If you are missing some package, Zettlr will give you one of two errors: either Command \somecommand not defined or File somefile.sty not found. In both cases it is likely that the command or file will be provided by a package. It's easy to install the missing packages using the following procedure.

Tip

On Windows, LaTeX will attempt to install the missing packages automatically and will ask you if it should do so. This means you only need to confirm a dialog. On macOS and Linux, you'll need to use the command line. More specifically, on macOS and Linux, you need to use a tool called tlmgr (TeXLive Manager).

  1. All LaTeX packages are listed in the “Comprehensive TeX Archive Network” (CTAN). Take the filename (including its extension, .sty) or the command, and search for it using the search bar.
  2. For example, if LaTeX complains that the command \hypertarget is not defined, search for it like this.
  3. In the case of “hypertarget,” it will give you a single package: gmiflink. If there is more than one result, try to google which one you need. There is usually some discussion, since you are never the first to experience the issue.
  4. To install it on macOS or Linux, type sudo tlmgr install <packagename> into a terminal window.
  5. Then, try the export again. Repeat these steps until all missing packages are installed.

Tip

Sometimes, the CTAN search gives you no results for your searches. An alternative to searching CTAN directly is to use tlmgr. You can query which packages contain a file by running the tlmgr info command. For example, to search for the file "realscripts.sty," run the following:

tlmgr info realscripts.sty

This will output something along these lines:

tlmgr: cannot find package realscripts.sty,
searching for other matches:

Packages containing `realscripts.sty' in
their title/description:

Packages containing files matching `realscripts.sty':
lwarp:
	texmf-dist/tex/latex/lwarp/lwarp-realscripts.sty
realscripts:
	texmf-dist/tex/latex/realscripts/realscripts.sty

In this case, it will tell you that there are two packages that matched your search. In this case, you'd want to install the package realscripts.

Edit on GitHub
Last update: 8/18/26, 8:15 PM
Contributors: Hendrik Erz, JCox06
Prev
Migrating to a New Computer
Next
A Note on Security
© 2017-2026 by Zettlr and Contributors