pdf #136
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
rust
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/zim-studio!136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "pdf"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Everything passes. Summary:
zim pdf is wired in. Run it with zim pdf [PATH] — flags: --output, --title,
.pdf in cwd, title from--author, --keep-tex. Defaults: PATH=., output is
directory name, author from config.default_artist.
Files added:
README.md
peels first H1 as title, demotes remaining headings, escapes special chars
dir, \clearpage between subdirs, \subsection per non-README md)
absent; full log tail on failure
Wired into: src/main.rs, src/cli/mod.rs, src/lib.rs, Cargo.toml (added
pulldown-cmark = "0.12").
Smoke test: ran end-to-end against a synthetic project with README.md + two
subdirs (mixes/ with README + 2 sidecars + frontmatter, bounces/ README-only).
PDF compiled cleanly under TinyTeX. Verified TOC renders, root section has no
leading \clearpage, subdirs do, sidecar frontmatter title: drives subsection
name, in-body H2 demotes to \paragraph.
Robustness tweak made during testing: the user has TinyTeX, which doesn't ship
ulem or parskip by default. Preamble now wraps both with \IfFileExists + a no-op
\providecommand{\sout} fallback, so it works on TinyTeX and MacTeX without
forcing the user to install extra packages.
just ci passes (fmt, clippy, 114 tests, build).
Everything passes. Summary: zim pdf is wired in. Run it with zim pdf [PATH] — flags: --output, --title, --author, --keep-tex. Defaults: PATH=., output is <dir>.pdf in cwd, title from directory name, author from config.default_artist. Files added: - src/pdf/walk.rs — deterministic walker, groups markdown by directory, hoists README.md - src/pdf/latex.rs — pulldown-cmark → LaTeX visitor; strips YAML frontmatter, peels first H1 as title, demotes remaining headings, escapes special chars - src/pdf/assemble.rs — builds the LaTeX document (preamble, TOC, \section per dir, \clearpage between subdirs, \subsection per non-README md) - src/pdf/compile.rs — invokes xelatex twice; clear "install MacTeX" error if absent; full log tail on failure - src/pdf/mod.rs — generate() orchestrator - src/cli/pdf.rs — handler + progress + summary line Wired into: src/main.rs, src/cli/mod.rs, src/lib.rs, Cargo.toml (added pulldown-cmark = "0.12"). Smoke test: ran end-to-end against a synthetic project with README.md + two subdirs (mixes/ with README + 2 sidecars + frontmatter, bounces/ README-only). PDF compiled cleanly under TinyTeX. Verified TOC renders, root section has no leading \clearpage, subdirs do, sidecar frontmatter title: drives subsection name, in-body H2 demotes to \paragraph. Robustness tweak made during testing: the user has TinyTeX, which doesn't ship ulem or parskip by default. Preamble now wraps both with \IfFileExists + a no-op \providecommand{\sout} fallback, so it works on TinyTeX and MacTeX without forcing the user to install extra packages. just ci passes (fmt, clippy, 114 tests, build).