Skip to content

boxesandglue/glu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

rake build      # creates bin/glu

License

MIT

About

glu is a command line interface for boxes and glue using Lua scripting

Topics

Resources

License

Stars

Watchers

Forks

Contributors