["graphviz", "sample1.png"] --------------------------------------------------------------------- digraph G { rankdir=LR; Graphviz->AsciiDoc->HTML} ---------------------------------------------------------------------
»Home
»a2x
»FAQ
|
Graphviz filter for AsciiDocAuthor: Gouichi Iisaka Version: 1.1.3 IntroductionThe Graphviz(http://www.graphviz.org) is a way of representing structural information as diagrams of abstract graphs and networks. Automatic graph drawing has many important applications in software engineering, database and web design, networking, and in visual interfaces for many other domains. Graphviz take descriptions of graphs in a simple text language, And has many useful features for concrete diagrams, such as options for colors, fonts, tabular node layouts, line styles, hyperlinks, and custom shapes. AsciiDoc can external shell commands used to process Paragraph and DelimitedBlock content by Filter. So now, AsciiDoc can draw graphs via graphviz filter. ExamplesSimple["graphviz", "sample1.png"] --------------------------------------------------------------------- digraph G { rankdir=LR; Graphviz->AsciiDoc->HTML} --------------------------------------------------------------------- ![]() Using options["graphviz", "sample2.png"] --------------------------------------------------------------------- digraph automata_0 { size ="8.5, 11"; node [shape = circle]; 0 [ style = filled, color=lightgrey ]; 2 [ shape = doublecircle ]; 0 -> 2 [ label = "a " ]; 0 -> 1 [ label = "other " ]; 1 -> 2 [ label = "a " ]; 1 -> 1 [ label = "other " ]; 2 -> 2 [ label = "a " ]; 2 -> 1 [ label = "other " ]; "Machine: a" [ shape = plaintext ]; } --------------------------------------------------------------------- ![]() Using Layout["graphviz", "sample3.png", "dot"] --------------------------------------------------------------------- digraph finite_state_machine { rankdir=LR; size="8,5" node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8; node [shape = circle]; LR_0 -> LR_2 [ label = "SS(B)" ]; LR_0 -> LR_1 [ label = "SS(S)" ]; LR_1 -> LR_3 [ label = "S($end)" ]; LR_2 -> LR_6 [ label = "SS(b)" ]; LR_2 -> LR_5 [ label = "SS(a)" ]; LR_2 -> LR_4 [ label = "S(A)" ]; LR_5 -> LR_7 [ label = "S(b)" ]; LR_5 -> LR_5 [ label = "S(a)" ]; LR_6 -> LR_6 [ label = "S(b)" ]; LR_6 -> LR_5 [ label = "S(a)" ]; LR_7 -> LR_8 [ label = "S(b)" ]; LR_7 -> LR_5 [ label = "S(a)" ]; LR_8 -> LR_6 [ label = "S(b)" ]; LR_8 -> LR_5 [ label = "S(a)" ]; } --------------------------------------------------------------------- ![]() LayoutLayout for graphviz as follows. The default is ‘dot’.
|