Skip to main content

parse_with_flavor

Function parse_with_flavor 

Source
pub fn parse_with_flavor(input: &str, config: impl Into<LexConfig>) -> Parse
Expand description

Parse LaTeX source into a lossless CST under an explicit LexConfig.

Identical to parse but fixes the lexer’s initial catcode regime (a Package flavor — .sty/.cls — starts with @ as a letter) and whether to run the .dtx docstrip mode. A bare LatexFlavor coerces in, so most callers pass one directly; parse is the Document wrapper.