asciidoctor-diagram 2.2.9 → 2.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +22 -0
  3. data/docs/antora.yml +3 -1
  4. data/docs/modules/ROOT/images/a2s.svg +44 -0
  5. data/docs/modules/ROOT/images/actdiag.png +0 -0
  6. data/docs/modules/ROOT/images/asciidoctor-diagram-process.png +0 -0
  7. data/docs/modules/ROOT/images/barcode.png +0 -0
  8. data/docs/modules/ROOT/images/barcode2.png +0 -0
  9. data/docs/modules/ROOT/images/blockdiag.png +0 -0
  10. data/docs/modules/ROOT/images/d2.png +0 -0
  11. data/docs/modules/ROOT/images/lilypond.png +0 -0
  12. data/docs/modules/ROOT/images/penrose.png +0 -0
  13. data/docs/modules/ROOT/nav.adoc +41 -0
  14. data/docs/modules/ROOT/{partials/create_diagram.adoc → pages/blocks.adoc} +52 -48
  15. data/docs/modules/ROOT/pages/diagram_types/a2s.adoc +47 -0
  16. data/docs/modules/ROOT/pages/diagram_types/actdiag.adoc +46 -0
  17. data/docs/modules/ROOT/pages/diagram_types/barcode.adoc +72 -0
  18. data/docs/modules/ROOT/pages/diagram_types/blockdiag.adoc +38 -0
  19. data/docs/modules/ROOT/pages/diagram_types/bpmn.adoc +21 -0
  20. data/docs/modules/ROOT/pages/diagram_types/bytefield.adoc +16 -0
  21. data/docs/modules/ROOT/pages/diagram_types/d2.adoc +43 -0
  22. data/docs/modules/ROOT/pages/diagram_types/dbml.adoc +16 -0
  23. data/docs/modules/ROOT/pages/diagram_types/diagrams.adoc +20 -0
  24. data/docs/modules/ROOT/pages/diagram_types/ditaa.adoc +31 -0
  25. data/docs/modules/ROOT/pages/diagram_types/dpic.adoc +16 -0
  26. data/docs/modules/ROOT/pages/diagram_types/erd.adoc +17 -0
  27. data/docs/modules/ROOT/pages/diagram_types/gnuplot.adoc +27 -0
  28. data/docs/modules/ROOT/pages/diagram_types/graphviz.adoc +21 -0
  29. data/docs/modules/ROOT/pages/diagram_types/lilypond.adoc +27 -0
  30. data/docs/modules/ROOT/pages/diagram_types/meme.adoc +34 -0
  31. data/docs/modules/ROOT/pages/diagram_types/mermaid.adoc +28 -0
  32. data/docs/modules/ROOT/pages/diagram_types/msc.adoc +23 -0
  33. data/docs/modules/ROOT/pages/diagram_types/nomnoml.adoc +16 -0
  34. data/docs/modules/ROOT/pages/diagram_types/nwdiag.adoc +22 -0
  35. data/docs/modules/ROOT/pages/diagram_types/penrose.adoc +50 -0
  36. data/docs/modules/ROOT/pages/diagram_types/pikchr.adoc +16 -0
  37. data/docs/modules/ROOT/pages/diagram_types/plantuml.adoc +24 -0
  38. data/docs/modules/ROOT/pages/diagram_types/seqdiag.adoc +18 -0
  39. data/docs/modules/ROOT/pages/diagram_types/shaape.adoc +18 -0
  40. data/docs/modules/ROOT/pages/diagram_types/smcat.adoc +18 -0
  41. data/docs/modules/ROOT/pages/diagram_types/structurizr.adoc +29 -0
  42. data/docs/modules/ROOT/pages/diagram_types/svgbob.adoc +21 -0
  43. data/docs/modules/ROOT/pages/diagram_types/symbolator.adoc +19 -0
  44. data/docs/modules/ROOT/pages/diagram_types/syntrax.adoc +28 -0
  45. data/docs/modules/ROOT/pages/diagram_types/tikz.adoc +21 -0
  46. data/docs/modules/ROOT/pages/diagram_types/umlet.adoc +19 -0
  47. data/docs/modules/ROOT/pages/diagram_types/vega.adoc +28 -0
  48. data/docs/modules/ROOT/pages/diagram_types/wavedrom.adoc +17 -0
  49. data/docs/modules/ROOT/pages/enabling.adoc +25 -0
  50. data/docs/modules/ROOT/{partials → pages}/generate.adoc +1 -1
  51. data/docs/modules/ROOT/pages/index.adoc +5 -14
  52. data/docs/modules/ROOT/pages/installation.adoc +32 -0
  53. data/docs/modules/ROOT/pages/output.adoc +19 -0
  54. data/docs/modules/ROOT/partials/shared-attrs.adoc +12 -0
  55. data/docs/modules/ROOT/partials/uris.adoc +2 -0
  56. data/lib/asciidoctor-diagram/barcode/converter.rb +83 -78
  57. data/lib/asciidoctor-diagram/diagram_processor.rb +10 -1
  58. data/lib/asciidoctor-diagram/diagram_source.rb +2 -2
  59. data/lib/asciidoctor-diagram/ditaa/converter.rb +3 -3
  60. data/lib/asciidoctor-diagram/lilypond/converter.rb +2 -2
  61. data/lib/asciidoctor-diagram/penrose/converter.rb +50 -0
  62. data/lib/asciidoctor-diagram/penrose/extension.rb +18 -0
  63. data/lib/asciidoctor-diagram/penrose.rb +8 -0
  64. data/lib/asciidoctor-diagram/plantuml/converter.rb +3 -3
  65. data/lib/asciidoctor-diagram/structurizr/converter.rb +6 -6
  66. data/lib/asciidoctor-diagram/structurizr/structurizr-2.0.3.jar +0 -0
  67. data/lib/asciidoctor-diagram/syntrax/converter.rb +6 -6
  68. data/lib/asciidoctor-diagram/util/java_jruby.rb +4 -0
  69. data/lib/asciidoctor-diagram/util/java_socket.rb +4 -0
  70. data/lib/asciidoctor-diagram/version.rb +1 -1
  71. data/lib/asciidoctor-diagram.rb +1 -0
  72. data/spec/barcode_spec.rb +3 -3
  73. data/spec/d2_spec.rb +1 -1
  74. data/spec/mermaid_spec.rb +0 -37
  75. data/spec/test_helper_methods.rb +4 -1
  76. metadata +56 -8
  77. data/docs/modules/ROOT/partials/advanced.adoc +0 -397
  78. data/docs/modules/ROOT/partials/installation.adoc +0 -19
  79. data/lib/asciidoctor-diagram/structurizr/structurizr-2.0.1.jar +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f5d112b2ce57cb2380687fce2fac5fe15f2f6d2c6198f722edd5aeaa08d6b7d
4
- data.tar.gz: 8d45d7df6757adfb72c0c4c4b9ba95bab649fe6a1686418f2a4ffc49fc20facb
3
+ metadata.gz: 1bfca2be423a9db1007e03538becdecb79c4b6dab96c698ff46a7371f7df7859
4
+ data.tar.gz: 492e1e9161ab35281af8b6c2dc639e4efddf7262c7bb0385e989db5acc27fce1
5
5
  SHA512:
6
- metadata.gz: 56d0bffc577cd54b56853b02454760767ff5642c935eb57e9909a0aad974ad598897e2d5f312c780471f55318de0789df39e760b917e846ec702ad0ee1640a7f
7
- data.tar.gz: 67496690a923714ba8b3757781b674862dc318680797bb118ecc00d834125b42d27770465b57db440b47ce0df3e4eebab8658d7a2aec8e5cf610bef886005655
6
+ metadata.gz: 39dc7473cf4fa31dff27eb63b86885511745fb926cba3fe6836746e2aa64a756b8eb052a43d73d518362ad53f1baa28238ac65d2f24932e7475f7b19ee304218
7
+ data.tar.gz: 3ae05389b433de9a5514c16571f31fc33b3fbeb9111a5e77f5ee2ac377de2d737cad8dc305cd90405d10a91ad97c429c6eba51b1747acbbf1d253328fac47aaa
data/CHANGELOG.adoc CHANGED
@@ -1,9 +1,31 @@
1
1
  = Asciidoctor-diagram Changelog
2
2
 
3
+ == 2.2.11
4
+
5
+ Bugfixes::
6
+
7
+ * Issue #424: avoid invalid filename characters on Windows
8
+
9
+ == 2.2.10
10
+
11
+ Enhancements::
12
+
13
+ * The location of JSyntrax and Structurizr can now also be specified using Java system properties when using JRuby.
14
+ * Add initial https://penrose.cs.cmu.edu[Penrose] support
15
+
16
+ Bugfixes::
17
+
18
+ * Ensure Structurizr themes are loaded when rendering images
19
+ * Issue #416: Silence Asciidoctor warning when using inline macros
20
+ * Issue #417: Avoid reusing images when block type is different but source code is identical
21
+ * Remove usage of LilyPond's 'safe' option since it's no longer supported
22
+
23
+
3
24
  == 2.2.9
4
25
 
5
26
  Bugfixes::
6
27
 
28
+ * Resolve UTF-8 encoding error when generating SVG for GS1-128 barcodes
7
29
  * Issue #409: Second attempt at fixing handling of the D2 `sketch` attribute
8
30
  * Issue #415: Resolve NoMethodError when using Structurizr blocks
9
31
 
data/docs/antora.yml CHANGED
@@ -1,3 +1,5 @@
1
1
  name: diagram-extension
2
2
  title: Asciidoctor Diagram
3
- version: '2.2'
3
+ version: '2.2'
4
+ nav:
5
+ - modules/ROOT/nav.adoc
@@ -0,0 +1,44 @@
1
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
2
+ <!-- Created with ASCIItoSVG -->
3
+ <svg width="261px" height="176px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4
+ <defs>
5
+ <filter id="dsFilter" width="150%" height="150%">
6
+ <feOffset result="offOut" in="SourceGraphic" dx="2" dy="2"/>
7
+ <feColorMatrix result="matrixOut" in="offOut" type="matrix" values="0.2 0 0 0 0 0 0.2 0 0 0 0 0 0.2 0 0 0 0 0 1 0"/>
8
+ <feGaussianBlur result="blurOut" in="matrixOut" stdDeviation="3"/>
9
+ <feBlend in="SourceGraphic" in2="blurOut" mode="normal"/>
10
+ </filter>
11
+ <marker id="iPointer"
12
+ viewBox="0 0 10 10" refX="5" refY="5"
13
+ markerUnits="strokeWidth"
14
+ markerWidth="8" markerHeight="15"
15
+ orient="auto">
16
+ <path d="M 10 0 L 10 10 L 0 5 z" />
17
+ </marker>
18
+ <marker id="Pointer"
19
+ viewBox="0 0 10 10" refX="5" refY="5"
20
+ markerUnits="strokeWidth"
21
+ markerWidth="8" markerHeight="15"
22
+ orient="auto">
23
+ <path d="M 0 0 L 10 5 L 0 10 z" />
24
+ </marker>
25
+ </defs>
26
+ <g id="closed" filter="url(#dsFilter)" stroke="#000" stroke-width="2" fill="none">
27
+ <path id="closed0" fill="#fff" filter="url(#dsFilter)" d="M 13.5 18 Q 13.5 8 23.5 8 L 22.5 8 L 31.5 8 L 40.5 8 L 49.5 8 L 58.5 8 L 67.5 8 L 76.5 8 L 85.5 8 L 94.5 8 L 103.5 8 L 112.5 8 L 121.5 8 L 130.5 8 L 139.5 8 L 148.5 8 L 157.5 8 L 166.5 8 L 175.5 8 L 184.5 8 L 193.5 8 L 202.5 8 L 211.5 8 L 220.5 8 L 229.5 8 L 238.5 8 L 237.5 8 Q 247.5 8 247.5 18 L 247.5 24 L 247.5 40 L 247.5 56 L 247.5 72 L 247.5 88 L 247.5 104 L 247.5 120 L 247.5 126 Q 247.5 136 237.5 136 L 238.5 136 L 229.5 136 L 220.5 136 L 211.5 136 L 202.5 136 L 193.5 136 L 184.5 136 L 175.5 136 L 166.5 136 L 157.5 136 L 148.5 136 L 139.5 136 L 130.5 136 L 121.5 136 L 112.5 136 L 103.5 136 L 94.5 136 L 85.5 136 L 76.5 136 L 67.5 136 L 58.5 136 L 49.5 136 L 40.5 136 L 31.5 136 L 22.5 136 L 23.5 136 Q 13.5 136 13.5 126 L 13.5 120 L 13.5 104 L 13.5 88 L 13.5 72 L 13.5 56 L 13.5 40 L 13.5 24 Z" />
28
+ <path id="closed1" fill="#fff" filter="url(#dsFilter)" d="M 31.5 50 Q 31.5 40 41.5 40 L 40.5 40 L 49.5 40 L 58.5 40 L 67.5 40 L 76.5 40 L 75.5 40 Q 85.5 40 85.5 50 L 85.5 56 L 85.5 72 L 85.5 78 Q 85.5 88 75.5 88 L 76.5 88 L 67.5 88 L 58.5 88 L 49.5 88 L 40.5 88 L 41.5 88 Q 31.5 88 31.5 78 L 31.5 72 L 31.5 56 Z" />
29
+ <path id="closed3" fill="#fff" filter="url(#dsFilter)" d="M 103.5 50 Q 103.5 40 113.5 40 L 112.5 40 L 121.5 40 L 130.5 40 L 139.5 40 L 148.5 40 L 147.5 40 Q 157.5 40 157.5 50 L 157.5 56 L 157.5 72 L 157.5 78 Q 157.5 88 147.5 88 L 148.5 88 L 139.5 88 L 130.5 88 L 121.5 88 L 112.5 88 L 113.5 88 Q 103.5 88 103.5 78 L 103.5 72 L 103.5 56 Z" />
30
+ <path id="closed5" fill="#fff" filter="url(#dsFilter)" d="M 175.5 50 Q 175.5 40 185.5 40 L 184.5 40 L 193.5 40 L 202.5 40 L 211.5 40 L 220.5 40 L 219.5 40 Q 229.5 40 229.5 50 L 229.5 56 L 229.5 72 L 229.5 78 Q 229.5 88 219.5 88 L 220.5 88 L 211.5 88 L 202.5 88 L 193.5 88 L 184.5 88 L 185.5 88 Q 175.5 88 175.5 78 L 175.5 72 L 175.5 56 Z" />
31
+ </g>
32
+ <g id="lines" stroke="#000" stroke-width="2" fill="none">
33
+ <path id="open2" d="M 31.5 50 Q 31.5 40 41.5 40 L 40.5 40 L 49.5 40 L 58.5 40 L 67.5 40 L 76.5 40 L 75.5 40 Q 85.5 40 85.5 50 L 85.5 56 L 85.5 72 L 85.5 78 Q 85.5 88 75.5 88 L 76.5 88 L 77.5 88 Q 67.5 88 67.5 78 L 67.5 82 Q 67.5 72 57.5 72 L 58.5 72 L 59.5 72 Q 49.5 72 49.5 62 L 49.5 66 Q 49.5 56 59.5 56 L 58.5 56 L 57.5 56 Q 67.5 56 67.5 46 " />
34
+ <path id="open4" marker-end="url(#Pointer)" d="M 175.5 50 Q 175.5 40 185.5 40 L 184.5 40 L 193.5 40 L 202.5 40 L 211.5 40 L 220.5 40 L 219.5 40 Q 229.5 40 229.5 50 L 229.5 56 L 229.5 72 L 229.5 78 Q 229.5 88 219.5 88 L 220.5 88 L 211.5 88 L 202.5 88 L 193.5 88 L 184.5 88 L 185.5 88 Q 175.5 88 175.5 78 L 175.5 72 L 184.5 72 L 193.5 72 L 202.5 72 " />
35
+ <path id="open6" marker-end="url(#Pointer)" d="M 103.5 56 L 112.5 56 L 121.5 56 L 130.5 56 " />
36
+ <path id="open7" marker-start="url(#iPointer)" d="M 202.5 56 L 211.5 56 L 220.5 56 " />
37
+ <path id="open8" marker-start="url(#iPointer)" d="M 130.5 72 L 139.5 72 L 148.5 72 " />
38
+ </g>
39
+ <g id="text" stroke="none" style="font-family:Consolas,Monaco,Anonymous Pro,Anonymous,Bitstream Sans Mono,monospace;font-size:15.2px" >
40
+ <text id="obj9" x="40.5" y="104" fill="#000">ascii</text>
41
+ <text id="obj10" x="130.5" y="104" fill="#000">2</text>
42
+ <text id="obj11" x="193.5" y="104" fill="#000">svg</text>
43
+ </g>
44
+ </svg>
Binary file
@@ -0,0 +1,41 @@
1
+ * xref:index.adoc[]
2
+ * xref:blocks.adoc[]
3
+ * xref:installation.adoc[]
4
+ * xref:generate.adoc[]
5
+ * xref:output.adoc[]
6
+ * Diagram Types
7
+ ** xref:diagram_types/a2s.adoc[]
8
+ ** xref:diagram_types/actdiag.adoc[]
9
+ ** xref:diagram_types/barcode.adoc[]
10
+ ** xref:diagram_types/blockdiag.adoc[]
11
+ ** xref:diagram_types/bpmn.adoc[]
12
+ ** xref:diagram_types/bytefield.adoc[]
13
+ ** xref:diagram_types/d2.adoc[]
14
+ ** xref:diagram_types/dbml.adoc[]
15
+ ** xref:diagram_types/diagrams.adoc[]
16
+ ** xref:diagram_types/ditaa.adoc[]
17
+ ** xref:diagram_types/erd.adoc[]
18
+ ** xref:diagram_types/gnuplot.adoc[]
19
+ ** xref:diagram_types/graphviz.adoc[]
20
+ ** xref:diagram_types/lilypond.adoc[]
21
+ ** xref:diagram_types/meme.adoc[]
22
+ ** xref:diagram_types/mermaid.adoc[]
23
+ ** xref:diagram_types/msc.adoc[]
24
+ ** xref:diagram_types/nomnoml.adoc[]
25
+ ** xref:diagram_types/nwdiag.adoc[]
26
+ ** xref:diagram_types/penrose.adoc[]
27
+ ** xref:diagram_types/pikchr.adoc[]
28
+ ** xref:diagram_types/plantuml.adoc[]
29
+ ** xref:diagram_types/seqdiag.adoc[]
30
+ ** xref:diagram_types/shaape.adoc[]
31
+ ** xref:diagram_types/smcat.adoc[]
32
+ ** xref:diagram_types/structurizr.adoc[]
33
+ ** xref:diagram_types/svgbob.adoc[]
34
+ ** xref:diagram_types/symbolator.adoc[]
35
+ ** xref:diagram_types/syntrax.adoc[]
36
+ ** xref:diagram_types/tikz.adoc[]
37
+ ** xref:diagram_types/umlet.adoc[]
38
+ ** xref:diagram_types/vega.adoc[]
39
+ ** xref:diagram_types/wavedrom.adoc[]
40
+ * Advanced Topics
41
+ ** xref:enabling.adoc[]
@@ -1,6 +1,11 @@
1
- == Creating a Diagram
1
+ = Diagram Blocks
2
+ include::partial$uris.adoc[]
2
3
 
3
- A diagram is written inside a literal block, which can accept several attributes.
4
+ Embedded diagrams are written using diagram blocks.
5
+ Diagram blocks are delimited using either the literal or listing delimiter.
6
+ which can accept several attributes.
7
+
8
+ All diagram block types share a similar structure.
4
9
 
5
10
  .Anatomy of a diagram
6
11
  ----
@@ -14,51 +19,51 @@ Diagram in appropriate syntax
14
19
  <3> The `format` attribute determines the output image format to use. If a format is not specified, the default output format for the chosen diagram type will be used.
15
20
  <4> Place the attribute list directly on top of the delimited literal block (+....+). You can also use an open block as an alternative (`--`).
16
21
 
17
- The following diagram types and output formats are available:
18
-
19
- :check: &#10003;
20
-
21
- [cols=">,5*^",options="header"]
22
- |===
23
- |Diagram Type |gif |pdf |png |svg |txt
24
- |{uri-a2s}[a2s] | | | |{check}|{check}
25
- |{uri-actdiag}[actdiag] | |{check}|{check}|{check}|
26
- |<<barcode,barcode>> | | |{check}| |{check}
27
- |{uri-blockdiag}[blockdiag] | |{check}|{check}|{check}|
28
- |{uri-bpmn}[bpmn] | |{check}|{check}|{check}|
29
- |{uri-bytefield}[bytefield] | | | |{check}|
30
- |{uri-d2}[D2] | |{check}|{check}|{check}|
31
- |{uri-diagrams}[diagrams] | |{check}|{check}|{check}|
32
- |{uri-ditaa}[ditaa] | | |{check}|{check}|{check}
33
- |{uri-dpic}[dpic] | | | |{check}|
34
- |{uri-erd}[erd] | | |{check}|{check}|
35
- |{uri-gnuplot}[gnuplot] |{check}| |{check}|{check}|{check}
36
- |{uri-dot}[graphviz] | |{check}|{check}|{check}|
37
- |<<meme,meme>> |{check}| |{check}| |
38
- |{uri-mermaid}[mermaid] | |{check}|{check}|{check}|
39
- |{uri-mscgen}[msc] | | |{check}|{check}|
40
- |{uri-nomnoml}[nomnoml] | | | |{check}|
41
- |{uri-nwdiag}[nwdiag] | |{check}|{check}|{check}|
42
- |{uri-packetdiag}[packetdiag] | |{check}|{check}|{check}|
43
- |{uri-pikchr}[pikchr] | | | |{check}|
44
- |{uri-plantuml}[plantuml] | | |{check}|{check}|{check}
45
- |{uri-rackdiag}[rackdiag] | |{check}|{check}|{check}|
46
- |{uri-seqdiag}[seqdiag] | |{check}|{check}|{check}|
47
- |{uri-shaape}[shaape] | | |{check}|{check}|
48
- |{uri-smcat}[smcat] | | | |{check}|
49
- |{uri-structurizr}[structurizr] | | |{check}|{check}|
50
- |{uri-svgbob}[svgbob] | | | |{check}|{check}
51
- |{uri-symbolator}[symbolator] | |{check}|{check}|{check}|
52
- |{uri-syntrax}[syntrax] (Syntrax) | |{check}|{check}|{check}|
53
- |{uri-jsyntrax}[syntrax] (JSyntrax)| | |{check}|{check}|
54
- |{uri-tikz}[tikz] | |{check}| |{check}|
55
- |{uri-umlet}[umlet] |{check}|{check}|{check}|{check}|
56
- |{uri-vega}[vega] | | |{check}|{check}|
57
- |{uri-vegalite}[vegalite] | | |{check}|{check}|
58
- |{uri-wavedrom}[wavedrom] | | |{check}|{check}|
59
- |===
60
-
61
- :!check:
22
+ == Diagram Macros
23
+
24
+ The diagram extensions can also be used in inline, or block macro form.
25
+
26
+ .Anatomy of a diagram block macro
27
+ ----
28
+ diagram-type::source-file-name[format=output-format] // <1> <2> <3>
29
+ ----
30
+ <1> The macro name specifies the diagram syntax that is being used.
31
+ <2> The source file name specifies the external file that contains the diagram source code.
32
+ <3> The `format` attribute determines the output image format to use. If a format is not specified, the default output format for the chosen diagram type will be used.
33
+
34
+ When the source file name is a relative path it is resolved with respect to the location of the document being processed.
35
+
36
+ == Specifying Diagram Attributes
37
+
38
+ Some diagram types allow image generation to be customized using attributes.
39
+
40
+ Attributes can be assigned to individual diagram blocks by adding them to the attribute list of the block.
41
+
42
+ If the same attribute value should be applied to all blocks of a given diagram type, the attribute can also be assigned indirectly by defining an attribute at the document level.
43
+ The attribute name at the document level should be prefixed with the diagram type name and a dash.
44
+
45
+ This is illustrated for the blockdiag `fontpath` attribute in the example below.
46
+
47
+ .Diagram attributes per block and global
48
+ ----
49
+ = Asciidoctor Diagram
50
+ :blockdiag-fontpath: /path/to/font.ttf <1>
51
+
52
+ [blockdiag] <2>
53
+ ....
54
+ ....
55
+
56
+ [blockdiag, fontpath="/path/to/otherfont.ttf"] <3>
57
+ ....
58
+ ....
59
+ ----
60
+ <1> Attributes can be specified for all diagram of a certain type at the document level by prefixing them with `<blocktype>-`.
61
+ In this example, the `fontpath` attribute is specified for all diagrams of type `blockdiag`.
62
+ <2> The first diagram does not specify an explicit value for `fontpath` so the global `blockdiag-fontpath` value will be used
63
+ <3> The second diagram does specify a `fontpath` value.
64
+ This overrides the global `blockdiag-fontpath` value.
65
+
66
+ == Example
62
67
 
63
68
  The example below illustrates the structure of a basic ditaa block written directly in an AsciiDoc document.
64
69
 
@@ -110,7 +115,6 @@ Both examples below would result in a file called `ditaa-diagram.png`.
110
115
  ----
111
116
  ....
112
117
 
113
-
114
118
  The example below illustrates the structure of a basic PlantUML block written directly in an AsciiDoc document.
115
119
 
116
120
  .PlantUML Diagram Syntax
@@ -0,0 +1,47 @@
1
+ = ASCIIToSVG
2
+ include::partial$uris.adoc[]
3
+
4
+ {uri-a2s}[ASCIIToSVG] is a pretty simple Go library (with an accompanying CLI tool) that parses ASCII art diagrams, attempting to convert them to an aesthetically pleasing SVG output.
5
+
6
+ == Example
7
+
8
+ ----
9
+ [a2s, format="svg"]
10
+ ....
11
+ .-------------------------.
12
+ | |
13
+ | .---.-. .-----. .-----. |
14
+ | | .-. | +--> | | <--| |
15
+ | | '-' | | <--| +--> | |
16
+ | '---'-' '-----' '-----' |
17
+ | ascii 2 svg |
18
+ | |
19
+ '-------------------------'
20
+ ....
21
+ ----
22
+
23
+ image::a2s.svg[]
24
+
25
+ == Installation
26
+
27
+ - Install the https://go.dev[Go] runtime
28
+ - Run `go install github.com/asciitosvg/asciitosvg@latest`
29
+
30
+ == Supported Image Formats
31
+
32
+ - SVG (default)
33
+ - TXT
34
+
35
+ == Attributes
36
+
37
+ include::partial$/shared-attrs.adoc[]
38
+
39
+ == Attributes
40
+
41
+ [cols=">,<,<",options="header"]
42
+ |===
43
+ |Name |Default value |Description
44
+ |a2s |a2s |The path to the `a2s` executable
45
+ |fontfamily |unspecified |The font family to use in the generated SVG image
46
+ |noblur |unspecified |Disable drop-shadow blurring
47
+ |===
@@ -0,0 +1,46 @@
1
+ = ActDiag
2
+ include::partial$uris.adoc[]
3
+
4
+ {uri-actdiag}[actdiag] generates activity-diagram images from .diag files (similar to graphviz’s DOT files).
5
+
6
+ == Example
7
+
8
+ ----
9
+ [actidag, format="png"]
10
+ ....
11
+ actdiag {
12
+ write -> convert -> image
13
+
14
+ lane user {
15
+ label = "User"
16
+ write [label = "Writing reST"];
17
+ image [label = "Get diagram IMAGE"];
18
+ }
19
+ lane actdiag {
20
+ convert [label = "Convert reST to Image"];
21
+ }
22
+ }
23
+ ....
24
+ ----
25
+
26
+ image::actdiag.png[]
27
+
28
+ == Installation
29
+
30
+ - A Python runtime is required
31
+ - Follow the http://blockdiag.com/en/actdiag/introduction.html#setup[actdag installation instructions]
32
+
33
+ == Supported Image Formats
34
+
35
+ - PDF
36
+ - PNG (default)
37
+ - SVG
38
+
39
+ == Attributes
40
+
41
+ [cols=">,<,<",options="header"]
42
+ |===
43
+ |Name |Default value |Description
44
+ |actdiag |actdiag |The path to the `actdiag` executable
45
+ |fontpath |unspecified |The path to the font that should be used by blockdiag
46
+ |===
@@ -0,0 +1,72 @@
1
+ = Barcode
2
+ include::partial$uris.adoc[]
3
+
4
+ The barcode extension provides barcode rendering.
5
+ Barcode macros can be specified using blocks, block macros, or inline macros using one of the following templates.
6
+
7
+ [source, asciidoc]
8
+ ------
9
+ // Barcode block
10
+ [<type>, <attributes>] <1> <2>
11
+ ----
12
+ <content> <3>
13
+ ----
14
+
15
+ // Barcode block macro
16
+ <type>::<content>[<attributes>]
17
+
18
+ // Barcode inline macro
19
+ <type>:<content>[<attributes>]
20
+ ------
21
+ <1> Type barcode type. One of `bookland`, `codabar`, `code25`, `code25iata`, `code25interleaved`, `code39`, `code93`, `code128`, `code128a`, `code128b`, `code128c`, `ean8`, `ean13`, `gs1_128`, `qrcode`, or `upca`.
22
+ <2> <<Attributes>>
23
+ <3> The content to encode in the barcode
24
+
25
+ By default, the `content` field of the barcode macros will be interpreted as the barcode content.
26
+ This works fine for simple barcodes, but for complex data (e.g., a vCard encoded as a QR code) this is not practical.
27
+ If the `external` attribute is set on a barcode macro, the target is interpreted as a file path.
28
+ The barcode content will then be obtained by reading the contents of the referenced file.
29
+
30
+ == Example
31
+
32
+ ----
33
+ Barcdodes can be written codabar:A31117013206375A[png, height=10] inline or as blocks.
34
+
35
+ [qrcode, format="png", xdim=4]
36
+ ....
37
+ Hello World!
38
+ ....
39
+ ----
40
+
41
+ Barcode can be written image:barcode.png[] inline or as blocks.
42
+
43
+ image::barcode2.png[]
44
+
45
+ == Installation
46
+
47
+ - All barcodes types except QR codes require the https://rubygems.org/gems/barby[barby Ruby gem]
48
+ - QR codes requires the https://rubygems.org/gems/rqrcode[rqrcode Ruby gem]
49
+ - PNG image output requires the https://rubygems.org/gems/chunky_png[chunky_png gem]
50
+
51
+ Each of these dependencies will automatically get loaded as needed.
52
+ It is not necessary to require these manually using the `-r` Asciidoctor CLI option.
53
+
54
+ == Supported Image Formats
55
+
56
+ - PNG
57
+ - SVG (default)
58
+ - TXT
59
+
60
+ == Attributes
61
+
62
+ [cols=">,<,<",options="header"]
63
+ |===
64
+ |Name |Default value |Description
65
+ |external |false |When set to true the target of a barcode macro is interpreted as an external source file instead of as the contents of the barcode
66
+ |height |100 |The height of the bars. (1D only, 2D uses ydim)
67
+ |xdim |1 |The width of the narrowest bar in a barcode. Thicker bars are multiples of the xdim.
68
+ |ydim |Same as xdim |This is the same as xdim, but for the height of the blocks in a 2D barcode.
69
+ |margin |10 |The width of the quiet zone around the barcode.
70
+ |foreground |black |The color of the bars specified as a 3 or 6 digit hex RGB value or HTML color name.
71
+ |background |white |The color of the background specified as a 3 or 6 digit hex RGB value or HTML color name.
72
+ |===
@@ -0,0 +1,38 @@
1
+ = BlockDiag
2
+ include::partial$uris.adoc[]
3
+
4
+ {uri-blockdiag}[BlockDiag] and its family generate diagram images from simple text files.
5
+
6
+ == Example
7
+
8
+ ----
9
+ [blockdiag]
10
+ ....
11
+ blockdiag {
12
+ A -> B -> C -> D;
13
+ A -> E -> F -> G;
14
+ }
15
+ ....
16
+ ----
17
+
18
+ image::blockdiag.png[]
19
+
20
+ == Installation
21
+
22
+ - A Python runtime is required
23
+ - Follow the http://blockdiag.com/en/blockdiag/introduction.html#setup[blockdiag installation instructions]
24
+
25
+ == Supported Image Formats
26
+
27
+ - PDF
28
+ - PNG (default)
29
+ - SVG
30
+
31
+ == Attributes
32
+
33
+ [cols=">,<,<",options="header"]
34
+ |===
35
+ |Name |Default value |Description
36
+ |blockdiag |blockdiag |The path to the `blockdiag` executable
37
+ |fontpath |unspecified |The path to the font that should be used by blockdiag
38
+ |===
@@ -0,0 +1,21 @@
1
+ = BPMN
2
+ include::partial$uris.adoc[]
3
+
4
+ Business Process Model and Notation (BPMN) is a graphical representation for specifying business processes in a business process model.
5
+ This extension uses {uri-bpmn}[bpmn-js-cmd] to render diagrams
6
+
7
+ == Supported Image Formats
8
+
9
+ - PDF
10
+ - PNG (default)
11
+ - SVG
12
+
13
+ == Attributes
14
+
15
+ [cols=">,<,<",options="header"]
16
+ |===
17
+ |Name |Default value |Description
18
+ |bpmn |bpmn |The path to the `bpmn` executable
19
+ |height |786 |The target height of the diagram. Does not apply for output type `svg`.
20
+ |width |1024 |The target width of the diagram. Does not apply for output type `svg`.
21
+ |===
@@ -0,0 +1,16 @@
1
+ = Bytefield-SVG
2
+ include::partial$uris.adoc[]
3
+
4
+ {uri-bytefield}[Bytefield-SVG] is a Node module for generating byte field diagrams like this one. Inspired by the LaTeX bytefield package.
5
+
6
+ == Supported Image Formats
7
+
8
+ - SVG
9
+
10
+ == Attributes
11
+
12
+ [cols=">,<,<",options="header"]
13
+ |===
14
+ |Name |Default value |Description
15
+ |bytefield-svg|bytefield-svg |The path to the `bytefield-svg` executable
16
+ |===
@@ -0,0 +1,43 @@
1
+ = D2
2
+ include::partial$uris.adoc[]
3
+
4
+ {uri-D2}[D2] is a diagram scripting language that turns text to diagrams.
5
+ It stands for Declarative Diagramming.
6
+ Declarative, as in, you describe what you want diagrammed, it generates the image.
7
+
8
+ == Example
9
+
10
+ ----
11
+ [d2]
12
+ ....
13
+ donut: {shape: circle}
14
+ database.shape: cylinder
15
+ you: {
16
+ shape: person
17
+ }
18
+ ....
19
+ ----
20
+
21
+ image::d2.png[]
22
+
23
+ == Supported Image Formats
24
+
25
+ - PDF
26
+ - PNG
27
+ - SVG
28
+
29
+ == Attributes
30
+
31
+ [cols=">,<,<",options="header"]
32
+ |===
33
+ |Name |Default value |Description
34
+ |d2 |d2 |The path to the `d2` executable
35
+ |layout |dagre |Set the diagram layout engine
36
+ |theme |0 |Set the diagram theme ID
37
+ |pad |100 |Pixels padded around the rendered diagram
38
+ |animate-interval| |If given, multiple boards are packaged as 1 SVG which transitions through each board at the interval (in milliseconds). Can only be used with SVG exports.
39
+ |sketch |false |Renders the diagram to look like it was sketched by hand
40
+ |font-regular |Source Sans Pro Regular |Path to .ttf file to use for the regular font
41
+ |font-italic |Source Sans Pro Regular-Italic|Path to .ttf file to use for the italic font
42
+ |font-bol |Source Sans Pro Bold |Path to .ttf file to use for the bold font
43
+ |===
@@ -0,0 +1,16 @@
1
+ = DBML
2
+ include::partial$uris.adoc[]
3
+
4
+ {uri-dbml}[dbml-renderer] renders https://dbml.dbdiagram.io/home/#intro[DBML] files to SVG images.
5
+
6
+ == Supported Image Formats
7
+
8
+ - SVG
9
+
10
+ == Attributes
11
+
12
+ [cols=">,<,<",options="header"]
13
+ |===
14
+ |Name |Default value |Description
15
+ |dbml-renderer |dbml-renderer |The path to the `dbml-renderer` executable
16
+ |===
@@ -0,0 +1,20 @@
1
+ = Diagrams
2
+ include::partial$uris.adoc[]
3
+
4
+ {uri-diagrams}[Diagrams] lets you draw the cloud system architecture in Python code.
5
+ It was born for prototyping a new system architecture without any design tools.
6
+ You can also describe or visualize the existing system architecture as well.
7
+
8
+ == Supported Image Formats
9
+
10
+ - PDF
11
+ - PNG (default)
12
+ - SVG
13
+
14
+ == Attributes
15
+
16
+ [cols=">,<,<",options="header"]
17
+ |===
18
+ |Name |Default value |Description
19
+ |diagrams-python|diagrams-python |The path to the `diagrams-python` executable
20
+ |===
@@ -0,0 +1,31 @@
1
+ = Ditaa
2
+ include::partial$uris.adoc[]
3
+
4
+ {uri-ditaa}[ditaa] is a small command-line utility written in Java, that can convert diagrams drawn using ascii art ('drawings' that contain characters that resemble lines like | / - ), into proper bitmap graphics.
5
+
6
+ A https://github.com/pepijnve/ditaa[fork of the ditaa] project is bundled with the asciidoctor-diagram gem.
7
+
8
+ == Supported Image Formats
9
+
10
+ - PNG (default)
11
+ - SVG
12
+ - TXT
13
+
14
+ == Attributes
15
+
16
+ [cols=">,<,<",options="header"]
17
+ |===
18
+ |Name |Default value |Description
19
+ |java |java |The path to the `java` executable
20
+ |scale |1 |A scale factor that is applied to the image.
21
+ |tabs |8 |An integer value that specifies the tab size as a number of spaces.
22
+ |background |FFFFFF |The background colour of the image. The format should be a six-digit hexadecimal number (as in HTML, FF0000 for red). Pass an eight-digit hex to define transparency.
23
+ |antialias |true |Enables or disables anti-aliasing.
24
+ |separation |true |Prevents the separation of common edges of shapes.
25
+ |round-corners|false |Causes all corners to be rendered as round corners.
26
+ |shadows |true |Enables or disable drop shadows.
27
+ |debug |false |Renders the debug grid over the resulting image.
28
+ |fixed-slope |false |Makes sides of parallelograms and trapezoids fixed slope instead of fixed width.
29
+ |transparent |false |Makes the background of the image transparent instead of using the background color.
30
+ |bullet-characters|*o |The characters to recognize as bullets
31
+ |===
@@ -0,0 +1,16 @@
1
+ = Dpic
2
+ include::partial$uris.adoc[]
3
+
4
+ {uri-dpic}[dpic] is an implementation of the https://en.wikipedia.org/wiki/PIC_(markup_language)[pic] DSL.
5
+
6
+ == Supported Image Formats
7
+
8
+ - SVG
9
+
10
+ == Attributes
11
+
12
+ [cols=">,<,<",options="header"]
13
+ |===
14
+ |Name |Default value |Description
15
+ |dpic |dpic |The path to the `dpic` executable
16
+ |===