rsyntaxtree 1.1.1 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.tags +233 -75
  3. data/README.md +31 -29
  4. data/Rakefile +73 -0
  5. data/bin/rsyntaxtree +2 -2
  6. data/docs/_examples/001.md +1 -0
  7. data/docs/_examples/002.md +1 -0
  8. data/docs/_examples/003.md +1 -0
  9. data/docs/_examples/004.md +1 -0
  10. data/docs/_examples/005.md +1 -0
  11. data/docs/_examples/006.md +1 -0
  12. data/docs/_examples/007.md +1 -0
  13. data/docs/_examples/008.md +1 -0
  14. data/docs/_examples/009.md +1 -0
  15. data/docs/_examples/010.md +1 -0
  16. data/docs/_examples/011.md +2 -1
  17. data/docs/_examples/012.md +2 -1
  18. data/docs/_examples/013.md +2 -1
  19. data/docs/_examples/014.md +2 -1
  20. data/docs/_examples/015.md +1 -0
  21. data/docs/_examples/016.md +2 -1
  22. data/docs/_examples/017.md +1 -0
  23. data/docs/_examples/018.md +1 -0
  24. data/docs/_examples/019.md +3 -2
  25. data/docs/_examples/020.md +1 -0
  26. data/docs/_examples/021.md +43 -0
  27. data/docs/_examples/022.md +58 -0
  28. data/docs/_examples/023.md +23 -0
  29. data/docs/_examples/024.md +23 -0
  30. data/docs/_examples/025.md +87 -0
  31. data/docs/_examples/026.md +27 -0
  32. data/docs/_examples/027.md +54 -0
  33. data/docs/_examples/028.md +20 -0
  34. data/docs/_includes/escape_char_table.html +1 -1
  35. data/docs/assets/img/001.png +0 -0
  36. data/docs/assets/img/002.png +0 -0
  37. data/docs/assets/img/003.png +0 -0
  38. data/docs/assets/img/004.png +0 -0
  39. data/docs/assets/img/005.png +0 -0
  40. data/docs/assets/img/006.png +0 -0
  41. data/docs/assets/img/007.png +0 -0
  42. data/docs/assets/img/008.png +0 -0
  43. data/docs/assets/img/009.png +0 -0
  44. data/docs/assets/img/010.png +0 -0
  45. data/docs/assets/img/011.png +0 -0
  46. data/docs/assets/img/012.png +0 -0
  47. data/docs/assets/img/013.png +0 -0
  48. data/docs/assets/img/014.png +0 -0
  49. data/docs/assets/img/015.png +0 -0
  50. data/docs/assets/img/016.png +0 -0
  51. data/docs/assets/img/017.png +0 -0
  52. data/docs/assets/img/018.png +0 -0
  53. data/docs/assets/img/019.png +0 -0
  54. data/docs/assets/img/020.png +0 -0
  55. data/docs/assets/img/021.png +0 -0
  56. data/docs/assets/img/022.png +0 -0
  57. data/docs/assets/img/023.png +0 -0
  58. data/docs/assets/img/024.png +0 -0
  59. data/docs/assets/img/025.png +0 -0
  60. data/docs/assets/img/026.png +0 -0
  61. data/docs/assets/img/027.png +0 -0
  62. data/docs/assets/img/028.png +0 -0
  63. data/docs/assets/svg/008.svg +2 -2
  64. data/docs/assets/svg/019.svg +30 -30
  65. data/docs/assets/svg/021.svg +86 -0
  66. data/docs/assets/svg/022.svg +163 -0
  67. data/docs/assets/svg/023.svg +116 -0
  68. data/docs/assets/svg/024.svg +47 -0
  69. data/docs/assets/svg/025.svg +170 -0
  70. data/docs/assets/svg/026.svg +41 -0
  71. data/docs/assets/svg/027.svg +92 -0
  72. data/docs/assets/svg/028.svg +42 -0
  73. data/docs/documentation.md +4 -3
  74. data/docs/documentation_ja.md +1 -1
  75. data/docs/examples.html +4 -2
  76. data/fonts/NotoSansMono_SemiCondensed-Bold.ttf +0 -0
  77. data/fonts/NotoSansMono_SemiCondensed-Regular.ttf +0 -0
  78. data/lib/rsyntaxtree/markup_parser.rb +1 -1
  79. data/lib/rsyntaxtree/svg_graph.rb +3 -3
  80. data/lib/rsyntaxtree/version.rb +1 -1
  81. data/lib/rsyntaxtree.rb +9 -0
  82. data/test/example_verify_test.rb +2 -21
  83. metadata +29 -3
@@ -0,0 +1,41 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg width="1902.4" height="1008.0" viewBox="-20, -20, 1922.4, 1028.0" version="1.1" xmlns="http://www.w3.org/2000/svg">
4
+ <defs>
5
+ <marker id="arrow" markerUnits="strokeWidth" markerWidth="13.440000000000001" markerHeight="13.440000000000001" viewBox="0 0 13.440000000000001 13.440000000000001" refX="6.720000000000001" refY="0">
6
+ <polyline fill="none" stroke="black" stroke-width="1" points="0,13.440000000000001,6.720000000000001,0,13.440000000000001,13.440000000000001" />
7
+ </marker>
8
+ <pattern id="hatchBlack" x="10" y="10" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
9
+ <line x1="0" y="0" x2="0" y2="10" stroke="black" stroke-width="4"></line>
10
+ </pattern>
11
+ <pattern id="hatchForNode" x="10" y="10" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
12
+ <line x1="0" y="0" x2="0" y2="10" stroke="black" stroke-width="4"></line>
13
+ </pattern>
14
+ <pattern id="hatchForLeaf" x="10" y="10" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
15
+ <line x1="0" y="0" x2="0" y2="10" stroke="black" stroke-width="4"></line>
16
+ </pattern>
17
+ </defs>
18
+ <rect x="-20" y="-20" width="1922.4" height="1028.0" stroke="none" fill="white" />"
19
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='551.15' y='132.0'><tspan x='551.15' y='132.0' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">Reference:</tspan>
20
+ </text>
21
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='33.60000000000002' y='431.2'><tspan x='33.60000000000002' y='431.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">[situational]</tspan>
22
+ <tspan x='74.10000000000002' y='519.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">exophora</tspan>
23
+ </text>
24
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='1037.7' y='431.2'><tspan x='1074.7' y='431.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">[textual]</tspan>
25
+ <tspan x='1037.7' y='519.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">endophora</tspan>
26
+ </text>
27
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='540.0' y='853.6'><tspan x='540.0' y='853.6' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">[to<tspan style='fill:none;'>■</tspan>preceding<tspan style='fill:none;'>■</tspan>text]</tspan>
28
+ <tspan x='692.5' y='941.6' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">anaphora</tspan>
29
+ </text>
30
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='1275.4' y='853.6'><tspan x='1275.4' y='853.6' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">[to<tspan style='fill:none;'>■</tspan>following<tspan style='fill:none;'>■</tspan>text]</tspan>
31
+ <tspan x='1414.4' y='941.6' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">cataphora</tspan>
32
+ </text>
33
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
34
+ points='219.60000000000002 321.2 219.60000000000002 254.1 712.15 254.1 712.15 187.0' />
35
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
36
+ points='1204.7 321.2 1204.7 254.1 712.15 254.1 712.15 187.0' />
37
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
38
+ points='840.5 743.6 840.5 658.9000000000001 1204.7 658.9000000000001 1204.7 574.2' />
39
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
40
+ points='1568.9 743.6 1568.9 658.9000000000001 1204.7 658.9000000000001 1204.7 574.2' />
41
+ </svg>
@@ -0,0 +1,92 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg width="5044.799999999999" height="1676.8000000000002" viewBox="-20, -20, 5064.799999999999, 1696.8000000000002" version="1.1" xmlns="http://www.w3.org/2000/svg">
4
+ <defs>
5
+ <marker id="arrow" markerUnits="strokeWidth" markerWidth="13.440000000000001" markerHeight="13.440000000000001" viewBox="0 0 13.440000000000001 13.440000000000001" refX="6.720000000000001" refY="0">
6
+ <polyline fill="none" stroke="black" stroke-width="1" points="0,13.440000000000001,6.720000000000001,0,13.440000000000001,13.440000000000001" />
7
+ </marker>
8
+ <pattern id="hatchBlack" x="10" y="10" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
9
+ <line x1="0" y="0" x2="0" y2="10" stroke="black" stroke-width="4"></line>
10
+ </pattern>
11
+ <pattern id="hatchForNode" x="10" y="10" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
12
+ <line x1="0" y="0" x2="0" y2="10" stroke="black" stroke-width="4"></line>
13
+ </pattern>
14
+ <pattern id="hatchForLeaf" x="10" y="10" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
15
+ <line x1="0" y="0" x2="0" y2="10" stroke="black" stroke-width="4"></line>
16
+ </pattern>
17
+ </defs>
18
+ <rect x="-20" y="-20" width="5064.799999999999" height="1696.8000000000002" stroke="none" fill="white" />"
19
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='1684.375' y='132.0'><tspan x='2202.375' y='132.0' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">REJOINDER</tspan>
20
+ <tspan x='1684.375' y='220.0' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">(any<tspan style='fill:none;'>■</tspan>cohesive<tspan style='fill:none;'>■</tspan>sequel<tspan style='fill:none;'>■</tspan>by<tspan style='fill:none;'>■</tspan>different<tspan style='fill:none;'>■</tspan>speaker)</tspan>
21
+ </text>
22
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='537.625' y='554.4'><tspan x='537.625' y='554.4' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">(following<tspan style='fill:none;'>■</tspan>a<tspan style='fill:none;'>■</tspan>question)</tspan>
23
+ <tspan x='728.125' y='642.4' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">RESPONSE</tspan>
24
+ </text>
25
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='33.59999999999991' y='976.8'><tspan x='33.59999999999991' y='976.8' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">(answering)</tspan>
26
+ <tspan x='100.59999999999991' y='1064.8' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">DIRECT</tspan>
27
+ <tspan x='52.09999999999991' y='1152.8' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">RESPONSE</tspan>
28
+ </text>
29
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='1234.15' y='976.8'><tspan x='1316.15' y='976.8' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">(not<tspan style='fill:none;'>■</tspan>answering)</tspan>
30
+ <tspan x='1234.15' y='1064.8' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">INDIRECT<tspan style='fill:none;'>■</tspan>RESPONSE</tspan>
31
+ </text>
32
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='532.0' y='1399.2'><tspan x='532.0' y='1399.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">(attitude<tspan style='fill:none;'>■</tspan>to<tspan style='fill:none;'>■</tspan>answer)</tspan>
33
+ <tspan x='623.0' y='1487.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">COMMENTARY</tspan>
34
+ </text>
35
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='1310.3999999999999' y='1399.2'><tspan x='1310.3999999999999' y='1399.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">(evading<tspan style='fill:none;'>■</tspan>answer)</tspan>
36
+ <tspan x='1386.8999999999999' y='1487.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">DISCLAIMER</tspan>
37
+ </text>
38
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='1992.8000000000002' y='1399.2'><tspan x='1992.8000000000002' y='1399.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">(implying<tspan style='fill:none;'>■</tspan>answer)</tspan>
39
+ <tspan x='2003.8000000000002' y='1487.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">SUPPLEMENTARY</tspan>
40
+ <tspan x='2117.8' y='1575.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">RESPONSE</tspan>
41
+ </text>
42
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='3443.625' y='554.4'><tspan x='3443.625' y='554.4' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">(not<tspan style='fill:none;'>■</tspan>following<tspan style='fill:none;'>■</tspan>a<tspan style='fill:none;'>■</tspan>question)</tspan>
43
+ <tspan x='3586.125' y='642.4' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">[other<tspan style='fill:none;'>■</tspan>rejoinders]</tspan>
44
+ </text>
45
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='2712.1499999999996' y='976.8'><tspan x='2712.1499999999996' y='976.8' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">(following<tspan style='fill:none;'>■</tspan>a<tspan style='fill:none;'>■</tspan>statement)</tspan>
46
+ </text>
47
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='2704.2' y='1276.0'><tspan x='2704.2' y='1276.0' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">ASSENT</tspan>
48
+ </text>
49
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='3081.6' y='1276.0'><tspan x='3081.6' y='1276.0' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">CONTRADICTION</tspan>
50
+ </text>
51
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='3744.0' y='976.8'><tspan x='3756.0' y='976.8' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">(following<tspan style='fill:none;'>■</tspan>a</tspan>
52
+ <tspan x='3744.0' y='1064.8' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">statement<tspan style='fill:none;'>■</tspan>or</tspan>
53
+ <tspan x='3785.0' y='1152.8' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">command)</tspan>
54
+ <tspan x='3785.0' y='1240.8' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">QUESTION</tspan>
55
+ <tspan x='3771.0' y='1328.8' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">REJOINDER</tspan>
56
+ </text>
57
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='4448.599999999999' y='976.8'><tspan x='4474.599999999999' y='976.8' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">(following<tspan style='fill:none;'>■</tspan></tspan>
58
+ <tspan x='4448.599999999999' y='1064.8' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">a<tspan style='fill:none;'>■</tspan>command)</tspan>
59
+ </text>
60
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='4286.4' y='1399.2'><tspan x='4286.4' y='1399.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">CONSENT</tspan>
61
+ </text>
62
+ <text white-space='pre' alignment-baseline='text-top' style='fill: black; font-size: 64px;' x='4718.799999999999' y='1399.2'><tspan x='4718.799999999999' y='1399.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">REFUSAL</tspan>
63
+ </text>
64
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
65
+ points='891.625 444.4 891.625 359.7 2379.375 359.7 2379.375 275.0' />
66
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
67
+ points='3867.125 444.4 3867.125 359.7 2379.375 359.7 2379.375 275.0' />
68
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
69
+ points='215.5999999999999 866.8 215.5999999999999 782.0999999999999 891.625 782.0999999999999 891.625 697.4' />
70
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
71
+ points='1567.65 866.8 1567.65 782.0999999999999 891.625 782.0999999999999 891.625 697.4' />
72
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
73
+ points='854.0 1289.2 854.0 1204.5 1567.65 1204.5 1567.65 1119.8' />
74
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
75
+ points='1584.3999999999999 1289.2 1584.3999999999999 1204.5 1567.65 1204.5 1567.65 1119.8' />
76
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
77
+ points='2281.3 1289.2 2281.3 1204.5 1567.65 1204.5 1567.65 1119.8' />
78
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
79
+ points='3085.6499999999996 866.8 3085.6499999999996 782.0999999999999 3867.125 782.0999999999999 3867.125 697.4' />
80
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
81
+ points='3948.0 866.8 3948.0 782.0999999999999 3867.125 782.0999999999999 3867.125 697.4' />
82
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
83
+ points='4648.599999999999 866.8 4648.599999999999 782.0999999999999 3867.125 782.0999999999999 3867.125 697.4' />
84
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
85
+ points='2825.7 1166.0 2825.7 1098.9 3085.6499999999996 1098.9 3085.6499999999996 1031.8' />
86
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
87
+ points='3345.6 1166.0 3345.6 1098.9 3085.6499999999996 1098.9 3085.6499999999996 1031.8' />
88
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
89
+ points='4435.4 1289.2 4435.4 1204.5 4648.599999999999 1204.5 4648.599999999999 1119.8' />
90
+ <polyline style='stroke:black; stroke-width:2; fill:none;'
91
+ points='4861.799999999999 1289.2 4861.799999999999 1204.5 4648.599999999999 1204.5 4648.599999999999 1119.8' />
92
+ </svg>
@@ -0,0 +1,42 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg width="818.4" height="1069.6" viewBox="-20, -20, 838.4, 1089.6" version="1.1" xmlns="http://www.w3.org/2000/svg">
4
+ <defs>
5
+ <marker id="arrow" markerUnits="strokeWidth" markerWidth="13.440000000000001" markerHeight="13.440000000000001" viewBox="0 0 13.440000000000001 13.440000000000001" refX="6.720000000000001" refY="0">
6
+ <polyline fill="none" stroke="purple" stroke-width="1" points="0,13.440000000000001,6.720000000000001,0,13.440000000000001,13.440000000000001" />
7
+ </marker>
8
+ <pattern id="hatchBlack" x="10" y="10" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
9
+ <line x1="0" y="0" x2="0" y2="10" stroke="black" stroke-width="4"></line>
10
+ </pattern>
11
+ <pattern id="hatchForNode" x="10" y="10" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
12
+ <line x1="0" y="0" x2="0" y2="10" stroke="blue" stroke-width="4"></line>
13
+ </pattern>
14
+ <pattern id="hatchForLeaf" x="10" y="10" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
15
+ <line x1="0" y="0" x2="0" y2="10" stroke="green" stroke-width="4"></line>
16
+ </pattern>
17
+ </defs>
18
+ <rect x="-20" y="-20" width="838.4" height="1089.6" stroke="none" fill="white" />"
19
+ <text white-space='pre' alignment-baseline='text-top' style='fill: blue; font-size: 64px;' x='348.275' y='132.0'><tspan x='348.275' y='132.0' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">NP</tspan>
20
+ </text>
21
+ <text white-space='pre' alignment-baseline='text-top' style='fill: blue; font-size: 64px;' x='135.1' y='431.2'><tspan x='135.1' y='431.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">NP</tspan>
22
+ </text>
23
+ <text white-space='pre' alignment-baseline='text-top' style='fill: green; font-size: 64px;' x='33.60000000000002' y='730.4'><tspan x='33.60000000000002' y='730.4' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">a<tspan style='fill:none;'>■</tspan>picture</tspan>
24
+ </text>
25
+ <text white-space='pre' alignment-baseline='text-top' style='fill: blue; font-size: 64px;' x='566.4499999999999' y='431.2'><tspan x='566.4499999999999' y='431.2' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">PP</tspan>
26
+ </text>
27
+ <text white-space='pre' alignment-baseline='text-top' style='fill: blue; font-size: 64px;' x='472.5' y='730.4'><tspan x='472.5' y='730.4' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">P</tspan>
28
+ </text>
29
+ <text white-space='pre' alignment-baseline='text-top' style='fill: green; font-size: 64px;' x='459.0' y='1029.6'><tspan x='459.0' y='1029.6' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">of</tspan>
30
+ </text>
31
+ <text white-space='pre' alignment-baseline='text-top' style='fill: blue; font-size: 64px;' x='674.9' y='730.4'><tspan x='674.9' y='730.4' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">NP</tspan>
32
+ </text>
33
+ <text white-space='pre' alignment-baseline='text-top' style='fill: green; font-size: 64px;' x='659.4' y='1029.6'><tspan x='659.4' y='1029.6' style="" text-decoration="" font-family="'Noto Serif', 'Noto Serif JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', serif">cats</tspan>
34
+ </text>
35
+ <line style='stroke:black; stroke-width:2;' x1='179.1' y1='321.2' x2='392.275' y2='187.0' />
36
+ <line style='stroke:black; stroke-width:2;' x1='605.4499999999999' y1='321.2' x2='392.275' y2='187.0' />
37
+ <polygon style='fill: none; stroke: black; stroke-width:2;' points='33.60000000000002 620.4 324.6 620.4 179.1 486.2' />
38
+ <line style='stroke:black; stroke-width:2;' x1='492.0' y1='620.4' x2='605.4499999999999' y2='486.2' />
39
+ <line style='stroke:black; stroke-width:2;' x1='718.9' y1='620.4' x2='605.4499999999999' y2='486.2' />
40
+ <line style='stroke:black; stroke-width:2;' x1='492.0' y1='919.6' x2='492.0' y2='785.4' />
41
+ <polygon style='fill: none; stroke: black; stroke-width:2;' points='659.4 919.6 778.4 919.6 718.9 785.4' />
42
+ </svg>
@@ -31,12 +31,12 @@ The `Radical symmetrization` option affects the way branch nodes are drawn. The
31
31
 
32
32
  ### Fonts Used to Generate PNG
33
33
 
34
- Currently, you can choose between the font styles `Noto Sans`, `Noto Serif`, and `WQY Zen Hei`.
34
+ Currently, you can choose among the font styles `Noto Sans`, `Noto Serif`, `Noto Sans Mono` and `WQY Zen Hei`.
35
35
 
36
36
  - `Noto Sans` can display basic Unicode characters (including Japanese hiragana/katakana/kanji).
37
37
  - `Noto Serif` can display basic Unicode characters (including Japanese hiragana/katakana/kanji).
38
38
  - `WQY Zen Hei` can display a wide range of Chinese/Japanese/Korean (CJK) characters.
39
-
39
+ - `Noto Sans Mono` can display basic Unicode characters in a mono-spaced typeface.
40
40
 
41
41
  ### Install Fonts for SVG
42
42
 
@@ -47,6 +47,7 @@ SVG images are dependent on the fonts installed locally on your computer. In ord
47
47
  - [Noto Serif](https://fonts.google.com/noto/specimen/Noto+Serif): for latin and other basic Unicode characters in serif
48
48
  - [Noto Serif JP](https://fonts.google.com/noto/specimen/Noto+Serif+JP): for Japanese characters in serif
49
49
  - [WQY Zen Hei](https://packages.ubuntu.com/bionic/fonts/fonts-wqy-zenhei): for CJK characters
50
+ - [Noto Sans Mono](https://fonts.google.com/noto/specimen/Noto+Sans+Mono): for latin and other basic Unicode characters in sans serif mono (semi-condensed)
50
51
  - [OpenMoji](https://openmoji.org/): for emoji characters.
51
52
 
52
53
 
@@ -114,7 +115,7 @@ Here, `---` represents `-` repeated three times or more consecutively.
114
115
 
115
116
  In `auto` mode, the triangle connector shape is applied when the terminal node contains words separated by whitespace. In `bar` and `none` modes, triangles are drawn for the nodes with `^` at the beginning of the leaf text, lie `[NP ^syntax-trees]`.
116
117
 
117
- If a `#` character is placed at the beginning of the leaf text (right after `^` if there is one), the leaf text is enclosed in a paire of square brackets (e.g. `[NP #text]` or `[NP ^#text]`). If `##` is placed at the beginning of the leaf text, a rectangle is drawn instead of brackets.
118
+ If a `#` character is placed at the beginning of a label or leaf text (right after `^` if there is one), the text is enclosed in a pair of square brackets (e.g. `[#NP text]`, `[NP #text]`, `[NP ^#text]`). If `##` is placed at the beginning of the leaf text, a rectangle is drawn instead of brackets.
118
119
 
119
120
  ### Escape Special Characters
120
121
 
@@ -123,7 +123,7 @@ SVG形式を用いる場合,期待通りの表示を得るためには,ご
123
123
 
124
124
  ### リーフを囲む括弧と矩形の描画
125
125
 
126
- リーフとなるテキストの最初に(`^` が存在する場合はその直後に) `#` を付けると,そのテキスト全体を角括弧([ ])で囲みます(例:`[NP #text]` or `[NP ^#text]`). テキストの最初に `##` を付けると,テキスト全体を矩形(ボックス)で囲みます.
126
+ ラベルまたはリーフとなるテキストの最初に(`^` が存在する場合はその直後に) `#` を付けると,そのテキスト全体を角括弧([ ])で囲みます(例:`[#NP text]`, `[NP #text]`, `[NP ^#text]`). テキストの最初に `##` を付けると,テキスト全体を矩形(ボックス)で囲みます.
127
127
 
128
128
  ### 一部の文字を表示するためのエスケープ
129
129
 
data/docs/examples.html CHANGED
@@ -17,7 +17,7 @@ layout: default
17
17
  <h2 id="category-{{category.name | slugify }}"><b>{{ category.name }}</b></h2>
18
18
  {%- for example in all_examples -%}
19
19
  {% if example.category contains category.name %}
20
- <br />
20
+ <h3>{{ example.caption }}</h3>
21
21
  <div style='text-align:left;'>
22
22
  <button onclick="copyToClipBoard('text-{{ example.name }}')" style='margin: 20px 0; font-size: 0.85em;'>
23
23
  Copy to Clipboard
@@ -37,7 +37,9 @@ layout: default
37
37
  <tr><td>Colorization</td><td>{{ example.colorization }}</td></tr>
38
38
  <tr><td>Radical Symmetirization</td><td>{{ example.symmetrization }}</td></tr>
39
39
  <tr><td>Font</td><td>{{ example.font }}</td></tr>
40
- <tr><td>Reference</td><td>{{ example.reference }}</td></tr>
40
+ {% if example.reference %}
41
+ <tr><td>Reference</td><td>{{ example.reference }}</td></tr>
42
+ {% endif %}
41
43
  </tbody>
42
44
  </table>
43
45
  </div>
@@ -184,7 +184,7 @@ module Markup
184
184
  :none
185
185
  end
186
186
  end
187
- results[:triangle] = h[:triangle].to_s == '^'
187
+ results[:triangle] = h[:triangle].to_s == '^' if h[:triangle]
188
188
  results[:paths] = h[:paths] if h[:paths]
189
189
  results[:contents] << h if h[:type] == :text || h[:type] == :border || h[:type] == :bborder
190
190
  end
@@ -218,11 +218,11 @@ module RSyntaxTree
218
218
  case @fontstyle
219
219
  when /(?:cjk)/
220
220
  fontstyle = "'WenQuanYi Zen Hei', 'Noto Sans', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', sans-serif"
221
- when /(?:sans)/
221
+ when /(?:sans|mono)/
222
222
  fontstyle = if e[:cjk]
223
- "'Noto Sans JP', 'Noto Sans', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', sans-serif"
223
+ "'Noto Sans JP', 'Noto Sans Mono SemiConcensed', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', sans-serif"
224
224
  else
225
- "'Noto Sans', 'Noto Sans JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', sans-serif"
225
+ "'Noto Sans Mono SemiConcensed', 'Noto Sans JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', sans-serif"
226
226
  end
227
227
  when /(?:serif)/
228
228
  fontstyle = if e[:cjk]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RSyntaxTree
4
- VERSION = "1.1.1"
4
+ VERSION = "1.1.3"
5
5
  end
data/lib/rsyntaxtree.rb CHANGED
@@ -63,6 +63,15 @@ module RSyntaxTree
63
63
  new_params[key] = value.to_f
64
64
  when :fontstyle
65
65
  case value
66
+ when "noto-sans-mono", "mono"
67
+ fontset[:normal] = FONT_DIR + "/NotoSansMono_SemiCondensed-Regular.ttf"
68
+ fontset[:italic] = FONT_DIR + "/NotoSansMono_SemiCondensed-Regular.ttf"
69
+ fontset[:bold] = FONT_DIR + "/NotoSansMono_SemiCondensed-Bold.ttf"
70
+ fontset[:bolditalic] = FONT_DIR + "/NotoSansMono_SemiCondensed-Bold.ttf"
71
+ fontset[:math] = FONT_DIR + "/latinmodern-math.otf"
72
+ fontset[:cjk] = FONT_DIR + "/NotoSansJP-Regular.otf"
73
+ fontset[:emoji] = FONT_DIR + "/OpenMoji-Black.ttf"
74
+ new_params[:fontstyle] = "mono"
66
75
  when "noto-sans", "sans"
67
76
  fontset[:normal] = FONT_DIR + "/NotoSans-Regular.ttf"
68
77
  fontset[:italic] = FONT_DIR + "/NotoSans-Italic.ttf"
@@ -44,6 +44,8 @@ class ExampleParserTest < Minitest::Test
44
44
  opts[:leafstyle] = value
45
45
  when "font"
46
46
  opts[:fontstyle] = case value
47
+ when /mono/i
48
+ "mono"
47
49
  when /sans/i
48
50
  "sans"
49
51
  when /serif/i
@@ -71,26 +73,5 @@ class ExampleParserTest < Minitest::Test
71
73
  define_method "test_#{name}" do
72
74
  assert_equal svg_code, opts[:svg]
73
75
  end
74
-
75
- ##########################################
76
- # To create SVG for the tests, comment-out
77
- # above block and run the code below
78
- ##########################################
79
- # File.open(File.join(svg_dir, "#{name}.svg"), "w") do |f|
80
- # puts "Creating svg file: #{name}.svg"
81
- # svg = rsg.draw_svg
82
- # f.write(svg)
83
- # end
84
-
85
- ##########################################
86
- # To create SVG for the documentation,
87
- # comment-out above and run the code below
88
- ##########################################
89
- # png_dir = File.expand_path(File.join(__dir__, "..", "docs", "assets", "img"))
90
- # File.open(File.join(png_dir, "#{name}.png"), "w") do |f|
91
- # puts "Creating png file: #{name}.png"
92
- # png = rsg.draw_png
93
- # f.write(png)
94
- # end
95
76
  end
96
77
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsyntaxtree
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoichiro Hasebe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-25 00:00:00.000000000 Z
11
+ date: 2023-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: optimist
@@ -132,6 +132,14 @@ files:
132
132
  - docs/_examples/018.md
133
133
  - docs/_examples/019.md
134
134
  - docs/_examples/020.md
135
+ - docs/_examples/021.md
136
+ - docs/_examples/022.md
137
+ - docs/_examples/023.md
138
+ - docs/_examples/024.md
139
+ - docs/_examples/025.md
140
+ - docs/_examples/026.md
141
+ - docs/_examples/027.md
142
+ - docs/_examples/028.md
135
143
  - docs/_includes/box_and_circle_table.html
136
144
  - docs/_includes/escape_char_table.html
137
145
  - docs/_includes/social_media_links.html
@@ -157,6 +165,14 @@ files:
157
165
  - docs/assets/img/018.png
158
166
  - docs/assets/img/019.png
159
167
  - docs/assets/img/020.png
168
+ - docs/assets/img/021.png
169
+ - docs/assets/img/022.png
170
+ - docs/assets/img/023.png
171
+ - docs/assets/img/024.png
172
+ - docs/assets/img/025.png
173
+ - docs/assets/img/026.png
174
+ - docs/assets/img/027.png
175
+ - docs/assets/img/028.png
160
176
  - docs/assets/img/elements/circle.png
161
177
  - docs/assets/img/elements/circle_abc.png
162
178
  - docs/assets/img/elements/circle_bold.png
@@ -193,6 +209,14 @@ files:
193
209
  - docs/assets/svg/018.svg
194
210
  - docs/assets/svg/019.svg
195
211
  - docs/assets/svg/020.svg
212
+ - docs/assets/svg/021.svg
213
+ - docs/assets/svg/022.svg
214
+ - docs/assets/svg/023.svg
215
+ - docs/assets/svg/024.svg
216
+ - docs/assets/svg/025.svg
217
+ - docs/assets/svg/026.svg
218
+ - docs/assets/svg/027.svg
219
+ - docs/assets/svg/028.svg
196
220
  - docs/documentation.md
197
221
  - docs/documentation_ja.md
198
222
  - docs/examples.html
@@ -204,6 +228,8 @@ files:
204
228
  - fonts/NotoSansJP-Bold.otf
205
229
  - fonts/NotoSansJP-Regular.otf
206
230
  - fonts/NotoSansMath-Regular.ttf
231
+ - fonts/NotoSansMono_SemiCondensed-Bold.ttf
232
+ - fonts/NotoSansMono_SemiCondensed-Regular.ttf
207
233
  - fonts/NotoSerif-Bold.ttf
208
234
  - fonts/NotoSerif-BoldItalic.ttf
209
235
  - fonts/NotoSerif-Italic.ttf
@@ -248,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
274
  - !ruby/object:Gem::Version
249
275
  version: '0'
250
276
  requirements: []
251
- rubygems_version: 3.4.1
277
+ rubygems_version: 3.4.2
252
278
  signing_key:
253
279
  specification_version: 4
254
280
  summary: RSyntaxTree is a graphical syntax tree generator written in Ruby