{"id":13995118,"url":"https://github.com/tectonic-typesetting/tt-weave","last_synced_at":"2025-07-22T21:32:06.040Z","repository":{"id":61781298,"uuid":"545794548","full_name":"tectonic-typesetting/tt-weave","owner":"tectonic-typesetting","description":"A WEAVE-like program targeting Tectonic HTML output. ","archived":false,"fork":false,"pushed_at":"2022-10-21T03:06:08.000Z","size":427,"stargazers_count":6,"open_issues_count":13,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-10T14:18:22.812Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tectonic-typesetting.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-05T01:43:15.000Z","updated_at":"2023-11-28T05:20:14.000Z","dependencies_parsed_at":"2022-10-21T04:00:24.983Z","dependency_job_id":null,"html_url":"https://github.com/tectonic-typesetting/tt-weave","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tectonic-typesetting%2Ftt-weave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tectonic-typesetting%2Ftt-weave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tectonic-typesetting%2Ftt-weave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tectonic-typesetting%2Ftt-weave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tectonic-typesetting","download_url":"https://codeload.github.com/tectonic-typesetting/tt-weave/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227177776,"owners_count":17743165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-09T14:03:15.523Z","updated_at":"2024-11-29T17:31:02.033Z","avatar_url":"https://github.com/tectonic-typesetting.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# tt-weave\n\nThis repository contains an experimental-ish tool that converts programs in\nKnuth’s [WEB] language into high-quality HTML. Traditionally, the program that\nturns WEB into documentation is called [weave]. The TeX code emitted by\n`tt-weave` can be processed into HTML by [Tectonic] and then bundled into an\ninteractive web application using [yarn] and [Parcel]. The only fully supported\nuse case is creating an HTML book called [*XeTeX: A Pseudoprogram*]. The\n`tt-weave` program can also process a smaller test case, a book about [weave]\nitself called [*The WEAVE Processor*].\n\n[WEB]: https://www.ctan.org/pkg/web\n[weave]: https://www.ctan.org/pkg/weave\n[Tectonic]: https://tectonic-typesetting.github.io/\n[yarn]: https://yarnpkg.com/\n[Parcel]: https://parceljs.org/\n[*XeTeX: A Pseudoprogram*]: https://stacks.fullyjustified.net/xap/2022.0/\n[*The WEAVE Processor*]: https://stacks.fullyjustified.net/weave/2022.0/\n\n\n## Building the books\n\nTo build a book you need:\n\n- [Rust]\n- [Tectonic] \u003e= 0.11.0\n- [yarn]\n\n[Rust]: https://rust-lang.org/\n\nThe full build process involves transforming WEB source to TeX, then the TeX to\nHTML precursors. Finally the HTML precursors are bundled with a [Vue.js] web\napplication framework to create the final book.\n\n[Vue.js]: https://vuejs.org/\n\n1. Set up an input WEB file. There are two supported options:\n   - Download [weave.web] and place it in the directory containing this file\n   - Download `xetex.web` as described below.\n2. `./yarn.sh install`\n3. `./weave.sh $inputfilename`\n4. `./tectonic.sh`\n5. `./yarn.sh serve` or `./yarn.sh build`\n\n[weave.web]: https://ctan.org/tex-archive/systems/knuth/dist/web/weave.web\n\nThe reference version of `xetex.web` used to test this tool is the one produced\nby the [tectonic-staging] build process. This can be obtained from [the GitHub\nreleases associated with that repo][ts-releases], as an “asset” with a name of\nthe form `tectonic-book-tlYYYY.RR.web`.\n\n[tectonic-staging]: https://github.com/tectonic-typesetting/tectonic-staging/\n[ts-releases]: https://github.com/tectonic-typesetting/tectonic-staging/releases/\n[xetex.web]: https://github.com/tectonic-typesetting/tectonic-staging/releases/\n\n\n## Background\n\n[WEB] is a language for literate programming invented by Donald E. Knuth. A WEB\nprogram is distributed as a single text file that interleaves both source and\ndocumentation. The source is essentially Pascal code, augmented with a\nsophisticated preprocessor. The documentation is TeX code. A tool called\n`tangle` converts the WEB source to a preprocessed Pascal file, while a tool\ncalled `weave` converts it to a TeX file expressing the documented source code.\n\nThe TeX code emitted by the traditional `weave` program is plain TeX that can\nbe compiled into a large PDF book. The purpose of this project is to make it\npossible to compile WEB code into high-quality HTML as well.\n\nA further complication is that the traditonal `weave` representation of the WEB\nsource code is unusual by modern standards and, in this writer’s opinion, quite\nhard to read. The `tt-weave` program therefore parses the WEB code and\npretty-prints it into a somewhat more familiar, C/Rust-like syntax. Because WEB\nis heavily macro-based, however, it is not possible to do this in full\ngenerality. While other inputs might be processed successfully, `tt-weave` only\nofficially supports `weave.web` and `xetex.web` as inputs.\n\n\n## Repository Overview\n\nConverting WEB code to an interactive web app is a multi-step process:\n\n1. The `tt-weave` Rust program converts a original WEB file into a large, very\n   specialized TeX file. This program is rooted in the top-level directory of\n   this repository, with source in `src/`. The `weave.sh` script emits the TeX\n   code into the file `template/src/index.tex`.\n2. The TeX source then needs to be compiled into HTML using Tectonic. The script\n   `./tectonic.sh` wraps this process. The subdirectory `template/` contains a\n   Tectonic document with specialized macros and definitions in `template/src/`\n   that are compiled into HTML outputs, which land in the directory\n   `template/build/default/`. The wrapper script copies these outputs into\n   `app/src/ttw/`.\n3. Finally, the HTML code needs to be bundled with a web app implementation to\n   create the final product. This is done using Yarn, wrapped with the `yarn.sh`\n   script. The `app/` subdirectory of this repo contains the bulk of this\n   app implementation, with a hierarchy of [Vue.js] components defined in the\n   `app/src/` subdirectory. The HTML/CSS structure was largely inspired by that\n   of the [mdBook](https://rust-lang.github.io/mdBook/) tool.\n\n[Vue.js]: https://vuejs.org/\n\nThis might seem complicated, but even though tt-weave’s HTML output is “just” a\ndocument, the user interface surrounding that document quickly becomes complex\nenough to benefit from tooling such as [Vue.js] and [TypeScript].\n\n[TypeScript]: https://typescriptlang.org/\n\n\n## Legalities\n\ntt-weave is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftectonic-typesetting%2Ftt-weave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftectonic-typesetting%2Ftt-weave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftectonic-typesetting%2Ftt-weave/lists"}