metanorma-iho 0.7.14 → 0.8.0
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/iho/html_convert.rb +0 -17
- data/lib/isodoc/iho/iho.specification.xsl +37 -14
- data/lib/isodoc/iho/iho.standard.xsl +37 -14
- data/lib/isodoc/iho/presentation_xml_convert.rb +2 -0
- data/lib/metanorma/iho/isodoc.rng +26 -4
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e745ee37c741e2fbb8ad9398012b6211c61ed73e585ec78272538295fd23005
|
4
|
+
data.tar.gz: 0f9688d8696eaa1417ebb7d25053b902dcde60f316a5c87637f656d8355f7afa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c798099b130b2d7a6810aed66b1c553da76fbd9f8c9fbfe3018a8db05460b93073937502b89bfd2bee3e810b31910ffa0cf3619badf33b800ed01e6fb1ba5a2
|
7
|
+
data.tar.gz: dec07c7dd9ded93dd4eff6758eb699964967bc88a18a9d1bbac62a97d09851fc337baa8bbf4ebd7e1f3bcb7ac0820297cd2271c947df763d03a0543adf8e4524
|
@@ -12,23 +12,6 @@ module IsoDoc
|
|
12
12
|
Metanorma::IHO.configuration
|
13
13
|
end
|
14
14
|
|
15
|
-
=begin
|
16
|
-
def make_body3(body, docxml)
|
17
|
-
body.div **{ class: "main-section" } do |div3|
|
18
|
-
boilerplate docxml, div3
|
19
|
-
preface_block docxml, div3
|
20
|
-
abstract docxml, div3
|
21
|
-
foreword docxml, div3
|
22
|
-
introduction docxml, div3
|
23
|
-
preface docxml, div3
|
24
|
-
acknowledgements docxml, div3
|
25
|
-
middle docxml, div3
|
26
|
-
footnotes div3
|
27
|
-
comments div3
|
28
|
-
end
|
29
|
-
end
|
30
|
-
=end
|
31
|
-
|
32
15
|
include BaseConvert
|
33
16
|
include Init
|
34
17
|
end
|
@@ -4762,6 +4762,9 @@
|
|
4762
4762
|
<!-- END Definition List -->
|
4763
4763
|
<!-- ===================== -->
|
4764
4764
|
|
4765
|
+
<!-- default: ignore title in sections/p -->
|
4766
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]" priority="3"/>
|
4767
|
+
|
4765
4768
|
<!-- ========================= -->
|
4766
4769
|
<!-- Rich text formatting -->
|
4767
4770
|
<!-- ========================= -->
|
@@ -6914,25 +6917,45 @@
|
|
6914
6917
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
6915
6918
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
6916
6919
|
|
6917
|
-
<xsl:
|
6918
|
-
<xsl:
|
6919
|
-
<xsl:
|
6920
|
-
|
6921
|
-
|
6922
|
-
</xsl:variable>
|
6920
|
+
<xsl:if test="@width != '' and @width != 'auto'">
|
6921
|
+
<xsl:attribute name="width">
|
6922
|
+
<xsl:value-of select="@width"/>
|
6923
|
+
</xsl:attribute>
|
6924
|
+
</xsl:if>
|
6923
6925
|
|
6924
|
-
<xsl:
|
6926
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
6927
|
+
<xsl:attribute name="height">
|
6928
|
+
<xsl:value-of select="@height"/>
|
6929
|
+
</xsl:attribute>
|
6930
|
+
</xsl:if>
|
6925
6931
|
|
6926
|
-
|
6932
|
+
<xsl:choose>
|
6933
|
+
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
6934
|
+
<xsl:attribute name="scaling">non-uniform</xsl:attribute>
|
6935
|
+
</xsl:when>
|
6936
|
+
<xsl:otherwise>
|
6927
6937
|
|
6928
|
-
|
6938
|
+
<xsl:variable name="img_src">
|
6939
|
+
<xsl:choose>
|
6940
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
6941
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
6942
|
+
</xsl:choose>
|
6943
|
+
</xsl:variable>
|
6929
6944
|
|
6930
|
-
|
6931
|
-
<xsl:if test="number($scale) < 100">
|
6945
|
+
<xsl:variable name="image_width_effective">
|
6932
6946
|
|
6933
|
-
|
6947
|
+
<xsl:value-of select="$width_effective"/>
|
6934
6948
|
|
6935
|
-
|
6949
|
+
</xsl:variable>
|
6950
|
+
|
6951
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
6952
|
+
<xsl:if test="number($scale) < 100">
|
6953
|
+
|
6954
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
6955
|
+
|
6956
|
+
</xsl:if>
|
6957
|
+
</xsl:otherwise>
|
6958
|
+
</xsl:choose>
|
6936
6959
|
|
6937
6960
|
</xsl:if>
|
6938
6961
|
|
@@ -10586,7 +10609,7 @@
|
|
10586
10609
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
10587
10610
|
<xsl:apply-templates mode="update_xml_step1"/>
|
10588
10611
|
</xsl:template>
|
10589
|
-
<xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
10612
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]/*[local-name() = 'span'][@class] | *[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
10590
10613
|
<xsl:copy>
|
10591
10614
|
<xsl:copy-of select="@*"/>
|
10592
10615
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -4762,6 +4762,9 @@
|
|
4762
4762
|
<!-- END Definition List -->
|
4763
4763
|
<!-- ===================== -->
|
4764
4764
|
|
4765
|
+
<!-- default: ignore title in sections/p -->
|
4766
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]" priority="3"/>
|
4767
|
+
|
4765
4768
|
<!-- ========================= -->
|
4766
4769
|
<!-- Rich text formatting -->
|
4767
4770
|
<!-- ========================= -->
|
@@ -6914,25 +6917,45 @@
|
|
6914
6917
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
6915
6918
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
6916
6919
|
|
6917
|
-
<xsl:
|
6918
|
-
<xsl:
|
6919
|
-
<xsl:
|
6920
|
-
|
6921
|
-
|
6922
|
-
</xsl:variable>
|
6920
|
+
<xsl:if test="@width != '' and @width != 'auto'">
|
6921
|
+
<xsl:attribute name="width">
|
6922
|
+
<xsl:value-of select="@width"/>
|
6923
|
+
</xsl:attribute>
|
6924
|
+
</xsl:if>
|
6923
6925
|
|
6924
|
-
<xsl:
|
6926
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
6927
|
+
<xsl:attribute name="height">
|
6928
|
+
<xsl:value-of select="@height"/>
|
6929
|
+
</xsl:attribute>
|
6930
|
+
</xsl:if>
|
6925
6931
|
|
6926
|
-
|
6932
|
+
<xsl:choose>
|
6933
|
+
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
6934
|
+
<xsl:attribute name="scaling">non-uniform</xsl:attribute>
|
6935
|
+
</xsl:when>
|
6936
|
+
<xsl:otherwise>
|
6927
6937
|
|
6928
|
-
|
6938
|
+
<xsl:variable name="img_src">
|
6939
|
+
<xsl:choose>
|
6940
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
6941
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
6942
|
+
</xsl:choose>
|
6943
|
+
</xsl:variable>
|
6929
6944
|
|
6930
|
-
|
6931
|
-
<xsl:if test="number($scale) < 100">
|
6945
|
+
<xsl:variable name="image_width_effective">
|
6932
6946
|
|
6933
|
-
|
6947
|
+
<xsl:value-of select="$width_effective"/>
|
6934
6948
|
|
6935
|
-
|
6949
|
+
</xsl:variable>
|
6950
|
+
|
6951
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
6952
|
+
<xsl:if test="number($scale) < 100">
|
6953
|
+
|
6954
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
6955
|
+
|
6956
|
+
</xsl:if>
|
6957
|
+
</xsl:otherwise>
|
6958
|
+
</xsl:choose>
|
6936
6959
|
|
6937
6960
|
</xsl:if>
|
6938
6961
|
|
@@ -10586,7 +10609,7 @@
|
|
10586
10609
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
10587
10610
|
<xsl:apply-templates mode="update_xml_step1"/>
|
10588
10611
|
</xsl:template>
|
10589
|
-
<xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
10612
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]/*[local-name() = 'span'][@class] | *[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
10590
10613
|
<xsl:copy>
|
10591
10614
|
<xsl:copy-of select="@*"/>
|
10592
10615
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION v1.2.
|
20
|
+
<!-- VERSION v1.2.3 -->
|
21
21
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -192,9 +192,11 @@
|
|
192
192
|
</attribute>
|
193
193
|
</optional>
|
194
194
|
<attribute name="citeas"/>
|
195
|
-
<
|
196
|
-
<
|
197
|
-
|
195
|
+
<optional>
|
196
|
+
<attribute name="type">
|
197
|
+
<ref name="ReferenceFormat"/>
|
198
|
+
</attribute>
|
199
|
+
</optional>
|
198
200
|
<optional>
|
199
201
|
<attribute name="alt"/>
|
200
202
|
</optional>
|
@@ -836,6 +838,26 @@
|
|
836
838
|
<ref name="paragraph"/>
|
837
839
|
</element>
|
838
840
|
</define>
|
841
|
+
<define name="stem">
|
842
|
+
<element name="stem">
|
843
|
+
<attribute name="type">
|
844
|
+
<choice>
|
845
|
+
<value>MathML</value>
|
846
|
+
<value>AsciiMath</value>
|
847
|
+
<value>LatexMath</value>
|
848
|
+
</choice>
|
849
|
+
</attribute>
|
850
|
+
<attribute name="block">
|
851
|
+
<data type="boolean"/>
|
852
|
+
</attribute>
|
853
|
+
<oneOrMore>
|
854
|
+
<choice>
|
855
|
+
<text/>
|
856
|
+
<ref name="AnyElement"/>
|
857
|
+
</choice>
|
858
|
+
</oneOrMore>
|
859
|
+
</element>
|
860
|
+
</define>
|
839
861
|
<define name="em">
|
840
862
|
<element name="em">
|
841
863
|
<zeroOrMore>
|
data/metanorma-iho.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
29
29
|
|
30
|
-
spec.add_dependency "metanorma-generic", "~> 2.
|
30
|
+
spec.add_dependency "metanorma-generic", "~> 2.5.0"
|
31
31
|
|
32
32
|
spec.add_development_dependency "debug"
|
33
33
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07
|
11
|
+
date: 2023-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.5.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|