A character written in the ^...^ mnemonic form -- ^oe^, ^zz^, ^hello^ --
used to kill ktext outright: no message, no output, and an exit status
that looked like a crash because it was one. Only the forms that happen
to spell hexadecimal digits escaped, and they were right by luck rather
than by reading. Any caret form that names no character is now a located
error that quotes what was written.
A klammer may now sit inside square brackets and braces as it already
could inside parentheses, and may be followed by the punctuation that
ends a sentence: [@i word@], {@b word@}, @i word@'s. The rule is a fixed
list of characters, because none of them can occur inside a klammer name
and so none of them is ambiguous next to a delimiter. A letter still
cannot: "x@" is the named closing delimiter, so a letter before "@" has
two readings and no rule can separate them.
The abbreviations an author writes -- the hyphen form @i-word, a klammer
glued to its neighbouring punctuation -- are now recognised as author
conveniences only. They are not applied to @@ definitions or @@@ system
commands, which are written by someone who needs no such shorthand and
whose forms are already whole.
Also fixed, each of them silent: an exported shell function in the
environment broke every @eval in the document; a line break written with
@nl was destroyed when it passed through a klammer that generates a
table, printing as \textbackslash{}newline in the finished PDF; and
"kdesc --coverage" shortened its file column by comparing the spelling of
a path rather than the path, so a klammer set reached by a symbolic link
showed a full path where its neighbours showed a short one.
New in the distribution: ref/, a small klammerset that describes the
Klammermachine's own tables in Klammertext. It currently provides the
character tables -- the diacritics and the extended Latin letters -- as
klammers that render to any target, so the documentation of what can be
written cannot drift from what the machine accepts. It is early, and
will grow.
The Klammertext taxonomy now has a section on targets, describes the
@@@klammerset system command alongside the other three, and states the
precedence of "^" -- what a caret means before a letter, a digit, a
punctuation character, and a quote, in one ordered list.
(from dev 6594c7ff8c1f)
59 lines
2.3 KiB
Markdown
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 `6594c7ff8c1f`.
|
|
|
|
## License
|
|
|
|
See [`LICENSE.md`](LICENSE.md).
|