How to draw the following raw diagram using fletcher page?
I used raw text for drawing the diagram
Hey,
JL710 made a snippet here, which should help you solve this:
Thank you for your feedback.
Hi @Vito0912, thank you for your answer! I would ask you to add the code of your snippet to your post—for a couple of reasons: it makes your forum post easier to follow (which the embedded preview of the snippyst link does too, so thank you for that), it reduces the chance of link rot removing a vital part of your answer in the long term, and it makes the licensing of the code unambiguous (see also FAQ - Typst Forum).
Thanks!
I can share the code in addition to the previews in the future.
and it makes the licensing of the code unambiguous
No, it does not. Many don’t even know the license here, not to say that all have to follow that license (if a link gets shared, the provided content, definitively does not fall under the forum license, if you mean that by unambiguous).
Any code snippet shared there can be used in binary or compiled form without any attribution. A user can add a license that adds the need for attribution.
I, in the future, will add the initial code:
#import "@preview/fletcher:0.5.8"
#fletcher.diagram(node-shape: rect, node-stroke: black, {
import fletcher: edge, node
node((0, 1), [Inner Node 1], name: <in11>)
node((1, 1), [Inner Node 2], name: <in12>)
node((.5, .5), [Outer Node], stroke: none, name: <on1>)
node((0, 0), enclose: (<in11>, <in12>, <on1>), name: <enc1>)
node((0, 3), [Inner Node 1], name: <in21>)
node((1, 3), [Inner Node 2], name: <in22>)
node((.5, 2.5), [Outer Node], stroke: none, name: <on2>)
node((0, 3), enclose: (<in21>, <in22>, <on2>), name: <enc2>)
edge(<enc1.south>, "-|>", <enc2.north>)
})
