metanorma-generic 2.0.2 → 2.1.0

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: d917b7736b2474be18e0e1bf33121960a9def2252ea774fd7345445d98007c97
4
- data.tar.gz: 7c5bf9c5252db61bbfec76fee01d349471e4c95cb954b89cfe2b5f02c2cf5d13
3
+ metadata.gz: 8c262a3e06b94acff866441168d02ca8b127dcdbcf4ab05050c807d0e636adcc
4
+ data.tar.gz: 133c5dd41e5aedb7c2b68369cc9a54ecc9eda3113221da4afc90847ca2f9b113
5
5
  SHA512:
6
- metadata.gz: 16f4d2e9d84688e8dfb8dfbba1db2491069f4d57812955085551afa196f8337dda5425f6ed997210b95367d013395f4f0dfff7a964462f75152f2ee02a6a9a0c
7
- data.tar.gz: 1848c4e94683a4b3c1436e995eac69a1ea4f6e08c9536a775808a3c2cb43f814b533820b7ed3c11fb8bf0063444f55a87a30ebd2f0ad335ef44089cd9b1c448e
6
+ metadata.gz: f1a2f73f6898381fa004da28eb1bfc0dd068f5e04e7780c39f5a70ba7ac0dd0ea5bc12154182d9363778ebac9bad636d6288948684757f30a888a0e0232371eb
7
+ data.tar.gz: 7e7ab0b187be8894af035b919f949409418acc1d66d3c0b6c12ebbdacfe041c0d9428ebe6f114da9cee00252e2cb228c9674a2b1fa0e2a76772465875a23b9a5
@@ -749,7 +749,6 @@ div.example p.MsoListParagraph {
749
749
 
750
750
  div.Note p.MsoListParagraph {
751
751
  font-size: 10.0pt;
752
- margin-left: 1.0cm;
753
752
  }
754
753
 
755
754
  div.Note span.stem {
@@ -70,6 +70,8 @@
70
70
  </div>
71
71
  {% endif %}
72
72
 
73
+ <div class="coverpage-warning" id="coverpage-note-destination"/>
74
+
73
75
  <div class="info-section">
74
76
  <div class="copyright">
75
77
  <p class="year">
@@ -64,6 +64,10 @@ documentation.</span><span lang="EN-GB" style='font-size:10.0pt;mso-bidi-font-si
64
64
 
65
65
  {% endif %}
66
66
 
67
+ <div class="coverpage-warning" id="coverpage-note-destination" align="center" style='margin-bottom:6.0pt;text-align:center;
68
+ border:none;mso-border-alt:solid windowtext .5pt;padding:0cm;mso-padding-alt:
69
+ 1.0pt 4.0pt 1.0pt 4.0pt'/>
70
+
67
71
  </div>
68
72
 
69
73
  <p class="MsoNormal" align="center" style='text-align:center'><span lang="EN-GB"
@@ -781,6 +781,25 @@ p.Tablebody, li.Tablebody, div.Tablebody
781
781
  mso-fareast-font-family:$bodyfont;
782
782
  mso-bidi-font-family:$bodyfont;
783
783
  mso-ansi-language:EN-GB;}
784
+ p.TOCTitle, li.TOCTitle, div.TOCTitle
785
+ {mso-style-name:"TOC Title";
786
+ mso-style-unhide:no;
787
+ margin-top:0in;
788
+ margin-right:0in;
789
+ margin-bottom:$normalfontsize;
790
+ margin-left:0in;
791
+ text-align:left;
792
+ page-break-after:avoid;
793
+ mso-pagination:none;
794
+ mso-hyphenate:none;
795
+ mso-layout-grid-align:none;
796
+ font-size:$normalfontsize;
797
+ mso-bidi-font-size:10.0pt;
798
+ font-weight:bold;
799
+ font-family:$headerfont;
800
+ mso-fareast-font-family:$headerfont;
801
+ mso-bidi-font-family:$headerfont;
802
+ mso-fareast-language:EN-US;}
784
803
 
785
804
 
786
805
  /* Page Definitions */
@@ -11,7 +11,7 @@ module IsoDoc
11
11
  @meta = Metadata.new(lang, script, i18n)
12
12
  end
13
13
 
14
- def xref_init(lang, script, klass, i18n, options)
14
+ def xref_init(lang, script, _klass, i18n, options)
15
15
  html = HtmlConvert.new(language: lang, script: script)
16
16
  @xrefs = Xref.new(lang, script, html, i18n, options)
17
17
  end
@@ -20,7 +20,7 @@ module IsoDoc
20
20
  f = Metanorma::Generic.configuration.i18nyaml
21
21
  f = nil unless f.is_a? String
22
22
  @i18n = I18n.new(
23
- lang, script, i18nyaml || f || @i18nyaml)
23
+ lang, script, i18nyaml: i18nyaml || f || @i18nyaml)
24
24
  end
25
25
 
26
26
  include Utils
@@ -5,16 +5,15 @@ require "isodoc"
5
5
  module IsoDoc
6
6
  module Generic
7
7
  class PresentationXMLConvert < IsoDoc::PresentationXMLConvert
8
- def annex1(f)
9
- lbl = @xrefs.anchor(f['id'], :label)
10
- if t = f.at(ns("./title"))
8
+ def annex1(elem)
9
+ lbl = @xrefs.anchor(elem["id"], :label)
10
+ if t = elem.at(ns("./title"))
11
11
  t.children = "<strong>#{t.children.to_xml}</strong>"
12
12
  end
13
- prefix_name(f, "<br/>", lbl, "title")
13
+ prefix_name(elem, "<br/>", lbl, "title")
14
14
  end
15
15
 
16
16
  include Init
17
17
  end
18
18
  end
19
19
  end
20
-
@@ -173,9 +173,11 @@
173
173
  <data type="dateTime"/>
174
174
  </attribute>
175
175
  </optional>
176
- <attribute name="from">
177
- <data type="IDREF"/>
178
- </attribute>
176
+ <optional>
177
+ <attribute name="from">
178
+ <data type="IDREF"/>
179
+ </attribute>
180
+ </optional>
179
181
  <optional>
180
182
  <attribute name="to">
181
183
  <data type="IDREF"/>
@@ -209,9 +209,6 @@
209
209
  <zeroOrMore>
210
210
  <ref name="contact"/>
211
211
  </zeroOrMore>
212
- <zeroOrMore>
213
- <ref name="uri"/>
214
- </zeroOrMore>
215
212
  </element>
216
213
  </define>
217
214
  <define name="fullname">
@@ -530,7 +527,7 @@
530
527
  </define>
531
528
  <define name="LocalityType">
532
529
  <data type="string">
533
- <param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|list|example|volume|issue|time|anchor|locality:[a-zA-Z0-9_]+</param>
530
+ <param name="pattern">section|clause|part|paragraph|chapter|page|title|line|whole|table|annex|figure|note|list|example|volume|issue|time|anchor|locality:[a-zA-Z0-9_]+</param>
534
531
  </data>
535
532
  </define>
536
533
  <define name="referenceFrom">
@@ -680,6 +677,9 @@
680
677
  <zeroOrMore>
681
678
  <ref name="extent"/>
682
679
  </zeroOrMore>
680
+ <optional>
681
+ <ref name="bibliographic_size"/>
682
+ </optional>
683
683
  <zeroOrMore>
684
684
  <ref name="accesslocation"/>
685
685
  </zeroOrMore>
@@ -828,6 +828,11 @@
828
828
  <optional>
829
829
  <attribute name="scope"/>
830
830
  </optional>
831
+ <optional>
832
+ <attribute name="primary">
833
+ <data type="boolean"/>
834
+ </attribute>
835
+ </optional>
831
836
  <text/>
832
837
  </element>
833
838
  </define>
@@ -846,17 +851,46 @@
846
851
  </define>
847
852
  <define name="bplace">
848
853
  <element name="place">
849
- <optional>
850
- <attribute name="uri">
851
- <data type="anyURI"/>
852
- </attribute>
853
- </optional>
854
- <optional>
855
- <attribute name="region"/>
856
- </optional>
854
+ <choice>
855
+ <text/>
856
+ <group>
857
+ <ref name="bibliocity"/>
858
+ <zeroOrMore>
859
+ <ref name="biblioregion"/>
860
+ </zeroOrMore>
861
+ <zeroOrMore>
862
+ <ref name="bibliocountry"/>
863
+ </zeroOrMore>
864
+ </group>
865
+ </choice>
866
+ </element>
867
+ </define>
868
+ <define name="bibliocity">
869
+ <element name="city">
857
870
  <text/>
858
871
  </element>
859
872
  </define>
873
+ <define name="biblioregion">
874
+ <element name="region">
875
+ <ref name="RegionType"/>
876
+ </element>
877
+ </define>
878
+ <define name="bibliocountry">
879
+ <element name="country">
880
+ <ref name="RegionType"/>
881
+ </element>
882
+ </define>
883
+ <define name="RegionType">
884
+ <optional>
885
+ <attribute name="iso"/>
886
+ </optional>
887
+ <optional>
888
+ <attribute name="recommended">
889
+ <data type="boolean"/>
890
+ </attribute>
891
+ </optional>
892
+ <text/>
893
+ </define>
860
894
  <define name="bprice">
861
895
  <element name="price">
862
896
  <attribute name="currency"/>
@@ -920,9 +954,29 @@
920
954
  <text/>
921
955
  </element>
922
956
  </define>
957
+ <define name="sizevalue">
958
+ <element name="value">
959
+ <attribute name="type"/>
960
+ <text/>
961
+ </element>
962
+ </define>
963
+ <define name="bibliographic_size">
964
+ <element name="size">
965
+ <oneOrMore>
966
+ <ref name="sizevalue"/>
967
+ </oneOrMore>
968
+ </element>
969
+ </define>
923
970
  <define name="extent">
924
971
  <element name="extent">
925
- <ref name="BibItemLocality"/>
972
+ <choice>
973
+ <zeroOrMore>
974
+ <ref name="locality"/>
975
+ </zeroOrMore>
976
+ <zeroOrMore>
977
+ <ref name="localityStack"/>
978
+ </zeroOrMore>
979
+ </choice>
926
980
  </element>
927
981
  </define>
928
982
  <define name="series">
@@ -32,6 +32,43 @@
32
32
  <ref name="DocumentType"/>
33
33
  </element>
34
34
  </define>
35
+ <define name="admonition">
36
+ <element name="admonition">
37
+ <attribute name="type">
38
+ <ref name="AdmonitionType"/>
39
+ </attribute>
40
+ <optional>
41
+ <attribute name="class"/>
42
+ </optional>
43
+ <attribute name="id">
44
+ <data type="ID"/>
45
+ </attribute>
46
+ <optional>
47
+ <attribute name="uri">
48
+ <data type="anyURI"/>
49
+ </attribute>
50
+ </optional>
51
+ <optional>
52
+ <attribute name="coverpage">
53
+ <data type="boolean"/>
54
+ </attribute>
55
+ </optional>
56
+ <optional>
57
+ <attribute name="notag">
58
+ <data type="boolean"/>
59
+ </attribute>
60
+ </optional>
61
+ <optional>
62
+ <ref name="tname"/>
63
+ </optional>
64
+ <zeroOrMore>
65
+ <ref name="paragraph-with-footnote"/>
66
+ </zeroOrMore>
67
+ <zeroOrMore>
68
+ <ref name="note"/>
69
+ </zeroOrMore>
70
+ </element>
71
+ </define>
35
72
  <define name="index">
36
73
  <element name="index">
37
74
  <optional>
@@ -152,9 +189,7 @@
152
189
  <data type="boolean"/>
153
190
  </attribute>
154
191
  </optional>
155
- <oneOrMore>
156
- <ref name="PureTextElement"/>
157
- </oneOrMore>
192
+ <ref name="XrefBody"/>
158
193
  </element>
159
194
  </define>
160
195
  <define name="erefType">
@@ -188,6 +223,42 @@
188
223
  <ref name="PureTextElement"/>
189
224
  </oneOrMore>
190
225
  </define>
226
+ <define name="localityStack">
227
+ <element name="localityStack">
228
+ <optional>
229
+ <attribute name="connective">
230
+ <choice>
231
+ <value>and</value>
232
+ <value>or</value>
233
+ <value>from</value>
234
+ <value>to</value>
235
+ <value/>
236
+ </choice>
237
+ </attribute>
238
+ </optional>
239
+ <zeroOrMore>
240
+ <ref name="locality"/>
241
+ </zeroOrMore>
242
+ </element>
243
+ </define>
244
+ <define name="sourceLocalityStack">
245
+ <element name="sourceLocalityStack">
246
+ <optional>
247
+ <attribute name="connective">
248
+ <choice>
249
+ <value>and</value>
250
+ <value>or</value>
251
+ <value>from</value>
252
+ <value>to</value>
253
+ <value/>
254
+ </choice>
255
+ </attribute>
256
+ </optional>
257
+ <zeroOrMore>
258
+ <ref name="sourceLocality"/>
259
+ </zeroOrMore>
260
+ </element>
261
+ </define>
191
262
  <define name="ul">
192
263
  <element name="ul">
193
264
  <attribute name="id">
@@ -817,6 +888,16 @@
817
888
  <ref name="MultilingualRenderingType"/>
818
889
  </attribute>
819
890
  </optional>
891
+ <optional>
892
+ <attribute name="coverpage">
893
+ <data type="boolean"/>
894
+ </attribute>
895
+ </optional>
896
+ <optional>
897
+ <attribute name="notag">
898
+ <data type="boolean"/>
899
+ </attribute>
900
+ </optional>
820
901
  <oneOrMore>
821
902
  <choice>
822
903
  <ref name="paragraph"/>
@@ -1098,6 +1179,16 @@
1098
1179
  </define>
1099
1180
  </include>
1100
1181
  <!-- end overrides -->
1182
+ <define name="image" combine="choice">
1183
+ <element name="svg">
1184
+ <oneOrMore>
1185
+ <choice>
1186
+ <text/>
1187
+ <ref name="AnyElement"/>
1188
+ </choice>
1189
+ </oneOrMore>
1190
+ </element>
1191
+ </define>
1101
1192
  <define name="MultilingualRenderingType">
1102
1193
  <choice>
1103
1194
  <value>common</value>
@@ -1134,6 +1225,7 @@
1134
1225
  <ref name="concept"/>
1135
1226
  <ref name="add"/>
1136
1227
  <ref name="del"/>
1228
+ <ref name="span"/>
1137
1229
  </choice>
1138
1230
  </define>
1139
1231
  <define name="add">
@@ -1160,6 +1252,14 @@
1160
1252
  </choice>
1161
1253
  </element>
1162
1254
  </define>
1255
+ <define name="span">
1256
+ <element name="span">
1257
+ <attribute name="class"/>
1258
+ <oneOrMore>
1259
+ <ref name="TextElement"/>
1260
+ </oneOrMore>
1261
+ </element>
1262
+ </define>
1163
1263
  <define name="concept">
1164
1264
  <element name="concept">
1165
1265
  <optional>
@@ -2631,4 +2731,30 @@
2631
2731
  </zeroOrMore>
2632
2732
  </element>
2633
2733
  </define>
2734
+ <define name="XrefBody">
2735
+ <zeroOrMore>
2736
+ <ref name="XrefTarget"/>
2737
+ </zeroOrMore>
2738
+ <oneOrMore>
2739
+ <ref name="PureTextElement"/>
2740
+ </oneOrMore>
2741
+ </define>
2742
+ <define name="XrefTarget">
2743
+ <element name="location">
2744
+ <attribute name="target">
2745
+ <data type="string">
2746
+ <param name="pattern">\i\c*|\c+#\c+</param>
2747
+ </data>
2748
+ </attribute>
2749
+ <attribute name="connective">
2750
+ <choice>
2751
+ <value>and</value>
2752
+ <value>or</value>
2753
+ <value>from</value>
2754
+ <value>to</value>
2755
+ <value/>
2756
+ </choice>
2757
+ </attribute>
2758
+ </element>
2759
+ </define>
2634
2760
  </grammar>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Generic
3
- VERSION = "2.0.2".freeze
3
+ VERSION = "2.1.0".freeze
4
4
  end
5
5
  end
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
28
28
 
29
29
  spec.add_dependency "htmlentities", "~> 4.3.4"
30
- spec.add_dependency "metanorma-standoc", "~> 2.0.0"
30
+ spec.add_dependency "metanorma-standoc", "~> 2.1.0"
31
31
  spec.add_dependency "ruby-jing"
32
32
 
33
33
  spec.add_development_dependency "debug"
@@ -70,5 +70,5 @@ symbols_titles:
70
70
  - Abbreviations
71
71
  normref_titles:
72
72
  - Normative references
73
- bibliography_titles
73
+ bibliography_titles:
74
74
  - Bibliography
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-generic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-22 00:00:00.000000000 Z
11
+ date: 2022-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.0.0
33
+ version: 2.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.0.0
40
+ version: 2.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ruby-jing
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -270,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
270
  - !ruby/object:Gem::Version
271
271
  version: '0'
272
272
  requirements: []
273
- rubygems_version: 3.2.32
273
+ rubygems_version: 3.3.9
274
274
  signing_key:
275
275
  specification_version: 4
276
276
  summary: Metanorma template gem for customisation.