metanorma-iso 2.1.2 → 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/html2doc/lists.rb +7 -4
  3. data/lib/isodoc/iso/html/isodoc-dis.css +4 -15
  4. data/lib/isodoc/iso/html/isodoc-dis.scss +4 -17
  5. data/lib/isodoc/iso/html/isodoc.css +4 -11
  6. data/lib/isodoc/iso/html/isodoc.scss +5 -15
  7. data/lib/isodoc/iso/i18n-en.yaml +1 -1
  8. data/lib/isodoc/iso/iso.amendment.xsl +429 -121
  9. data/lib/isodoc/iso/iso.international-standard.xsl +429 -121
  10. data/lib/isodoc/iso/metadata.rb +1 -1
  11. data/lib/isodoc/iso/presentation_xml_convert.rb +5 -1
  12. data/lib/isodoc/iso/word_cleanup.rb +40 -6
  13. data/lib/isodoc/iso/word_dis_cleanup.rb +10 -14
  14. data/lib/metanorma/iso/base.rb +0 -6
  15. data/lib/metanorma/iso/biblio.rng +102 -5
  16. data/lib/metanorma/iso/cleanup.rb +33 -20
  17. data/lib/metanorma/iso/front.rb +13 -6
  18. data/lib/metanorma/iso/isodoc.rng +33 -0
  19. data/lib/metanorma/iso/isostandard.rng +3 -1
  20. data/lib/metanorma/iso/validate_section.rb +0 -12
  21. data/lib/metanorma/iso/version.rb +1 -1
  22. data/spec/isodoc/blocks_spec.rb +3 -3
  23. data/spec/isodoc/metadata_spec.rb +1 -2
  24. data/spec/isodoc/postproc_spec.rb +2 -62
  25. data/spec/isodoc/section_spec.rb +2 -8
  26. data/spec/isodoc/terms_spec.rb +62 -0
  27. data/spec/isodoc/word_dis_spec.rb +185 -3
  28. data/spec/metanorma/amd_spec.rb +4 -40
  29. data/spec/metanorma/base_spec.rb +61 -103
  30. data/spec/metanorma/blocks_spec.rb +0 -33
  31. data/spec/metanorma/cleanup_spec.rb +201 -201
  32. data/spec/metanorma/refs_spec.rb +5 -3
  33. data/spec/metanorma/section_spec.rb +6 -6
  34. data/spec/metanorma/validate_spec.rb +8 -19
  35. data/spec/spec_helper.rb +1 -7
  36. data/spec/vcr_cassettes/withdrawn_iso.yml +28 -28
  37. metadata +3 -4
  38. data/lib/metanorma/iso/macros.rb +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43eeca2b2e24e0d8d1681a52ad493218736544151b9d440e4a38343dae49e22b
4
- data.tar.gz: 79241bc11b898d70a969f984646e3aded85b0bf1a7fd9d56f73b359e84e36f9a
3
+ metadata.gz: d3629dd32172e9b6df3f58715579377d8cf71e989c27b54200f1f562a9892b3d
4
+ data.tar.gz: 5645a46a5e59c5a55543469064124582250ef5b676ced7627d839c120b5f6da2
5
5
  SHA512:
6
- metadata.gz: 27b8c022d5e76b1d1d91ed48a2d7f95246df401c8ede504244387500ab371dd05fc0c6c71fb47d955059004321a9192ebd7d532ee593d46ccd594a0df3b654e2
7
- data.tar.gz: 4f5d8ce30167455dd18418b82120ec7597d1daafde97b781d1b50b71d42a616754317c8faa6fd3906b35dcf040afc53bdad0c9f06d75b45784fb49fd7db33136
6
+ metadata.gz: b6cdedb8c9ebfd573277b5a757a9599687f3818c3be99cd50e835866b2306846c8d93c4df0fde2a0f29575832f56af3a17f4fb31fc98734df918626a21d9a035
7
+ data.tar.gz: bf939763b17cd5db3c55cfc3f870be2de3892727849073d33785439a113561300fe81941ee4d8ffe02a2cb5712b11b172a7347f5b9209d956f8755dbc4a694ef
@@ -35,11 +35,14 @@ class Html2Doc
35
35
  !x.text.strip.empty?
36
36
  end
37
37
 
38
- prev = first_p.xpath("./preceding-sibling::* | ./preceding-sibling::text()")
38
+ prev = first_p.xpath("./preceding-sibling::* | "\
39
+ "./preceding-sibling::text()[normalize-space()]")
39
40
  # bullet, tab, paragraph: ignore bullet, tab
40
- return if prev.any? { |x| !x.text.strip.empty? }
41
-
42
- para.replace(para.children)
41
+ if prev.empty? then para.replace(para.children)
42
+ elsif prev.size == 2 && prev[-1].name == "span" &&
43
+ prev[-1]["style"] == "mso-tab-count:1"
44
+ first_p.replace(first_p.children)
45
+ end
43
46
  end
44
47
 
45
48
  def list2para_style(listtype, depth)
@@ -76,7 +76,7 @@ p.NormRef, li.NormRef, div.NormRef {
76
76
  mso-ansi-language: EN-GB; }
77
77
 
78
78
  p.FigureTitle, li.FigureTitle, div.FigureTitle {
79
- mso-style-name: figuretitle;
79
+ mso-style-name: "Figure Title";
80
80
  mso-style-unhide: no;
81
81
  mso-style-qformat: yes;
82
82
  mso-style-parent: "";
@@ -1264,9 +1264,6 @@ table.MsoISOTable td, table.MsoISOTableBig td {
1264
1264
  mso-border-alt: solid windowtext 1pt;
1265
1265
  padding: 0cm 2.85pt 0cm 2.85pt; }
1266
1266
 
1267
- table.MsoISOTable p, table.MsoISOTableBig p {
1268
- font-size: {{smallerfontsize}}; }
1269
-
1270
1267
  table.MsoTableGrid {
1271
1268
  mso-style-name: "Table Grid";
1272
1269
  mso-tstyle-rowband-size: 0;
@@ -1694,12 +1691,6 @@ div.Example, td.Example {
1694
1691
  margin: 0in;
1695
1692
  margin-bottom: 6.0pt; }
1696
1693
 
1697
- td.Example p.MsoListParagraph {
1698
- font-size: {{smallerfontsize}}; }
1699
-
1700
- div.Example p.MsoListParagraph {
1701
- font-size: {{smallerfontsize}}; }
1702
-
1703
1694
  p.Example, li.Example, div.Example {
1704
1695
  mso-style-unhide: no;
1705
1696
  mso-style-qformat: yes;
@@ -3268,9 +3259,10 @@ p.ListContinue2-, li.ListContinue2-, div.ListContinue2- {
3268
3259
  line-height: 10.5pt;
3269
3260
  mso-pagination: widow-orphan;
3270
3261
  tab-stops: 40.3pt;
3271
- font-size: 9.0pt;
3262
+ font-size: 10.0pt;
3272
3263
  mso-bidi-font-size: {{normalfontsize}};
3273
- font-family: "Arial",sans-serif;
3264
+ font-family: {{bodyfont}};
3265
+ /*font-family:"Arial",sans-serif;*/
3274
3266
  mso-fareast-font-family: Calibri;
3275
3267
  mso-bidi-font-family: "Times New Roman";
3276
3268
  mso-ansi-language: EN-GB;
@@ -4485,9 +4477,6 @@ span.SpellE {
4485
4477
  mso-style-name: "";
4486
4478
  mso-spl-e: yes; }
4487
4479
 
4488
- div.Note p.MsoListParagraph {
4489
- font-size: {{smallerfontsize}}; }
4490
-
4491
4480
  div.Note span.stem {
4492
4481
  font-size: {{smallerfontsize}}; }
4493
4482
 
@@ -71,7 +71,7 @@ p.NormRef, li.NormRef, div.NormRef
71
71
  mso-bidi-font-family:$bodyfont;
72
72
  mso-ansi-language:EN-GB;}
73
73
  p.FigureTitle, li.FigureTitle, div.FigureTitle
74
- {mso-style-name:figuretitle;
74
+ {mso-style-name:"Figure Title";
75
75
  mso-style-unhide:no;
76
76
  mso-style-qformat:yes;
77
77
  mso-style-parent:"";
@@ -1208,8 +1208,6 @@ table.MsoISOTable td, table.MsoISOTableBig td
1208
1208
  {border:solid windowtext 1pt;
1209
1209
  mso-border-alt:solid windowtext 1pt;
1210
1210
  padding:0cm 2.85pt 0cm 2.85pt;}
1211
- table.MsoISOTable p, table.MsoISOTableBig p
1212
- {font-size:$smallerfontsize; }
1213
1211
  table.MsoTableGrid
1214
1212
  {mso-style-name:"Table Grid";
1215
1213
  mso-tstyle-rowband-size:0;
@@ -1628,14 +1626,6 @@ div.Example, td.Example {
1628
1626
  margin-bottom:6.0pt;
1629
1627
  }
1630
1628
 
1631
- td.Example p.MsoListParagraph {
1632
- font-size: $smallerfontsize;
1633
- }
1634
-
1635
- div.Example p.MsoListParagraph {
1636
- font-size: $smallerfontsize;
1637
- }
1638
-
1639
1629
  p.Example, li.Example, div.Example
1640
1630
  {
1641
1631
  mso-style-unhide:no;
@@ -3148,9 +3138,10 @@ p.ListContinue2-, li.ListContinue2-, div.ListContinue2-
3148
3138
  line-height:10.5pt;
3149
3139
  mso-pagination:widow-orphan;
3150
3140
  tab-stops:40.3pt;
3151
- font-size:9.0pt;
3141
+ font-size:10.0pt;
3152
3142
  mso-bidi-font-size:$normalfontsize;
3153
- font-family:"Arial",sans-serif;
3143
+ font-family:$bodyfont;
3144
+ /*font-family:"Arial",sans-serif;*/
3154
3145
  mso-fareast-font-family:Calibri;
3155
3146
  mso-bidi-font-family:"Times New Roman";
3156
3147
  mso-ansi-language:EN-GB;
@@ -4309,10 +4300,6 @@ span.SpellE
4309
4300
  mso-spl-e:yes;}
4310
4301
 
4311
4302
 
4312
- div.Note p.MsoListParagraph {
4313
- font-size: $smallerfontsize;
4314
- }
4315
-
4316
4303
  div.Note span.stem {
4317
4304
  font-size: $smallerfontsize; }
4318
4305
 
@@ -376,6 +376,7 @@ p.SourceTitle {
376
376
  mso-ansi-language: EN-GB; }
377
377
 
378
378
  p.Tabletitle, li.Tabletitle, div.Tabletitle, p.ListTitle {
379
+ mso-style-name: "Table title";
379
380
  mso-style-unhide: no;
380
381
  mso-style-qformat: yes;
381
382
  mso-style-parent: "";
@@ -510,6 +511,7 @@ span.AnnexFigureTitleChar {
510
511
 
511
512
  p.Note, div.Note, li.Note, p.TableFootnote, div.TableFootnote, li.TableFootnote {
512
513
  mso-style-unhide: no;
514
+ mso-style-name: "Note";
513
515
  mso-style-qformat: yes;
514
516
  mso-style-parent: "";
515
517
  margin-top: 0cm;
@@ -1277,7 +1279,7 @@ aside {
1277
1279
  font-size: {{footnotefontsize}}; }
1278
1280
 
1279
1281
  /*
1280
- div.example {
1282
+ div.Example {
1281
1283
  border:solid black .25pt;
1282
1284
  mso-border-alt:solid black .25pt;
1283
1285
  padding:10pt;
@@ -1287,7 +1289,7 @@ div.example {
1287
1289
  }
1288
1290
  */
1289
1291
  /*
1290
- div.example {
1292
+ div.Example {
1291
1293
  margin-left:70.9pt;
1292
1294
  text-indent:-70.9pt;
1293
1295
  }
@@ -1305,12 +1307,6 @@ div.Example, td.Example {
1305
1307
  margin: 0in;
1306
1308
  margin-bottom: 6.0pt; }
1307
1309
 
1308
- td.Example p.MsoListParagraph {
1309
- font-size: {{smallerfontsize}}; }
1310
-
1311
- div.Example p.MsoListParagraph {
1312
- font-size: {{smallerfontsize}}; }
1313
-
1314
1310
  p.Example, li.Example, div.Example {
1315
1311
  mso-style-unhide: no;
1316
1312
  mso-style-qformat: yes;
@@ -1334,9 +1330,6 @@ span.ExampleChar {
1334
1330
  mso-style-link: Example;
1335
1331
  mso-ansi-language: EN-GB; }
1336
1332
 
1337
- div.Note p.MsoListParagraph {
1338
- font-size: {{smallerfontsize}}; }
1339
-
1340
1333
  div.Note span.stem {
1341
1334
  font-size: {{smallerfontsize}}; }
1342
1335
 
@@ -358,7 +358,8 @@ p.SourceTitle
358
358
  mso-bidi-font-family:$bodyfont;
359
359
  mso-ansi-language:EN-GB;}
360
360
  p.Tabletitle, li.Tabletitle, div.Tabletitle, p.ListTitle
361
- {mso-style-unhide:no;
361
+ {mso-style-name:"Table title";
362
+ mso-style-unhide:no;
362
363
  mso-style-qformat:yes;
363
364
  mso-style-parent:"";
364
365
  margin-top:0cm;
@@ -485,6 +486,7 @@ span.AnnexFigureTitleChar
485
486
  font-weight:bold;}
486
487
  p.Note, div.Note, li.Note, p.TableFootnote, div.TableFootnote, li.TableFootnote
487
488
  {mso-style-unhide:no;
489
+ mso-style-name:"Note";
488
490
  mso-style-qformat:yes;
489
491
  mso-style-parent:"";
490
492
  margin-top:0cm;
@@ -1234,7 +1236,7 @@ aside {
1234
1236
  }
1235
1237
 
1236
1238
  /*
1237
- div.example {
1239
+ div.Example {
1238
1240
  border:solid black .25pt;
1239
1241
  mso-border-alt:solid black .25pt;
1240
1242
  padding:10pt;
@@ -1246,7 +1248,7 @@ div.example {
1246
1248
 
1247
1249
 
1248
1250
  /*
1249
- div.example {
1251
+ div.Example {
1250
1252
  margin-left:70.9pt;
1251
1253
  text-indent:-70.9pt;
1252
1254
  }
@@ -1267,14 +1269,6 @@ div.Example, td.Example {
1267
1269
  margin-bottom:6.0pt;
1268
1270
  }
1269
1271
 
1270
- td.Example p.MsoListParagraph {
1271
- font-size: $smallerfontsize;
1272
- }
1273
-
1274
- div.Example p.MsoListParagraph {
1275
- font-size: $smallerfontsize;
1276
- }
1277
-
1278
1272
  p.Example, li.Example, div.Example
1279
1273
  {
1280
1274
  mso-style-unhide:no;
@@ -1300,10 +1294,6 @@ span.ExampleChar
1300
1294
 
1301
1295
 
1302
1296
 
1303
- div.Note p.MsoListParagraph {
1304
- font-size: $smallerfontsize;
1305
- }
1306
-
1307
1297
  div.Note span.stem {
1308
1298
  font-size: $smallerfontsize; }
1309
1299
 
@@ -1,5 +1,5 @@
1
1
  term_def_boilerplate: |
2
- <p>ISO and IEC maintain terminological databases for use in
2
+ <p>ISO and IEC maintain terminology databases for use in
3
3
  standardization at the following addresses:</p>
4
4
 
5
5
  <ul>