metanorma-generic 3.2.2 → 3.2.3
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 +4 -4
- data/lib/isodoc/generic/base_convert.rb +1 -1
- data/lib/isodoc/generic/html/generic.scss +4 -0
- data/lib/isodoc/generic/html/htmlstyle.scss +1 -1
- data/lib/isodoc/generic/metadata.rb +2 -2
- data/lib/metanorma/generic/converter.rb +0 -14
- data/lib/metanorma/generic/front.rb +18 -12
- data/lib/metanorma/generic/isodoc.rng +52 -16
- data/lib/metanorma/generic/version.rb +1 -1
- data/metanorma-generic.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c11f49226ea10d4136e27236caf28a459cbdb5bcbbf6657a64b68d742158fe9
|
|
4
|
+
data.tar.gz: 1ae50495c623e5ab73df0d2042f755dcf239594aea965fe7dbacad190804f787
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fcf1aa613e434f4eab913908d97b9c077b930514946e86bccd2ecfb78419ee28e7695aaca6cdc32b33321aa453fd11ea7894e7ed6207da9c67b7fcd3588395f0
|
|
7
|
+
data.tar.gz: f2631b3642211fb2857565afb2f20e781e8d9228e148051303cc86c2cf7377659af8eecb1769c998021f1aa6124dc31f44a085c2b56c367cecb6bb9add39f7e1
|
|
@@ -21,7 +21,7 @@ module IsoDoc
|
|
|
21
21
|
def make_body(xml, docxml)
|
|
22
22
|
body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72",
|
|
23
23
|
"xml:lang": "EN-US", class: "container" }
|
|
24
|
-
xml.body
|
|
24
|
+
xml.body(**body_attr) do |body|
|
|
25
25
|
make_body1(body, docxml)
|
|
26
26
|
make_body2(body, docxml)
|
|
27
27
|
make_body3(body, docxml)
|
|
@@ -668,6 +668,10 @@ table.MsoISOTable td, table.MsoISOTableBig td
|
|
|
668
668
|
{border:solid windowtext 1pt;
|
|
669
669
|
mso-border-alt:solid windowtext 1pt;
|
|
670
670
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
|
671
|
+
table.MsoNormalTable th, table.MsoNormalTable td {
|
|
672
|
+
border: none;
|
|
673
|
+
mso-border-alt: none;
|
|
674
|
+
}
|
|
671
675
|
table.MsoISOTable p, table.MsoISOTableBig p
|
|
672
676
|
{font-size:10.0pt; }
|
|
673
677
|
table.MsoTableGrid
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
require "isodoc"
|
|
2
2
|
require "nokogiri"
|
|
3
|
-
require_relative "init"
|
|
4
3
|
require_relative "utils"
|
|
5
4
|
|
|
6
5
|
class Nokogiri::XML::Node
|
|
@@ -41,7 +40,8 @@ module IsoDoc
|
|
|
41
40
|
|
|
42
41
|
def images(isoxml, out)
|
|
43
42
|
default_logo_path =
|
|
44
|
-
File.expand_path(File.join(File.dirname(__FILE__), "html",
|
|
43
|
+
File.expand_path(File.join(File.dirname(__FILE__), "html",
|
|
44
|
+
"logo.jpg"))
|
|
45
45
|
set(:logo, baselocation(configuration.logo_path) || default_logo_path)
|
|
46
46
|
unless configuration.logo_paths.nil?
|
|
47
47
|
set(:logo_paths,
|
|
@@ -16,20 +16,6 @@ module Metanorma
|
|
|
16
16
|
loc
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
def docidentifier_cleanup(xmldoc)
|
|
20
|
-
docid = xmldoc.at("//bibdata/docidentifier") or return
|
|
21
|
-
docid.text.empty? or return
|
|
22
|
-
id = docidentifier_from_template(xmldoc) or return
|
|
23
|
-
(id.empty? and docid.remove) or docid.children = id
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def docidentifier_from_template(xmldoc)
|
|
27
|
-
b = boilerplate_isodoc(xmldoc) or return
|
|
28
|
-
template = configuration.docid_template ||
|
|
29
|
-
"{{ agency }} {{ docnumeric }}"
|
|
30
|
-
b.populate_template(template, nil)
|
|
31
|
-
end
|
|
32
|
-
|
|
33
19
|
def doctype(node)
|
|
34
20
|
d = super
|
|
35
21
|
node.attr("doctype") == "article" and d = "article"
|
|
@@ -27,25 +27,31 @@ module Metanorma
|
|
|
27
27
|
|
|
28
28
|
def metadata_status(node, xml)
|
|
29
29
|
xml.status do |s|
|
|
30
|
-
add_noko_elem(s, "stage", node.attr("status") ||
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
add_noko_elem(s, "stage", node.attr("status") ||
|
|
31
|
+
node.attr("docstage") ||
|
|
32
|
+
configuration.default_stage || "published",
|
|
33
|
+
abbreviation: node.attr("docstage-abbrev"))
|
|
34
34
|
add_noko_elem(s, "substage", node.attr("substage"))
|
|
35
|
-
# x = node.attr("substage") and s.substage x
|
|
36
35
|
add_noko_elem(s, "iteration", node.attr("iteration"))
|
|
37
|
-
# x = node.attr("iteration") and s.iteration x
|
|
38
36
|
end
|
|
39
37
|
end
|
|
40
38
|
|
|
41
39
|
def metadata_id(node, xml)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
if id = node.attr("docidentifier") || configuration.docid_template ||
|
|
41
|
+
"{{ agency }} {{ docnumeric }}"
|
|
42
|
+
add_noko_elem(xml, "docidentifier",
|
|
43
|
+
id, primary: "true", boilerplate: true,
|
|
44
|
+
type: metadata_id_primary_type(node))
|
|
45
|
+
else
|
|
46
|
+
metadata_id_primary(node, xml)
|
|
46
47
|
end
|
|
47
48
|
end
|
|
48
49
|
|
|
50
|
+
def metadata_id_primary_type(node)
|
|
51
|
+
node.attr("publisher_abbr") || node.attr("publisher") ||
|
|
52
|
+
configuration.organization_name_short
|
|
53
|
+
end
|
|
54
|
+
|
|
49
55
|
def metadata_ext(node, ext)
|
|
50
56
|
super
|
|
51
57
|
if configuration.metadata_extensions.is_a? Hash
|
|
@@ -75,8 +81,8 @@ module Metanorma
|
|
|
75
81
|
def metadata_doctype(node, xml)
|
|
76
82
|
d = doctype(node)
|
|
77
83
|
add_noko_elem(xml, "doctype", d,
|
|
78
|
-
abbreviation:
|
|
79
|
-
|
|
84
|
+
abbreviation: node.attr("doctype-abbrev") ||
|
|
85
|
+
configuration&.doctypes&.dig(d))
|
|
80
86
|
end
|
|
81
87
|
|
|
82
88
|
EXT_STRUCT = %w(_output _attribute _list).freeze
|
|
@@ -167,12 +167,6 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
|
|
|
167
167
|
</define>
|
|
168
168
|
<define name="DlAttributes">
|
|
169
169
|
<ref name="BlockAttributes"/>
|
|
170
|
-
<optional>
|
|
171
|
-
<attribute name="key">
|
|
172
|
-
<a:documentation>This definition list is the key of a figure or formula</a:documentation>
|
|
173
|
-
<data type="boolean"/>
|
|
174
|
-
</attribute>
|
|
175
|
-
</optional>
|
|
176
170
|
</define>
|
|
177
171
|
<define name="DlBody">
|
|
178
172
|
<optional>
|
|
@@ -311,7 +305,7 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
|
311
305
|
</ref>
|
|
312
306
|
</optional>
|
|
313
307
|
<choice>
|
|
314
|
-
<a:documentation>Content of the figure
|
|
308
|
+
<a:documentation>Content of the figure</a:documentation>
|
|
315
309
|
<ref name="image">
|
|
316
310
|
<a:documentation>by default the content of a figure is a media file</a:documentation>
|
|
317
311
|
</ref>
|
|
@@ -340,8 +334,8 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
|
340
334
|
</ref>
|
|
341
335
|
</zeroOrMore>
|
|
342
336
|
<optional>
|
|
343
|
-
<ref name="
|
|
344
|
-
<a:documentation>An
|
|
337
|
+
<ref name="key">
|
|
338
|
+
<a:documentation>An key defining any symbols used in the figure</a:documentation>
|
|
345
339
|
</ref>
|
|
346
340
|
</optional>
|
|
347
341
|
<zeroOrMore>
|
|
@@ -365,7 +359,7 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
|
365
359
|
</ref>
|
|
366
360
|
</optional>
|
|
367
361
|
<choice>
|
|
368
|
-
<a:documentation>Content of the figure
|
|
362
|
+
<a:documentation>Content of the figure</a:documentation>
|
|
369
363
|
<ref name="image-no-id">
|
|
370
364
|
<a:documentation>by default the content of a figure is a media file</a:documentation>
|
|
371
365
|
</ref>
|
|
@@ -429,7 +423,7 @@ in order to be applicable in this standardisation document</a:documentation>
|
|
|
429
423
|
</element>
|
|
430
424
|
</define>
|
|
431
425
|
<define name="sourcecodebody">
|
|
432
|
-
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
|
426
|
+
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
|
433
427
|
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
|
434
428
|
<element name="body">
|
|
435
429
|
<oneOrMore>
|
|
@@ -549,7 +543,7 @@ normative or informative references, some split references into sections organiz
|
|
|
549
543
|
<choice>
|
|
550
544
|
<a:documentation>Table cell contains a block</a:documentation>
|
|
551
545
|
<ref name="paragraph-with-footnote"/>
|
|
552
|
-
<ref name="
|
|
546
|
+
<ref name="key"/>
|
|
553
547
|
<ref name="ul"/>
|
|
554
548
|
<ref name="ol"/>
|
|
555
549
|
<ref name="figure"/>
|
|
@@ -632,8 +626,40 @@ This is done if the footnote reference is already presented in some other form,
|
|
|
632
626
|
<a:documentation>The number of the footnote, used to identify it visually</a:documentation>
|
|
633
627
|
</attribute>
|
|
634
628
|
</define>
|
|
629
|
+
<define name="FormulaBody">
|
|
630
|
+
<ref name="stem">
|
|
631
|
+
<a:documentation>The content of the formula, as a mathematical expression</a:documentation>
|
|
632
|
+
</ref>
|
|
633
|
+
<optional>
|
|
634
|
+
<ref name="key">
|
|
635
|
+
<a:documentation>A key defining any symbols used in the formula</a:documentation>
|
|
636
|
+
</ref>
|
|
637
|
+
</optional>
|
|
638
|
+
<zeroOrMore>
|
|
639
|
+
<ref name="note">
|
|
640
|
+
<a:documentation>Notes whose scope is the current block</a:documentation>
|
|
641
|
+
</ref>
|
|
642
|
+
</zeroOrMore>
|
|
643
|
+
</define>
|
|
635
644
|
</include>
|
|
636
645
|
<!-- end overrides -->
|
|
646
|
+
<define name="key">
|
|
647
|
+
<a:documentation>Key to a table, figure, or formula</a:documentation>
|
|
648
|
+
<element name="key">
|
|
649
|
+
<optional>
|
|
650
|
+
<ref name="tname">
|
|
651
|
+
<a:documentation>optional title of key</a:documentation>
|
|
652
|
+
</ref>
|
|
653
|
+
</optional>
|
|
654
|
+
<oneOrMore>
|
|
655
|
+
<choice>
|
|
656
|
+
<a:documentation>Definition list and/or paragraph content</a:documentation>
|
|
657
|
+
<ref name="dl"/>
|
|
658
|
+
<ref name="paragraph"/>
|
|
659
|
+
</choice>
|
|
660
|
+
</oneOrMore>
|
|
661
|
+
</element>
|
|
662
|
+
</define>
|
|
637
663
|
<define name="TdAttributes" combine="interleave">
|
|
638
664
|
<ref name="RequiredId"/>
|
|
639
665
|
<optional>
|
|
@@ -1042,7 +1068,7 @@ parargaph sources are currently only rendered in metanorma-plateau</a:documentat
|
|
|
1042
1068
|
</optional>
|
|
1043
1069
|
<optional>
|
|
1044
1070
|
<attribute name="custom-charset">
|
|
1045
|
-
<a:documentation>Character set that the contained text belongs to;
|
|
1071
|
+
<a:documentation>Character set that the contained text belongs to;
|
|
1046
1072
|
is used in particular to capture mutually agreed definitions of codepoints in Unicode Private Use Area</a:documentation>
|
|
1047
1073
|
</attribute>
|
|
1048
1074
|
</optional>
|
|
@@ -1623,7 +1649,7 @@ numbers</a:documentation>
|
|
|
1623
1649
|
<define name="definitions">
|
|
1624
1650
|
<a:documentation>One or more definition lists, used to define symbols and abbreviations used in the remainder of the document.
|
|
1625
1651
|
These can also be used as glossaries, with simple definitions, in contrast to the more elaborate definitions given in
|
|
1626
|
-
terms sections
|
|
1652
|
+
terms sections</a:documentation>
|
|
1627
1653
|
<element name="definitions">
|
|
1628
1654
|
<ref name="OptionalId"/>
|
|
1629
1655
|
<ref name="LocalizedStringAttributes"/>
|
|
@@ -1864,7 +1890,7 @@ used in document amendments</a:documentation>
|
|
|
1864
1890
|
</zeroOrMore>
|
|
1865
1891
|
<zeroOrMore>
|
|
1866
1892
|
<ref name="related">
|
|
1867
|
-
<a:documentation>Zero or more names which are related to the term being defined
|
|
1893
|
+
<a:documentation>Zero or more names which are related to the term being defined.</a:documentation>
|
|
1868
1894
|
</ref>
|
|
1869
1895
|
</zeroOrMore>
|
|
1870
1896
|
<optional>
|
|
@@ -2025,7 +2051,7 @@ used in document amendments</a:documentation>
|
|
|
2025
2051
|
<element name="letter-symbol">
|
|
2026
2052
|
<optional>
|
|
2027
2053
|
<attribute name="isInternational">
|
|
2028
|
-
<a:documentation>Whether the designation is the same across languages, or language-specific
|
|
2054
|
+
<a:documentation>Whether the designation is the same across languages, or language-specific</a:documentation>
|
|
2029
2055
|
<data type="boolean"/>
|
|
2030
2056
|
</attribute>
|
|
2031
2057
|
</optional>
|
|
@@ -2632,6 +2658,11 @@ links within an SVG file, so that the SVG file can hyperlink to anchors within t
|
|
|
2632
2658
|
<a:documentation>Connective linking this location to its predecessor. _from/to_ are presumed to nest more closely than _and_ or _or_</a:documentation>
|
|
2633
2659
|
<ref name="XrefConnectiveType"/>
|
|
2634
2660
|
</attribute>
|
|
2661
|
+
<optional>
|
|
2662
|
+
<attribute name="custom-connective">
|
|
2663
|
+
<a:documentation>Custom wording for connnective linking this location to its predecessor, custom wording. If provided, is treated as equivalent semantically to connective value</a:documentation>
|
|
2664
|
+
</attribute>
|
|
2665
|
+
</optional>
|
|
2635
2666
|
</element>
|
|
2636
2667
|
</define>
|
|
2637
2668
|
<define name="XrefStyleType">
|
|
@@ -2658,6 +2689,11 @@ links within an SVG file, so that the SVG file can hyperlink to anchors within t
|
|
|
2658
2689
|
<ref name="XrefConnectiveType"/>
|
|
2659
2690
|
</attribute>
|
|
2660
2691
|
</optional>
|
|
2692
|
+
<optional>
|
|
2693
|
+
<attribute name="custom-connective">
|
|
2694
|
+
<a:documentation>Custom wording for connnective linking this location to its predecessor, custom wording. If provided, is treated as equivalent semantically to connective value</a:documentation>
|
|
2695
|
+
</attribute>
|
|
2696
|
+
</optional>
|
|
2661
2697
|
<ref name="erefType"/>
|
|
2662
2698
|
</define>
|
|
2663
2699
|
<define name="erefstack">
|
data/metanorma-generic.gemspec
CHANGED
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
spec.require_paths = ["lib"]
|
|
28
28
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
|
29
29
|
|
|
30
|
-
spec.add_dependency "metanorma-standoc", "~> 3.
|
|
30
|
+
spec.add_dependency "metanorma-standoc", "~> 3.3.0"
|
|
31
31
|
|
|
32
32
|
spec.add_development_dependency "debug"
|
|
33
33
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
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: 3.2.
|
|
4
|
+
version: 3.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-02-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-standoc
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 3.
|
|
19
|
+
version: 3.3.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 3.
|
|
26
|
+
version: 3.3.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: debug
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|