zdocs Manual
v0.0-dev+gf9b701c

Tutorials

  • Tutorials

How-to guides

  • How-to guides

Reference

  • Reference

Explanation

  • Explanation
    • Architecture
    • The registry, and what it derives
    • The deploy tree
    • Documents zdocs does not build
    • From annotated C to a test report
    • Engineering guidelines
    • Documentation guidelines
    • Decisions
      • 0001. zdocs is a Zephyr module, included by name
      • 0002. Acceptance tests live in a consumer repository, over one cumulative fixture
      • 0003. The engine carries its own unit suite, in the engine repository
      • 0004. The registry is the single source of truth for document declarations
      • 0005. Remote documents are three kinds, not one
      • 0006. The deploy tree is organised by builder, not by document
      • 0007. Doxygen XML is engine-managed, and lives outside the servable tree
      • 0008. The Doxygen tag file is named doxygen.tag
      • 0009. Need types and links are a consumer-supplied role→name mapping
      • 0010. The engine payload is split by tool, freeing doc/ for documentation
      • 0011. Documentation structure: Diátaxis, arc42-lite, and two documents
      • 0012. Cross-document links in the HTML tree are relative
      • 0013. The PDFs of a document set link to each other
      • 0014. The PDF layout is a LaTeX style file

Manual

  • zdocs Manual

Reference

  • zdocs API Reference
zdocs Manual
  • Explanation
  • Decisions
  • 0013. The PDFs of a document set link to each other
  • View page source

0013. The PDFs of a document set link to each other

Status

Accepted, 2026-10-14. Changes the deploy/pdf part of 0006. The deploy tree is organised by builder, not by document.

Context

A PDF leaves the deploy tree: it is mailed, filed and signed. Its links to other documents went to the published HTML site (the registry’s base_url), so a reader needed the site and a network, and a link from a released PDF could open a newer version of the target. A PDF of a development build linked a local server, or nothing (pdf_links).

deploy/pdf/<document>/ held the whole LaTeX build directory: the .tex, the auxiliary files and the PDF, which Sphinx names after the project title. Nothing in it was meant for a reader except the PDF.

Decision

The PDFs of a set are one deliverable that works offline and links within itself:

  • deploy/pdf is the PDF set: one <title>_<version>.pdf per document with a latex builder, side by side. The title is the registry title: (white space as -), the version is the one the document shows (its version_scope). docrefs.py pdf-deliver copies latexmk’s PDF there and removes the other versions of the same document. Two documents with the same title part are a configure-time error.

  • The LaTeX build directory is a work area at <build>/<document>/latex, outside the deploy tree.

  • Each LaTeX label is a named destination of the same name (hyperref’s destlabel). Sphinx writes a label for each need, section and page: <page>:<anchor>.

  • A link to a document of the set becomes a link to its PDF: <title>_<version>.pdf#<page>:<anchor>, which hyperref writes as a “go to remote” action (file and named destination). A link to another document keeps the rules before: the base_url, or text when that is a local server (pdf_links).

  • doc-check reads the PDFs and fails on a link into the set whose file or destination does not exist.

Consequences

  • The set works offline and in one version: each link names the file of the version it was built with. A new version of one document renames its file, so the documents that link to it must be built again (the set is built and released together).

  • The links work only while the files keep their names and stay in one folder. Deliver the set as one unit (a folder or an archive); a system that renames the files breaks the links.

  • Viewer support can differ. Evince follows the links, and pdf.js opens a PDF at a named destination. The “go to remote” links were not tested in browser viewers.

  • Doxygen documents have no PDF; links to them stay web links or text.

  • A consumer that picked up deploy/pdf/<document>/<title>.pdf must take deploy/pdf/<title>_<version>.pdf instead.

Previous Next

© Copyright 2026, zdocs Manual.