https://github.com/speedata/linebreak-web
A web frontend for the boxes and glue line breaking algorithm
https://github.com/speedata/linebreak-web
algorithm boxesandglue golang linebreaking tex typesetting wasm
Last synced: 1 day ago
JSON representation
A web frontend for the boxes and glue line breaking algorithm
- Host: GitHub
- URL: https://github.com/speedata/linebreak-web
- Owner: speedata
- License: bsd-3-clause
- Created: 2023-12-16T17:14:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-12T12:14:22.000Z (over 1 year ago)
- Last Synced: 2024-08-12T13:48:34.907Z (over 1 year ago)
- Topics: algorithm, boxesandglue, golang, linebreaking, tex, typesetting, wasm
- Language: JavaScript
- Homepage: https://linebreak.boxesandglue.dev
- Size: 932 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License.md
Awesome Lists containing this project
README
# linebreak-web
**This is purely experimental!**
## About
This is a playground for boxes and glue's line breaking algorithm.
I'd like to have a visual test for the line breaking algorithm of boxes and glue, so I render the result to an HTML canvas.
There will be more bells and whistles following, but I need a first commit, so here it is.
## Running / compiling
You need a Go compiler
# build
GOARCH=wasm GOOS=js go build -o linebreak.wasm
# serve:
python3 -m http.server
# open localhost:8000 and then open index.html
## Technique
I use a small Go layer to the boxes and glue library (also written in Go) and compile it to [Web Assembly (wasm)](https://en.wikipedia.org/wiki/WebAssembly). There is a small JavaScript interface to the Web Assembly program.
## Thanks
Many thanks to Didier Verna for [etap](https://github.com/didierverna/etap) that inspired me to create this. etap is far (yes far!) more advanced.