pub struct Config { /* private fields */ }Expand description
Configuration for LaTeX rendering
This struct controls various aspects of how the Markdown AST is converted to LaTeX. Use the builder methods to customize the output style.
§Examples
use markdown_ppp::latex_printer::config::*;
// Default configuration
let config = Config::default();
// Custom configuration
let config = Config::default()
.with_width(120)
.with_table_style(TableStyle::Booktabs)
.with_code_block_style(CodeBlockStyle::Minted);Implementations§
Source§impl Config
impl Config
Sourcepub fn with_width(self, width: usize) -> Self
pub fn with_width(self, width: usize) -> Self
Set the line width for pretty-printing
Controls how the pretty-printer wraps long lines. This affects the formatting of the generated LaTeX, not the content itself.
§Arguments
width- Maximum line width in characters
§Examples
use markdown_ppp::latex_printer::config::Config;
let config = Config::default().with_width(120);Sourcepub fn with_table_style(self, table_style: TableStyle) -> Self
pub fn with_table_style(self, table_style: TableStyle) -> Self
Sourcepub fn with_code_block_style(self, code_block_style: CodeBlockStyle) -> Self
pub fn with_code_block_style(self, code_block_style: CodeBlockStyle) -> Self
Set the code block rendering style
Controls which LaTeX environment is used for code blocks and whether syntax highlighting is applied.
§Arguments
code_block_style- The desired code block style
§Examples
use markdown_ppp::latex_printer::config::*;
let config = Config::default()
.with_code_block_style(CodeBlockStyle::Minted);Trait Implementations§
Source§impl Default for Config
impl Default for Config
Source§fn default() -> Self
fn default() -> Self
Create a default configuration
Default settings:
- Width: 80 characters
- Table style:
TableStyle::Tabular - Code block style:
CodeBlockStyle::Verbatim
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more