mdpdf drives a headless Chromium, and a browser installed as a flatpak -- which is what the Pop!_Shop installs, and so the ordinary case on a Pop!_OS or System76 machine -- was unusable in two ways, the second of them silent. It was not found at all. A flatpak puts nothing on PATH and nothing in /opt, and its wrapper is named com.brave.Browser rather than brave-browser, so adding the export directory to PATH would not have helped either. The application ids are now looked for in the flatpak export directories, after every native browser, so a native one still wins where there is one. Found, it then rendered in the wrong fonts and reported success. The @font-face URLs pointed into the font store, which the sandbox cannot read, and a browser does not report a font it cannot fetch -- it substitutes. The PDF came out in a default serif and nothing said so. Granting the path would not have travelled either: sandbox filesystem permissions differ from one application to the next, so a scheme resting on a path works with one browser and fails with another on the same machine. So the document, its fonts and its images are now served to the browser over the loopback interface instead of being passed as file:// paths. Every sandbox shares the network namespace -- the DevTools connection already depends on it -- so this needs no filesystem permission from any sandbox, present or future. A --keep-html copy is still written with file:// URLs, so it works when nothing is serving it. A font that fails to load is now an error rather than a substitution: the page is asked whether each requested family arrived, and no PDF is written if one did not. A finished-looking document in the wrong typeface is the worst failure this program can have. Separately, a table-of-contents entry no longer carries a bullet. An entry is a section title, and a marker in front of it reads as a list of things rather than as a contents; ordinary bulleted lists are unaffected. (from dev 12929fdff53b)
49 lines
1.8 KiB
Markdown
49 lines
1.8 KiB
Markdown
# Klammertext
|
|
|
|
Klammertext is a markup language that produces multiple output formats —
|
|
HTML, LaTeX/PDF, and plain text — from a single source description. Its core
|
|
engine, the Klammermachine, is written in C++; the Standard Klammer Set (SKS)
|
|
adds a default library of formatting and document-structuring operators on top.
|
|
|
|
## Installing
|
|
|
|
Installation guides are in [`doc/install/`](doc/install/):
|
|
|
|
- Linux, from source — `doc/install/linux_source_install.md`
|
|
- macOS, from source — `doc/install/macos_source_install.md`
|
|
- Linux, container — `doc/install/linux_container_install.md`
|
|
- macOS, container — `doc/install/macos_container_install.md`
|
|
|
|
## Building from source
|
|
|
|
With a C++20 compiler and `KLAMMERTEXT_HOME` set to this directory:
|
|
|
|
make -C com
|
|
|
|
This builds the Klammermachine library (into `lib/`), the SKS components, and
|
|
the three commands — `ktext`, `kdesc`, `kdiag` (into `bin/`). See the
|
|
source-install guide for prerequisites (TeX Live for PDF output, Python, and so
|
|
on).
|
|
|
|
## Editor support
|
|
|
|
Editing support for Emacs, Sublime Text, Vim, and Visual Studio Code —
|
|
syntax highlighting, delimiter matching, structural reindentation, table
|
|
alignment, diagnostics — is in [`doc/edit/`](doc/edit/), together with the
|
|
shared implementation and the Klammertext language server they build on.
|
|
|
|
## Provenance
|
|
|
|
This repository is a curated snapshot of Klammertext's private development
|
|
tree, assembled by a manifest-driven script. Its history is a series of
|
|
release snapshots, not a mirror of the development history, and files here
|
|
are regenerated on each release — patches cannot be merged directly.
|
|
Report problems (or send patches) to the author; accepted changes are
|
|
applied to the development tree and appear in a following snapshot.
|
|
|
|
This snapshot was assembled from development commit `12929fdff53b`.
|
|
|
|
## License
|
|
|
|
See [`LICENSE.md`](LICENSE.md).
|