metanorma-mpfa 0.7.1 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c8ca5a7caeb351d633b4634fc1ccf1c753306f4f585c94a21a3db4ef2c6415a
4
- data.tar.gz: 8287264ff711cc29b80bbc5874e7aa8f8bd71d68f06f933583e04a626273970c
3
+ metadata.gz: 7c09cb7532953cf42fbe4269d2445b66d07e8fcb526b7bc6823f55c2e89c6309
4
+ data.tar.gz: 738bc439f45030ad22384275ded6236b11e34af84eceb929e2db46da19f79f27
5
5
  SHA512:
6
- metadata.gz: 101768b7548de4be22fb87eee873ddc0d203e09c185f62611565194115014af18334a40187e34fc41b33bd2975245b497d6b5f2984f9acb2dbb376203a8d74cb
7
- data.tar.gz: 8f8d89828603c1f8ad7c5b5131cb18461e2a36ad9bad1f6d2bc815fd379cf3ee934afdec28906070f7bd575ab4d3e6237da9354fc6a62d5dd166e134d4257a94
6
+ metadata.gz: 3b817b4da954ecea69d29fafe4589c0921f575fe271165d95157ec1bc8d30017ae6ab1699920a07395f2139a72a4399eacc180e7c02f3efc78a019bdeb91a96d
7
+ data.tar.gz: 569c0ecf30e868952d70d295c3cb1c571bf594881d9d6320bc5c5e84eb358e31d39da75b2840cf5478096bd9c53a309c4c0d6cb77bc7eed3bb48a38939b034db
@@ -9,7 +9,6 @@ require_relative "./validate"
9
9
 
10
10
  module Asciidoctor
11
11
  module MPFA
12
-
13
12
  # A {Converter} implementation that generates MPFD output, and a document
14
13
  # schema encapsulation of the document for validation
15
14
  #
@@ -25,13 +24,14 @@ module Asciidoctor
25
24
 
26
25
  def metadata_committee(node, xml)
27
26
  return unless node.attr("committee")
27
+
28
28
  xml.editorialgroup do |a|
29
29
  a.committee node.attr("committee"),
30
- **attr_code(type: node.attr("committee-type"))
30
+ **attr_code(type: node.attr("committee-type"))
31
31
  i = 2
32
- while node.attr("committee_#{i}") do
32
+ while node.attr("committee_#{i}")
33
33
  a.committee node.attr("committee_#{i}"),
34
- **attr_code(type: node.attr("committee-type_#{i}"))
34
+ **attr_code(type: node.attr("committee-type_#{i}"))
35
35
  i += 1
36
36
  end
37
37
  end
@@ -42,7 +42,7 @@ module Asciidoctor
42
42
  xml.docnumber { |i| i << node.attr("docnumber") }
43
43
  end
44
44
 
45
- def title_validate(root)
45
+ def title_validate(_root)
46
46
  nil
47
47
  end
48
48
 
@@ -52,11 +52,14 @@ module Asciidoctor
52
52
  end
53
53
 
54
54
  def outputs(node, ret)
55
- File.open(@filename + ".xml", "w:UTF-8") { |f| f.write(ret) }
56
- presentation_xml_converter(node).convert(@filename + ".xml")
57
- html_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.html")
58
- doc_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.doc")
59
- pdf_converter(node)&.convert(@filename + ".presentation.xml", nil, false, "#{@filename}.pdf")
55
+ File.open("#{@filename}.xml", "w:UTF-8") { |f| f.write(ret) }
56
+ presentation_xml_converter(node).convert("#{@filename}.xml")
57
+ html_converter(node).convert("#{@filename}.presentation.xml", nil,
58
+ false, "#{@filename}.html")
59
+ doc_converter(node).convert("#{@filename}.presentation.xml", nil,
60
+ false, "#{@filename}.doc")
61
+ pdf_converter(node)&.convert("#{@filename}.presentation.xml", nil,
62
+ false, "#{@filename}.pdf")
60
63
  end
61
64
 
62
65
  def validate(doc)
@@ -65,8 +68,8 @@ module Asciidoctor
65
68
  File.join(File.dirname(__FILE__), "mpfd.rng"))
66
69
  end
67
70
 
68
- def style(n, t)
69
- return
71
+ def style(_n, _t)
72
+ nil
70
73
  end
71
74
 
72
75
  def presentation_xml_converter(node)
@@ -83,7 +86,8 @@ module Asciidoctor
83
86
 
84
87
  def pdf_converter(node)
85
88
  return if node.attr("no-pdf")
86
- IsoDoc::MPFA::PdfConvert.new(doc_extract_attributes(node))
89
+
90
+ IsoDoc::MPFA::PdfConvert.new(pdf_extract_attributes(node))
87
91
  end
88
92
  end
89
93
  end
@@ -58,7 +58,7 @@
58
58
  <attribute name="alt"/>
59
59
  </optional>
60
60
  <optional>
61
- <attribute name="updatetype">
61
+ <attribute name="update-type">
62
62
  <data type="boolean"/>
63
63
  </attribute>
64
64
  </optional>
@@ -1796,6 +1796,20 @@
1796
1796
  <data type="ID"/>
1797
1797
  </attribute>
1798
1798
  </optional>
1799
+ <optional>
1800
+ <attribute name="language"/>
1801
+ </optional>
1802
+ <optional>
1803
+ <attribute name="script"/>
1804
+ </optional>
1805
+ <optional>
1806
+ <attribute name="tag"/>
1807
+ </optional>
1808
+ <optional>
1809
+ <attribute name="multilingual-rendering">
1810
+ <ref name="MultilingualRenderingType"/>
1811
+ </attribute>
1812
+ </optional>
1799
1813
  <oneOrMore>
1800
1814
  <ref name="preferred"/>
1801
1815
  </oneOrMore>
@@ -1814,9 +1828,6 @@
1814
1828
  <optional>
1815
1829
  <ref name="termsubject"/>
1816
1830
  </optional>
1817
- <optional>
1818
- <ref name="termusage"/>
1819
- </optional>
1820
1831
  <oneOrMore>
1821
1832
  <ref name="termdefinition"/>
1822
1833
  </oneOrMore>
@@ -1880,17 +1891,37 @@
1880
1891
  </attribute>
1881
1892
  </optional>
1882
1893
  <optional>
1883
- <attribute name="geographicArea"/>
1894
+ <attribute name="geographic-area"/>
1884
1895
  </optional>
1885
1896
  <choice>
1886
1897
  <ref name="expression_designation"/>
1887
1898
  <ref name="letter_symbol_designation"/>
1888
1899
  <ref name="graphical_symbol_designation"/>
1889
1900
  </choice>
1901
+ <optional>
1902
+ <ref name="fieldofapplication"/>
1903
+ </optional>
1904
+ <optional>
1905
+ <ref name="usageinfo"/>
1906
+ </optional>
1890
1907
  <zeroOrMore>
1891
1908
  <ref name="termsource"/>
1892
1909
  </zeroOrMore>
1893
1910
  </define>
1911
+ <define name="fieldofapplication">
1912
+ <element name="field-of-application">
1913
+ <oneOrMore>
1914
+ <ref name="PureTextElement"/>
1915
+ </oneOrMore>
1916
+ </element>
1917
+ </define>
1918
+ <define name="usageinfo">
1919
+ <element name="usage-info">
1920
+ <oneOrMore>
1921
+ <ref name="PureTextElement"/>
1922
+ </oneOrMore>
1923
+ </element>
1924
+ </define>
1894
1925
  <define name="letter_symbol_designation">
1895
1926
  <element name="letter-symbol">
1896
1927
  <optional>
@@ -1942,11 +1973,15 @@
1942
1973
  </optional>
1943
1974
  <element name="name">
1944
1975
  <zeroOrMore>
1945
- <ref name="PureTextElement"/>
1976
+ <choice>
1977
+ <ref name="PureTextElement"/>
1978
+ <ref name="stem"/>
1979
+ <ref name="index"/>
1980
+ </choice>
1946
1981
  </zeroOrMore>
1947
1982
  </element>
1948
1983
  <optional>
1949
- <element name="abbreviationType">
1984
+ <element name="abbreviation-type">
1950
1985
  <ref name="AbbreviationType"/>
1951
1986
  </element>
1952
1987
  </optional>
@@ -1956,7 +1991,7 @@
1956
1991
  </element>
1957
1992
  </optional>
1958
1993
  <optional>
1959
- <element name="grammarInfo">
1994
+ <element name="grammar">
1960
1995
  <ref name="Grammar"/>
1961
1996
  </element>
1962
1997
  </optional>
@@ -1983,6 +2018,11 @@
1983
2018
  <ref name="GrammarGender"/>
1984
2019
  </element>
1985
2020
  </zeroOrMore>
2021
+ <zeroOrMore>
2022
+ <element name="number">
2023
+ <ref name="GrammarNumber"/>
2024
+ </element>
2025
+ </zeroOrMore>
1986
2026
  <optional>
1987
2027
  <element name="isPreposition">
1988
2028
  <data type="boolean"/>
@@ -2014,7 +2054,7 @@
2014
2054
  </element>
2015
2055
  </optional>
2016
2056
  <zeroOrMore>
2017
- <element name="grammarvalue">
2057
+ <element name="grammar-value">
2018
2058
  <text/>
2019
2059
  </element>
2020
2060
  </zeroOrMore>
@@ -2027,6 +2067,13 @@
2027
2067
  <value>common</value>
2028
2068
  </choice>
2029
2069
  </define>
2070
+ <define name="GrammarNumber">
2071
+ <choice>
2072
+ <value>singular</value>
2073
+ <value>dual</value>
2074
+ <value>plural</value>
2075
+ </choice>
2076
+ </define>
2030
2077
  <define name="termdomain">
2031
2078
  <element name="domain">
2032
2079
  <oneOrMore>
@@ -2041,13 +2088,6 @@
2041
2088
  </oneOrMore>
2042
2089
  </element>
2043
2090
  </define>
2044
- <define name="termusage">
2045
- <element name="usageinfo">
2046
- <oneOrMore>
2047
- <ref name="BasicBlock"/>
2048
- </oneOrMore>
2049
- </element>
2050
- </define>
2051
2091
  <define name="termdefinition">
2052
2092
  <element name="definition">
2053
2093
  <choice>
@@ -2061,13 +2101,16 @@
2061
2101
  </element>
2062
2102
  </define>
2063
2103
  <define name="verbaldefinition">
2064
- <element name="verbaldefinition">
2104
+ <element name="verbal-definition">
2065
2105
  <oneOrMore>
2066
2106
  <choice>
2067
2107
  <ref name="paragraph"/>
2068
2108
  <ref name="dl"/>
2069
2109
  <ref name="ol"/>
2070
2110
  <ref name="ul"/>
2111
+ <ref name="table"/>
2112
+ <ref name="figure"/>
2113
+ <ref name="formula"/>
2071
2114
  </choice>
2072
2115
  </oneOrMore>
2073
2116
  <zeroOrMore>
@@ -2076,7 +2119,7 @@
2076
2119
  </element>
2077
2120
  </define>
2078
2121
  <define name="nonverbalrep">
2079
- <element name="nonverbalrepresentation">
2122
+ <element name="non-verbal-representation">
2080
2123
  <oneOrMore>
2081
2124
  <choice>
2082
2125
  <ref name="table"/>
@@ -75,6 +75,12 @@ code *, pre *, tt *, kbd *, samp * {
75
75
  font-family: {{monospacefont}} !important;
76
76
  font-variant-ligatures: none; }
77
77
 
78
+ p code, dt code, li code, label code, legend code, caption code, th code, td code,
79
+ p tt, dt tt, li tt, label tt, legend tt, caption tt, th tt, td tt,
80
+ p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
81
+ p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
82
+ font-size: {{monospacefontsize}}; }
83
+
78
84
  article, aside, details, figcaption, figure,
79
85
  footer, header, hgroup, menu, nav, section {
80
86
  display: block; }
@@ -86,6 +92,9 @@ table {
86
92
  h1, h2, h3, h4, h5, h6 {
87
93
  font-family: {{headerfont}}; }
88
94
 
95
+ .h1, .h2, .h3, .h4, .h5, .h6 {
96
+ font-family: {{headerfont}}; }
97
+
89
98
  blockquote, q {
90
99
  quotes: none; }
91
100
  blockquote:before, blockquote:after, q:before, q:after {
@@ -566,13 +575,13 @@ p.document-stage {
566
575
  /*
567
576
  3.1 Titles
568
577
  */
569
- h1, h2, h3, h4, h5, h6 {
578
+ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
570
579
  font-family: {{headerfont}};
571
580
  color: #301907;
572
581
  font-weight: 300;
573
582
  margin-top: 2em; }
574
583
 
575
- h1 {
584
+ h1, .h1 {
576
585
  color: #301907;
577
586
  font-size: 1.6em;
578
587
  /* margin-top: 5em; */
@@ -582,7 +591,7 @@ h1 {
582
591
  border-bottom: solid 5px #FD8924;
583
592
  font-weight: 800; }
584
593
 
585
- h1#content {
594
+ h1#content, #content.h1 {
586
595
  margin-top: 0em;
587
596
  margin-left: -2em; }
588
597
 
@@ -600,18 +609,20 @@ h2.containerhdr {
600
609
  font-style: italic;
601
610
  padding: 45px 15px 15px 50px; }
602
611
 
603
- h2 {
612
+ h2, .h2 {
604
613
  font-size: 1.5em;
605
614
  font-weight: 400; }
606
615
 
607
- h3 {
616
+ h3, .h3 {
608
617
  font-size: 1.1em;
609
618
  font-weight: 100; }
610
619
 
611
- .TermNum, .Terms, .AltTerms {
612
- color: #301907;
620
+ .TermNum {
613
621
  font-weight: 100; }
614
622
 
623
+ .TermNum, .Terms, .AltTerms {
624
+ color: #301907; }
625
+
615
626
  h2.TermNum {
616
627
  font-size: 0.9em;
617
628
  line-height: 1em;
@@ -873,7 +884,7 @@ p {
873
884
  margin-top: 1em;
874
885
  margin-bottom: 1em; }
875
886
 
876
- h2 p {
887
+ h2 p, .h2 p {
877
888
  display: inline; }
878
889
 
879
890
  /*
@@ -1048,7 +1059,7 @@ h2 p {
1048
1059
  filter: invert(100%); }
1049
1060
  .coverpage-title {
1050
1061
  border-left: 0.5em solid #888; }
1051
- h1, h2, h3, h4 {
1062
+ h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
1052
1063
  page-break-after: avoid;
1053
1064
  margin-top: 1.2em; }
1054
1065
  .note, .figure, pre, .pseudocode, table {
@@ -1066,15 +1077,15 @@ h2 p {
1066
1077
  margin-top: -5px; }
1067
1078
  .container {
1068
1079
  padding-left: 0; }
1069
- h1.content {
1080
+ h1.content, .h1.content {
1070
1081
  margin-top: 2em;
1071
1082
  line-height: 2.5em; }
1072
- h1 {
1083
+ h1, .h1 {
1073
1084
  font-size: 1.5em;
1074
1085
  line-height: 1.5; }
1075
- h2 {
1086
+ h2, .h2 {
1076
1087
  font-size: 1.2em; }
1077
- h3 {
1088
+ h3, .h3 {
1078
1089
  font-size: 1em; }
1079
1090
  .Note {
1080
1091
  background-color: #fff495;
@@ -1114,10 +1125,10 @@ h2 p {
1114
1125
  padding-left: 0; }
1115
1126
  main {
1116
1127
  margin-left: 1em; }
1117
- h1 {
1128
+ h1, .h1 {
1118
1129
  margin-left: 0;
1119
1130
  padding-left: 0; }
1120
- h1#content {
1131
+ h1#content, #content.h1 {
1121
1132
  margin-left: 1em; } }
1122
1133
 
1123
1134
  /* Tablet Styles */
@@ -1139,10 +1150,10 @@ h2 p {
1139
1150
  padding-left: 0; }
1140
1151
  main {
1141
1152
  margin-left: 2em; }
1142
- h1 {
1153
+ h1, .h1 {
1143
1154
  margin-left: 0em;
1144
1155
  padding-left: 0; }
1145
- h1#content {
1156
+ h1#content, #content.h1 {
1146
1157
  margin-left: 1em; } }
1147
1158
 
1148
1159
  @media screen and (max-width: 768px) {
@@ -1152,9 +1163,9 @@ h2 p {
1152
1163
  display: none; } }
1153
1164
 
1154
1165
  @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
1155
- .main-section h1 {
1166
+ .main-section h1, .main-section .h1 {
1156
1167
  margin-left: 14px; }
1157
- .main-section h2, h3, h4, ol, ul, p, .ms-table-wrap {
1168
+ .main-section h2, .main-section .h2, h3, h4, .h3, .h4, ol, ul, p, .ms-table-wrap {
1158
1169
  margin-left: 75px; }
1159
1170
  .main-section li p {
1160
1171
  margin-left: 5px; }
@@ -228,14 +228,14 @@ p.document-stage {
228
228
  3.1 Titles
229
229
  */
230
230
 
231
- h1,h2,h3,h4,h5,h6 {
231
+ h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6 {
232
232
  font-family: $headerfont;
233
233
  color: #301907;
234
234
  font-weight: 300;
235
235
  margin-top: 2em;
236
236
  }
237
237
 
238
- h1 {
238
+ h1,.h1 {
239
239
  color: #301907;
240
240
  font-size: 1.6em;
241
241
  /* margin-top: 5em; */
@@ -246,7 +246,7 @@ h1 {
246
246
  font-weight: 800;
247
247
  }
248
248
 
249
- h1#content {
249
+ h1#content,.h1#content {
250
250
  margin-top: 0em;
251
251
  margin-left: -2em;
252
252
  }
@@ -267,19 +267,22 @@ h2.containerhdr {
267
267
  padding: 45px 15px 15px 50px;
268
268
  }
269
269
 
270
- h2 {
270
+ h2,.h2 {
271
271
  font-size: 1.5em;
272
272
  font-weight: 400;
273
273
  }
274
274
 
275
- h3 {
275
+ h3,.h3 {
276
276
  font-size: 1.1em;
277
277
  font-weight: 100;
278
278
  }
279
279
 
280
+ .TermNum {
281
+ font-weight: 100;
282
+ }
283
+
280
284
  .TermNum, .Terms, .AltTerms {
281
285
  color: #301907;
282
- font-weight: 100;
283
286
  }
284
287
 
285
288
  h2.TermNum {
@@ -531,7 +534,7 @@ p {
531
534
  margin-bottom: 1em;
532
535
  }
533
536
 
534
- h2 p {
537
+ h2 p, .h2 p {
535
538
  display: inline;
536
539
  }
537
540
 
@@ -752,7 +755,7 @@ padding: 0 2em 0 5em; }
752
755
  border-left: 0.5em solid #888;
753
756
  }
754
757
 
755
- h1, h2, h3, h4 {
758
+ h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
756
759
  page-break-after: avoid;
757
760
  margin-top: 1.2em;
758
761
  }
@@ -784,21 +787,21 @@ padding: 0 2em 0 5em; }
784
787
  padding-left: 0;
785
788
  }
786
789
 
787
- h1.content {
790
+ h1.content, .h1.content {
788
791
  margin-top: 2em;
789
792
  line-height: 2.5em;
790
793
  }
791
794
 
792
- h1 {
795
+ h1, .h1 {
793
796
  font-size: 1.5em;
794
797
  line-height: 1.5;
795
798
  }
796
799
 
797
- h2 {
800
+ h2, .h2 {
798
801
  font-size: 1.2em
799
802
  }
800
803
 
801
- h3 {
804
+ h3, .h3 {
802
805
  font-size: 1em;
803
806
  }
804
807
 
@@ -867,12 +870,12 @@ padding: 0 2em 0 5em; }
867
870
  margin-left: 1em;
868
871
  }
869
872
 
870
- h1 {
873
+ h1, .h1 {
871
874
  margin-left: 0;
872
875
  padding-left: 0;
873
876
  }
874
877
 
875
- h1#content {
878
+ h1#content, .h1#content {
876
879
  margin-left: 1em;
877
880
  }
878
881
  }
@@ -910,12 +913,12 @@ padding: 0 2em 0 5em; }
910
913
  margin-left: 2em;
911
914
  }
912
915
 
913
- h1 {
916
+ h1, .h1 {
914
917
  margin-left: 0em;
915
918
  padding-left: 0;
916
919
  }
917
920
 
918
- h1#content {
921
+ h1#content, .h1#content {
919
922
  margin-left: 1em;
920
923
  }
921
924
  }
@@ -933,8 +936,8 @@ padding: 0 2em 0 5em; }
933
936
  }
934
937
 
935
938
  @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
936
- .main-section h1 {margin-left:14px;}
937
- .main-section h2, h3, h4, ol, ul, p, .ms-table-wrap {margin-left:75px;}
939
+ .main-section h1, .main-section .h1 {margin-left:14px;}
940
+ .main-section h2, .main-section .h2, h3, h4, .h3, .h4, ol, ul, p, .ms-table-wrap {margin-left:75px;}
938
941
  .main-section li p {margin-left:5px;}
939
942
  .main-section li {margin-left:25px;}
940
943
  }
@@ -309,7 +309,6 @@ p.Terms, li.Terms, div.Terms {
309
309
  mso-fareast-font-family: {{headerfont}};
310
310
  mso-bidi-font-family: {{headerfont}};
311
311
  mso-ansi-language: EN-GB;
312
- font-weight: bold;
313
312
  mso-bidi-font-weight: normal; }
314
313
 
315
314
  p.AltTerms, li.AltTerms, div.AltTerms {
@@ -296,7 +296,6 @@ p.Terms, li.Terms, div.Terms
296
296
  mso-fareast-font-family:$headerfont;
297
297
  mso-bidi-font-family:$headerfont;
298
298
  mso-ansi-language:EN-GB;
299
- font-weight:bold;
300
299
  mso-bidi-font-weight:normal;}
301
300
  p.AltTerms, li.AltTerms, div.AltTerms
302
301
  {mso-style-name:"AltTerm\(s\)";
@@ -17,7 +17,6 @@ $('#toggle').on('click', function(){
17
17
  else {
18
18
  $('nav').show();
19
19
  $('nav').animate({ 'left': '0px' }, 'slow');
20
- $('.container').animate({ 'padding-left': '360px' }, 'slow');
21
20
  }
22
21
  });
23
22
  </script>