pub struct Katex {
pub output: Option<KatexOutput>,
pub leqno: bool,
pub fleqn: bool,
pub error_color: Option<String>,
pub macros: BTreeMap<String, String>,
pub min_rule_thickness: Option<f64>,
pub color_is_text_color: bool,
pub strict: Option<KatexStrict>,
pub trust: bool,
pub max_size: Option<f64>,
pub max_expand: Option<usize>,
pub global_group: bool,
}Expand description
html.katex: math rendered as rehype-katex renders it, natively by katex-rs; options
named as KaTeX names them.
Fields§
§output: Option<KatexOutput>The markup to write, both HTML and MathML by default.
leqno: boolPut equation numbers on the left.
fleqn: boolAlign display math to the left instead of centering it.
error_color: Option<String>The color of math that fails to render, #cc0000 by default.
macros: BTreeMap<String, String>Macros by name, each to the TeX it expands to, as {"\\RR": "\\mathbb{R}"}.
min_rule_thickness: Option<f64>The thinnest a rule, such as a fraction line, is drawn, in ems.
color_is_text_color: boolLet \color color the text after it, as LaTeX does.
strict: Option<KatexStrict>What to do with input LaTeX would reject: true or "error" fails it, "warn"
prints a warning, false or "ignore" (the default) accepts it.
trust: boolAllow commands that can run untrusted input, such as \href and \includegraphics.
max_size: Option<f64>The largest a user-given size may be, in ems.
max_expand: Option<usize>How many macro expansions one formula may take, 1000 by default.
global_group: boolLet definitions such as \def last past the formula they are in.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Katex
impl<'de> Deserialize<'de> for Katex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Transform for Katex
impl Transform for Katex
fn input(&self) -> TreeKind
fn output(&self) -> TreeKind
fn run<'a>( &self, tree: Tree<'a>, file: &mut File, alloc: &'a Allocator, ) -> Result<Tree<'a>, Error>
Source§fn start<'a>(
&self,
tree: Tree<'a>,
file: &mut File,
alloc: &'a Bump,
) -> Result<Step<'a>, Error>
fn start<'a>( &self, tree: Tree<'a>, file: &mut File, alloc: &'a Bump, ) -> Result<Step<'a>, Error>
Source§fn host(&self) -> Option<u32>
fn host(&self) -> Option<u32>
None for a stage the crate runs.Source§fn html_writer(&self, _target: HtmlTarget) -> Option<Box<dyn HtmlWriter>>
fn html_writer(&self, _target: HtmlTarget) -> Option<Box<dyn HtmlWriter>>
target would write from its output, when the stage can skip building that tree.