No description
Find a file
2026-09-28 17:40:54 -04:00
example.pdf rendered example file 2026-09-28 17:40:54 -04:00
example.typ Tweak example PDF to use A3 2026-09-28 12:17:05 -04:00
grid.typ Draw decorations at dedicated anchors with visual separator 2026-09-28 17:40:20 -04:00
LICENSE cleanup for a proper tagged release 2026-09-28 10:18:01 -04:00
README.md link to examples file 2026-09-28 12:22:13 -04:00

Usage

Quick Start

Below is a self-contained example of how to create a single map with 3 detail blocks.

#import "grid.typ": map, mapDetails

#let core1 = (
  title: "Ding Dong",
  sitrep: "Escort",
  summary: "Get the beer to the soldiers.",
  conditions: "Acid Rain"
)

#let opfor1 = (
    "Angel": 3,
    "Demolisher": 1,
    "Hive":1,
)

#let details1 = (
  "Civilian Population": "Hostile",
  "Status": "Cooked",
)

#let tiles1 = (
  "R__", "B__", "G_1", "W_1", "Y_1", "O_1", "___", "___", "___", "___",
  "GX_", "GM1", "GD_", "__1", "__1", "__1", "___", "___", "___", "___",
  "G__", "G_1", "G__", "___", "___", "___", "___", "___", "___", "___",
  "G__", "G_1", "G__", "__1", "__1", "__1", "__1", "___", "___", "___",
  "___", "G__", "__1", "__1", "__1", "__1", "__1", "___", "___", "___",
  "___", "___", "___", "___", "___", "___", "___", "___", "___", "___",
  "___", "___", "___", "___", "___", "___", "___", "___", "___", "___",
  "___", "___", "___", "___", "___", "___", "___", "___", "___", "___",
  "___", "___", "___", "___", "___", "___", "___", "___", "___", "___",
  "___", "___", "___", "___", "___", "___", "___", "___", "___", "___",
  "___", "___", "___", "___", "___", "___", "___", "___", "___", "___",
  "___", "___", "___", "___", "___", "___", "___", "___", "___", "___",
)

#grid(
  align: center,
  columns: (1fr, 1fr, 1fr, 1fr, 1fr, 1fr),
  mapDetails(core1),
  mapDetails(opfor1),
  mapDetails(details1),
  map(type: "hex", title: "map1", top, 10, 12, tiles1),
)

Examples

I built the API to be composable and configurable. Please review example.typ for examples of the different ways you can combine these building blocks.

Primitives

map

This is the centerpiece of griddy and has the following signature:

map(type: "hex", title: "", colspan: 3, align, x,y, tiles)

  • type: string, "hex" or "square"
  • title: string, The name of the map.
  • colspan: int, 3 or 6 for half or full-page spread
  • align: alignment, top or bottom. Only relevant with colspan:3
  • x,y: int, the horizontal and vertical dimensions of the map in tiles
  • tiles: []string, an array of strings describing the decorations for each tile

mapDetails

mapDetails(values, columns: (1fr,1fr))

  • values: dict, key/value pairs to be displayed in a table
  • columns: see typst's column documentation. assumes only two columns, this is only for controlling their size relative to each other.

Credits

All credit goes to Orange from the Lancer discord for inspiring me with their document design. All I did was teach a computer how to replicate it.