aurel
June 14, 2025, 3:57pm
1
Hi, does anybody here know if it is possible to place a chronos diagram inside of a fletcher diagram?
Basically, I want to have a fletcher diagram which has a node that encapsulates a chronos diagram.
I would expect it to be possible, as both use CETZ as the backend, but have no idea where even to begin to search for a solution.
aurel
June 14, 2025, 3:59pm
2
Even the ability to embed a fletcher diagram inside another fletcher diagram would be good. This is because I want different elastic coordinates for the two distinct parts of the (full) diagram.
aurel
June 14, 2025, 4:51pm
3
It is actually possible to have a diagram as the content of a node. This solves this.
#import "@preview/chronos:0.2.1"
#import "@preview/fletcher:0.5.8"
#import fletcher: node, edge
#fletcher.diagram(
node-stroke: 0.5pt,
spacing: 1em,
let node = node.with(shape: rect),
node((0,1), rotate(-90deg, reflow: true)[elaboration phase], name: <elab>),
edge(<elab.north-east>, <flow.north-west>, "--"),
edge(<elab.south-east>, <flow.south-west>, "--"),
node((rel: (3,0.2), to: <elab>), [
#chronos.diagram({
import chronos: *
_par("Actor")
_sep("Separator")
_seq("Actor", "Actor", comment: [test])
})
], name: <flow>),
)
Generates:
2 Likes