Expand description
Preamble + image policy for LaTeX export.
LaTeX was, until M-T3, the last export format in this crate still taking its knobs as bare
positional arguments (to_latex(document_class, include_preamble) /
to_latex_with_options(document_class, include_preamble, omit_images)) instead of an options
struct — every sibling already had one: DjotExportOptions, DocxExportOptions,
EpubExportOptions, HtmlExportOptions, MarkdownExportOptions, OdtExportOptions,
PdfExportOptions, PlainTextExportOptions. LatexExportOptions closes that gap: the same
three knobs, the same defaults, now named fields on a struct so a fourth knob never means
renumbering every call site’s positional argument list.
Unlike super::docx_options::DocxExportOptions or super::odt_options::OdtExportOptions,
LaTeX carries no comment support, and this struct never will: there is no LaTeX importer
anywhere in this crate (or planned — a .tex file is an arbitrary macro-expansion target, not
a document format this crate can read back), so an anchored comment thread round-tripped into
LaTeX would be structurally one-way, editorial notes going in and never coming back out. That
was a deliberate scope cut in the comment-export feature, not an oversight here — do not add a
comments field to this struct.
LaTeX also has no page geometry or base-typography knobs the way DOCX/ODT do:
\documentclass and its own options already own page size and base font (article,
report, book, or a caller’s own class), so there is nothing here to mirror
DocxExportOptions’ twips/half-points fields — a caller who wants those characteristics picks
a document class that has them, or supplies its own preamble around the body this crate
returns when include_preamble is false.
Structs§
- Latex
Export Options - The three export-time choices
to_latex/to_latex_with_optionshave always taken: which\documentclassto open with, whether to wrap the rendered body in a full compilable document at all, and whether inline images are emitted or dropped.