Skip to content

5.8 Paths

Paths generates helper paths directly on top of a placed shape.

Unlike Marks, which are defined globally in the first column and follow the page layout, Paths are attached to individual cell content. They are useful when each tile, hex, or placed object needs its own internal guides.

5.8.1 Typical Use

Use Paths when you want lines such as:

  • a single hex edge
  • a line from the center to one side
  • a line between two vertices
  • a curved connection between two sides
  • a bridge from one hex center to the neighboring hex center through a shared side
  • a chained route that continues through several neighboring hexes

This is especially useful for hex maps, hextiles, movement guides, borders, and local overlays.

5.8.2 Syntax

Paths is attached to the object token itself:

tile_id.P{path_style [a b]}
tile_id.P{path_style [5a 79]}
tile_id.P{path_style [ab cd]}
.P{path_style [a b d]}

You can define several styled groups in the same block:

tile_id.P{path_main [a c e] path_aux [5a 5c]}
tile_id.P{t=path_main [ab] t=path_aux [5A5]}

Each pair is:

  • a style id
  • followed by a token list in [...]

The style id may reference:

  • one path
  • or a group of paths, used as a style stack in the same z-order

5.8.3 Where It Applies

Paths belongs to the cell content, not to the page layout header.

You can attach it explicitly to a target:

tile_id.P{path_style [ab]}

or use it directly on the current placed target:

.P{path_style [ab]}

So this is the right mental model:

  • Marks -> page/layout-level cutting or registration guides
  • Paths -> per-cell geometry drawn on a placed target

5.8.4 Hex Nomenclature

For hex shapes, PnPInk uses:

  • sides: a b c d e f
  • vertices: 8 9 3 2 1 7
  • center: 5

The vertices follow the same keypad-style convention already used elsewhere in the DSL.

5.8.5 Sides

Each lowercase letter refers to one hex side:

[a]
[b]
[c]

These draw the corresponding edge itself.

5.8.6 Center to Side

5a, 5b, 5c ... draw a straight line from the center of the hex to the midpoint of that side.

Examples:

[5a]
[5c 5f]

5.8.7 Vertex to Vertex

Two keypad numbers draw a straight segment between vertices.

Examples:

[79]
[93]
[12]

5.8.8 Side to Side

Two lowercase side letters draw a connection between side midpoints.

Examples:

[ab]
[ac]
[ad]

Depending on the relative position, this becomes:

  • a straight line for opposite sides
  • or a curved connection for non-opposite sides

5.8.9 Center to Neighboring Hex

An uppercase side letter in the form 5A5, 5B5, ... means:

  • start at the center of this hex
  • go through the midpoint of that side
  • continue to the center of the neighboring hex on that side

Examples:

[5A5]
[5C5 5F5]

This is useful for:

  • adjacency guides
  • movement links
  • map connectivity

5.8.10 Chained Neighbor References

You can also build continuous routes through several neighboring hexes.

Examples:

[5A9]
[3C3]
[5ABB3C2]

This means:

  • 5A9: from the current center to vertex 9 of the neighboring hex on side A
  • 3C3: from vertex 3 of the current hex to vertex 3 of the neighboring hex on side C
  • 5ABB3C2: one continuous polyline through several steps

If the chain is written without spaces, it stays as one continuous path. If you separate the tokens with spaces, PnPInk creates separate paths.

Important: in chained references, each new step starts from the last resolved hex, not from the original hex.

So:

[5ABB3C2]

continues from the hex reached by ABB3, and then applies C2 from there.

5.8.11 Style Reuse

The path geometry comes from the tokens, but the visual appearance comes from the referenced style element.

So a common pattern is:

tile_id.P{path_thin [a b c] path_bold [5A5]}

This lets you draw different local guides with different strokes while keeping the syntax compact.

If the style id points to a group, PnPInk generates one path per child path in that group and preserves their stacking order. This is useful for multi-stroke styles such as railways, roads, or layered local guides.