Skip to main content

load_class

Function load_class 

Source
pub fn load_class(name: &str, options: Vec<String>, after: Tokens) -> Result<()>
Expand description

Load a document class — the \documentclass / \LoadClass implementation, port of Perl Package.pm:LoadClass L2702-2730.

Resolution runs input_definitions for <name>.cls, then Perl’s three-step fallback when that yields no binding: the longest known .cls.ltxml binding whose name PREFIXES the requested class (so an author-renamed IEEEtranTCOM.cls still gets the IEEEtran binding), and failing that OmniBus, the generic class supplying frontmatter, counter and theorem definitions. Whether the raw .cls may be read at all is the INCLUDE_CLASSES value’s call (searchpaths restricts it to local sources); by default it may not, because a raw load that “succeeds” would suppress the OmniBus fallback while providing none of its bindings.

See load_class_with_options for Perl’s withoptions => 1 variant. The per-branch reasoning, and the arXiv witnesses behind it, are in the body comments.