metanorma-iso 3.0.0 → 3.0.2
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/iso/base_convert.rb +2 -0
- data/lib/isodoc/iso/html/htmlstyle.css +12 -9
- data/lib/isodoc/iso/html/isodoc-dis.css +1152 -860
- data/lib/isodoc/iso/html/isodoc.css +376 -272
- data/lib/isodoc/iso/html/style-human.css +631 -381
- data/lib/isodoc/iso/html/style-human.scss +1 -1
- data/lib/isodoc/iso/html/style-iso.css +703 -430
- data/lib/isodoc/iso/html/style-iso.scss +1 -1
- data/lib/isodoc/iso/html/wordstyle-dis.css +686 -573
- data/lib/isodoc/iso/html/wordstyle.css +551 -465
- data/lib/isodoc/iso/i18n-fr.yaml +8 -8
- data/lib/isodoc/iso/iso.amendment.xsl +472 -212
- data/lib/isodoc/iso/iso.international-standard.xsl +472 -212
- data/lib/isodoc/iso/presentation_xml_convert.rb +11 -11
- data/lib/isodoc/iso/word_convert.rb +3 -0
- data/lib/metanorma/iso/basicdoc.rng +37 -32
- data/lib/metanorma/iso/isodoc.rng +32 -17
- data/lib/metanorma/iso/relaton-iso.rng +0 -22
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +3 -2
- metadata +24 -10
@@ -142,16 +142,6 @@ module IsoDoc
|
|
142
142
|
end
|
143
143
|
end
|
144
144
|
|
145
|
-
# def clause(docxml)
|
146
|
-
# docxml.xpath(ns("//clause[not(ancestor::annex)] | " \
|
147
|
-
# "//terms | //definitions | //references | " \
|
148
|
-
# "//preface/introduction[clause]")).each do |f|
|
149
|
-
# f.parent.name == "annex" &&
|
150
|
-
# @xrefs.klass.single_term_clause?(f.parent) and next
|
151
|
-
# clause1(f)
|
152
|
-
# end
|
153
|
-
# end
|
154
|
-
|
155
145
|
def admonition1(elem)
|
156
146
|
super
|
157
147
|
admonition_outside_clauses(elem)
|
@@ -209,7 +199,7 @@ module IsoDoc
|
|
209
199
|
if elem["class"] == "modspec"
|
210
200
|
if n = elem.at(ns(".//fmt-name"))
|
211
201
|
n.remove.name = "name"
|
212
|
-
|
202
|
+
elem.add_first_child(n)
|
213
203
|
end
|
214
204
|
elem.at(ns("./thead"))&.remove
|
215
205
|
super
|
@@ -319,6 +309,16 @@ module IsoDoc
|
|
319
309
|
true
|
320
310
|
end
|
321
311
|
|
312
|
+
def fn_ref_label(fnote)
|
313
|
+
if fnote.ancestors("table, figure").empty? ||
|
314
|
+
!fnote.ancestors("name, fmt-name").empty?
|
315
|
+
"<sup>#{fn_label(fnote)}" \
|
316
|
+
"<span class='fmt-label-delim'>)</span></sup>"
|
317
|
+
else
|
318
|
+
super
|
319
|
+
end
|
320
|
+
end
|
321
|
+
|
322
322
|
include Init
|
323
323
|
end
|
324
324
|
end
|
@@ -131,6 +131,7 @@ module IsoDoc
|
|
131
131
|
TOC
|
132
132
|
end
|
133
133
|
|
134
|
+
# KILL
|
134
135
|
def footnote_reference_format(link)
|
135
136
|
link.children =
|
136
137
|
"<span class='MsoFootnoteReference'>#{to_xml(link.children)}</span>)"
|
@@ -249,6 +250,8 @@ module IsoDoc
|
|
249
250
|
node.xpath(ns("./source")).each { |n| parse(n, out) }
|
250
251
|
node.xpath(ns("./note[not(@type = 'units')]"))
|
251
252
|
.each { |n| parse(n, out) }
|
253
|
+
node.xpath(ns("./fmt-footnote-container/fmt-fn-body"))
|
254
|
+
.each { |n| parse(n, out) }
|
252
255
|
end
|
253
256
|
|
254
257
|
include BaseConvert
|
@@ -599,17 +599,9 @@ It is included for convenience, in case processing the citation to extract the a
|
|
599
599
|
<a:documentation>The caption of the block</a:documentation>
|
600
600
|
</ref>
|
601
601
|
</optional>
|
602
|
-
<
|
603
|
-
<
|
604
|
-
|
605
|
-
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
606
|
-
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
607
|
-
</text>
|
608
|
-
<ref name="callout">
|
609
|
-
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
610
|
-
</ref>
|
611
|
-
</choice>
|
612
|
-
</oneOrMore>
|
602
|
+
<ref name="sourcecodebody">
|
603
|
+
<a:documentation>The sourcecode content</a:documentation>
|
604
|
+
</ref>
|
613
605
|
<zeroOrMore>
|
614
606
|
<ref name="annotation">
|
615
607
|
<a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
|
@@ -628,17 +620,9 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
628
620
|
<a:documentation>The caption of the block</a:documentation>
|
629
621
|
</ref>
|
630
622
|
</optional>
|
631
|
-
<
|
632
|
-
<
|
633
|
-
|
634
|
-
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
635
|
-
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
636
|
-
</text>
|
637
|
-
<ref name="callout">
|
638
|
-
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
639
|
-
</ref>
|
640
|
-
</choice>
|
641
|
-
</oneOrMore>
|
623
|
+
<ref name="sourcecodebody">
|
624
|
+
<a:documentation>The sourcecode content</a:documentation>
|
625
|
+
</ref>
|
642
626
|
<zeroOrMore>
|
643
627
|
<ref name="annotation">
|
644
628
|
<a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
|
@@ -651,6 +635,20 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
651
635
|
</ref>
|
652
636
|
</zeroOrMore>
|
653
637
|
</define>
|
638
|
+
<define name="sourcecodebody">
|
639
|
+
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
640
|
+
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
641
|
+
<element name="body">
|
642
|
+
<oneOrMore>
|
643
|
+
<choice>
|
644
|
+
<text/>
|
645
|
+
<ref name="callout">
|
646
|
+
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
647
|
+
</ref>
|
648
|
+
</choice>
|
649
|
+
</oneOrMore>
|
650
|
+
</element>
|
651
|
+
</define>
|
654
652
|
<define name="pre">
|
655
653
|
<a:documentation>Pre-formatted block. Wrapper for text to be rendered with fixed-width typeface, and preserving spaces including line breaks.
|
656
654
|
They are intended for a restricted number of functions, most typically ASCII Art (which is still in prominent use in some
|
@@ -1672,18 +1670,25 @@ which can be bookmarks as well as block or section references</a:documentation>
|
|
1672
1670
|
</optional>
|
1673
1671
|
</define>
|
1674
1672
|
<define name="XrefBody">
|
1675
|
-
<
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1673
|
+
<a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `<xx>my link text</xx>`)</a:documentation>
|
1674
|
+
<optional>
|
1675
|
+
<element name="display-text">
|
1676
|
+
<oneOrMore>
|
1677
|
+
<ref name="PureTextElement"/>
|
1678
|
+
</oneOrMore>
|
1679
|
+
</element>
|
1680
|
+
</optional>
|
1680
1681
|
</define>
|
1681
1682
|
<define name="ErefBody">
|
1682
|
-
<
|
1683
|
-
<
|
1684
|
-
<
|
1685
|
-
|
1686
|
-
|
1683
|
+
<optional>
|
1684
|
+
<element name="display-text">
|
1685
|
+
<oneOrMore>
|
1686
|
+
<ref name="PureTextElement">
|
1687
|
+
<a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `<xx>my link text</xx>`)</a:documentation>
|
1688
|
+
</ref>
|
1689
|
+
</oneOrMore>
|
1690
|
+
</element>
|
1691
|
+
</optional>
|
1687
1692
|
</define>
|
1688
1693
|
<define name="fn">
|
1689
1694
|
<a:documentation>Inline reference to a paragraph or paragraphs, appearing as a footnote.
|
@@ -33,6 +33,15 @@
|
|
33
33
|
</zeroOrMore>
|
34
34
|
</element>
|
35
35
|
</define>
|
36
|
+
<define name="fn" combine="interleave">
|
37
|
+
<optional>
|
38
|
+
<attribute name="hiddenref">
|
39
|
+
<a:documentation>If true, number the footnote as normal, but suppress display of the footnote reference in the document body.
|
40
|
+
This is done if the footnote reference is already presented in some other form, e.g. within a figure image.</a:documentation>
|
41
|
+
<data type="boolean"/>
|
42
|
+
</attribute>
|
43
|
+
</optional>
|
44
|
+
</define>
|
36
45
|
<define name="index-primary">
|
37
46
|
<element name="primary">
|
38
47
|
<oneOrMore>
|
@@ -245,23 +254,9 @@
|
|
245
254
|
<a:documentation>The caption of the block</a:documentation>
|
246
255
|
</ref>
|
247
256
|
</optional>
|
248
|
-
<
|
249
|
-
<
|
250
|
-
|
251
|
-
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
252
|
-
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
253
|
-
</text>
|
254
|
-
<ref name="callout">
|
255
|
-
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
256
|
-
</ref>
|
257
|
-
<ref name="xref">
|
258
|
-
<a:documentation>Hyperlink of code segment to another part of the document</a:documentation>
|
259
|
-
</ref>
|
260
|
-
<ref name="eref">
|
261
|
-
<a:documentation>Hyperlink of code segment to external bibliographic resource</a:documentation>
|
262
|
-
</ref>
|
263
|
-
</choice>
|
264
|
-
</oneOrMore>
|
257
|
+
<ref name="sourcecodebody">
|
258
|
+
<a:documentation>The sourcecode content</a:documentation>
|
259
|
+
</ref>
|
265
260
|
<zeroOrMore>
|
266
261
|
<ref name="annotation">
|
267
262
|
<a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
|
@@ -277,6 +272,26 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
277
272
|
<a:documentation>A source for the block</a:documentation>
|
278
273
|
</ref>
|
279
274
|
</define>
|
275
|
+
<define name="sourcecodebody">
|
276
|
+
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
277
|
+
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
278
|
+
<element name="body">
|
279
|
+
<oneOrMore>
|
280
|
+
<choice>
|
281
|
+
<text/>
|
282
|
+
<ref name="callout">
|
283
|
+
<a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
|
284
|
+
</ref>
|
285
|
+
<ref name="xref">
|
286
|
+
<a:documentation>Hyperlink of code segment to another part of the document</a:documentation>
|
287
|
+
</ref>
|
288
|
+
<ref name="eref">
|
289
|
+
<a:documentation>Hyperlink of code segment to external bibliographic resource</a:documentation>
|
290
|
+
</ref>
|
291
|
+
</choice>
|
292
|
+
</oneOrMore>
|
293
|
+
</element>
|
294
|
+
</define>
|
280
295
|
<define name="sections">
|
281
296
|
<element name="sections">
|
282
297
|
<oneOrMore>
|
@@ -63,14 +63,6 @@
|
|
63
63
|
</choice>
|
64
64
|
</element>
|
65
65
|
</define>
|
66
|
-
<define name="organization">
|
67
|
-
<element name="organization">
|
68
|
-
<choice>
|
69
|
-
<ref name="OrganizationType"/>
|
70
|
-
<ref name="IsoOrganizationType"/>
|
71
|
-
</choice>
|
72
|
-
</element>
|
73
|
-
</define>
|
74
66
|
<define name="DocumentType">
|
75
67
|
<choice>
|
76
68
|
<value>international-standard</value>
|
@@ -219,18 +211,4 @@
|
|
219
211
|
<text/>
|
220
212
|
</element>
|
221
213
|
</define>
|
222
|
-
<define name="IsoOrganizationType">
|
223
|
-
<optional>
|
224
|
-
<ref name="technical-committee"/>
|
225
|
-
</optional>
|
226
|
-
<optional>
|
227
|
-
<ref name="subcommittee"/>
|
228
|
-
</optional>
|
229
|
-
<optional>
|
230
|
-
<ref name="workgroup"/>
|
231
|
-
</optional>
|
232
|
-
<optional>
|
233
|
-
<ref name="secretariat"/>
|
234
|
-
</optional>
|
235
|
-
</define>
|
236
214
|
</grammar>
|
data/metanorma-iso.gemspec
CHANGED
@@ -44,8 +44,9 @@ Gem::Specification.new do |spec|
|
|
44
44
|
spec.add_development_dependency "iev", "~> 0.3.0"
|
45
45
|
spec.add_development_dependency "rake", "~> 13.0"
|
46
46
|
spec.add_development_dependency "rspec", "~> 3.6"
|
47
|
-
spec.add_development_dependency "rubocop", "~> 1
|
48
|
-
|
47
|
+
spec.add_development_dependency "rubocop", "~> 1"
|
48
|
+
spec.add_development_dependency "rubocop-performance"
|
49
|
+
spec.add_development_dependency "sassc-embedded", "~> 1"
|
49
50
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
50
51
|
spec.add_development_dependency "timecop", "~> 0.9"
|
51
52
|
spec.add_development_dependency "vcr", "~> 6.1.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|
@@ -170,28 +170,42 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 1
|
173
|
+
version: '1'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 1
|
180
|
+
version: '1'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
182
|
+
name: rubocop-performance
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- -
|
185
|
+
- - ">="
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version:
|
187
|
+
version: '0'
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- -
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: sassc-embedded
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '1'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
193
207
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
208
|
+
version: '1'
|
195
209
|
- !ruby/object:Gem::Dependency
|
196
210
|
name: simplecov
|
197
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -407,7 +421,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
407
421
|
- !ruby/object:Gem::Version
|
408
422
|
version: '0'
|
409
423
|
requirements: []
|
410
|
-
rubygems_version: 3.
|
424
|
+
rubygems_version: 3.5.22
|
411
425
|
signing_key:
|
412
426
|
specification_version: 4
|
413
427
|
summary: metanorma-iso lets you write ISO standards in AsciiDoc.
|