Skip to main content

Config

Struct Config 

Source
pub struct Config {
Show 24 fields pub verbosity: i32, pub format: OutputFormat, pub whatsin: DataSize, pub whatsout: DataSize, pub preamble: Option<String>, pub postamble: Option<String>, pub mode: Option<DigestionMode>, pub bindings_dispatch: Option<BindingDispatcher>, pub extra_bindings_dispatch: Option<BindingDispatcher>, pub preload: Option<Vec<String>>, pub search_paths: Option<Vec<String>>, pub include_comments: Option<bool>, pub strict: Option<bool>, pub include_styles: Option<bool>, pub if_limit: Option<i64>, pub absorb_limit: Option<i64>, pub nomathparse: Option<bool>, pub source_map: Option<bool>, pub inputencoding: Option<String>, pub streaming: Option<usize>, pub source_date_epoch: Option<i64>, pub handoff_file: Option<String>, pub documentid: Option<String>, pub confinement: Option<InputConfinement>,
}

Fields§

§verbosity: i32§format: OutputFormat§whatsin: DataSize§whatsout: DataSize§preamble: Option<String>§postamble: Option<String>§mode: Option<DigestionMode>§bindings_dispatch: Option<BindingDispatcher>§extra_bindings_dispatch: Option<BindingDispatcher>§preload: Option<Vec<String>>

Packages to preload before processing (e.g. –preload=ar5iv.sty)

§search_paths: Option<Vec<String>>

Additional search paths for finding packages/inputs (e.g. –path=dir)

§include_comments: Option<bool>

Whether to include XML comments in output (–nocomments sets false)

§strict: Option<bool>

Strict error-reporting (--strict; State STRICT, Perl Core.pm L43)

§include_styles: Option<bool>

Raw-load .sty AND .cls sources (--includestyles): one flag sets State INCLUDE_STYLES and INCLUDE_CLASSES together (Perl Core.pm L55-57). None keeps Perl’s default (off); the CLI, the library API and cortex’s generic profile pass Some(true) (OXIDIZED_DESIGN_DIVERGENCES #1080).

§if_limit: Option<i64>

Perl $LaTeXML::IF_LIMIT / $LaTeXML::ABSORB_LIMIT (latexml.sty.ltxml:100-105), set when the session starts, before the preloads, so a latexml.sty iflimit=/absorblimit= option still wins (0 = unlimited). None keeps Perl’s default (unlimited); the front ends pass RUNAWAY_IF_LIMIT (ten times ar5iv.sty’s) and RUNAWAY_ABSORB_LIMIT (ar5iv.sty’s) (OXIDIZED_DESIGN_DIVERGENCES #1080).

§absorb_limit: Option<i64>§nomathparse: Option<bool>

Whether to skip math parsing (–nomathparse)

§source_map: Option<bool>

Whether to track + emit source locators (--source-map). Off by default; gates both per-token start capture and per-element data-sourcepos stamping. See docs/performance/SOURCE_PROVENANCE.md.

§inputencoding: Option<String>

Input encoding for translating source bytes to LaTeXML’s internal UTF-8 (--inputencoding; Perl Config.pm L57, Core.pm L60-61 which assigns State PERL_INPUT_ENCODING, default utf-8). Consumed by the Mouth’s per-line decode; only affects byte→UTF-8 translation, never catcodes (for those, use the inputenc package). None ⇒ the utf-8 default.

§streaming: Option<usize>

Streaming (fragmented) core conversion: Some(budget) interleaves digest→build in fragments of ~budget boxes, spilling closed subtrees to disk so peak RSS is bounded by fragment size instead of document size. None (default) = the eager path — also the Perl-parity path (Perl is strictly digest-all→build-all; interleaving is a sanctioned divergence, activated only by the --streaming flag or when the projected need exceeds the memory cap). The budget is a box count on the same per-box basis as the box-list guards.

§source_date_epoch: Option<i64>

The date of the source (Unix seconds, UTC): the newest modification time among the TeX source files of the bundle the document came in — an archive’s entries, a directory’s or a file’s mtimes (latexml::source_date). None when there is none (stdin, literal input, an archive whose entries carry no time). ar5iv’s archival preload sets the job’s clock from it, so \today prints the paper’s date, never the conversion’s.

§handoff_file: Option<String>

Serialize the core result into this file, not a String (the CLI’s split runs, whose post reads its input from a file anyway): the response then names the file in handoff_file. None: the String result.

§documentid: Option<String>

The document’s id (--documentid; Perl Config.pm L159, Core.pm L48 State DOCUMENTID): the root’s xml:id and the prefix of every other id. In State before the pools load, as Base_Schema reads it to define \thedocument@ID.

§confinement: Option<InputConfinement>

A confined conversion’s read roots (crate::util::pathname::confine; OXIDIZED_DESIGN_DIVERGENCES #1183): every archive input, and --paranoid-input. The front end holds the guard across the core, a restart and post.

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Config

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Config

§

impl !Send for Config

§

impl !Sync for Config

§

impl !UnwindSafe for Config

§

impl Freeze for Config

§

impl Unpin for Config

§

impl UnsafeUnpin for Config

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.