Module tex

Module tex 

Source
Expand description

Tools for converting TeX’s internal data structures to Boxworks.

Knuth’s TeX has a bunch of diagnostic tooling for inspecting the internal data structures in its typesetting engine. This module contains functions that read the diagnostic output of Knuth’s TeX and reconstruct TeX’s internal data structures as Boxworks data structures. The initial motivation is to verify that subsystems of TeX and Boxworks – like the subsystem that converts text into a horizontal list – are doing the same thing.

These functions require that TeX is installed because they ultimately invoke TeX to generate the right diagnostic information.

Structs§

BinaryNotFound
Error return when a binary on the host computer was not found.
Error
Error returned by internal functions that parse TeX logs These internal parsing functions will eventually be made public and so the errors were made public.
RecordingTexEngine
A TexEngine that records the terminal output of the most recent run of the inner engine.

Enums§

ErrorKind
Kind of error when parsing TeX logs.

Traits§

TexEngine
Implementations of this trait can run TeX source code and return stdout.

Functions§

build_horizontal_lists
Build horizontal lists from some text.
build_vertical_lists
Build verticals list from some text.
diagnostic_preamble
Returns the TeX preamble to use when comparing Boxworks output to TeX’s.
extract_paragraph_trace
Extracts the \tracingparagraphs trace from TeX’s terminal output: everything from @firstpass (or @secondpass, if the first pass is skipped) up to the end of the trace.
new_tex_engine_binary
A TeX engine binary on the host computer, like tex or pdftex.
prepend_looseness
Prepends \looseness=<looseness> to the provided text.