How sekaiarendelle/pltxt2htm works
pltxt2htm is a header-only C++ library that converts Quantum-Physics text to HTML, with console, browser, and language-binding entry points. The main workflow accepts text and context, parses formatting into an AST, optimizes it, and renders a target-specific result. The README documents Markdown, LaTeX, Quantum-Physics tags, and macros as supported formatting capabilities. The tree and excerpts do not expose the parser and renderer implementation files, so those subsystem nodes use the existing include/pltxt2htm directory; their documented connections are cited to the README.
Main entry points: pltxt2htm Text parser · src/pltxt2htm.cc C API · cmd/pltxt2htm.cc Console CLI · py/pltxt2htm.cc Python binding
Components 18
User interfaces
- Console CLI
cmd/pltxt2htm.cc - C API
c/src/pltxt2htm.cc - Python binding
py/pltxt2htm.cc - Rust binding
rust/pltxt2htm/src/lib.rs - WebAssembly binding
wasm/pltxt2htm.cc
Parsing
- Quantum text
include/pltxt2htm - Markdown syntax
include/pltxt2htm - LaTeX syntax
include/pltxt2htm - Physics tags
include/pltxt2htm - Context macros
include/pltxt2htm - Text parser
include/pltxt2htm - Parsed AST
include/pltxt2htm
Rendering
- AST optimizer
include/pltxt2htm - Common HTML
include/pltxt2htm - Fixed-adv HTML
include/pltxt2htm - Unity text
include/pltxt2htm - HTML output
include/pltxt2htm
Other components
- Text consumer
Connections 22
- Text consumer → Console CLI: submits text
- Text consumer → C API: calls binding
- Text consumer → Python binding: calls binding
- Text consumer → Rust binding: calls binding
- Text consumer → WebAssembly binding: submits text
- Quantum text → Text parser: parses
- Markdown syntax → Text parser: supports syntax
- LaTeX syntax → Text parser: supports syntax
- Physics tags → Text parser: supports tags
- Context macros → Text parser: expands macros
- Text parser → Parsed AST: produces AST
- Parsed AST → AST optimizer: optimizes
- AST optimizer → Common HTML: renders
- AST optimizer → Fixed-adv HTML: renders
- AST optimizer → Unity text: renders
- Common HTML → HTML output: produces
- Fixed-adv HTML → HTML output: produces
- Console CLI → Text parser: converts text
- C API → Text parser: calls parser
c/src/pltxt2htm.cc - Python binding → Text parser: converts text
- Rust binding → C API: wraps C API
- WebAssembly binding → Text parser: converts text