asciidoctor-iso 0.0.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +2 -0
  3. data/.gitignore +1 -0
  4. data/.hound.yml +3 -0
  5. data/.rubocop.ribose.yml +65 -0
  6. data/.rubocop.tb.yml +640 -0
  7. data/Gemfile +4 -0
  8. data/Gemfile.lock +162 -0
  9. data/Makefile +39 -0
  10. data/README.adoc +396 -59
  11. data/Rakefile +6 -0
  12. data/asciidoctor-iso.gemspec +11 -3
  13. data/lib/asciidoctor/iso/base.rb +122 -51
  14. data/lib/asciidoctor/iso/blocks.rb +119 -108
  15. data/lib/asciidoctor/iso/cleanup.rb +214 -0
  16. data/lib/asciidoctor/iso/cleanup_block.rb +157 -0
  17. data/lib/asciidoctor/iso/converter.rb +5 -3
  18. data/lib/asciidoctor/iso/front.rb +37 -28
  19. data/lib/asciidoctor/iso/html/header.html +184 -0
  20. data/lib/asciidoctor/iso/html/html_iso_intro.html +73 -0
  21. data/lib/asciidoctor/iso/html/html_iso_titlepage.html +31 -0
  22. data/lib/asciidoctor/iso/html/htmlstyle.css +67 -0
  23. data/lib/asciidoctor/iso/html/isodoc.css +679 -0
  24. data/lib/asciidoctor/iso/html/word_iso_intro.html +72 -0
  25. data/lib/asciidoctor/iso/html/word_iso_titlepage.html +58 -0
  26. data/lib/asciidoctor/iso/inline_anchor.rb +20 -26
  27. data/lib/asciidoctor/iso/isostandard.rnc +177 -0
  28. data/lib/asciidoctor/iso/isostandard.rng +1478 -0
  29. data/lib/asciidoctor/iso/isostandard_diff.rnc +295 -0
  30. data/lib/asciidoctor/iso/lists.rb +152 -109
  31. data/lib/asciidoctor/iso/section.rb +164 -0
  32. data/lib/asciidoctor/iso/table.rb +30 -27
  33. data/lib/asciidoctor/iso/utils.rb +61 -183
  34. data/lib/asciidoctor/iso/validate.make.sh +8 -0
  35. data/lib/asciidoctor/iso/validate.rb +195 -24
  36. data/lib/asciidoctor/iso/validate_style.rb +175 -0
  37. data/lib/asciidoctor/iso/version.rb +1 -1
  38. data/spec/examples/rice.adoc +45 -24
  39. data/spec/examples/rice.doc +17708 -0
  40. data/spec/examples/rice.html +1574 -1662
  41. data/spec/examples/rice.preview.html +1811 -0
  42. data/spec/examples/rice.sh +4 -0
  43. data/spec/examples/rice.xml +888 -62
  44. data/spec/examples/rice_images/rice_image1.png +0 -0
  45. data/spec/examples/rice_images/rice_image2.png +0 -0
  46. data/spec/examples/rice_images/rice_image3_1.png +0 -0
  47. data/spec/examples/rice_images/rice_image3_2.png +0 -0
  48. data/spec/examples/rice_images/rice_image3_3.png +0 -0
  49. metadata +135 -12
  50. data/grammar1.gif +0 -0
  51. data/grammar2.gif +0 -0
  52. data/grammar3.gif +0 -0
  53. data/grammar4.gif +0 -0
  54. data/lib/asciidoctor/iso/validate.rnc +0 -444
  55. data/lib/asciidoctor/iso/validate.rng +0 -1001
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-24 00:00:00.000000000 Z
11
+ date: 2018-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.5.6
27
+ - !ruby/object:Gem::Dependency
28
+ name: asciimath
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: htmlentities
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -38,20 +52,76 @@ dependencies:
38
52
  - - "~>"
39
53
  - !ruby/object:Gem::Version
40
54
  version: 4.3.4
55
+ - !ruby/object:Gem::Dependency
56
+ name: image_size
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: mime-types
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
41
83
  - !ruby/object:Gem::Dependency
42
84
  name: nokogiri
43
85
  requirement: !ruby/object:Gem::Requirement
44
86
  requirements:
45
- - - "~>"
87
+ - - '='
46
88
  - !ruby/object:Gem::Version
47
89
  version: 1.8.1
48
90
  type: :runtime
49
91
  prerelease: false
50
92
  version_requirements: !ruby/object:Gem::Requirement
51
93
  requirements:
52
- - - "~>"
94
+ - - '='
53
95
  - !ruby/object:Gem::Version
54
96
  version: 1.8.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: ruby-jing
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: ruby-xslt
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
55
125
  - !ruby/object:Gem::Dependency
56
126
  name: thread_safe
57
127
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +136,34 @@ dependencies:
66
136
  - - ">="
67
137
  - !ruby/object:Gem::Version
68
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: uuidtools
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: html2doc
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
69
167
  - !ruby/object:Gem::Dependency
70
168
  name: bundler
71
169
  requirement: !ruby/object:Gem::Requirement
@@ -216,31 +314,56 @@ executables: []
216
314
  extensions: []
217
315
  extra_rdoc_files: []
218
316
  files:
317
+ - ".gitattributes"
318
+ - ".gitignore"
319
+ - ".hound.yml"
219
320
  - ".oss-guides.rubocop.yml"
321
+ - ".rubocop.ribose.yml"
322
+ - ".rubocop.tb.yml"
220
323
  - ".rubocop.yml"
221
324
  - Gemfile
325
+ - Gemfile.lock
326
+ - Makefile
222
327
  - README.adoc
328
+ - Rakefile
223
329
  - asciidoctor-iso.gemspec
224
- - grammar1.gif
225
- - grammar2.gif
226
- - grammar3.gif
227
- - grammar4.gif
228
330
  - lib/asciidoctor-iso.rb
229
331
  - lib/asciidoctor/iso/base.rb
230
332
  - lib/asciidoctor/iso/blocks.rb
333
+ - lib/asciidoctor/iso/cleanup.rb
334
+ - lib/asciidoctor/iso/cleanup_block.rb
231
335
  - lib/asciidoctor/iso/converter.rb
232
336
  - lib/asciidoctor/iso/front.rb
337
+ - lib/asciidoctor/iso/html/header.html
338
+ - lib/asciidoctor/iso/html/html_iso_intro.html
339
+ - lib/asciidoctor/iso/html/html_iso_titlepage.html
340
+ - lib/asciidoctor/iso/html/htmlstyle.css
341
+ - lib/asciidoctor/iso/html/isodoc.css
342
+ - lib/asciidoctor/iso/html/word_iso_intro.html
343
+ - lib/asciidoctor/iso/html/word_iso_titlepage.html
233
344
  - lib/asciidoctor/iso/inline_anchor.rb
345
+ - lib/asciidoctor/iso/isostandard.rnc
346
+ - lib/asciidoctor/iso/isostandard.rng
347
+ - lib/asciidoctor/iso/isostandard_diff.rnc
234
348
  - lib/asciidoctor/iso/lists.rb
349
+ - lib/asciidoctor/iso/section.rb
235
350
  - lib/asciidoctor/iso/table.rb
236
351
  - lib/asciidoctor/iso/utils.rb
352
+ - lib/asciidoctor/iso/validate.make.sh
237
353
  - lib/asciidoctor/iso/validate.rb
238
- - lib/asciidoctor/iso/validate.rnc
239
- - lib/asciidoctor/iso/validate.rng
354
+ - lib/asciidoctor/iso/validate_style.rb
240
355
  - lib/asciidoctor/iso/version.rb
241
356
  - spec/examples/rice.adoc
357
+ - spec/examples/rice.doc
242
358
  - spec/examples/rice.html
359
+ - spec/examples/rice.preview.html
360
+ - spec/examples/rice.sh
243
361
  - spec/examples/rice.xml
362
+ - spec/examples/rice_images/rice_image1.png
363
+ - spec/examples/rice_images/rice_image2.png
364
+ - spec/examples/rice_images/rice_image3_1.png
365
+ - spec/examples/rice_images/rice_image3_2.png
366
+ - spec/examples/rice_images/rice_image3_3.png
244
367
  homepage: https://github.com/riboseinc/asciidoctor-iso
245
368
  licenses:
246
369
  - MIT
@@ -253,7 +376,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
376
  requirements:
254
377
  - - ">="
255
378
  - !ruby/object:Gem::Version
256
- version: 2.3.0
379
+ version: 2.4.0
257
380
  required_rubygems_version: !ruby/object:Gem::Requirement
258
381
  requirements:
259
382
  - - ">="
@@ -261,7 +384,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
384
  version: '0'
262
385
  requirements: []
263
386
  rubyforge_project:
264
- rubygems_version: 2.5.2
387
+ rubygems_version: 2.6.12
265
388
  signing_key:
266
389
  specification_version: 4
267
390
  summary: asciidoctor-iso lets you write ISO standards in AsciiDoc.
Binary file
Binary file
Binary file
Binary file
@@ -1,444 +0,0 @@
1
- start = iso_standard
2
-
3
- iso_standard =
4
- element iso-standard {
5
- front,
6
- middle,
7
- back?
8
- }
9
-
10
- front =
11
- element front {
12
- title,
13
- documenttype,
14
- documentstatus?,
15
- id,
16
- language,
17
- version?,
18
- author,
19
- foreword,
20
- introduction?
21
- }
22
-
23
- language =
24
- element language {
25
- ( "en" | "fr" )
26
- }
27
-
28
- version =
29
- element version {
30
- edition?,
31
- revdate?,
32
- copyright_year?
33
- }
34
-
35
- id =
36
- element id {
37
- documentnumber,
38
- tc_documentnumber?,
39
- ref_documentnumber?
40
- }
41
-
42
- author =
43
- element author {
44
- technical_committee,
45
- subcommittee?,
46
- workgroup?,
47
- secretariat?
48
- }
49
-
50
- documenttype =
51
- element documenttype {
52
- ("international-standard" | "technical-specification" | "technical-report" | "publicly-available-specification" | "international-workshop-agreement" | "guide" )
53
- }
54
-
55
- documentstatus =
56
- element documentstatus {
57
- stage,
58
- substage?
59
- }
60
-
61
- stage =
62
- element stage {
63
- ("00" | "10" | "20" | "30" | "40" | "50" | "60" | "90" | "95" )
64
- }
65
-
66
- substage =
67
- element substage {
68
- ("00" | "20" | "60" | "90" | "92" | "93" | "98" | "99" )
69
- }
70
-
71
- documentnumber =
72
- element documentnumber {
73
- attribute partnumber { text }?,
74
- text
75
- }
76
-
77
- tc_documentnumber =
78
- element tc_documentnumber {
79
- text
80
- }
81
-
82
- ref_documentnumber =
83
- element ref_documentnumber {
84
- text
85
- }
86
-
87
- technical_committee =
88
- element technical_committee {
89
- attribute number { text }?,
90
- text
91
- }
92
-
93
- subcommittee =
94
- element subcommittee {
95
- attribute number { text }?,
96
- text
97
- }
98
-
99
- workgroup =
100
- element workgroup {
101
- attribute number { text }?,
102
- text
103
- }
104
-
105
- secretariat =
106
- element secretariat { text }
107
-
108
- revdate =
109
- element revdate { text }
110
-
111
- copyright_year =
112
- element copyright_year { text }
113
-
114
- edition =
115
- element edition { text }
116
-
117
- title =
118
- element title {title_en, title_fr}
119
-
120
- title_en =
121
- element en { title_intro?, title_main, title_part? }
122
-
123
- title_fr =
124
- element fr { title_intro?, title_main, title_part? }
125
-
126
- title_intro =
127
- element title_intro { text }
128
-
129
- title_main =
130
- element title_main { text }
131
-
132
- title_part =
133
- element title_part {
134
- text
135
- }
136
-
137
- foreword =
138
- element foreword {
139
- ( para | table | note | formula | warning | ol | ul | dl | figure | quote | sourcecode | review_note )*
140
- }
141
-
142
- introduction =
143
- element introduction {
144
- attribute anchor { xsd:ID }?,
145
- ( para | table | note | formula | warning | ol | ul | dl | figure | quote | sourcecode | review_note )*,
146
- patent_notice?
147
- }
148
-
149
- patent_notice =
150
- element patent_notice {
151
- attribute anchor { xsd:ID }?,
152
- para+
153
- }
154
-
155
- middle =
156
- element middle {
157
- scope, norm_ref, terms_defs, clause+
158
- }
159
-
160
- scope =
161
- element scope {
162
- attribute anchor { xsd:ID }?,
163
- para+
164
- }
165
-
166
- norm_ref =
167
- element norm_ref {
168
- attribute anchor { xsd:ID }?,
169
- # boilerplate
170
- para,
171
- iso_ref_title*
172
- }
173
-
174
- iso_ref_title =
175
- element iso_ref_title {
176
- attribute anchor { xsd:ID },
177
- isocode, (isodate, date_footnote?)?, isotitle
178
- }
179
-
180
- isocode =
181
- element isocode { text }
182
-
183
- isodate =
184
- element isodate { text }
185
-
186
- date_footnote =
187
- element date_footnote { text }
188
-
189
- isotitle =
190
- element isotitle { text }
191
-
192
- terms_defs =
193
- element terms_defs {
194
- attribute anchor { xsd:ID }?,
195
- # boilerplate
196
- para, para, ul,
197
- termdef+
198
- }
199
-
200
- termdef =
201
- element termdef {
202
- attribute anchor { xsd:ID }?,
203
- term, admitted_term*, termsymbol?, deprecated_term*,
204
- termdomain?, para, termnote*, termexample*, termref*
205
- }
206
-
207
- term =
208
- element term { text }
209
-
210
- admitted_term =
211
- element admitted_term { text }
212
-
213
- termsymbol =
214
- element termsymbol { stem }
215
-
216
- deprecated_term =
217
- element deprecated_term { text }
218
-
219
- termdomain =
220
- element termdomain { text }
221
-
222
- termnote =
223
- element termnote { (text | xref | eref)* }
224
-
225
- termexample =
226
- element termexample { text }
227
-
228
- termref =
229
- element termref { xref, (isosection, modification?)? }
230
-
231
- isosection =
232
- element isosection { text }
233
-
234
- modification =
235
- element modification { text }
236
-
237
- clause =
238
- element clause {
239
- attribute anchor { xsd:ID }?,
240
- tname?,
241
- ( para | table | note | formula | warning | ol | ul | dl | figure | quote | sourcecode | review_note )*,
242
- clause*
243
- }
244
-
245
- quote =
246
- element quote {
247
- attribute anchor { xsd:ID }?,
248
- ( para | table | note | formula | warning | ol | ul | dl | figure | quote | sourcecode | review_note )*
249
- }
250
-
251
-
252
- back =
253
- element back {
254
- annex*,
255
- bibliography
256
- }
257
-
258
- annex =
259
- element annex {
260
- attribute anchor { xsd:ID }?,
261
- tname?,
262
- ( para | table | note | formula | warning | ol | ul | dl | figure | quote | sourcecode | review_note )*,
263
- clause*
264
- }
265
-
266
- bibliography =
267
- element bibliography {
268
- attribute anchor { xsd:ID }?,
269
- (iso_ref_title | reference)+
270
- }
271
-
272
- reference =
273
- element reference { ref, para }
274
-
275
- ref =
276
- element ref {
277
- attribute anchor { xsd:ID }?,
278
- text
279
- }
280
-
281
- para =
282
- element p {
283
- (text | em | eref | strong | stem | sub | sup | tt | xref | fn | br)*
284
- }
285
-
286
- figure =
287
- element figure {
288
- attribute src { text }?,
289
- attribute anchor { xsd:ID }?,
290
- tname?,
291
- dl?,
292
- figure*
293
- }
294
-
295
- sourcecode =
296
- element sourcecode {
297
- attribute anchor { xsd:ID }?,
298
- tname?,
299
- ( text | callout )*,
300
- colist?
301
- }
302
-
303
- review_note =
304
- element review_note {
305
- attribute color { text }?,
306
- text
307
- }
308
-
309
- callout =
310
- element callout {
311
- xsd:ID
312
- }
313
-
314
- colist =
315
- element colist {
316
- annotation+
317
- }
318
-
319
- annotation =
320
- element annotation {
321
- attribute anchor { xsd:ID }?,
322
- text
323
- }
324
-
325
- fn =
326
- element fn {
327
- (text | em | eref | stem | strong | sub | sup | tt | xref | br)*
328
- }
329
-
330
- ol =
331
- element ol {
332
- attribute type { text },
333
- li+
334
- }
335
-
336
- ul =
337
- element ul { li+ }
338
-
339
- li =
340
- element li {
341
- ( para | table | note | formula | warning | ol | ul | dl | quote | sourcecode | review_note )+
342
- }
343
-
344
- dl =
345
- element dl {
346
- (dt, dd)+
347
- }
348
-
349
- dt =
350
- element dt {
351
- (text | em | eref | stem | strong | sub | sup | tt | xref | br)
352
- }
353
-
354
- dd =
355
- element dd {
356
- ( para | table | note | formula | warning | ol | ul | dl | quote | sourcecode | review_note )*
357
- }
358
-
359
- note =
360
- element note { para+ }
361
-
362
- warning =
363
- element warning { para+ }
364
-
365
- formula =
366
- element formula {
367
- attribute anchor { xsd:ID }?,
368
- stem,
369
- dl?
370
- }
371
-
372
- xref =
373
- element xref {
374
- attribute format { "footnote" | "inline" }?,
375
- attribute target { text },
376
- ( text | iso_ref )
377
- }
378
-
379
- iso_ref =
380
- element iso_ref { isocode, (isodate, (isosection?)?)? }
381
-
382
- eref =
383
- element eref {
384
- attribute target { text },
385
- text
386
- }
387
-
388
- br =
389
- element br { empty }
390
-
391
- em =
392
- element em { text }
393
-
394
- strong =
395
- element strong { text }
396
-
397
- stem =
398
- element stem { text }
399
-
400
- sub =
401
- element sub { text }
402
-
403
- sup =
404
- element sup { text }
405
-
406
- tt =
407
- element tt { text }
408
-
409
- table =
410
- element table {
411
- attribute anchor { xsd:ID }?,
412
- tname?, thead?, tbody, tfoot?, note*
413
- }
414
-
415
- tname =
416
- element name { text }
417
-
418
- thead =
419
- element thead { tr+ }
420
-
421
- tbody =
422
- element tbody { tr+ }
423
-
424
- tfoot =
425
- element tfoot { tr+ }
426
-
427
- tr =
428
- element tr { (td | th)+ }
429
-
430
- th =
431
- element th {
432
- attribute colspan { text }?,
433
- attribute rowspan { text }?,
434
- attribute align { text }?,
435
- (text | em | eref | stem | strong | sub | sup | tt | xref | fn | br | para)*
436
- }
437
-
438
- td =
439
- element td {
440
- attribute colspan { text }?,
441
- attribute rowspan { text }?,
442
- attribute align { text }?,
443
- (text | em | eref | stem | strong | sub | sup | tt | xref | fn | br | para)*
444
- }