Skip to content

feat: render the PDF and EPUB as well as the site - #22

Merged
achubaty merged 1 commit into
mainfrom
feat/render-pdf-and-epub
Sep 21, 2026
Merged

achubaty merged 1 commit into
mainfrom
feat/render-pdf-and-epub

Conversation

@achubaty

Copy link
Copy Markdown
Collaborator

One line: build.R renders output_format = "all" instead of bs4_book alone.

_output.yml has always declared bs4_book, pdf_book and epub_book. The
build was restricted to HTML because the LaTeX toolchain was unproven on modern
R, and a missing package would have failed the whole build while the manual was
being brought back to life.

This is the prerequisite for the release scheme: a released manual archives a
PDF, and there is no PDF today.

The toolchain was smoke-tested first

On a compute node, with this repository's own assets rather than a guess at them:

check result
krantz.cls + full latex/preamble.tex (15 packages, incl. Alegreya, sourcecodepro, tabu) under xelatex compiles, exit 0, PDF produced
biblatex with refsegment=chapter and \printbibliography[segment=\therefsegment,heading=none] compiles — this is what prepManualRmds() appends to every chapter
biber installed
capabilities("cairo") for dev: "cairo_pdf" TRUE

So the remaining risk is content-level, not toolchain. CI already has
setup-tinytex and the full module dependency stack, which is the expensive part
to reproduce locally, so this is the cheapest place to find what is left.

Opened as a PR deliberately: a pull_request build renders without deploying, so
nothing reaches the site until this is known good.

Expect iteration

EPUB needs no LaTeX. If it fails too, the problem is content rather than TeX,
which makes the first run diagnostic either way. Likely suspects if something
does break: kableExtra tables in a LaTeX context (_common.R switches
knitr.table.format for this), figures referenced as modules/<M>/figures/...,
and unicode in author names.

Follow-ups, not in this PR

  • restore download: ["pdf", "epub"] in _output.yml once the files exist, or
    the site advertises links that 404
  • once merged, the release path activates on its own: archiveManualPDF() writes
    archive/pdf/LandR-manual-v<version>.pdf, the workflow's bot step commits it,
    and publishManualArchive() republishes the set

🤖 Generated with Claude Code

_output.yml has always declared all three; build.R rendered bs4_book only
because the LaTeX toolchain was unproven on modern R.

Smoke-tested first on a compute node with this repo's own assets: krantz.cls
plus the full preamble compiles under xelatex, biblatex with
refsegment=chapter and the \printbibliography line prepManualRmds() injects
compiles, biber is present and cairo is available for dev = "cairo_pdf".

Download links stay commented out until the files exist.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@achubaty
achubaty merged commit 49fdda5 into main Sep 21, 2026
1 of 2 checks passed
@achubaty
achubaty deleted the feat/render-pdf-and-epub branch September 21, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant