class

Pomtex::Engine::RuntimeGuard

Inherits Reference < Object

Constants

BABEL_LANGUAGE = /Package babel Error: Unknown option [`'"]([A-Za-z]+)'/
CANT_FIND_FILE = /I can't find file [`'"]([^'"`]+)'/
FONTSPEC_FONT = /The font "([^"]+)" cannot be found/
MISSING_ENC = /\(file ([^()\s]+\.enc)\): cannot open encoding file/
MISSING_FILE = /LaTeX Error: File [`'"]([^'"`]+)' not found/
MISSING_MAP = /\(file ([^()\s]+\.map)\)/
MISSING_TFM = /Font \\?[^=\s]+=([A-Za-z0-9_\-]+)(?:\s+at\s+[\d.]+pt)?\s+not loadable: Metric \(TFM\) file/
MISSING_TYPE1 = /\(file ([^()\s]+\.pf[ab])\): cannot open Type 1 font file/
MKTEXTFM = /kpathsea: Running mktextfm ([A-Za-z0-9_\-]+)/
PK_FONT = /\(file [^()\s]+\): Font ([A-Za-z0-9_\-]+) at \d+ not found/

No map entry and no PK bitmap: pdfTeX gave up on the font entirely.

RERUN = /Rerun to get|Label\(s\) may have changed|Please \(?re\)?run LaTeX|\(rerunfilecheck\).*Rerun|Please rerun/

Constructors

Class methods

error_excerpt(log : String, lines : Int32 = 12) : String

The first error and its context, for display after a failed run.

Source
font_command(sources : Enumerable(String), name : String) : String

The command in the user's sources that asked for the font. The log can't tell: fontspec loads fonts at \begin{document}.

Source
missing_from_log(log : String) : Array(Missing)

Extracts everything the log says is missing. Exposed for testing.

Source
rerun_needed?(log : String) : Bool
Source
type1_file(font : String, map : String) : String | Nil

The Type 1 file a font map assigns to font (ptmr8r Times-Roman "..." <8r.enc <utmr8a.pfb).

Source

Instance methods

compile(runner : Runner, scan : Seed::ScanResult | Nil = nil, stream : Bool = false) : Runner::Result

Compiles runner's document. Returns the final result (successful or not).

The whole compile holds a shared cache lock, so pomtex clean in another terminal cannot remove files mid-build; fetches upgrade it to exclusive.

Source
environment
Source
fetch(plan : Array(Seed::Package)) : Int32
Source
font_hints(log : String, sources : Array(Path)) : Nil

fontspec selects fonts by family name, which can differ from the file name pomtex resolved: "Inconsolata" lives in Inconsolatazi4-Regular.otf, whose family is "Inconsolatazi4". Name the families that do exist.

Source
jobs
Source
jobs=(jobs : Int32)
Source
offline
Source
offline=(offline : Bool)
Source
plan(roots : Array(String), env : Hash(String, String) = environment) : Array(Seed::Package)

Roots are known missing; dependencies are probed by kpathsea, layer by layer.

Source
prepare(scan : Seed::ScanResult) : Int32

Provisions what the document asks for, then follows the load graph through the arils pomtex planted: their own \RequirePackage, \input, \tcbuselibrary, ... are fetched in batches before the first engine run. TeX Live's dependency metadata misses these (e.g. tcolorbox's skins library needs tikzfill), and with -halt-on-error each one would otherwise cost a full compile.

Only aril files are scanned: the rind and system TeX ship complete dependency sets, and following their conditional loads would over-fetch.

Source
provision(files : Enumerable(String), fonts : Enumerable(String) = [] of String, warn_unknown : Bool = true) : Int32

Makes files (and fonts) visible to kpathsea, fetching arils for whatever is missing. Returns the number of arils planted.

Source
resolver
Source
tool_path(name : String) : String | Nil

Finds a helper program such as biber, planting its binary aril if needed. With the rind, a biber from $PATH is not trusted: biber must match the biblatex version, and the planted one comes from the same TeX Live release.

Source
toolchain
Source

Nested types