Files
klammertext/README.md
T
ack af29bbf7ac Unicode sequences, @typeface, and the font/typeface distinction
A run of Unicode code points now needs one pair of carets, not one pair
each: ^9053 53EF 9053^ renders the characters adjacently, and a single
character inside such a run stands for itself.  An invalid code point is
an error naming the position that wrote it, rather than an apology
rendered into the finished document; noncharacters are refused alongside
surrogates; and a code point that lands on a Klammertext special is safe
through the re-reads that assemble a document.  The character tables now
produce the precomposed form, so a diacritic written as ^a" and one typed
directly are the same text to a search or a copy-paste.

"kdesc -u" describes how to write a Unicode character, with tables of
glyphs beside the codes that produce them.  It is new and not yet
complete: it predates the sequence form and the typeface klammer below.

A typeface and a style are no longer both called "font".  A typeface is a
family resolved by name; a style code is the one letter naming a type
style.  So @document takes :serif_typeface and its siblings, a table takes
:style, captions take :caption_style and :caption_size, the uniform scale
is :text_scale, and the command is "kdesc --typeface".  This renames
arguments a document may already use; an old name is a located error
rather than a silent omission.

@typeface sets a passage in another typeface for the length of that
passage:

    @typeface Noto Sans Egyptian Hieroglyphs | ^132AA 133CF^ :scale 1.5 @

Writing the klammer is the whole declaration -- the document resolves the
typeface, embeds it in what it produces, and carries its license along.
Two typefaces for scripts no text font covers now ship with Klammertext:
Noto Sans Egyptian Hieroglyphs and Noto Sans Cuneiform.  Every typeface in
the distribution now carries its license file.

(from dev 61e598698891)
2026-08-25 23:30:55 +02:00

59 lines
2.3 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).
## Working with an AI assistant
If you use a language model to help write Klammertext, give it
[`doc/klammertext_for_llm.md`](doc/klammertext_for_llm.md). It is a dense
reference written for a model rather than a person: the syntax, the things a
model is most likely to assume wrongly about it (Klammertext is not LaTeX,
Markdown, or Lisp, and reads oddly if you expect any of them), and how to ask
the `kdesc` and `kdiag` commands for the current state of the machine instead
of guessing.
## 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 `61e598698891`.
## License
See [`LICENSE.md`](LICENSE.md).