pub struct DocxOptions<'a> {
pub reference: Option<&'a [u8]>,
pub critic: bool,
pub track_changes: TrackChanges,
pub author: String,
pub date: String,
pub author_fixed: bool,
pub date_fixed: bool,
pub images: Option<&'a dyn Fn(&str) -> Option<Vec<u8>>>,
pub page: PageSize,
pub tracking: Option<bool>,
pub scholar: bool,
}Expand description
How markdown_to_docx writes a Markdown document to a .docx.
Defaults to Word-faithful settings: no reference document,
critic = true (CriticMarkup is read as tracked changes),
track_changes = All, author "Jubarte", date pinned to
1970-01-01T00:00:00Z (so the same Markdown writes the same bytes),
no image loader, US Letter page size.
Fields§
§reference: Option<&'a [u8]>A .docx whose styles, numbering, page setup, headers and footers
the output takes, as pandoc’s --reference-doc; its text is not
used. None uses built-in styles on the page DocxOptions::page
names.
critic: boolRead CriticMarkup as tracked changes and comments. Off, its delimiters are text.
track_changes: TrackChangesKeep, accept or reject the tracked changes CriticMarkup describes.
Author of the tracked changes and comments.
date: StringTheir date, YYYY-MM-DDTHH:MM:SSZ; fixed by default so the same
Markdown writes the same bytes.
author names the changes and comments that name no one, even when
the front matter has an author: (an --author the user typed).
false: the front matter’s wins over author.
date_fixed: booldate dates the undated changes and comments, even when the front
matter has a date (last_modified:, modified:, date:,
created:). false: the front matter’s wins over date.
images: Option<&'a dyn Fn(&str) -> Option<Vec<u8>>>The bytes of each image the Markdown names. Without it, or when it
returns None, an image is written as its alt text.
page: PageSizeThe page size when there is no reference document. With a reference,
its page setup wins and a page other than the default is reported in
WrittenDocx::warnings.
tracking: Option<bool>Word’s Track Changes switch (w:trackRevisions) in the output:
Some sets it whatever the Markdown’s track_changes: key says;
None follows the key, and without one keeps the reference’s
setting (off without a reference).
scholar: boolSet the document as LaTeX’s article class sets a manuscript: Latin
Modern Roman at 10pt on 12pt lines, justified, bold headings, and
the page number centered in the footer from page 2. Only what the
front matter leaves out: its own styles: entries, headers and
footers win.
Trait Implementations§
Source§impl<'a> Clone for DocxOptions<'a>
impl<'a> Clone for DocxOptions<'a>
Source§fn clone(&self) -> DocxOptions<'a>
fn clone(&self) -> DocxOptions<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more