The model layer

Unifile documents have three layers of structure: the DSL (what syntax a section uses), the layout (how sections are arranged visually), and the model (the coordinate metaphor that governs the whole document).

Models are the newest addition and the least visible. Here's what they do.

What a model is

A model is a named coordinate system for thinking about your content. The five built-in models are:

You declare one in front matter:

model: spatial

What they unlock

The model tells the renderer how to lay out sections and what navigation gestures make sense. A spatial model might let you pan and zoom. A timeline model might let you scrub through time. A graph model might let you follow edges.

Most of this is aspirational — today, only flow and slides layout are fully implemented. But the model field is in the format now, so documents written today will carry the right metadata forward.