https://github.com/boxesandglue/glu
glu is a command line interface for boxes and glue using Lua scripting
https://github.com/boxesandglue/glu
lua pdf publishing typesetting
Last synced: 4 months ago
JSON representation
glu is a command line interface for boxes and glue using Lua scripting
- Host: GitHub
- URL: https://github.com/boxesandglue/glu
- Owner: boxesandglue
- License: mit
- Created: 2025-12-27T21:56:04.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-12-29T20:37:11.000Z (6 months ago)
- Last Synced: 2025-12-31T01:52:15.604Z (6 months ago)
- Topics: lua, pdf, publishing, typesetting
- Language: Go
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://boxesandglue.dev/glu)
# glu
**Markdown to PDF. With typographic precision.**
glu turns Markdown into beautifully typeset PDFs — with real line breaking, hyphenation, font shaping, and all the things you'd expect from a proper typesetting engine. Under the hood it uses [boxes and glue](https://github.com/boxesandglue/boxesandglue), a Go library that implements TeX's algorithms.
```bash
glu document.md # → document.pdf
```
## What makes glu different?
- **Markdown first** — Write Markdown, get a PDF with proper typography. No LaTeX, no XML.
- **CSS for styling** — Page size, fonts, margins, borders, background colors — all via CSS.
- **Lua for logic** — Embed Lua blocks for computed content, table of contents, dynamic data.
- **Callbacks** — Hook into page creation for headers, footers, decorative frames, watermarks.
- **TeX quality** — Knuth-Plass line breaking, optical margin alignment, microtypography.
## Quick example
````markdown
---
title: The Frog King
css: custom.css
---
# Once upon a time
In olden times when wishing still helped one,
there lived a king whose daughters were all beautiful.
```{lua}
return string.format("5! = %d", factorial(5))
```
````
```bash
glu story.md # → story.pdf
```
## More
glu also supports raw HTML mode, low-level Lua scripting for full control, and direct access to the typesetting engine's node lists.
Full documentation: **[boxesandglue.dev/glu](https://boxesandglue.dev/glu)**
## Installation
```bash
rake build # creates bin/glu
```
## License
MIT