LaTeX & Typst (papers, theses, resumes and slides)
LaTeX and Typst flashcards: source to PDF
Recall cards for every lesson of the LaTeX and Typst track, from the compile cycle and errors to maths, tables, citations, slides, theses, tagged PDFs and CI.
414 cards. Read the question, answer it in your head, then open the card to check.
-
What three layers take part in a LaTeX build?
An engine such as pdfTeX, XeTeX or LuaTeX; the LaTeX format, the macros the engine loads before your file; and a distribution such as TeX Live, MiKTeX or TinyTeX that installs both with the classes and packages.
From the lesson LaTeX and Typst: what they are and when to use each
-
What do the first lines of a pdflatex log tell you?
Which engine ran (This is pdfTeX), which distribution it came from (TeX Live 2026), and which LaTeX release was loaded, on the line that starts LaTeX2e.
From the lesson LaTeX and Typst: what they are and when to use each
-
How does Typst get a package that a document imports?
It downloads it from Typst Universe the first time a file imports it and keeps a copy, so later builds reuse it.
From the lesson LaTeX and Typst: what they are and when to use each
-
How do LaTeX, TeX Live and Typst name their releases?
LaTeX by the date of each release, about twice a year; TeX Live by its year; Typst by a version number such as 0.15.1.
From the lesson LaTeX and Typst: what they are and when to use each
-
Why can a paper that builds on your laptop fail on arXiv?
arXiv compiles the TeX source of every submission itself, with TeX Live 2025 by default or TeX Live 2023 on request, so something that only TeX Live 2026 has may be missing there.
From the lesson LaTeX and Typst: what they are and when to use each
-
On the recorded four-line note, which build was fastest, and which wrote a tagged PDF?
Typst, at 0.08 s against 0.45 s for pdfLaTeX, 0.52 s for XeLaTeX and 1.60 s for LuaLaTeX in that run, and only its PDF was tagged. Every engine embedded all its fonts.
From the lesson LaTeX and Typst: what they are and when to use each
-
When is a word processor or Markdown the better choice than LaTeX or Typst?
A word processor when co-authors work in tracked changes; Markdown for notes that number nothing, since the CommonMark specification defines no equations, citations or numbered references.
From the lesson LaTeX and Typst: what they are and when to use each
-
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.
From the lesson Install TeX Live, TinyTeX or MiKTeX, and Typst
-
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.
From the lesson Install TeX Live, TinyTeX or MiKTeX, and Typst
-
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.
From the lesson Install TeX Live, TinyTeX or MiKTeX, and Typst
-
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.
From the lesson Install TeX Live, TinyTeX or MiKTeX, and Typst
-
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.
From the lesson Install TeX Live, TinyTeX or MiKTeX, and Typst
-
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.
From the lesson Install TeX Live, TinyTeX or MiKTeX, and Typst
-
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.
From the lesson Install TeX Live, TinyTeX or MiKTeX, and Typst
-
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.
From the lesson Install TeX Live, TinyTeX or MiKTeX, and Typst
-
What are the three parts of a LaTeX file?
\documentclass, which names the class; the preamble up to \begin{document}, where packages are loaded and settings made; and the document environment, the body, which alone is printed.
From the lesson Your first document and the compile cycle
-
Why does a new LaTeX reference print ?? after the first run?
Each run stores the label numbers in the .aux file, and only the following run reads them, at \begin{document}. On the first run there is nothing to read yet, so the reference prints ??.
From the lesson Your first document and the compile cycle
-
How does Typst settle references without an .aux file?
It lays the document out again within the same run until references and counters settle, so one typst compile gives the final numbers; a reference to a missing label is an error.
From the lesson Your first document and the compile cycle
-
What do the .toc and .bbl files hold?
The .toc holds the contents entries that \tableofcontents reads on the next run; the .bbl holds the typeset bibliography that BibTeX wrote for \bibliography to read.
From the lesson Your first document and the compile cycle
-
What does latexmk -c remove, and what does -C add?
latexmk -c removes the helper files but keeps the PDF and, by default, the .bbl file; -C removes the PDF as well.
From the lesson Your first document and the compile cycle
-
How do you make LaTeX and Typst rebuild on every save?
latexmk -pvc recompiles whenever a source file changes; typst watch builds the PDF and recompiles on every save.
From the lesson Your first document and the compile cycle
-
Which three pdflatex options make a script stop cleanly on an error?
-interaction=nonstopmode (print messages without waiting), -halt-on-error (stop at the first error) and -file-line-error (errors as file:line: message), so the build ends with a non-zero exit status.
From the lesson Your first document and the compile cycle
-
Which ten characters does LaTeX reserve, and how do you print them?
\ { } % $ & _ ^ # ~. A backslash prints seven of them (\# \$ \% \& \_ \{ \}); \textbackslash{}, \textasciitilde{} and \textasciicircum{} print the other three.
From the lesson Special characters, quotes, dashes and spaces
-
Why is % the most dangerous reserved character in LaTeX?
It starts a comment: the % and the rest of its line, the line end included, are ignored with no error or warning, so "40% in July" prints 40 glued to the next line.
From the lesson Special characters, quotes, dashes and spaces
-
How do you print a Typst markup character such as # or @ as text?
Put a backslash before it, as in \#3 or support\@example.com: in Typst a backslash before any character prints that character.
From the lesson Special characters, quotes, dashes and spaces
-
Which typed text did Typst change without an error in the ten test sentences?
#3 lost its # because it is the number 3 in code, C:\temp lost its backslash, <b> was taken for a label, and ~ became a non-breaking space.
From the lesson Special characters, quotes, dashes and spaces
-
Why load \usepackage[T1]{fontenc} and \usepackage{lmodern} in pdfLaTeX?
The default OT1 encoding lacks several ASCII characters, so underscores, tildes, circumflexes and angle brackets copied out of the PDF wrongly; with T1 and a matching font the text reads back as typed.
From the lesson Special characters, quotes, dashes and spaces
-
How do you type quotes, dashes and an ellipsis in LaTeX, and what does Typst do?
In LaTeX, `` and '' (or csquotes' \enquote) for double quotes, -- for an en dash, --- for an em dash and \ldots for an ellipsis. Typst makes typographic quotes itself and turns --, --- and ... into the same characters.
From the lesson Special characters, quotes, dashes and spaces
-
Where does a non-breaking space, ~, belong?
Between a reference word and its number, a number and its unit, and an initial and a surname, as in Section~3, 12~kg and D.~E.~Knuth, so no line breaks between them.
From the lesson Special characters, quotes, dashes and spaces
-
pdfLaTeX stops with "Unicode character (U+202F) not set up for use with LaTeX". What happened?
Pasted text carried an invisible narrow no-break space. Find it by its code point and replace it, here with LaTeX's thin space \, ; in Typst such characters build but stay in the PDF's text.
From the lesson Special characters, quotes, dashes and spaces
-
What are the parts of a LaTeX error message?
The file and line (with -file-line-error), the message, a context line broken where TeX had read to, and help text that only the .log keeps. The cause is at or just before the break.
From the lesson Reading errors and making a minimal example
-
Why can one slip produce two LaTeX errors?
In nonstopmode without -halt-on-error, TeX tries to recover and goes on, and its own repair can raise a second error. Fix the first error and build again.
From the lesson Reading errors and making a minimal example
-
How do you read where a Typst diagnostic points?
The arrow line gives the file, the line and the position, counted in characters from 0; the carets under it mark exactly the characters at fault, and the hint lines often give the fix.
From the lesson Reading errors and making a minimal example
-
Typst says unknown variable: ab inside maths. What is the fix?
In maths two letters together are read as one name: write a b for two variables, or "ab" for text.
From the lesson Reading errors and making a minimal example
-
What does exit status 0 not tell you about a LaTeX build?
That the PDF is right: undefined references, overfull boxes and missing characters are only warnings in the log, and some layout mistakes do not warn at all.
From the lesson Reading errors and making a minimal example
-
What is a minimal working example?
A copy of the document cut down until only what causes the problem is left: a class, the packages it needs and a few lines, with \rule or rect() in place of images and \lipsum or lorem() for text.
From the lesson Reading errors and making a minimal example
-
How do you find the cause when an error points at an innocent line?
Halve a copy of the file, build it, keep whichever half still fails, and repeat until a few lines fail the same way.
From the lesson Reading errors and making a minimal example
-
What do you post when you ask for help with a build?
The minimal example, the complete error message, and your versions from pdflatex --version or typst --version, so anyone can build it and see the same thing.
From the lesson Reading errors and making a minimal example
-
Which LaTeX classes have a \chapter command?
report and book, the KOMA-Script classes scrreprt and scrbook, and memoir. article and scrartcl have none, so \chapter there stops with Undefined control sequence.
From the lesson Document classes, preambles, packages and templates
-
What did changing article to scrartcl do to the same note?
The text block grew from 345 to 418 points, and the defaults became A4 paper and an 11-point font, with no other line changed.
From the lesson Document classes, preambles, packages and templates
-
What happens to a misspelt class option such as a4?
Nothing uses it: the build succeeds with one warning, Unused global option(s): [a4], and the page keeps its default size. The option's name is a4paper.
From the lesson Document classes, preambles, packages and templates
-
When does a PDF's page size follow the class options?
Only when a package such as geometry or hyperref writes the size into the PDF. Without one, pdfTeX falls back to this installation's own paper size, the one tlmgr paper shows.
From the lesson Document classes, preambles, packages and templates
-
In what order do amsmath, hyperref and cleveref load?
amsmath with the other packages, then hyperref near the end, then cleveref after both; cleveref above hyperref stopped the build with cleveref must be loaded after hyperref!
From the lesson Document classes, preambles, packages and templates
-
What does #show: report.with(title: [...]) do in Typst?
It passes everything after the rule to the template function report as its body, with the named arguments filled in first, so the set rules inside the function style the whole document.
From the lesson Document classes, preambles, packages and templates
-
Why must a Typst package import name its full version?
Without one, Typst stops with package specification is missing version. With @preview/name:1.2.3 the document builds the same later, because each version is kept in a folder of its own.
From the lesson Document classes, preambles, packages and templates
-
How do several LaTeX documents share one set of settings?
Put them in a style file of your own (.sty) that identifies itself with \ProvidesPackage and loads packages with \RequirePackage; each document loads it with one \usepackage line.
From the lesson Document classes, preambles, packages and templates
-
How many heading levels does LaTeX number by default?
Three in article (section, subsection and subsubsection), because secnumdepth is 3 there; in report and book it is 2.
From the lesson Sections, titles and tables of contents
-
Are Typst headings numbered by default?
No: numbering defaults to none. #set heading(numbering: "1.1") gives numbers such as 1, 1.1 and 1.1.1.
From the lesson Sections, titles and tables of contents
-
How do you list an unnumbered LaTeX heading in the contents?
Add \addcontentsline{toc}{section}{Preface} after \section*{Preface}: the starred form alone has no number and no contents entry.
From the lesson Sections, titles and tables of contents
-
How do you keep an unnumbered Typst heading out of the outline?
#heading(numbering: none, outlined: false)[Preface]. Without outlined: false, an unnumbered heading is still listed.
From the lesson Sections, titles and tables of contents
-
Why is a new LaTeX contents list empty after the first run?
\tableofcontents reads its entries from the .toc file that the previous run wrote, so the list appears on the second run.
From the lesson Sections, titles and tables of contents
-
What does tocdepth 2 list in the report class, compared with Typst's outline(depth: 2)?
In report, \chapter is level 0, so tocdepth 2 reaches \subsection, three levels down; Typst's depth 2 stops at ==.
From the lesson Sections, titles and tables of contents
-
How do you put a document's title into the PDF's metadata?
In LaTeX, load hyperref with pdfusetitle or set pdftitle with \hypersetup, because \maketitle only prints it. In Typst, #set document(title: ...) writes it and #title() prints it.
From the lesson Sections, titles and tables of contents
-
What does Typst's PDF/UA-1 export refuse about headings?
A missing document title and a skipped heading level, such as = followed by ===. A heading typed as the title passes, so that rule is yours to keep.
From the lesson Sections, titles and tables of contents
-
What ends a paragraph in LaTeX and in Typst?
A blank line in both. A line break, \\ in LaTeX or a backslash as the last character of a line in Typst, ends only the line, not the paragraph.
From the lesson Paragraphs, lists, footnotes and emphasis
-
Why not stack \\ to make vertical space in LaTeX?
Each makes a line with nothing on it, which pdfLaTeX reports as Underfull \hbox (badness 10000), and the space is accidental. Use \smallskip, \medskip, \bigskip or \vspace, or #v in Typst.
From the lesson Paragraphs, lists, footnotes and emphasis
-
How deep can LaTeX lists nest, and what are the numbered labels?
Four levels; a fifth stops with Too deeply nested. Numbered lists use 1., (a), i. and A. by level, and enumitem's label= option changes them.
From the lesson Paragraphs, lists, footnotes and emphasis
-
How do you write a bulleted, a numbered and a term list in Typst?
- for a bulleted item, + for a numbered one and / Term: description for a term list; indenting an item under another nests it.
From the lesson Paragraphs, lists, footnotes and emphasis
-
What happens to emphasis inside emphasis?
\emph and Typst's _..._ toggle the style, so a phrase emphasised inside an emphasised phrase turns roman again.
From the lesson Paragraphs, lists, footnotes and emphasis
-
Why mark emphasis with \emph or _..._ instead of \textit or #text(style: "italic")?
In a tagged PDF marked emphasis becomes a structure element of its own, while a font change leaves plain text that nothing marks.
From the lesson Paragraphs, lists, footnotes and emphasis
-
What removed the overfull lines of the narrow LaTeX column?
\usepackage{microtype}, which turns on character protrusion and font expansion where the engine supports them and gives each line a little more room.
From the lesson Paragraphs, lists, footnotes and emphasis
-
When does Typst hyphenate?
With the default hyphenate: auto, only when justification is on, #set par(justify: true), using the patterns of the language set with lang.
From the lesson Paragraphs, lists, footnotes and emphasis
-
What number does a LaTeX \label record?
The number LaTeX set last: the current section's in ordinary text, the figure's after \caption. So \label belongs after \caption.
From the lesson Cross-references, labels and hyperlinks
-
What happened when \label stood before \caption in the report's figure?
The label took the section's number, 2, so the text said Figure 2 under a caption that read Figure 1, and nothing warned.
From the lesson Cross-references, labels and hyperlinks
-
After you add a figure, why can a reference show the old number?
The first run reads the previous run's number from the .aux file and only warns Label(s) may have changed. Build again until no Rerun warning is left.
From the lesson Cross-references, labels and hyperlinks
-
What does Typst do with a reference it cannot fill?
It stops with an error, such as label does not exist in the document or cannot reference equation without numbering, instead of printing ??.
From the lesson Cross-references, labels and hyperlinks
-
When do you use \cref and when \Cref?
\cref wherever you would write \ref, and \Cref at the start of a sentence. \cref's default names are abbreviated (fig., eq.); \Cref's are written out.
From the lesson Cross-references, labels and hyperlinks
-
How do you change the word Typst prints before a figure number?
@label[Chart] for one reference, or #set figure(supplement: [Fig.]) for the figures that follow the rule.
From the lesson Cross-references, labels and hyperlinks
-
How do you make web links in LaTeX and in Typst?
LaTeX: hyperref's \url{...} and \href{URL}{text}. Typst: an address starting with http:// or https:// links itself, and #link("...")[text] links any text.
From the lesson Cross-references, labels and hyperlinks
-
Where do PDF bookmarks come from?
hyperref adds them for \section and similar commands; Typst bookmarks every outlined heading with no package. mutool show ... outline lists them.
From the lesson Cross-references, labels and hyperlinks
-
How do you give A4 pages 1.5 in on the left and 1 in elsewhere?
LaTeX: the a4paper class option with geometry's left=1.5in,right=1in,top=1in,bottom=1in. Typst: margin: (left: 1.5in, right: 1in, y: 1in) in the page set rule, where y sets top and bottom.
From the lesson Page size, margins, headers and page numbers
-
What margins do geometry and Typst give A4 when you set only the paper?
geometry makes the text block 0.7 of the paper, centred, 31.5 mm on each side; Typst's automatic margin is 2.5/21 of the smaller side, 25.0 mm.
From the lesson Page size, margins, headers and page numbers
-
Printed on both sides, where does the binding margin go?
At the spine: on the left of odd pages and on the right of even ones. Use twoside with geometry's inner and outer, or Typst's inside and outside.
From the lesson Page size, margins, headers and page numbers
-
How does fancyhdr name the places in a header?
E or O for even or odd pages, then L, C or R: \fancyhead[LE,RO]{\thepage} puts the page number in the outer corner of every page.
From the lesson Page size, margins, headers and page numbers
-
How do you number the front matter in roman and restart at 1 for chapter 1?
LaTeX: \pagenumbering{roman}, then \pagenumbering{arabic} before chapter 1, which resets the count. Typst: numbering: "i", then #set page(numbering: "1") and #counter(page).update(1) at the start of a page.
From the lesson Page size, margins, headers and page numbers
-
What makes a PDF viewer's page box show i, ii and then 1, 2?
Page labels stored in the PDF: hyperref writes them by default, and Typst writes them from its numbering. Without them a viewer counts the pages 1 to n.
From the lesson Page size, margins, headers and page numbers
-
Why break to a right-hand page before restarting the page count?
LaTeX mirrors the margins by page number and Typst by place in the file, so a restart on a left-hand page puts the binding margin on the wrong side or the number 1 on a left page.
From the lesson Page size, margins, headers and page numbers
-
How do you put one page in landscape?
#page(flipped: true)[...] in Typst, or pdflscape's landscape environment in LaTeX. A new page layout always starts a new page, while #pad or adjustwidth widens a passage in place.
From the lesson Page size, margins, headers and page numbers
-
How do pdfLaTeX and the Unicode engines differ in their fonts?
pdfLaTeX sets 8-bit fonts of at most 256 characters through a font encoding; XeLaTeX and LuaLaTeX read every character as its code point and set OpenType fonts loaded with fontspec.
From the lesson Fonts, engines and Unicode
-
What does fontspec do in pdfLaTeX?
It stops the build with a fatal error: fontspec requires XeTeX or LuaTeX.
From the lesson Fonts, engines and Unicode
-
Why give fontspec a font's file names rather than its family name?
LuaLaTeX finds fonts of the TeX tree by name, but XeLaTeX on macOS and on arXiv finds them only by file name; file names work in both engines everywhere.
From the lesson Fonts, engines and Unicode
-
What do LuaLaTeX and XeLaTeX do with a character the font lacks?
They set nothing, write a Missing character line to the log and end with status 0; the PDF's text holds a replacement character in its place.
From the lesson Fonts, engines and Unicode
-
How do you make a missing character stop the build?
Put \tracinglostchars=3 in the preamble and run with -halt-on-error, so the first lost character is an error and no PDF is written.
From the lesson Fonts, engines and Unicode
-
What does Typst do when no font it knows has a character?
It tries every font it knows, then draws a box, a tofu, without a warning; it warns only about a named font family it cannot find.
From the lesson Fonts, engines and Unicode
-
How do you give Typst a font that is not installed on the computer?
Keep the font file in a folder of the project and pass it with --font-path; typst fonts then lists the family.
From the lesson Fonts, engines and Unicode
-
Why check a PDF's text with two extractors?
Copying and search read the PDF's text map, not the page: poppler read XeLaTeX's ff ligature as the single character U+FB00, while MuPDF read the same words correctly.
From the lesson Fonts, engines and Unicode
-
What is shaping, and why do Hindi and Tamil need it?
Turning stored characters into placed glyphs: a consonant, a virama and a consonant join into a conjunct, र before a consonant becomes a reph, and ि is drawn to the left of the consonant it follows in the file.
From the lesson Hindi, Tamil and other Indian scripts
-
Why did LuaLaTeX leave Hindi conjuncts in pieces, and what fixes it?
Its default OpenType renderer, Node, does not shape these scripts, and nothing warns. Renderer=HarfBuzz on every font that sets them makes LuaLaTeX shape as XeLaTeX and Typst do; pdfLaTeX stops at the first Devanagari letter.
From the lesson Hindi, Tamil and other Indian scripts
-
Where does a template get a Tamil font?
This TinyTeX had none, so the lesson brings Noto Sans Tamil, under the SIL Open Font License, with its licence file, loaded with fontspec's Path=./fonts/ or Typst's --font-path fonts.
From the lesson Hindi, Tamil and other Indian scripts
-
Why copy font family names from typst fonts?
A guessed name such as New Computer Modern Devanagari gave unknown font family; typst fonts listed the family as NewComputerModern 10 Devanagari.
From the lesson Hindi, Tamil and other Indian scripts
-
What does a document's language decide?
The fixed words the system adds, such as the contents heading, the hyphenation patterns, and the PDF's /Lang, which screen readers use to choose a voice.
From the lesson Hindi, Tamil and other Indian scripts
-
Why add \DocumentMetadata{lang=hi} when babel or polyglossia already set Hindi?
The packages set the words and the hyphenation, but the babel build recorded no /Lang in the PDF, so a screen reader would not know the language.
From the lesson Hindi, Tamil and other Indian scripts
-
In the trilingual notice, which PDF recorded a language for each passage?
Typst's: the document is /Lang (en) and its tags add /Lang (hi) and /Lang (ta) to the two passages. In LuaLaTeX's tagged PDF only the document's /Lang (en) was there.
From the lesson Hindi, Tamil and other Indian scripts
-
Which build of the notice read back exactly in both Hindi and Tamil?
Only LuaLaTeX's tagged PDF, read by MuPDF. poppler added spaces to the Hindi, Typst's Hindi doubled two syllables, and XeLaTeX's text put vowel signs and the reph out of order.
From the lesson Hindi, Tamil and other Indian scripts
-
How do you write inline and display maths in each system?
LaTeX: $...$ or \(...\) inline, and \[...\] or the equation environment for a display. Typst: $x$ inline, and spaces just inside the dollars, $ x $, make a block.
From the lesson Inline and display maths
-
How does Typst number block equations?
With #set math.equation(numbering: "(1)"). Only the block equations after the set rule are numbered.
From the lesson Inline and display maths
-
Why replace $$...$$ in a LaTeX file?
It is plain TeX's display: LaTeX accepts it without a word, but it ignores fleqn, spaces displays differently and does no consistency checks. Write \[...\] instead.
From the lesson Inline and display maths
-
How do you raise or lower more than one piece?
Group it: braces in LaTeX, as x^{2n} and x_{i+1}, and parentheses in Typst, as x^(2n), which Typst does not print. LaTeX's x^10 raises only the 1, while Typst raises 10 whole.
From the lesson Inline and display maths
-
What does a slash do in Typst maths?
It makes a fraction of the pieces on either side and drops parentheses around them, even inside a sentence; #set math.frac(style: "horizontal") keeps it on one line.
From the lesson Inline and display maths
-
Why does $speed = d / t$ stop a Typst build?
Several letters together are one name in Typst maths, here an unknown variable. Write "speed" in quotes for a word, italic("speed") for a variable named by a word, and a b for a product.
From the lesson Inline and display maths
-
How do you set an operator name such as EMI upright?
\DeclareMathOperator{\EMI}{EMI} in the preamble or \operatorname{EMI} in LaTeX, op("EMI") in Typst. \text{EMI} turned italic inside a theorem, because \text takes the font around it.
From the lesson Inline and display maths
-
Why did a search of a Typst PDF for ax find nothing?
Typst and unicode-math store mathematical italic characters, such as U+1D44E for a. NFKC normalisation folds them back to plain letters, and the search then finds them.
From the lesson Inline and display maths
-
Which two marks line up a derivation in both systems?
A line break between the lines, \\ in LaTeX and \ in Typst, and an alignment point, &, where the lines should line up, written before the relation: &=.
From the lesson Aligned equations, cases and matrices
-
How many numbers does a three-line align give, and how do you change that?
Three, one per line. \notag removes a line's number, align* numbers none, and equation with split gives the whole group one number.
From the lesson Aligned equations, cases and matrices
-
How many numbers does a Typst block equation of three lines get?
One, beside the block, as LaTeX's equation with split gives. Numbers on each line need separate equations or a package such as equate.
From the lesson Aligned equations, cases and matrices
-
Why replace eqnarray with align?
eqnarray spaces its relations wrongly: 10.32 pt before the = against 3.13 pt in align. The amsmath guide and l2tabu both say to use align.
From the lesson Aligned equations, cases and matrices
-
Which amsmath display fits one long equation, and which several unrelated short ones?
multline breaks one long equation, with its first line at the left and its last at the right; gather centres each line on its own.
From the lesson Aligned equations, cases and matrices
-
Why did a comma vanish from a Typst cases row?
A plain comma ends an argument of the call; write \, for a comma on the page inside cases(...) or mat(...). In LaTeX the same \, is a thin space.
From the lesson Aligned equations, cases and matrices
-
How do you choose a matrix's brackets in each system?
LaTeX by the environment's name: pmatrix ( ), bmatrix [ ], Bmatrix { }, vmatrix | | and Vmatrix ‖ ‖. Typst's mat takes delim, and augment: #3 draws a bar after the third column.
From the lesson Aligned equations, cases and matrices
-
Why did a LaTeX matrix with a row of 11 entries stop with an Extra alignment tab error?
amsmath's matrix environments take at most MaxMatrixCols columns, normally 10; \setcounter{MaxMatrixCols}{11} in the preamble lets it build. Typst needs no setting.
From the lesson Aligned equations, cases and matrices
-
What does \newtheorem{lemma}{Lemma} create?
An environment, lemma, that prints the word Lemma, a number from a counter of its own and the statement. amsthm adds \theoremstyle and the unnumbered \newtheorem*.
From the lesson Theorems, proofs and numbering schemes
-
How do amsthm's three styles differ?
plain, the default, sets the statement in italic with extra space; definition sets it upright with extra space; remark upright with no extra space.
From the lesson Theorems, proofs and numbering schemes
-
How do you number lemmas in the same sequence as theorems?
Name the counter between the name and the word: \newtheorem{lemma}[theorem]{Lemma}. A definition, a lemma and a theorem then print 1.1, 1.2 and 1.3 instead of 1.1 three times.
From the lesson Theorems, proofs and numbering schemes
-
How do you number theorems within sections?
\newtheorem{theorem}{Theorem}[section] resets the counter at each section and prints the section number first. It cannot be combined with the shared-counter argument.
From the lesson Theorems, proofs and numbering schemes
-
How do you number equations within sections?
amsmath's \numberwithin{equation}{section}, which prints (2.1) and (2.2) in section 2.
From the lesson Theorems, proofs and numbering schemes
-
Where does \qedhere go, and why?
At the end of a display that ends a proof, so the end-of-proof box sits on the display's own line instead of a line of its own below it.
From the lesson Theorems, proofs and numbering schemes
-
What does a blank line before \end{proof} do?
It disables the mechanism that places the end-of-proof box, which can even move the box to the top of the next page.
From the lesson Theorems, proofs and numbering schemes
-
How does Typst give a theorem, a lemma and a definition one counter?
Make them figures of one custom kind, which share a counter, with show rules that reset counters at headings and draw each statement. The ctheorems package does this and adds #qedhere.
From the lesson Theorems, proofs and numbering schemes
-
How do you write 9.81 m s⁻² as a quantity in each system?
siunitx: \qty{9.81}{\metre\per\second\squared}. Typst's zero package: #zi.m-s2[9.81].
From the lesson Units, numbers and chemical formulas
-
What does a quantity package do that typing 15 m/s does not?
It puts a thin space that cannot break between number and unit, so a line never splits the quantity, sets the units upright and writes a real minus sign, U+2212.
From the lesson Units, numbers and chemical formulas
-
Which siunitx commands replace \SI and \si?
\qty and \unit, the version 3 names. \SI and \si still work but are not recommended for new documents.
From the lesson Units, numbers and chemical formulas
-
How do you switch every quantity of a document to the slash form?
\sisetup{per-mode = symbol} in the preamble, or zero's set-unit(fraction: "inline") in Typst; typed quantities would each need editing by hand.
From the lesson Units, numbers and chemical formulas
-
From how many digits do siunitx and zero group a number?
From five digits: 1234 stays whole, while 12 345 is split, in threes with a thin space unless you choose another separator.
From the lesson Units, numbers and chemical formulas
-
How do you group 1234567 as 12,34,567?
In siunitx, \num[digit-group-other-size = 2, group-separator = {,}]{1234567}. zero has one group size for every group, so a short Typst function groups the last three digits and then pairs.
From the lesson Units, numbers and chemical formulas
-
Why does $H_2SO_4$ look wrong, and what fixes it?
Plain maths sets the letters in maths italic. mhchem's \ce{H2SO4} sets element symbols upright with their subscripts; in Typst maths, put each symbol in quotes.
From the lesson Units, numbers and chemical formulas
-
What does the zero package add to Typst's tagged PDF?
A description of each number, unit and quantity, such as "meters per second squared", that a screen reader reads; typed text leaves only a raised 2.
From the lesson Units, numbers and chemical formulas
-
Why can't any OpenType font set maths?
Maths needs an OpenType maths font, which carries the symbols and a table of layout values, such as how far a superscript is raised and how thick a fraction bar is.
From the lesson Maths fonts, symbol lookup and accessible equations
-
How do you give Libertinus Serif text its matching maths font?
Use Libertinus Math: \setmathfont{Libertinus Math} with unicode-math under LuaLaTeX or XeLaTeX, or #show math.equation: set text(font: "Libertinus Math") in Typst, whose default maths font is New Computer Modern Math.
From the lesson Maths fonts, symbol lookup and accessible equations
-
Where do you look up the command or name of a symbol?
The Comprehensive LaTeX Symbol List on CTAN and unicode-math's unimath-symbols.pdf for LaTeX; Typst's symbol reference, where modifiers such as .not or .eq select variants.
From the lesson Maths fonts, symbol lookup and accessible equations
-
Can you type α ≤ β straight into maths?
In Typst and in LuaLaTeX with unicode-math, yes. pdfLaTeX stops with Unicode character α (U+03B1) not set up for use with LaTeX.
From the lesson Maths fonts, symbol lookup and accessible equations
-
How does a LaTeX build attach MathML to its formulas?
LuaLaTeX with unicode-math and \DocumentMetadata{..., tagging=on}, run twice: the second run embedded a MathML file for each formula. pdfLaTeX's build held none.
From the lesson Maths fonts, symbol lookup and accessible equations
-
What does Typst's PDF/UA-1 export do with an equation that has no alt text?
It refuses the file with PDF/UA-1 error: missing alt text, inline equations included, and writes no PDF; math.equation(alt: ...) fixes it.
From the lesson Maths fonts, symbol lookup and accessible equations
-
What makes good alternative text for a formula?
The formula read aloud in words, with "all over" or "divided by" where the layout groups, never the source code, the copied text or "image of".
From the lesson Maths fonts, symbol lookup and accessible equations
-
What did veraPDF's PDF/UA-2 pass not show about the maths?
Whether a listener can follow it: the same document passed with MathML attached to both formulas and with none at all.
From the lesson Maths fonts, symbol lookup and accessible equations
-
What do the letters of a tabular's column specification mean?
l flush left, c centred, r flush right, and p{3cm} paragraphs 3 cm wide that wrap. A | between letters draws a vertical rule, and *{3}{c} repeats a letter.
From the lesson Table basics in LaTeX and Typst
-
How does Typst's table know where a row ends?
Nothing in the source marks it: columns: 4 says four cells make a row, and the cells fill each row from left to right in reading order.
From the lesson Table basics in LaTeX and Typst
-
What lines does each system draw round a table by default?
tabular draws none until \hline; Typst's table boxes every cell with its default stroke of 1pt + black and 5 pt of inset, and stroke: none removes the lines.
From the lesson Table basics in LaTeX and Typst
-
What happens when a row misses one cell?
In LaTeX only that row is spoilt, because \\ ends it; in Typst every later cell moves one place early. Neither warns.
From the lesson Table basics in LaTeX and Typst
-
Why did a row with Data Structures & Algorithms stop the LaTeX build?
The bare & split the course name into two cells, so the row had one cell too many and pdfLaTeX stopped on an Extra alignment tab error. Write \&.
From the lesson Table basics in LaTeX and Typst
-
Where do a table's number and caption come from?
From a float around it: LaTeX's table environment with \caption, then \label, or Typst's figure with the label after it. \caption outside a float stops the build.
From the lesson Table basics in LaTeX and Typst
-
How do you put Typst table captions above their tables?
Select the table figures with figure.where(kind: table) in a show rule, and in it set figure.caption's position to top. Captions of images stay below.
From the lesson Table basics in LaTeX and Typst
-
Why use table rather than grid for data in Typst?
A table is tagged as Table, TR, TH and TD, which lets a screen reader move by row and column; a grid gives only Div and Span tags.
From the lesson Table basics in LaTeX and Typst
-
Which rules does booktabs draw instead of boxes?
\toprule, \midrule and \bottomrule and no vertical lines: 0.08 em at the top and bottom and 0.05 em under the header, with space around each rule so text never touches it.
From the lesson Publication-quality tables: rules and alignment
-
What are the booktabs manual's two firm rules?
Never, ever use vertical rules, and never use double rules. If a table seems to need a dividing line, make two tables.
From the lesson Publication-quality tables: rules and alignment
-
How do you draw a booktabs-style table in Typst?
stroke: none on the table, then three table.hline calls, thicker at the top and the bottom than under the header.
From the lesson Publication-quality tables: rules and alignment
-
Why don't flush-right numbers line up on their decimal points?
They line up their last digits, so 528.25 and 531.7 end together with their points a digit apart. siunitx's S column or zero's format-table aligns the points.
From the lesson Publication-quality tables: rules and alignment
-
Why did an S column stop with Invalid number 'e'?
Its heading was read as a number. Protect any text in an S column with braces, as {Yield (MPa)}.
From the lesson Publication-quality tables: rules and alignment
-
How do you make a column of notes wrap to the text width?
tabularx's X column, which becomes p{width} once the table's width is worked out, or a 1fr column in Typst. An l column never wraps.
From the lesson Publication-quality tables: rules and alignment
-
How do you merge cells in each system?
LaTeX: \multicolumn{2}{c}{...} across columns and multirow's \multirow{2}{*}{...} down rows, leaving the covered cell empty. Typst: table.cell(colspan: 2) and table.cell(rowspan: 2).
From the lesson Publication-quality tables: rules and alignment
-
Which table packages are marked incompatible with LaTeX's tagging?
multirow, nicematrix and tabularray. The tagged LaTeX build recorded no row span for its five merged cells, while Typst recorded all five.
From the lesson Publication-quality tables: rules and alignment
-
What happens to a tabular taller than the page?
It is one box and cannot break: pdfLaTeX warns Float too large for page, and the rows past the bottom edge are on no page. 19 of 60 rows were lost on A5.
From the lesson Long, wide and data-driven tables
-
What do \endfirsthead, \endhead, \endfoot and \endlastfoot mark in a longtable?
The rows printed at the top of the first page, at the top of every later page, at the bottom of every page but the last, and at the bottom of the last page.
From the lesson Long, wide and data-driven tables
-
Where does a longtable's caption go, and why does the table need a second run?
Inside the longtable, ended by \\, because a longtable is not a float. It keeps its column widths in the .aux file and lines the pages up from them on the next run.
From the lesson Long, wide and data-driven tables
-
Do Typst tables break across pages?
Yes, by themselves, and table.header repeats at the top of each page by default; table.footer repeats at the bottom.
From the lesson Long, wide and data-driven tables
-
Why did a Typst table inside a figure lose 32 of its rows?
A figure is one block that cannot break by default. Add #show figure: set block(breakable: true), then count the rows, since Typst prints no warning.
From the lesson Long, wide and data-driven tables
-
How do pdflscape and Typst make a landscape page differently?
pdflscape stores an ordinary portrait page marked with a rotation of 90 for the viewer to turn; Typst's page(flipped: true) writes a page that is wider than it is tall, with no rotation.
From the lesson Long, wide and data-driven tables
-
How does Typst build a table from a CSV file?
csv() with row-type: dictionary returns one dictionary per row, every value a string, so numbers are converted before any sum; json() reads JSON the same way.
From the lesson Long, wide and data-driven tables
-
Why compute a table's totals from its data file?
A corrected value then changes the table, its totals and every number quoted from them on the next build; the typed copy kept an SGPA of 8.62 after the correction made it 8.38.
From the lesson Long, wide and data-driven tables
-
Why did a 600-pixel PNG come out 602 pt wide in pdfLaTeX?
The file stores no resolution, so each pixel became one point. Size images against the text, as width=0.5\linewidth, instead.
From the lesson Images, figures and alternative text
-
What does keepaspectratio do when you give both a width and a height?
It scales the image until it meets the first limit, so neither size is exceeded and the shape is kept; without it graphicx squashes the image.
From the lesson Images, figures and alternative text
-
How many pixels does a raster image need for 300 ppi at 2.39 inches wide?
About 2.39 × 300 = 717 pixels. pdfimages -list reports the ppi each placed image gets.
From the lesson Images, figures and alternative text
-
Which image formats does pdfLaTeX read, and what about SVG?
PDF, PNG and JPG, trying PDF first. It refuses SVG, so convert the SVG to PDF, as rsvg-convert does with its labels kept as text; Typst reads SVG directly.
From the lesson Images, figures and alternative text
-
When does Typst refuse a PDF image?
Only in an export to a PDF standard, PDF/UA-1 for example: there it cannot embed PDF images and suggests an SVG.
From the lesson Images, figures and alternative text
-
When does the alt key of \includegraphics reach the PDF?
Only when tagging is on, with \DocumentMetadata. Without tagging the text is ignored and the PDF has no tags at all.
From the lesson Images, figures and alternative text
-
What should a chart's alternative text say?
The kind of chart and the point it makes, with the numbers that make it, without the caption again, the file name or "image of"; the full data belongs in the text or a table.
From the lesson Images, figures and alternative text
-
How do you mark a decorative image so screen readers skip it?
As an artifact: the artifact key of \includegraphics, or pdf.artifact around the image in Typst. Unmarked, LaTeX named the divider by its file name and Typst left an empty tag.
From the lesson Images, figures and alternative text
-
What do the placement letters h, t, b and p allow?
h here if it fits, t the top of a page, b the bottom of a page, p a page of floats only. Their order does not matter.
From the lesson Floats, placement, captions and subfigures
-
What does LaTeX do with [h] alone?
It is not allowed by itself: LaTeX adds t and warns that the h float specifier was changed to ht, so a figure that does not fit moves to the top of the next page.
From the lesson Floats, placement, captions and subfigures
-
Which default limits decide whether a float has room?
At most 2 floats at the top of a text page, 1 at the bottom and 3 on the page; top floats may fill 0.7 of it and bottom floats 0.3; a page of floats must be at least half full. A ! lifts the count and share limits.
From the lesson Floats, placement, captions and subfigures
-
Why did figures 3 and 4 of the report land on page 6?
Figure 2 was too tall for a top float and had no p, so it waited to the end of the document; floats of one kind keep their order, so the later figures waited behind it.
From the lesson Floats, placement, captions and subfigures
-
What do placeins' \FloatBarrier and the float package's [H] cost?
A barrier keeps floats from moving past it but can leave a page short; [H] fixes a figure in the text, which left 352 pt empty at the foot of a page in the measured report.
From the lesson Floats, placement, captions and subfigures
-
Do Typst figures float?
Not by default: a figure stays where it is written. placement: auto floats it to the top or bottom of its page, and scope: "parent" spans both columns.
From the lesson Floats, placement, captions and subfigures
-
How do you refer to one panel of a figure?
Give each panel its own caption and label, with subcaption's subfigure or subpar's grid: \ref prints 1a, \subref the letter alone, and both systems printed Figure 1b.
From the lesson Floats, placement, captions and subfigures
-
How do you give a long LaTeX caption a short entry in the list of figures?
\caption[short]{long}. Typst's outline lists the whole caption, so keep it short there; outlined: false leaves a figure out of the list.
From the lesson Floats, placement, captions and subfigures
-
How do you write an absolute, a relative and a polar point?
TikZ: (2,1), ++(1,1.5) after a point, and (60:2). CeTZ: (2, 1), (rel: (1, 1.5)) and (60deg, 2). Both count in centimetres.
From the lesson Drawing basics: TikZ and CeTZ
-
Where does the polar point (60:2) land?
2 × cos 60° = 1 cm across and 2 × sin 60° = 1.73 cm up from the origin.
From the lesson Drawing basics: TikZ and CeTZ
-
How does ++ differ from + in a TikZ point?
++(1,1.5) moves the current point, so the next relative point starts there; +(1,1.5) gives the same point without moving on.
From the lesson Drawing basics: TikZ and CeTZ
-
Why give each kind of node a style?
A style such as box/.style={draw, rounded corners, minimum width=28mm} names the look once, so a change of look is one line and every box stays the same size.
From the lesson Drawing basics: TikZ and CeTZ
-
Why place nodes from each other's anchors instead of at fixed coordinates?
below=of write, or CeTZ's (rel: ..., to: "write.south"), keeps each gap as written when a label grows; a node placed by its centre grows both ways and its gap shrinks.
From the lesson Drawing basics: TikZ and CeTZ
-
How do you crop a drawing's page to the drawing?
\documentclass[border=4pt]{standalone} in LaTeX, or #set page(width: auto, height: auto, margin: 4pt) in Typst.
From the lesson Drawing basics: TikZ and CeTZ
-
Which SVG export of the flowchart kept its words as text?
Only dvisvgm with embedded WOFF2 fonts; Typst's own SVG export, pdftocairo and dvisvgm with --no-fonts drew the letters as outlines.
From the lesson Drawing basics: TikZ and CeTZ
-
Does PDF/UA-1 export refuse a drawing without alternative text?
No: shapes become artifacts and both the export and veraPDF passed. Put the drawing in a figure with alt, or give a TikZ picture its alt key in tagged LaTeX, and read the structure tree.
From the lesson Drawing basics: TikZ and CeTZ
-
How do TikZ's graphs library and fletcher describe a flowchart?
As nodes and edges: TikZ writes chains such as collect/Collect -> clean/Clean; fletcher places node((0, 1), [Clean]) on a grid and joins a node to the next with edge("-|>").
From the lesson Flowcharts, trees, graphs and data plots
-
What should you know before using fletcher with CeTZ?
fletcher 0.5.8 imports CeTZ 0.3.4, so a document that also imports CeTZ 0.5.2 loads two versions whose names and styles do not mix.
From the lesson Flowcharts, trees, graphs and data plots
-
How does forest describe a tree?
In bracket notation, every node in brackets with its children inside: [Thesis [Chapter 1 [1.1] [1.2]] [Chapter 2]]. CeTZ's tree module takes a nested array instead.
From the lesson Flowcharts, trees, graphs and data plots
-
Why did [Methods, data] stop a forest tree?
A comma inside a node starts the node's options, so pdfLaTeX looked for a key named data. Wrap the label in braces: [{Methods, data}].
From the lesson Flowcharts, trees, graphs and data plots
-
How do pgfplots and lilaq read a CSV file?
pgfplots with \addplot table [x=Month, y=Station A, col sep=comma] and the file name; Typst's csv() reads the file and lilaq draws lq.plot(months, values).
From the lesson Flowcharts, trees, graphs and data plots
-
What does yaxis: (exponent: 0) do in lilaq?
It stops lilaq from moving a power of ten to the end of the axis, so the tick labels stay in plain millimetres.
From the lesson Flowcharts, trees, graphs and data plots
-
How do you keep two plotted series apart without colour?
Give each its own mark and dash pattern, such as round marks on a solid line and square marks on a dashed one, so the plot still reads in grey.
From the lesson Flowcharts, trees, graphs and data plots
-
Why summarise 3,650 daily values before plotting them?
Plotting them all took 5.34 s on every build and showed less; a script's 12 monthly means plotted in 3.49 s and showed the pattern more clearly.
From the lesson Flowcharts, trees, graphs and data plots
-
What are the parts of a .bib entry?
@ and the entry type, a brace, the citation key and a comma, then fields of the form name = {value}. You cite the key: \autocite{key} in LaTeX, @key in Typst.
From the lesson Bibliography files and reference managers
-
Which fields does biblatex require for an @article?
author, title, journaltitle (journal is an alias) and year or date. BibTeX's standard styles require author, title, journal and year.
From the lesson Bibliography files and reference managers
-
How do you write a web page for a style that runs BibTeX?
As @misc with url and howpublished: BibTeX's standard styles have no @online type and print such an entry as a plain one.
From the lesson Bibliography files and reference managers
-
How do you separate two people in an author field?
With the word and: author = {Iyer, Kavya and Østergaard, Mikkel}. A comma belongs inside one name, between surname and given name, never between two people.
From the lesson Bibliography files and reference managers
-
How do you keep a two-word surname such as Sen Gupta together?
Use the comma form, Sen Gupta, Arun. Without a comma the last word, Gupta, is taken as the surname.
From the lesson Bibliography files and reference managers
-
Why did a style print lstm for LSTM, and what fixes it?
Sentence-case styles lower every capital they can. Brace the words whose capitals belong to them, {LSTM} and {Assamese}, one word at a time, not the whole title.
From the lesson Bibliography files and reference managers
-
What did Biber's --validate-datamodel catch that a plain run did not?
A missing mandatory field, such as an article without journaltitle. Keep only the bare DOI in a doi field too, since a whole link there became https://doi.org/https://doi.org/...
From the lesson Bibliography files and reference managers
-
What do Biber, BibTeX and Typst do with two entries under one key?
Biber warns and uses the first, BibTeX reports a Repeated entry error and uses the first too, and Typst cannot parse the file at all. Keep keys in lower case, one per work, unchanged once cited.
From the lesson Bibliography files and reference managers
-
Which three lines set up biblatex?
\usepackage[style=numeric,backend=biber]{biblatex} in the preamble, \addbibresource{refs.bib} with the extension, and \printbibliography where the list should go.
From the lesson BibLaTeX and Biber
-
What do the .bcf and .bbl files carry in a biblatex build?
The first pdflatex run writes the cited keys and the options into the .bcf file; Biber reads it with the .bib file and writes the sorted, formatted list into the .bbl file for the next run.
From the lesson BibLaTeX and Biber
-
What does the first run of a biblatex document print for each citation?
Its key in brackets, such as [iyer2024monsoon], above an empty list, with the request Please (re)run Biber on the file.
From the lesson BibLaTeX and Biber
-
When do you use \autocite and when \textcite?
\autocite for an ordinary citation, the safe default, because the style chooses its form; \textcite when the authors are the subject of the sentence.
From the lesson BibLaTeX and Biber
-
How do you add a page, or a note and a page, to a biblatex citation?
One optional argument is a page: \autocite[45]{key} prints p. 45. Two are a note before and a page after: \autocite[see][45]{key}.
From the lesson BibLaTeX and Biber
-
Which biblatex options list every author with initials, numbered by first citation?
maxbibnames=99, giveninits=true and sorting=none on the \usepackage line, with no citation edited.
From the lesson BibLaTeX and Biber
-
What does defernumbers=true do for a bibliography split into several lists?
It numbers the entries as the lists are printed, so the lists read [1] [2], [3], [4], instead of keeping the numbers of the whole bibliography.
From the lesson BibLaTeX and Biber
-
How do you give each chapter its own bibliography?
Put each chapter's text in a refsection environment: Biber sorts and numbers each one alone, and \printbibliography inside it prints only its citations.
From the lesson BibLaTeX and Biber
-
What is BibTeX's build cycle?
LaTeX writes \citation, \bibstyle and \bibdata lines into the .aux file; BibTeX reads them with the .bst and .bib files and writes the .bbl; then LaTeX runs twice more.
From the lesson BibTeX, natbib and publisher .bst styles
-
What does a BibTeX .bbl file hold?
Plain LaTeX: a thebibliography environment with one \bibitem per work. Every BibTeX run writes it again, so fix the .bib file, not the .bbl.
From the lesson BibTeX, natbib and publisher .bst styles
-
What decides how a BibTeX reference list looks?
The .bst file: the order, which fields appear and the punctuation. IEEEtran.bst left the DOIs out, while splncs04.bst printed them as https://doi.org/ addresses.
From the lesson BibTeX, natbib and publisher .bst styles
-
Why did ACM's .bst file fail in a plain article?
It writes commands into the .bbl that only the acmart class defines. Use a publisher's style only with its own class.
From the lesson BibTeX, natbib and publisher .bst styles
-
How do natbib's \citet and \citep differ?
\citet is the textual citation, as Śarmā and Okafor (2023); \citep the parenthetical one, as (Iyer and Østergaard, 2024). The numbers option turns both numeric without editing the text.
From the lesson BibTeX, natbib and publisher .bst styles
-
Why did plainnat print [Iyer and Østergaard, 2024, Rao, 2021]?
natbib has a predefined style for plainnat with square brackets and commas; the round option brings back parentheses and the semicolon.
From the lesson BibTeX, natbib and publisher .bst styles
-
How do you give arXiv a bibliography without the .bib file?
Upload the .bbl named like the main file, paper.bbl for paper.tex, made by the same program as the paper. A biblatex .bbl must match arXiv's biblatex, format 3.3 for its TeX Live 2025.
From the lesson BibTeX, natbib and publisher .bst styles
-
Why did BibTeX sort Østergaard and Śarmā after Thomas?
Legacy BibTeX sorts by character codes and supports US-ASCII only. Biber sorts Unicode names correctly; with BibTeX, write the names as LaTeX accents in braces, such as {\O}stergaard.
From the lesson BibTeX, natbib and publisher .bst styles
-
How does Typst cite and print a bibliography?
@key cites, and #bibliography("refs.bib") loads the data and prints the list where it stands, in one compile with no other program. The default style is IEEE.
From the lesson Typst bibliographies, Hayagriva and CSL styles
-
What does Typst do with a key that no bibliography holds?
It stops the compile: label does not exist in the document. A citation in a document with no bibliography at all stops it too.
From the lesson Typst bibliographies, Hayagriva and CSL styles
-
How do you list an entry in Typst without citing it in the text?
#cite(<key>, form: none) for one entry, or #bibliography("refs.bib", full: true) for every entry of the file.
From the lesson Typst bibliographies, Hayagriva and CSL styles
-
What is Hayagriva, and when do you choose it?
Typst's YAML bibliography format, with journals and books as nested parents and one string per person. Choose it for data only Typst reads; keep a .bib file when LaTeX or a reference manager shares it.
From the lesson Typst bibliographies, Hayagriva and CSL styles
-
How do you use a journal's own CSL style in Typst?
Save the .csl file next to the document and give its path as the style parameter of #bibliography; built-in styles are named, such as "apa" or "ieee".
From the lesson Typst bibliographies, Hayagriva and CSL styles
-
What does #cite(<key>, form: "prose") print?
A citation woven into the sentence, such as Śarmā & Okafor (2023) in APA, like biblatex's \textcite; @key[p. 45] adds a page to an ordinary citation.
From the lesson Typst bibliographies, Hayagriva and CSL styles
-
How do several Typst bibliographies share or restart their numbers?
Lists of the default group share one numbering, in the order they are printed; #set bibliography(group: none) makes each list start at [1].
From the lesson Typst bibliographies, Hayagriva and CSL styles
-
Why store .bib titles in sentence case for Typst?
CSL styles print a title as stored and only ever convert it to title case, because a program cannot find the proper nouns to lower the rest. Brace the proper nouns as well.
From the lesson Typst bibliographies, Hayagriva and CSL styles
-
How do a frame and a slide differ in Beamer?
A frame is one frame environment you write; a slide is one page Beamer makes from it, one for each step of its overlays. The four-frame talk made 9 pages.
From the lesson Beamer: frames, overlays and themes
-
What does the class option aspectratio=169 give?
Wide frames of 160 by 90 mm, against 128 by 96 mm, which is 4:3, without the option.
From the lesson Beamer: frames, overlays and themes
-
Which Beamer frames need the [fragile] option?
Frames that hold \verb or a verbatim environment, such as frames that show code; Beamer then writes the frame to a file of its own and reads it back.
From the lesson Beamer: frames, overlays and themes
-
What do <2>, <2-> and <-3> mean in an overlay specification?
Slide 2 only, from slide 2 on, and up to slide 3. A frame has as many slides as the largest number any of its specifications mentions.
From the lesson Beamer: frames, overlays and themes
-
How do \only and \uncover differ?
\only puts its text on the named slides and takes no space on the others, so the slide can move; \uncover keeps the space on every slide and shows the text only on the named ones.
From the lesson Beamer: frames, overlays and themes
-
How do you make a one-page-per-frame handout from the same Beamer file?
Pass the class option handout, which flattens the overlays. pgfpages can put four slides on each A4 sheet, but it destroys hyperlinks.
From the lesson Beamer: frames, overlays and themes
-
What does \only<1| handout:0> do?
It shows the text on slide 1 of the talk and keeps it out of the handout, because the handout has no slide 0.
From the lesson Beamer: frames, overlays and themes
-
Why did the metropolis theme fall back to Computer Modern?
It sets its text in Fira Sans, which needs XeLaTeX or LuaLaTeX; built with latexmk -lualatex, the same file embedded the Fira fonts.
From the lesson Beamer: frames, overlays and themes
-
How does Touying split a document into slides?
A first-level heading starts a section, a second-level heading starts a slide, and each #pause starts a subslide, which is one PDF page.
From the lesson Typst slides with Touying and Polylux
-
What does the footer of Touying's simple theme count?
Slides, not pages: the three subslides of one slide all say 1/3.
From the lesson Typst slides with Touying and Polylux
-
What does #meanwhile do in Touying?
It sets the subslide count back to 1, so what follows appears in step with what came before it, such as a picture that stays beside a list whose items appear one at a time.
From the lesson Typst slides with Touying and Polylux
-
How does Polylux mark a slide and a reveal?
Each #slide[...] block is a slide; #uncover("2-") and #only(2) take Beamer-like specifications, and #show: later hides the rest until the next subslide.
From the lesson Typst slides with Touying and Polylux
-
Why give each Polylux list item a block of its own inside #uncover?
On Polylux 0.4.0 with Typst 0.15.1, #item-by-item and #show: later left a bare bullet for each hidden item; one block per item inside #uncover took the bullet with it.
From the lesson Typst slides with Touying and Polylux
-
How do you build a Touying handout without editing the source?
typst compile --input export-mode=handout. It keeps only the last subslide of each slide, so a line shown only on an earlier subslide is not in it.
From the lesson Typst slides with Touying and Polylux
-
How did the talk build without network access?
From a vendor folder in Typst's preview/<name>/<version>/ layout, passed with --package-path, holding Touying 0.8.0 and uniwarn 0.1.1, the package Touying itself imports.
From the lesson Typst slides with Touying and Polylux
-
How did Beamer, Touying and Polylux compare on the same talk?
All three made the same 9 pages; latexmk took 8.54 s for Beamer, Touying 0.25 s and Polylux 0.11 s in the recorded run.
From the lesson Typst slides with Touying and Polylux
-
What did veraPDF find in the Beamer talk?
No structure tree: it failed 7 of the 106 PDF/UA-1 rules, and no theme or option can fix it, because Beamer has no tagging support.
From the lesson Accessible slides, posters and handouts
-
What is ltx-talk, and what does it need?
A class with Beamer-like frames made for tagged output. It requires \DocumentMetadata, works best with LuaLaTeX and does not support XeTeX; the ported talk passed all 1,727 PDF/UA-2 rules.
From the lesson Accessible slides, posters and handouts
-
Which slide of a frame does ltx-talk tag?
Only the last slide, by default; the others are artifacts. A line shown only on an early slide, such as with \only<1>, is never heard.
From the lesson Accessible slides, posters and handouts
-
Why did the Touying talk stop under --pdf-standard ua-1?
Its display equations had no alt text. The error pointed inside Touying because the package rebuilds slide content; math.equation(alt: ...) on both equations fixed it.
From the lesson Accessible slides, posters and handouts
-
What contrast does WCAG 2.2 ask of slide text?
At least 4.5:1 against its background; 3:1 for large text, meaning at least 18 point or 14 point bold, and for marks such as chart lines. Black text on white gives 21:1.
From the lesson Accessible slides, posters and handouts
-
Why make alerts bold as well as coloured?
Colour must never be the only signal: a reader who cannot tell red from black, or a greyscale print, loses an emphasis that only its colour shows.
From the lesson Accessible slides, posters and handouts
-
How do you build an accessible A0 poster in LaTeX?
Use the article class with geometry for the page, multicol and unicode-math, all marked compatible with tagging; beamerposter has no tagging support and tikzposter is not on the status list.
From the lesson Accessible slides, posters and handouts
-
Which version of a Typst talk suits a listener best?
The text version, --input export-mode=article: one page that says each line once, with real H1 and H2 headings, beside the handout for readers who print.
From the lesson Accessible slides, posters and handouts
-
How do \input and \include differ?
\input pastes a file's text where it stands, anywhere, and may be nested; \include starts and ends with \clearpage, writes a .aux file for its chapter and cannot be nested.
From the lesson Multi-file projects and faster builds
-
What does \includeonly{chapters/results} do?
It sets only that chapter and reads the skipped chapters' .aux files, so its page, chapter and figure numbers stay as in the whole document. Build the whole document before you submit it.
From the lesson Multi-file projects and faster builds
-
How do you build one chapter without editing main.tex?
pdflatex "\includeonly{chapters/results}\input{main}". Several chapters are separated by commas.
From the lesson Multi-file projects and faster builds
-
What happens to a subfile compiled on its own?
It uses the main file's preamble but counts from 1 again and prints ?? for references into other chapters, unless xr's \externaldocument reads main.aux.
From the lesson Multi-file projects and faster builds
-
When does Typst use include, and when import?
include evaluates a file and inserts its content, for chapters; import takes named definitions out of a file, for a template. Including a template inserts nothing and leaves its function behind.
From the lesson Multi-file projects and faster builds
-
Where does a relative path start in LaTeX and in Typst?
LaTeX reads it from the main file's folder, where pdflatex runs; Typst reads it from the folder of the file that names it, and a path starting with / from the project root.
From the lesson Multi-file projects and faster builds
-
Why name shared Typst files as "/figures/gauges.png"?
A path from the project root works from the main file and from a chapter at any depth, while ../figures escapes the root when that chapter is compiled on its own.
From the lesson Multi-file projects and faster builds
-
What did timing the eight-chapter LaTeX thesis show?
latexmk's 3 pdflatex and 2 BibTeX runs took 18.20 s; a run that set no chapter still cost 1.67 s; \includeonly of one chapter took 2.14 s. typst watch recompiled the Typst thesis in 0.10 s after an edit.
From the lesson Multi-file projects and faster builds
-
How do you number a report-class thesis in roman, then arabic from chapter 1?
\pagenumbering{roman} at the start of the document, then \clearpage and \pagenumbering{arabic} before chapter 1, which starts the count again at 1.
From the lesson Thesis front matter, page numbering and lists
-
How do you count a title page as i without printing its number?
Give it \thispagestyle{empty}. In a one-sided report, a titlepage environment would make the next page i a second time.
From the lesson Thesis front matter, page numbering and lists
-
What do \frontmatter, \mainmatter and \backmatter do in the book class?
\frontmatter numbers pages in roman and leaves chapters unnumbered but listed; \mainmatter resets the page number and numbers chapters again; \backmatter unnumbers chapters and keeps the page numbering.
From the lesson Thesis front matter, page numbering and lists
-
Where does \addcontentsline go for an unnumbered chapter?
On the line right after \chapter*: the entry takes the page where the command stands, so placed above the heading it named the page before.
From the lesson Thesis front matter, page numbering and lists
-
What does tocbibind add to the contents, and what does nottoc do?
It adds the lists of figures and tables, the bibliography and the index; the nottoc option stops the contents from listing itself.
From the lesson Thesis front matter, page numbering and lists
-
Does Typst list an unnumbered heading in the outline?
Yes: a heading is outlined whenever outlined is true, the default, whatever its numbering.
From the lesson Thesis front matter, page numbering and lists
-
How does Typst build a list of tables?
#outline(target: figure.where(kind: table)). A figure takes the kind of what it holds, so a table in a figure is listed as a table.
From the lesson Thesis front matter, page numbering and lists
-
Why measure the height of every chapter opening?
A second titlesec format for unnumbered chapters in the display shape opened them at 41.7 mm while numbered chapters stayed at 32.9 mm, a gap easy to miss by eye.
From the lesson Thesis front matter, page numbering and lists
-
How do you make "one and a half spacing" checkable?
Turn it into a number you can measure in the PDF: with 12 pt type, baselines 18 pt apart.
From the lesson Build a thesis template from your university's rules
-
What do you do with a rule that resists numbers, such as "a clear, professional font"?
Ask the thesis office what it means or write down the accepted fonts, and keep a short list of the rules you check by eye.
From the lesson Build a thesis template from your university's rules
-
Why write the checker before the template?
The template is then done when every rule passes, not when the pages look right; the report class's own settings failed 5 of the 13 rules.
From the lesson Build a thesis template from your university's rules
-
Which defaults of the report class broke the invented manual?
US letter paper, 10 pt type with baselines 12 pt apart, page numbers 31.5 mm above the bottom edge, and arabic numbers from the first page.
From the lesson Build a thesis template from your university's rules
-
What belongs in a thesis class, and what in its options?
The manual's numbers belong in the class; only what really differs between students, such as the degree or a draft build, becomes an option.
From the lesson Build a thesis template from your university's rules
-
How does a Typst template get 18 pt between baselines with 12 pt type?
It makes each line 1 em high, with top-edge: 1em and bottom-edge: "baseline", and adds 6 pt of leading.
From the lesson Build a thesis template from your university's rules
-
Why did the first Typst template fail the numbering rule?
numbering: none on the title page left its label empty. Keeping roman numbering and removing only the footer labels it i without printing a number.
From the lesson Build a thesis template from your university's rules
-
What do you check before using a thesis template found online?
Which edition of the manual it follows, what a checker says about its PDF, whether the institution publishes it, and its licence: a template is unofficial until the institution publishes it.
From the lesson Build a thesis template from your university's rules
-
How do you define an acronym with the glossaries package?
\newacronym{rwh}{RWH}{rooftop rainwater harvesting}: a label for the source, the short form and the long form.
From the lesson Glossaries, acronyms, indexes and appendices
-
What does \gls{rwh} print?
rooftop rainwater harvesting (RWH) at the first use and RWH after that. \Gls capitalises the first letter, and \glsreset makes the next use a first use again.
From the lesson Glossaries, acronyms, indexes and appendices
-
Why not type an acronym's expansion by hand?
The first use moves when chapters are reordered or text is cut; \gls spells the acronym out wherever its first use ends up, and the list holds only the acronyms that are used.
From the lesson Glossaries, acronyms, indexes and appendices
-
Why did the list of abbreviations first print pages 2 and 3 instead of 4 and 5?
The lists themselves moved the chapters on; the page numbers settled only after a second makeglossaries run and one more pdflatex run.
From the lesson Glossaries, acronyms, indexes and appendices
-
Which loads first, hyperref or glossaries?
hyperref: the glossaries manual says to load it before glossaries, although it otherwise belongs near the end of the preamble.
From the lesson Glossaries, acronyms, indexes and appendices
-
How does imakeidx finish an index in the same run?
It runs makeindex itself at \printindex through the restricted shell escape, which TeX Live allows for makeindex.
From the lesson Glossaries, acronyms, indexes and appendices
-
How do you mark a subentry, a page range and a bold page in an index?
\index{rain gauge!tipping-bucket} for a subentry, \index{rain gauge|(} and \index{rain gauge|)} for a range, and \index{first flush|textbf} for a page in bold.
From the lesson Glossaries, acronyms, indexes and appendices
-
How do you start lettered appendices?
\appendix in LaTeX, after which the next \chapter is Appendix A, with Table A.1. In Typst, #counter(heading).update(0), then #set heading(numbering: "A.1", supplement: [Appendix]), plus a figure numbering rule with "A.1".
From the lesson Glossaries, acronyms, indexes and appendices
-
What is PDF/A?
The ISO 19005 family of standards for PDFs meant to be kept: the file carries what it needs to show the same pages later, its fonts among them, and names its part and level in its XMP metadata.
From the lesson Archival PDF/A and final submission checks
-
How do PDF/A-2b and PDF/A-2u differ?
Both follow part 2, which is based on PDF 1.7; level u also promises that all the text maps to known Unicode code points, so it can be searched and copied.
From the lesson Archival PDF/A and final submission checks
-
How do you ask for PDF/A-2u when you export?
LaTeX: \DocumentMetadata{lang=en-IN, pdfstandard=a-2u} above \documentclass. Typst: typst compile --pdf-standard a-2u.
From the lesson Archival PDF/A and final submission checks
-
Why do pdfx and hyperxmp not belong in a new document?
The tagging status list marks them as not supported with the new PDF management; set standards with the keys of \DocumentMetadata instead.
From the lesson Archival PDF/A and final submission checks
-
How do you choose the profile veraPDF checks against?
--flavour 2u for a given part and level, or --flavour 0 for the profile the file's own metadata names; --format json gives a report a program can read.
From the lesson Archival PDF/A and final submission checks
-
What did a figure with Helvetica not embedded do in each system?
pdflatex built the thesis without a warning and veraPDF failed rule 6.2.11.4.1; Typst refused the PDF image at export. Embed the font with Ghostscript, or convert the figure to SVG for Typst.
From the lesson Archival PDF/A and final submission checks
-
What did the first-try thesis fail in the submission check?
US letter pages, the report class's default; a font not embedded; no title or author in the metadata; and no PDF/A claim. Only its file size passed.
From the lesson Archival PDF/A and final submission checks
-
Which rewrites of a PDF/A-2u file broke it?
Ghostscript's /ebook settings removed its PDF/A identification, and qpdf --linearize broke one rule, both without a word. qpdf with --newline-before-endstream and mutool clean kept it compliant.
From the lesson Archival PDF/A and final submission checks
-
Which packages does the one-page LaTeX resume use, and for what?
geometry for its 16 mm margins, enumitem's nosep for tight lists, and hyperref for the links and the PDF's title and author; two macros of its own make the headings and the entries.
From the lesson A one-page resume in LaTeX that parses
-
Why did the draft's Education heading end up on the contact line?
Nothing had ended the contact line's paragraph, and \vspace inside a paragraph puts its space below the line, so the bold heading was set as more words of that line.
From the lesson A one-page resume in LaTeX that parses
-
How do you make a heading macro safe whatever comes before it?
Start it with \par, or build it on \section*, which ends the paragraph before it starts the heading.
From the lesson A one-page resume in LaTeX that parses
-
Why keep a resume entry's fields on one line in reading order?
Each field moved to the margin with \hfill is a piece of text of its own, and the three extractors rebuilt one entry's place and dates in three different orders.
From the lesson A one-page resume in LaTeX that parses
-
What did Font Awesome icons become in extracted text?
Stray characters: +, #, the control character U+0083 and § in poppler and pdf.js, and U+FFFD in MuPDF, because the fonts' maps held no entry for the icons.
From the lesson A one-page resume in LaTeX that parses
-
How do you measure the height left on a LaTeX page?
Write \pagegoal minus \pagetotal into the log at the end of the document; the resume had 245 pt left, about 18 more lines of 11-point text.
From the lesson A one-page resume in LaTeX that parses
-
What decided whether the resume fitted on one page?
The 16 mm margins: without them even nosep left it on two pages. nosep then saved another 140 pt.
From the lesson A one-page resume in LaTeX that parses
-
Which resume headings survived LaTeX's tagging as headings?
Those built on \section*, tagged as five level-1 headings. The hand-made macro and titlesec's headings were tagged as plain paragraphs, and veraPDF passed all three builds.
From the lesson A one-page resume in LaTeX that parses
-
What replaces the LaTeX resume's two macros in Typst?
A show rule for level-1 headings, which styles every section and keeps it a heading, and a function entry(org, place, dates, role) that lays out each entry.
From the lesson A resume in Typst, generated from data
-
Why did an e-mail address in markup stop a Typst compile?
In markup @ starts a reference to a label, so Typst looked for one; escape it, as tanvi.kulkarni\@example.com, or print the address from a string.
From the lesson A resume in Typst, generated from data
-
How does Typst read a YAML data file?
yaml("resume.yaml") turns lists into arrays and mappings into dictionaries; json() gives the same values from a JSON file.
From the lesson A resume in Typst, generated from data
-
How do you read an optional field without breaking the build?
item.at("points", default: ()), or test "note" in item first; a plain lookup of a missing key stops with dictionary does not contain key.
From the lesson A resume in Typst, generated from data
-
How does one data file build two resume variants?
--input role=data puts the string into sys.inputs, and each item's roles list decides which variants keep it; an item without roles appears in all of them.
From the lesson A resume in Typst, generated from data
-
How can a Typst build refuse a resume that runs over one page?
#context assert(counter(page).final().first() == 1, ...) stops the compile with a message; another assert can refuse a role the data does not name.
From the lesson A resume in Typst, generated from data
-
What does --pdf-standard ua-1 add to Typst's default tagged PDF?
The flag that asks viewers to show the title, the PDF/UA identification in the metadata, and export checks that stop on a missing title, on headings that start below level 1 and on a skipped level.
From the lesson A resume in Typst, generated from data
-
Why start a Typst resume's sections at level 1?
The name belongs in the title element, which is not a heading, so the outline starts with the first section, and PDF/UA-1 export requires the first heading to be of level 1.
From the lesson A resume in Typst, generated from data
-
How does biblatex list every work of a .bib file without citing each one?
\nocite{*} puts every entry into the bibliography; sorting=ydnt then sorts them by year, newest first.
From the lesson Academic CVs, cover letters and a shared style
-
How do you print one list per entry type, each numbered from 1?
One \printbibliography per type, such as [type=article, heading=none] under a heading of your own, with defernumbers and resetnumbers=true.
From the lesson Academic CVs, cover letters and a shared style
-
Which entry type holds a talk in biblatex?
@unpublished, a work not formally published, with the event and the place kept in its note field.
From the lesson Academic CVs, cover letters and a shared style
-
How does Typst print a CV's separate publication lists?
One bibliography per block: each work is cited with form: none inside the block, and the block's bibliography targets selector(cite).within(here()); group: none numbers each list from 1.
From the lesson Academic CVs, cover letters and a shared style
-
Why did the Typst CV's talks lose their event and place?
Typst's IEEE style did not print the note field for those entries; a CSL file of 29 lines that adds the note variable fixed it.
From the lesson Academic CVs, cover letters and a shared style
-
How do you check that a resume, a CV and a letter share one look?
List their fonts with pdffonts and compare the names with the subset prefixes removed; a document that forgot the style shows other fonts.
From the lesson Academic CVs, cover letters and a shared style
-
Why did letter-plain.typ come out in Libertinus Serif?
It imported the style but left out #show: look.with(...), so Typst's default font applied, with no error.
From the lesson Academic CVs, cover letters and a shared style
-
How does a new paper reach both the CV and the resume?
Add one entry to the .bib file: its year sorts it into the CV, and keywords = {selected} puts it on resumes that filter by that keyword.
From the lesson Academic CVs, cover letters and a shared style
-
What does \newcommand{\unit}[2][m]{#2\,#1} define?
A command with two arguments whose first is optional, with m as its default: \unit{1.5} prints 1.5 m and \unit[km]{3} prints 3 km.
From the lesson LaTeX macros, environments, lengths and counters
-
How do \newcommand, \renewcommand and \providecommand treat an existing name?
\newcommand refuses it with Command already defined; \renewcommand changes it and refuses a name not yet defined; \providecommand defines a command only when nothing has.
From the lesson LaTeX macros, environments, lengths and counters
-
Why did \LaTeX is fun. print LaTeXis fun.?
TeX skips the spaces after a control word, a backslash followed by letters. End the name with an empty group, as \LaTeX{}, or with a control space, a backslash followed by a space.
From the lesson LaTeX macros, environments, lengths and counters
-
Why end the lines of a multi-line definition with %?
A line end inside the braces becomes a space wherever the command is used; two such spaces made the measured line 7.78 pt wider.
From the lesson LaTeX macros, environments, lengths and counters
-
Why can't the end code of \newenvironment use #1?
LaTeX turns the end code into a command of its own that takes no arguments. Save the value in the begin code, \newcommand{\notetitle}{#1}, and write \notetitle in the end code.
From the lesson LaTeX macros, environments, lengths and counters
-
What can \NewDocumentCommand do that \newcommand cannot?
Take a star (s), optional arguments in any position, such as O{mm} after the value, and optional arguments nested safely; the commands it makes are robust.
From the lesson LaTeX macros, environments, lengths and counters
-
Why use \linewidth instead of \textwidth inside a list?
\linewidth is the width of the line you are in, 319.99997 pt in the list item, while \textwidth stays 345 pt, so a picture of that width sticks into the margin.
From the lesson LaTeX macros, environments, lengths and counters
-
Why did \label store 2 for Result 2.2?
\quickresult stepped its counter with \stepcounter, which does not set what \label stores, so the section's number was still in force. \refstepcounter steps the counter and sets the value.
From the lesson LaTeX macros, environments, lengths and counters
-
How long does a Typst set rule last?
Until the end of the block it is written in, or to the end of the file at the top level; a rule inside #[ ... ] ends with the block.
From the lesson Typst set rules, show rules and scripting
-
Why did a set rule that gave every heading a body fail?
A set rule can give only optional parameters, and a heading's body is required: Typst stopped with unexpected argument: body.
From the lesson Typst set rules, show rules and scripting
-
What are the two kinds of show rule?
A show-set rule applies a set rule to the selected elements only, as #show heading: set text(fill: navy); a transforming show rule passes each element to a function and shows what it returns.
From the lesson Typst set rules, show rules and scripting
-
Why did #show "mm": [millimetres] turn Summary into Sumillimetresary?
A text selector matches the text anywhere, even inside words. A regular expression with word boundaries, regex("\\bmm\\b"), keeps the rule to the unit.
From the lesson Typst set rules, show rules and scripting
-
Can a Typst function change a variable outside it?
No: variables from outside a function are read-only inside it. A total that grows through a document needs state instead.
From the lesson Typst set rules, show rules and scripting
-
Why did passing 4.2 straight to a table cell fail?
A cell must be content: Typst stopped with expected content, found float, so convert each number with str() first.
From the lesson Typst set rules, show rules and scripting
-
Why must counters, state and queries be read inside context?
Their values exist only in the finished layout. Inside context, final() can print a total above the readings it adds up, and Typst lays the document out again until the values settle, five times at most.
From the lesson Typst set rules, show rules and scripting
-
Why did copies * 2 print 33?
Values that --input puts into sys.inputs are always strings, so a string times 2 repeats it; int(copies) * 2 gives 6.
From the lesson Typst set rules, show rules and scripting
-
How do you give a new LaTeX package key-value options?
Declare them with \DeclareKeys, with properties such as .store and .if, and read them with \ProcessKeyOptions; name the LaTeX release that added them in \NeedsTeXFormat.
From the lesson Writing LaTeX classes and Typst templates
-
What happens to an option that a package or class never declared?
It is an error for a package, such as Unknown option 'colour' for package exu-report, and a warning for a class; \DeclareUnknownKeyHandler changes that.
From the lesson Writing LaTeX classes and Typst templates
-
When is a file a class, and when a package?
If its commands could be used with any document class, a package; if not, a class, which is often built on a standard class with \LoadClass{report}.
From the lesson Writing LaTeX classes and Typst templates
-
Why did the first thesis class print 12pt when the thesis asked for 11pt?
Both 11pt and the 12pt written in \LoadClass reached report, whose \ProcessOptions runs options in its own order of declaration, so 12pt ran last and won.
From the lesson Writing LaTeX classes and Typst templates
-
How do you rename an option without breaking old documents?
Keep the old name as an alias that warns, such as Option colour is deprecated; use color=blue instead, and remove it only in a version that announces the break.
From the lesson Writing LaTeX classes and Typst templates
-
Why did authors: ("A. Rao") fail the template's check?
Parentheses around one value only group it, so it is a string; an array of one value needs a comma, ("A. Rao",).
From the lesson Writing LaTeX classes and Typst templates
-
What does a [template] section in typst.toml do?
With its path and entrypoint, it lets typst init copy a starter project from the package; name, version and entrypoint are what the compiler itself needs.
From the lesson Writing LaTeX classes and Typst templates
-
Which licence suits a template's folder?
One that lets people use what they make from it without conditions, such as MIT-0 or Zero-Clause BSD, as Typst's licensing guide recommends.
From the lesson Writing LaTeX classes and Typst templates
-
How does listings highlight code?
With TeX alone: TeX reads the source directly, so it builds wherever LaTeX does, with no other program and no shell escape.
From the lesson Code listings and algorithms
-
Why did listings' default output copy with a gap between every letter?
By default listings sets each character in a column of its own, and OT1 has no underscore; T1 with columns=fullflexible, keepspaces, upquote and showstringspaces=false made the copy read like the source, apart from its indentation.
From the lesson Code listings and algorithms
-
Why did the first minted PDF show <MINTED> where the code belongs?
minted highlights the code at the end of the first run, through latexminted and Pygments, saves it in the _minted folder and typesets it on the second run.
From the lesson Code listings and algorithms
-
When does minted build with shell escape switched off?
Only from a _minted cache made on the same TeX Live release; without the cache minted stopped. TeX Live 2026 allows latexminted in its restricted shell escape.
From the lesson Code listings and algorithms
-
How do you number the lines of a Typst raw block?
With a show rule on raw.line, whose fields include number, count, text and body; trim(at: end) stops the file's final newline from adding an extra line.
From the lesson Code listings and algorithms
-
How do you set pseudocode in each system?
LaTeX: algpseudocode's \Function, \While and \If with \State, inside the algorithm float. Typst: a numbered list indented by depth in a figure of its own kind.
From the lesson Code listings and algorithms
-
What did the copy test of the 13 Python lines find?
Every LaTeX build gave back only the 4 unindented lines exactly and lost the indentation of the rest, while the Typst block gave back all 13.
From the lesson Code listings and algorithms
-
How do you keep a listing's line numbers out of a reader's copy?
Draw the numbers, but give each one an empty replacement text through accsupp: the copy of that build held none of them.
From the lesson Code listings and algorithms
-
Where does \DocumentMetadata go, and what does it switch on?
First in the file, above \documentclass. Its keys do three jobs: tagging=on switches tagging on, lang=en-IN sets the language, and pdfstandard=ua-2 makes the file claim PDF/UA-2.
From the lesson Tagged, accessible PDFs from LaTeX
-
What happens when a document has two \DocumentMetadata lines?
The build stops with Two \DocumentMetadata declarations and writes no PDF; keep one line with every key, owned by whoever owns the top of the file.
From the lesson Tagged, accessible PDFs from LaTeX
-
Which language does a tagged LaTeX document claim without lang?
The main language of babel or polyglossia, or en when neither is loaded, with no word in the log.
From the lesson Tagged, accessible PDFs from LaTeX
-
Why build tagged documents with LuaLaTeX?
It passed PDF/UA-2 after one run, wrote the space at line breaks, marked unmarked content such as a bare rule as an artifact, and attached MathML with unicode-math on its second run; pdfLaTeX missed those three after two runs.
From the lesson Tagged, accessible PDFs from LaTeX
-
How do you mark a table's header row for LaTeX's tagging?
\tagpdfsetup{table/header-rows=1}, before the table or in the preamble. Without it every cell is a TD, and veraPDF still passes.
From the lesson Tagged, accessible PDFs from LaTeX
-
What did leaving out \title cost the tagged report?
pdfinfo found no title, and veraPDF failed rule 8.11.1-1: Metadata stream does not contain dc:title.
From the lesson Tagged, accessible PDFs from LaTeX
-
Which four things must the author give a tagged LaTeX document?
Alternative text, or artifact, for every graphic; the table's header rows; the document's title; and its language.
From the lesson Tagged, accessible PDFs from LaTeX
-
Why look packages up on the tagging status list before switching tagging on?
titlesec stopped the tagged build and pdfx was refused. The list marks each package compatible, partially compatible, currently incompatible, no support or unchecked.
From the lesson Tagged, accessible PDFs from LaTeX
-
What does Typst tag by itself, and what must you add?
It tags headings, paragraphs, lists, figures, tables and links, and marks headers, footers and shapes as artifacts; you add set document(title: ...), set text(lang: ...) and alt on every image and equation.
From the lesson Accessible PDFs from Typst
-
Why did Typst's default export fail PDF/UA-1?
Its metadata did not claim PDF/UA (rule 5-1) and it did not ask viewers to show its title (rule 7.1-10); --pdf-standard ua-1 adds both.
From the lesson Accessible PDFs from Typst
-
What does --pdf-standard ua-1 refuse?
A missing document title, an image or an equation without alt text, a first heading below level 1 and a skipped level. It refuses --no-pdf-tags outright.
From the lesson Accessible PDFs from Typst
-
Where does alt go for a picture inside a Typst figure?
On the image. A figure's own alt makes many screen readers skip its contents, so give it only to a figure whose body cannot speak for itself, and never to both.
From the lesson Accessible PDFs from Typst
-
Why put data in a Typst table with table.header rather than a grid?
A grid is tagged as Div and Span in source order, and a table without a header has only TD cells; both passed veraPDF, but only a table with its header can be read by row and column.
From the lesson Accessible PDFs from Typst
-
Which standards can one Typst export combine with PDF/UA-1?
PDF/A-2a, or PDF/A-3a when files are attached. PDF/A-4 and PDF 2.0 were refused, because PDF/UA-1 needs PDF 1.7 at most, and PDF/UA-2 is not available yet.
From the lesson Accessible PDFs from Typst
-
Why export an HTML version beside the PDF?
Readers who enlarge text or widen its spacing need text that reflows. Typst's HTML export, behind --features html, kept the language, headings, alt text, table headers and the formula as MathML.
From the lesson Accessible PDFs from Typst
-
How can a build list the images and equations without alt text before exporting?
typst eval with query(image) or query(math.equation) lists each one with its alt text, null where there is none.
From the lesson Accessible PDFs from Typst
-
Which four commands describe a PDF before anyone opens it?
pdfinfo for the title, tags, pages and version; pdffonts for the fonts; pdfinfo -meta for the XMP metadata; and pdfinfo -struct-text for the structure tree.
From the lesson Checking PDFs: extraction, tags and fonts
-
What do pdffonts' emb, sub and uni columns say?
Whether a font is embedded, whether only the glyphs used were kept, and whether it has a ToUnicode map that turns its glyphs back into text.
From the lesson Checking PDFs: extraction, tags and fonts
-
Why read a PDF with more than one extractor?
poppler, MuPDF and pdf.js rebuild the reading order each in their own way: the same page gave 17, 19 and 13 lines, and only pdf.js put a table row on one line.
From the lesson Checking PDFs: extraction, tags and fonts
-
Why did a search for d = V miss the formula in the LuaLaTeX and Typst PDFs?
Their text holds mathematical italic characters, U+1D451 for the d for example. Once NFKC normalisation had turned them into plain letters, the search found the formula.
From the lesson Checking PDFs: extraction, tags and fonts
-
What can veraPDF not judge?
Whether alt text describes the picture, whether the declared language is the text's, whether the reading order makes sense, and colour contrast: a chart described only as "chart" passed.
From the lesson Checking PDFs: extraction, tags and fonts
-
How is a contrast ratio computed?
(L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter colour and L2 that of the darker one.
From the lesson Checking PDFs: extraction, tags and fonts
-
Why did the report's grey source line fail even as large text?
Its #999999 on white reached 2.85:1, below the 4.5:1 that text needs and below the 3:1 that WCAG 2.2 allows for large text, 18 point or 14 point bold.
From the lesson Checking PDFs: extraction, tags and fonts
-
Which equal-RGB grey is the lightest that passes 4.5:1 on white?
#767676, at 4.54:1. The report's #999999 source line reached only 2.85:1.
From the lesson Checking PDFs: extraction, tags and fonts
-
What can a .tex file do on the computer that builds it with TeX Live 2026?
Read any file the account can read, since openin_any no longer has any effect; write only inside the build's folder (openout_any = p); and run the programs on the restricted list through \write18.
From the lesson Compiling documents you did not write
-
What are TeX Live's three shell-escape modes?
Unrestricted with --shell-escape; restricted when shell_escape is p, the default, where only listed programs run; and none with --no-shell-escape.
From the lesson Compiling documents you did not write
-
Which shell-escape setting suits a file you did not write?
-no-shell-escape, never -shell-escape. The restricted default is for your own documents, such as one that uses minted.
From the lesson Compiling documents you did not write
-
Where does Typst stop a document's access to files?
At the project root: a read outside it is refused as would escape the project root. Keep the root at the one submission's folder, because a wider --root lets it read the others.
From the lesson Compiling documents you did not write
-
Why is a fresh build folder not a sandbox?
TeX can still read any file the account can read from it. Isolation takes a container, or a sandbox of the operating system, that sees only the build's folder and the tools.
From the lesson Compiling documents you did not write
-
Which limits does an isolated build need besides its own folder?
No network, no secrets, and a time limit: a macro that called itself ran until the shell's limit of 3 seconds of processor time stopped it.
From the lesson Compiling documents you did not write
-
Why check the links of a compiled SVG before a page shows it?
Typst copies link targets into its SVG and PDF as written, so an embedded SVG lets the document choose where a click goes. Keep https, http, mailto and internal links and remove the rest.
From the lesson Compiling documents you did not write
-
Why allow-list link schemes rather than deny-list them?
A list of forbidden schemes misses the one nobody thought of, while an allow-list fails closed.
From the lesson Compiling documents you did not write
-
Where does latexmk read a project's settings from?
A latexmkrc or .latexmkrc file in the folder it runs in, so the engine and its flags travel with the sources; its output then says Rc files read (in order): ./latexmkrc.
From the lesson Build automation, CI and reproducible PDFs
-
What exit status does pdfLaTeX give for an undefined reference?
0, with ?? in the PDF and a warning in the log, which a script reads as success.
From the lesson Build automation, CI and reproducible PDFs
-
How do you make latexmk fail on an undefined reference?
$warnings_as_errors = 1 in latexmkrc, or latexmk -Werror; the build then ended with exit status 12. Typst stops with an error by itself.
From the lesson Build automation, CI and reproducible PDFs
-
What does .DELETE_ON_ERROR do in a Makefile?
It makes make delete a target whose recipe failed, so a PDF with ?? in it never sits in the folder looking finished.
From the lesson Build automation, CI and reproducible PDFs
-
What does chktex find, and how does it fail a CI job?
Typing slips that compile without a warning, such as a hyphen in a range, a full stop after e.g. or straight quotation marks; with any finding it ends with exit status 2.
From the lesson Build automation, CI and reproducible PDFs
-
What does a pinned CI job fix in place?
The runner image, such as ubuntu-24.04, each action by its full commit SHA, the TinyTeX and Typst downloads checked against their SHA-256 values, and a list of every TeX package that tlmgr added.
From the lesson Build automation, CI and reproducible PDFs
-
Why do two builds of one commit differ, and what makes them match?
pdfTeX and Typst write the build time into the PDF's dates and IDs. SOURCE_DATE_EPOCH set to the commit's time, git log -1 --format=%ct, gave the same bytes; LuaLaTeX's ID also depends on the folder.
From the lesson Build automation, CI and reproducible PDFs
-
Does SOURCE_DATE_EPOCH change what \today prints?
No: it fixes only the dates in the PDF's metadata. Write the date you want on the page into the source.
From the lesson Build automation, CI and reproducible PDFs
-
Why keep one sentence per line in a source file under Git?
Git diffs and merges by lines, so co-authors' edits to different sentences merge by themselves, while the same edits to a paragraph kept on one line conflicted.
From the lesson Collaboration, version control and tracked changes
-
How do you make Git's hunk headers name the LaTeX section?
Add *.tex diff=tex to .gitattributes, one of Git's built-in patterns; the header then showed \section{Method}.
From the lesson Collaboration, version control and tracked changes
-
Which files belong in a LaTeX project's .gitignore?
Everything a build writes again: .aux, .log, .fls, .fdb_latexmk, .bbl and the PDF. git check-ignore -v names the line that matched each file.
From the lesson Collaboration, version control and tracked changes
-
What does latexdiff produce?
A third .tex file in which every deletion and addition between two drafts is marked word by word, which pdflatex builds into a PDF; latexdiff-vc --git -r HEAD~1 takes the old draft from Git.
From the lesson Collaboration, version control and tracked changes
-
How do you compare two Typst drafts the way a reader sees them?
Extract the text of both PDFs with pdftotext and compare it word by word with git diff --no-index --word-diff.
From the lesson Collaboration, version control and tracked changes
-
How does pandoc read a Word co-author's tracked changes?
--track-changes=all keeps each insertion and deletion as a span with its author; accept, the default, applies them, and reject drops them.
From the lesson Collaboration, version control and tracked changes
-
Why does the .tex file stay the primary copy when a co-author edits in Word?
You apply the changes you agree with in report.tex, so the LaTeX markup that never went through Word, such as \,mm and the labels, is never lost.
From the lesson Collaboration, version control and tracked changes
-
How do you keep notes for co-authors out of the final PDF without editing the source?
Pass todonotes the disable option from the command line, with \PassOptionsToPackage{disable}{todonotes}; in Typst, read --input final=yes from sys.inputs.
From the lesson Collaboration, version control and tracked changes
-
How does pandoc convert LaTeX to Typst?
A reader parses the input into pandoc's own document tree and a writer writes Typst from the tree, so whatever the tree cannot hold, such as a TikZ picture, is dropped.
From the lesson Converting between LaTeX, Typst, Word and Markdown
-
What happens to a custom macro such as \mean{x} in a pandoc conversion?
It is expanded, not kept: the Typst file has macron(x), and its reader never learns that the macro existed.
From the lesson Converting between LaTeX, Typst, Word and Markdown
-
Why did the converted note print Table Table 1?
Typst's reference @tab:totals prints the word Table itself, so the word that the LaTeX source typed before \ref doubled.
From the lesson Converting between LaTeX, Typst, Word and Markdown
-
What did \eqref become in the conversion, and what replaces it?
A link whose text was the label's name, printed as Equation [eq:mean]; in Typst write @eq:mean.
From the lesson Converting between LaTeX, Typst, Word and Markdown
-
Why convert only the body and write the Typst frame yourself?
pandoc's whole-document template left the headings unnumbered and the build stopped on a reference; a main.typ of your own keeps numbering, captions, fonts and the title, and a later conversion changes none of them.
From the lesson Converting between LaTeX, Typst, Word and Markdown
-
Which pandoc option shows what the reader skipped?
--verbose, which named \maketitle, \centering, the tikzpicture and \bibliographystyle; the doubled words and the wrong reference compiled without a message.
From the lesson Converting between LaTeX, Typst, Word and Markdown
-
How does pandoc store maths and citations in a Word file?
Maths as OMML, Word's own maths markup, in m:oMath equations; --citeproc formats citations in the Chicago author-date style unless it is given another.
From the lesson Converting between LaTeX, Typst, Word and Markdown
-
How do you prove that a conversion lost nothing?
Count the parts on both sides, such as sections, equations and tables (with typst eval and query() for Typst), then compare the text of both PDFs until every difference left has a reason.
From the lesson Converting between LaTeX, Typst, Word and Markdown
-
What does arXiv do with the PDF of a LaTeX paper?
It typically rejects it: arXiv compiles the TeX source itself, with TeX Live 2025 by default or 2023 on request, and one processor for the whole submission.
From the lesson Submitting to arXiv and journals
-
Which processors does arXiv offer?
tex, pdftex, latex with dvips, pdflatex and xelatex. LuaLaTeX is not among them.
From the lesson Submitting to arXiv and journals
-
Where does arXiv compile a submission from?
Always from the root of the uploaded files, so a figure read from a folder above the paper, such as ../old-figures/sketch, fails there.
From the lesson Submitting to arXiv and journals
-
How do you list exactly the files an arXiv bundle needs?
Read the recorder's .fls file, which lists every file the run read (INPUT) and wrote (OUTPUT); keep the project files that were read and not written, plus the .bbl.
From the lesson Submitting to arXiv and journals
-
Why remove the comments from an arXiv bundle but keep their % signs?
Anyone can read the source and its comments, but a % at the end of a line also stops TeX from reading the line break as a space, so deleting the whole line can change the spacing.
From the lesson Submitting to arXiv and journals
-
What happens to hidden files in an arXiv submission?
They are deleted when the paper is announced, so a package that relies on them, such as minted, fails then.
From the lesson Submitting to arXiv and journals
-
Why did both figures of the two-column IEEE paper land on page 2?
A figure* goes to the top of a page after the one it is written on, and the figure after it waits behind it, because floats keep their order.
From the lesson Submitting to arXiv and journals
-
Which rules must a Typst paper's PDF meet for a PDF upload to arXiv?
One PDF with all text and figures, every font embedded as an outline font, not a bitmap, and no embedded JavaScript.
From the lesson Submitting to arXiv and journals
-
Which requirements decide for LaTeX by themselves?
A venue that builds LaTeX source or gives its own LaTeX class, a PDF that must meet PDF/UA-2 today, and a feature that exists only as a LaTeX package, such as a thesis class or a PGF/TikZ drawing.
From the lesson Choosing LaTeX or Typst, and migrating
-
Which two limits named in Typst's guide for LaTeX users can decide for LaTeX?
Its plotting ecosystem does not yet offer the breadth of PGF/TikZ, and a change of the page margins forces a page break, where LaTeX can change them anywhere.
From the lesson Choosing LaTeX or Typst, and migrating
-
Where did each system report the misspelt margins option?
Both LaTeX engines reported Package keyval Error: margins undefined inside geometry.sty, while Typst named margins.typ, line 2, column 23, and underlined the argument.
From the lesson Choosing LaTeX or Typst, and migrating
-
What is a migration audit?
A count, before converting, of the places pandoc drops or converts wrongly: the report had 23, 18 of them silent, which left an estimate of 15 fixes.
From the lesson Choosing LaTeX or Typst, and migrating
-
How was the report migrated so that the fixes could run again?
pandoc converted only the body, which a hand-written main.typ includes, and fixes.py applied the 15 fixes, so the whole migration can run again; then the section, equation, table and figure counts were the same on both sides.
From the lesson Choosing LaTeX or Typst, and migrating
-
What does a build catch in a suggested citation, and what not?
A key missing from the .bib file, which Typst stops on and latexmk prints as [?] with exit status 0, but not an invented work: look each DOI up through https://doi.org/ and check the record against the entry.
From the lesson Choosing LaTeX or Typst, and migrating
-
Which files of the report moved to Typst unchanged?
refs.bib, which Typst reads as BibLaTeX, data/rain.csv, which csv() reads, and the PNG charts; only the TikZ drawing had to be drawn again.
From the lesson Choosing LaTeX or Typst, and migrating
-
Why make a figure as both SVG and PDF from one source?
pdfLaTeX takes PDF figures but not SVG, and Typst cannot embed a PDF image in an export to PDF/UA-1 or another PDF standard, where it asks for SVG.
From the lesson Choosing LaTeX or Typst, and migrating
Back to the LaTeX & Typst (papers, theses, resumes and slides) track