metanorma-iso 2.0.8.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/lib/html2doc/lists.rb +37 -0
  3. data/lib/isodoc/iso/html/html_iso_titlepage.html +5 -0
  4. data/lib/isodoc/iso/html/isodoc-dis.css +196 -156
  5. data/lib/isodoc/iso/html/isodoc-dis.scss +193 -156
  6. data/lib/isodoc/iso/html/word_iso_intro-dis.html +7 -0
  7. data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +2 -0
  8. data/lib/isodoc/iso/html/word_iso_titlepage.html +6 -0
  9. data/lib/isodoc/iso/html/wordstyle-dis.css +204 -34
  10. data/lib/isodoc/iso/html/wordstyle-dis.scss +198 -34
  11. data/lib/isodoc/iso/i18n-en.yaml +1 -0
  12. data/lib/isodoc/iso/i18n-fr.yaml +1 -0
  13. data/lib/isodoc/iso/i18n-ru.yaml +1 -0
  14. data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -0
  15. data/lib/isodoc/iso/init.rb +17 -1
  16. data/lib/isodoc/iso/iso.amendment.xsl +470 -201
  17. data/lib/isodoc/iso/iso.international-standard.xsl +470 -201
  18. data/lib/isodoc/iso/metadata.rb +5 -11
  19. data/lib/isodoc/iso/presentation_inline.rb +90 -0
  20. data/lib/isodoc/iso/presentation_xml_convert.rb +39 -98
  21. data/lib/isodoc/iso/presentation_xref.rb +126 -0
  22. data/lib/isodoc/iso/word_cleanup.rb +14 -0
  23. data/lib/isodoc/iso/word_convert.rb +27 -10
  24. data/lib/isodoc/iso/word_dis_convert.rb +174 -0
  25. data/lib/isodoc/iso/xref.rb +46 -25
  26. data/lib/metanorma/iso/biblio.rng +37 -8
  27. data/lib/metanorma/iso/boilerplate-fr.xml +1 -1
  28. data/lib/metanorma/iso/boilerplate-ru.xml +1 -3
  29. data/lib/metanorma/iso/boilerplate.xml +1 -3
  30. data/lib/metanorma/iso/cleanup.rb +2 -1
  31. data/lib/metanorma/iso/isodoc.rng +56 -0
  32. data/lib/metanorma/iso/version.rb +1 -1
  33. data/lib/metanorma-iso.rb +1 -0
  34. data/lib/relaton/render/config.yml +4 -0
  35. data/lib/relaton/render/general.rb +13 -0
  36. data/metanorma-iso.gemspec +1 -1
  37. data/spec/isodoc/amd_spec.rb +15 -14
  38. data/spec/isodoc/blocks_spec.rb +286 -179
  39. data/spec/isodoc/i18n_spec.rb +187 -21
  40. data/spec/isodoc/inline_spec.rb +35 -42
  41. data/spec/isodoc/iso_spec.rb +1 -1
  42. data/spec/isodoc/postproc_spec.rb +25 -0
  43. data/spec/isodoc/ref_spec.rb +66 -69
  44. data/spec/isodoc/section_spec.rb +78 -76
  45. data/spec/isodoc/table_spec.rb +2 -2
  46. data/spec/isodoc/terms_spec.rb +2 -2
  47. data/spec/isodoc/word_dis_spec.rb +760 -0
  48. data/spec/isodoc/xref_spec.rb +51 -51
  49. data/spec/metanorma/base_spec.rb +10 -10
  50. data/spec/spec_helper.rb +4 -1
  51. data/spec/vcr_cassettes/withdrawn_iso.yml +26 -26
  52. metadata +11 -5
  53. data/spec/vcr_cassettes/docrels.yml +0 -385
@@ -305,6 +305,53 @@ h1.ForewordTitle {
305
305
  font-style: normal ;
306
306
  font-weight: bold;
307
307
  }
308
+ p.ForewordTitle, li.ForewordTitle, div.ForewordTitle
309
+ {mso-style-name:"Foreword Title";
310
+ mso-style-unhide:no;
311
+ mso-style-parent:Base_Heading;
312
+ margin-top:15.5pt;
313
+ margin-right:0cm;
314
+ margin-bottom:15.5pt;
315
+ margin-left:0cm;
316
+ line-height:15.5pt;
317
+ page-break-before:always;
318
+ mso-pagination:widow-orphan;
319
+ page-break-after:avoid;
320
+ mso-outline-level:1;
321
+ mso-hyphenate:none;
322
+ font-size:14.0pt;
323
+ mso-bidi-font-size:11.0pt;
324
+ font-family:$headerfont;
325
+ mso-fareast-font-family:Calibri;
326
+ mso-bidi-font-family:"Times New Roman";
327
+ mso-ansi-language:EN-GB;
328
+ mso-fareast-language:EN-US;
329
+ font-weight:bold;
330
+ mso-bidi-font-weight:normal;}
331
+ p.IntroTitle, li.IntroTitle, div.IntroTitle
332
+ {mso-style-name:"Intro Title";
333
+ mso-style-unhide:no;
334
+ mso-style-parent:"Foreword Title";
335
+ margin-top:15.5pt;
336
+ margin-right:0cm;
337
+ margin-bottom:15.5pt;
338
+ margin-left:0cm;
339
+ line-height:15.5pt;
340
+ page-break-before:always;
341
+ mso-pagination:widow-orphan;
342
+ page-break-after:avoid;
343
+ mso-outline-level:1;
344
+ mso-hyphenate:none;
345
+ font-size:14.0pt;
346
+ mso-bidi-font-size:11.0pt;
347
+ font-family:$headerfont;
348
+ mso-fareast-font-family:Calibri;
349
+ mso-bidi-font-family:"Times New Roman";
350
+ mso-ansi-language:EN-GB;
351
+ mso-fareast-language:EN-US;
352
+ font-weight:bold;
353
+ mso-bidi-font-weight:normal;}
354
+
308
355
  h1.Annex
309
356
  {mso-style-priority:1;
310
357
  mso-style-unhide:no;
@@ -587,6 +634,123 @@ h6, .h6
587
634
  h6 {mso-list:l1 level6 lfo6;
588
635
  mso-outline-level:6;
589
636
  }
637
+ p.a2, li.a2, div.a2
638
+ {mso-style-name:a2;
639
+ mso-style-unhide:no;
640
+ mso-style-parent:Base_Heading;
641
+ mso-style-next:Normal;
642
+ margin-top:13.5pt;
643
+ margin-right:0cm;
644
+ margin-bottom:12.0pt;
645
+ margin-left:0cm;
646
+ text-indent:0cm;
647
+ line-height:13.5pt;
648
+ mso-line-height-rule:exactly;
649
+ mso-pagination:widow-orphan;
650
+ mso-outline-level:1;
651
+ mso-list:l11 level2 lfo4;
652
+ tab-stops:list 18.0pt left 25.0pt 36.0pt;
653
+ font-size:14.0pt;
654
+ mso-bidi-font-size:11.0pt;
655
+ font-family:$headerfont;
656
+ mso-fareast-font-family:Calibri;
657
+ mso-bidi-font-family:"Times New Roman";
658
+ mso-ansi-language:EN-GB;
659
+ mso-fareast-language:EN-US;
660
+ font-weight:bold;
661
+ mso-bidi-font-weight:normal;}
662
+ p.a3, li.a3, div.a3
663
+ {mso-style-name:a3;
664
+ mso-style-unhide:no;
665
+ mso-style-parent:Base_Heading;
666
+ mso-style-next:Normal;
667
+ margin-top:0cm;
668
+ margin-right:0cm;
669
+ margin-bottom:12.0pt;
670
+ margin-left:0cm;
671
+ text-indent:0cm;
672
+ line-height:12.5pt;
673
+ mso-line-height-rule:exactly;
674
+ mso-pagination:widow-orphan;
675
+ mso-outline-level:1;
676
+ mso-list:l11 level3 lfo4;
677
+ tab-stops:32.0pt list 36.0pt;
678
+ font-size:11.0pt;
679
+ font-family:$headerfont;
680
+ mso-fareast-font-family:Calibri;
681
+ mso-bidi-font-family:"Times New Roman";
682
+ mso-ansi-language:EN-GB;
683
+ mso-fareast-language:EN-US;
684
+ font-weight:bold;
685
+ mso-bidi-font-weight:normal;}
686
+ p.a4, li.a4, div.a4
687
+ {mso-style-name:a4;
688
+ mso-style-unhide:no;
689
+ mso-style-parent:Base_Heading;
690
+ mso-style-next:Normal;
691
+ margin-top:0cm;
692
+ margin-right:0cm;
693
+ margin-bottom:12.0pt;
694
+ margin-left:0cm;
695
+ text-indent:0cm;
696
+ line-height:12.0pt;
697
+ mso-pagination:widow-orphan;
698
+ mso-outline-level:1;
699
+ mso-list:l11 level4 lfo4;
700
+ tab-stops:44.0pt list 54.0pt;
701
+ font-size:11.0pt;
702
+ font-family:$headerfont;
703
+ mso-fareast-font-family:Calibri;
704
+ mso-bidi-font-family:"Times New Roman";
705
+ mso-ansi-language:EN-GB;
706
+ mso-fareast-language:EN-US;
707
+ font-weight:bold;
708
+ mso-bidi-font-style:italic;}
709
+ p.a5, li.a5, div.a5
710
+ {mso-style-name:a5;
711
+ mso-style-unhide:no;
712
+ mso-style-parent:Base_Heading;
713
+ mso-style-next:Normal;
714
+ margin-top:0cm;
715
+ margin-right:0cm;
716
+ margin-bottom:12.0pt;
717
+ margin-left:0cm;
718
+ text-indent:0cm;
719
+ line-height:12.0pt;
720
+ mso-pagination:widow-orphan;
721
+ mso-outline-level:1;
722
+ mso-list:l11 level5 lfo4;
723
+ tab-stops:list 54.0pt left 57.0pt 68.0pt;
724
+ font-size:11.0pt;
725
+ font-family:$headerfont;
726
+ mso-fareast-font-family:Calibri;
727
+ mso-bidi-font-family:"Times New Roman";
728
+ mso-ansi-language:EN-GB;
729
+ mso-fareast-language:EN-US;
730
+ font-weight:bold;
731
+ mso-bidi-font-style:italic;}
732
+ p.a6, li.a6, div.a6
733
+ {mso-style-name:a6;
734
+ mso-style-unhide:no;
735
+ mso-style-parent:Base_Heading;
736
+ mso-style-next:Normal;
737
+ margin-top:0cm;
738
+ margin-right:0cm;
739
+ margin-bottom:12.0pt;
740
+ margin-left:0cm;
741
+ text-indent:0cm;
742
+ line-height:12.0pt;
743
+ mso-pagination:widow-orphan;
744
+ mso-outline-level:1;
745
+ mso-list:l11 level6 lfo4;
746
+ tab-stops:57.0pt 68.0pt list 72.0pt;
747
+ font-size:11.0pt;
748
+ font-family:$headerfont;
749
+ mso-fareast-font-family:Calibri;
750
+ mso-bidi-font-family:"Times New Roman";
751
+ mso-ansi-language:EN-GB;
752
+ mso-fareast-language:EN-US;
753
+ font-weight:bold;}
590
754
  p.MsoToc1, li.MsoToc1, div.MsoToc1
591
755
  {mso-style-priority:39;
592
756
  mso-style-unhide:no;
@@ -810,7 +974,7 @@ p.MsoListContinue, li.MsoListContinue, div.MsoListContinue
810
974
  mso-pagination:widow-orphan;
811
975
  font-size:$normalfontsize;
812
976
  mso-bidi-font-size:10.0pt;
813
- font-size:$bodyfont;
977
+ font-family:$bodyfont;
814
978
  mso-fareast-font-family:"MS Mincho";
815
979
  mso-bidi-font-family:"Times New Roman";
816
980
  mso-ansi-language:EN-GB;
@@ -830,7 +994,7 @@ p.MsoListContinueCxSpFirst, li.MsoListContinueCxSpFirst, div.MsoListContinueCxSp
830
994
  mso-pagination:widow-orphan;
831
995
  font-size:$normalfontsize;
832
996
  mso-bidi-font-size:10.0pt;
833
- font-size:$bodyfont;
997
+ font-family:$bodyfont;
834
998
  mso-fareast-font-family:"MS Mincho";
835
999
  mso-bidi-font-family:"Times New Roman";
836
1000
  mso-ansi-language:EN-GB;
@@ -850,7 +1014,7 @@ p.MsoListContinueCxSpMiddle, li.MsoListContinueCxSpMiddle, div.MsoListContinueCx
850
1014
  mso-pagination:widow-orphan;
851
1015
  font-size:$normalfontsize;
852
1016
  mso-bidi-font-size:10.0pt;
853
- font-size:$bodyfont;
1017
+ font-family:$bodyfont;
854
1018
  mso-fareast-font-family:"MS Mincho";
855
1019
  mso-bidi-font-family:"Times New Roman";
856
1020
  mso-ansi-language:EN-GB;
@@ -870,7 +1034,7 @@ p.MsoListContinueCxSpLast, li.MsoListContinueCxSpLast, div.MsoListContinueCxSpLa
870
1034
  mso-pagination:widow-orphan;
871
1035
  font-size:$normalfontsize;
872
1036
  mso-bidi-font-size:10.0pt;
873
- font-size:$bodyfont;
1037
+ font-family:$bodyfont;
874
1038
  mso-fareast-font-family:"MS Mincho";
875
1039
  mso-bidi-font-family:"Times New Roman";
876
1040
  mso-ansi-language:EN-GB;
@@ -889,7 +1053,7 @@ p.MsoListContinue2, li.MsoListContinue2, div.MsoListContinue2
889
1053
  mso-pagination:widow-orphan;
890
1054
  tab-stops:40.0pt;
891
1055
  font-size:$normalfontsize;
892
- font-size:$bodyfont;
1056
+ font-family:$bodyfont;
893
1057
  mso-fareast-font-family:Calibri;
894
1058
  mso-bidi-font-family:"Times New Roman";
895
1059
  mso-ansi-language:EN-GB;
@@ -908,7 +1072,7 @@ p.MsoListContinue3, li.MsoListContinue3, div.MsoListContinue3
908
1072
  mso-pagination:widow-orphan;
909
1073
  tab-stops:60.0pt;
910
1074
  font-size:$normalfontsize;
911
- font-size:$bodyfont;
1075
+ font-family:$bodyfont;
912
1076
  mso-fareast-font-family:Calibri;
913
1077
  mso-bidi-font-family:"Times New Roman";
914
1078
  mso-ansi-language:EN-GB;
@@ -927,7 +1091,7 @@ p.MsoListContinue4, li.MsoListContinue4, div.MsoListContinue4
927
1091
  mso-pagination:widow-orphan;
928
1092
  tab-stops:80.0pt;
929
1093
  font-size:$normalfontsize;
930
- font-size:$bodyfont;
1094
+ font-family:$bodyfont;
931
1095
  mso-fareast-font-family:Calibri;
932
1096
  mso-bidi-font-family:"Times New Roman";
933
1097
  mso-ansi-language:EN-GB;
@@ -947,7 +1111,7 @@ p.MsoListContinue5, li.MsoListContinue5, div.MsoListContinue5
947
1111
  line-height:12.0pt;
948
1112
  mso-pagination:widow-orphan;
949
1113
  font-size:$normalfontsize;
950
- font-size:$bodyfont;
1114
+ font-family:$bodyfont;
951
1115
  mso-fareast-font-family:Calibri;
952
1116
  mso-bidi-font-family:"Times New Roman";
953
1117
  mso-ansi-language:EN-GB;
@@ -968,7 +1132,7 @@ p.MsoListContinue5CxSpFirst, li.MsoListContinue5CxSpFirst, div.MsoListContinue5C
968
1132
  line-height:12.0pt;
969
1133
  mso-pagination:widow-orphan;
970
1134
  font-size:$normalfontsize;
971
- font-size:$bodyfont;
1135
+ font-family:$bodyfont;
972
1136
  mso-fareast-font-family:Calibri;
973
1137
  mso-bidi-font-family:"Times New Roman";
974
1138
  mso-ansi-language:EN-GB;
@@ -989,7 +1153,7 @@ p.MsoListContinue5CxSpMiddle, li.MsoListContinue5CxSpMiddle, div.MsoListContinue
989
1153
  line-height:12.0pt;
990
1154
  mso-pagination:widow-orphan;
991
1155
  font-size:$normalfontsize;
992
- font-size:$bodyfont;
1156
+ font-family:$bodyfont;
993
1157
  mso-fareast-font-family:Calibri;
994
1158
  mso-bidi-font-family:"Times New Roman";
995
1159
  mso-ansi-language:EN-GB;
@@ -1010,7 +1174,7 @@ p.MsoListContinue5CxSpLast, li.MsoListContinue5CxSpLast, div.MsoListContinue5CxS
1010
1174
  line-height:12.0pt;
1011
1175
  mso-pagination:widow-orphan;
1012
1176
  font-size:$normalfontsize;
1013
- font-size:$bodyfont;
1177
+ font-family:$bodyfont;
1014
1178
  mso-fareast-font-family:Calibri;
1015
1179
  mso-bidi-font-family:"Times New Roman";
1016
1180
  mso-ansi-language:EN-GB;
@@ -1639,14 +1803,14 @@ div.colophon
1639
1803
  {page:WordSection4;}
1640
1804
 
1641
1805
  /* List Definitions */
1642
- @list l0
1806
+ @list l11
1643
1807
  {mso-list-id:145051656;
1644
- mso-list-template-ids:2112159680;}
1645
- @list l0:level1
1808
+ mso-list-template-ids:2132838916;}
1809
+ @list l11:level1
1646
1810
  {mso-level-number-format:alpha-upper;
1647
1811
  mso-level-style-link:ANNEX;
1648
1812
  mso-level-suffix:none;
1649
- mso-level-text:"Annex\00A0%1";
1813
+ mso-level-text:"Annex %1";
1650
1814
  mso-level-tab-stop:none;
1651
1815
  mso-level-number-position:left;
1652
1816
  margin-left:0cm;
@@ -1654,85 +1818,85 @@ div.colophon
1654
1818
  mso-ansi-font-size:14.0pt;
1655
1819
  mso-bidi-font-size:14.0pt;
1656
1820
  font-family:$bodyfont;
1657
- mso-bidi-font-family:$bodyfont;
1821
+ mso-bidi-font-family:"Times New Roman";
1658
1822
  mso-ansi-font-weight:bold;
1659
1823
  mso-ansi-font-style:normal;}
1660
- @list l0:level2
1824
+ @list l11:level2
1661
1825
  {mso-level-style-link:a2;
1662
1826
  mso-level-text:"%1\.%2";
1663
1827
  mso-level-tab-stop:18.0pt;
1664
1828
  mso-level-number-position:left;
1665
1829
  margin-left:0cm;
1666
1830
  text-indent:0cm;
1667
- mso-bidi-font-family:$bodyfont;
1831
+ mso-bidi-font-family:"Times New Roman";
1668
1832
  mso-ansi-font-weight:bold;
1669
1833
  mso-ansi-font-style:normal;}
1670
- @list l0:level3
1834
+ @list l11:level3
1671
1835
  {mso-level-style-link:a3;
1672
1836
  mso-level-text:"%1\.%2\.%3";
1673
1837
  mso-level-tab-stop:36.0pt;
1674
1838
  mso-level-number-position:left;
1675
1839
  margin-left:0cm;
1676
1840
  text-indent:0cm;
1677
- mso-bidi-font-family:$bodyfont;
1841
+ mso-bidi-font-family:"Times New Roman";
1678
1842
  mso-ansi-font-weight:bold;
1679
1843
  mso-ansi-font-style:normal;}
1680
- @list l0:level4
1844
+ @list l11:level4
1681
1845
  {mso-level-style-link:a4;
1682
1846
  mso-level-text:"%1\.%2\.%3\.%4";
1683
1847
  mso-level-tab-stop:54.0pt;
1684
1848
  mso-level-number-position:left;
1685
1849
  margin-left:0cm;
1686
1850
  text-indent:0cm;
1687
- mso-bidi-font-family:$bodyfont;
1851
+ mso-bidi-font-family:"Times New Roman";
1688
1852
  mso-ansi-font-weight:bold;
1689
1853
  mso-ansi-font-style:normal;}
1690
- @list l0:level5
1854
+ @list l11:level5
1691
1855
  {mso-level-style-link:a5;
1692
1856
  mso-level-text:"%1\.%2\.%3\.%4\.%5";
1693
1857
  mso-level-tab-stop:54.0pt;
1694
1858
  mso-level-number-position:left;
1695
1859
  margin-left:0cm;
1696
1860
  text-indent:0cm;
1697
- mso-bidi-font-family:$bodyfont;
1861
+ mso-bidi-font-family:"Times New Roman";
1698
1862
  mso-ansi-font-weight:bold;
1699
1863
  mso-ansi-font-style:normal;}
1700
- @list l0:level6
1864
+ @list l11:level6
1701
1865
  {mso-level-style-link:a6;
1702
1866
  mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6";
1703
1867
  mso-level-tab-stop:72.0pt;
1704
1868
  mso-level-number-position:left;
1705
1869
  margin-left:0cm;
1706
1870
  text-indent:0cm;
1707
- mso-bidi-font-family:$bodyfont;
1871
+ mso-bidi-font-family:"Times New Roman";
1708
1872
  mso-ansi-font-weight:bold;
1709
1873
  mso-ansi-font-style:normal;}
1710
- @list l0:level7
1874
+ @list l11:level7
1711
1875
  {mso-level-reset-level:level2;
1712
1876
  mso-level-suffix:space;
1713
- mso-level-text:"Figure\00A0%1\.%7\00A0—";
1877
+ mso-level-text:"Figure %1\.%7 —";
1714
1878
  mso-level-tab-stop:none;
1715
1879
  mso-level-number-position:left;
1716
1880
  margin-left:0cm;
1717
1881
  text-indent:0cm;
1718
- mso-bidi-font-family:$bodyfont;}
1719
- @list l0:level8
1882
+ mso-bidi-font-family:"Times New Roman";}
1883
+ @list l11:level8
1720
1884
  {mso-level-reset-level:level2;
1721
1885
  mso-level-suffix:space;
1722
- mso-level-text:"Table\00A0%1\.%8\00A0—";
1886
+ mso-level-text:"Table %1\.%8 —";
1723
1887
  mso-level-tab-stop:none;
1724
1888
  mso-level-number-position:left;
1725
1889
  margin-left:0cm;
1726
1890
  text-indent:0cm;
1727
- mso-bidi-font-family:$bodyfont;}
1728
- @list l0:level9
1891
+ mso-bidi-font-family:"Times New Roman";}
1892
+ @list l11:level9
1729
1893
  {mso-level-number-format:roman-lower;
1730
1894
  mso-level-text:"\(%9\)";
1731
1895
  mso-level-tab-stop:306.0pt;
1732
1896
  mso-level-number-position:left;
1733
1897
  margin-left:0cm;
1734
1898
  text-indent:0cm;
1735
- mso-bidi-font-family:$bodyfont;}
1899
+ mso-bidi-font-family:"Times New Roman";}
1736
1900
  @list l1
1737
1901
  {mso-list-id:866942648;
1738
1902
  mso-list-template-ids:-1756330000;}
@@ -22,6 +22,7 @@ see_also: see also
22
22
  secretariat: Secretariat
23
23
  edition: edition
24
24
  termsrelated: Terms related to
25
+ availablefrom: Available from
25
26
  multiple_and: "%1 and %2"
26
27
  multiple_or: "%1 or %2"
27
28
  doctype_dict:
@@ -21,6 +21,7 @@ see_also: voir aussi
21
21
  secretariat: Secrétariat
22
22
  edition: édition
23
23
  termsrelated: Termes liés
24
+ availablefrom: Disponible sur
24
25
  doctype_dict:
25
26
  international-standard: Norme internationale
26
27
  technical-specification: Spécification technique
@@ -22,6 +22,7 @@ secretariat: Секретариат
22
22
  scope: Область применения
23
23
  edition: издание
24
24
  termsrelated: Термины, связанные
25
+ availablefrom: Доступна с
25
26
  doctype_dict:
26
27
  international-standard: Международный Стандарт
27
28
  technical-specification: Техническая Спецификация
@@ -19,6 +19,7 @@ see_also: 另见
19
19
  secretariat: 秘书处
20
20
  edition: 版
21
21
  termsrelated: 相关术语
22
+ availablefrom: 可从
22
23
  doctype_dict:
23
24
  international-standard: 国际标准
24
25
  technical-specification: 技术规格
@@ -16,7 +16,7 @@ module IsoDoc
16
16
  end
17
17
 
18
18
  def i18n_init(lang, script, i18nyaml = nil)
19
- @i18n = I18n.new(lang, script, i18nyaml || @i18nyaml)
19
+ @i18n = I18n.new(lang, script, i18nyaml: i18nyaml || @i18nyaml)
20
20
  end
21
21
 
22
22
  def amd(docxml)
@@ -27,6 +27,22 @@ module IsoDoc
27
27
  def clausedelim
28
28
  ""
29
29
  end
30
+
31
+ def std_docid_semantic(id)
32
+ return nil if id.nil?
33
+
34
+ ids = id.split(/ /)
35
+ ids.map! do |i|
36
+ if %w(GUIDE TR TS DIR).include?(i)
37
+ "<span class='stddocNumber'>#{i}</span>"
38
+ else
39
+ i.sub(/^([^0-9]+)(\s|$)/, "<span class='stdpublisher'>\\1</span>\\2")
40
+ .sub(/([0-9]+)/, "<span class='stddocNumber'>\\1</span>")
41
+ .sub(/-([0-9]+)/, "-<span class='stddocPartNumber'>\\1</span>")
42
+ .sub(/:([0-9]{4})(?!\d)/, ":<span class='stdyear'>\\1</span>")
43
+ end
44
+ end.join(" ")
45
+ end
30
46
  end
31
47
  end
32
48
  end