metanorma-generic 2.1.0 → 2.1.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 +16 -10
- data/lib/isodoc/generic/html/htmlstyle.scss +1 -0
- data/lib/isodoc/generic/html_convert.rb +20 -14
- data/lib/isodoc/generic/i18n.rb +10 -5
- data/lib/metanorma/generic/biblio.rng +134 -39
- data/lib/metanorma/generic/isodoc.rng +16 -0
- data/lib/metanorma/generic/version.rb +1 -1
- data/lib/metanorma/generic.rb +0 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1ea2cd4613f684350bfa37ff726720ff2e84805ccd32cfde1678fb090834964
|
4
|
+
data.tar.gz: a37875b2848be73265687de24eaa5ae00b755ae4e353fd36fa0dae88a0e0c29e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a92438595ed2a5cab6a73ccfb3bda7231c8a36597d7136f24b625a0d01502129a7fcda21ea77671bbef1eb190aa7c74b57cec977b1d935e8bdad31ba4d1b5bb
|
7
|
+
data.tar.gz: b953cd5e9ff920b0222245901d790d9f50ff2b891c175fb7fc9c3b465f379747e9ac88deeac7737b1263734e8e70fa0f2510172bbff71aa3dab9992513a2bd5c
|
@@ -14,7 +14,7 @@ module IsoDoc
|
|
14
14
|
h2 = d.at("./preceding-sibling::*[@class = 'TermNum'][1]")
|
15
15
|
d["id"] = h2["id"]
|
16
16
|
d.children.first.previous =
|
17
|
-
"<strong>#{h2.remove.children.to_xml}</strong
|
17
|
+
"<strong>#{h2.remove.children.to_xml}</strong> "
|
18
18
|
end
|
19
19
|
docxml
|
20
20
|
end
|
@@ -105,7 +105,7 @@ p.AdmonitionTitle, p.RecommendationTitle
|
|
105
105
|
mso-fareast-font-family:$bodyfont;
|
106
106
|
mso-bidi-font-family:$bodyfont;
|
107
107
|
mso-ansi-language:EN-GB;}
|
108
|
-
p.TableTitle
|
108
|
+
p.TableTitle, p.ListTitle
|
109
109
|
{mso-style-unhide:no;
|
110
110
|
mso-style-qformat:yes;
|
111
111
|
mso-style-parent:"";
|
@@ -135,13 +135,14 @@ p.Note, div.Note, li.Note, p.TableFootnote, div.TableFootnote, li.TableFootnote
|
|
135
135
|
line-height:12.0pt;
|
136
136
|
mso-pagination:widow-orphan;
|
137
137
|
tab-stops:20.15pt;
|
138
|
-
font-size:10.0pt;
|
139
138
|
mso-bidi-font-size:11.0pt;
|
140
|
-
font-family:$bodyfont;
|
141
|
-
font-size:10.0pt;
|
142
139
|
mso-fareast-font-family:$bodyfont;
|
143
140
|
mso-bidi-font-family:$bodyfont;
|
144
141
|
mso-ansi-language:EN-GB;}
|
142
|
+
p.Note, li.Note, p.TableFootnote, div.TableFootnote, li.TableFootnote {
|
143
|
+
font-family:$bodyfont;
|
144
|
+
font-size:10.0pt;
|
145
|
+
}
|
145
146
|
p.ANNEX, li.ANNEX, div.ANNEX
|
146
147
|
{mso-style-name:ANNEX;
|
147
148
|
mso-style-priority:10;
|
@@ -471,11 +472,13 @@ p.Quote, li.Quote, div.Quote
|
|
471
472
|
line-height:12.0pt;
|
472
473
|
mso-pagination:widow-orphan;
|
473
474
|
tab-stops:20.15pt;
|
474
|
-
font-size:10.5pt;
|
475
|
-
font-family:$bodyfont;
|
476
475
|
mso-fareast-font-family:$bodyfont;
|
477
476
|
mso-bidi-font-family:$bodyfont;
|
478
477
|
mso-ansi-language:EN-GB;}
|
478
|
+
p.Quote, li.Quote {
|
479
|
+
font-size:10.5pt;
|
480
|
+
font-family:$bodyfont;
|
481
|
+
}
|
479
482
|
p.QuoteAttribution
|
480
483
|
{text-align:right;
|
481
484
|
mso-style-priority:99;
|
@@ -505,8 +508,6 @@ p.Admonition, li.Admonition, div.Admonition
|
|
505
508
|
mso-border-themecolor:accent1;
|
506
509
|
padding:0cm;
|
507
510
|
mso-padding-alt:10.0pt 10.0pt 10.0pt 10.0pt;
|
508
|
-
font-size:12.0pt;
|
509
|
-
font-family:$bodyfont;
|
510
511
|
mso-ascii-font-family:$bodyfont;
|
511
512
|
mso-ascii-theme-font:minor-latin;
|
512
513
|
mso-fareast-font-family:$bodyfont;
|
@@ -519,6 +520,10 @@ p.Admonition, li.Admonition, div.Admonition
|
|
519
520
|
mso-themecolor:accent1;
|
520
521
|
mso-ansi-language:EN-AU;
|
521
522
|
font-style:italic;}
|
523
|
+
p.Admonition, li.Admonition {
|
524
|
+
font-size:12.0pt;
|
525
|
+
font-family:$bodyfont;
|
526
|
+
}
|
522
527
|
p.Code, li.Code, div.Code
|
523
528
|
{mso-style-name:Code;
|
524
529
|
mso-style-priority:16;
|
@@ -732,12 +737,13 @@ div.example {
|
|
732
737
|
p.example, li.example, td.example {
|
733
738
|
margin-right: 0pt;
|
734
739
|
margin-left: 0pt;
|
740
|
+
font-size:10.0pt;
|
741
|
+
font-family:$bodyfont;
|
735
742
|
}
|
736
743
|
|
737
744
|
p.example, li.example, div.example, td.example {
|
738
745
|
mso-pagination:none;
|
739
|
-
|
740
|
-
font-family:$bodyfont;}
|
746
|
+
}
|
741
747
|
|
742
748
|
td.example p.MsoListParagraph {
|
743
749
|
font-size: 10.0pt;
|
@@ -4,7 +4,6 @@ require "isodoc"
|
|
4
4
|
|
5
5
|
module IsoDoc
|
6
6
|
module Generic
|
7
|
-
|
8
7
|
# A {Converter} implementation that generates HTML output, and a document
|
9
8
|
# schema encapsulation of the document for validation
|
10
9
|
#
|
@@ -18,19 +17,25 @@ module IsoDoc
|
|
18
17
|
attr_accessor :_file
|
19
18
|
end
|
20
19
|
|
21
|
-
def self.inherited(
|
22
|
-
k._file = caller_locations.first.absolute_path
|
20
|
+
def self.inherited(k)
|
21
|
+
k._file = caller_locations(1..1).first.absolute_path
|
23
22
|
end
|
24
23
|
|
25
24
|
def default_fonts(options)
|
26
25
|
{
|
27
26
|
bodyfont: (
|
28
|
-
options[:script] == "Hans"
|
29
|
-
|
27
|
+
if options[:script] == "Hans"
|
28
|
+
'"Source Han Sans",serif'
|
29
|
+
else
|
30
|
+
configuration.html_bodyfont || '"Overpass",sans-serif'
|
31
|
+
end
|
30
32
|
),
|
31
33
|
headerfont: (
|
32
|
-
options[:script] == "Hans"
|
33
|
-
|
34
|
+
if options[:script] == "Hans"
|
35
|
+
'"Source Han Sans",sans-serif'
|
36
|
+
else
|
37
|
+
configuration.html_headerfont || '"Overpass",sans-serif'
|
38
|
+
end
|
34
39
|
),
|
35
40
|
monospacefont: configuration.html_monospacefont || '"Space Mono",monospace',
|
36
41
|
normalfontsize: configuration.html_normalfontsize,
|
@@ -43,21 +48,23 @@ module IsoDoc
|
|
43
48
|
def default_file_locations(_options)
|
44
49
|
{
|
45
50
|
htmlstylesheet: baselocation(configuration.htmlstylesheet) ||
|
46
|
-
|
51
|
+
html_doc_path("htmlstyle.scss"),
|
47
52
|
htmlcoverpage: baselocation(configuration.htmlcoverpage) ||
|
48
|
-
|
53
|
+
html_doc_path("html_generic_titlepage.html"),
|
49
54
|
htmlintropage: baselocation(configuration.htmlintropage) ||
|
50
|
-
|
55
|
+
html_doc_path("html_generic_intro.html"),
|
51
56
|
scripts: baselocation(configuration.scripts),
|
52
|
-
i18nyaml: (configuration.i18nyaml.is_a?(String)
|
53
|
-
|
57
|
+
i18nyaml: (if configuration.i18nyaml.is_a?(String)
|
58
|
+
baselocation(configuration.i18nyaml)
|
59
|
+
end),
|
54
60
|
}.transform_values { |v| v&.empty? ? nil : v }
|
55
61
|
end
|
56
62
|
|
57
63
|
def googlefonts
|
58
64
|
return unless configuration.webfont
|
65
|
+
|
59
66
|
Array(configuration.webfont).map do |x|
|
60
|
-
%{<link href="#{x
|
67
|
+
%{<link href="#{x}" rel="stylesheet"/>}
|
61
68
|
end.join("\n")
|
62
69
|
end
|
63
70
|
|
@@ -66,4 +73,3 @@ module IsoDoc
|
|
66
73
|
end
|
67
74
|
end
|
68
75
|
end
|
69
|
-
|
data/lib/isodoc/generic/i18n.rb
CHANGED
@@ -7,17 +7,22 @@ module IsoDoc
|
|
7
7
|
attr_accessor :_file
|
8
8
|
end
|
9
9
|
|
10
|
-
def self.inherited(
|
11
|
-
k._file = caller_locations.first.absolute_path
|
10
|
+
def self.inherited(k)
|
11
|
+
k._file = caller_locations(1..1).first.absolute_path
|
12
12
|
end
|
13
13
|
|
14
14
|
def load_yaml1(lang, script)
|
15
15
|
return super unless configuration.i18nyaml
|
16
|
-
|
17
|
-
|
16
|
+
|
17
|
+
file = if configuration.i18nyaml.is_a?(Hash)
|
18
|
+
configuration.i18nyaml[lang]
|
19
|
+
else
|
20
|
+
configuration.i18nyaml
|
21
|
+
end
|
18
22
|
return super if file.nil?
|
23
|
+
|
19
24
|
y = YAML.load_file(baselocation(file))
|
20
|
-
super.
|
25
|
+
super.deep_merge(y)
|
21
26
|
end
|
22
27
|
|
23
28
|
include Utils
|
@@ -614,12 +614,103 @@
|
|
614
614
|
<optional>
|
615
615
|
<ref name="fetched"/>
|
616
616
|
</optional>
|
617
|
-
<
|
618
|
-
<oneOrMore>
|
619
|
-
<ref name="btitle"/>
|
620
|
-
</oneOrMore>
|
617
|
+
<optional>
|
621
618
|
<ref name="formattedref"/>
|
622
|
-
</
|
619
|
+
</optional>
|
620
|
+
<oneOrMore>
|
621
|
+
<ref name="btitle"/>
|
622
|
+
</oneOrMore>
|
623
|
+
<zeroOrMore>
|
624
|
+
<ref name="bsource"/>
|
625
|
+
</zeroOrMore>
|
626
|
+
<oneOrMore>
|
627
|
+
<ref name="docidentifier"/>
|
628
|
+
</oneOrMore>
|
629
|
+
<optional>
|
630
|
+
<ref name="docnumber"/>
|
631
|
+
</optional>
|
632
|
+
<zeroOrMore>
|
633
|
+
<ref name="bdate"/>
|
634
|
+
</zeroOrMore>
|
635
|
+
<zeroOrMore>
|
636
|
+
<ref name="contributor"/>
|
637
|
+
</zeroOrMore>
|
638
|
+
<optional>
|
639
|
+
<ref name="edition"/>
|
640
|
+
</optional>
|
641
|
+
<zeroOrMore>
|
642
|
+
<ref name="version"/>
|
643
|
+
</zeroOrMore>
|
644
|
+
<zeroOrMore>
|
645
|
+
<ref name="biblionote"/>
|
646
|
+
</zeroOrMore>
|
647
|
+
<zeroOrMore>
|
648
|
+
<ref name="language"/>
|
649
|
+
</zeroOrMore>
|
650
|
+
<zeroOrMore>
|
651
|
+
<ref name="script"/>
|
652
|
+
</zeroOrMore>
|
653
|
+
<zeroOrMore>
|
654
|
+
<ref name="bibabstract"/>
|
655
|
+
</zeroOrMore>
|
656
|
+
<optional>
|
657
|
+
<ref name="status"/>
|
658
|
+
</optional>
|
659
|
+
<zeroOrMore>
|
660
|
+
<ref name="copyright"/>
|
661
|
+
</zeroOrMore>
|
662
|
+
<zeroOrMore>
|
663
|
+
<ref name="docrelation"/>
|
664
|
+
</zeroOrMore>
|
665
|
+
<zeroOrMore>
|
666
|
+
<ref name="series"/>
|
667
|
+
</zeroOrMore>
|
668
|
+
<optional>
|
669
|
+
<ref name="medium"/>
|
670
|
+
</optional>
|
671
|
+
<zeroOrMore>
|
672
|
+
<ref name="bplace"/>
|
673
|
+
</zeroOrMore>
|
674
|
+
<zeroOrMore>
|
675
|
+
<ref name="bprice"/>
|
676
|
+
</zeroOrMore>
|
677
|
+
<zeroOrMore>
|
678
|
+
<ref name="extent"/>
|
679
|
+
</zeroOrMore>
|
680
|
+
<optional>
|
681
|
+
<ref name="bibliographic_size"/>
|
682
|
+
</optional>
|
683
|
+
<zeroOrMore>
|
684
|
+
<ref name="accesslocation"/>
|
685
|
+
</zeroOrMore>
|
686
|
+
<zeroOrMore>
|
687
|
+
<ref name="license"/>
|
688
|
+
</zeroOrMore>
|
689
|
+
<zeroOrMore>
|
690
|
+
<ref name="bclassification"/>
|
691
|
+
</zeroOrMore>
|
692
|
+
<zeroOrMore>
|
693
|
+
<ref name="bkeyword"/>
|
694
|
+
</zeroOrMore>
|
695
|
+
<optional>
|
696
|
+
<ref name="validity"/>
|
697
|
+
</optional>
|
698
|
+
</define>
|
699
|
+
<define name="ReducedBibliographicItem">
|
700
|
+
<optional>
|
701
|
+
<attribute name="type">
|
702
|
+
<ref name="BibItemType"/>
|
703
|
+
</attribute>
|
704
|
+
</optional>
|
705
|
+
<optional>
|
706
|
+
<ref name="fetched"/>
|
707
|
+
</optional>
|
708
|
+
<optional>
|
709
|
+
<ref name="formattedref"/>
|
710
|
+
</optional>
|
711
|
+
<zeroOrMore>
|
712
|
+
<ref name="btitle"/>
|
713
|
+
</zeroOrMore>
|
623
714
|
<zeroOrMore>
|
624
715
|
<ref name="bsource"/>
|
625
716
|
</zeroOrMore>
|
@@ -638,9 +729,9 @@
|
|
638
729
|
<optional>
|
639
730
|
<ref name="edition"/>
|
640
731
|
</optional>
|
641
|
-
<
|
732
|
+
<zeroOrMore>
|
642
733
|
<ref name="version"/>
|
643
|
-
</
|
734
|
+
</zeroOrMore>
|
644
735
|
<zeroOrMore>
|
645
736
|
<ref name="biblionote"/>
|
646
737
|
</zeroOrMore>
|
@@ -833,6 +924,12 @@
|
|
833
924
|
<data type="boolean"/>
|
834
925
|
</attribute>
|
835
926
|
</optional>
|
927
|
+
<optional>
|
928
|
+
<attribute name="language"/>
|
929
|
+
</optional>
|
930
|
+
<optional>
|
931
|
+
<attribute name="script"/>
|
932
|
+
</optional>
|
836
933
|
<text/>
|
837
934
|
</element>
|
838
935
|
</define>
|
@@ -986,36 +1083,34 @@
|
|
986
1083
|
<ref name="SeriesType"/>
|
987
1084
|
</attribute>
|
988
1085
|
</optional>
|
989
|
-
<
|
1086
|
+
<optional>
|
990
1087
|
<ref name="formattedref"/>
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
</group>
|
1018
|
-
</choice>
|
1088
|
+
</optional>
|
1089
|
+
<ref name="btitle"/>
|
1090
|
+
<optional>
|
1091
|
+
<ref name="bplace"/>
|
1092
|
+
</optional>
|
1093
|
+
<optional>
|
1094
|
+
<ref name="seriesorganization"/>
|
1095
|
+
</optional>
|
1096
|
+
<optional>
|
1097
|
+
<ref name="abbreviation"/>
|
1098
|
+
</optional>
|
1099
|
+
<optional>
|
1100
|
+
<ref name="seriesfrom"/>
|
1101
|
+
</optional>
|
1102
|
+
<optional>
|
1103
|
+
<ref name="seriesto"/>
|
1104
|
+
</optional>
|
1105
|
+
<optional>
|
1106
|
+
<ref name="seriesnumber"/>
|
1107
|
+
</optional>
|
1108
|
+
<optional>
|
1109
|
+
<ref name="seriespartnumber"/>
|
1110
|
+
</optional>
|
1111
|
+
<optional>
|
1112
|
+
<ref name="seriesrun"/>
|
1113
|
+
</optional>
|
1019
1114
|
</element>
|
1020
1115
|
</define>
|
1021
1116
|
<define name="SeriesType">
|
@@ -1174,7 +1269,7 @@
|
|
1174
1269
|
</element>
|
1175
1270
|
</optional>
|
1176
1271
|
<element name="bibitem">
|
1177
|
-
<ref name="
|
1272
|
+
<ref name="ReducedBibliographicItem"/>
|
1178
1273
|
</element>
|
1179
1274
|
<choice>
|
1180
1275
|
<zeroOrMore>
|
@@ -1199,9 +1294,9 @@
|
|
1199
1294
|
<optional>
|
1200
1295
|
<ref name="revision-date"/>
|
1201
1296
|
</optional>
|
1202
|
-
<
|
1297
|
+
<optional>
|
1203
1298
|
<ref name="draft"/>
|
1204
|
-
</
|
1299
|
+
</optional>
|
1205
1300
|
</element>
|
1206
1301
|
</define>
|
1207
1302
|
<define name="vedition">
|
@@ -282,6 +282,9 @@
|
|
282
282
|
<ref name="MultilingualRenderingType"/>
|
283
283
|
</attribute>
|
284
284
|
</optional>
|
285
|
+
<optional>
|
286
|
+
<ref name="tname"/>
|
287
|
+
</optional>
|
285
288
|
<oneOrMore>
|
286
289
|
<ref name="ul_li"/>
|
287
290
|
</oneOrMore>
|
@@ -324,6 +327,9 @@
|
|
324
327
|
</choice>
|
325
328
|
</attribute>
|
326
329
|
</optional>
|
330
|
+
<optional>
|
331
|
+
<ref name="tname"/>
|
332
|
+
</optional>
|
327
333
|
<oneOrMore>
|
328
334
|
<ref name="li"/>
|
329
335
|
</oneOrMore>
|
@@ -360,6 +366,9 @@
|
|
360
366
|
<ref name="MultilingualRenderingType"/>
|
361
367
|
</attribute>
|
362
368
|
</optional>
|
369
|
+
<optional>
|
370
|
+
<ref name="tname"/>
|
371
|
+
</optional>
|
363
372
|
<oneOrMore>
|
364
373
|
<ref name="dt"/>
|
365
374
|
<ref name="dd"/>
|
@@ -694,6 +703,9 @@
|
|
694
703
|
<optional>
|
695
704
|
<attribute name="tag"/>
|
696
705
|
</optional>
|
706
|
+
<optional>
|
707
|
+
<attribute name="type"/>
|
708
|
+
</optional>
|
697
709
|
<optional>
|
698
710
|
<attribute name="multilingual-rendering">
|
699
711
|
<ref name="MultilingualRenderingType"/>
|
@@ -729,6 +741,9 @@
|
|
729
741
|
<optional>
|
730
742
|
<attribute name="tag"/>
|
731
743
|
</optional>
|
744
|
+
<optional>
|
745
|
+
<attribute name="type"/>
|
746
|
+
</optional>
|
732
747
|
<optional>
|
733
748
|
<attribute name="multilingual-rendering">
|
734
749
|
<ref name="MultilingualRenderingType"/>
|
@@ -2050,6 +2065,7 @@
|
|
2050
2065
|
<value>compare</value>
|
2051
2066
|
<value>contrast</value>
|
2052
2067
|
<value>see</value>
|
2068
|
+
<value>seealso</value>
|
2053
2069
|
</choice>
|
2054
2070
|
</define>
|
2055
2071
|
<define name="deprecates">
|
data/lib/metanorma/generic.rb
CHANGED
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.1.
|
4
|
+
version: 2.1.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: 2022-
|
11
|
+
date: 2022-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -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.3.
|
273
|
+
rubygems_version: 3.3.16
|
274
274
|
signing_key:
|
275
275
|
specification_version: 4
|
276
276
|
summary: Metanorma template gem for customisation.
|