This presentation by Tun, creator of the KEK distribution, aims to clarify common misunderstandings surrounding Plan 9 N and the TeX typesetting system. Tun emphasizes KEK's current state as an up-to-date distribution available across a wide range of operating systems (Android, Linux, BSD, Plan 9, Windows). A core distinction is made between the fundamental TeX engine (which processes byte-compiled macro "digests" for efficiency) and its various macro packages like plain TeX and LaTeX. The speaker advocates for TeX's superior generality and its future capacity to entirely replace roff for page layout and formatting, proposing a system where roff macros could be translated for TeX. He introduces "pro," his unified TeX engine extension that integrates modern LaTeX requirements while maintaining core TeX principles. The ultimate vision for KEK is a completely self-contained, portable, and long-term reproducible typography solution, mirroring Donald Knuth's original design philosophy.
Exploring KEK, TeX, and the Future of Typography
0:06 KEK Distribution Overview: Tun, creator of the KEK distribution, clarifies that KEK on Plan 9 N is up-to-date and not lagging behind other distributions.
1:45 Broad OS Compatibility: KEK is designed for wide availability across various operating systems, including Android, Linux, BSD, Plan 9, and Windows (via WSL), aiming for consistent user experience.
2:28 Compilation Environment: AP (a POSIX userland subset) is used only for cross-platform compilation of KEK; the core KEK system itself relies solely on libc and standard C (C89/C90).
TeX (uppercase) refers to the typesetting engine itself, which must pass Donald Knuth's "torture test." It processes input by discarding end-of-line characters.
tex (lowercase) is an instance of the TeX interpreter that loads a digested (byte-compiled) set of macros (e.g., plain TeX).
8:03 Byte Compiling for Efficiency (initex & virtex): The TeX engine uses initex to byte-compile macro sets into a "digest" (a memory dump). virtex then loads this digest to process documents, significantly speeding up macro interpretation.
9:21 LaTeX as a Macro Set: LaTeX is described not as an engine, but as a vast collection of macros that leverages the TeX engine's byte-compiling process for efficient operation.
TeX processes 8-bit characters and utilizes byte-compiling, making it more general.
roff (troff/nroff) processes lines, lacks byte-compiling (constantly rereads files), is older, and lacks a formal "torture test," relying on its user manual as a reference.
13:50 TeX's Generality and Future Vision: Tun argues that TeX is more general than roff and has the potential to entirely replace it as a page creator by adopting and mastering roff-like macro sets (e.g., MS macros for manual pages).
15:28 Extending DVI: The vision includes extending the Device Independent (DVI) format to support primitives currently found only in roff, and creating postprocessors to convert DVI to various outputs, including plain text for terminals or images.
20:18 "Pro" Engine Extension: Tun has developed "pro" (derived from "pronto"), an extension of the TeX engine (integrating TeX and epsilon-TeX) designed to meet the requirements of modern LaTeX. "Pro" serves as the single underlying engine within KEK, compatible with various TeX versions and current LaTeX.
24:08 Knuth's Motivation for TeX & Metafont: Donald Knuth developed TeX and Metafont (a program for drawing fonts) out of dissatisfaction with existing digital typography for printing his books. His goal was to create a complete, reproducible typography solution that would remain consistent for over a century.
26:10 Self-Contained Typography System: KEK aims for a completely self-contained typography solution: TeX for layout, Metafont for drawing/rasterizing fonts, and Metapost for figures. This eliminates external dependencies like Ghostscript (which is large, obsolete in Plan 9, and has licensing issues), providing full control from source to final image.
33:30 Progress on roff Macro Conversion: Converting roff (MS) macros for use with TeX is a work in progress, requiring more dedicated time but is estimated to be completable within a month with focused effort.
34:50 Hint Format Compatibility: The reflowable text format "Hint," developed by Martin Rukat, already utilizes Tun's "pro" work, demonstrating the broader impact and relevance of his engine.
35:56 TeX vs. roff Complexity: While TeX's interpretation process can be more complex due to its lack of a preprocessor, its greater generality allows it to emulate roff's functionality.
37:17 KEK Audience & Licensing: KEK is open-source and available for anyone, including commercial use, under permissive licenses (BSA, MIT, and public domain for Knuth's original work).