Files
makronix/docs/guide/AGENTS.md
T
lotherk a3df74a5b3 docs: screenshots in the desktop chapters, page numbers and outline in the PDF
The MCDE chapter gets the desktop, System Settings, file manager and
terminal figures; the Information Manager chapter gets its book list.
The system HTML embeds the PNGs as data URIs, the website form points to
www/img/, the manual pages keep the caption and the dtinfo book keeps
the caption (the CDE DTD could carry TIFFs, but the library stays text).

The PDF gets a page-number overlay (gs + qpdf) and a chapter outline
(mutool); mutool clean normalises the file so qpdf and readers see the
outline.  docs/guide/check.sh checks outline and page numbers when the
tools are installed; tools/test-tools.sh copies www/img for the site
check and stays at 33 ok.
2026-11-16 10:22:20 +00:00

3.5 KiB

docs/guide -- The Makronix Guide

What it is for

The source of the Makronix Guide and the five forms it is installed in: manual pages, PDF, one HTML file and an MCDE information library. The text follows the structure of The NetBSD Guide and describes Makronix 0.99.10 (Camouflage).

What is in it

  • book.xml -- the book, with one XInclude per chapter.
  • chapters.list -- the manifest: id, title, man-page suffix and source file. The build reads it; keep it in step with book.xml and the chapter files.
  • chapters/*.xml -- the text, one chapter per file, DocBook XML 4.5. Screenshots are figures with fileref="@WWWIMG@/shot-*.png"; the build resolves the placeholder to www/img/.
  • template.html5 and style.css -- the HTML and print form. The colours are the Camouflage palette (the same as www/style.css), and the logo is docs/logo/makronix.png.
  • template-web.html -- the same text as a page of www/ (HTML 4.01 Strict, the site's window and style.css).
  • tools/docbook-to-cde.lua -- the writer that turns the DocBook XML into the older DocBook SGML that MCDE's dtdocbook2infolib reads.
  • build.sh -- the build: all, html, pdf, web, man, infolib, check and install.
  • out/ -- the generated forms (not tracked).

How to build

sh docs/guide/build.sh all      # all five forms in out/
sh docs/guide/build.sh web      # the website page, www/guide.html after install
sh docs/guide/build.sh check    # every form exists, PDF has pages, man renders
sh docs/guide/build.sh verify   # HTML/man in src/ match the source
sh docs/guide/build.sh install  # copy into src/ and www/ for the release

It needs pandoc, xmllint, mandoc, base64 and Google Chrome (for the PDF). The page numbers and the chapter outline in the PDF use gs, qpdf, mutool and pdftotext (all optional: without them the PDF is built without them). The information library needs a host build of MCDE (make mcde-host), which provides build/mcde-root/dt/bin/dtdocbook2infolib.

build.sh install writes the forms into the tree:

  • src/share/doc/makronix/makronix-guide.html, .pdf and infolib/makronix.dti/ (base set, base-sys-share);
  • src/share/man/man7/makronix-guide*.7 (base set, man-reference-man);
  • www/guide.html (the website page, generated from the same source; its figures point to www/img/);
  • src/etc/makronix-xsession (installed as /etc/dt/config/Xsession.d/0000makronix), and the symlinks under /etc/dt/infolib that src/etc/Makefile makes.

The copy of the guide in out/ and the copy in src/ must be the same; the build's install verb is the only way the second one changes. verify rebuilds the HTML and the manual pages and compares them byte for byte with src/; the PDF and the information library carry build timestamps and are checked by check.sh instead.

What may be changed

The text, the chapter manifest, the template, the stylesheet and the build. A new chapter needs a line in chapters.list, a file in chapters/, an XInclude in book.xml, a MAN+= line in src/share/man/man7/Makefile and its entries in the set lists. Rebuild and install; do not edit the generated formats by hand.

What must not be touched

  • The generated files in src/: they are output, not source.
  • The logo (docs/logo/); the guide only embeds it.
  • The NetBSD Guide attribution in Appendix C; the general NetBSD procedures come from it.