LaTeX & Typst (papers, theses, resumes and slides) Module 1 – Start here: from source file to PDF
Install TeX Live, TinyTeX or MiKTeX, and Typst
Install a TeX distribution and Typst on Windows, macOS or Linux, check every version from the command line and the log, and add a missing LaTeX package.
What you will learn
- Choose and install a TeX distribution (TeX Live, MiKTeX or TinyTeX) and Typst on Windows, macOS or Linux
- Check the engine, LaTeX, TeX Live and Typst versions from the command line and from inside a document
- Add a missing LaTeX package with tlmgr, or let MiKTeX install it when a document needs it
- Set up an editor that builds both systems, or choose an online editor and its TeX Live year
Before you start
What you’ll learn · Before you start
What you will learn
- Choose and install a TeX distribution (TeX Live, MiKTeX or TinyTeX) and Typst on Windows, macOS or Linux
- Check the engine, LaTeX, TeX Live and Typst versions from the command line and from inside a document
- Add a missing LaTeX package with tlmgr, or let MiKTeX install it when a document needs it
- Set up an editor that builds both systems, or choose an online editor and its TeX Live year
Before you start
On this page
A full TeX Live installation needs 9,402 MB of disk space in the example screen of its own installation guide, while TinyTeX starts at 50 to 70 MB and Typst is one small program. All three end with the same check: a version line that says what you really installed.
Below you will compare the ways of getting a TeX system and pick one for your computer, install Typst and list the fonts it carries, check every version from the command line and from inside a document, fix a build that stops on a missing class, and set up an editor or an online alternative.
A TeX distribution brings the engines, the format and the packages
You never install LaTeX on its own: you install a distribution, which brings the engines, the LaTeX format, packages and fonts in one TeX tree: The folders where a TeX distribution keeps its classes, packages, fonts and settings, such as texmf-dist. Engines find each file in it by name, and kpsewhich prints where a file is. and keeps them updated. Four ways are common:
- TeX Live, from the TeX Users Group, for Unix, macOS and Windows. You download its installer and run
perl install-tlon Unix orinstall-tl-windowson Windows; on macOS the TeX Live guide recommends the native MacTeX installer, which is TeX Live with a few Mac-specific additions. The full installation needs several gigabytes, and you need no administrator rights, only write access to the folder it goes into. Many Linux distributions also offer TeX Live through their package managers, which may carry an older year, so check its version line. - MiKTeX, for Windows, macOS and Linux. Its package manager installs missing components from the internet when a document first needs them, so the first installation stays small.
- TinyTeX, a small, portable distribution built from TeX Live. Its FAQ gives 50 to 70 MB or more, zipped, and it grows as you install packages with the usual TeX Live tools. Its installers are one-line scripts on Linux and macOS and a batch file on Windows, all on its website.
- An online editor such as Overleaf, which compiles on its servers, so nothing is installed on your computer.
Tectonic is a further option, a self-contained engine built on XeTeX and TeX Live that fetches support files as it
needs them; whatever you install, read the LaTeX2e line of a log to see which LaTeX release you really got. Answer
three questions about your computer, and the table says which distributions fit:
Answer the questions above: the table then marks what fits your case and says why the rest does not.
| Option | Disk space | A missing package | Working offline | Updates |
|---|---|---|---|---|
| TeX Live Installs: everything you choose up front | Poor the full scheme needs 9,402 MB in the TeX Live guide's own example | Good rare with the full scheme; otherwise tlmgr install adds it | Good everything is on your disk once installed | Good you run tlmgr update --all; each yearly release gets its own folder |
| MiKTeX Installs: a base that grows on demand | Good starts small and installs only what documents use | Good its package manager installs missing parts from the internet when needed | Mixed only packages installed before you went offline work | Good you update it through its own package manager |
| TinyTeX Installs: a small TeX Live you extend | Good 50 to 70 MB or more zipped, and it grows with each package you add | Mixed you install each one by name with tlmgr install | Mixed only packages installed before you went offline work | Good you run tlmgr, as in TeX Live, which it is built from |
| Online editor Installs: nothing on your computer | Good nothing to install; the server holds the TeX system | Mixed the provider decides which packages its servers have | Poor needs a connection to edit and to compile | Mixed the provider updates; an old project keeps its old TeX Live year |
How the answers decide
- “How much disk space and download can you spare for the TeX system?” Little: a few hundred MB: adds a caveat to TeX Live. A full TeX Live needs several gigabytes; choose a smaller scheme in its installer, or a distribution that starts small.
- “Will you need to compile without an internet connection, on a train or in a lab?” Yes, often: rules out Online editor and adds a caveat to MiKTeX and TinyTeX. Offline, only what is already installed can be used: compile your documents once while online so their packages are in place.
- “May you install programs on the computer you write on?” No, it is locked down: rules out TeX Live, MiKTeX and TinyTeX. Without permission to install, an online editor needs nothing on the computer; ask before installing even into your own folder.
In short: TeX Live when disk space is no problem and you want everything ready, MiKTeX or TinyTeX when space or bandwidth is short, and an online editor when you may not install anything. Every LaTeX example in this track was recorded with TinyTeX 2026.10, which is TeX Live 2026.
Typst is one program, with its fonts inside
Installing Typst means putting one program on your computer. Its README lists brew install typst for macOS,
winget install --id Typst.Typst for Windows, cargo install --locked typst-cli for anyone with Rust, and ready-made
binaries on its releases page; Linux distributions package it too. Typst’s guide for LaTeX users calls the compiler a
single, small binary that any user can run without root privileges.
The program carries its own fonts, so a document builds the same on any computer that has nothing else installed.
typst fonts lists every font family Typst can use; this session ignores the computer’s own fonts, as every Typst
example in this track does, so the list shows only the families built into the program:
from session import run
# The font families built into the Typst program: with system fonts ignored, these are all it can use.
run("""
typst fonts
""") Output
$ typst fonts DejaVu Sans Mono Libertinus Serif New Computer Modern New Computer Modern Math
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 typst_fonts_session.py
Libertinus Serif is the default text font and New Computer Modern Math the maths font of the note in the first
lesson, which is why its PDF embedded Libertinus. Without that setting, Typst also finds the fonts installed on your
computer, so typst fonts on your machine lists more. Packages are different: they stay on Typst Universe until a
document asks for one, and then Typst fetches it once and reuses its saved copy, so build once while online before
you work on a train.
Expecting a Typst package to work offline the first time
Wrong: importing a new package on a laptop with no connection and expecting the build to work. Right: build the document once while online, which fills the package cache, and the same build works offline afterwards.
Checkpoint
Check: Choosing a TeX distribution · Typst's one program and its fonts
Check every version, from the command line and from inside the document
Each tool answers --version. This session asks the three engines for their first line, then latexmk, the TeX Live
Manager tlmgr: The TeX Live Manager: the command that installs, updates and lists the packages of a TeX Live or TinyTeX installation, as in tlmgr install exam or tlmgr update --all. and Typst, and finally asks the shell where it finds pdflatex and typst:
from session import run
# The version of every tool, asked from the command line: the three engines (first line only), latexmk, tlmgr and
# Typst, then where the shell finds pdflatex and typst.
run("""
pdflatex --version | head -1
lualatex --version | head -1
xelatex --version | head -1
latexmk --version
tlmgr --version
typst --version
which -a pdflatex typst
""") Output
$ pdflatex --version | head -1 pdfTeX 3.141592653-2.6-1.40.29 (TeX Live 2026) $ lualatex --version | head -1 This is LuaHBTeX, Version 1.24.0 (TeX Live 2026) $ xelatex --version | head -1 XeTeX 3.141592653-2.6-0.999998 (TeX Live 2026) $ latexmk --version Latexmk, John Collins. Version 4.88 $ tlmgr --version tlmgr revision 79639 tlmgr using installation: … TeX Live (https://tug.org/texlive) version 2026 $ typst --version typst 0.15.1 (9dfd3a08) $ which -a pdflatex typst …/bin/universal-darwin/pdflatex …/typst
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 cli_versions_session.py
Read them as the first lesson read the log: pdfTeX 1.40.29, LuaHBTeX 1.24.0 (LuaTeX built with the HarfBuzz library, the engine lualatex uses) and
XeTeX 0.999998, each followed by (TeX Live 2026); latexmk 4.88; tlmgr reporting TeX Live version 2026; and
typst 0.15.1 (9dfd3a08), the version followed by a short code that identifies the exact build. which -a
lists every copy of a command on your PATH, in the order the shell tries them, and here it found one of each.
A document can report the same facts about the build that made it. \fmtversion is the LaTeX release, each engine
defines its own banner, and Typst’s sys.version is the compiler’s version. The second session builds these two
files and reads each PDF back:
LaTeX: versions.tex · versions/versions.tex
\documentclass{article}
\begin{document}
\section*{Versions}
% \fmtversion is the release of the LaTeX format; each engine defines its own banner or version.
LaTeX format: \fmtversion\par
\ifdefined\pdftexbanner Engine: \pdftexbanner\par\fi
\ifdefined\luatexbanner Engine: \luatexbanner\par\fi
\ifdefined\XeTeXrevision Engine: XeTeX \the\XeTeXversion\XeTeXrevision\par\fi
\end{document} Typst: versions.typ · versions/versions.typ
= Versions
// sys.version is the version of the Typst compiler that built this file.
Typst #sys.version from session import files, run
# The versions as the documents themselves see them, printed into the PDF, and the program that wrote each PDF.
files("versions/versions.tex", "versions/versions.typ")
run("""
pdflatex -interaction=nonstopmode -halt-on-error versions.tex
pdftotext versions.pdf -
lualatex -interaction=nonstopmode -halt-on-error -jobname=versions-lua versions.tex
pdftotext versions-lua.pdf -
typst compile versions.typ versions-typst.pdf
pdftotext versions-typst.pdf -
pdfinfo versions.pdf | grep Producer
pdfinfo versions-lua.pdf | grep Producer
pdfinfo versions-typst.pdf | grep Creator
""") Output
$ pdflatex -interaction=nonstopmode -halt-on-error versions.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.29 (TeX Live 2026) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./versions.tex
LaTeX2e <2026-06-01>
L3 programming layer <2026-09-09>
(…/texmf-dist/tex/latex/base/article.cls
Document Class: article 2025/01/22 v1.4n Standard LaTeX document class
(…/texmf-dist/tex/latex/base/size10.clo)) (…/texmf-dist/tex/latex/l3kernel/l3backend-pdftex.def)
No file versions.aux.
[1{…/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./versions.aux) )<…/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb><…/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on versions.pdf (1 page, 27096 bytes).
Transcript written on versions.log.
$ pdftotext versions.pdf -
Versions
LaTeX format: 2026-06-01
Engine: This is pdfTeX, Version 3.141592653-2.6-1.40.29 (TeX Live 2026)
kpathsea version 6.4.2
1
$ lualatex -interaction=nonstopmode -halt-on-error -jobname=versions-lua versions.tex
This is LuaHBTeX, Version 1.24.0 (TeX Live 2026)
restricted system commands enabled.
(./versions.tex
LaTeX2e <2026-06-01>
L3 programming layer <2026-09-09>
(…/texmf-dist/tex/latex/base/article.cls
Document Class: article 2025/01/22 v1.4n Standard LaTeX document class
(…/texmf-dist/tex/latex/base/size10.clo)) (…/texmf-dist/tex/latex/l3kernel/l3backend-luatex.def)
No file versions-lua.aux.
[1{…/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./versions-lua.aux))
411 words of node memory still in use:
3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 4 attribute, 49 glue_spec, 4 attribute_list, 1 write nodes
avail lists: 2:36,3:10,4:2,5:28,6:6,7:246,9:24,11:18
<…/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf><…/texmf-dist/fonts/opentype/public/lm/lmroman12-bold.otf>
Output written on versions-lua.pdf (1 page, 7790 bytes).
Transcript written on versions-lua.log.
$ pdftotext versions-lua.pdf -
Versions
LaTeX format: 2026-06-01
Engine: This is LuaHBTeX, Version 1.24.0 (TeX Live 2026)
1
$ typst compile versions.typ versions-typst.pdf
$ pdftotext versions-typst.pdf -
Versions
Typst 0.15.1
$ pdfinfo versions.pdf | grep Producer
Producer: pdfTeX-1.40.29
$ pdfinfo versions-lua.pdf | grep Producer
Producer: LuaTeX-1.24.0
$ pdfinfo versions-typst.pdf | grep Creator
Creator: Typst 0.15.1
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 doc_versions_session.py
The same versions.tex reported pdfTeX when pdflatex built it and LuaHBTeX when lualatex did, because the engine
is chosen by the command, not by the file. The last three commands read the PDFs’ own records: a PDF names the program
that wrote it, pdfTeX-1.40.29, LuaTeX-1.24.0 or Typst 0.15.1, so you can tell how any PDF was made without its
source.
Two TeX installations on one PATH
Wrong: installing TeX Live 2026 next to an older MacTeX or a Linux package and assuming the new one runs. Right: run
which -a pdflatex (on Windows, where pdflatex), and check the first line of the log, which names the TeX Live
year that really ran; remove the old one, or put the new one first on your PATH.
Key idea
Trust the version line of the build, not the installer you remember running: the log, --version and the PDF’s
producer all say which engine, LaTeX release and TeX Live year really ran.
Checkpoint
Check: Checking versions
A missing class or package is one install away
Sooner or later a document asks for something your distribution does not have. This file uses the exam class, which
teachers use for question papers and which this TinyTeX does not include. The session shows the error, then asks the
tree what is installed, without touching the network:
\documentclass{exam}
\begin{document}
\begin{questions}
\question What does the command pdflatex start?
\end{questions}
\end{document} from session import files, run
# A document whose class is not installed: the error, then how to find out what is installed, without the network.
files("quiz/quiz.tex")
run("""
!pdflatex -interaction=nonstopmode -halt-on-error -file-line-error quiz.tex
kpsewhich article.cls
!kpsewhich exam.cls
tlmgr info --only-installed --data name,installed,cat-version csquotes
tlmgr info --only-installed exam
""") Output
$ pdflatex -interaction=nonstopmode -halt-on-error -file-line-error quiz.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.29 (TeX Live 2026) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./quiz.tex
LaTeX2e <2026-06-01>
L3 programming layer <2026-09-09>
! LaTeX Error: File `exam.cls' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)
Enter file name:
./quiz.tex:2: Emergency stop.
<read *>
l.2 \begin
{document}^^M
./quiz.tex:2: ==> Fatal error occurred, no output PDF file produced!
Transcript written on quiz.log.
[exit status 1]
$ kpsewhich article.cls
…/texmf-dist/tex/latex/base/article.cls
$ kpsewhich exam.cls
[exit status 1]
$ tlmgr info --only-installed --data name,installed,cat-version csquotes
csquotes,1,5.2p
$ tlmgr info --only-installed exam
package: exam
installed: No
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 missing_package_session.py
The error names a file, exam.cls, not a package. kpsewhich looks a file up in the installed tree: it printed the
path of article.cls, printed nothing for exam.cls and ended with exit status 1. tlmgr info --only-installed reads
only the local package list, so it works offline: it gave 1 (installed) for csquotes and installed: No for exam.
To fix the build in TeX Live or TinyTeX, find the package that holds the file with
tlmgr search --global --file exam.cls and install it with tlmgr install exam; tlmgr also installs what that package
depends on and updates the file database. Step through the fix, and where MiKTeX differs:
The drawing shows the whole scene; its 6 steps are listed below.
Every step as text
- The error names a file. pdflatex stopped at the first line that needs the class, with LaTeX Error File exam.cls not found. The error names a file, not a package, and the build wrote no PDF.
- Ask the tree. kpsewhich exam.cls looks the file up in the installed TeX tree. It printed nothing and ended with exit status 1, so the file is really not installed; a typo in the class name would look the same.
- Find its package. A file and its package often share a name, as exam.cls and exam do, but not always. tlmgr search --global --file exam.cls asks the online TeX Live repository which package holds the file.
- Install the package. tlmgr install exam downloads the package and updates the file database. A system-wide TeX Live on Linux or macOS may need the command run with administrator rights.
- Build again. The same pdflatex command now finds exam.cls and continues. If it stops on another missing file, repeat the steps for that one.
- MiKTeX takes a shortcut. MiKTeX's package manager installs missing parts from the internet when a document needs them, so the build continues without the middle steps, as long as the computer is online.
A file and its package often share a name, as exam.cls and exam do, but not always, which is why the search step
exists. On Overleaf you choose a project’s TeX Live year in its settings instead, and new projects use the newest
one.
Checkpoint
Check: Fixing a missing package
An editor that builds on save, or one in the browser
Any plain-text editor can write LaTeX and Typst, and the TeX Live guide notes that something TeX-specific is not required. An editor that builds and shows the PDF as you type saves a lot of switching, though:
| Editor | Builds | What it adds |
|---|---|---|
| VS Code with LaTeX Workshop | LaTeX | Builds on save, shows the PDF beside the source, jumps between a line and its place in the PDF |
| VS Code with Tinymist | Typst | An integrated language service: a live preview, diagnostics as you type, export to PDF |
| TeXstudio | LaTeX | A dedicated LaTeX editor with its own PDF viewer |
| TeXworks or TeXShop | LaTeX | Installed with TeX Live on Windows (TeXworks) and with MacTeX (TeXShop) |
| Overleaf | LaTeX | A browser editor; the TeX Live year is a setting of each project |
| The Typst web app | Typst | A browser editor with a live preview |
Online editors need no installation at all, but they decide the version for you. Overleaf’s documentation says new projects compile with the latest TeX Live on its servers while existing projects keep the year they were created with, so an old project can fail on a package a new project has. Check the year in the project’s settings before you blame the document.
One build command everywhere
Whatever editor you choose, make sure it runs the same command you would type, such as latexmk -pdf or
typst compile, so a build that works in the editor also works in a script.
Checkpoint
Check: Editors and online editors
Practise: check an installation from its output
A lab or a coaching class often checks many computers at once by asking students to paste their version lines. Build that check in two steps: read the versions out of the pasted text, then flag anything older than this track’s versions. The sample tests paste real version lines:
Code lab · 2 steps
Check an installation from pasted output
Read the TeX Live year, the LaTeX release and the Typst version from pasted output, then list what is missing or older than this track uses.
- Read the versions out of a build's output To do
- Flag an installation that is older than the track's To do
Exercise · Easy · Python
Read the versions out of a build's output
Write read_versions(text) in versions.py. It reads text that a student pasted from their computer, any mix of pdflatex --version, the start of a LaTeX log and typst --version, and returns a dictionary with three keys:
"texlive": the TeX Live year as a whole number, from text such as(TeX Live 2026);"latex": the LaTeX release as a string, from the lineLaTeX2e <…>, the part between the angle brackets;"typst": the Typst version as a string such as"0.15.1", from a line that starts withtypst.
A value the text does not contain is None. The sample tests use lines that the lesson's sessions really printed, plus lines from older installations.
Starter code · versions.py
import re
def read_versions(text):
"""Return {"texlive": year or None, "latex": release or None, "typst": version or None} found in text."""
found = {"texlive": None, "latex": None, "typst": None}
# Replace this comment with one search per value.
return found The sample tests · test_versions.py
from versions import read_versions
PDFLATEX = "pdfTeX 3.141592653-2.6-1.40.29 (TeX Live 2026)\nkpathsea version 6.4.2"
LOG = "This is LuaHBTeX, Version 1.24.0 (TeX Live 2026)\n(./versions.tex\nLaTeX2e <2026-06-01>\nL3 programming layer <2026-09-09>"
TYPST = "typst 0.15.1 (9dfd3a08)"
def test_all_three():
"""finds the year, the LaTeX release and the Typst version in one paste"""
assert read_versions("\n".join([PDFLATEX, LOG, TYPST])) == {"texlive": 2026, "latex": "2026-06-01", "typst": "0.15.1"}
def test_only_a_log():
"""leaves Typst as None when the text has no Typst line"""
assert read_versions(LOG) == {"texlive": 2026, "latex": "2026-06-01", "typst": None}
def test_nothing_found():
"""returns None for every value when the text names no tool"""
assert read_versions("command not found: pdflatex") == {"texlive": None, "latex": None, "typst": None}
def test_older_installation():
"""reads older versions the same way"""
text = "This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024)\nLaTeX2e <2024-11-01>\ntypst 0.13.1"
assert read_versions(text) == {"texlive": 2024, "latex": "2024-11-01", "typst": "0.13.1"}
def test_typst_word_in_a_sentence():
"""does not take a sentence that only mentions typst as a version line"""
assert read_versions("I will install typst later.")["typst"] is None A hint
Use one regular expression per value with re.search, and take the group you need: r"TeX Live (\d{4})" for the year, r"LaTeX2e <([^>]+)>" for the release and r"^typst (\d+\.\d+\.\d+)" with re.MULTILINE for Typst. Turn the year into a number with int().
Results of the sample tests
| Test | Result | Details |
|---|
What your code printed
The sample tests run on this device, in your browser (Pyodide): nothing is sent to mysmartcopilot.com. The first run downloads Python (about 13.5 MB), which is kept for the next runs. A check in your browser is feedback for you, not proof that the code is right for every input.
Exercise · Easy · Python
Flag an installation that is older than the track's
Write version_problems(found, pins) in problems.py. Both arguments are dictionaries with the keys "texlive" (a year, a whole number), "latex" (a release written as year-month-day, a string) and "typst" (a version such as "0.15.1", a string). found is what a student's computer reported, as read_versions returns it, and may hold None; pins holds the versions this track uses.
Return a list of messages, in the order TeX Live, LaTeX, Typst, one for each value that is missing or older than its pin:
- missing:
"TeX Live: not found","LaTeX: not found"or"Typst: not found"; - older:
"TeX Live 2025 is older than 2026","LaTeX <found> is older than <pin>","Typst 0.14.2 is older than 0.15.1", with the actual values.
A value equal to or newer than its pin gives no message. Compare Typst versions number by number, so that 0.9.0 is older than 0.15.1.
Starter code · problems.py
def version_problems(found, pins):
"""Return a message for each value of found that is missing or older than its pin: TeX Live, LaTeX, then Typst."""
problems = []
# Replace this comment with one check per value.
return problems The sample tests · test_problems.py
from problems import version_problems
PINS = {"texlive": 2026, "latex": "2026-06-01", "typst": "0.15.1"}
def test_up_to_date():
"""reports nothing when every value equals its pin"""
assert version_problems({"texlive": 2026, "latex": "2026-06-01", "typst": "0.15.1"}, PINS) == []
def test_older_tex_live_and_latex():
"""reports an older TeX Live and an older LaTeX, in that order"""
found = {"texlive": 2025, "latex": "2025-11-01", "typst": "0.15.1"}
assert version_problems(found, PINS) == ["TeX Live 2025 is older than 2026", "LaTeX 2025-11-01 is older than 2026-06-01"]
def test_missing_typst():
"""reports a value that was not found"""
found = {"texlive": 2026, "latex": "2026-06-01", "typst": None}
assert version_problems(found, PINS) == ["Typst: not found"]
def test_typst_versions_compare_by_number():
"""treats 0.9.0 as older than 0.15.1, and 0.16.0 as newer"""
assert version_problems({"texlive": 2026, "latex": "2026-06-01", "typst": "0.9.0"}, PINS) == ["Typst 0.9.0 is older than 0.15.1"]
assert version_problems({"texlive": 2026, "latex": "2026-06-01", "typst": "0.16.0"}, PINS) == []
def test_nothing_found():
"""reports all three when the paste named no tool"""
found = {"texlive": None, "latex": None, "typst": None}
assert version_problems(found, PINS) == ["TeX Live: not found", "LaTeX: not found", "Typst: not found"] A hint
Releases written as year-month-day compare correctly as strings, and years as numbers. Typst versions do not: "0.9.0" < "0.15.1" is False for strings, so turn each into a tuple of numbers first, tuple(int(part) for part in version.split(".")), and compare the tuples.
Results of the sample tests
| Test | Result | Details |
|---|
What your code printed
The sample tests run on this device, in your browser (Pyodide): nothing is sent to mysmartcopilot.com. The first run downloads Python (about 13.5 MB), which is kept for the next runs. A check in your browser is feedback for you, not proof that the code is right for every input.
Then answer questions about distributions, versions and packages; the ones you get wrong come round again:
Practice that adapts to you
Practise this lesson
11 questions about 5 ideas of this lesson. Each answer is explained at once, and what you get right is kept in this browser.
Interview questions
Warm-up (fresher to 2–5 years): how do TeX Live, MiKTeX and TinyTeX differ?
All three are TeX distributions: they install the engines, the LaTeX format, packages and fonts. TeX Live, from the TeX
Users Group, is the comprehensive one, with a yearly release for Unix, macOS (as MacTeX) and Windows; a full
installation takes several gigabytes, and tlmgr adds or updates packages. MiKTeX starts small and fetches a package
over the internet at the moment a document asks for it. TinyTeX is a small distribution built from TeX Live, tens of
megabytes at first, that grows as you install packages with tlmgr. Choose by disk space, by
whether you work offline, and by what your template or team uses; check the result with pdflatex --version and the
first line of a log.
Two harder questions follow, about a build that works on one computer and fails on another, and about an old installation that will not go away. Decide your first step before you open each one:
Model answers open with any pass: ₹79 for 1 week ($2.99), one payment that never renews.
-
Fresher to mid
Every student's thesis builds on their own laptop, but the department's build server stops on some of them with "File `exam.cls' not found" or a similar missing file. What do you check, and how do you make the build give the same result for everyone?
-
Fresher to mid
You installed TeX Live 2026, yet your logs still begin with TeX Live 2023 and a package you just installed with tlmgr is not found. Explain what is going on and how you fix it without reinstalling anything.
Key takeaways
- A distribution brings the engines, the LaTeX format, packages and fonts: TeX Live is complete and large, MiKTeX installs missing parts on demand, TinyTeX starts small and grows, and online editors install nothing.
- Typst is one program with its own fonts; it downloads packages on first use, so build once online before working offline.
--version, the first lines of a log,\fmtversion,sys.versionand a PDF’s producer all say which engine, release and TeX Live year really ran, andwhich -ashows which copy of a command runs first.- A missing class or package stops the build with the name of a file: confirm it with
kpsewhich, find its package and install it withtlmgr, or let MiKTeX fetch it. - An editor that builds on save speeds up writing, and an online editor sets the TeX Live year per project.
Flashcards · 8 cards
Recall it, then check
Say the answer to yourself before you look: recalling it is what makes it stick.
-
How much disk space do a full TeX Live and a fresh TinyTeX take?
The TeX Live guide's example screen shows 9,402 MB for a full installation; TinyTeX starts at 50 to 70 MB zipped and grows as you install packages.
-
What does MiKTeX do when a document needs a package it lacks?
Its package manager installs the missing component from the internet when a document first needs it, so the first installation stays small.
-
Why build a Typst document once while online before working offline?
Typst downloads each package on first import and keeps it in its package cache; later builds of the same version reuse that copy without the network.
-
How do you find which copy of pdflatex your shell runs?
which -a pdflatex (where pdflatex on Windows) lists every copy on your PATH in the order the shell tries them; the first line of a log names the TeX Live year that really ran.
-
Why did the same versions.tex report pdfTeX in one build and LuaHBTeX in another?
The engine is chosen by the command, pdflatex or lualatex, not by the file.
-
How can you tell which program made a PDF without its source?
Read the PDF's producer, which names the program and its version, such as pdfTeX-1.40.29, LuaTeX-1.24.0 or Typst 0.15.1.
-
A build stops because exam.cls is missing. How do you fix it in TeX Live or TinyTeX?
Confirm it with kpsewhich exam.cls, find the package that holds the file with tlmgr search --global --file exam.cls, then install it with tlmgr install exam.
-
Which TeX Live year does an Overleaf project use?
The one set in the project's settings: new projects compile with the latest TeX Live, while existing projects keep the year they were created with.
Terms in this lesson
- TeX tree
- The folders where a TeX distribution keeps its classes, packages, fonts and settings, such as texmf-dist. Engines find each file in it by name, and kpsewhich prints where a file is.
- tlmgr
- The TeX Live Manager: the command that installs, updates and lists the packages of a TeX Live or TinyTeX installation, as in tlmgr install exam or tlmgr update --all.
References
- TeX Live (TeX Users Group)
- The TeX Live Guide (TeX Live 2026) (TeX Users Group)
- tlmgr: the native TeX Live Manager (TeX Users Group)
- MiKTeX: about (MiKTeX)
- TinyTeX (Yihui Xie (TinyTeX))
- TinyTeX FAQ (Yihui Xie (TinyTeX))
- tinytex-releases (Posit (RStudio))
- Typst repository and README (installation) (Typst)
- Typst 0.15.1 release (Typst)
- Typst reference: text (default font and size) (Typst)
- Guide for LaTeX users: installation (Typst)
- Tectonic (The Tectonic Project)
- LaTeX Workshop (Visual Studio Marketplace) (Microsoft (Visual Studio Marketplace))
- Tinymist Typst (Visual Studio Marketplace) (Microsoft (Visual Studio Marketplace))
- TeXstudio (TeXstudio)
- TeX Live versions on Overleaf (Overleaf)
- The Typst web app (Typst)
Related tools
Report a problem with this lesson
Kept only in this browser. Your Learn progress