1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// SPDX-License-Identifier: MPL-2.0
// SPDX-FileCopyrightText: 2026 FernTech
//! 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`](LatexExportOptions::include_preamble) is `false`.
use ;
/// The three export-time choices `to_latex`/`to_latex_with_options` have always taken: which
/// `\documentclass` to open with, whether to wrap the rendered body in a full compilable
/// document at all, and whether inline images are emitted or dropped.
///
/// [`Default`] reproduces exactly what bare `to_latex(document_class, include_preamble)` always
/// did: an empty [`document_class`](Self::document_class) falls back to `"article"` inside the
/// writer (`document_io::use_cases::export_latex_uc::ExportLatexUseCase::execute`), and
/// [`omit_images`](Self::omit_images) is `false` — images are emitted as
/// `\includegraphics{src}` unless a caller opts out.