GWEB 0.2.0
GWEB 0.2.0 brings Korean literate programming — and, found while writing the
first Korean example, a CWEB-conformance fix for section-name matching.
Korean documentation (new)
Put \input kotexgweb.tex in a .w file's limbo and typeset the woven output
with luatex (not pdftex) to get a fully Korean document — Hangul body,
running heads, contents page, section-name list, and cross-reference notes — with
blue cross-reference links and a Korean PDF outline (bookmark) pane.
tex/kotexgweb.texis one self-contained file: it loads luatexko, sets the
Noto Serif/Sans CJK KR fonts, restates gweave's fixed wording in Korean, and
supplies a LuaTeX PDF back end (gwebmac's links/bookmarks use pdfTeX
primitives luatex lacks). PDF outline titles are emitted as UTF-16BE so Korean
bookmarks render correctly.- The running-head Hangul is set in a sans face to match the small-caps Latin,
and the contents-page title is sized to match English gweb. - Localization is language-agnostic: every fixed string gweave/gwebmac emit
goes through a macro (\GU,\GNused,\Gsectionword,\Gheadfont, …), so
another language needs only its own\inputfile.install.shinstalls
kotexgweb.texnext togwebmac.tex.
Bug fix
- Section-name whitespace. As in CWEB, runs of spaces, tabs, and newlines in
a section name are now collapsed to a single space and trimmed, so a long name
wrapped across lines in one place matches the same name written on one line.
Previously such a reference resolved to section 0 — which also crashed luatex's
PDF backend.
Typesetting refinements (gweave / gwebmac)
constandiotanames are set in typewriter, like CWEB's@dmacros;nil,
true,falseare typewriter (not bold);@dmarks an imported name (e.g.
http.StatusOK) as typewriter.- Type names are set in boldface.
- A narrower, tunable thin space (
\Gthin, 2mu) before(. - TeX is passed through in section names (so
\.{x}works), and@(file@>=
output names are typeset as escaped typewriter paths (underscores, etc.).
New example programs
hangul.w (Korean Fibonacci), pipeline.w (lazy iter.Seq transforms bridged
to a channel fan-out), pairsums.w (max pair-product over subarrays via a Li
Chao tree), squint.w (McIlroy's lazy power series as channel networks),
topswops.w / topswops_fwd.w (Conway's game), and fast_cancel.w.
Tooling & docs
gtangle -version/gweave -versionreport 0.2.0..gitignorecovers CWEB-style aux files (*.idx,*.scn).- VS Code: control codes after leading whitespace are highlighted; VSIX install
is recommended. - README and manual updates.