Mermaid:Theme test: Difference between revisions

Label every shape with its official meaning and syntax; add the ANSI symbols reachable only via @{ shape: }
Make the six captions borderless so they read as annotations, not as shapes
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
   subgraph FLOW [Start, end and flow control]
   subgraph FLOW [Start, end and flow control]
     direction LR
     direction LR
     f1(["Start / end<br/>&#40;&#91;text&#93;&#41;"]) ~~~ f2(("Connector<br/>&#40;&#40;text&#41;&#41;")) ~~~ f3@{ shape: f-circ, label: "Junction<br/>&#64;&#123; shape: f-circ &#125;" }
     f1(["Start / end<br/>([text])"]) ~~~ f2(("Connector<br/>((text))"))
    f4@{ shape: fork, label: "Fork / join<br/>&#64;&#123; shape: fork &#125;" } ~~~ f5@{ shape: notch-pent, label: "Loop limit<br/>&#64;&#123; shape: notch-pent &#125;" }
    f3@{ shape: f-circ } ~~~ c1@{ shape: text, label: "Junction<br/>@{ shape: f-circ }" } ~~~ f4@{ shape: fork } ~~~ c2@{ shape: text, label: "Fork / join<br/>@{ shape: fork }" }
    f5@{ shape: notch-pent, label: "Loop limit<br/>@{ shape: notch-pent }" }
   end
   end


   subgraph STEPS [Steps and actions]
   subgraph STEPS [Steps and actions]
     direction LR
     direction LR
     s1["Process<br/>&#91;text&#93;"] ~~~ s2[["Subprocess<br/>&#91;&#91;text&#93;&#93;"]] ~~~ s3@{ shape: st-rect, label: "Multi-process<br/>&#64;&#123; shape: st-rect &#125;" }
     s1["Process<br/>[text]"] ~~~ s2[["Subprocess<br/>[[text]]"]] ~~~ s3@{ shape: st-rect, label: "Multi-process<br/>@{ shape: st-rect }" }
     s4@{ shape: lin-rect, label: "Lined / shaded process<br/>&#64;&#123; shape: lin-rect &#125;" } ~~~ s5@{ shape: div-rect, label: "Divided process<br/>&#64;&#123; shape: div-rect &#125;" } ~~~ s6[\"Manual operation<br/>&#91;&#92;text&#47;&#93;"/]
     s4@{ shape: lin-rect, label: "Lined / shaded process<br/>@{ shape: lin-rect }" } ~~~ s5@{ shape: div-rect, label: "Divided process<br/>@{ shape: div-rect }" } ~~~ s6[\"Manual operation<br/>[\text/]"/]
     s7[/"Priority action<br/>&#91;&#47;text&#92;&#93;"\] ~~~ s8{{"Prepare / condition<br/>&#123;&#123;text&#125;&#125;"}} ~~~ s9@{ shape: delay, label: "Delay<br/>&#64;&#123; shape: delay &#125;" }
     s7[/"Priority action<br/>[/text\]"\] ~~~ s8{{"Prepare / condition<br/>{{text}}"}} ~~~ s9@{ shape: delay, label: "Delay<br/>@{ shape: delay }" }
   end
   end


   subgraph DEC [Decision]
   subgraph DEC [Decision]
     direction LR
     direction LR
     d1{"Decision<br/>&#123;text&#125;"}
     d1{"Decision<br/>{text}"}
   end
   end


   subgraph IO [Data, input and output]
   subgraph IO [Data, input and output]
     direction LR
     direction LR
     i1[/"Data in / out<br/>&#91;&#47;text&#47;&#93;"/] ~~~ i2[\"Data in / out (alt)<br/>&#91;&#92;text&#92;&#93;"\] ~~~ i3@{ shape: sl-rect, label: "Manual input<br/>&#64;&#123; shape: sl-rect &#125;" }
     i1[/"Data in / out<br/>[/text/]"/] ~~~ i2[\"Data in / out (alt)<br/>[\text\]"\] ~~~ i3@{ shape: sl-rect, label: "Manual input<br/>@{ shape: sl-rect }" }
     i4@{ shape: curv-trap, label: "Display<br/>&#64;&#123; shape: curv-trap &#125;" } ~~~ i5@{ shape: doc, label: "Document<br/>&#64;&#123; shape: doc &#125;" } ~~~ i6@{ shape: docs, label: "Multi-document<br/>&#64;&#123; shape: docs &#125;" }
     i4@{ shape: curv-trap, label: "Display<br/>@{ shape: curv-trap }" } ~~~ i5@{ shape: doc, label: "Document<br/>@{ shape: doc }" } ~~~ i6@{ shape: docs, label: "Multi-document<br/>@{ shape: docs }" }
     i7@{ shape: lin-doc, label: "Lined document<br/>&#64;&#123; shape: lin-doc &#125;" } ~~~ i8@{ shape: flag, label: "Paper tape<br/>&#64;&#123; shape: flag &#125;" } ~~~ i9@{ shape: notch-rect, label: "Card<br/>&#64;&#123; shape: notch-rect &#125;" }
     i7@{ shape: lin-doc, label: "Lined document<br/>@{ shape: lin-doc }" } ~~~ i8@{ shape: flag, label: "Paper tape<br/>@{ shape: flag }" } ~~~ i9@{ shape: notch-rect, label: "Card<br/>@{ shape: notch-rect }" }
   end
   end


   subgraph STORE [Storage]
   subgraph STORE [Storage]
     direction LR
     direction LR
     t1[("Database<br/>&#91;&#40;text&#41;&#93;")] ~~~ t2@{ shape: h-cyl, label: "Direct access storage<br/>&#64;&#123; shape: h-cyl &#125;" } ~~~ t3@{ shape: lin-cyl, label: "Disk storage<br/>&#64;&#123; shape: lin-cyl &#125;" }
     t1[("Database<br/>[(text)]")] ~~~ t2@{ shape: h-cyl, label: "Direct access storage<br/>@{ shape: h-cyl }" } ~~~ t3@{ shape: lin-cyl, label: "Disk storage<br/>@{ shape: lin-cyl }" }
     t4@{ shape: bow-rect, label: "Stored data<br/>&#64;&#123; shape: bow-rect &#125;" } ~~~ t5@{ shape: win-pane, label: "Internal storage<br/>&#64;&#123; shape: win-pane &#125;" }
     t4@{ shape: bow-rect, label: "Stored data<br/>@{ shape: bow-rect }" } ~~~ t5@{ shape: win-pane, label: "Internal storage<br/>@{ shape: win-pane }" }
   end
   end


   subgraph MISC [Other standard symbols]
   subgraph MISC [Other standard symbols]
     direction LR
     direction LR
     m1@{ shape: cross-circ, label: "Summary<br/>&#64;&#123; shape: cross-circ &#125;" } ~~~ m2@{ shape: hourglass, label: "Collate<br/>&#64;&#123; shape: hourglass &#125;" } ~~~ m3@{ shape: tri, label: "Extract<br/>&#64;&#123; shape: tri &#125;" }
     m1@{ shape: cross-circ } ~~~ c3@{ shape: text, label: "Summary<br/>@{ shape: cross-circ }" } ~~~ m2@{ shape: hourglass } ~~~ c4@{ shape: text, label: "Collate<br/>@{ shape: hourglass }" }
    m4@{ shape: flip-tri, label: "Manual file<br/>&#64;&#123; shape: flip-tri &#125;" } ~~~ m5@{ shape: brace, label: "Comment<br/>&#64;&#123; shape: brace &#125;" }
    m3@{ shape: tri, label: "Extract<br/>@{ shape: tri }" } ~~~ m4@{ shape: flip-tri, label: "Manual file<br/>@{ shape: flip-tri }" }
    m5@{ shape: brace, label: "Comment<br/>@{ shape: brace }" }
   end
   end


   subgraph AVOID [Avoid - these clash with our convention above]
   subgraph AVOID [Avoid - these clash with the convention above]
     direction LR
     direction LR
     a1("Mermaid calls this Event - use Start / end<br/>&#40;text&#41;") ~~~ a2@{ shape: sm-circ, label: "Mermaid calls this Start - use Start / end<br/>&#64;&#123; shape: sm-circ &#125;" } ~~~ a3@{ shape: fr-circ, label: "Mermaid calls this Stop - use Start / end<br/>&#64;&#123; shape: fr-circ &#125;" }
     a1("Mermaid calls this Event - use Start / end<br/>(text)") ~~~ a2@{ shape: sm-circ } ~~~ c5@{ shape: text, label: "Mermaid calls this Start - use Start / end<br/>@{ shape: sm-circ }" }
    a3@{ shape: fr-circ } ~~~ c6@{ shape: text, label: "Mermaid calls this Stop - use Start / end<br/>@{ shape: fr-circ }" }
   end
   end


   subgraph UNDEF [No agreed meaning here - kept for reference only]
   subgraph UNDEF [No agreed meaning here - kept for reference only]
     direction LR
     direction LR
     u1((("Undefined<br/>&#40;&#40;&#40;text&#41;&#41;&#41;"))) ~~~ u2>"Undefined<br/>&gt;text&#93;"]
     u1((("Undefined<br/>(((text)))"))) ~~~ u2>"Undefined<br/>>text]"]
   end
   end


Line 55: Line 58:
   MISC ~~~ AVOID
   MISC ~~~ AVOID
   AVOID ~~~ UNDEF
   AVOID ~~~ UNDEF
  %% Captions for the six shapes that cannot carry a label of their own.
  %% Borderless so they read as annotations rather than as shapes.
  classDef caption fill:none,stroke:none;
  class c1,c2,c3,c4,c5,c6 caption;