metanorma-generic 2.4.2 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f01093350c674908eb5364ed8961536ff3dc4d129dd653ab321da120df792214
4
- data.tar.gz: f350457717265bc34ef4df9d4e8626685cd5909fc6a3627fadc6d91834e0de9d
3
+ metadata.gz: c569a61e97030b3dc2beb2f09dc87c298eb9cdb9fbcc3937cb6ef5572b659ed4
4
+ data.tar.gz: add0ad9bc1dfdfeed20dee40e3aae93940be55d6838b87741dbcecce78aff687
5
5
  SHA512:
6
- metadata.gz: 8dd9a8044c3430195378e0fffee524d0008c562aba56b16ab9221a0cc0bef451c53ddb43acbebfe2c06fdb79a43e45b37e4c90b7a3f75cbaa76c17937adc10e2
7
- data.tar.gz: 53cfa9e244fde4a48d41b5a769ebac4ce481b3a3454811d7606d854f8b3dd0bb1c8083c384b7d43b4fccfff3450c9b1957d0165cbf27d2ff755574471467592b
6
+ metadata.gz: d53dd97d0e60a87fa34f8cac6cd7024df7b0990549477be0143d6b5e8337f52435ab1355946dd8bff8d1fb5f297180ed131f9f9aca07cecf4a9f9509b18a3e41
7
+ data.tar.gz: 17cb1656cbbc80cd52cc666cd6e9b3a813c83c5d619a49a02b4ec5587048bfd57f71cd113a043d98dffb3585f78ef7e430b30d6e6a4ba5e9e5d9dd4559b08f4c
@@ -276,7 +276,7 @@ ul li {
276
276
  list-style: none;
277
277
  }
278
278
 
279
- ul > li:before {
279
+ ul > li::before {
280
280
  content: "\2014";
281
281
  display: inline-block; width: 1em;
282
282
  margin-left: -1.2em;
@@ -306,7 +306,7 @@ ol ul > li:first-child {
306
306
  list-style-type: none;
307
307
  }
308
308
 
309
- #toc li:before {
309
+ #toc li::before {
310
310
  content: " ";
311
311
  display: none;
312
312
  }
@@ -39,12 +39,17 @@ module Metanorma
39
39
 
40
40
  def doctype(node)
41
41
  d = super
42
- configuration.doctypes or return d == "article" ? (configuration.default_doctype || "standard") : d
42
+ node.attr("doctype") == "article" and d = "article"
43
+ unless configuration.doctypes
44
+ d == "article" and return (configuration.default_doctype || "standard")
45
+ return d
46
+ end
43
47
  type = configuration.default_doctype ||
44
- configuration.doctypes.keys.dig(0) || "standard"
45
- unless configuration.doctypes.keys.include? d
46
- @log.add("Document Attributes", nil,
47
- "#{d} is not a legal document type: reverting to '#{type}'")
48
+ configuration.doctypes.keys[0] || "standard"
49
+ if !configuration.doctypes.key?(d)
50
+ (node.attr("doctype") && node.attr("doctype") != "article") and # factory default
51
+ @log.add("Document Attributes", nil,
52
+ "#{d} is not a legal document type: reverting to '#{type}'")
48
53
  d = type
49
54
  end
50
55
  d
@@ -6,9 +6,10 @@
6
6
  we cannot have a new default namespace: we will end up with a grammar with two different
7
7
  namespaces, one for isostandard and one for csand additions. And we do not want that.
8
8
  -->
9
+ <include href="biblio-standoc.rng"/>
9
10
  <include href="isodoc.rng">
10
11
  <start>
11
- <ref name="generic"/>
12
+ <ref name="generic-standard"/>
12
13
  </start>
13
14
  </include>
14
15
  <define name="generic-standard">
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.2.1 -->
20
+ <!-- VERSION v1.2.3 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -192,9 +192,11 @@
192
192
  </attribute>
193
193
  </optional>
194
194
  <attribute name="citeas"/>
195
- <attribute name="type">
196
- <ref name="ReferenceFormat"/>
197
- </attribute>
195
+ <optional>
196
+ <attribute name="type">
197
+ <ref name="ReferenceFormat"/>
198
+ </attribute>
199
+ </optional>
198
200
  <optional>
199
201
  <attribute name="alt"/>
200
202
  </optional>
@@ -211,6 +213,9 @@
211
213
  <data type="boolean"/>
212
214
  </attribute>
213
215
  </optional>
216
+ <optional>
217
+ <attribute name="style"/>
218
+ </optional>
214
219
  <ref name="CitationType"/>
215
220
  <oneOrMore>
216
221
  <ref name="PureTextElement"/>
@@ -833,6 +838,26 @@
833
838
  <ref name="paragraph"/>
834
839
  </element>
835
840
  </define>
841
+ <define name="stem">
842
+ <element name="stem">
843
+ <attribute name="type">
844
+ <choice>
845
+ <value>MathML</value>
846
+ <value>AsciiMath</value>
847
+ <value>LatexMath</value>
848
+ </choice>
849
+ </attribute>
850
+ <attribute name="block">
851
+ <data type="boolean"/>
852
+ </attribute>
853
+ <oneOrMore>
854
+ <choice>
855
+ <text/>
856
+ <ref name="AnyElement"/>
857
+ </choice>
858
+ </oneOrMore>
859
+ </element>
860
+ </define>
836
861
  <define name="em">
837
862
  <element name="em">
838
863
  <zeroOrMore>
@@ -1009,6 +1034,7 @@
1009
1034
  <ref name="del"/>
1010
1035
  <ref name="span"/>
1011
1036
  <ref name="erefstack"/>
1037
+ <ref name="date_inline"/>
1012
1038
  </choice>
1013
1039
  </define>
1014
1040
  <define name="add">
@@ -1050,6 +1076,23 @@
1050
1076
  </oneOrMore>
1051
1077
  </element>
1052
1078
  </define>
1079
+ <define name="date_inline">
1080
+ <element name="date">
1081
+ <attribute name="value"/>
1082
+ <optional>
1083
+ <attribute name="format"/>
1084
+ </optional>
1085
+ <optional>
1086
+ <attribute name="language"/>
1087
+ </optional>
1088
+ <optional>
1089
+ <attribute name="script"/>
1090
+ </optional>
1091
+ <optional>
1092
+ <attribute name="locale"/>
1093
+ </optional>
1094
+ </element>
1095
+ </define>
1053
1096
  <define name="concept">
1054
1097
  <element name="concept">
1055
1098
  <optional>
@@ -2136,6 +2179,7 @@
2136
2179
  <choice>
2137
2180
  <value>identical</value>
2138
2181
  <value>modified</value>
2182
+ <value>adapted</value>
2139
2183
  <value>restyled</value>
2140
2184
  <value>context-added</value>
2141
2185
  <value>generalisation</value>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Generic
3
- VERSION = "2.4.2".freeze
3
+ VERSION = "2.5.0".freeze
4
4
  end
5
5
  end
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
29
29
 
30
30
  spec.add_dependency "htmlentities", "~> 4.3.4"
31
- spec.add_dependency "metanorma-standoc", "~> 2.4.2"
31
+ spec.add_dependency "metanorma-standoc", "~> 2.5.0"
32
32
  spec.add_dependency "ruby-jing"
33
33
 
34
34
  spec.add_development_dependency "debug"
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.4.2
4
+ version: 2.5.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: 2023-04-25 00:00:00.000000000 Z
11
+ date: 2023-08-07 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.4.2
33
+ version: 2.5.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.4.2
40
+ version: 2.5.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ruby-jing
43
43
  requirement: !ruby/object:Gem::Requirement