metanorma-cc 1.5.5 → 1.6.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,13 +24,14 @@ $docstage-colors-list: (
24
24
 
25
25
 
26
26
  @import 'base_style/all';
27
+ @import 'coverpage';
27
28
 
28
29
 
29
30
  body {
30
31
  // line-height: 1;
31
32
 
32
33
  @include bodyStyle1(
33
- $fontSize: 15px, $fontWeight: 300, $lineHeight: 1.4em,
34
+ $fontSize: $normalfontsize, $fontWeight: 300, $lineHeight: 1.4em,
34
35
  $colorText: #1d1d1d, $colorBackground: #fff);
35
36
  }
36
37
 
@@ -320,7 +321,7 @@ a.footnote-number {
320
321
  }
321
322
 
322
323
  .footnote {
323
- font-size: 0.9em;
324
+ font-size: $footnotefontsize;
324
325
  }
325
326
 
326
327
 
@@ -379,8 +380,6 @@ span.keyword {
379
380
  }
380
381
 
381
382
 
382
- @import 'coverpage';
383
-
384
383
 
385
384
  // To top button
386
385
 
@@ -81,7 +81,7 @@ p.MsoNormal, li.MsoNormal, div.MsoNormal {
81
81
  margin: 0cm;
82
82
  margin-bottom: 12.0pt;
83
83
  mso-pagination: widow-orphan;
84
- font-size: 10.5pt;
84
+ font-size: {{normalfontsize}};
85
85
  font-family: {{bodyfont}};
86
86
  mso-fareast-font-family: "Times New Roman";
87
87
  mso-ansi-language: EN-US;
@@ -97,7 +97,7 @@ p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
97
97
  /* do not put in margin-left, it is specific to list level */
98
98
  mso-add-space: auto;
99
99
  mso-pagination: widow-orphan;
100
- font-size: 10.5pt;
100
+ font-size: {{normalfontsize}};
101
101
  font-family: {{bodyfont}};
102
102
  mso-ansi-language: EN-AU;
103
103
  mso-fareast-language: EN-US; }
@@ -113,7 +113,7 @@ p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphC
113
113
  /* do not put in margin-left, it is specific to list level */
114
114
  mso-add-space: auto;
115
115
  mso-pagination: widow-orphan;
116
- font-size: 10.5pt;
116
+ font-size: {{normalfontsize}};
117
117
  font-family: {{bodyfont}};
118
118
  mso-ansi-language: EN-AU;
119
119
  mso-fareast-language: EN-US; }
@@ -129,7 +129,7 @@ p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagrap
129
129
  /* do not put in margin-left, it is specific to list level */
130
130
  mso-add-space: auto;
131
131
  mso-pagination: widow-orphan;
132
- font-size: 10.5pt;
132
+ font-size: {{normalfontsize}};
133
133
  font-family: {{bodyfont}};
134
134
  mso-ansi-language: EN-AU;
135
135
  mso-fareast-language: EN-US; }
@@ -145,7 +145,7 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
145
145
  /* do not put in margin-left, it is specific to list level */
146
146
  mso-add-space: auto;
147
147
  mso-pagination: widow-orphan;
148
- font-size: 10.5pt;
148
+ font-size: {{normalfontsize}};
149
149
  font-family: {{bodyfont}};
150
150
  mso-ansi-language: EN-AU;
151
151
  mso-fareast-language: EN-US; }
@@ -156,7 +156,7 @@ p.MsoCommentText, li.MsoCommentText, div.MsoCommentText {
156
156
  margin: 0cm;
157
157
  margin-bottom: .0001pt;
158
158
  mso-pagination: widow-orphan;
159
- font-size: 10.0pt;
159
+ font-size: {{smallerfontsize}};
160
160
  font-family: {{bodyfont}};
161
161
  mso-fareast-font-family: "Times New Roman";
162
162
  mso-ansi-language: EN-US;
@@ -168,7 +168,7 @@ p.MsoHeader, li.MsoHeader, div.MsoHeader {
168
168
  margin-bottom: .0001pt;
169
169
  mso-pagination: widow-orphan;
170
170
  tab-stops: center 216.0pt right 482.0pt;
171
- font-size: 10.5pt;
171
+ font-size: {{normalfontsize}};
172
172
  font-family: {{bodyfont}};
173
173
  mso-fareast-font-family: "Times New Roman";
174
174
  mso-ansi-language: EN-US;
@@ -180,7 +180,7 @@ p.MsoHeaderLandscape, li.MsoHeaderLandscape, div.MsoHeaderLandscape {
180
180
  margin-bottom: .0001pt;
181
181
  mso-pagination: widow-orphan;
182
182
  tab-stops: center 367.0pt right 734.0pt;
183
- font-size: 10.5pt;
183
+ font-size: {{normalfontsize}};
184
184
  font-family: {{bodyfont}};
185
185
  mso-fareast-font-family: "Times New Roman";
186
186
  mso-ansi-language: EN-US;
@@ -192,7 +192,7 @@ p.MsoFooter, li.MsoFooter, div.MsoFooter {
192
192
  margin-bottom: .0001pt;
193
193
  mso-pagination: widow-orphan;
194
194
  tab-stops: right 482.0pt;
195
- font-size: 10.5pt;
195
+ font-size: {{normalfontsize}};
196
196
  font-family: {{bodyfont}};
197
197
  mso-fareast-font-family: "Times New Roman";
198
198
  mso-ansi-language: EN-US;
@@ -204,7 +204,7 @@ p.MsoFooterLandscape, li.MsoFooterLandscape, div.MsoFooterLandscape {
204
204
  margin-bottom: .0001pt;
205
205
  mso-pagination: widow-orphan;
206
206
  tab-stops: right 734.0pt;
207
- font-size: 10.5pt;
207
+ font-size: {{normalfontsize}};
208
208
  font-family: {{bodyfont}};
209
209
  mso-fareast-font-family: "Times New Roman";
210
210
  mso-ansi-language: EN-US;
@@ -333,7 +333,7 @@ p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject {
333
333
  margin: 0cm;
334
334
  margin-bottom: .0001pt;
335
335
  mso-pagination: widow-orphan;
336
- font-size: 10.0pt;
336
+ font-size: {{smallerfontsize}};
337
337
  font-family: {{bodyfont}};
338
338
  mso-fareast-font-family: "Times New Roman";
339
339
  mso-ansi-language: EN-US;
@@ -605,7 +605,7 @@ p.MsoToc1, li.MsoToc1, div.MsoToc1 {
605
605
  mso-pagination: widow-orphan;
606
606
  mso-hyphenate: none;
607
607
  tab-stops: 20.15pt 36.0pt right dotted 487.6pt;
608
- font-size: 10.5pt;
608
+ font-size: {{normalfontsize}};
609
609
  font-family: {{bodyfont}};
610
610
  mso-fareast-font-family: {{bodyfont}};
611
611
  mso-bidi-font-family: {{bodyfont}};
@@ -629,7 +629,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2 {
629
629
  mso-pagination: widow-orphan;
630
630
  mso-hyphenate: none;
631
631
  tab-stops: 20.15pt 36.0pt right dotted 487.6pt;
632
- font-size: 10.5pt;
632
+ font-size: {{normalfontsize}};
633
633
  font-family: {{bodyfont}};
634
634
  mso-fareast-font-family: {{bodyfont}};
635
635
  mso-bidi-font-family: {{bodyfont}};
@@ -653,7 +653,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3 {
653
653
  mso-pagination: widow-orphan;
654
654
  mso-hyphenate: none;
655
655
  tab-stops: 20.15pt 36.0pt right dotted 487.6pt;
656
- font-size: 10.5pt;
656
+ font-size: {{normalfontsize}};
657
657
  font-family: {{bodyfont}};
658
658
  mso-fareast-font-family: {{bodyfont}};
659
659
  mso-bidi-font-family: {{bodyfont}};
@@ -677,7 +677,7 @@ p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText {
677
677
  line-height: 12.0pt;
678
678
  mso-pagination: widow-orphan;
679
679
  tab-stops: 20.15pt;
680
- font-size: 10.0pt;
680
+ font-size: {{footnotefontsize}};
681
681
  font-family: {{bodyfont}};
682
682
  mso-fareast-font-family: {{bodyfont}};
683
683
  mso-bidi-font-family: {{bodyfont}};
@@ -696,7 +696,7 @@ p.MsoBodyText, li.MsoBodyText, div.MsoBodyText {
696
696
  text-align: justify;
697
697
  line-height: 12.0pt;
698
698
  mso-pagination: widow-orphan;
699
- font-size: 10.5pt;
699
+ font-size: {{normalfontsize}};
700
700
  font-family: {{bodyfont}};
701
701
  mso-fareast-font-family: {{bodyfont}};
702
702
  mso-bidi-font-family: {{bodyfont}};
@@ -812,9 +812,9 @@ p.Tablebody, li.Tablebody, div.Tablebody {
812
812
  margin-right: 0cm;
813
813
  margin-bottom: 3.0pt;
814
814
  margin-left: 0cm;
815
- line-height: 10.5pt;
815
+ line-height: {{normalfontsize}};
816
816
  mso-pagination: widow-orphan;
817
- font-size: 10.0pt;
817
+ font-size: {{smallerfontsize}};
818
818
  mso-bidi-font-size: 11.0pt;
819
819
  font-family: {{bodyfont}};
820
820
  mso-fareast-font-family: {{bodyfont}};
@@ -1241,7 +1241,7 @@ table.MsoNormalTable {
1241
1241
  mso-para-margin: 0cm;
1242
1242
  mso-para-margin-bottom: .0001pt;
1243
1243
  mso-pagination: widow-orphan;
1244
- font-size: 10.0pt;
1244
+ font-size: {{smallerfontsize}};
1245
1245
  font-family: {{bodyfont}}; }
1246
1246
 
1247
1247
  ol {
@@ -71,7 +71,7 @@ p.MsoNormal, li.MsoNormal, div.MsoNormal
71
71
  margin:0cm;
72
72
  margin-bottom:12.0pt;
73
73
  mso-pagination:widow-orphan;
74
- font-size:10.5pt;
74
+ font-size:$normalfontsize;
75
75
  font-family:$bodyfont;
76
76
  mso-fareast-font-family:"Times New Roman";
77
77
  mso-ansi-language:EN-US;
@@ -86,7 +86,7 @@ p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
86
86
  /* do not put in margin-left, it is specific to list level */
87
87
  mso-add-space:auto;
88
88
  mso-pagination:widow-orphan;
89
- font-size:10.5pt;
89
+ font-size:$normalfontsize;
90
90
  font-family:$bodyfont;
91
91
  mso-ansi-language:EN-AU;
92
92
  mso-fareast-language:EN-US;}
@@ -101,7 +101,7 @@ p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphC
101
101
  /* do not put in margin-left, it is specific to list level */
102
102
  mso-add-space:auto;
103
103
  mso-pagination:widow-orphan;
104
- font-size:10.5pt;
104
+ font-size:$normalfontsize;
105
105
  font-family:$bodyfont;
106
106
  mso-ansi-language:EN-AU;
107
107
  mso-fareast-language:EN-US;}
@@ -116,7 +116,7 @@ p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagrap
116
116
  /* do not put in margin-left, it is specific to list level */
117
117
  mso-add-space:auto;
118
118
  mso-pagination:widow-orphan;
119
- font-size:10.5pt;
119
+ font-size:$normalfontsize;
120
120
  font-family:$bodyfont;
121
121
  mso-ansi-language:EN-AU;
122
122
  mso-fareast-language:EN-US;}
@@ -131,7 +131,7 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
131
131
  /* do not put in margin-left, it is specific to list level */
132
132
  mso-add-space:auto;
133
133
  mso-pagination:widow-orphan;
134
- font-size:10.5pt;
134
+ font-size:$normalfontsize;
135
135
  font-family:$bodyfont;
136
136
  mso-ansi-language:EN-AU;
137
137
  mso-fareast-language:EN-US;}
@@ -142,7 +142,7 @@ p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
142
142
  margin:0cm;
143
143
  margin-bottom:.0001pt;
144
144
  mso-pagination:widow-orphan;
145
- font-size:10.0pt;
145
+ font-size:$smallerfontsize;
146
146
  font-family:$bodyfont;
147
147
  mso-fareast-font-family:"Times New Roman";
148
148
  mso-ansi-language:EN-US;
@@ -153,7 +153,7 @@ p.MsoHeader, li.MsoHeader, div.MsoHeader
153
153
  margin-bottom:.0001pt;
154
154
  mso-pagination:widow-orphan;
155
155
  tab-stops:center 216.0pt right 482.0pt;
156
- font-size:10.5pt;
156
+ font-size:$normalfontsize;
157
157
  font-family:$bodyfont;
158
158
  mso-fareast-font-family:"Times New Roman";
159
159
  mso-ansi-language:EN-US;
@@ -164,7 +164,7 @@ p.MsoHeaderLandscape, li.MsoHeaderLandscape, div.MsoHeaderLandscape
164
164
  margin-bottom:.0001pt;
165
165
  mso-pagination:widow-orphan;
166
166
  tab-stops:center 367.0pt right 734.0pt;
167
- font-size:10.5pt;
167
+ font-size:$normalfontsize;
168
168
  font-family:$bodyfont;
169
169
  mso-fareast-font-family:"Times New Roman";
170
170
  mso-ansi-language:EN-US;
@@ -175,7 +175,7 @@ p.MsoFooter, li.MsoFooter, div.MsoFooter
175
175
  margin-bottom:.0001pt;
176
176
  mso-pagination:widow-orphan;
177
177
  tab-stops:right 482.0pt;
178
- font-size:10.5pt;
178
+ font-size:$normalfontsize;
179
179
  font-family:$bodyfont;
180
180
  mso-fareast-font-family:"Times New Roman";
181
181
  mso-ansi-language:EN-US;
@@ -186,7 +186,7 @@ p.MsoFooterLandscape, li.MsoFooterLandscape, div.MsoFooterLandscape
186
186
  margin-bottom:.0001pt;
187
187
  mso-pagination:widow-orphan;
188
188
  tab-stops:right 734.0pt;
189
- font-size:10.5pt;
189
+ font-size:$normalfontsize;
190
190
  font-family:$bodyfont;
191
191
  mso-fareast-font-family:"Times New Roman";
192
192
  mso-ansi-language:EN-US;
@@ -306,7 +306,7 @@ p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
306
306
  margin:0cm;
307
307
  margin-bottom:.0001pt;
308
308
  mso-pagination:widow-orphan;
309
- font-size:10.0pt;
309
+ font-size:$smallerfontsize;
310
310
  font-family:$bodyfont;
311
311
  mso-fareast-font-family:"Times New Roman";
312
312
  mso-ansi-language:EN-US;
@@ -567,7 +567,7 @@ p.MsoToc1, li.MsoToc1, div.MsoToc1
567
567
  mso-pagination:widow-orphan;
568
568
  mso-hyphenate:none;
569
569
  tab-stops:20.15pt 36.0pt right dotted 487.6pt;
570
- font-size:10.5pt;
570
+ font-size:$normalfontsize;
571
571
  font-family:$bodyfont;
572
572
  mso-fareast-font-family:$bodyfont;
573
573
  mso-bidi-font-family:$bodyfont;
@@ -590,7 +590,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2
590
590
  mso-pagination:widow-orphan;
591
591
  mso-hyphenate:none;
592
592
  tab-stops:20.15pt 36.0pt right dotted 487.6pt;
593
- font-size:10.5pt;
593
+ font-size:$normalfontsize;
594
594
  font-family:$bodyfont;
595
595
  mso-fareast-font-family:$bodyfont;
596
596
  mso-bidi-font-family:$bodyfont;
@@ -613,7 +613,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
613
613
  mso-pagination:widow-orphan;
614
614
  mso-hyphenate:none;
615
615
  tab-stops:20.15pt 36.0pt right dotted 487.6pt;
616
- font-size:10.5pt;
616
+ font-size:$normalfontsize;
617
617
  font-family:$bodyfont;
618
618
  mso-fareast-font-family:$bodyfont;
619
619
  mso-bidi-font-family:$bodyfont;
@@ -635,7 +635,7 @@ p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
635
635
  line-height:12.0pt;
636
636
  mso-pagination:widow-orphan;
637
637
  tab-stops:20.15pt;
638
- font-size:10.0pt;
638
+ font-size:$footnotefontsize;
639
639
  font-family:$bodyfont;
640
640
  mso-fareast-font-family:$bodyfont;
641
641
  mso-bidi-font-family:$bodyfont;
@@ -653,7 +653,7 @@ p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
653
653
  text-align:justify;
654
654
  line-height:12.0pt;
655
655
  mso-pagination:widow-orphan;
656
- font-size:10.5pt;
656
+ font-size:$normalfontsize;
657
657
  font-family:$bodyfont;
658
658
  mso-fareast-font-family:$bodyfont;
659
659
  mso-bidi-font-family:$bodyfont;
@@ -762,9 +762,9 @@ p.Tablebody, li.Tablebody, div.Tablebody
762
762
  margin-right:0cm;
763
763
  margin-bottom:3.0pt;
764
764
  margin-left:0cm;
765
- line-height:10.5pt;
765
+ line-height:$normalfontsize;
766
766
  mso-pagination:widow-orphan;
767
- font-size:10.0pt;
767
+ font-size:$smallerfontsize;
768
768
  mso-bidi-font-size:11.0pt;
769
769
  font-family:$bodyfont;
770
770
  mso-fareast-font-family:$bodyfont;
@@ -1146,7 +1146,7 @@ table.MsoNormalTable
1146
1146
  mso-para-margin:0cm;
1147
1147
  mso-para-margin-bottom:.0001pt;
1148
1148
  mso-pagination:widow-orphan;
1149
- font-size:10.0pt;
1149
+ font-size:$smallerfontsize;
1150
1150
  font-family:$bodyfont;}
1151
1151
  ol
1152
1152
  {margin-bottom:0cm;
@@ -1,4 +1,5 @@
1
1
  require_relative "base_convert"
2
+ require "isodoc/generic/html_convert"
2
3
  require_relative "init"
3
4
  require "isodoc"
4
5
 
@@ -6,44 +7,7 @@ module IsoDoc
6
7
  module CC
7
8
  # A {Converter} implementation that generates CC output, and a document
8
9
  # schema encapsulation of the document for validation
9
- class HtmlConvert < IsoDoc::HtmlConvert
10
- def initialize(options)
11
- @libdir = File.dirname(__FILE__)
12
- super
13
- end
14
-
15
- def default_fonts(options)
16
- {
17
- bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Source Sans Pro",sans-serif'),
18
- headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Source Sans Pro",sans-serif'),
19
- monospacefont: '"Source Code Pro",monospace'
20
- }
21
- end
22
-
23
- def default_file_locations(options)
24
- {
25
- htmlstylesheet: html_doc_path("htmlstyle.scss"),
26
- htmlcoverpage: html_doc_path("html_cc_titlepage.html"),
27
- htmlintropage: html_doc_path("html_cc_intro.html"),
28
- scripts: html_doc_path("scripts.html"),
29
- }
30
- end
31
-
32
- def googlefonts()
33
- <<~HEAD.freeze
34
- <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,700&display=swap" rel="stylesheet">
35
- <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
36
- HEAD
37
- end
38
-
39
- def make_body(xml, docxml)
40
- body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72", "xml:lang": "EN-US", class: "container" }
41
- xml.body **body_attr do |body|
42
- make_body1(body, docxml)
43
- make_body2(body, docxml)
44
- make_body3(body, docxml)
45
- end
46
- end
10
+ class HtmlConvert < IsoDoc::Generic::HtmlConvert
47
11
 
48
12
  include BaseConvert
49
13
  include Init
@@ -1,9 +1,8 @@
1
1
  module IsoDoc
2
2
  module CC
3
- class I18n < IsoDoc::I18n
4
- def load_yaml1(lang, script)
5
- y = YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
6
- super.merge(y)
3
+ class I18n < IsoDoc::Generic::I18n
4
+ def configuration
5
+ Metanorma::CC.configuration
7
6
  end
8
7
  end
9
8
  end
@@ -11,7 +11,8 @@ module IsoDoc
11
11
  end
12
12
 
13
13
  def xref_init(lang, script, klass, i18n, options)
14
- @xrefs = Xref.new(lang, script, HtmlConvert.new(language: lang, script: script), i18n, options)
14
+ html = HtmlConvert.new(language: lang, script: script)
15
+ @xrefs = Xref.new(lang, script, html, i18n, options)
15
16
  end
16
17
 
17
18
  def i18n_init(lang, script, i18nyaml = nil)
@@ -3,9 +3,11 @@ require "metanorma/cc"
3
3
 
4
4
  module IsoDoc
5
5
  module CC
6
- # A {Converter} implementation that generates CC output, and a document
7
- # schema encapsulation of the document for validation
8
- class Metadata < IsoDoc::Metadata
6
+ class Metadata < IsoDoc::Generic::Metadata
7
+ def configuration
8
+ Metanorma::CC.configuration
9
+ end
10
+
9
11
  def initialize(lang, script, labels)
10
12
  super
11
13
  set(:tc, "XXXX")
@@ -21,7 +23,7 @@ module IsoDoc
21
23
  end
22
24
 
23
25
  def author(isoxml, _out)
24
- tc = isoxml.at(ns("//bibdata/ext/editorialgroup/technical-committee"))
26
+ tc = isoxml.at(ns("//bibdata/ext/editorialgroup/committee"))
25
27
  set(:tc, tc.text) if tc
26
28
  super
27
29
  end
@@ -38,24 +40,6 @@ module IsoDoc
38
40
  set(:roles_authors_affiliations, persons)
39
41
  super
40
42
  end
41
-
42
- def docid(isoxml, _out)
43
- docnumber = isoxml.at(ns("//bibdata/docidentifier"))
44
- prefix = "CC"
45
- if docnumber.nil?
46
- set(:docnumber, prefix)
47
- else
48
- set(:docnumber, docnumber.text)
49
- end
50
- end
51
-
52
- def stage_abbr(status)
53
- ::Metanorma::CC::DOCSTATUS[status] || ""
54
- end
55
-
56
- def unpublished(status)
57
- !%w(published withdrawn).include? status.downcase
58
- end
59
43
  end
60
44
  end
61
45
  end