Skip to content
boxesandgluePublic

About

glu is markdown to PDF processor using boxes and glue

Topics

Resources

Stars

4 stars

Watchers

2 watching

Forks

Repository files navigation

Explore in Constellation Homepage

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, a Go library that implements TeX's algorithms.

glu document.md        # → document.pdf

Two-column scientific paper with equations and figures, made by glu from Markdown

More examples, each with its source and the resulting PDF, are in the boxesandglue-examples repository.

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

---
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))
```
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

Installation

With Homebrew (macOS and Linux):

brew install boxesandglue/tap/glu

Binaries for macOS, Linux and Windows are on the releases page. The manual also describes how to build glu from source.

Ecosystem

glu is part of a broader ecosystem of PDF, typesetting and publishing technologies. Explore the constellation →

License

MIT

About

glu is markdown to PDF processor using boxes and glue

Topics

Resources

Stars

4 stars

Watchers

2 watching

Forks

Releases

Contributors

Languages