pub enum OutputFormat {
HtmlAndMathml,
Html,
Mathml,
}
Expand description
Output format options for KaTeX mathematical expression rendering.
This enum specifies the format of the rendered output, controlling whether KaTeX generates HTML, MathML, or both. The choice affects browser compatibility, accessibility, and styling capabilities.
§LaTeX/KaTeX Context
Different output formats serve different purposes in mathematical publishing:
- HTML provides broad browser support and styling flexibility
- MathML offers semantic markup and screen reader accessibility
- Combined output balances compatibility with advanced features
§Cross-references
- See
Settings::output
for configuring the output format. - Related to browser compatibility and accessibility requirements.
- Affects CSS styling and semantic markup generation.
Variants§
HtmlAndMathml
Generate both HTML and MathML markup.
This is the default format, providing the best balance of compatibility, accessibility, and styling. HTML is used for visual rendering, while MathML provides semantic information for screen readers and other tools.
Html
Generate HTML markup only.
Produces clean HTML output with CSS styling. Best for web pages where MathML support is not required or desired. More predictable rendering across different browsers.
Mathml
Generate MathML markup only.
Produces semantic MathML output optimized for accessibility and mathematical software. Best for applications requiring precise mathematical semantics over visual presentation.
Trait Implementations§
Source§impl Clone for OutputFormat
impl Clone for OutputFormat
Source§fn clone(&self) -> OutputFormat
fn clone(&self) -> OutputFormat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more