SaTeX v0.2.7

Configuration

SaTeX merges satex.yaml layers, later ones winning:

  1. the built-in defaults (the file below),
  2. your global config (~/.config/satex/satex.yaml, %APPDATA%\satex\satex.yaml on Windows),
  3. every satex.yaml from the filesystem root down to the input file's directory,
  4. --config FILE,
  5. --set PATH=VALUE (repeatable, e.g. --set limits.memory=8GiB).

Mappings merge recursively. A list replaces the outer one unless its key ends in + (load.skip+: [extra]). A layer that does not fit the schema is skipped. --no-config ignores every file but keeps --set. satex --version lists the merged files.

Rule settings (lints, lint_off) belong to the lint rules. The lsp and completion keys belong to the language server. limits is explained below.

# yaml-language-server: $schema=https://raw.githubusercontent.com/EagleoutIce/satex-analyzer/main/satex.schema.json
# satex configuration. Merged from the global config, then every satex.yaml
# from the filesystem root down to the input file's directory, then --config PATH, then --set.
# `satex --version` can be used to list the files actually merged for a run.
# A line `#! affects:` names what a setting changes, `#! example:` shows it, `#! range:` bounds it.

load:  # which files the run follows from the document
  packages: true  # read the packages \usepackage loads. Off, their commands look undefined
    #! affects: precision, speed
    #! example: `\usepackage{amsmath} \[ \text{x} \]`
    #! example: off: `\text` is reported as undefined
  classes: true  # read the class \documentclass loads. Off, \section and friends look undefined
    #! affects: precision, speed
    #! example: `\documentclass{article} \section{Intro}`
    #! example: off: `\section` is reported as undefined
  inputs: true  # read the files \input and \include name. Off, their labels and definitions are missing
    #! affects: precision, speed
    #! example: `\input{chapter1} \ref{sec:one}`
    #! example: off: the label from `chapter1.tex` is reported as undefined
  format: true  # start from the installation's LaTeX format. Off, only TeX's primitives are known
    #! affects: precision, speed
    #! example: `\newcommand\x{1}`
    #! example: off: `\newcommand` is unknown
  skip: []  # packages to leave unread, their commands then look undefined
    #! affects: precision, speed
    #! example: `skip: [tikz]`
    #! example: no `\tikz` picture is followed
  expect: []  # classes and packages a package or class needs loaded before it, when you analyze that file alone
    #! affects: precision
    #! example: `expect: [beamer]`
    #! example: a beamer theme `.sty` then sees `\usebeamercolor` defined
  expect_detect: true  # guess those from what the installed packages define, and say which it picked
    #! affects: precision
    #! example: a `.sty` that uses `\setbeamercolor` gets beamer loaded first
  alone: article  # the class a package analyzed alone is loaded under. The file is read as a document loads it. Empty reads it by itself
    #! affects: soundness, precision
    #! example: `satex -f my.sty lint` runs `\documentclass{article}\usepackage{my}` and an empty body
    #! example: `alone: ''`: `\ProcessOptions` in `my.sty` runs outside any package, as nothing in LaTeX does
  build_files: false  # read the .aux, .toc, .bbl and others an earlier build left. Off, satex works them out itself
    #! affects: soundness, precision
    #! example: on: `\ref{x}` reads the number a stale `.aux` holds
    #! example: off: it reads what this run's own pass computes
  build_extensions: [aux, toc, lof, lot, loa, lol, out, bbl, bcf, run.xml, blg, glo, gls, glg, acn, acr, alg, ist, idx, ind, ilg, nlo, nls, slnc, brf, nav, snm, vrb, fls, fdb_latexmk, xdy, log]  # endings of files an earlier build left on disk. satex reads them only with build_files on. It tracks every file its own run writes, whatever the ending
    #! affects: soundness
    #! example: add mtc to treat minitoc's files as build output
search_paths: []  # folders searched for files before the installation
  #! affects: precision
  #! example: `search_paths: [styles]`
  #! example: `\usepackage{mystyle}` finds `styles/mystyle.sty`
paths:  # where kpathsea looks, used after the environment and the project's latexmkrc or Makefile
  texinputs: []  # extra folders for TeX files, as TEXINPUTS. A trailing // searches below too
    #! affects: precision
    #! example: `texinputs: [lib//]`
    #! example: `\input{macros}` finds `lib/common/macros.tex`
  bibinputs: []  # extra folders for .bib files, as BIBINPUTS
    #! affects: precision
    #! example: `bibinputs: [bib]`
    #! example: `\addbibresource{refs.bib}` finds `bib/refs.bib`
  bstinputs: []  # extra folders for .bst styles, as BSTINPUTS
    #! affects: precision
    #! example: `bstinputs: [bst]`
    #! example: `\bibliographystyle{mystyle}` finds `bst/mystyle.bst`
  tfmfonts: []  # extra folders for font metrics, as TFMFONTS
    #! affects: precision
    #! example: `tfmfonts: [fonts]`
    #! example: a local font's widths become known
  encfonts: []  # extra folders for font encodings, as ENCFONTS
    #! affects: precision
    #! example: `encfonts: [fonts]`
  output_directory: ''  # the build's -output-directory. Files the run writes are looked up there first
    #! affects: precision
    #! example: `output_directory: build`
    #! example: the `.aux` is read from `build/main.aux`
at_letter: false  # treat @ as a letter from the start, as .sty files do
  #! affects: precision
  #! example: on: `\@ifnextchar` reads as one name in a file without `\makeatletter`
lint_off: [analysis-imprecision, assertion-proved]  # rules that never report, by code or number
  #! affects: output
  #! example: `lint_off+: [unused-label]`
  #! example: unused labels are no longer reported
project:  # which files are the project's own, and which are someone else's
  frozen: []  # globs of files that are read and analyzed but get no findings and no fixes, relative to this file
    #! affects: output
    #! example: `frozen: ['vendor/**']`
    #! example: findings in `vendor/theme.sty` are not shown
  freeze_other_repositories: true  # files from another git repository (a submodule, a nested clone) count as frozen too
    #! affects: output
    #! example: a template submodule's files get no findings
  ignore_other_configs: false  # true: read only this satex.yaml, not the ones above it nor the global one
    #! affects: output
    #! example: a parent folder's lint_off no longer applies here
conventions:  # how TeX is usually written, where the text alone does not say
  internal: ['@', '^__', '_.*:']  # names matching these patterns count as internal: hidden in completion, private to lints
    #! affects: output
    #! example: add `'^my@'` to hide your package's helper macros
  definers: ['NewDocumentEnvironment', 'NewDocumentEnvironment end', 'RenewDocumentEnvironment', 'RenewDocumentEnvironment end', 'ProvideDocumentEnvironment', 'ProvideDocumentEnvironment end', 'DeclareDocumentEnvironment', 'DeclareDocumentEnvironment end']  # commands that define the name written after them, like \newcommand does, besides those the runs show (`X end`: also `end` + the name). Add your own
    #! affects: precision
    #! example: `definers: ['\defmacro']`
    #! example: `\defmacro\foo{...}` then counts as a definition of `\foo`
  math_symbols: {0: 'Γ', 1: 'Δ', 2: 'Θ', 3: 'Λ', 4: 'Ξ', 5: 'Π', 6: 'Σ', 7: 'Υ', 8: 'Φ', 9: 'Ψ', 10: 'Ω', 267: 'α', 268: 'β', 269: 'γ', 270: 'δ', 271: 'ϵ', 272: 'ζ', 273: 'η', 274: 'θ', 275: 'ι', 276: 'κ', 277: 'λ', 278: 'μ', 279: 'ν', 280: 'ξ', 281: 'π', 282: 'ρ', 283: 'σ', 284: 'τ', 285: 'υ', 286: 'ϕ', 287: 'χ', 288: 'ψ', 289: 'ω', 290: 'ε', 291: 'ϑ', 292: 'ϖ', 293: 'ϱ', 294: 'ς', 295: 'φ', 512: '−', 513: '·', 514: '×', 515: '∗', 516: '÷', 518: '±', 519: '∓', 520: '⊕', 521: '⊖', 522: '⊗', 523: '⊘', 524: '⊙', 526: '∘', 527: '•', 529: '≡', 530: '⊆', 531: '⊇', 532: '≤', 533: '≥', 536: '∼', 537: '≈', 538: '⊂', 539: '⊃', 540: '≪', 541: '≫', 544: '←', 545: '→', 546: '↑', 547: '↓', 548: '↔', 560: '′', 561: '∞', 562: '∈', 563: '∋', 564: '△', 568: '∀', 569: '∃', 570: '¬', 571: '∅', 576: 'ℵ', 577: '𝒜', 578: 'ℬ', 579: '𝒞', 580: '𝒟', 581: 'ℰ', 582: 'ℱ', 583: '𝒢', 584: 'ℋ', 585: 'ℐ', 586: '𝒥', 587: '𝒦', 588: 'ℒ', 589: 'ℳ', 590: '𝒩', 591: '𝒪', 592: '𝒫', 593: '𝒬', 594: 'ℛ', 595: '𝒮', 596: '𝒯', 597: '𝒰', 598: '𝒱', 599: '𝒲', 600: '𝒳', 601: '𝒴', 602: '𝒵', 603: '∪', 604: '∩', 606: '∧', 607: '∨', 614: '{', 615: '}', 616: '⟨', 617: '⟩', 618: '|', 619: '‖', 626: '∇', 840: '∮', 841: '∮', 842: '⨀', 843: '⨀', 844: '⨁', 845: '⨁', 846: '⨂', 847: '⨂', 848: '∑', 849: '∏', 850: '∫', 851: '⋃', 852: '⋂', 853: '⨄', 854: '⋀', 855: '⋁', 856: '∑', 857: '∏', 858: '∫', 859: '⋃', 860: '⋂', 861: '⨄', 862: '⋀', 863: '⋁', 864: '∐', 865: '∐'}  # what the typeset view shows for a math font slot, keyed family * 256 + slot (0 OT1, 1 OML, 2 OMS, 3 OMX)
    #! affects: output
    #! example: add a slot your math font draws differently
  signatures:  # what each letter after the : of an expl3 name says of its argument, offered when such a name is typed
    #! affects: output
    #! example: add a letter your own package uses in its names
    N: one token, usually a control sequence
    n: a braced token list, taken as it is
    V: the value of a variable, given by its name
    v: the value of a variable whose name is built as with \csname
    o: a token list expanded once
    e: 'a token list expanded fully, # kept'
    x: a token list expanded fully, as \edef does
    f: a token list expanded until the first unexpandable token
    c: a control sequence name, built as with \csname
    p: 'a parameter text, such as #1#2'
    T: code run when the test is true
    F: code run when the test is false
    w: an argument read to a delimiter of its own
    D: "do not use: a primitive's wrapper"
  ties:  # where a tie, ~, belongs and where no space may stand
    before: ['\ref', '\pageref', '\eqref', '\cite']  # commands a tie belongs in front of
      #! affects: output
      #! example: `before+: ['\autocite']`
      #! example: Section `\autocite{x}` then asks for `Section~\autocite{x}`
    naming: ['\cref', '\Cref', '\crefrange', '\Crefrange', '\cpageref', '\Cpageref', '\autoref', '\vref', '\Vref', '\vrefrange', '\nameref', '\Nameref', '\citeauthor', '\Citeauthor', '\textcite', '\Textcite', '\citetitle', '\Citetitle', '\citeyear', '\citedate', '\citet', '\Citet', '\citealt', '\Citealt', '\citealp', '\Citealp']  # references that set the name in front of the number themselves, so no tie goes before them
      #! affects: output
      #! example: `naming+: ['\zcref']`
    unspaced: ['\index']  # commands no space may stand in front of, beside \label
      #! affects: output
      #! example: `unspaced+: ['\glsadd']`
    footnote: ['\footnote', '\footnotemark']  # footnote commands, which no space may stand in front of either
      #! affects: output
      #! example: `footnote+: ['\tablefootnote']`
    hard: ['~', '\nobreakspace']  # what sets a hard space, so two in a row are reported
      #! affects: output
      #! example: `hard+: ['\nbsp']`
    abbreviations: []  # abbreviations whose period ends no sentence, whatever follows, so they want \ after them
      #! affects: output
      #! example: `abbreviations: [Dr., Fig., e.g., i.e.]`
      #! example: `Dr. Smith` then asks for `Dr.\ Smith`
  quotes:  # how quotation marks are written
    english: [english, american, USenglish, canadian, british, UKenglish, australian, newzealand]  # babel's names of the languages that quote with `` and ''
      #! affects: output
      #! example: `english+: [irish]`
    languages: [babel, polyglossia]  # packages that set the language in force
      #! affects: output
      #! example: `languages+: [translations]`
    ligature: 3  # quote characters in a row from which a thin space between them is advised
      #! affects: output
      #! example: `ligature: 4`
      #! range: 2..10
  lengths:  # how a written length looks where the text shows no convention of its own
    unit: cm  # the unit of a new TikZ coordinate, column width or margin: cm, mm, pt, in or bp
      #! affects: output
      #! example: `unit: mm`
    decimals: 1  # the decimals such a length is written with
      #! affects: output
  lines:  # how long a source line is
    length: 0  # where smart wrap breaks a typed line, in characters. 0 takes the document's own habit, else 80
      #! affects: output
      #! example: `length: 100`
  units:  # how a quantity is written with siunitx
    quantity: qty  # the command a quantity is written with
      #! affects: output
      #! example: `quantity: SI`
      #! example: `5 kg` then becomes `\SI{5}{\kilo\gram}`
    legacy: SI  # the older name of quantity, used where only it is defined
      #! affects: output
      #! example: `legacy: SI`
    # prefixes: {k: '\kilo', M: '\mega', da: '\deca', ...}  # SI prefixes with siunitx's macro for each, the SI brochure's table 7
      #! affects: output
      #! example: `prefixes: {k: '\kilo'}`
    # symbols: {m: '\metre', g: '\gram', Hz: '\hertz', ...}  # unit symbols with siunitx's macro for each, the SI brochure's tables 1 to 4
      #! affects: output
      #! example: `symbols: {m: '\metre', px: '\pixel'}`
    unprefixed: [min, h, d, ha, '%', °, °C]  # symbols no prefix may stand in front of
      #! affects: output
      #! example: `unprefixed+: [px]`
    plural: 3  # digits from which a number before s is a plural such as 1980s, not seconds
      #! affects: output
      #! example: `plural: 4`
      #! range: 1..10
  tables:  # how tables are read
    environments: {tabular: 0, tabular*: 1, tabularx: 1, longtable: 0, array: 0}  # environments read as tables, with the arguments before the column specification
      #! affects: output
      #! example: `environments: {tabular: 0, tblr: 0}`
    unit_length: 6  # longest unit after a number in a cell
      #! affects: output
      #! example: `unit_length: 3`
    numbers: 2  # numbers a column needs to count as a column of numbers
      #! affects: output
      #! example: `numbers: 3`
      #! range: 1..100
  math:  # how math is written
    tags: [notag, nonumber, tag]  # commands that say whether a display line is numbered
      #! affects: output
      #! example: `tags+: [mytag]`
    accents: [mathaccent, Umathaccent]  # commands that set a math accent
      #! affects: output
      #! example: `accents+: [widehat]`
    lexemes: 400000  # source tokens a file is read for when looking for math delimiters
      #! affects: output, speed
      #! example: `lexemes: 100000`
    near: 400  # tokens from a formula its delimiter is looked for
      #! affects: output
      #! example: `near: 100`
    after: 24  # characters past a display its sentence's punctuation is looked for
      #! affects: output
      #! example: `after: 8`
    inline: auto  # the inline math delimiters satex writes (a quick fix, a completion): \(, $, or auto, which takes $ without a LaTeX kernel or in a file that sets formulas with $ and never \(, else \(
      #! affects: output
      #! example: `inline: $`
  csname:  # commands that do a \csname's job, the first one defined is advised
    use: [csuse, '@nameuse']  # using a control sequence by name
      #! affects: output
      #! example: `use: ['@nameuse']`
    def: [csdef, '@namedef']  # defining one by name
      #! affects: output
      #! example: `def: ['@namedef']`
    gdef: [csgdef]  # defining one by name globally
      #! affects: output
      #! example: `gdef: [csgdef]`
    edef: [csedef]  # defining one by name with \edef
      #! affects: output
      #! example: `edef: [csedef]`
    xdef: [csxdef]  # defining one by name with \xdef
      #! affects: output
      #! example: `xdef: [csxdef]`
    let: [cslet]  # letting one named by text
      #! affects: output
      #! example: `let: [cslet]`
    let_to: [letcs]  # letting one to another named by text
      #! affects: output
      #! example: `let_to: [letcs]`
    test: [ifcsundef, '@ifundefined']  # testing whether one is undefined
      #! affects: output
      #! example: `test: ['@ifundefined']`
  fonts:  # how fonts are named
    roman: cmr  # the kernel's roman family, which a font package replaces
      #! affects: output
      #! example: `roman: lmr`
    slanted: [itdefault, sldefault]  # macros naming the shapes LaTeX gives a slanted face
      #! affects: output
      #! example: `slanted+: [scdefault]`
  writing:  # how the LaTeX a widget writes reads the document's own
    macros: false  # inserted text that is the whole body of your command without arguments is written as that command (\model for TinyNet) where the run typeset prose beside it: never in verbatim, math, a comment, a URL or an argument the run did not typeset. Assumes a call typesetting its argument's characters typesets the command the same
      #! affects: output
      #! example: `macros: true`: a sentence typed `we use TinyNet here` is written `we use \model{} here`
    repeat_min: 16  # characters a written call needs for a note when it then stands twice, offering to extract it
      #! affects: output
      #! example: `repeat_min: 8`: a second \textbf{Note} is noted too
  # alternatives: {hskip: '`\hspace`', vskip: '`\vspace`', ...}  # primitives LaTeX has a command for, with that command, as chktex's Primitives. latex_alternatives adds to it
    #! affects: output
    #! example: alternatives: {hskip: '`\hspace`'}
  completion:  # what completion offers and in which order
    shown: 300  # items one answer lists: commands, and packages, files, labels or citations found by what was typed. The editor asks again as more is typed
      #! affects: output, speed
      #! example: `shown: 50`
    signatures: 4  # items, best first, whose signature a probe reads where the listing has none
      #! affects: output, speed
      #! example: `signatures: 0`: only signatures the listing knows
    key_depth: 3  # levels below a key family that are listed, so a subkey is found by any part of its path
      #! affects: output
      #! example: `key_depth: 1`
    identified: 400  # installed files whose identification line is read for the list
      #! affects: output, speed
      #! example: `identified: 0` lists names only
    unloaded: 20  # names of packages not loaded yet one completion offers (\begin{tikzpic} offers tikzpicture), below those in scope, labelled with the package they add. Taking one loads the package
      #! affects: output, speed
      #! example: `unloaded: 0`: only names in scope
    unloaded_min: 3  # letters typed before names of packages not loaded are offered
      #! affects: output, speed
      #! example: `unloaded_min: 1`
    unloaded_seed: {tikzpicture: tikz, \tikz: tikz, \usetikzlibrary: tikz}  # names whose package the installation's index cannot tell (pgf defines with \def in a .code.tex file), commands with their backslash. Used only where the package is installed
      #! affects: output
      #! example: `unloaded_seed+: {\pgfplotsset: pgfplots}`
    math_depth: 2  # expansions a command's body is followed to find math-only material (\over, a \mathchardef), which ranks it first in math
      #! affects: output, speed
      #! example: `math_depth: 0`: only math characters and primitives count
    wrap_math: true  # a math-only command completed in text is set in math (math.inline), the caret inside
      #! affects: output
      #! example: `wrap_math: false`: the command is written as typed
    math_environments: [equation, align, gather, multline, flalign, alignat, eqnarray, math, displaymath, dmath]  # environments whose body is math (starred too): completion ranks math commands first there
      #! affects: output
      #! example: `math_environments+: [IEEEeqnarray]`
    calls: 4  # calls of a command its hover shows
      #! affects: output
      #! example: `calls: 10`
    body: 80  # characters of an undocumented body its hover shows as what the command expands to
      #! affects: output
      #! example: `body: 0` hides it
    common: [textbf, emph, textit, section, subsection, label, ref, cite, begin, end, item, includegraphics, caption, centering, usepackage, footnote, url, href, frac, sqrt, sum, int, alpha, beta, mathbf, mathrm, texttt, textsc, newcommand, hline, vspace, hspace, noindent, paragraph, chapter, subsubsection, eqref, cref, left, right]  # commands authors type most, most first: among names as close to what is typed and used as often in the document, these lead (\textb takes \textbf before \textbackslash)
      #! affects: output
      #! example: `common+: [SI]`
    pick: [begin, end, usepackage, documentclass, ref, cref, cite]  # commands whose argument is picked from a list, so completion opens again inside the braces
      #! affects: output
      #! example: `pick+: [autoref]`
    environment_arguments: {array: 1, minipage: 1, multicols: 1, tabular: 1, tabular*: 2, tabularx: 2, thebibliography: 1, wrapfigure: 2}  # environments whose \begin reads its arguments through an inner macro, with how many
      #! affects: output
      #! example: `environment_arguments: {tabular: 1, tblr: 1}`
    tiers:  # the rank of each kind of command, lowest listed first
      document: 0  # the project's own commands
        #! affects: output
        #! example: `document: 1`
      package: 1  # documented commands of packages and the kernel
        #! affects: output
        #! example: `package: 0`
      primitive: 2  # the engine's primitives
        #! affects: output
        #! example: `primitive: 3`
      internal: 3  # internal names
        #! affects: output
        #! example: `internal: 9`
lints:  # what a single rule reads, under its code
  unused-definition:
    report_public: true  # also report an unused command with a public name. Off for packages, whose commands are their interface
      #! affects: output
      #! example: `\newcommand\Hello{hi}` never used: reported only when on
    private: ['@', '__']  # patterns on the names that are private, which the rule reports also with report_public off
      #! affects: output
      #! example: in a package `\__my_helper:n` never used is reported, `\my_function:n` is its interface
    ignore: []  # patterns on command names the rule leaves alone
      #! affects: output
      #! example: `ignore: ['^todo']`
    pgf_keys: false  # also report a pgf key that is never used
      #! affects: output
      #! example: `\tikzset{mystyle/.style={red}}` never used: reported when on
  wrong-dash:  # how many hyphens belong in each place
    letters: [1, 3]  # allowed between letters, as chktex's HyphDash: a hyphen or an em-dash
      #! affects: output
      #! example: `well--known` is reported, `well-known` is not
    digits: [2]  # allowed between digits, as chktex's NumDash: an en-dash for a range
      #! affects: output
      #! example: pages `1-5` is reported, `1--5` is not
    words: [3, 2]  # allowed between spaces, as chktex's WordDash: an em-dash, or a spaced en-dash
      #! affects: output
      #! example: `a -- b` is fine with 2 in the list
    except: [Birch--Swinnerton-Dyer]  # spellings to leave alone, as chktex's DashExcpt
      #! affects: output
      #! example: `except: [Navier--Stokes]`
  user-pattern:  # your own text to report, as chktex's UserWarn and UserWarnRegex
    patterns: []  # literal text to report wherever the document has it
      #! affects: output
      #! example: `patterns: ['e.g. ']`
    regexes: []  # regular expressions to report the same way
      #! affects: output
      #! example: `regexes: ['\bvery\b']`
  comment-marker:
    markers: [TODO, FIXME, XXX, HACK]  # words in a comment that get a finding
      #! affects: output
      #! example: `% TODO cite this` gets a finding
  early:  # rules that need no run report on a sketch first, the run confirms or retracts
    enabled: true  # show these findings before the run ends
      #! affects: output
    inputs: [input, include, subfile]  # commands the sketch follows into the file they name
      #! affects: output
    verbatim: [verbatim, verbatim*, Verbatim, lstlisting, minted, comment]  # environments the sketch reads verbatim
      #! affects: output
    inline-verbatim: [verb, lstinline, mintinline]  # commands the sketch reads verbatim to their delimiter
      #! affects: output
    labels: [label]  # commands the sketch reads as defining a label
      #! affects: output
    references: [ref, eqref, pageref, autoref, nameref, cref, Cref, vref]  # commands it reads as referring to labels
      #! affects: output
    citations: [cite, citep, citet, parencite, textcite, autocite, footcite, nocite]  # commands it reads as citing keys
      #! affects: output
    bibliographies: [bibliography, addbibresource]  # commands it reads as naming .bib databases
      #! affects: output
    packages: [usepackage, RequirePackage]  # commands it reads as loading packages
      #! affects: output
    graphics: [includegraphics]  # commands it reads as including a graphic file
      #! affects: output
    graphic-extensions: [pdf, png, jpg, jpeg, mps, eps]  # extensions it tries for a graphic named without one
      #! affects: output
  build-cost:  # when the build is slow enough to suggest a format or \includeonly
    tokens: 2000000  # a part smaller than this reads in well under a second and is never suggested
      #! affects: output
      #! example: lower it to get preamble-cost on smaller preambles
    share: 0.5  # the share of the whole run the part must take
      #! affects: output
      #! range: 0..1
      #! example: `0.3`: a preamble taking a third of the run is reported
    characters: 500000  # text the body must set before \includeonly is suggested, about 200 pages
      #! affects: output
      #! example: a 50-page article never gets includeonly-available
  microtype-available:
    characters: 2500  # justified text the body must set before microtype is suggested, about a page
      #! affects: output
      #! example: a one-paragraph letter never gets microtype-available
  ellipsis-dots:
    center: '=+-<>'  # after or before these, an ellipsis should be \cdots, as chktex's CenterDots
      #! affects: output
      #! example: `$a_1 + \ldots + a_n$` is reported, `\cdots` is wanted
  table-rules:
    rows: 3  # rows with text, header included, before booktabs rules are suggested
      #! affects: output
      #! example: a two-row table with `\hline` gets no finding
  low-contrast-color:  # WCAG 2 contrast minimum of text against its background
    ratio: 4.5  # the contrast ratio text needs
      #! affects: output
      #! example: `7` asks for WCAG's enhanced contrast
    large-ratio: 3.0  # the ratio large text needs
      #! affects: output
    large: 18.0  # font size in points from which text is large
      #! affects: output
    large-bold: 14.0  # font size in points from which bold text is large
      #! affects: output
  indistinct-colors:  # colors used side by side that look alike with a color vision deficiency
    below: 15.0  # CIELAB distance under which two simulated colors look alike
      #! affects: output
      #! example: `20` also reports pairs that are only hard to tell apart
    apart: 30.0  # CIELAB distance from which two colors are meant to differ for normal vision
      #! affects: output
  spelled-out-macro:  # a word a command of the document sets, typed out by hand
    equivalence: glyphs  # when a typed word is the command's: exact, glyphs, case or letters
      #! affects: output
      #! example: `case` also reports `tinynet` for `\newcommand\model{TinyNet}`
    min-length: 3  # words shorter than this are left alone
      #! affects: output
  clones:  # blocks of the source that repeat with only their values changed
    enabled: true  # look for clones at all
      #! affects: output
    min_tokens: 40  # tokens a clone must share, its differing values not counted
      #! affects: output
      #! example: two copies of `\begin{itemize}\item A\end{itemize}` are too short
    min_lines: 1  # source lines a clone must span
      #! affects: output
    similarity: 0.85  # share of matching tokens two near-identical blocks need, 1 for values only
      #! affects: output
      #! range: 0..1
      #! example: a copy with one inserted line is found at 0.85, not at 0.95
    max_parameters: 9  # the most holes the macro a fix writes may take, as TeX allows
      #! affects: output
    max_value_share: 0.5  # share of a clone its differing values may take
      #! affects: output
      #! range: 0..1
      #! example: two paragraphs with only their text different are no clone
    ignore: []  # regexes on environment names whose bodies are never read for clones
      #! affects: output
      #! example: `ignore: ['tabular\*?']`
    scope: both  # where to look
      #! affects: output
      #! option: body: after \begin{document}
      #! option: preamble: before it, and the document's own packages
      #! option: both: everywhere
    min_occurrences: 2  # places a block must stand at
      #! affects: output
    seed: 8  # tokens of the window whose hash finds candidates
      #! affects: output, speed
    partners: 32  # later places with the same window one place is compared with
      #! affects: output, speed
  style-prompt:  # an editor asks whether a rule the project breaks often is its style
    enabled: true  # false: never ask
      #! affects: output
      #! example: `false`: no prompt, even for 100 findings of one rule
    min_findings: 10  # how many findings of one rule in your own files before the editor asks. Higher asks less often
      #! affects: output
      #! example: `3`: twelve `\hskip` already prompt to turn off primitive-tex-command
    categories: [style]  # rule categories the editor may ask about
      #! affects: output
      #! example: `categories: [style, performance]`
    keep: []  # rules the project keeps and is never asked about again
      #! affects: output
      #! example: `keep: [primitive-tex-command]`
# profile: package          # the kind of input whose defaults apply: document, package, class, literate or plain. Detected when unset
#! affects: output, precision
#! option: document: an ordinary LaTeX document, a .tex file with a body
#! option: package: a style file (.sty), analyzed as a package
#! option: class: a document class (.cls)
#! option: literate: a documented source (.dtx or .ins), read with its driver
#! option: plain: plain TeX, no LaTeX
#! example: `profile: package`
#! example: an unused public macro of your `.sty` is no longer reported

# Sensible defaults per kind of input, chosen automatically by the input's
# extension and, failing that, what it starts with (\ProvidesPackage,
# \documentclass, ...). --profile NAME or profile: above overrides the
# choice.  Each block is a partial config, merged over everything above.
# A profile can reuse another with a YAML anchor and `<<:` merge key
# instead of repeating its keys (`profiles.class: {<<: *library, ...}`).
profiles:  # the settings each kind of input (document, package, class, literate, plain) changes
  document: {}  # a LaTeX document: every default above already fits it
  package: &library  # a .sty, read as its own author sees it
    at_letter: true
    lints:
      unused-definition: {report_public: false}  # a public name is the package's own interface
      clones: {enabled: false}  # a macro in place of repeated library code changes when it expands
    # no document of its own to build or typeset. And a library programs in primitives, states
    # each package it needs and loads them for the macros its users call, and defines colors for them
    lint_off: [analysis-imprecision, unused-label, microtype-available, preamble-cost, comment-marker,
               primitive-tex-command, unused-package, redundant-package-load, unused-color,
               unintended-escape,
               user-pattern, unreferenced-numbered-display, build-shell-escape-missing,
               build-shell-escape-unneeded, build-engine-mismatch,
               build-bibliography-disabled, build-bibliography-unneeded,
               build-missing-custom-dependency, build-unused-custom-dependency,
               build-command-placeholders, build-engine-options]
  class:  # a .cls, the same defaults as a package
    <<: *library
  literate:  # a .dtx/.ins, unpacks to a package or class
    <<: *library
  plain:  # plain TeX: no LaTeX packages, classes or labels
    load: {packages: false, classes: false}
    lint_off: [analysis-imprecision, unused-label, microtype-available, hand-set-quantity]

# Detected when left out.
# engine: pdftex         # the engine whose primitives exist: tex, pdftex, luatex or xetex
#! affects: precision
#! example: `engine: luatex`
#! example: `\directlua` is known and `\pdfliteral` is not
# kernel: latex2e        # the format the engine starts with: latex2e, plain, context (experimental) or none
#! affects: precision, output
#! example: `kernel: plain`
#! example: `\count10=1` is plain TeX's way and gets no primitive-tex-command
#! plugin: format
# provider: texlive      # the TeX distribution: texlive, miktex or tectonic
#! affects: precision
#! example: `provider: miktex` looks files up the way MiKTeX does
#! plugin: provider
# platform: linux        # the operating system the build runs on: linux, macos or windows
#! affects: precision
#! example: `platform: windows`
#! example: `\input{Chapter}` also finds `chapter.tex`, as on a case-insensitive disk
#! plugin: platform
# output: pdf            # what the build produces: pdf, dvi, ps or html
#! affects: precision
#! example: `output: dvi`
#! example: `\includegraphics{fig}` looks for `fig.eps`, not `fig.pdf`
#! plugin: pdf
# texlive.root: /usr/local/texlive  # the folder that holds each year's TeX Live, used when kpsewhich cannot say where it is
#! affects: precision
#! example: `texlive.root: /opt/texlive`
#! plugin: provider
# texlive.year: 2026  # which year's TeX Live under texlive.root to read
#! affects: precision
#! example: `texlive.year: 2025`
#! plugin: provider

texmf:  # where a run looks for the installation besides texlive
  roots: []  # TeX trees to search instead of the ones kpsewhich names
    #! affects: precision
    #! example: `roots: [/opt/texlive/2026/texmf-dist]`
  kpsewhich: true  # may run kpsewhich to find the installation
    #! affects: precision, speed
    #! example: off: only roots and well-known install paths are searched
  fallback: true  # may look in well-known install paths when nothing else finds TeX
    #! affects: precision
    #! example: off: with no kpsewhich and no roots, no package is found

cache:  # the interpreted kernel and packages kept between runs
  enabled: true  # keep the interpreted kernel and packages between runs. Off, every run starts from scratch
    #! affects: speed
    #! example: off: each run reads `latex.ltx` again, seconds instead of milliseconds
  # dir: ~/.cache/satex     # where caches are kept. Unset: $SATEX_CACHE, else the platform's cache folder
    #! affects: speed
    #! example: `dir: /fast-disk/satex`
  tail: 256  # characters before a package's end where a run may resume from a saved state
    #! affects: speed, memory
    #! example: higher: more resume points, a larger cache
  document: true  # keep each document's whole analysis: an unchanged rerun executes nothing
    #! affects: speed
    #! example: off: every run reads the document again, its packages from their caches
  index:  # packages `satex cache build` prepares, or, when
                            # empty, whatever ordinary runs already found
                            # expensive to interpret (measured, not a hand-picked list)
    packages: []  # the packages satex cache build prepares. Empty: the ones runs found slow
      #! affects: speed
      #! example: `packages: [tikz, pgfplots]`
    common: [microtype, cleveref, zref-clever, savetrees, tabularray, xurl, glossaries,
      enumitem, nowidow, silence, adjustbox, pdfpages, pgfplotstable, memoize,
      classicthesis]  # prepared first while packages is empty, where installed
      #! affects: speed
      #! example: a first run with cleveref starts from its prepared cache
    engines: []  # engines to prepare for. Empty: the engine in use
      #! affects: speed
      #! option: tex: the original TeX engine, 8-bit input
      #! option: pdftex: pdfTeX, the default for LaTeX, 8-bit input
      #! option: luatex: LuaTeX, UTF-8 input and Lua
      #! option: xetex: XeTeX, UTF-8 input and system fonts
      #! example: `engines: [pdftex, luatex]`
    class: article  # the class the prepared packages are loaded after
      #! affects: speed
      #! example: `class: scrartcl` prepares caches that fit KOMA documents
    auto: true  # every run stores the packages it reads, so the next run starts faster
      #! affects: speed, memory
      #! example: off: only `satex cache build` fills the cache
    most_loaded: 200  # installed packages the background builder prepares, those most loaded first
      #! affects: speed
      #! example: lower: the background builder stops sooner and stores less
  # background: ask         # prepare kernels and packages in a background process: ask, yes or no.
                            # Only the user's own config sets it. Unset: ask once
    #! affects: speed
    #! option: ask: ask once, on the first run in a terminal or in the editor
    #! option: yes: prepare caches in a low-priority background process
    #! option: no: never
    #! example: `background: yes` starts `satex cache build --background` when caches are missing
# preload: preamble.tex     # a preamble the build dumps as its own format, as mylatexformat does.
#! plugin: preload
                            # A %& line or -fmt= in the build files names it otherwise
#! affects: precision
#! example: `preload: preamble.tex`
#! example: commands from `preamble.tex` are known before the document starts
# pretex: '\def\draft{}'   # TeX code read before the document, as latexmk -usepretex passes it
#! affects: precision
#! example: `pretex: '\def\draft{}'`
#! example: `\ifdefined\draft` is true in the document

opaque_conditionals: []  # conditionals to leave undecided, so both branches are checked
  #! affects: precision, output
  #! example: `opaque_conditionals: ['\ifdraft']`
  #! example: code in both `\ifdraft` branches gets findings
expand_in_reports: []  # macros to show expanded in reports
  #! affects: output
  #! example: `expand_in_reports: ['\today']`

# Primitives the primitive-tex-command rule reports, with what to suggest
# instead, an empty value suggests nothing.  Entries add to what it knows.
latex_alternatives: {}

gaps:  # what SaTeX could not follow, and how it reports that
  log: true  # write what a run could not follow to a file, for bug reports
    #! affects: output
    #! example: off: nothing is appended to `gaps.ndjson`
  report: true  # print what a run could not follow after its findings
    #! affects: output
    #! example: off: the "recognized gaps" lines are not printed
  # file: ~/.cache/satex/gaps.ndjson  # where gaps.log writes. Unset: the cache folder
    #! affects: output

analysis:  # where paths join, and what the run assumes
  join_paths_at:  # where all paths still apart are merged into one, reported as paths-joined-at
    #! affects: precision, speed
    #! example: `- hook: begindocument`
    #! example: paths still apart at `\begin{document}` merge there, so the body is read once
    - command: \document  # matched by meaning, however the run reaches it
    # `- hook: begindocument`  # an lthooks hook, when it is used
  assume_compiles: true  # assume the document compiles: drop a path where package code raises a TeX error. Your own errors are always kept
    #! affects: precision, soundness
    #! example: off: a path where `\ifx` went the impossible way inside a package stays, with its error
  assume_packages_close_groups: true  # assume a package closes every group it opens
    #! affects: precision, soundness
    #! example: off: a group a package leaves open is followed into the document
  assume_environment: true  # assume the build runs with this machine's environment variables
    #! affects: precision, soundness
    #! example: off: `\directlua{tex.print(os.getenv("HOME"))}` prints unknown text
  assume_forced_page_breaks: true  # assume pages break only where a penalty forces it
    #! affects: precision, soundness
    #! example: off: `\thepage` after a long paragraph may also be one more
  assume_page_one_arm: true  # assume a choice undecided while a page is made may take one arm: where floats and page parts land is not followed
    #! affects: precision, soundness, speed
    #! example: off: every `\ifdim` of a float's unknown height parts the output routine
  assume_messages_output_only: true  # assume wrapping a message for the terminal or log changes nothing but the text written
    #! affects: precision, soundness
    #! example: off: a message over unknown text is wrapped a path per way it may break into lines
  assume_unknown_char_catcode: true  # assume a \catcode of a character satex could not pin down never changes a structural one
    #! affects: precision, soundness
    #! example: off: `\catcode\count@=11` after a summarized loop may make `{` a letter, one path each way
  assume_call_learned_effect: true  # assume a call that keeps forking on unknown values leaves what other runs of its definition left, values widened to their type
    #! affects: precision, soundness, speed
    #! example: off: `\pgfmathparse{\the\wd0}` walks the printed width digit by digit
  assume_variable_kind_shape: true  # assume a widened expl3 variable holds a value of its kind (an fp stays an fp), as the module's functions write
    #! affects: precision, soundness
    #! example: off: an `fp` widened by a cut is any text, and `\fp_use:N` of it runs away

# shell_escape: restricted # which programs \write18 may run: none, restricted or full. Unset: what the build files ask for
#! affects: precision, soundness
#! example: `shell_escape: full`
#! example: `\write18{date > now.tex}` runs, so `\input{now}` reads its output
# Your own effect summaries, for a macro you do not want followed: none by
# default, SaTeX runs the real code. Each is said once per run as an `assumption`.
#! example: `stubs: { \includegraphics: { args: "som", result: box } }`
stubs: {}

interaction: nonstopmode  # the engine's -interaction: batchmode … errorstopmode
  #! affects: precision
  #! example: `\ifnum\interactionmode=0` is true under batchmode
clock: now  # sets the date \year, \month, \day, \time and \pdfcreationdate report: now, unknown, or an ISO date-time
  #! affects: precision
  #! example: `clock: 2026-09-29`
  #! example: `\today` is September 29, 2026

plugins:
  magic: true  # read % !TeX and % arara: lines
    #! affects: precision
    #! example: `% !TeX program = lualatex` makes the run use LuaTeX
    #! plugin: magic
  tools: true  # work out which tools the build runs: biber, makeindex and others
    #! affects: precision, output
    #! example: off: a `.bbl` biber would write is not computed
    #! plugin: tool
  preload: true  # honor %& lines and -fmt= in the build files
    #! affects: precision
    #! example: `%&mypreamble` reads mypreamble's dumped preamble first
    #! plugin: preload
  discovery: true  # walk the project for other files, skipping what .gitignore excludes
    #! affects: precision, speed
    #! example: off: an `\input` file is analyzed alone, without its root document
    #! plugin: discovery
  packages: false  # ask tlmgr which package ships a missing file. Needs the network
    #! affects: output, speed
    #! example: on: the missing-file finding says install the package mwe
    #! plugin: packages
  docs: true  # read the packages' manuals for what their commands do, in the background, for hovers
    #! affects: output, speed
    #! example: off: a hover says only what the run found
    #! plugin: docs
  augment: [siunitx]  # the packages whose knowledge the lint rules ask. Leave one out to switch it off
    #! affects: output
    #! example: without siunitx: an `S` column with mixed decimals is no longer judged
    #! plugin: augment

magic:  # which comments are magic
  arara: true  # read % arara: lines as the build's steps
    #! affects: precision
    #! example: off: `% arara: lualatex` no longer picks the engine, `% !TeX program` still does
    #! plugin: magic
  prefixes: ['!TeX', '!BIB']  # heads of key = value comments, matched ignoring case
    #! affects: precision
    #! example: `prefixes+: ['!SaTeX']`
    #! example: `% !SaTeX root = main.tex` names the root
    #! plugin: magic

depp:  # how the files a run reads map to TeX Live packages, for the dependency file depp writes
  rules: ['.+/tex/[^/]+/([^/]+)', '.+/fonts/.+/([^/]+)']  # patterns over a file's folder whose last group names its package, tried in order
    #! affects: output
    #! example: `rules+: ['.+/mytree/([^/]+)']`
    #! plugin: depp
  renames: {base: latex}  # folder names that are not their package's name
    #! affects: output
    #! example: `renames: {base: latex, graphics-def: graphics}`
    #! plugin: depp
  # file: deps.txt  # the dependency file, when depp's options name none
    #! affects: output
    #! example: `file: build/deps.txt`
    #! plugin: depp

bib:  # the bibliography as the build makes it
  backend: biber  # what makes a biblatex document's .bbl when neither its backend= option nor % !BIB program names one: biber or bibtex
    #! affects: precision
    #! example: `backend: bibtex`
    #! example: `\usepackage{biblatex}` then runs bibtex in the build, not biber
    #! plugin: bib
  early: true  # a build run makes the .bbl itself when it first looks for it, from what it cited so far: a bibliography after its citations settles a run sooner. Off, the bibliography tool runs between two runs only
    #! affects: speed
    #! example: off: `\cite{k}` before `\bibliography{refs}` finds its label in run 3, not run 2
    #! plugin: bib

lua:  # \directlua code, run by satex's own Lua 5.3 with no io, os or debug library
  run: true  # run the code. Off, every \directlua result is unknown
    #! affects: precision, speed
    #! example: off: `\directlua{tex.print("x")}` prints something unknown
    #! plugin: lua
  steps: 200000  # steps one run may take, 1000 Lua instructions each, beside what limits.steps leaves
    #! affects: precision, speed
    #! example: `steps: 1000` stops a long Lua loop early, its result unknown
    #! plugin: lua_run
  memory: 256MiB  # memory of the Lua state, at most a quarter of limits.memory. A file Lua reads is at most a quarter of it
    #! affects: precision, memory
    #! example: `memory: 64MiB`
    #! plugin: lua_run
  depth: 16  # how deep runs nest, as when Lua scans TeX that runs Lua again
    #! affects: precision
    #! example: `depth: 1`: Lua that calls `\directlua` again gets an unknown result
    #! plugin: lua_run
  modules: 8  # how deep modules may require each other
    #! affects: precision
    #! example: `modules: 2`: a third nested require gives an unknown module
    #! plugin: lua_run
  outcomes: 8  # runs one piece of Lua code gets at most when it tests unknown values: one per outcome of its tests
    #! affects: precision, speed
    #! example: `outcomes: 1`: `\directlua{if os.clock() > 1 then tex.print("a") end}` prints something unknown
    #! plugin: lua_run

compile:  # what satex compile runs and shows
  system: auto  # the build system: auto (arara directives, then Tectonic.toml, then latexmk, then the engine), latexmk, arara, tectonic, make, l3build, engine or satex (its own incremental build: a preamble format, reruns only while the build files move)
    #! affects: output
    #! example: `system: arara`: the `% arara:` directives of the main file build it
    #! example: `system: satex`: a body edit is one pdfTeX pass from the dumped preamble, an unchanged build none
  explain: true  # explain the build's messages by a full analysis. false explains by rule only
    #! affects: speed
  wait: false  # wait for the analysis that explains the build's messages. false: the build returns with the PDF, explained by rules and by what the last analysis said of the same messages, and a detached satex analyzes for the next call
    #! affects: speed
  passes: 4  # engine passes at most of the satex build, until the build files rest
    #! affects: output
  warm: true  # keep pdfTeX started on the next build's format (Linux), waiting on a named pipe under .satex-build that it reads in the main file's stead: the next build within the same clock minute feeds it and saves the engine's start. The engine ends with its minute. false starts none
    #! affects: speed
  timeout: 600  # seconds a build asked for by a page (satex gui, the playground's server) may run before the server stops it with every process it started. 0: no limit
    #! affects: speed
  clock: minute  # the clock a document may read: a satex build whose read files, searched directories and clock are as the last rested build left them runs no pass. minute (TeX's \time, sound) or day (assumes only \today reads it). A fixed clock (SOURCE_DATE_EPOCH with FORCE_SOURCE_DATE=1) never parts builds
    #! affects: speed
  memoize: true  # the satex build extracts memoize's externs itself between passes (memoize's TeX method, no shell escape, no Perl or Python module) and tells memoize not to. false: memoize extracts as the document says
    #! affects: speed
    #! example: an unchanged picture is included from its extern, its code not run again
  # viewer: none  # a PDF viewer `satex compile --view` opens: none or auto (the system's opener) or a program. Only your own config sets it
    #! affects: output

lsp:  # how satex lsp serves an editor
  host: 127.0.0.1  # the address --port listens on
    #! affects: output
  debounce_ms: 100  # how long to wait after an edit before analyzing again. Lower answers sooner but runs more often
    #! affects: speed
    #! example: `1000`: fast typing triggers one run per pause, not per keystroke
  pause_ms: 10  # how long a run goes on at most before it answers hover, completion and widgets from the last run. Lower answers sooner, the run takes a little longer
    #! affects: speed
    #! example: `50`: requests during a run wait up to 50 ms
  provisional: true  # a build run that another run follows publishes its findings at once, those a later run may change marked provisional (dimmed, "build run k"). The build's last run replaces them
    #! affects: speed
    #! example: `false`: a big document shows its findings only once the build's files are at rest
  provisional_after_ms: 2000  # only a run that took at least this long publishes provisional findings: a short build's final ones come soon anyway
    #! affects: speed
    #! example: `0`: every run of a build publishes its findings
  rows_per_message: 256  # the Typeset view's rows go out in messages of at most this many, each built, sent and dropped before the next: the server never holds a whole document's rows. 0 sends them in one message
    #! affects: memory, speed
    #! example: `64`: smaller messages, a big document's rows come in more steps
  # port: 2087  # a TCP port to serve on instead of stdio
    #! affects: output

l3build:  # how an l3build bundle's configuration is read (satex query type-plugins: category build)
  enabled: true  # read the bundle's build file for its module, files and engines
    #! affects: precision
    #! example: `enabled: false`: a bundle's sources are found only by discovery
    #! plugin: l3build
  files: [build.lua]  # the build files looked for, in this order, here and in the directories above
    #! affects: precision
    #! example: `files: [build-dev.lua, build.lua]`
    #! plugin: l3build
  config: []  # Lua files read after the build file, as l3build --config names them
    #! affects: precision
    #! example: `config: [config-plain.lua]`
    #! plugin: l3build
  # module: mypkg  # the module's name, instead of the build file's module
    #! affects: output
    #! plugin: l3build
  tests: ['*.lvt', '*.pvt']  # the regression tests in testfiledir, as patterns
    #! affects: precision
    #! plugin: l3build
  engines: []  # the engines that check, instead of the build file's checkengines
    #! affects: precision
    #! example: `engines: [pdftex, luatex]`
    #! plugin: l3build
  checks: false  # analyze the regression tests as documents of the bundle too
    #! affects: output, speed
    #! example: `checks: true`: each .lvt is a root document
    #! plugin: l3build

type_plugins:  # editor features by type, grouped by category: widget, hover, completion, lint, incremental (satex query type-plugins)
  color:  # color names and xcolor expressions
    #! category: widget
    enabled: true  # swatches, picker dialog, model conversions and color completion
      #! affects: output
      #! example: `enabled: false`: no color items, swatches or picker
    swatches: true  # a swatch next to each color a color command uses
      #! affects: output
    name: mycolor  # what a color the picker defines is called, numbered when taken
      #! affects: output
  environment:  # the name of a \begin or \end
    #! category: widget
    enabled: true  # "Change environment…": switch one occurrence, both ends and its arguments
      #! affects: output
  table:  # tables: environments whose code reaches \@array (tabular, tabular*, tabularx, array)
    #! category: widget
    enabled: true  # a code lens and hover link to the grid dialog, booktabs and siunitx rewrites
      #! affects: output
      #! example: `enabled: false`: no table lens, dialog or rewrites
  image:  # figures: the files \includegraphics reads
    #! category: widget
    enabled: true  # a code lens and hover link to the crop, rotate and size dialog, rotate and fit actions
      #! affects: output
      #! example: `enabled: false`: no image lens, dialog or actions
  float:  # floats: environments whose code reaches \@float (figure, table and the ones defined on them)
    #! category: widget
    enabled: true  # what each placement letter lets LaTeX do, their completion, a dialog of toggles
      #! affects: output
      #! example: `enabled: false`: no placement hover, completion or dialog
  tikz:  # a tikzpicture the run met, a blank line of the document body
    #! category: widget
    enabled: true  # "Edit drawing…": nodes and arrows on a canvas, Mermaid import and export
      #! affects: output
      #! example: `enabled: false`: no drawing lens, action or dialog
    grid: 0.5  # the grid in cm a dragged or added node snaps to
      #! affects: output
    spacing: 2.0  # the distance in cm between the ranks of an imported Mermaid flowchart
    relative: false  # write moved and new nodes relative to a neighbour (right=1cm of a), not at (x,y)
      #! affects: output
  savebox:  # a \begin name of a picture, listing or other environment the run met
    #! category: widget
    enabled: true  # "Store in a box": move it to the preamble as a saved box, refused where it reads its position
      #! affects: output
  history:  # a control sequence the run defined
    #! category: widget
    enabled: true  # its definition history: each redefinition and augment, newest first, \let copies linked, definitions on other paths
      #! affects: output
    entries: 50  # the events a history lists, newest first, and the calls of its final body it opens
      #! affects: output
      #! range: 1..10000
  glossary:  # declared keys: glossary entries, acronyms, abbreviations
    #! category: widget
    enabled: true  # a manager: search, edit fields, add like the document's own, delete or replace uses
      #! affects: output
  bibliography:  # citation keys and the .bib entries the run read
    #! category: widget
    enabled: true  # a manager: search by key, author, title, year, edit fields, add per entry type, delete unused
      #! affects: output
  index:  # index terms (\index{term!sub})
    #! category: widget
    enabled: true  # a manager: terms with subentries in sorted order, rename a term everywhere
      #! affects: output
  theorem:  # theorem-like environments the run defined
    #! category: widget
    enabled: true  # a manager: kinds with counters and styles, instances with labels and references, rename, numbering
      #! affects: output
  labels:  # every label the run met, from a reference's completion
    #! category: widget
    enabled: true  # "Browse all labels…": kind, number, caption or title, place and references. A choice writes the label
      #! affects: output
  page:  # the page geometry the run computed: \documentclass, geometry's calls and keys, a sectioning command, a blank line
    #! category: widget
    enabled: true  # "Page layout…": margins, paper, header and footer to scale, for the document or a part
      #! affects: output
      #! example: `enabled: false`: no page layout lens, link or dialog
  font:  # the document's font and base size: \documentclass
    #! category: widget
    enabled: true  # "Font and size…": the base size as a class option, a font as a package (pdfLaTeX) or with fontspec (LuaLaTeX, XeLaTeX)
      #! affects: output
      #! example: `enabled: false`: no font lens, action or dialog
    sizes: [10pt, 11pt, 12pt]  # the base sizes offered
      #! affects: output
      #! example: `sizes: [11pt, 12pt]`
    fonts: {EB Garamond: [ebgaramond, EB Garamond], Fira Sans: [FiraSans, Fira Sans, sans], Kp Fonts: [kpfonts, ''], Latin Modern: [lmodern, Latin Modern Roman], Libertinus: [libertinus, Libertinus Serif], Noto Serif: [noto-serif, Noto Serif], STIX Two: [stix2, STIX Two Text], Source Serif: [sourceserifpro, Source Serif Pro], TeX Gyre Heros: [tgheros, TeX Gyre Heros, sans], TeX Gyre Pagella: [tgpagella, TeX Gyre Pagella], TeX Gyre Termes: [tgtermes, TeX Gyre Termes], XCharter: [XCharter, XCharter]}  # the fonts offered: the package pdfLaTeX loads, the font fontspec names (empty: pdfLaTeX only), sans for a sans serif main font
      #! affects: output
      #! example: `fonts: {Charter: [XCharter, XCharter]}`
  tagging:  # PDF tagging: \DocumentMetadata
    #! category: widget
    enabled: true  # "Accessibility…": tagging, PDF standard, language and title, figures' alternative text, tables' header rows
      #! affects: output
      #! example: `enabled: false`: no accessibility lens or manager
  class:  # the class's options as its code declares them: \documentclass, the \usepackage of a style the project ships
    #! category: widget
    enabled: true  # "Class options…": every option the run read from the class, a template's common choices first, the header line to copy
      #! affects: output
      #! example: `enabled: false`: no class options lens or dialog
  forest:  # a forest environment the run met, a blank line of the document body
    #! category: widget
    enabled: true  # "Edit tree…": add, delete, rename and drag nodes, node and `for tree` options, indented outlines in
      #! affects: output
      #! example: `enabled: false`: no tree lens, action or dialog
  pretty:  # a definition's replacement text, as a hover shows it
    #! category: hover
    enabled: false  # one statement per line, groups and conditionals indented, long key lists one key per line. Off, a hover shows the body as TeX prints it
      #! affects: output
      #! example: `enabled: true`: the body pretty printed
    width: 60  # the characters a line holds before a statement or group breaks over lines
      #! affects: output
      #! range: 20..400
    lines: 4  # the lines a hover shows of a body before it stops, pretty printed or not
      #! affects: output
      #! range: 1..1000
  units:  # dimensions: `12pt`, `\textwidth`, a value range
    #! category: hover
    enabled: true  # hover in every unit (each value writes itself) and a converter dialog
      #! affects: output
      #! example: `enabled: false`: no conversions on a length
    units: [pt, mm, cm, in, bp]  # the units a hover shows and the conversions offered
      #! affects: output
      #! example: `units: [cm, mm]`
    decimals: 2  # decimals a converted length is written with
      #! affects: output
      #! range: 0..6
  overlay:  # an overlay specification, text a command reads between < and > (beamer's \only<2->)
    #! category: hover
    enabled: true  # the slides of the frame the material shows on, completion of the frame's steps
      #! affects: output
  keys:  # key lists: pgfkeys, l3keys, kvoptions and package options
    #! category: completion
    enabled: true  # completion and hover docs in key lists
      #! affects: output
      #! example: `enabled: false`: no key items or key hovers
    family_continue: true  # accepting a family (`/demo`) inserts `/demo/` and opens its keys
      #! affects: output
  comment_edit:  # an edit inside a comment every read of its line skipped, no %\satex@ directive or magic comment
    #! category: incremental
    enabled: true  # keep the last run instead of analyzing again, the rules still read the new text
      #! affects: speed
      #! example: `enabled: false`: typing in a comment runs the document again
  whitespace_edit:  # spaces added where every read skipped one, white space past the last line read
    #! category: incremental
    enabled: true  # keep the last run, its results moved along the line
      #! affects: speed
      #! example: `enabled: false`: indenting a line runs the document again
  typing:  # letters typed into a control word the run met undefined
    #! category: incremental
    enabled: true  # the last results stand, marked provisional, until typing pauses
      #! affects: speed
      #! example: `enabled: false`: each pause of the debounce runs the document again
    pause_ms: 1500  # how long typing pauses before the run follows
      #! affects: speed
      #! example: `3000`: a name typed slowly is run once
  frame:  # a beamer frame the run met
    #! category: build
    enabled: true  # "Compile only this frame": \includeonlyframes with the frame's label, one added when it has none
      #! affects: output

playground:  # what only the web playground reads
  lenses: false  # a button line above each table, figure and drawing besides the mark in the gutter
    #! affects: output
    #! example: `lenses: true`: "Edit image…" stands above each \includegraphics
  widget_marks: true  # a mark in the gutter on each line a widget edits: a table, a figure, a color
    #! affects: output
    #! example: `widget_marks: false`: the gutter shows line numbers and findings only
  theme: site  # the editor's colors
    #! option: site: as the site, light or dark
    #! option: light: always light
    #! option: dark: always dark
    #! affects: output
  font: ""  # the editor's font family, as CSS names it. Empty takes the site's monospace font
    #! affects: output
    #! example: `font: "JetBrains Mono, monospace"`
  font_size: 14  # the editor's font size in px
    #! affects: output
    #! example: `font_size: 16`
  wrap: false  # long lines go on below instead of scrolling sideways
    #! affects: output
  line_numbers: true  # line numbers in the editor's gutter
    #! affects: output
  check_delay: 400  # how long the analysis waits after the last key, in ms. A command still being typed waits at least 1.5 s
    #! affects: speed
    #! example: `check_delay: 1000`: fewer runs on a slow machine
  compile_after: 0  # how long the edits rest before a PDF build, in ms. 0 builds only on request. The Compile menu sets it too
    #! affects: output
    #! example: `compile_after: 1000`: the PDF follows a second after the edits rest
  compile_rest: 0  # with automatic compile on: how long the edits rest before a build on this machine's TeX (satex gui), in ms, waiting for neither the analysis nor compile_after. 0 waits for the analysis
    #! affects: speed
    #! example: `compile_rest: 60`: the PDF follows the keys, comment edits build too
  type_mode: true  # Type mode on in the Typeset view from the start: a click on a word puts the caret at its place in the source
    #! affects: output
  tint_macro: ""  # Type mode's tint of text a macro wrote, a CSS color. Empty takes the theme's violet
    #! affects: output
    #! example: `tint_macro: "#e11d48"`
  tint_argument: ""  # Type mode's tint of text from an argument, a CSS color. Empty takes the theme's cyan
    #! affects: output
  tint_moved: ""  # Type mode's tint of text written elsewhere, a CSS color. Empty takes the theme's amber
    #! affects: output
  complete_while_typing: true  # the completion list opens while typing. Off, only Ctrl+Space opens it
    #! affects: output
  typeset_layers: []  # the Typeset view's layers on at the start. A layer switched in the view stays as switched
    #! option: envs: environments
    #! option: keys: key-value options
    #! option: boxes: boxes
    #! option: glue: glue
    #! option: ligs: ligatures
    #! option: findings: findings
    #! option: maybe: what only some paths typeset
    #! affects: output
    #! example: `typeset_layers: [findings, maybe]`
  pdf_zoom: actual  # the PDF's zoom when no zoom was chosen before
    #! option: width: the page as wide as the pane
    #! option: page: the whole page in view
    #! option: actual: 100 %
    #! affects: output
  tips: true  # tips in the loading banners and the console bar
    #! affects: output
  math_inline: \(  # the inline math delimiters typing into the PDF or Typeset view writes: \( (LaTeX's), $, or auto (the document's most used)
    #! affects: output
    #! example: `math_inline: $` types `$x$`, `math_inline: auto` the document's most used
  smart_scripts: true  # typing `_` or `^` into math in the PDF or Typeset view opens a group a space or operator closes
    #! affects: output
    #! example: `x_42` types `x_{42}`
  smart_wrap: true  # a line typed past conventions.lines.length breaks at its best space: a sentence's end, after a closing brace, after a comma, else the last space
    #! affects: output

slice:  # what satex slice leaves out
  trim: true  # leave out the packages, libraries, labels and headings the criterion uses nothing of. Off also keeps what \begin{document} reads
    #! affects: output
    #! example: `trim: false`: the slice also keeps every package and what `\begin{document}` reads
  standalone: true  # make the slice one file that compiles in an empty directory. Local files it reads go in as filecontents, graphics as example-image of the same size
    #! affects: output
    #! example: `standalone: false`: `satex slice --out` also copies the local files the slice names

templates:  # where satex new and the New document dialog get the provider files the TeX installation lacks
  fetch: true  # fetch a template's files from its provider and an archive from its URL, over HTTPS. Off, only the cache and the TeX installation serve
    #! affects: output
    #! example: `fetch: false`: satex new uses the cached NeurIPS style and never goes online
  refresh_days: 7  # days a fetched template is used before it is fetched again. Offline the cached copy serves
    #! affects: output
    #! example: `refresh_days: 0` looks for a new release on every satex new
  timeout: 20  # seconds a download may take before it is given up
    #! affects: output
    #! example: `timeout: 5` gives up sooner on a slow network
  max_bytes: 50MiB  # the most an imported archive may unpack to
    #! affects: output
    #! example: `max_bytes: 200MiB` imports a repository with large figures
  max_files: 2000  # the most files an imported archive may hold
    #! affects: output
    #! example: `max_files: 10000` imports a large repository

updates:  # how satex updates learns the newest release of each package the document loads, and what changed in it
  fetch: false  # ask the index and the archives over HTTPS. Off, only the cache and file:// sources serve, and a package without a record is unknown
    #! affects: output
    #! example: `fetch: true`: satex updates asks CTAN for each package
  index: https://ctan.org/json/2.0/pkg/{name}  # the release record of package {name}, with its version number and date. A file:// path serves a local copy
    #! affects: output
    #! example: `index: file:///srv/ctan/json/{name}.json` reads a local mirror
  archives: ['https://mirrors.ctan.org/install{install}', 'https://mirrors.ctan.org{path}.zip']  # where a release's files come from, tried in order. {install} and {path} are the record's install and ctan.path. A zip, or a file:// folder
    #! affects: output
    #! example: `archives: ['file:///srv/ctan{path}']` reads releases from a local mirror
  changes: false  # run the newest release of each outdated package and list what it defines differently: commands, environments, options
    #! affects: output
    #! example: `changes: true`: an outdated enumitem lists its added, removed and changed commands
  refresh_days: 1  # days a fetched record counts as current. Past that a package is outdated or unknown, never current
    #! affects: output
    #! example: `refresh_days: 0` asks the index on every run
  timeout: 20  # seconds a download may take before it is given up
    #! affects: output
    #! example: `timeout: 5` gives up sooner on a slow network
  max_bytes: 50MiB  # the most a release archive may unpack to
    #! affects: output
    #! example: `max_bytes: 200MiB` takes a large bundle
  max_files: 5000  # the most files a release archive may hold
    #! affects: output
    #! example: `max_files: 20000` takes a large bundle

docs:  # where a package's documentation is looked for and which conventions of it are read
  source_root: source  # the folder of a TDS tree that holds the documented sources
    #! affects: output
    #! example: `source_root: src` looks in `texmf/src/latex/pkg`
    #! plugin: docs
  doc_root: doc  # the folder of a TDS tree that holds the manuals
    #! affects: output
    #! example: `doc_root: manuals`
    #! plugin: docs
  extensions: [dtx, tex, satex-docs]  # the extensions of the files mined
    #! affects: output
    #! example: `extensions: [dtx]`
    #! plugin: docs
  reads: ['\DocInput', '\DocInclude', '\input', '\include']  # the commands with which a manual reads another file, so its PDF documents that file too
    #! affects: output
    #! example: source2e reads `lterror.dtx`, so a hover on a kernel command links source2e
    #! plugin: docs
  depth: 3  # how deep those reads are followed
    #! affects: output, speed
    #! example: `1`: only the files a manual reads itself
    #! plugin: docs
  usage_lines: 12  # how many lines after a describe command its usage line may stand
    #! affects: output
    #! example: `12`: `\DescribeMacro{\x}` then `\x{arg}` within 12 lines gives the usage
    #! plugin: docs
  describe: [DescribeMacro, DescribeEnv, cmditem]  # the commands that announce the documentation of a command or environment, without the backslash
    #! affects: output
    #! example: `describe: [DescribeMacro]` mines no environments
    #! plugin: docs
  ltxdoc_environments: [macro]  # the ltxdoc environments that document a command's code
    #! affects: output
    #! example: `\begin{macro}{\x}` documents `\x`
    #! plugin: docs
  usage_environments: [command, environment, key, stylekey]  # the environments whose argument is a command or environment followed by its usage
    #! affects: output
    #! example: `\begin{command}{\logo\marg{text}}` documents `\logo`
    #! plugin: docs
  l3doc_environments: [function, variable]  # the l3doc environments that document a function or variable
    #! affects: output
    #! example: `\begin{function}{\tl_set:Nn}` documents `\tl_set:Nn`
    #! plugin: docs
  declare_environments: [declcs]  # the environments that declare a command by its name without the backslash, its arguments inside
    #! affects: output
    #! example: `\begin{declcs}{intcalcNum} \M{x}\end{declcs}` documents `\intcalcNum` (oberdiek's packages)
    #! plugin: docs
  named_environments: {docCommand: command, docEnvironment: environment, docKey: key}  # the environments that document one name and its usage in two groups, with what they document (command, environment or key)
    #! affects: output
    #! example: `\begin{docCommand}{tcbsettowidthofnode}{\marg{register}\marg{node}}` documents `\tcbsettowidthofnode` (tcolorbox's documentation library)
    #! plugin: docs
  usage_blocks: [desc]  # the environments whose body is a verbatim usage line, the prose after them
    #! affects: output
    #! example: `\begin{desc}|\titleformat{<command>}|\end{desc}` documents `\titleformat` (titlesec, enumitem)
    #! plugin: docs
  labels: [item, section, subsection, subsubsection]  # the headings and list items whose label is one command they document, without the backslash
    #! affects: output
    #! example: `\subsection{\cs{pdfpagewidth}}` in the pdfTeX manual documents `\pdfpagewidth`
    #! plugin: docs
  engine_manuals: [doc/pdftex/manual, doc/etex/base, doc/plain/texbytopic]  # the folders of the TeX installation that document its primitives, first first
    #! affects: output
    #! example: `[doc/plain/texbytopic]`: TeX by Topic's glossary only
    #! plugin: docs
  inline: false  # also read the package's own .sty comments for what its commands do. Not supported yet: it changes nothing
    #! affects: output
    #! plugin: docs

trace: false  # record every step of the run, for satex trace
  #! affects: speed, memory
  #! example: on: `satex trace` can step through the run
trace_state: false  # dev mode: each trace step carries the abstract state it ran in (paths, stacks, bindings)
  #! affects: speed, memory, output
  #! example: on: `satex trace --state --format json` shows why two paths stay apart
timings: false  # measure where the time goes
  #! affects: output
  #! example: on: the run reports how long each phase took
record_arguments: false  # keep the argument text of every call, for the options query
  #! affects: memory
  #! example: on: `satex query options --for tikzpicture` lists the keys used
arm_joins: true  # inside an \edef or \csname, merge both branches of an undecided \if where they meet. Off, the whole command runs once per branch
  #! affects: speed
  #! example: `\edef\x{\ifdraft a\else b\fi c}`: on, one run with a or b, off, two runs

# Limits: the termination argument. Reaching one stops that part of the run
# and records a diagnostic. Only choices, site_forks, digit_lengths, paths, meaning_splits, widen_after, recursion_depth,
# call_summary_after, meaning_set and value_set trade precision for time, the rest only stop a run.
limits:  # what bounds the analysis: reaching one stops that part of the run, so no input makes it loop
  memory: 8GiB  # most memory one run may use. It stops cleanly beyond it. 0 lifts the limit
    #! affects: memory
    #! example: `memory: 2GiB` stops a runaway run before it slows the machine
  checkpoint_memory: 1GiB  # most memory the saved states for reruns may copy together. Past it every other one goes. 0 = only their number bounds them
    #! affects: memory, speed
    #! example: `checkpoint_memory: 256MiB` for a long document on a small machine, reruns then resume further back
  checkpoint_steps: 8388608  # steps between two saved states at first. Past `checkpoints` of them every other one goes and the spacing doubles
    #! affects: memory, speed
    #! example: `checkpoint_steps: 1000000` saves states more often, so a rerun after an edit resumes closer to it
  checkpoints: 8  # how many saved states a run keeps for its reruns, besides the ones around the last edit and where the document begins
    #! affects: memory, speed
    #! example: `checkpoints: 32` on a machine with memory to spare, reruns then resume closer to the edit
  checkpoint_body_share: 8  # in the body a state is also saved between top-level lines after this fraction of `checkpoint_steps`
    #! affects: memory, speed
    #! example: `checkpoint_body_share: 64` saves a state every few paragraphs of a long document
  checkpoints_after_edit: 2  # after an edit's line one state is kept past each of this many pages shipped, where the next edit's run may meet this one
    #! affects: memory, speed
    #! example: `checkpoints_after_edit: 4` lets the run after a longer edit still meet the last one a few pages on
  checkpoint_meet_steps: 4194304  # after an edit far from every saved state the text before the edit is run again to save states around it. At most this many steps past the edit's line
    #! affects: speed
    #! example: `checkpoint_meet_steps: 0` never runs the old text again, the run after an edit then goes on to the document's end
  threads: 0  # threads for walking the project's files, 0 lets satex choose. The analysis itself uses one
    #! affects: speed
    #! example: `threads: 1` keeps the walk on one core
  cache_size: 2GiB  # most disk the caches may take, the least recently used go first. 0 for no bound
    #! affects: speed
    #! example: `cache_size: 500MiB` keeps fewer packages ready
  steps: 4000000000  # how many tokens the document may run through before the run stops. Raise it for huge documents
    #! affects: speed
    #! example: a 1000-page thesis with TikZ may need more
  probe_steps: 2000000  # tokens one trial run may read when a hover learns what a command does. Eight runs answer one question
    #! affects: speed, precision
    #! example: lower in a single-threaded host, where a trial blocks the next request
  provider_probes: 4  # packages a write may try, most loaded first, for a name it adds that the run lacks: each a small run of the call. 0 loads the most loaded untried
    #! affects: speed, precision
    #! example: `\includegraphics[width=5cm]` loads graphicx, whose definition takes the key, not graphics
  provider_steps: 100000000  # tokens one such run may read. Past them the package does not take the call. The same on every machine
    #! affects: speed, precision
  format_steps: 9000000000  # the same for reading the LaTeX format, which is cached after the first time
    #! affects: speed
    #! example: rarely needs a change
  file_depth: 64  # how deeply \input and \usepackage may nest
    #! affects: precision
    #! example: a file that inputs itself stops after 64 levels
  expansion_depth: 512  # how often a macro may call itself inside itself before its recursion is approximated
    #! affects: precision, speed
    #! example: `\def\a{\a\relax}` stops after 512 levels with a finding
  site_expansions: 16384  # how often one place may expand without reading further before it is given up
    #! affects: precision, speed
    #! example: a loop that never consumes input stops here
  line_steps: 500000000  # how long one source line may run before what it does is approximated and reading goes on. 0 = no limit
    #! affects: precision, speed
    #! example: a line whose `\foreach` runs forever is cut, and the next line is read
  text_line_steps: 0  # the same once the document's body has begun, where a line typesets rather than loads. 0 = as line_steps
    #! affects: precision, speed
    #! example: a `\clearpage` whose output routine forks without end is cut, and the next line is read
  output_forks: 0  # how many choices in output routines may part paths in a run before analysis.assume_page_one_arm applies
    #! affects: precision, speed
    #! example: 0: every float's `\ifdim` takes its first arm, 1000: a short paper stays exact
  call_rec_depth: 64  # how many nested calls are recorded to be learned from or summarized
    #! affects: precision, speed
    #! example: a call nested deeper is never summarized
  line_overruns: 16  # overruns of one line's budget before the run stops
    #! affects: precision, speed
    #! example: a line that stays stuck after this many cuts ends the run
  walk_per_step: 1  # map entries a join, compare or resume of waiting paths walks per step charged to the line, so line_steps also bounds that work
    #! affects: speed
    #! example: 100 paths waiting at one line are joined at a cost the line's budget sees
  walk_texts: 100000  # texts the walks inside one step may open (macro bodies, one-of members). Past them a walk reads the rest as unknown
    #! affects: precision, speed
    #! example: a text naming the one before it twenty times, eight deep, is not walked 20^8 times
  scan_site_factor: 16  # site_forks inside a value scan, as a factor: its arms join where the scan ends
    #! affects: precision, speed
    #! example: expl3's walker over an unknown file name widens instead of forking per token without end
  replay_steps: 50000  # how long satex may rerun a line the document wrote to a file, to learn the labels in it
    #! affects: precision, speed
    #! example: a huge `\write` to the `.aux` is read without its labels past this
  seconds: 600  # most seconds one run may take, a safety net. 0 for no limit
    #! affects: speed
    #! example: `seconds: 30` for an editor that should never wait long
  lock_seconds: 60  # how long a run waits for another one building the same cache before it builds it itself
  probe_seconds: 20  # most seconds one probe document may take (a package tried for a command the run lacks), a backstop past provider_steps. One it stops counts as untried and is tried again later. 0 = no limit
    #! affects: speed
  repeat_failures: 8  # how often satex may meet the same thing it cannot follow at one place before skipping that expansion
    #! affects: precision, speed
    #! example: a loop over an unsupported primitive stops after 8 rounds
  choices: 8  # how many undecided \if one command may split into paths. Past them its result is unknown text
    #! affects: precision, speed
    #! example: higher: `\ifdraft` inside a command with many `\if` is still followed both ways
  site_forks: 64  # how many paths one place in a line may start before its \if is approximated. 0 = never
    #! affects: precision, speed
    #! example: lower: a `\foreach` with unknown bounds finishes faster but knows less
  digit_lengths: 3  # how many digit counts a number of unknown digits is read apart into, one path each. Past them the longer counts are one path
    #! affects: precision, speed
    #! example: lower: `\int_rand:n {16777215}` read digit by digit forks less. Higher: pgfmath tells two from three digits
  parshape_lines: 64  # how many lines of a \parshape satex keeps. Lines past them are read but unknown
    #! affects: precision, memory
    #! example: higher: `\parshapelength 100` of a 200-line shape is known
  paths: 16  # how many alternative paths satex keeps at once before merging the oldest two. Higher is more precise and slower
    #! affects: precision, speed, memory
    #! example: `\ifdraft ... \fi` many times over: more paths keep each combination apart
  alike: 8  # how many paths at the same place may wait before their remaining input is merged into one. Higher is more precise and slower
    #! affects: precision, speed
    #! example: two paths at one `\fi` that only differ in a later word are merged sooner when lower
  heads_apart: 32  # how many versions of one loop satex keeps apart while they still differ in what they will run
    #! affects: precision, speed
    #! example: a `\loop` whose body depends on the round stays exact longer when higher
  meaning_splits: 4  # how often one command may split a run per meaning of a name that has several
    #! affects: precision, speed
    #! example: `\x` defined differently in two branches is followed per meaning up to this
  widen_after: 3  # how many rounds a loop is followed exactly before what still changes becomes a range
    #! affects: precision, speed
    #! example: `\loop\advance\c by1 ... \repeat` with unknown bound: c becomes a range after 3 rounds
  loop_entries: 256  # how often calls at one place may enter a loop afresh before it is summarized
    #! affects: precision, speed
    #! example: seven `\int_to_Hex:n` calls in one `\edef` stay exact
  build_runs: 5  # how many LaTeX runs satex simulates to settle .aux, .toc and the rest. 1 runs once with no earlier files
    #! affects: precision, speed
    #! example: `1`: `\ref` and `\tableofcontents` read nothing from an earlier run
    #! plugin: build
  build_widen_after: 2  # the build run after which a file whose lines a run changed again is read as the join of both texts. 1 widens what the second run changed: one run fewer, page numbers that moved are unknown digits
    #! affects: precision, speed
    #! example: `1`: a page number that run 2 moved is read as any digit in run 3, and the build ends there if run 3 writes one it covers
    #! plugin: build
  recursion_depth: 100  # how deep an undecided recursion is followed before it is assumed to end
    #! affects: precision, speed
    #! example: a macro that calls itself while an `\if` is unknown stops at 100 levels
  loop_heads: 512  # how many loops one run remembers. The oldest is forgotten first
    #! affects: precision, memory
    #! example: a document with thousands of `\foreach` loops may need more
  call_summary_after: 2  # after this many runs of one call, a call with unknown arguments reuses their result instead of running. 0 = never
    #! affects: precision, speed
    #! example: `\pgfmathparse{\x}` with unknown `\x` reuses what earlier calls did
  rest_splits: 8  # how often a macro peeling unknown text may split a rest it put back, before that rest holds no more delimiters
    #! affects: precision, speed
    #! example: kvsetkeys walking a key list of unknown text
  call_learn_after: 2  # after this many runs on different arguments, what a macro leaves is known to its calls that fork on unknown values. 0 = never
    #! affects: precision, speed
    #! example: two `\pgfmathparse` on numbers teach that `\pgfmathresult` holds a number
  call_learn_forks: 2  # how many undecided choices a call with a learned effect may meet before it ends with that effect
    #! affects: precision, speed
    #! example: 1 ends `\pgfmathparse{\the\wd0}` at its first undecided digit
  call_memo_steps: 200  # a call that ran this many steps cleanly keeps its effect. The same call reading the same values applies it. 0 = never
    #! affects: speed
    #! example: `\pgfmathparse{sin(30)*2}` met again costs one step
  call_memo_longest: 200000  # a run longer than this keeps no effect and stops being recorded, so its log costs nothing
    #! affects: speed
    #! example: a whole `tikzpicture` is not recorded, the point computations in it are
  write_log: 1048576  # writes logged since the last token read from a file before the log keeps one entry per name and group depth. A call or loop that began before reads as one that wrote any of them
    #! affects: memory, precision
    #! example: a `\foreach` that assigns for minutes holds a few MiB of log, not GiBs
  call_memo_probes: 8  # runs of a definition that may stay short or unclean before its calls are no longer recorded for call_memo_steps. Probed again after probes << n such calls (n: times it ran out)
    #! affects: speed
    #! example: 0 records every call, which costs on every call
  call_memo_variants: 4  # kept effects per code and arguments, one per state they met
    #! affects: speed
    #! example: `\pgfmathparse{\x+1}` for four values of `\x`
  call_memo_entries: 100000  # how many calls met once are remembered
  call_memo_bytes: 256MiB  # what the kept effects may hold in all. Past it they are dropped and kept anew
    #! affects: speed
    #! example: bounds the memory a long tikz document spends on them
  call_memo_verify: 0  # debug: a call a kept effect stands for runs for real instead, and where its run differs from the kept effect is printed
    #! affects: speed
    #! example: 1 prints `kept effect of \XC@info differs from its run` with the names that differ
  may_run_depth: 3  # how many macro levels deep satex follows code a join made unknown to find what it may assign
    #! affects: precision, speed
    #! example: `\def\a{\b}` reached in skipped code: what `\b` assigns is made unknown too
  cycle_after: 2  # how often one call may repeat exactly the same state before satex ends that endless loop. 0 = never
    #! affects: speed
    #! example: `\def\a{\a}\a` ends after 2 identical rounds
  meaning_set: 8  # how many possible meanings a name keeps after branches merge before it becomes unknown
    #! affects: precision, speed
    #! example: `\x` defined in 3 branches keeps all 3 meanings
  join_arms: 32  # how many merged branches remember which values belong together. 0 remembers none
    #! affects: precision, memory
    #! example: `\ifdraft\def\a{1}\def\b{1}\else\def\a{2}\def\b{2}\fi`: a and b stay paired
  join_names: 64  # how many names a merge keeps paired at most, the rest are merged on their own
  text_names: 64  # how many control sequences unknown text names (a widened float list keeps its boxes), past them any
    #! affects: precision, memory
    #! example: higher: more names keep their pairing after an `\if`
  value_set: 8  # how many exact values a number or length keeps after branches merge before only its range is kept
    #! affects: precision
    #! example: `\count0` is 1 or 5: kept as `{1, 5}`, not `1..5`
  interval_set: 4  # how many ranges a number keeps before they are merged into one
    #! affects: precision
    #! example: `{0..10, 100..120}` stays two ranges instead of `0..120`
  degrade_at_percent: 100  # past this share of steps, precision limits are halved so the run finishes. 100 = never
    #! affects: precision, speed
    #! range: 0..100
    #! example: `80`: a huge document finishes with fewer paths kept
  expansion_tokens: 1048576  # most tokens one expansion may produce
    #! affects: memory
    #! example: a runaway `\edef` stops here instead of filling memory
  conditional_tokens: 1048576  # most tokens read ahead to find the branches of an \ifcase
    #! affects: memory
    #! example: an `\ifcase` with a huge body is cut here
  held_tokens: 4000000  # most tokens waiting to be read at once
    #! affects: memory
    #! example: a macro that keeps pushing input stops here
  expansion_stack: 4000  # most macros, arguments and files open at once
    #! affects: memory
    #! example: deep recursion without tail calls stops here
  save_stack: 2000000  # most assignments one group may have to undo, about 200 MB
    #! affects: memory
    #! example: a group with millions of `\def` stops here
  vertices: 1000000  # most steps the dependency graph records. Past it the graph stops growing, the analysis goes on
    #! affects: memory, output
    #! example: satex slice on a long document sees only the first part
  facts: 2000000  # most definitions, uses and other facts recorded
    #! affects: memory, output
    #! example: queries miss facts past this on huge documents
  hyph_words: 50000  # most words whose hyphenation points a language's patterns keep once found (a paragraph is hyphenated twice, words recur)
    #! affects: memory
    #! example: `hyph_words: 0` finds every word's points anew
  list_items: 8388608  # most items of the lists the run records to break lines and set boxes (a paragraph's characters, glue and boxes). Equal lists share theirs. Past it a list is not recorded. Past half of it a run after an edit keeps its own numbering, so it cannot take the last run's rest and runs to the document's end
    #! affects: memory, speed, output
    #! example: a book of 1000 pages of prose records about 2 million items: with `list_items: 2097152` every edit in it runs to the end
  paragraph_items: 4000  # most items of one recorded list (a paragraph's characters, glue and boxes, a box, the page's marks). Past it that list is not recorded and its lines and size stay unknown
    #! affects: speed, output
    #! example: a paragraph of 800 words is about 5000 items: with the default its line breaks stay unknown
  nesting: 300  # how deeply steps nest inside scans, and quantities inside quantities (`\numexpr(\numexpr(…`), before the nesting is widened. The stack bounds it too
    #! affects: output
    #! example: `nesting: 1000` follows deeper nesting where the stack allows it
  probe_contexts: 4  # environments a completion's probe tries a command in when alone it raises an error before reading its arguments (`\caption` outside a float). Editor only
    #! affects: output, speed
    #! example: `probe_contexts: 0` leaves `\caption` without a completion shape
  table_reach: 4000  # most macros the table widget follows through the run's calls from an environment to the code that splits its body at `&` (tabularray)
    #! affects: output
    #! example: `table_reach: 0` offers the table dialog on array tables only
  trace: 200000  # most events satex trace records
    #! affects: memory, output
    #! example: a trace of a long run shows only its start
  trace_state: 32  # most entries each list of a dev-mode step state holds (bindings, stacks, catcodes)
    #! affects: memory, output
    #! example: 8 keeps a long dev-mode trace small

Plugins

A plugin picks a default from the machine, the installation and the build files. satex.yaml can override each. satex query plugins -f FILE shows what was chosen and why (queries).

Plugin Values Detected from
provider texlive, miktex, tectonic the locator on PATH (kpsewhich, tectonic), else well-known install paths. texmf.kpsewhich: false and texmf.fallback: false make the machine look TeX-less (no-format, initex).
platform linux, macos, windows the build target
engine tex, pdftex, luatex, or xetex latexmkrc ($pdf_mode), % !TeX program
kernel latex2e, plain, context, or none latex2e default, ConTeXt from % !TeX program = context or \starttext
output pdf, dvi, ps, or html $pdf_mode, decides what \includegraphics resolves to
build system latexmk, make, tectonic, or arara the build file beside the document
tools biber, bibtex, makeindex, xindy, makeglossaries, … the commands the document uses (plugins.tools)
magic % !TeX, % !BIB, % arara: the leading comment block, only narrows a default
discovery root candidates, own classes and packages, build files, bibliographies a scan like git's (.gitignore respected)

Format and package caches

The interpreted kernel is cached after the first run (satex cache, satex cache build, satex cache clear, see the command line page).

A package is cached per read set: the meanings, registers, hooks, options and catcodes it consulted, with the values seen. Its effect (bindings, hooks, facts, diagnostics) is replayed in any later run that agrees with the read set. Register allocations are renumbered on replay.

A document cache keeps a run's whole analysis, one file per document (cache.document, on by default). A run of the edited text, or under other settings, replaces it. satex cache show document lists the documents with size and age.

cache:
  index:
    packages: [tikz, pgfplots, xcolor, hyperref, xparse, forest]  # what cache build prepares
    engines: [pdftex, luatex]   # empty: the engine in effect
    class: article              # the class the packages load after
    auto: true                  # every run stores what it reads
    most_loaded: 200            # installed packages the background builder adds
  background: ask               # ask | yes | no: prepare caches in the background

Profiles

A profile is a partial config chosen by the input's kind. A .sty is read as its author sees it: @ a letter, no \documentclass, no document-only lints.

Profile Chosen for
package .sty, a .dtx without \ProvidesClass, or a file starting with \ProvidesPackage
class .cls, a .dtx with \ProvidesClass
literate .ins
document \documentclass anywhere
plain none of the above

--profile NAME or profile: forces one. It merges after the discovered layers and before --config/--set.

profile: package            # forces one. --profile wins
profiles:
  package:
    at_letter: true
    lints: {unused-definition: {report_public: false}}
    lint_off: [unused-label, microtype-available, build-engine-mismatch]

project.frozen (default []): Globs of files satex still reads and analyzes, so their macros, counters and labels count, but reports nothing in and offers no fixes for, such as ["_config/**", "*.cls"]. Each glob is relative to the satex.yaml that sets it, and * crosses directories.

project.freeze_other_repositories (default true): Whether the files of every git repository other than the main file's, such as a submodule or a nested clone, are frozen too. A file belongs to the repository of its nearest directory with a .git in it. Such code is someone else's, and the document only uses it.

project.ignore_other_configs (default false): Whether the satex.yaml files above this one and the global one are ignored, like root = true in .editorconfig. --config and --set still apply.

project.root: The root document, relative to the project directory: what a run starts from when none is named, over a % !TeX root line and every guess.

A rule's own settings live under lints.⟨code⟩. Lint rules lists the rules, and lint_off turns one off.

lints.unused-definition.report_public (default true): Whether the rule also reports a name that is not private. The package and class profiles turn it off, since such a name is the package's public interface, and the caller, not this run, is the one to use it.

lints.unused-definition.private (default [@, __]): Regexes on the name (no backslash) of what is private: an @ (source2e classes.dtx), expl3's __ (interface3, "The naming scheme": \__module_function:n, \l__module_name_tl). A public expl3 function (\module_function:n) is other packages' interface.

lints.unused-definition.ignore (default []): Regexes on the name as written (\\my@hook). A match is never reported.

lints.unused-definition.pgf_keys (default false): Whether the rule also reports a pgf key nothing uses. Off by default, since the user sets keys.

lints.wrong-dash.letters (default [1, 3]): How many hyphens in a row belong between letters, as chktex's HyphDash. The first entry is what a fix writes.

lints.wrong-dash.digits (default [2]): How many belong between numbers, as chktex's NumDash. Hyphens inside an identifier such as an ISBN or a date (another hyphen, a letter or a / in the same word) are left alone.

lints.wrong-dash.words (default [3, 2]): How many belong between spaces, as chktex's WordDash. Two is Bringhurst's spaced en-dash.

lints.wrong-dash.except (default [Birch--Swinnerton-Dyer]): Whole spellings to leave alone, as chktex's DashExcpt.

lints.user-pattern.patterns (default []): Literal strings reported wherever the document's own text has them, as chktex's UserWarn.

lints.user-pattern.regexes (default []): Regular expressions reported the same way, as chktex's UserWarnRegex.

lints.comment-marker.markers (default [TODO, FIXME, XXX, HACK]): The markers in a comment worth a finding. This is satex's reading of chktex's warning 22, which prints every comment.

lints.early.enabled (default true): Whether satex lint and the editor show these findings before the run ends.

lints.early.inputs (default [input, include, subfile]): Commands, without the backslash, assumed to read the file their braced argument names.

lints.early.verbatim (default [verbatim, verbatim*, Verbatim, lstlisting, minted, comment]): Environments assumed to read their bodies verbatim.

lints.early.inline_verbatim: Commands assumed to read verbatim up to their delimiter, as \verb does.

lints.early.labels (default [label]): Commands assumed to define the label their argument names.

lints.early.references (default [ref, eqref, pageref, autoref, nameref, cref, Cref, vref]): Commands assumed to refer to the labels their argument lists.

lints.early.citations (default [cite, citep, citet, parencite, textcite, autocite, footcite, nocite]): Commands assumed to cite the bibliography keys their argument lists.

lints.early.bibliographies (default [bibliography, addbibresource]): Commands assumed to name the bibliography databases their argument lists.

lints.early.packages (default [usepackage, RequirePackage]): Commands assumed to load the packages their argument lists, options in brackets before it.

lints.early.graphics (default [includegraphics]): Commands assumed to include the graphic file their argument names, as graphicx's.

lints.early.graphic_extensions: The extensions graphics tries for a name given without one, as \Gin@extensions lists them.

lints.clones.enabled (default true): Whether the rule looks for clones at all.

lints.clones.min_tokens (default 40): Tokens a clone must share, its differing values not counted.

lints.clones.min_lines (default 1): Source lines a clone must span.

lints.clones.similarity (default 0.85): The share of matching tokens two near-identical blocks need. 1 finds only blocks that differ in their values.

lints.clones.max_parameters (default 9): The most holes a macro the fix writes may take. TeX allows 9.

lints.clones.max_value_share (default 0.5): The share of a clone its differing values may take, so paragraphs and lists of items are no clones.

lints.clones.ignore (default []): Regexes on environment names whose bodies are never read for clones.

lints.clones.scope (default both): Where to look: body, preamble or both.

lints.clones.min_occurrences (default 2): How many places a block must stand at.

lints.clones.seed (default 8): Tokens of a window whose hash finds candidates: smaller finds shorter clones.

lints.clones.partners (default 32): How many later places with the same window one place is compared with.

lints.clones.min_saved (default 20): Characters a macro must save to be worth it: the shared text each further place drops, less parameter-cost per argument at every call.

lints.clones.parameter_cost (default 12): Characters one argument costs at a call: its braces, its value's reading, the reader's lookup of what it means.

Search paths

TEXINPUTS and BIBINPUTS (plus BSTINPUTS, TFMFONTS, ENCFONTS, passed on to kpsewhich) come from, first wins: the environment, the latexmkrc (ensure_path, $ENV{…}), the Makefile (export, inline), then paths.* in satex.yaml. kpathsea syntax applies (:, //, an empty component for the default). Relative entries resolve against the build's directory. satex --version shows each value and its source.

Output directory. With $aux_dir/$out_dir, -outdir= or paths.output_directory, relative names open there first (web2c open_input), so build/main.aux is read, not a stale copy.

The clock

clock sets \year, \month, \day, \time and \pdfcreationdate (tex.web § 241).

Value Meaning
now (default) the analysis time, reported once as clock-assumed
2026-09-29, 2026-09-29T14:30+02:00 a pinned date
unknown every digit unknown: date-dependent code is analyzed for every outcome

A package reads the same clock as the document, as in a TeX job. A package cache is a function of what its load found, the clock and the job name among it:

One cache file serves every date and every job name. Document caches are kept per setting.

Where paths join

Undecided tests part the run into paths (Domains). They join where they stand alike, and at the points analysis.join_paths_at names.

analysis:
  join_paths_at:
    - command: \document
    - hook: begindocument

analysis.join_paths_at (default [{command: \document}]): Places where all paths still apart are merged into one. A command matches by meaning, so \document merges at \begin{document} however the run gets there. A hook is an lthooks name. Values the paths disagree on are merged, no path is dropped, and each merge is reported once as paths-joined-at.

analysis.assume_compiles (default true): Assumes the document compiles. A path where a package or the kernel raises a certain TeX error cannot be a real run, so it is dropped. Errors in your own text are always kept and reported. Each drop is reported once as an assumption, the last path is never dropped, and false keeps every path.

analysis.assume_packages_close_groups (default true): Assumes a package closes every group it opens, so paths that differ only in open groups merge. false keeps them apart.

analysis.assume_environment (default true): Assumes the build sees this machine's environment variables, as Lua's os.getenv reads them. false makes every variable unknown.

analysis.assume_forced_page_breaks (default true): Assumes pages break only where something forces it (\clearpage, \newpage, \end). false also follows a page break wherever the page may have filled, one path each way.

analysis.assume_page_one_arm (default true): A choice undecided while a page is made takes one arm ([crate::analysis::machine::Machine]'s page_arm).

analysis.assume_messages_output_only (default true): Assumes formatting a message for the terminal or log (expl3's \iow_wrap:nnnN) changes nothing but the text it writes. A message over unknown text then writes unknown text, on one path, reported as an assumption. false wraps it for real, a path per way it may wrap.

analysis.assume_unknown_char_catcode (default true): Assumes a \catcode through a character satex could not pin down (a summarized loop's counter) never names a structural character, one of category neither letter nor other (\ { } % $ & # ^ _, space, end of line, active). Reported as unknown-char-catcode. false lets it reach them: the reader splits a path per category.

analysis.assume_call_learned_effect (default true): Assumes a call whose run keeps forking on unknown values leaves what runs of its definition on other values left, each value widened to its type, and raises nothing. Reported as call-learned-effect. false walks every such call.

analysis.assume_variable_kind_shape (default true): Assumes a widened expl3 variable (\l_x_fp) holds a value of its kind: the ends its kind's constants share stay around typed text. Reported as variable-kind-shape. false widens it to any text.

Stubs

Stubs are a temporary exception. The goal is none. A stub stands in for a macro SaTeX cannot yet run. Each use is an assumption.

stubs:
  \includegraphics: { args: "som", result: box }
  \xinttheexpr: { until: \relax, result: { text: number } }

args: s star, o optional, m mandatory, or until a delimiter. result is an element of the unknown-text lattice: nothing, number / { number: [lo, hi] }, dimen, text / { text: digits | number | dimension | cs-free | any }, box / { box: { width, height, depth } }. sets names what it assigns (sets: { \pgfmathresult: number }). A document that redefines the name gets its own definition.

Configurable limits for the analysis

Key Default Effect
limits.memory 8GiB stops the run with budget-exhausted (--max-memory), library users get no limit
limits.checkpoint_memory 1GiB what the saved states for reruns may copy together, past it every other one goes. Results stay the same, reruns resume further back
limits.checkpoint_steps 8388608 steps between two saved states at first. Past limits.checkpoints of them every other one goes and the spacing doubles
limits.checkpoints 8 saved states a run keeps for its reruns, besides the ones around the last edit and where the document begins
limits.checkpoint_body_share 8 in the body a state is also saved between top-level lines after this fraction of limits.checkpoint_steps
limits.checkpoints_after_edit 2 states kept on the first lines past an edit and past the next pages shipped, where the next edit's run may meet this one
limits.checkpoint_meet_steps 4194304 after an edit far from every saved state the old text is run again to save states around it, at most this many steps past the edit. 0 never does
limits.seconds 300 stops the run, lints after it share the same budget
limits.degrade_at_percent 100 (off) past that share of limits.steps, halves the time-only limits, reported as precision-degraded
limits.threads 0 (min(4, cores)) file scans only, the interpreter is one thread

--max-steps, --max-memory and --threads set the first, second and last for one run. Steps are counted alike on every machine, so results never depend on speed. Seconds and memory only stop a run. The installation's answers (kpsewhich --expand-var, engine version) are cached against the program's path and timestamp.