RelGeo intentionally supports two markdown surfaces:
rgfor source readingrelgeofor rendered preview or embed
This separation matters because authors and readers should be able to choose their intent clearly.
When to use rg
Use rg when the RelGeo source itself is part of the document content.
Examples:
- syntax tutorials
- language-contract explanations
- source review or audit notes
- articles that need to show the drawing rules line by line
Example:
version: 0.5
metaPresets:
:
fill: "#e2e8f0"
stroke: "#64748b"
objects:
panel:
type: rect
size: [80, 40]
place:
topLeft: [0, 0]
metaPreset: plate
holes:
- circle:
center: panel.center
radius: 10
In this mode, the reader is expected to read the source as the primary artifact.
When to use relgeo
Use relgeo when the document should show the rendered drawing rather than a second code block.
Examples:
- drawing previews in articles
- embedded visuals in product documentation
- pages that demonstrate that RelGeo can live naturally inside Markdown
Example with the exact same source:
In this mode, the code is not shown again. The rendered result is shown instead.
Public Contract Principle
What the docs site and the RelGeo markdown plugins should preserve:
- one source can serve two different reading intents
rgemphasizes source readabilityrelgeoemphasizes the rendered artifact- authors should not need to export PNG files just to place drawings inside Markdown
This is an important part of the RelGeo vision as a language for free-form vector drawings that can live inside text-first media.