isodoc 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -5
  3. data/README.adoc +34 -22
  4. data/isodoc.gemspec +1 -1
  5. data/lib/isodoc.rb +3 -1
  6. data/lib/isodoc/blocks.rb +1 -1
  7. data/lib/isodoc/cleanup.rb +1 -1
  8. data/lib/isodoc/convert.rb +9 -8
  9. data/lib/isodoc/{comments.rb → htmlconvert/comments.rb} +1 -1
  10. data/lib/isodoc/htmlconvert/convert.rb +13 -0
  11. data/lib/isodoc/{footnotes.rb → htmlconvert/footnotes.rb} +1 -1
  12. data/lib/isodoc/{html.rb → htmlconvert/html.rb} +29 -4
  13. data/lib/isodoc/i18n-en.yaml +5 -5
  14. data/lib/isodoc/i18n.rb +6 -2
  15. data/lib/isodoc/inline.rb +8 -8
  16. data/lib/isodoc/iso/convert.rb +4 -0
  17. data/lib/isodoc/iso/html/style-human.scss +3 -3
  18. data/lib/isodoc/iso/html/style-iso.scss +2 -2
  19. data/lib/isodoc/iso/html/wordstyle.scss +27 -0
  20. data/lib/isodoc/iso/wordconvert.rb +5 -2
  21. data/lib/isodoc/iso2wordhtml.rb +15 -16
  22. data/lib/isodoc/lists.rb +1 -1
  23. data/lib/isodoc/metadata.rb +66 -49
  24. data/lib/isodoc/references.rb +21 -11
  25. data/lib/isodoc/section.rb +3 -3
  26. data/lib/isodoc/table.rb +1 -1
  27. data/lib/isodoc/terms.rb +1 -1
  28. data/lib/isodoc/utils.rb +20 -21
  29. data/lib/isodoc/version.rb +1 -1
  30. data/lib/isodoc/wordconvert/comments.rb +122 -117
  31. data/lib/isodoc/wordconvert/convert.rb +5 -2
  32. data/lib/isodoc/wordconvert/footnotes.rb +14 -1
  33. data/lib/isodoc/wordconvert/postprocess.rb +7 -2
  34. data/lib/isodoc/wordconvert/wordconvertmodule.rb +12 -1
  35. data/lib/isodoc/xref_gen.rb +12 -2
  36. data/lib/isodoc/xref_sect_gen.rb +5 -4
  37. data/spec/isodoc/blocks_spec.rb +1 -1
  38. data/spec/isodoc/footnotes_spec.rb +3 -3
  39. data/spec/isodoc/i18n_spec.rb +10 -10
  40. data/spec/isodoc/inline_spec.rb +2 -2
  41. data/spec/isodoc/iso_spec.rb +79 -0
  42. data/spec/isodoc/metadata_spec.rb +12 -4
  43. data/spec/isodoc/postproc_spec.rb +7 -7
  44. data/spec/isodoc/ref_spec.rb +7 -19
  45. data/spec/isodoc/section_spec.rb +19 -84
  46. data/spec/isodoc/terms_spec.rb +1 -1
  47. data/spec/isodoc/xref_spec.rb +14 -14
  48. data/spec/spec_helper.rb +3 -3
  49. metadata +9 -8
@@ -54,7 +54,7 @@ RSpec.describe IsoDoc do
54
54
  INPUT
55
55
  #{HTML_HDR}
56
56
  <p class="zzSTDTitle1"/>
57
- <div id="_terms_and_definitions"><h1>1.&#160; Terms and Definitions</h1><p>For the purposes of this document,
57
+ <div id="_terms_and_definitions"><h1>1.&#160; Terms and definitions</h1><p>For the purposes of this document,
58
58
  the following terms and definitions apply.</p>
59
59
  <p>ISO and IEC maintain terminological databases for use in
60
60
  standardization at the following addresses:</p>
@@ -78,7 +78,7 @@ RSpec.describe IsoDoc do
78
78
  <a href="#N">Note</a>
79
79
  </p>
80
80
  </div>
81
- <div id="terms"><h1>2.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
81
+ <div id="terms"><h1>2.&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
82
82
  <p>ISO and IEC maintain terminological databases for use in
83
83
  standardization at the following addresses:</p>
84
84
 
@@ -196,7 +196,7 @@ RSpec.describe IsoDoc do
196
196
  <a href="#N">Figure 1</a>
197
197
  </p>
198
198
  </div>
199
- <div id="terms"><h1>2.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
199
+ <div id="terms"><h1>2.&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
200
200
  <p>ISO and IEC maintain terminological databases for use in
201
201
  standardization at the following addresses:</p>
202
202
 
@@ -316,7 +316,7 @@ RSpec.describe IsoDoc do
316
316
  <div id="scope">
317
317
  <h1>1.&#160; Scope</h1>
318
318
  </div>
319
- <div id="terms"><h1>2.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
319
+ <div id="terms"><h1>2.&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
320
320
  <p>ISO and IEC maintain terminological databases for use in
321
321
  standardization at the following addresses:</p>
322
322
 
@@ -446,7 +446,7 @@ RSpec.describe IsoDoc do
446
446
  <a href="#N">Example</a>
447
447
  </p>
448
448
  </div>
449
- <div id="terms"><h1>2.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
449
+ <div id="terms"><h1>2.&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
450
450
  <p>ISO and IEC maintain terminological databases for use in
451
451
  standardization at the following addresses:</p>
452
452
 
@@ -578,7 +578,7 @@ RSpec.describe IsoDoc do
578
578
  <a href="#N">Formula (1)</a>
579
579
  </p>
580
580
  </div>
581
- <div id="terms"><h1>2.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
581
+ <div id="terms"><h1>2.&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
582
582
  <p>ISO and IEC maintain terminological databases for use in
583
583
  standardization at the following addresses:</p>
584
584
 
@@ -739,7 +739,7 @@ RSpec.describe IsoDoc do
739
739
  <a href="#N">Table 1</a>
740
740
  </p>
741
741
  </div>
742
- <div id="terms"><h1>2.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
742
+ <div id="terms"><h1>2.&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
743
743
  <p>ISO and IEC maintain terminological databases for use in
744
744
  standardization at the following addresses:</p>
745
745
 
@@ -819,7 +819,7 @@ RSpec.describe IsoDoc do
819
819
  <div id="scope">
820
820
  <h1>1.&#160; Scope</h1>
821
821
  </div>
822
- <div id="terms"><h1>2.&#160; Terms and Definitions</h1><p>For the purposes of this document,
822
+ <div id="terms"><h1>2.&#160; Terms and definitions</h1><p>For the purposes of this document,
823
823
  the following terms and definitions apply.</p>
824
824
  <p>ISO and IEC maintain terminological databases for use in
825
825
  standardization at the following addresses:</p>
@@ -876,7 +876,7 @@ RSpec.describe IsoDoc do
876
876
  <p id="E">Text</p>
877
877
  </clause>
878
878
 
879
- <terms id="H" obligation="normative"><title>Terms, Definitions, Symbols and Abbreviated Terms</title><terms id="I" obligation="normative">
879
+ <terms id="H" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
880
880
  <title>Normal Terms</title>
881
881
  <term id="J">
882
882
  <preferred>Term2</preferred>
@@ -960,10 +960,10 @@ RSpec.describe IsoDoc do
960
960
  <p id="E">Text</p>
961
961
  </div>
962
962
  <div>
963
- <h1>2.&#160; Normative References</h1>
963
+ <h1>2.&#160; Normative references</h1>
964
964
  <p>There are no normative references in this document.</p>
965
965
  </div>
966
- <div id="H"><h1>3.&#160; Terms and Definitions</h1><p>For the purposes of this document,
966
+ <div id="H"><h1>3.&#160; Terms and definitions</h1><p>For the purposes of this document,
967
967
  the following terms and definitions apply.</p>
968
968
  <p>ISO and IEC maintain terminological databases for use in
969
969
  standardization at the following addresses:</p>
@@ -979,11 +979,11 @@ RSpec.describe IsoDoc do
979
979
  <p class="TermNum" id="J">3.1.1</p>
980
980
  <p class="Terms" style="text-align:left;">Term2</p>
981
981
 
982
- </div><div id="K"><h2>3.2. Symbols and Abbreviated Terms</h2>
982
+ </div><div id="K"><h2>3.2. Symbols and abbreviated terms</h2>
983
983
  <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
984
984
  </div></div>
985
985
  <div id="L" class="Symbols">
986
- <h1>4.&#160; Symbols and Abbreviated Terms</h1>
986
+ <h1>4.&#160; Symbols and abbreviated terms</h1>
987
987
  <dl>
988
988
  <dt>
989
989
  <p>Symbol</p>
@@ -1096,7 +1096,7 @@ RSpec.describe IsoDoc do
1096
1096
  <li><p>A</p></li>
1097
1097
  </ol>
1098
1098
  </div>
1099
- <div id="terms"><h1>2.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
1099
+ <div id="terms"><h1>2.&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
1100
1100
  <p>ISO and IEC maintain terminological databases for use in
1101
1101
  standardization at the following addresses:</p>
1102
1102
 
@@ -1210,7 +1210,7 @@ RSpec.describe IsoDoc do
1210
1210
  <li><p>A</p></li>
1211
1211
  </ol>
1212
1212
  </div>
1213
- <div id="terms"><h1>2.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
1213
+ <div id="terms"><h1>2.&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
1214
1214
  <p>ISO and IEC maintain terminological databases for use in
1215
1215
  standardization at the following addresses:</p>
1216
1216
 
data/spec/spec_helper.rb CHANGED
@@ -34,13 +34,13 @@ HTML_HDR = <<~END
34
34
  <title>test</title>
35
35
  </head>
36
36
  <body lang="EN-US" link="blue" vlink="#954F72">
37
- <div class="WordSection1">
37
+ <div class="title-section">
38
38
  <p>&#160;</p>
39
39
  </div>
40
40
  <br/>
41
- <div class="WordSection2">
41
+ <div class="prefatory-section">
42
42
  <p>&#160;</p>
43
43
  </div>
44
44
  <br/>
45
- <div class="WordSection3">
45
+ <div class="main-section">
46
46
  END
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-03 00:00:00.000000000 Z
11
+ date: 2018-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciimath
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: 0.7.1
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: 0.7.1
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: liquid
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -345,10 +345,11 @@ files:
345
345
  - lib/isodoc.rb
346
346
  - lib/isodoc/blocks.rb
347
347
  - lib/isodoc/cleanup.rb
348
- - lib/isodoc/comments.rb
349
348
  - lib/isodoc/convert.rb
350
- - lib/isodoc/footnotes.rb
351
- - lib/isodoc/html.rb
349
+ - lib/isodoc/htmlconvert/comments.rb
350
+ - lib/isodoc/htmlconvert/convert.rb
351
+ - lib/isodoc/htmlconvert/footnotes.rb
352
+ - lib/isodoc/htmlconvert/html.rb
352
353
  - lib/isodoc/i18n-en.yaml
353
354
  - lib/isodoc/i18n-fr.yaml
354
355
  - lib/isodoc/i18n-zh-Hans.yaml
@@ -430,7 +431,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
430
431
  version: '0'
431
432
  requirements: []
432
433
  rubyforge_project:
433
- rubygems_version: 2.7.7
434
+ rubygems_version: 2.7.6
434
435
  signing_key:
435
436
  specification_version: 4
436
437
  summary: Convert documents in IsoDoc into Word and HTML in AsciiDoc.