metanorma-iso 3.5.34 → 3.5.36
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/Gemfile +1 -1
- data/lib/isodoc/iso/docx/cover_renderer.rb +6 -2
- data/lib/isodoc/iso/html/header-dis.html +13 -13
- data/lib/isodoc/iso/html/header.html +13 -13
- data/lib/isodoc/iso/html/html_iso_titlepage.html +6 -5
- data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +3 -2
- data/lib/isodoc/iso/html/word_iso_titlepage-prf.html +1 -1
- data/lib/isodoc/iso/html/word_iso_titlepage.html +4 -3
- data/lib/metanorma/iso/boilerplate-fr.adoc +3 -3
- data/lib/metanorma/iso/boilerplate-ru.adoc +3 -3
- data/lib/metanorma/iso/boilerplate.adoc +3 -3
- data/lib/metanorma/iso/cleanup.rb +16 -0
- data/lib/metanorma/iso/document/metadata/iso_bibliographic_item.rb +20 -4
- data/lib/metanorma/iso/html/renderer.rb +8 -1
- data/lib/metanorma/iso/sts/transformer/list_transformer.rb +14 -0
- data/lib/metanorma/iso/sts/validation_report.rb +2 -0
- data/lib/metanorma/iso/themes/iso/custom.css +261 -0
- data/lib/metanorma/iso/themes/iso/theme.yaml +69 -23
- data/lib/metanorma/iso/themes/iso-legacy/theme.yaml +69 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +3 -1
- metadata +24 -3
- data/CLAUDE.md +0 -119
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b4f5efea7eb0e58f9eab14cc23a339287f60fe50b66946dc78f6c732a3ec5bd8
|
|
4
|
+
data.tar.gz: 3ce1e209d56f15dfc257e730ec484f5709fa6fb35cc14f35acde330482fa474a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a114759821b625e93702ea367449438e8d28e5ed6cdf4e03c17018ec4a1dd0fb7a95cf6944b54d2d86a503b127097103c3d7b8a0f9acb6faefd11b58ad2388e5
|
|
7
|
+
data.tar.gz: 251c73d110f00bb1822102fcc2943f1c55cfc84b4c8d6460d997639240501f47120aa532784fd6a91f2341ed55436752f6de3ca70b0111434eeee9cd2e2b6216
|
data/Gemfile
CHANGED
|
@@ -232,7 +232,11 @@ module IsoDoc
|
|
|
232
232
|
draft = extract_draft(bib)
|
|
233
233
|
return nil unless draft
|
|
234
234
|
|
|
235
|
-
" (
|
|
235
|
+
" (#{draft_word(bib)} #{draft})"
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
def draft_word(bib)
|
|
239
|
+
bib.respond_to?(:draft_label) ? bib.draft_label : "draft"
|
|
236
240
|
end
|
|
237
241
|
|
|
238
242
|
def extract_draft(bib)
|
|
@@ -410,7 +414,7 @@ module IsoDoc
|
|
|
410
414
|
return nil if id_text.nil? || id_text.empty?
|
|
411
415
|
|
|
412
416
|
draft_date = extract_draft_date(bib)
|
|
413
|
-
id_text + (draft_date ? " (
|
|
417
|
+
id_text + (draft_date ? " (#{draft_word(bib)} #{draft_date})" : "")
|
|
414
418
|
end
|
|
415
419
|
|
|
416
420
|
# Cover-large line: primary identifier with language tag, e.g.
|
|
@@ -97,14 +97,14 @@ lang=EN-GB style='font-size:10.0pt'><span style='mso-no-proof:yes'>2</span></spa
|
|
|
97
97
|
lang=EN-GB style='font-size:10.0pt'><span style='mso-element:field-end'></span></span><![endif]--><span
|
|
98
98
|
lang=EN-GB style='font-size:10.0pt;'><span
|
|
99
99
|
style='mso-tab-count:1'> </span>©
|
|
100
|
-
{{ agency }} {{
|
|
100
|
+
{{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}<o:p></o:p></span></p>
|
|
101
101
|
|
|
102
102
|
</div>
|
|
103
103
|
|
|
104
104
|
<div style='mso-element:footer' id=f1>
|
|
105
105
|
|
|
106
106
|
<p class=MsoFooter style='line-height:12.0pt;mso-line-height-rule:exactly'><span
|
|
107
|
-
lang=EN-GB style='font-size:10.0pt'>© {{ agency }} {{
|
|
107
|
+
lang=EN-GB style='font-size:10.0pt'>© {{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}<span
|
|
108
108
|
style='mso-tab-count:1'> </span></span><!--[if supportFields]><span
|
|
109
109
|
lang=EN-GB style='font-size:10.0pt'><span style='mso-element:field-begin'></span>
|
|
110
110
|
PAGE<span style='mso-spacerun:yes'> </span>\* MERGEFORMAT <span
|
|
@@ -163,7 +163,7 @@ style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt'><s
|
|
|
163
163
|
style='mso-element:field-end'></span></span></b><![endif]--><span lang=EN-GB
|
|
164
164
|
style='font-size:10.0pt'><span style='mso-tab-count:1'> </span><span
|
|
165
165
|
lang=EN-GB style='font-size:9.0pt'>©
|
|
166
|
-
{{ agency }} {{
|
|
166
|
+
{{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}<o:p></o:p></span></p>
|
|
167
167
|
</div>
|
|
168
168
|
|
|
169
169
|
<div style='mso-element:footer' id=ef2l>
|
|
@@ -179,12 +179,12 @@ style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt'><s
|
|
|
179
179
|
style='mso-element:field-end'></span></span></b><![endif]--><span lang=EN-GB
|
|
180
180
|
style='font-size:10.0pt'><span style='mso-tab-count:1'> </span><span
|
|
181
181
|
lang=EN-GB style='font-size:9.0pt'>©
|
|
182
|
-
{{ agency }} {{
|
|
182
|
+
{{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}<o:p></o:p></span></p>
|
|
183
183
|
</div>
|
|
184
184
|
|
|
185
185
|
<div style='mso-element:footer' id=f2>
|
|
186
186
|
<p class=MsoFooter style='line-height:12.0pt;mso-line-height-rule:exactly'><span
|
|
187
|
-
lang=EN-GB style='font-size:10.0pt'>© {{ agency }} {{
|
|
187
|
+
lang=EN-GB style='font-size:10.0pt'>© {{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}</span><span lang=EN-GB
|
|
188
188
|
style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span style='mso-tab-count:1'> </span></span><!--[if supportFields]><b
|
|
189
189
|
style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt'><span
|
|
190
190
|
style='mso-element:field-begin'></span> PAGE<span style='mso-spacerun:yes'>
|
|
@@ -198,7 +198,7 @@ style='font-size:10.0pt'><o:p></o:p></span></p>
|
|
|
198
198
|
|
|
199
199
|
<div style='mso-element:footer' id=f2l>
|
|
200
200
|
<p class=MsoFooter style='line-height:12.0pt;mso-line-height-rule:exactly'><span
|
|
201
|
-
lang=EN-GB style='font-size:10.0pt'>© {{ agency }} {{
|
|
201
|
+
lang=EN-GB style='font-size:10.0pt'>© {{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}</span><span lang=EN-GB
|
|
202
202
|
style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span style='mso-tab-count:1'> </span></span><!--[if supportFields]><b
|
|
203
203
|
style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt'><span
|
|
204
204
|
style='mso-element:field-begin'></span> PAGE<span style='mso-spacerun:yes'>
|
|
@@ -223,7 +223,7 @@ style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt'><s
|
|
|
223
223
|
style='mso-element:field-end'></span></span></b><![endif]--><span lang=EN-GB
|
|
224
224
|
style='font-size:10.0pt'><span style='mso-tab-count:1'> </span><span
|
|
225
225
|
lang=EN-GB style='font-size:9.0pt'>©
|
|
226
|
-
{{ agency }} {{
|
|
226
|
+
{{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}<o:p></o:p></span></p>
|
|
227
227
|
</div>
|
|
228
228
|
|
|
229
229
|
<div style='mso-element:footer' id=ef3l>
|
|
@@ -239,12 +239,12 @@ style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt'><s
|
|
|
239
239
|
style='mso-element:field-end'></span></span></b><![endif]--><span lang=EN-GB
|
|
240
240
|
style='font-size:10.0pt'><span style='mso-tab-count:1'> </span><span
|
|
241
241
|
lang=EN-GB style='font-size:9.0pt'>©
|
|
242
|
-
{{ agency }} {{
|
|
242
|
+
{{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}<o:p></o:p></span></p>
|
|
243
243
|
</div>
|
|
244
244
|
|
|
245
245
|
<div style='mso-element:footer' id=f3>
|
|
246
246
|
<p class=MsoFooter style='line-height:12.0pt;mso-line-height-rule:exactly'><span
|
|
247
|
-
lang=EN-GB style='font-size:10.0pt'>© {{ agency }} {{
|
|
247
|
+
lang=EN-GB style='font-size:10.0pt'>© {{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}</span><span lang=EN-GB
|
|
248
248
|
style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span style='mso-tab-count:1'> </span></span><!--[if supportFields]><b
|
|
249
249
|
style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt'><span
|
|
250
250
|
style='mso-element:field-begin'></span> PAGE<span style='mso-spacerun:yes'>
|
|
@@ -258,7 +258,7 @@ style='font-size:10.0pt'><o:p></o:p></span></p>
|
|
|
258
258
|
|
|
259
259
|
<div style='mso-element:footer' id=f3l>
|
|
260
260
|
<p class=MsoFooter style='line-height:12.0pt;mso-line-height-rule:exactly'><span
|
|
261
|
-
lang=EN-GB style='font-size:10.0pt'>© {{ agency }} {{
|
|
261
|
+
lang=EN-GB style='font-size:10.0pt'>© {{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}</span><span lang=EN-GB
|
|
262
262
|
style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span style='mso-tab-count:1'> </span></span><!--[if supportFields]><b
|
|
263
263
|
style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt'><span
|
|
264
264
|
style='mso-element:field-begin'></span> PAGE<span style='mso-spacerun:yes'>
|
|
@@ -271,8 +271,8 @@ style='font-size:10.0pt'><o:p></o:p></span></p>
|
|
|
271
271
|
</div>
|
|
272
272
|
|
|
273
273
|
<div style='mso-element:footer' id=f4>
|
|
274
|
-
{%
|
|
275
|
-
<p class=MsoFooter><b style='mso-bidi-font-weight:normal'><span>ICS {{
|
|
274
|
+
{% assign ics_codes = bibdata.ext.ics | map: "code" | compact %}{% if ics_codes.size > 0 %}
|
|
275
|
+
<p class=MsoFooter><b style='mso-bidi-font-weight:normal'><span>ICS {{ ics_codes | join: ", " }}<o:p></o:p></span></b></p>
|
|
276
276
|
{% endif %}
|
|
277
277
|
{% if keywords.size > 0 %}
|
|
278
278
|
<p class=MsoFooter><b>Descriptors:</b> {{ keywords | join: ", " }}</p>
|
|
@@ -282,7 +282,7 @@ style='font-size:10.0pt'><o:p></o:p></span></p>
|
|
|
282
282
|
10.0pt;mso-ansi-language:EN-AU'>{{ labels["price_based_on"] | replace: "%", "<span style='mso-element:field-begin'></span><span style='mso-spacerun:yes'> </span>NUMPAGES<span style='mso-spacerun:yes'> </span>\* MERGEFORMAT <span style='mso-element:field-separator'></span><span style='mso-no-proof:yes'>26</span><span style='mso-element:field-end'></span>" }}</span></p>
|
|
283
283
|
|
|
284
284
|
<p class=MsoFooter><span lang=EN-AU style='font-size:10.0pt;'>©
|
|
285
|
-
{{ agency }} {{
|
|
285
|
+
{{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}<o:p></o:p></span></p>
|
|
286
286
|
|
|
287
287
|
</div>
|
|
288
288
|
|
|
@@ -84,7 +84,7 @@ style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt;
|
|
|
84
84
|
mso-bidi-font-size:11.0pt'><span style='mso-element:field-end'></span></span></b><![endif]--><span
|
|
85
85
|
lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
|
|
86
86
|
style='mso-tab-count:1'> </span>©
|
|
87
|
-
{{ agency }} {{
|
|
87
|
+
{{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}<o:p></o:p></span></p>
|
|
88
88
|
|
|
89
89
|
</div>
|
|
90
90
|
|
|
@@ -93,7 +93,7 @@ style='mso-tab-count:1'>
|
|
|
93
93
|
<p class=MsoHeader align=right style='margin-top:18.0pt;margin-right:0cm;
|
|
94
94
|
margin-bottom:24.0pt;margin-left:0cm;text-align:right;line-height:12.0pt;
|
|
95
95
|
mso-line-height-rule:exactly'><span lang=EN-GB style='font-size:10.0pt;
|
|
96
|
-
font-weight:normal'>© {{ agency }} {{
|
|
96
|
+
font-weight:normal'>© {{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}<o:p></o:p></span></p>
|
|
97
97
|
|
|
98
98
|
</div>
|
|
99
99
|
|
|
@@ -131,7 +131,7 @@ style='mso-element:field-end'></span></span><![endif]--><span lang=EN-GB
|
|
|
131
131
|
style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span style='mso-tab-count:
|
|
132
132
|
1'> </span><span
|
|
133
133
|
lang=EN-GB style='font-size:9.0pt'>©
|
|
134
|
-
{{ agency }} {{
|
|
134
|
+
{{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}<o:p></o:p></span></span></p>
|
|
135
135
|
</div>
|
|
136
136
|
|
|
137
137
|
<div style='mso-element:footer' id=ef2l>
|
|
@@ -147,12 +147,12 @@ style='mso-element:field-end'></span></span><![endif]--><span lang=EN-GB
|
|
|
147
147
|
style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span style='mso-tab-count:
|
|
148
148
|
1'> </span><span
|
|
149
149
|
lang=EN-GB style='font-size:9.0pt'>©
|
|
150
|
-
{{ agency }} {{
|
|
150
|
+
{{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}<o:p></o:p></span></span></p>
|
|
151
151
|
</div>
|
|
152
152
|
|
|
153
153
|
<div style='mso-element:footer' id=f2>
|
|
154
154
|
<p class=MsoFooter style='margin-bottom:24.0pt;line-height:12.0pt'><span lang=EN-GB
|
|
155
|
-
style='font-size:9.0pt'>© {{ agency }} {{
|
|
155
|
+
style='font-size:9.0pt'>© {{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}</span><span lang=EN-GB
|
|
156
156
|
style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span style='mso-tab-count:1'> </span></span><!--[if supportFields]><span
|
|
157
157
|
lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
|
|
158
158
|
style='mso-element:field-begin'></span> PAGE<span style='mso-spacerun:yes'>
|
|
@@ -166,7 +166,7 @@ style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><o:p></o:p></span></p>
|
|
|
166
166
|
|
|
167
167
|
<div style='mso-element:footer' id=f2l>
|
|
168
168
|
<p class=MsoFooterLandscape style='margin-bottom:24.0pt;line-height:12.0pt'><span lang=EN-GB
|
|
169
|
-
style='font-size:9.0pt'>© {{ agency }} {{
|
|
169
|
+
style='font-size:9.0pt'>© {{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}</span><span lang=EN-GB
|
|
170
170
|
style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span style='mso-tab-count:1'> </span></span><!--[if supportFields]><span
|
|
171
171
|
lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
|
|
172
172
|
style='mso-element:field-begin'></span> PAGE<span style='mso-spacerun:yes'>
|
|
@@ -192,7 +192,7 @@ mso-bidi-font-size:11.0pt'><span style='mso-element:field-end'></span></span></b
|
|
|
192
192
|
lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
|
|
193
193
|
style='mso-tab-count:1'> </span><span lang=EN-GB
|
|
194
194
|
style='font-size:9.0pt'>©
|
|
195
|
-
{{ agency }} {{
|
|
195
|
+
{{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}<o:p></o:p></span></span></p>
|
|
196
196
|
</div>
|
|
197
197
|
|
|
198
198
|
<div style='mso-element:footer' id=ef3l>
|
|
@@ -209,12 +209,12 @@ mso-bidi-font-size:11.0pt'><span style='mso-element:field-end'></span></span></b
|
|
|
209
209
|
lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
|
|
210
210
|
style='mso-tab-count:1'> </span><span lang=EN-GB
|
|
211
211
|
style='font-size:9.0pt'>©
|
|
212
|
-
{{ agency }} {{
|
|
212
|
+
{{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}<o:p></o:p></span></span></p>
|
|
213
213
|
</div>
|
|
214
214
|
|
|
215
215
|
<div style='mso-element:footer' id=f3>
|
|
216
216
|
<p class=MsoFooter style='margin-bottom:24.0pt;line-height:12.0pt'><span lang=EN-GB
|
|
217
|
-
style='font-size:9.0pt'>© {{ agency }} {{
|
|
217
|
+
style='font-size:9.0pt'>© {{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}</span><span lang=EN-GB
|
|
218
218
|
style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span style='mso-tab-count:1'> </span></span><!--[if supportFields]><b
|
|
219
219
|
style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt;
|
|
220
220
|
mso-bidi-font-size:11.0pt'><span style='mso-element:field-begin'></span>
|
|
@@ -229,7 +229,7 @@ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><o:p></o:p></span>
|
|
|
229
229
|
|
|
230
230
|
<div style='mso-element:footer' id=f3l>
|
|
231
231
|
<p class=MsoFooterLandscape style='margin-bottom:24.0pt;line-height:12.0pt'><span lang=EN-GB
|
|
232
|
-
style='font-size:9.0pt'>© {{ agency }} {{
|
|
232
|
+
style='font-size:9.0pt'>© {{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}</span><span lang=EN-GB
|
|
233
233
|
style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span style='mso-tab-count:1'> </span></span><!--[if supportFields]><b
|
|
234
234
|
style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt;
|
|
235
235
|
mso-bidi-font-size:11.0pt'><span style='mso-element:field-begin'></span>
|
|
@@ -243,8 +243,8 @@ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><o:p></o:p></span>
|
|
|
243
243
|
</div>
|
|
244
244
|
|
|
245
245
|
<div style='mso-element:footer' id=f4>
|
|
246
|
-
{%
|
|
247
|
-
<p class=MsoFooter><b style='mso-bidi-font-weight:normal'><span>ICS {{
|
|
246
|
+
{% assign ics_codes = bibdata.ext.ics | map: "code" | compact %}{% if ics_codes.size > 0 %}
|
|
247
|
+
<p class=MsoFooter><b style='mso-bidi-font-weight:normal'><span>ICS {{ ics_codes | join: ", " }}<o:p></o:p></span></b></p>
|
|
248
248
|
{% endif %}
|
|
249
249
|
{% if keywords.size > 0 %}
|
|
250
250
|
<p class=MsoFooter><b>Descriptors:</b> {{ keywords | join: ", " }}</p>
|
|
@@ -254,7 +254,7 @@ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><o:p></o:p></span>
|
|
|
254
254
|
10.0pt;mso-ansi-language:EN-AU'>{{ labels["price_based_on"] | replace: "%", "<span style='mso-element:field-begin'></span><span style='mso-spacerun:yes'> </span>NUMPAGES<span style='mso-spacerun:yes'> </span>\* MERGEFORMAT <span style='mso-element:field-separator'></span><span style='mso-no-proof:yes'>26</span><span style='mso-element:field-end'></span>" }}</span></p>
|
|
255
255
|
|
|
256
256
|
<p class=MsoFooter><span lang=EN-AU style='font-size:10.0pt;'>©
|
|
257
|
-
{{ agency }} {{
|
|
257
|
+
{{ agency }} {{ bibdata.copyright | map: "from" | compact | first }} – {{ labels["all_rights_reserved"] }}<o:p></o:p></span></p>
|
|
258
258
|
|
|
259
259
|
</div>
|
|
260
260
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
{%- assign undated = bibdata.docidentifier | where: "type", "iso-undated" | first -%}
|
|
1
2
|
<div id='toggle'> <span>•</span> </div>
|
|
2
3
|
{% if tc_docnumber.size > 0 %}
|
|
3
4
|
{% for num in tc_docnumber %}
|
|
4
5
|
<p class="coverpage_docnumber">{{ num }}</p>
|
|
5
6
|
{% endfor %}
|
|
6
7
|
{% else %}
|
|
7
|
-
<p class="coverpage_docnumber">{{
|
|
8
|
+
<p class="coverpage_docnumber">{{ undated.content }} {{ draftinfo }}</p>
|
|
8
9
|
{% endif %}
|
|
9
10
|
|
|
10
11
|
{% if edition_display %}
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
{% endif %}
|
|
21
22
|
|
|
22
23
|
{% if tc_docnumber.size > 0 %}
|
|
23
|
-
<p class="coverpage_docnumber">{{
|
|
24
|
+
<p class="coverpage_docnumber">{{ undated.content }} {{ draftinfo }}</p>
|
|
24
25
|
{% endif %}
|
|
25
26
|
|
|
26
27
|
<p class="coverpage_techcommittee">{{ editorialgroup }}</p>
|
|
@@ -91,15 +92,15 @@
|
|
|
91
92
|
{% endif %}
|
|
92
93
|
<div class="coverpage_warning" id="coverpage-note-destination"/>
|
|
93
94
|
|
|
94
|
-
{%
|
|
95
|
-
<p><b>ICS:</b> {{
|
|
95
|
+
{% assign ics_codes = bibdata.ext.ics | map: "code" | compact %}{% if ics_codes.size > 0 %}
|
|
96
|
+
<p><b>ICS:</b> {{ ics_codes | join: ", " }}</p>
|
|
96
97
|
{% endif %}
|
|
97
98
|
|
|
98
99
|
{% if keywords.size > 0 %}
|
|
99
100
|
<p><b>Descriptors:</b> {{ keywords | join: ", " }}
|
|
100
101
|
{% endif %}
|
|
101
102
|
|
|
102
|
-
{%if fast_track ==
|
|
103
|
+
{% if bibdata.ext.fast_track == true %}
|
|
103
104
|
<div><span class="subtitle">{{ labels["fast-track-procedure"] }}</span></div>
|
|
104
105
|
{% endif %}
|
|
105
106
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
{%- assign undated = bibdata.docidentifier | where: "type", "iso-undated" | first -%}
|
|
1
2
|
{% if tc_docnumber.size > 0 %}
|
|
2
3
|
{% for num in tc_docnumber %}
|
|
3
4
|
<p class="zzCover"><span lang="EN-GB">Reference number of working document: {{ num }}</span><span lang="EN-GB"><o:p></o:p></span></p>
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
<p class="zzCover">{{ labels["corrected_version"] }}: {{ correcteddate }}</p>
|
|
22
23
|
{% endif %}
|
|
23
24
|
|
|
24
|
-
<p class="zzCover" style='font-weight:normal;'><span lang="EN-GB">Reference number of project: {{
|
|
25
|
+
<p class="zzCover" style='font-weight:normal;'><span lang="EN-GB">Reference number of project: {{ undated.content }}{% if draftinfo %} {{ draftinfo }}{% endif %}</span></p>
|
|
25
26
|
|
|
26
27
|
<p class="zzCover" style='font-weight:normal;'><span lang="EN-GB">Committee identification: {{ approvalgroup }}</span></p>
|
|
27
28
|
|
|
@@ -83,7 +84,7 @@
|
|
|
83
84
|
|
|
84
85
|
<div class="coverpage-warning" id="coverpage-note-destination"/>
|
|
85
86
|
|
|
86
|
-
{%if fast_track ==
|
|
87
|
+
{% if bibdata.ext.fast_track == true %}
|
|
87
88
|
<div><p class="zzCover">{{ labels["fast-track-procedure"] }}</p></div>
|
|
88
89
|
{% endif %}
|
|
89
90
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
{%- assign undated = bibdata.docidentifier | where: "type", "iso-undated" | first -%}
|
|
1
2
|
{% if tc_docnumber.size > 0 %}
|
|
2
3
|
{% for num in tc_docnumber %}
|
|
3
4
|
<p class="MsoNormal" align="right" style='text-align:right'><b style='mso-bidi-font-weight:
|
|
@@ -6,12 +7,12 @@ style='mso-bidi-font-weight:normal'><span lang="EN-GB" style='font-size:14.0pt'>
|
|
|
6
7
|
{% endfor %}
|
|
7
8
|
{% else %}
|
|
8
9
|
<p class="MsoNormal" align="right" style='text-align:right'><b style='mso-bidi-font-weight:
|
|
9
|
-
normal'><span lang="EN-GB" style='font-size:14.0pt;mso-no-proof:yes'>{{
|
|
10
|
+
normal'><span lang="EN-GB" style='font-size:14.0pt;mso-no-proof:yes'>{{ undated.content }} {{ draftinfo }}</span></b><b
|
|
10
11
|
style='mso-bidi-font-weight:normal'><span lang="EN-GB" style='font-size:14.0pt'><o:p></o:p></span></b></p>
|
|
11
12
|
{% endif %}
|
|
12
13
|
|
|
13
14
|
{% if tc_docnumber.size > 0 %}
|
|
14
|
-
<p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB" style='mso-no-proof:yes'>{{
|
|
15
|
+
<p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB" style='mso-no-proof:yes'>{{ undated.content }} {{ draftinfo }}</span></p>
|
|
15
16
|
{% endif %}
|
|
16
17
|
|
|
17
18
|
{% if doctitleamdlabel %}
|
|
@@ -157,7 +158,7 @@ documentation.</span><span lang="EN-GB" style='font-size:10.0pt;mso-bidi-font-si
|
|
|
157
158
|
|
|
158
159
|
<div class="coverpage-warning" id="coverpage-note-destination"/>
|
|
159
160
|
|
|
160
|
-
{%if fast_track ==
|
|
161
|
+
{% if bibdata.ext.fast_track == true %}
|
|
161
162
|
<div><p class="zzCover">{{ labels["fast-track-procedure"] }}</p></div>
|
|
162
163
|
{% endif %}
|
|
163
164
|
|
|
@@ -25,7 +25,7 @@ nationales de normalisation.
|
|
|
25
25
|
=== {blank}
|
|
26
26
|
|
|
27
27
|
[[boilerplate-year]]
|
|
28
|
-
©   span:std_publisher[*Organisation Nationale de Normalisation*], span:date[*{{
|
|
28
|
+
©   span:std_publisher[*Organisation Nationale de Normalisation*], span:date[*{{ bibdata.copyright | map: "from" | compact | first }}*]   ●
|
|
29
29
|
|
|
30
30
|
[[boilerplate-place]]
|
|
31
31
|
Publié en Suisse
|
|
@@ -37,7 +37,7 @@ Publié en Suisse
|
|
|
37
37
|
=== {blank}
|
|
38
38
|
|
|
39
39
|
[[boilerplate-year]]
|
|
40
|
-
© span:std_publisher[{{ agency }} ]span:date[{{
|
|
40
|
+
© span:std_publisher[{{ agency }} ]span:date[{{ bibdata.copyright | map: "from" | compact | first }}]
|
|
41
41
|
|
|
42
42
|
[[boilerplate-message]]
|
|
43
43
|
Droits de reproduction réservés. Sauf prescription différente, aucune partie de cette publication
|
|
@@ -60,7 +60,7 @@ Imprimé en Suisse
|
|
|
60
60
|
=== {% if stage_int >= 40 %}DOCUMENT PROTÉGÉ PAR COPYRIGHT{%else%}{blank}{%endif%}
|
|
61
61
|
|
|
62
62
|
[[boilerplate-year]]
|
|
63
|
-
© span:std_publisher:[{{ agency }} ]span:date[{{
|
|
63
|
+
© span:std_publisher:[{{ agency }} ]span:date[{{ bibdata.copyright | map: "from" | compact | first }}]
|
|
64
64
|
|
|
65
65
|
[[boilerplate-message]]
|
|
66
66
|
Droits de reproduction réservés. Sauf indication contraire, ou requise dans le cadre de sa mise en œuvre,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
=== {blank}
|
|
7
7
|
|
|
8
8
|
[[boilerplate-year]]
|
|
9
|
-
©   span:std_publisher[*Международная Организация по Стандартизации*], span:date[*{{
|
|
9
|
+
©   span:std_publisher[*Международная Организация по Стандартизации*], span:date[*{{ bibdata.copyright | map: "from" | compact | first }}*]   ●
|
|
10
10
|
|
|
11
11
|
[[boilerplate-place]]
|
|
12
12
|
Издано в Швейцарии
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
=== {blank}
|
|
18
18
|
|
|
19
19
|
[[boilerplate-year]]
|
|
20
|
-
© span:std_publisher[{{ agency }} ]span:date[{{
|
|
20
|
+
© span:std_publisher[{{ agency }} ]span:date[{{ bibdata.copyright | map: "from" | compact | first }}]
|
|
21
21
|
|
|
22
22
|
[[boilerplate-message]]
|
|
23
23
|
Охраняется авторским правом. Если это особо не указано, то никакая часть данной публикации не может быть воспроизведена и
|
|
@@ -40,7 +40,7 @@ X.400          c=ch; a=400net;
|
|
|
40
40
|
=== {% if stage_int >= 40 %}ДОКУМЕНТ, ОХРАНЯЕМЫЙ АВТОРСКИМ ПРАВОМ{% else %}{blank}{% endif %}
|
|
41
41
|
|
|
42
42
|
[[boilerplate-year]]
|
|
43
|
-
© span:std_publisher[{{ agency }} ]span:date[{{
|
|
43
|
+
© span:std_publisher[{{ agency }} ]span:date[{{ bibdata.copyright | map: "from" | compact | first }}]
|
|
44
44
|
|
|
45
45
|
[[boilerplate-message]]
|
|
46
46
|
Все права защищены. Если иначе не определено или не требуется в контексте его реализации, никакая часть этой публикации не может быть воспроизведена или использована иначе в любой форме или каким-либо образом, электронным или механическим, включая фотокопирование, или публикацию в Интернете или интранете, без предварительного письменного разрешения. Разрешение может быть запрошено ISO по адресу, указанному ниже, или у органа — члена ISO страны запрашивающего.
|
|
@@ -25,7 +25,7 @@ Also issued in French and Russian. Copies to be obtained through the national st
|
|
|
25
25
|
=== {blank}
|
|
26
26
|
|
|
27
27
|
[[boilerplate-year]]
|
|
28
|
-
©   span:std_publisher[*International Organization for Standardization*], span:date[*{{
|
|
28
|
+
©   span:std_publisher[*International Organization for Standardization*], span:date[*{{ bibdata.copyright | map: "from" | compact | first }}*]   ●
|
|
29
29
|
|
|
30
30
|
[[boilerplate-place]]
|
|
31
31
|
Printed in Switzerland
|
|
@@ -37,7 +37,7 @@ Printed in Switzerland
|
|
|
37
37
|
=== {blank}
|
|
38
38
|
|
|
39
39
|
[[boilerplate-year]]
|
|
40
|
-
© span:std_publisher[{{ agency }} ]span:date[{{
|
|
40
|
+
© span:std_publisher[{{ agency }} ]span:date[{{ bibdata.copyright | map: "from" | compact | first }}]
|
|
41
41
|
|
|
42
42
|
[[boilerplate-message]]
|
|
43
43
|
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced
|
|
@@ -60,7 +60,7 @@ Printed in Switzerland
|
|
|
60
60
|
=== {% if stage_int >= 40 %}COPYRIGHT PROTECTED DOCUMENT{% else %}{blank}{% endif %}
|
|
61
61
|
|
|
62
62
|
[[boilerplate-year]]
|
|
63
|
-
© span:std_publisher[{{ agency }} ]span:date[{{
|
|
63
|
+
© span:std_publisher[{{ agency }} ]span:date[{{ bibdata.copyright | map: "from" | compact | first }}]
|
|
64
64
|
|
|
65
65
|
[[boilerplate-message]]
|
|
66
66
|
All rights reserved. Unless otherwise specified, or required in the context of its implementation,
|
|
@@ -7,6 +7,22 @@ module Metanorma
|
|
|
7
7
|
super + %i[amd vocab]
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
+
def cleanup(xmldoc)
|
|
11
|
+
super
|
|
12
|
+
example_collapsible_cleanup(xmldoc)
|
|
13
|
+
xmldoc
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# ISO deliverables are print-oriented: the %collapsible example
|
|
17
|
+
# option exists for interactive HTML in the source flavor, and its
|
|
18
|
+
# <details> structure leaks confusingly into ISO DOCX/PDF
|
|
19
|
+
# (metanorma-iso#1920, metanorma-pdfa#117).
|
|
20
|
+
def example_collapsible_cleanup(xmldoc)
|
|
21
|
+
xmldoc.xpath("//example[@collapsible = 'true']").each do |x|
|
|
22
|
+
x.delete("collapsible")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
10
26
|
PRE_NORMREF_FOOTNOTES = "//preface//fn | " \
|
|
11
27
|
"//clause[@type = 'scope']//fn".freeze
|
|
12
28
|
|
|
@@ -57,10 +57,13 @@ module Metanorma
|
|
|
57
57
|
ext&.stagename&.abbreviation.to_s
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
+
# isodoc parity: the cover "Date:" is the version revision-date,
|
|
61
|
+
# else the "updated" date. Published/created dates are not used.
|
|
60
62
|
def cover_published_date
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
revision = version&.revision_date.to_s
|
|
64
|
+
return revision unless revision.empty?
|
|
65
|
+
|
|
66
|
+
published = date.find { |d| d.type == "updated" }
|
|
64
67
|
return nil unless published
|
|
65
68
|
|
|
66
69
|
raw = published.on || published.text
|
|
@@ -77,12 +80,25 @@ module Metanorma
|
|
|
77
80
|
draft = version&.content.to_s
|
|
78
81
|
return nil if draft.empty?
|
|
79
82
|
|
|
80
|
-
info = " (
|
|
83
|
+
info = " (#{draft_label} #{draft}"
|
|
81
84
|
revdate = cover_published_date.to_s
|
|
82
85
|
info += ", #{revdate}" if !revdate.empty? && revdate != draft
|
|
83
86
|
"#{info})"
|
|
84
87
|
end
|
|
85
88
|
|
|
89
|
+
# The "draft" word is the document language's i18n label
|
|
90
|
+
# (isodoc draft_label: "brouillon" in French), not fixed English.
|
|
91
|
+
def draft_label
|
|
92
|
+
langs = Array(language)
|
|
93
|
+
lang = (langs.find { |l| l.current.to_s == "true" } || langs.first)&.value.to_s
|
|
94
|
+
lang = "en" if lang.empty?
|
|
95
|
+
(@draft_labels ||= {})[lang] ||= begin
|
|
96
|
+
IsoDoc::Iso::I18n.new(lang, "Latn").get["draft_label"] || "draft"
|
|
97
|
+
rescue LoadError, NameError, Errno::ENOENT
|
|
98
|
+
"draft"
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
86
102
|
def cover_edition_display
|
|
87
103
|
# isodoc renders edition[@language=en] verbatim (spelled out,
|
|
88
104
|
# e.g. "one thousand nine hundred seventy-ninth edition");
|
|
@@ -501,8 +501,11 @@ module Metanorma
|
|
|
501
501
|
|
|
502
502
|
if doc.sections
|
|
503
503
|
section_children = collect_ordered_children(doc.sections)
|
|
504
|
+
title_rendered = !render_doc_title(doc).to_s.empty?
|
|
504
505
|
section_children.reject! do |node|
|
|
505
|
-
node.is_a?(Metanorma::Document::Components::Paragraphs::ParagraphBlock)
|
|
506
|
+
next false unless node.is_a?(Metanorma::Document::Components::Paragraphs::ParagraphBlock)
|
|
507
|
+
|
|
508
|
+
title_rendered || !title_paragraph?(node)
|
|
506
509
|
end
|
|
507
510
|
items.concat(section_children)
|
|
508
511
|
end
|
|
@@ -514,6 +517,10 @@ module Metanorma
|
|
|
514
517
|
sort_by_displayorder(items)
|
|
515
518
|
end
|
|
516
519
|
|
|
520
|
+
def title_paragraph?(node)
|
|
521
|
+
safe_attr(node, :class_attr).to_s.start_with?("zzSTDTitle")
|
|
522
|
+
end
|
|
523
|
+
|
|
517
524
|
def publisher_logos_html(_doc)
|
|
518
525
|
publishers = flavor_publishers(extract_primary_doc_id)
|
|
519
526
|
logo_map = publisher_logo_map
|
|
@@ -46,7 +46,21 @@ module Metanorma
|
|
|
46
46
|
source_list.type
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
+
# Items are cited by id from xrefs elsewhere in the document, so
|
|
50
|
+
# the item keeps its source id (claimed against the document's ids)
|
|
51
|
+
# for the xref rid to resolve.
|
|
49
52
|
def build_list_item(li, ordered, fallback_marker = nil)
|
|
53
|
+
item = build_list_item_content(li, ordered, fallback_marker)
|
|
54
|
+
source_id = li.respond_to?(:id) ? li.id : nil
|
|
55
|
+
return item if source_id.nil? || source_id.to_s.empty?
|
|
56
|
+
|
|
57
|
+
id = id_generator.claim(source_id)
|
|
58
|
+
id_generator.register(source_id, id)
|
|
59
|
+
item.id = id
|
|
60
|
+
item
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def build_list_item_content(li, ordered, fallback_marker)
|
|
50
64
|
nested_lists = build_nested_lists(li)
|
|
51
65
|
|
|
52
66
|
::Sts::NisoSts::ListItem.new do |item|
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
ISO default HTML: document body in the house style of the consolidated
|
|
3
|
+
ISO/IEC Directives online edition. Scoped to .main-section so the reader
|
|
4
|
+
chrome (header, sidebar, cover) keeps the shared component styles.
|
|
5
|
+
Sizes are in em so the reader's font-size control still scales the body.
|
|
6
|
+
========================================================================== */
|
|
7
|
+
|
|
8
|
+
/* Body tokens follow the theme palette, so the reader's light, sepia and
|
|
9
|
+
dark modes recolour the body; only the accents need dark-mode values. */
|
|
10
|
+
:root {
|
|
11
|
+
--iso-ink: var(--color-text);
|
|
12
|
+
--iso-ink-soft: var(--color-text-light);
|
|
13
|
+
--iso-muted: var(--color-text-muted);
|
|
14
|
+
--iso-line: var(--color-border);
|
|
15
|
+
--iso-line-soft: var(--color-bg-light);
|
|
16
|
+
--iso-link: var(--mn-primary);
|
|
17
|
+
--iso-link-soft: var(--mn-primary-light);
|
|
18
|
+
--iso-marker: var(--mn-warm);
|
|
19
|
+
--iso-table-bg: var(--color-bg);
|
|
20
|
+
}
|
|
21
|
+
[data-theme="dark"], [data-theme="oled"] {
|
|
22
|
+
--iso-link: #6fb3f0;
|
|
23
|
+
--iso-marker: #ff7a8a;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* --- Body text --- */
|
|
27
|
+
.main-section {
|
|
28
|
+
font-family: var(--font-body);
|
|
29
|
+
font-size: 1em;
|
|
30
|
+
font-weight: 400;
|
|
31
|
+
line-height: 1.62;
|
|
32
|
+
color: var(--iso-ink);
|
|
33
|
+
}
|
|
34
|
+
.main-section p { margin: 0 0 0.875em; }
|
|
35
|
+
.main-section a { color: var(--iso-link); text-decoration: none; }
|
|
36
|
+
.main-section a:hover { text-decoration: underline; }
|
|
37
|
+
.main-section a.xref {
|
|
38
|
+
border-bottom: 1px dotted currentColor;
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
}
|
|
41
|
+
.main-section a.xref:hover { background: var(--iso-link-soft); border-bottom-style: solid; }
|
|
42
|
+
|
|
43
|
+
/* --- Clause headings: number in the accent colour, then the title --- */
|
|
44
|
+
.main-section h1, .main-section h2, .main-section h3,
|
|
45
|
+
.main-section h4, .main-section h5, .main-section h6,
|
|
46
|
+
.main-section .foreword-title, .main-section .intro-title {
|
|
47
|
+
font-family: var(--font-sans);
|
|
48
|
+
font-weight: 700;
|
|
49
|
+
color: var(--iso-ink);
|
|
50
|
+
padding: 0;
|
|
51
|
+
border: 0;
|
|
52
|
+
letter-spacing: normal;
|
|
53
|
+
scroll-margin-top: calc(var(--header-height) + 20px);
|
|
54
|
+
}
|
|
55
|
+
.main-section h1, .main-section .foreword-title, .main-section .intro-title {
|
|
56
|
+
font-size: 1.5em;
|
|
57
|
+
line-height: 1.2;
|
|
58
|
+
letter-spacing: -0.01em;
|
|
59
|
+
margin: 3.25rem 0 1rem;
|
|
60
|
+
}
|
|
61
|
+
.main-section h1::after { content: none; }
|
|
62
|
+
.main-section h2 { font-size: 1.15625em; line-height: 1.3; margin: 2.125rem 0 0.75rem; }
|
|
63
|
+
.main-section h3, .main-section h4, .main-section h5, .main-section h6 {
|
|
64
|
+
font-size: 0.96875em;
|
|
65
|
+
line-height: 1.4;
|
|
66
|
+
margin: 1.5rem 0 0.625rem;
|
|
67
|
+
color: var(--iso-ink-soft);
|
|
68
|
+
}
|
|
69
|
+
.main-section :is(h1, h2, h3, h4, h5, h6) > .caption-label {
|
|
70
|
+
color: var(--iso-link);
|
|
71
|
+
font-variant-numeric: tabular-nums;
|
|
72
|
+
margin-right: 0.5em;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* --- Annexes: "Annex A", obligation and title on separate lines --- */
|
|
76
|
+
.main-section .annex-title {
|
|
77
|
+
font-size: 1.5em;
|
|
78
|
+
line-height: 1.3;
|
|
79
|
+
color: var(--iso-link);
|
|
80
|
+
border-top: 1px solid var(--iso-line);
|
|
81
|
+
padding-top: 2.5rem;
|
|
82
|
+
margin-top: 3.75rem;
|
|
83
|
+
}
|
|
84
|
+
.main-section .annex-title .obligation-text { font-weight: 400; font-size: 0.75em; }
|
|
85
|
+
|
|
86
|
+
/* --- Captions: "Table 1 — Title", "Figure 1 — Title" with a visible dash --- */
|
|
87
|
+
.main-section .caption-delim { opacity: 1; }
|
|
88
|
+
.main-section .caption-label,
|
|
89
|
+
.main-section .element-label { font-weight: 700; font-variant: normal; text-transform: none; }
|
|
90
|
+
.main-section :is(figcaption, .table-caption) :is(.caption-label, .element-label) { color: inherit; }
|
|
91
|
+
|
|
92
|
+
/* --- Terms: entry number on its own line, preferred term in bold --- */
|
|
93
|
+
.main-section div[id^="term-"] {
|
|
94
|
+
margin: 1.125em 0 0.125em;
|
|
95
|
+
padding: 0;
|
|
96
|
+
border: 0;
|
|
97
|
+
}
|
|
98
|
+
.main-section div[id^="term-"] + div[id^="term-"] { margin-top: 1.125em; }
|
|
99
|
+
.main-section .TermNum {
|
|
100
|
+
font-family: var(--font-sans);
|
|
101
|
+
font-variant: normal;
|
|
102
|
+
font-size: 1em;
|
|
103
|
+
font-weight: 700;
|
|
104
|
+
line-height: 1.62;
|
|
105
|
+
color: var(--iso-link);
|
|
106
|
+
font-variant-numeric: tabular-nums;
|
|
107
|
+
margin: 0;
|
|
108
|
+
}
|
|
109
|
+
.main-section .TermNum > .caption-label { margin-right: 0; }
|
|
110
|
+
.main-section div[id^="term-"] > p { margin: 0 0 0.25em; }
|
|
111
|
+
.main-section div[id^="term-"] > p > strong:only-child { color: var(--iso-ink); }
|
|
112
|
+
.main-section .term-name { font-size: 1em; color: var(--iso-ink); font-weight: 700; }
|
|
113
|
+
.main-section .term-domain { color: var(--iso-ink-soft); font-size: 1em; }
|
|
114
|
+
.main-section p.term-source {
|
|
115
|
+
font-size: 1em;
|
|
116
|
+
color: var(--iso-ink);
|
|
117
|
+
line-height: 1.62;
|
|
118
|
+
margin: 0.375em 0 0.75em;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* --- Notes and examples: small muted text, label in capitals --- */
|
|
122
|
+
.main-section .note-block,
|
|
123
|
+
.main-section .example,
|
|
124
|
+
.main-section div[id^="term-"] .note-block,
|
|
125
|
+
.main-section div[id^="term-"] .example {
|
|
126
|
+
background: none;
|
|
127
|
+
border: 0;
|
|
128
|
+
border-radius: 0;
|
|
129
|
+
padding: 0;
|
|
130
|
+
margin: 0.125rem 0 0.375rem;
|
|
131
|
+
font-size: 0.78125em;
|
|
132
|
+
line-height: 1.5;
|
|
133
|
+
color: var(--iso-muted);
|
|
134
|
+
}
|
|
135
|
+
.main-section .note-block::before,
|
|
136
|
+
.main-section .example::before { content: none; }
|
|
137
|
+
.main-section .note-block p,
|
|
138
|
+
.main-section .example p { margin: 0 0 0.375em; }
|
|
139
|
+
.main-section .note-label,
|
|
140
|
+
.main-section .term-note-label,
|
|
141
|
+
.main-section .example-label {
|
|
142
|
+
font-family: inherit;
|
|
143
|
+
font-weight: 700;
|
|
144
|
+
letter-spacing: 0.04em;
|
|
145
|
+
color: var(--iso-muted);
|
|
146
|
+
margin-right: 0.5em;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* --- Lists: dash and a) 1) labels in the marker colour --- */
|
|
150
|
+
.main-section .mn-labeled-list { padding-left: 2.2em; margin: 0.25em 0 1em; }
|
|
151
|
+
.main-section .mn-labeled-list .li-label {
|
|
152
|
+
float: left;
|
|
153
|
+
width: 2.2em;
|
|
154
|
+
margin-left: -2.2em;
|
|
155
|
+
color: var(--iso-marker);
|
|
156
|
+
font-weight: 600;
|
|
157
|
+
font-variant-numeric: tabular-nums;
|
|
158
|
+
}
|
|
159
|
+
.main-section li { margin: 0 0 0.375em; }
|
|
160
|
+
.main-section li::marker { color: var(--iso-marker); }
|
|
161
|
+
|
|
162
|
+
/* --- Tables: title above, centred; notes and footnotes inside the frame --- */
|
|
163
|
+
.main-section .table-scroll-wrapper { margin: 1em auto 1.25em; overflow-x: auto; text-align: center; }
|
|
164
|
+
.main-section .table-caption {
|
|
165
|
+
position: static;
|
|
166
|
+
display: block;
|
|
167
|
+
background: none;
|
|
168
|
+
border: 0;
|
|
169
|
+
padding: 0 0 0.5em;
|
|
170
|
+
text-align: center;
|
|
171
|
+
font-family: var(--font-sans);
|
|
172
|
+
font-size: 1em;
|
|
173
|
+
font-weight: 700;
|
|
174
|
+
color: var(--iso-ink);
|
|
175
|
+
}
|
|
176
|
+
.main-section table.table-block {
|
|
177
|
+
border-collapse: collapse;
|
|
178
|
+
width: auto;
|
|
179
|
+
min-width: 60%;
|
|
180
|
+
margin: 0 auto;
|
|
181
|
+
font-size: 0.90625em;
|
|
182
|
+
background: var(--iso-table-bg);
|
|
183
|
+
text-align: left;
|
|
184
|
+
}
|
|
185
|
+
.main-section table.table-block th,
|
|
186
|
+
.main-section table.table-block td {
|
|
187
|
+
border: 1px solid var(--iso-line);
|
|
188
|
+
padding: 0.4375em 0.75em;
|
|
189
|
+
text-align: left;
|
|
190
|
+
vertical-align: top;
|
|
191
|
+
}
|
|
192
|
+
.main-section table.table-block thead th {
|
|
193
|
+
background: var(--iso-link-soft);
|
|
194
|
+
color: var(--iso-ink);
|
|
195
|
+
font-weight: 700;
|
|
196
|
+
}
|
|
197
|
+
.main-section td.table-footnotes {
|
|
198
|
+
font-size: 0.9em;
|
|
199
|
+
color: var(--iso-ink-soft);
|
|
200
|
+
}
|
|
201
|
+
.main-section .TableFootnoteRef {
|
|
202
|
+
vertical-align: super;
|
|
203
|
+
font-size: 0.75em;
|
|
204
|
+
line-height: 0;
|
|
205
|
+
margin-right: 0.35em;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* --- Figures: title below the figure, bold and centred --- */
|
|
209
|
+
.main-section figure { margin: 1.5em 0; padding: 0; text-align: center; }
|
|
210
|
+
.main-section figure img {
|
|
211
|
+
max-width: 100%;
|
|
212
|
+
height: auto;
|
|
213
|
+
border: 1px solid var(--iso-line);
|
|
214
|
+
border-radius: 6px;
|
|
215
|
+
background: #fff;
|
|
216
|
+
padding: 8px;
|
|
217
|
+
}
|
|
218
|
+
.main-section figcaption {
|
|
219
|
+
margin-top: 0.5em;
|
|
220
|
+
font-family: var(--font-sans);
|
|
221
|
+
font-size: 1em;
|
|
222
|
+
font-style: normal;
|
|
223
|
+
font-weight: 700;
|
|
224
|
+
color: var(--iso-ink);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* --- Formulae: number in parentheses at the right margin --- */
|
|
228
|
+
.main-section .formula-number { color: var(--iso-ink); font-weight: 400; font-family: inherit; }
|
|
229
|
+
|
|
230
|
+
/* --- Footnotes and bibliography --- */
|
|
231
|
+
.main-section .fn-marker .fn-link,
|
|
232
|
+
.main-section a.fn-link { color: var(--iso-link); }
|
|
233
|
+
.main-section .footnotes .footnote {
|
|
234
|
+
font-size: 0.8125em;
|
|
235
|
+
color: var(--iso-ink-soft);
|
|
236
|
+
border-top: 1px solid var(--iso-line-soft);
|
|
237
|
+
padding-top: 0.5em;
|
|
238
|
+
}
|
|
239
|
+
.main-section .biblio-entry {
|
|
240
|
+
border: 0;
|
|
241
|
+
font-size: 1em;
|
|
242
|
+
line-height: 1.62;
|
|
243
|
+
margin: 0 0 0.75em;
|
|
244
|
+
padding: 0 0 0 2.6em;
|
|
245
|
+
text-indent: -2.6em;
|
|
246
|
+
}
|
|
247
|
+
.main-section .biblio-ordinal {
|
|
248
|
+
display: inline-block;
|
|
249
|
+
min-width: 2.6em;
|
|
250
|
+
text-indent: 0;
|
|
251
|
+
color: var(--iso-link);
|
|
252
|
+
font-weight: 700;
|
|
253
|
+
font-variant-numeric: tabular-nums;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@media (max-width: 760px) {
|
|
257
|
+
.main-section table.table-block { min-width: 0; font-size: 0.84375em; }
|
|
258
|
+
.main-section table.table-block th,
|
|
259
|
+
.main-section table.table-block td { padding: 0.375em 0.5625em; }
|
|
260
|
+
.main-section .mn-labeled-list { padding-left: 1.4em; }
|
|
261
|
+
}
|
|
@@ -1,26 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
# Default ISO HTML theme: the house style of the consolidated ISO/IEC
|
|
2
|
+
# Directives online edition (iso.org/sites/directives). ISO/IEC Directives,
|
|
3
|
+
# Part 2, Clause 1 leaves typography and layout to the publisher's house
|
|
4
|
+
# style; the structural rules (numbering, labels, caption placement) come
|
|
5
|
+
# from the presentation XML. Element styles for the document body are in
|
|
6
|
+
# custom.css next to this file. The previous default is ../iso-legacy.
|
|
7
|
+
|
|
8
|
+
# Palette
|
|
9
|
+
primary: "#0b5aa2"
|
|
10
|
+
accent: "#0b5aa2"
|
|
11
|
+
accent_deep: "#094a86"
|
|
12
|
+
gradient: "linear-gradient(135deg, #094a86 0%, #0b5aa2 100%)"
|
|
13
|
+
primary_light: "#eaf2f9"
|
|
14
|
+
accent_light: "#eaf2f9"
|
|
15
|
+
primary_dark: "#094a86"
|
|
16
|
+
warm: "#c8102e"
|
|
17
|
+
warm_light: "#fdf3f4"
|
|
18
|
+
|
|
19
|
+
# Text and backgrounds
|
|
20
|
+
text_color: "#1a1d21"
|
|
21
|
+
text_light: "#454b52"
|
|
22
|
+
text_muted: "#6b7280"
|
|
23
|
+
bg: "#ffffff"
|
|
24
|
+
bg_light: "#f6f8fa"
|
|
25
|
+
border: "#e3e6ea"
|
|
26
|
+
sidebar_bg: "#fbfcfd"
|
|
27
|
+
|
|
28
|
+
# Typography: one sans-serif stack for body and headings, as on the
|
|
29
|
+
# Directives site. Roboto is loaded as the fallback where Segoe UI is absent.
|
|
30
|
+
font_body: '"Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif'
|
|
31
|
+
font_sans: '"Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif'
|
|
32
|
+
font_url: "https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,700;1,400;1,700&family=JetBrains+Mono:wght@400;500&display=swap"
|
|
33
|
+
|
|
34
|
+
# Layout
|
|
35
|
+
content_max_width: "60em"
|
|
36
|
+
sidebar_width: "340px"
|
|
37
|
+
|
|
38
|
+
# Blocks: notes and examples are plain small text (see custom.css)
|
|
39
|
+
note_color: "#6b7280"
|
|
40
|
+
note_bg: "transparent"
|
|
41
|
+
note_border: "transparent"
|
|
42
|
+
example_color: "#6b7280"
|
|
43
|
+
example_bg: "transparent"
|
|
44
|
+
example_border: "transparent"
|
|
45
|
+
admonition_color: "#c8102e"
|
|
46
|
+
admonition_bg: "#fdf3f4"
|
|
47
|
+
admonition_border: "#c8102e"
|
|
48
|
+
|
|
49
|
+
# Reader chrome and cover
|
|
50
|
+
header_background: "linear-gradient(135deg, #094a86 0%, #0b5aa2 100%)"
|
|
51
|
+
cover_background: "linear-gradient(175deg, #073a6b 0%, #094a86 45%, #0b5aa2 100%)"
|
|
52
|
+
cover_after_bg: "height: 3px; background: #c8102e"
|
|
53
|
+
progress_bar_color: "#0b5aa2"
|
|
54
|
+
footer_border_color: "#0b5aa2"
|
|
55
|
+
cover_separator_color: "rgba(255,255,255,0.25)"
|
|
56
|
+
|
|
57
|
+
# Dark mode (Directives site dark palette)
|
|
58
|
+
dark_bg: "#15181d"
|
|
59
|
+
dark_bg_light: "#1a1e24"
|
|
60
|
+
dark_border: "#333a44"
|
|
61
|
+
dark_sidebar: "#1a1e24"
|
|
62
|
+
dark_text: "#e6e9ee"
|
|
63
|
+
dark_text_light: "#c2c8d0"
|
|
64
|
+
dark_text_muted: "#9aa3ae"
|
|
65
|
+
dark_primary_light: "#21303f"
|
|
66
|
+
dark_accent_light: "#21303f"
|
|
67
|
+
dark_note_bg: "transparent"
|
|
68
|
+
dark_example_bg: "transparent"
|
|
69
|
+
dark_admonition_bg: "#2a1d21"
|
|
24
70
|
|
|
25
71
|
# Publisher metadata
|
|
26
72
|
publishers:
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Legacy ISO HTML theme: the previous default, kept so documents can still be
|
|
2
|
+
# rendered with the body typography of the legacy isodoc HTML output.
|
|
3
|
+
# Select it explicitly with Theme.load("iso-legacy"); the default ISO theme
|
|
4
|
+
# is the ISO Directives style in ../iso.
|
|
5
|
+
primary: "#b3000c"
|
|
6
|
+
accent: "#e3000f"
|
|
7
|
+
accent_deep: "#b3000c"
|
|
8
|
+
gradient: "linear-gradient(135deg, #8a0009 0%, #b3000c 50%, #e3000f 100%)"
|
|
9
|
+
primary_light: "#fef0f1"
|
|
10
|
+
accent_light: "#fde8ea"
|
|
11
|
+
warm: "#1a1a1a"
|
|
12
|
+
warm_light: "#f5f5f5"
|
|
13
|
+
header_background: "linear-gradient(135deg, #8a0009 0%, #b3000c 40%, #e3000f 100%)"
|
|
14
|
+
cover_background: "linear-gradient(175deg, #5a0006 0%, #8a0009 25%, #b3000c 50%, #e3000f 80%, #ff4d4d 100%)"
|
|
15
|
+
cover_before_bg: "background: radial-gradient(ellipse at 25% 20%, rgba(255,77,77,0.15) 0%, transparent 50%), radial-gradient(ellipse at 75% 80%, rgba(26,26,26,0.1) 0%, transparent 40%)"
|
|
16
|
+
cover_after_bg: "height: 3px; background: linear-gradient(90deg, transparent, #e3000f, #1a1a1a, transparent)"
|
|
17
|
+
progress_bar_color: "#e3000f"
|
|
18
|
+
note_border: "#e3000f"
|
|
19
|
+
note_bg: "#fde8ea"
|
|
20
|
+
note_color: "#e3000f"
|
|
21
|
+
example_border: "#b3000c"
|
|
22
|
+
example_bg: "#fef0f1"
|
|
23
|
+
example_color: "#b3000c"
|
|
24
|
+
admonition_border: "#1a1a1a"
|
|
25
|
+
admonition_color: "#1a1a1a"
|
|
26
|
+
footer_border_color: "#e3000f"
|
|
27
|
+
cover_separator_color: "rgba(227,0,15,0.25)"
|
|
28
|
+
|
|
29
|
+
# Publisher metadata
|
|
30
|
+
publishers:
|
|
31
|
+
- "ISO"
|
|
32
|
+
publisher_name: "ISO"
|
|
33
|
+
logos_light:
|
|
34
|
+
"ISO": "iso-logo.svg"
|
|
35
|
+
|
|
36
|
+
# Section ordering
|
|
37
|
+
preface_order:
|
|
38
|
+
- foreword
|
|
39
|
+
- introduction
|
|
40
|
+
- abstract
|
|
41
|
+
- clause
|
|
42
|
+
- acknowledgements
|
|
43
|
+
- executivesummary
|
|
44
|
+
toc_filter_types: []
|
|
45
|
+
|
|
46
|
+
# Reading-body typography follows the legacy default (non-alt) HTML output.
|
|
47
|
+
# Reader chrome and publisher cover branding retain the theme palette.
|
|
48
|
+
extra_css: |
|
|
49
|
+
.main-section {
|
|
50
|
+
font-family: Cambria, serif;
|
|
51
|
+
font-weight: 300;
|
|
52
|
+
line-height: 1.3;
|
|
53
|
+
}
|
|
54
|
+
:root:not([data-theme="dark"]) .main-section { color: #000; }
|
|
55
|
+
.main-section p { margin: 1em 0; }
|
|
56
|
+
.main-section h1, .main-section h2, .main-section h3,
|
|
57
|
+
.main-section h4, .main-section h5, .main-section h6 {
|
|
58
|
+
font-family: Cambria, serif;
|
|
59
|
+
font-weight: 700;
|
|
60
|
+
line-height: 1.2;
|
|
61
|
+
color: inherit;
|
|
62
|
+
margin: 2em 0 1em;
|
|
63
|
+
padding: 0;
|
|
64
|
+
border: 0;
|
|
65
|
+
letter-spacing: normal;
|
|
66
|
+
}
|
|
67
|
+
.main-section h1 { font-size: 1.5em; }
|
|
68
|
+
.main-section h2 { font-size: 1.2em; }
|
|
69
|
+
.main-section h1::after { content: none; }
|
data/metanorma-iso.gemspec
CHANGED
|
@@ -28,10 +28,12 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
spec.executables = %w[metanorma-iso-validate]
|
|
29
29
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
30
30
|
f.match(%r{^(test|spec|features|bin|.github)/}) \
|
|
31
|
-
|| f.match(%r{Rakefile|bin/rspec})
|
|
31
|
+
|| f.match(%r{Rakefile|bin/rspec}) \
|
|
32
|
+
|| f == "CLAUDE.md"
|
|
32
33
|
end
|
|
33
34
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.3.0")
|
|
34
35
|
|
|
36
|
+
spec.add_dependency "isodoc", "~> 3.7", ">= 3.7.21" # bibdata.* in Word headers (isodoc#917)
|
|
35
37
|
spec.add_dependency "metanorma-document", "~> 0.5.17" # the shared STS engine; 0.5.17 = fn-spacing + xref-label fixes (metanorma-document#202)
|
|
36
38
|
spec.add_dependency "metanorma-standoc", ">= 3.4.2" # relaxed until standoc#1232 releases
|
|
37
39
|
spec.add_dependency "mnconvert", "~> 1.14"
|
metadata
CHANGED
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-iso
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.5.
|
|
4
|
+
version: 3.5.36
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: isodoc
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '3.7'
|
|
20
|
+
- - ">="
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: 3.7.21
|
|
23
|
+
type: :runtime
|
|
24
|
+
prerelease: false
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
requirements:
|
|
27
|
+
- - "~>"
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '3.7'
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 3.7.21
|
|
13
33
|
- !ruby/object:Gem::Dependency
|
|
14
34
|
name: metanorma-document
|
|
15
35
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -366,7 +386,6 @@ files:
|
|
|
366
386
|
- ".rubocop.tb.yml"
|
|
367
387
|
- ".rubocop.yml"
|
|
368
388
|
- ".rubocop_todo.yml"
|
|
369
|
-
- CLAUDE.md
|
|
370
389
|
- CODE_OF_CONDUCT.md
|
|
371
390
|
- Gemfile
|
|
372
391
|
- LICENSE
|
|
@@ -824,8 +843,10 @@ files:
|
|
|
824
843
|
- lib/metanorma/iso/sts/transformer/term_transformer.rb
|
|
825
844
|
- lib/metanorma/iso/sts/validation_report.rb
|
|
826
845
|
- lib/metanorma/iso/sts/validator.rb
|
|
846
|
+
- lib/metanorma/iso/themes/iso-legacy/theme.yaml
|
|
827
847
|
- lib/metanorma/iso/themes/iso/assets/iso-logo.svg
|
|
828
848
|
- lib/metanorma/iso/themes/iso/assets/registry.css
|
|
849
|
+
- lib/metanorma/iso/themes/iso/custom.css
|
|
829
850
|
- lib/metanorma/iso/themes/iso/templates/index.html.liquid
|
|
830
851
|
- lib/metanorma/iso/themes/iso/theme.yaml
|
|
831
852
|
- lib/metanorma/iso/validate.rb
|
data/CLAUDE.md
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
|
-
## Tools
|
|
6
|
-
|
|
7
|
-
- Use `canon diff FILE1 FILE2` for semantic XML diffs. NEVER use `xmldiff` (it is broken — produces false structural diffs).
|
|
8
|
-
Canon is at `/Users/mulgogi/.local/share/mise/installs/ruby/3.4.8/bin/canon`. See `~/src/lutaml/canon/README.adoc` for full options.
|
|
9
|
-
Key flags: `--verbose` (detailed output), `--show-diffs normative` (only equivalence-affecting diffs),
|
|
10
|
-
`--diff-algorithm semantic`, `--text-content normalize`, `--structural-whitespace ignore`.
|
|
11
|
-
- **NEVER use Python.** Use Ruby for all scripting, analysis, and validation tasks.
|
|
12
|
-
|
|
13
|
-
## Overview
|
|
14
|
-
|
|
15
|
-
metanorma-iso is a Ruby gem that processes Metanorma AsciiDoc documents following ISO International Standard templates. It generates XML, HTML (standard + alt), Word (.doc), PDF, and STS output formats. It builds on top of metanorma-standoc and isodoc.
|
|
16
|
-
|
|
17
|
-
## Spec Safety Rules
|
|
18
|
-
|
|
19
|
-
- **NEVER run `bundle exec rake` or `bundle exec rspec` (full suite).** The full test suite causes memory leaks that crash the machine (Killed: 9). No exceptions.
|
|
20
|
-
- **NEVER run multiple spec files in one session.** Run ONE targeted spec file at a time, then wait for the process to fully exit before running another.
|
|
21
|
-
- **ALWAYS run a single spec file with a specific line number when possible.** Example: `bundle exec rspec spec/isodoc/docx/adapter_spec.rb:42`
|
|
22
|
-
- **NEVER run specs in parallel or in background tasks.** No `&` backgrounding, no multiple shell invocations.
|
|
23
|
-
- **If a spec process hangs or uses excessive memory, kill it immediately.** Do not let it run to completion.
|
|
24
|
-
- **For verification, prefer reading code over running specs.** Specs are for confirming a specific change works, not for broad exploration.
|
|
25
|
-
|
|
26
|
-
## Build and Test Commands
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
bundle install # install dependencies
|
|
30
|
-
# ONLY run individual spec files — NEVER the full suite:
|
|
31
|
-
bundle exec rspec spec/isodoc/docx/adapter_spec.rb:42 # single test by line number
|
|
32
|
-
bundle exec rspec spec/isodoc/docx/adapter_spec.rb # single file
|
|
33
|
-
bundle exec rubocop # lint
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Tests use VCR cassettes (in `spec/vcr_cassettes/`) for external HTTP interactions.
|
|
37
|
-
|
|
38
|
-
## Architecture
|
|
39
|
-
|
|
40
|
-
### Two-layer design: AsciiDoc parsing → Document rendering
|
|
41
|
-
|
|
42
|
-
**Layer 1: AsciiDoc → ISO XML** (`lib/metanorma/iso/`)
|
|
43
|
-
- `converter.rb` — Entry point. `Metanorma::Iso::Converter` extends `Standoc::Converter`, registered as the `:iso` backend
|
|
44
|
-
- `base.rb` — Output pipeline: generates `.xml`, then chains to presentation XML, HTML, Word, PDF converters
|
|
45
|
-
- `front.rb`, `front_id.rb`, `front_contributor.rb` — Metadata/bibliographic data extraction from AsciiDoc attributes (titles, stage, document ID via `pubid` gem)
|
|
46
|
-
- `cleanup.rb`, `cleanup_biblio.rb` — Post-processing of generated XML (footnote renumbering, ordered list cleanup, editorial group defaults, unpublished reference footnotes)
|
|
47
|
-
- `section.rb` — ISO-specific section parsing (scope, terms, patent notice)
|
|
48
|
-
- `validate.rb` + `validate_*.rb` — ISO-specific document validation (doctype, titles, section sequencing, cross-references, list formatting, style rules). Errors are logged via `log.rb` using keyed messages (ISO_1 through ISO_52)
|
|
49
|
-
- `processor.rb` — `Metanorma::Processor` subclass registering output formats (html, html_alt, doc, pdf, sts, isosts, presentation)
|
|
50
|
-
|
|
51
|
-
**Layer 2: ISO XML → Rendered output** (`lib/isodoc/iso/`)
|
|
52
|
-
- `base_convert.rb` — Shared rendering mixins (examples, tables, figures, admonitions) used by HTML and Word converters
|
|
53
|
-
- `html_convert.rb` — HTML output
|
|
54
|
-
- `word_convert.rb` — Word (.doc) output; `word_dis_convert.rb` handles distributed Word format
|
|
55
|
-
- `pdf_convert.rb` — PDF output
|
|
56
|
-
- `sts_convert.rb`, `isosts_convert.rb` — STS (ISO Standards Tag Set) XML output
|
|
57
|
-
- `presentation_xml_convert.rb` — Presentation XML (intermediate format); delegates to `presentation_*.rb` modules for bibdata, sections, terms, xrefs
|
|
58
|
-
- `xref.rb`, `xref_section.rb`, `xref_figure.rb` — Cross-reference generation
|
|
59
|
-
- `metadata.rb` — Document metadata extraction for rendering
|
|
60
|
-
- `i18n.rb` + `i18n-*.yaml` — Internationalization (en, fr, ru, de, ja, zh-Hans)
|
|
61
|
-
- `init.rb` — Factory methods for metadata, xref, i18n, and bib renderer instances
|
|
62
|
-
|
|
63
|
-
### Supporting modules
|
|
64
|
-
- `lib/metanorma/requirements/` — Requirements processing (modspec type)
|
|
65
|
-
- `lib/relaton/render/` — Bibliographic reference rendering with ISO-specific formatting and selective capitalization
|
|
66
|
-
- `lib/html2doc/lists.rb` — HTML-to-Word list conversion helper
|
|
67
|
-
|
|
68
|
-
### Document model ownership
|
|
69
|
-
|
|
70
|
-
The document model is split across three gems, each owning its own layer:
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
metanorma-document → Metanorma::Document (components), Metanorma::BasicDocument
|
|
74
|
-
metanorma-standoc → Metanorma::StandardDocument (generic standard document)
|
|
75
|
-
metanorma-iso → Metanorma::IsoDocument (ISO-specific extensions)
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
`Metanorma::IsoDocument` (Root, Sections, Metadata, Terms, Blocks, Boilerplate under `lib/metanorma/iso_document/`) is **canonical to this repository** — it lives here, not in metanorma-document. Flavor gems iterate on their own document model without waiting for upstream releases. Same pattern as metanorma-oiml owning its own document Root.
|
|
79
|
-
|
|
80
|
-
- `lib/metanorma/iso_document.rb` is the entry point: it requires `metanorma/document`, declares all autoloads with absolute `#{__dir__}` paths, and calls `Metanorma::Registers::Setup.setup_iso_register`.
|
|
81
|
-
- This gem's `lib/` precedes metanorma-document's `lib/` in `$LOAD_PATH`. metanorma-document still ships its own (older) IsoDocument tree for backwards compatibility — it is shadowed by this gem's canonical copy at runtime.
|
|
82
|
-
- Base classes (`Metanorma::StandardDocument`, `Metanorma::BasicDocument`, `Metanorma::Document::Components`) come from the metanorma-document gem at **released 0.4.0** (gemspec `~> 0.4.0`). That chain requires pubid 2.0.0.pre.alpha + relaton-bib 2.2.0.pre; the pubid-2 migration of the converter is DONE (see "pubid 2 migration" below).
|
|
83
|
-
- **Planned cleanup** (tracked in TODO.validate/): StandardDocument moves to metanorma-standoc, and metanorma-document shrinks to Document components only. IsoDocument disappears from metanorma-document entirely once StandardDocument lands in metanorma-standoc. Each step is a separate PR.
|
|
84
|
-
- Notable model changes vs the old 0.2.6 gem: `RawParagraph` removed (terms `<p>` parses directly into `ParagraphBlock`), `AmendContentBlock`/`Boilerplate`/`AnnotationContainer` are structured (no raw `content` string), several attributes went string→boolean (`docidentifier/@primary`, `references/@normative`, `clause/@inline_header` — compare with `.to_s == "true"` in code), and 0.4.0's `IsoPreface` no longer inherits `StandardDocument::Preface` (no `acknowledgements`/`executivesummary` mappings — guard consumers with `class.attributes.key?`).
|
|
85
|
-
|
|
86
|
-
### pubid 2 migration (pubid 2.0.0.pre.alpha)
|
|
87
|
-
pubid 2 is a rewrite: flavor modules with typed-component models, no `Identifier.create`, no universal `Registry.parse`, no `Pubid::Core::Errors`. Key API used here (`lib/metanorma/iso/front_id.rb`):
|
|
88
|
-
- Construction: flavor classes, e.g. `Pubid::Iso::Identifiers::InternationalStandard.new(number:, part:, date:, publisher:, copublishers:, languages:, typed_stage:)`. Type class via `Pubid::Iso.locate_type(code)`; typed stage via `Pubid::Iso.all_typed_stages.find { harmonized_stages.include?(code) && type_code == tc }` (60.60 = published: abbr "IS"/"TR"/...; visible abbreviation is the FIRST NON-EMPTY variant, e.g. published IS is `["", "IS"]`).
|
|
89
|
-
- Rendering: `id.to_s` (typed stages always shown; language form comes from the Language component's `original_code` — single char "E" for ref_num_short, ISO code "en" for ref_num_long); `id.to_urn` (2.x URN grammar: stage ABBR like `WD.3`/`FDIS`/`FDTS`, published stages omitted, versions as `v1.3`, explicit `:en`).
|
|
90
|
-
- `id.stage` is COMPUTED from `typed_stage` (`typed_stage.to_stage`) — never assign it.
|
|
91
|
-
- Errors: `Parslet::ParseFailed` (+ `ArgumentError` for over-long input); the 1.x `Pubid::Core::Errors` hierarchy is gone. Illegal stage codes must be raised explicitly (ISO_9 warning depends on it).
|
|
92
|
-
- CEN: `Pubid::CenCenelec` (e.g. `Identifiers::EuropeanNorm`, `AdoptedEuropeanNorm` with `adopted_identifier`).
|
|
93
|
-
- Known upstream gaps: pubid 2's grammar rejects the undated `:--` form (isodoc's `std_docid_semantic` regex-fallback covers annotation for those); `Pubid::Iso::Parser::ParseError` and `Pubid::Errors::ParseError` are referenced but not defined in pubid 2.0.0.pre.alpha.8.
|
|
94
|
-
|
|
95
|
-
### RNG Schemas
|
|
96
|
-
`lib/metanorma/iso/*.rng` — RelaxNG schemas for validating ISO XML. `isostandard-compile.rng` is the main schema; `isostandard-amd.rng` is used for amendments/technical corrigenda.
|
|
97
|
-
|
|
98
|
-
### Templates
|
|
99
|
-
- `lib/metanorma/iso/boilerplate*.adoc` — Boilerplate text (en, fr, ru) injected into documents
|
|
100
|
-
- `lib/isodoc/iso/html/` — HTML/SCSS templates and stylesheets for rendering
|
|
101
|
-
|
|
102
|
-
## DOCX Debugging Rules
|
|
103
|
-
|
|
104
|
-
- **The ZIP packaging is NEVER the problem.** The rubyzip output is proven correct (resaving a working DOCX through rubyzip produces a working DOCX). NEVER debug, investigate, or modify ZIP format code (zip_packager.rb, compression methods, ZIP version, Zip64, entry ordering). The bug is ALWAYS in the XML content.
|
|
105
|
-
- **NEVER use "shell swapping" or "part swapping" tests.** Replacing one DOCX file's XML parts with another's never fixes anything — the supporting files (styles, numbering, settings) are cross-referenced and must be consistent. Instead, audit and fix the actual XML content that the adapter generates.
|
|
106
|
-
- When a DOCX won't open, the bug is in the XML content, not the ZIP packaging. Audit the XML schemas, cross-references, and structural validity.
|
|
107
|
-
- Use `canon diff` or `uniword diff compare` to compare against the Word-repaired output (`*-repaired.docx`). The repaired file shows what Word considers correct.
|
|
108
|
-
- Compare against the known-working output (`data/iso-rice-sample-output.docx`) to find regressions.
|
|
109
|
-
- **NEVER run `bundle exec ruby` scripts that load the rice presentation XML model in background tasks.** Parsing the large XML causes memory exhaustion and process kills (Killed: 9). Use small targeted scripts or read the XML file directly instead.
|
|
110
|
-
|
|
111
|
-
## Key Patterns
|
|
112
|
-
|
|
113
|
-
- The converter class hierarchy is: `Standoc::Converter` → `Metanorma::Iso::Converter` (in `converter.rb` + `base.rb`). Validation and cleanup are in separate subclass modules (`Validate`, `Cleanup`) that extend their Standoc counterparts.
|
|
114
|
-
- ISO XML root tag is `iso-standard` with namespace `https://www.metanorma.org/ns/iso`.
|
|
115
|
-
- Document types: `international-standard`, `technical-specification`, `technical-report`, `publicly-available-specification`, `international-workshop-agreement`, `guide`, `amendment`, `technical-corrigendum`, `committee-document`, `addendum`, `recommendation`.
|
|
116
|
-
- Document schemes (1951, 1972, 1979, 1987, 1989, 2012, 2013, 2024) affect rendering rules; default is 2024.
|
|
117
|
-
- Amendments and technical corrigenda (`@amd`) skip many validations and have different processing paths.
|
|
118
|
-
- Vocabulary documents (`@vocab`, set via `docsubtype == "vocabulary"`) also have special handling.
|
|
119
|
-
- The `Gemfile.devel` file can override gem sources for local development (e.g., pointing to a local branch of isodoc).
|