metanorma-iso 1.7.4 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iso/isodoc.rng +130 -1
- data/lib/isodoc/iso/html/style-human.css +7 -0
- data/lib/isodoc/iso/html/style-iso.css +7 -0
- data/lib/isodoc/iso/html_convert.rb +0 -1
- data/lib/isodoc/iso/iso.amendment.xsl +89 -24
- data/lib/isodoc/iso/iso.international-standard.xsl +89 -24
- data/lib/isodoc/iso/presentation_xml_convert.rb +31 -21
- data/lib/isodoc/iso/word_convert.rb +0 -1
- data/lib/isodoc/iso/xref.rb +8 -5
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +7 -7
- data/spec/isodoc/postproc_spec.rb +8 -6
- metadata +45 -46
- data/lib/isodoc/iso/html/scripts.html +0 -178
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e2e7e19a42e3aeb8a036946cd7a312df8887f9a68a9f0b159399c4a2285f636
|
4
|
+
data.tar.gz: 229cbacc6397cdf692b6294d4f46b88a22ad39a18b80e29be3d85f37c1eeb203
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcfbfd49e84b5127ccb0f4cca2777803ea5a560e60267ccd8e077c7a8b68052f38499a2662f3dfea06641f2a8f278525ebc0118ccef63715bf6e4e1f90badbde
|
7
|
+
data.tar.gz: 003f5ae00770eeb488ca7adf2c13a611bb8a79425f223f07ed765fc5b2333e2700c7e27fa720ce8cfbcfd55750dd633f1f035f46026e792cab5d0fa0c83e7c72
|
@@ -86,6 +86,35 @@
|
|
86
86
|
<text/>
|
87
87
|
</element>
|
88
88
|
</define>
|
89
|
+
<define name="erefType">
|
90
|
+
<optional>
|
91
|
+
<attribute name="normative">
|
92
|
+
<data type="boolean"/>
|
93
|
+
</attribute>
|
94
|
+
</optional>
|
95
|
+
<attribute name="citeas"/>
|
96
|
+
<attribute name="type">
|
97
|
+
<ref name="ReferenceFormat"/>
|
98
|
+
</attribute>
|
99
|
+
<optional>
|
100
|
+
<attribute name="alt"/>
|
101
|
+
</optional>
|
102
|
+
<optional>
|
103
|
+
<attribute name="case">
|
104
|
+
<choice>
|
105
|
+
<value>capital</value>
|
106
|
+
<value>lowercase</value>
|
107
|
+
</choice>
|
108
|
+
</attribute>
|
109
|
+
</optional>
|
110
|
+
<optional>
|
111
|
+
<attribute name="droploc">
|
112
|
+
<data type="boolean"/>
|
113
|
+
</attribute>
|
114
|
+
</optional>
|
115
|
+
<ref name="CitationType"/>
|
116
|
+
<text/>
|
117
|
+
</define>
|
89
118
|
<define name="ul">
|
90
119
|
<element name="ul">
|
91
120
|
<attribute name="id">
|
@@ -775,6 +804,78 @@
|
|
775
804
|
<ref name="paragraph"/>
|
776
805
|
</element>
|
777
806
|
</define>
|
807
|
+
<define name="em">
|
808
|
+
<element name="em">
|
809
|
+
<zeroOrMore>
|
810
|
+
<choice>
|
811
|
+
<ref name="PureTextElement"/>
|
812
|
+
<ref name="stem"/>
|
813
|
+
<ref name="index"/>
|
814
|
+
</choice>
|
815
|
+
</zeroOrMore>
|
816
|
+
</element>
|
817
|
+
</define>
|
818
|
+
<define name="strong">
|
819
|
+
<element name="strong">
|
820
|
+
<zeroOrMore>
|
821
|
+
<choice>
|
822
|
+
<ref name="PureTextElement"/>
|
823
|
+
<ref name="stem"/>
|
824
|
+
<ref name="index"/>
|
825
|
+
</choice>
|
826
|
+
</zeroOrMore>
|
827
|
+
</element>
|
828
|
+
</define>
|
829
|
+
<define name="tt">
|
830
|
+
<element name="tt">
|
831
|
+
<zeroOrMore>
|
832
|
+
<choice>
|
833
|
+
<ref name="PureTextElement"/>
|
834
|
+
<ref name="index"/>
|
835
|
+
</choice>
|
836
|
+
</zeroOrMore>
|
837
|
+
</element>
|
838
|
+
</define>
|
839
|
+
<define name="keyword">
|
840
|
+
<element name="keyword">
|
841
|
+
<zeroOrMore>
|
842
|
+
<choice>
|
843
|
+
<ref name="PureTextElement"/>
|
844
|
+
<ref name="index"/>
|
845
|
+
</choice>
|
846
|
+
</zeroOrMore>
|
847
|
+
</element>
|
848
|
+
</define>
|
849
|
+
<define name="strike">
|
850
|
+
<element name="strike">
|
851
|
+
<zeroOrMore>
|
852
|
+
<choice>
|
853
|
+
<ref name="PureTextElement"/>
|
854
|
+
<ref name="index"/>
|
855
|
+
</choice>
|
856
|
+
</zeroOrMore>
|
857
|
+
</element>
|
858
|
+
</define>
|
859
|
+
<define name="underline">
|
860
|
+
<element name="underline">
|
861
|
+
<zeroOrMore>
|
862
|
+
<choice>
|
863
|
+
<ref name="PureTextElement"/>
|
864
|
+
<ref name="index"/>
|
865
|
+
</choice>
|
866
|
+
</zeroOrMore>
|
867
|
+
</element>
|
868
|
+
</define>
|
869
|
+
<define name="smallcap">
|
870
|
+
<element name="smallcap">
|
871
|
+
<zeroOrMore>
|
872
|
+
<choice>
|
873
|
+
<ref name="PureTextElement"/>
|
874
|
+
<ref name="index"/>
|
875
|
+
</choice>
|
876
|
+
</zeroOrMore>
|
877
|
+
</element>
|
878
|
+
</define>
|
778
879
|
</include>
|
779
880
|
<!-- end overrides -->
|
780
881
|
<define name="colgroup">
|
@@ -793,7 +894,35 @@
|
|
793
894
|
<value>internal</value>
|
794
895
|
</define>
|
795
896
|
<define name="TextElement" combine="choice">
|
796
|
-
<
|
897
|
+
<choice>
|
898
|
+
<ref name="concept"/>
|
899
|
+
<ref name="add"/>
|
900
|
+
<ref name="del"/>
|
901
|
+
</choice>
|
902
|
+
</define>
|
903
|
+
<define name="add">
|
904
|
+
<element name="add">
|
905
|
+
<choice>
|
906
|
+
<ref name="PureTextElement"/>
|
907
|
+
<ref name="eref"/>
|
908
|
+
<ref name="stem"/>
|
909
|
+
<ref name="keyword"/>
|
910
|
+
<ref name="xref"/>
|
911
|
+
<ref name="hyperlink"/>
|
912
|
+
</choice>
|
913
|
+
</element>
|
914
|
+
</define>
|
915
|
+
<define name="del">
|
916
|
+
<element name="del">
|
917
|
+
<choice>
|
918
|
+
<ref name="PureTextElement"/>
|
919
|
+
<ref name="eref"/>
|
920
|
+
<ref name="stem"/>
|
921
|
+
<ref name="keyword"/>
|
922
|
+
<ref name="xref"/>
|
923
|
+
<ref name="hyperlink"/>
|
924
|
+
</choice>
|
925
|
+
</element>
|
797
926
|
</define>
|
798
927
|
<define name="concept">
|
799
928
|
<element name="concept">
|
@@ -115,6 +115,13 @@ a.FootnoteRef + a.FootnoteRef:before {
|
|
115
115
|
content: ", ";
|
116
116
|
vertical-align: super; }
|
117
117
|
|
118
|
+
.addition {
|
119
|
+
color: blue; }
|
120
|
+
|
121
|
+
.deletion {
|
122
|
+
color: red;
|
123
|
+
text-decoration: line-through; }
|
124
|
+
|
118
125
|
#standard-band {
|
119
126
|
background-color: #0AC442; }
|
120
127
|
|
@@ -115,6 +115,13 @@ a.FootnoteRef + a.FootnoteRef:before {
|
|
115
115
|
content: ", ";
|
116
116
|
vertical-align: super; }
|
117
117
|
|
118
|
+
.addition {
|
119
|
+
color: blue; }
|
120
|
+
|
121
|
+
.deletion {
|
122
|
+
color: red;
|
123
|
+
text-decoration: line-through; }
|
124
|
+
|
118
125
|
#standard-band {
|
119
126
|
background-color: #0AC442; }
|
120
127
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java" version="1.0">
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java" version="1.0">
|
2
2
|
|
3
3
|
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
@@ -1964,7 +1964,24 @@
|
|
1964
1964
|
<!-- SVG images processing -->
|
1965
1965
|
<!-- =================== -->
|
1966
1966
|
<xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image']) and *[local-name() = 'svg']]/*[local-name() = 'name']/*[local-name() = 'bookmark']" priority="2"/>
|
1967
|
-
<xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image'])]/*[local-name() = 'svg']" priority="2">
|
1967
|
+
<xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image'])]/*[local-name() = 'svg']" priority="2" name="image_svg">
|
1968
|
+
<xsl:param name="name"/>
|
1969
|
+
|
1970
|
+
<xsl:variable name="svg_content">
|
1971
|
+
<xsl:apply-templates select="." mode="svg_update"/>
|
1972
|
+
</xsl:variable>
|
1973
|
+
|
1974
|
+
<xsl:variable name="alt-text">
|
1975
|
+
<xsl:choose>
|
1976
|
+
<xsl:when test="normalize-space(../*[local-name() = 'name']) != ''">
|
1977
|
+
<xsl:value-of select="../*[local-name() = 'name']"/>
|
1978
|
+
</xsl:when>
|
1979
|
+
<xsl:when test="normalize-space($name) != ''">
|
1980
|
+
<xsl:value-of select="$name"/>
|
1981
|
+
</xsl:when>
|
1982
|
+
<xsl:otherwise>Figure</xsl:otherwise>
|
1983
|
+
</xsl:choose>
|
1984
|
+
</xsl:variable>
|
1968
1985
|
|
1969
1986
|
<xsl:choose>
|
1970
1987
|
<xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
|
@@ -2021,13 +2038,14 @@
|
|
2021
2038
|
</fo:block>
|
2022
2039
|
</xsl:if>
|
2023
2040
|
<fo:block text-depth="0" line-height="0" font-size="0">
|
2024
|
-
|
2041
|
+
|
2042
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
2025
2043
|
<xsl:attribute name="width">100%</xsl:attribute>
|
2026
2044
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
2027
2045
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
2028
2046
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2029
2047
|
|
2030
|
-
<xsl:apply-templates select="
|
2048
|
+
<xsl:apply-templates select="xalan:nodeset($svg_content)" mode="svg_remove_a"/>
|
2031
2049
|
</fo:instream-foreign-object>
|
2032
2050
|
</fo:block>
|
2033
2051
|
|
@@ -2045,7 +2063,7 @@
|
|
2045
2063
|
</xsl:when>
|
2046
2064
|
<xsl:otherwise>
|
2047
2065
|
<fo:block xsl:use-attribute-sets="image-style">
|
2048
|
-
<fo:instream-foreign-object fox:alt-text="{
|
2066
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
2049
2067
|
<xsl:attribute name="width">100%</xsl:attribute>
|
2050
2068
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
2051
2069
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
@@ -2057,13 +2075,35 @@
|
|
2057
2075
|
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
2058
2076
|
</xsl:if>
|
2059
2077
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2060
|
-
<xsl:copy-of select="
|
2078
|
+
<xsl:copy-of select="$svg_content"/>
|
2061
2079
|
</fo:instream-foreign-object>
|
2062
2080
|
</fo:block>
|
2063
2081
|
</xsl:otherwise>
|
2064
2082
|
</xsl:choose>
|
2065
2083
|
</xsl:template>
|
2066
2084
|
|
2085
|
+
<xsl:template match="@*|node()" mode="svg_update">
|
2086
|
+
<xsl:copy>
|
2087
|
+
<xsl:apply-templates select="@*|node()" mode="svg_update"/>
|
2088
|
+
</xsl:copy>
|
2089
|
+
</xsl:template>
|
2090
|
+
|
2091
|
+
<xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
2092
|
+
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
2093
|
+
<xsl:value-of select="."/>
|
2094
|
+
</xsl:attribute>
|
2095
|
+
</xsl:template>
|
2096
|
+
|
2097
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
2098
|
+
<xsl:variable name="svg_content" select="document(@src)"/>
|
2099
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
2100
|
+
<xsl:for-each select="xalan:nodeset($svg_content)/node()">
|
2101
|
+
<xsl:call-template name="image_svg">
|
2102
|
+
<xsl:with-param name="name" select="$name"/>
|
2103
|
+
</xsl:call-template>
|
2104
|
+
</xsl:for-each>
|
2105
|
+
</xsl:template>
|
2106
|
+
|
2067
2107
|
<xsl:template match="@*|node()" mode="svg_remove_a">
|
2068
2108
|
<xsl:copy>
|
2069
2109
|
<xsl:apply-templates select="@*|node()" mode="svg_remove_a"/>
|
@@ -2993,7 +3033,7 @@
|
|
2993
3033
|
|
2994
3034
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
2995
3035
|
|
2996
|
-
|
3036
|
+
|
2997
3037
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
2998
3038
|
|
2999
3039
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
@@ -3001,6 +3041,12 @@
|
|
3001
3041
|
|
3002
3042
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3003
3043
|
|
3044
|
+
</xsl:attribute-set><xsl:attribute-set name="add-style">
|
3045
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
3046
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3047
|
+
</xsl:attribute-set><xsl:attribute-set name="del-style">
|
3048
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
3049
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
3004
3050
|
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
3005
3051
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
3006
3052
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
@@ -4452,8 +4498,12 @@
|
|
4452
4498
|
<fo:inline text-decoration="underline">
|
4453
4499
|
<xsl:apply-templates/>
|
4454
4500
|
</fo:inline>
|
4501
|
+
</xsl:template><xsl:template match="*[local-name()='add']">
|
4502
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
4503
|
+
<xsl:apply-templates/>
|
4504
|
+
</fo:inline>
|
4455
4505
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
4456
|
-
<fo:inline
|
4506
|
+
<fo:inline xsl:use-attribute-sets="del-style">
|
4457
4507
|
<xsl:apply-templates/>
|
4458
4508
|
</fo:inline>
|
4459
4509
|
</xsl:template><xsl:template match="*[local-name()='hi']">
|
@@ -5067,22 +5117,37 @@
|
|
5067
5117
|
<xsl:apply-templates/>
|
5068
5118
|
</fo:block>
|
5069
5119
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
5070
|
-
<
|
5071
|
-
|
5072
|
-
|
5073
|
-
|
5074
|
-
|
5075
|
-
|
5076
|
-
|
5077
|
-
|
5078
|
-
|
5079
|
-
|
5080
|
-
|
5081
|
-
|
5082
|
-
|
5083
|
-
|
5084
|
-
|
5085
|
-
|
5120
|
+
<xsl:choose>
|
5121
|
+
<xsl:when test="ancestor::*[local-name() = 'title']">
|
5122
|
+
<fo:inline padding-left="1mm" padding-right="1mm">
|
5123
|
+
<xsl:variable name="src">
|
5124
|
+
<xsl:call-template name="image_src"/>
|
5125
|
+
</xsl:variable>
|
5126
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
5127
|
+
</fo:inline>
|
5128
|
+
</xsl:when>
|
5129
|
+
<xsl:otherwise>
|
5130
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
5131
|
+
|
5132
|
+
<xsl:variable name="src">
|
5133
|
+
<xsl:call-template name="image_src"/>
|
5134
|
+
</xsl:variable>
|
5135
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
5136
|
+
</fo:block>
|
5137
|
+
</xsl:otherwise>
|
5138
|
+
</xsl:choose>
|
5139
|
+
</xsl:template><xsl:template name="image_src">
|
5140
|
+
<xsl:choose>
|
5141
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
5142
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
5143
|
+
</xsl:when>
|
5144
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
5145
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
5146
|
+
</xsl:when>
|
5147
|
+
<xsl:otherwise>
|
5148
|
+
<xsl:value-of select="@src"/>
|
5149
|
+
</xsl:otherwise>
|
5150
|
+
</xsl:choose>
|
5086
5151
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
5087
5152
|
<xsl:apply-templates mode="contents"/>
|
5088
5153
|
<xsl:text> </xsl:text>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java" version="1.0">
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java" version="1.0">
|
2
2
|
|
3
3
|
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
@@ -1964,7 +1964,24 @@
|
|
1964
1964
|
<!-- SVG images processing -->
|
1965
1965
|
<!-- =================== -->
|
1966
1966
|
<xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image']) and *[local-name() = 'svg']]/*[local-name() = 'name']/*[local-name() = 'bookmark']" priority="2"/>
|
1967
|
-
<xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image'])]/*[local-name() = 'svg']" priority="2">
|
1967
|
+
<xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image'])]/*[local-name() = 'svg']" priority="2" name="image_svg">
|
1968
|
+
<xsl:param name="name"/>
|
1969
|
+
|
1970
|
+
<xsl:variable name="svg_content">
|
1971
|
+
<xsl:apply-templates select="." mode="svg_update"/>
|
1972
|
+
</xsl:variable>
|
1973
|
+
|
1974
|
+
<xsl:variable name="alt-text">
|
1975
|
+
<xsl:choose>
|
1976
|
+
<xsl:when test="normalize-space(../*[local-name() = 'name']) != ''">
|
1977
|
+
<xsl:value-of select="../*[local-name() = 'name']"/>
|
1978
|
+
</xsl:when>
|
1979
|
+
<xsl:when test="normalize-space($name) != ''">
|
1980
|
+
<xsl:value-of select="$name"/>
|
1981
|
+
</xsl:when>
|
1982
|
+
<xsl:otherwise>Figure</xsl:otherwise>
|
1983
|
+
</xsl:choose>
|
1984
|
+
</xsl:variable>
|
1968
1985
|
|
1969
1986
|
<xsl:choose>
|
1970
1987
|
<xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
|
@@ -2021,13 +2038,14 @@
|
|
2021
2038
|
</fo:block>
|
2022
2039
|
</xsl:if>
|
2023
2040
|
<fo:block text-depth="0" line-height="0" font-size="0">
|
2024
|
-
|
2041
|
+
|
2042
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
2025
2043
|
<xsl:attribute name="width">100%</xsl:attribute>
|
2026
2044
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
2027
2045
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
2028
2046
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2029
2047
|
|
2030
|
-
<xsl:apply-templates select="
|
2048
|
+
<xsl:apply-templates select="xalan:nodeset($svg_content)" mode="svg_remove_a"/>
|
2031
2049
|
</fo:instream-foreign-object>
|
2032
2050
|
</fo:block>
|
2033
2051
|
|
@@ -2045,7 +2063,7 @@
|
|
2045
2063
|
</xsl:when>
|
2046
2064
|
<xsl:otherwise>
|
2047
2065
|
<fo:block xsl:use-attribute-sets="image-style">
|
2048
|
-
<fo:instream-foreign-object fox:alt-text="{
|
2066
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
2049
2067
|
<xsl:attribute name="width">100%</xsl:attribute>
|
2050
2068
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
2051
2069
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
@@ -2057,13 +2075,35 @@
|
|
2057
2075
|
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
2058
2076
|
</xsl:if>
|
2059
2077
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2060
|
-
<xsl:copy-of select="
|
2078
|
+
<xsl:copy-of select="$svg_content"/>
|
2061
2079
|
</fo:instream-foreign-object>
|
2062
2080
|
</fo:block>
|
2063
2081
|
</xsl:otherwise>
|
2064
2082
|
</xsl:choose>
|
2065
2083
|
</xsl:template>
|
2066
2084
|
|
2085
|
+
<xsl:template match="@*|node()" mode="svg_update">
|
2086
|
+
<xsl:copy>
|
2087
|
+
<xsl:apply-templates select="@*|node()" mode="svg_update"/>
|
2088
|
+
</xsl:copy>
|
2089
|
+
</xsl:template>
|
2090
|
+
|
2091
|
+
<xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
2092
|
+
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
2093
|
+
<xsl:value-of select="."/>
|
2094
|
+
</xsl:attribute>
|
2095
|
+
</xsl:template>
|
2096
|
+
|
2097
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
2098
|
+
<xsl:variable name="svg_content" select="document(@src)"/>
|
2099
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
2100
|
+
<xsl:for-each select="xalan:nodeset($svg_content)/node()">
|
2101
|
+
<xsl:call-template name="image_svg">
|
2102
|
+
<xsl:with-param name="name" select="$name"/>
|
2103
|
+
</xsl:call-template>
|
2104
|
+
</xsl:for-each>
|
2105
|
+
</xsl:template>
|
2106
|
+
|
2067
2107
|
<xsl:template match="@*|node()" mode="svg_remove_a">
|
2068
2108
|
<xsl:copy>
|
2069
2109
|
<xsl:apply-templates select="@*|node()" mode="svg_remove_a"/>
|
@@ -2993,7 +3033,7 @@
|
|
2993
3033
|
|
2994
3034
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
2995
3035
|
|
2996
|
-
|
3036
|
+
|
2997
3037
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
2998
3038
|
|
2999
3039
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
@@ -3001,6 +3041,12 @@
|
|
3001
3041
|
|
3002
3042
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3003
3043
|
|
3044
|
+
</xsl:attribute-set><xsl:attribute-set name="add-style">
|
3045
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
3046
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3047
|
+
</xsl:attribute-set><xsl:attribute-set name="del-style">
|
3048
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
3049
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
3004
3050
|
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
3005
3051
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
3006
3052
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
@@ -4452,8 +4498,12 @@
|
|
4452
4498
|
<fo:inline text-decoration="underline">
|
4453
4499
|
<xsl:apply-templates/>
|
4454
4500
|
</fo:inline>
|
4501
|
+
</xsl:template><xsl:template match="*[local-name()='add']">
|
4502
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
4503
|
+
<xsl:apply-templates/>
|
4504
|
+
</fo:inline>
|
4455
4505
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
4456
|
-
<fo:inline
|
4506
|
+
<fo:inline xsl:use-attribute-sets="del-style">
|
4457
4507
|
<xsl:apply-templates/>
|
4458
4508
|
</fo:inline>
|
4459
4509
|
</xsl:template><xsl:template match="*[local-name()='hi']">
|
@@ -5067,22 +5117,37 @@
|
|
5067
5117
|
<xsl:apply-templates/>
|
5068
5118
|
</fo:block>
|
5069
5119
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
5070
|
-
<
|
5071
|
-
|
5072
|
-
|
5073
|
-
|
5074
|
-
|
5075
|
-
|
5076
|
-
|
5077
|
-
|
5078
|
-
|
5079
|
-
|
5080
|
-
|
5081
|
-
|
5082
|
-
|
5083
|
-
|
5084
|
-
|
5085
|
-
|
5120
|
+
<xsl:choose>
|
5121
|
+
<xsl:when test="ancestor::*[local-name() = 'title']">
|
5122
|
+
<fo:inline padding-left="1mm" padding-right="1mm">
|
5123
|
+
<xsl:variable name="src">
|
5124
|
+
<xsl:call-template name="image_src"/>
|
5125
|
+
</xsl:variable>
|
5126
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
5127
|
+
</fo:inline>
|
5128
|
+
</xsl:when>
|
5129
|
+
<xsl:otherwise>
|
5130
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
5131
|
+
|
5132
|
+
<xsl:variable name="src">
|
5133
|
+
<xsl:call-template name="image_src"/>
|
5134
|
+
</xsl:variable>
|
5135
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
5136
|
+
</fo:block>
|
5137
|
+
</xsl:otherwise>
|
5138
|
+
</xsl:choose>
|
5139
|
+
</xsl:template><xsl:template name="image_src">
|
5140
|
+
<xsl:choose>
|
5141
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
5142
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
5143
|
+
</xsl:when>
|
5144
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
5145
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
5146
|
+
</xsl:when>
|
5147
|
+
<xsl:otherwise>
|
5148
|
+
<xsl:value-of select="@src"/>
|
5149
|
+
</xsl:otherwise>
|
5150
|
+
</xsl:choose>
|
5086
5151
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
5087
5152
|
<xsl:apply-templates mode="contents"/>
|
5088
5153
|
<xsl:text> </xsl:text>
|
@@ -5,10 +5,6 @@ require_relative "index"
|
|
5
5
|
module IsoDoc
|
6
6
|
module Iso
|
7
7
|
class PresentationXMLConvert < IsoDoc::PresentationXMLConvert
|
8
|
-
def initialize(options)
|
9
|
-
super
|
10
|
-
end
|
11
|
-
|
12
8
|
def convert1(docxml, filename, dir)
|
13
9
|
if amd(docxml)
|
14
10
|
@oldsuppressheadingnumbers = @suppressheadingnumbers
|
@@ -32,7 +28,8 @@ module IsoDoc
|
|
32
28
|
|
33
29
|
def figure1(f)
|
34
30
|
return if labelled_ancestor(f) && f.ancestors("figure").empty?
|
35
|
-
|
31
|
+
|
32
|
+
lbl = @xrefs.anchor(f["id"], :label, false) or return
|
36
33
|
figname = f.parent.name == "figure" ? "" : "#{@i18n.figure} "
|
37
34
|
connective = f.parent.name == "figure" ? " " : " — "
|
38
35
|
prefix_name(f, connective, l10n("#{figname}#{lbl}"), "name")
|
@@ -40,33 +37,45 @@ module IsoDoc
|
|
40
37
|
|
41
38
|
def example1(f)
|
42
39
|
n = @xrefs.get[f["id"]]
|
43
|
-
lbl =
|
44
|
-
|
40
|
+
lbl = if n.nil? || n[:label].nil? || n[:label].empty?
|
41
|
+
@i18n.example
|
42
|
+
else
|
43
|
+
l10n("#{@i18n.example} #{n[:label]}")
|
44
|
+
end
|
45
45
|
prefix_name(f, " — ", lbl, "name")
|
46
46
|
end
|
47
47
|
|
48
|
-
def eref_localities1_zh(target, type, from, to, delim)
|
48
|
+
def eref_localities1_zh(target, type, from, to, n, delim)
|
49
49
|
subsection = from&.text&.match(/\./)
|
50
|
-
ret =
|
50
|
+
ret = if delim == ";"
|
51
|
+
";"
|
52
|
+
else
|
53
|
+
type == "list" ? "" : delim
|
54
|
+
end
|
51
55
|
ret += " 第#{from.text}" if from
|
52
56
|
ret += "–#{to.text}" if to
|
53
|
-
loc = (@i18n.locality[type] || type.sub(/^locality:/, "").capitalize
|
57
|
+
loc = (@i18n.locality[type] || type.sub(/^locality:/, "").capitalize)
|
54
58
|
ret += " #{loc}" unless subsection && type == "clause" ||
|
55
|
-
type == "list" || target.match(/^IEV$|^IEC 60050-/)
|
59
|
+
type == "list" || target.match(/^IEV$|^IEC 60050-/) || n["droploc"] == "true"
|
56
60
|
ret += ")" if type == "list"
|
57
61
|
ret
|
58
62
|
end
|
59
63
|
|
60
|
-
def eref_localities1(target, type, from, to, delim, lang = "en")
|
64
|
+
def eref_localities1(target, type, from, to, delim, n, lang = "en")
|
61
65
|
return "" if type == "anchor"
|
66
|
+
|
62
67
|
subsection = from&.text&.match(/\./)
|
63
68
|
type = type.downcase
|
64
69
|
lang == "zh" and
|
65
|
-
return l10n(eref_localities1_zh(target, type, from, to, delim))
|
66
|
-
ret =
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
+
return l10n(eref_localities1_zh(target, type, from, to, n, delim))
|
71
|
+
ret = if delim == ";"
|
72
|
+
";"
|
73
|
+
else
|
74
|
+
type == "list" ? "" : delim
|
75
|
+
end
|
76
|
+
ret += eref_locality_populate(type, n) unless subsection &&
|
77
|
+
type == "clause" || type == "list" ||
|
78
|
+
target.match(/^IEV$|^IEC 60050-/)
|
70
79
|
ret += " #{from.text}" if from
|
71
80
|
ret += "–#{to.text}" if to
|
72
81
|
ret += ")" if type == "list"
|
@@ -78,9 +87,10 @@ module IsoDoc
|
|
78
87
|
l10n(@xrefs.anchor(container, :xref) + delim + linkend)
|
79
88
|
end
|
80
89
|
|
81
|
-
def example_span_label(
|
90
|
+
def example_span_label(_node, div, name)
|
82
91
|
return if name.nil?
|
83
|
-
|
92
|
+
|
93
|
+
div.span **{ class: "example_label" } do |_p|
|
84
94
|
name.children.each { |n| parse(n, div) }
|
85
95
|
end
|
86
96
|
end
|
@@ -96,8 +106,8 @@ module IsoDoc
|
|
96
106
|
def clause(docxml)
|
97
107
|
docxml.xpath(ns("//clause[not(ancestor::annex)] | "\
|
98
108
|
"//terms | //definitions | //references | "\
|
99
|
-
"//preface/introduction[clause]"))
|
100
|
-
|
109
|
+
"//preface/introduction[clause]"))
|
110
|
+
.each do |f|
|
101
111
|
clause1(f)
|
102
112
|
end
|
103
113
|
end
|
@@ -34,7 +34,6 @@ module IsoDoc
|
|
34
34
|
html_doc_path("style-iso.scss")),
|
35
35
|
htmlcoverpage: html_doc_path("html_iso_titlepage.html"),
|
36
36
|
htmlintropage: html_doc_path("html_iso_intro.html"),
|
37
|
-
scripts: html_doc_path("scripts.html"),
|
38
37
|
wordstylesheet: html_doc_path("wordstyle.scss"),
|
39
38
|
standardstylesheet: html_doc_path("isodoc.scss"),
|
40
39
|
header: html_doc_path("header.html"),
|
data/lib/isodoc/iso/xref.rb
CHANGED
@@ -85,6 +85,7 @@ module IsoDoc
|
|
85
85
|
c = IsoDoc::XrefGen::Counter.new
|
86
86
|
clause.xpath(ns(".//formula")).each do |t|
|
87
87
|
next if t["id"].nil? || t["id"].empty?
|
88
|
+
|
88
89
|
@anchors[t["id"]] =
|
89
90
|
anchor_struct("#{num}#{hiersep}#{c.increment(t).print}", t,
|
90
91
|
t["inequality"] ? @labels["inequality"] : @labels["formula"],
|
@@ -108,6 +109,7 @@ module IsoDoc
|
|
108
109
|
j = subfigure_increment(j, c, t)
|
109
110
|
sublabel = j.zero? ? nil : "#{(j+96).chr})"
|
110
111
|
next if t["id"].nil? || t["id"].empty?
|
112
|
+
|
111
113
|
figure_anchor(t, sublabel, c.print)
|
112
114
|
end
|
113
115
|
end
|
@@ -115,20 +117,21 @@ module IsoDoc
|
|
115
117
|
def hierarchical_figure_names(clause, num)
|
116
118
|
c = IsoDoc::XrefGen::Counter.new
|
117
119
|
j = 0
|
118
|
-
clause.xpath(ns(".//figure | .//sourcecode[not(ancestor::example)]"))
|
119
|
-
each do |t|
|
120
|
+
clause.xpath(ns(".//figure | .//sourcecode[not(ancestor::example)]"))
|
121
|
+
.each do |t|
|
120
122
|
j = subfigure_increment(j, c, t)
|
121
123
|
label = "#{num}#{hiersep}#{c.print}"
|
122
|
-
sublabel = j.zero? ? nil : "#{(j+96).chr})"
|
124
|
+
sublabel = j.zero? ? nil : "#{(j + 96).chr})"
|
123
125
|
next if t["id"].nil? || t["id"].empty?
|
126
|
+
|
124
127
|
figure_anchor(t, sublabel, label)
|
125
128
|
end
|
126
129
|
end
|
127
130
|
|
128
131
|
def reference_names(ref)
|
129
132
|
super
|
130
|
-
@anchors[ref["id"]] = { xref: @anchors[ref["id"]][:xref]
|
131
|
-
|
133
|
+
@anchors[ref["id"]] = { xref: @anchors[ref["id"]][:xref]
|
134
|
+
.sub(/ \(All Parts\)/i, "") }
|
132
135
|
end
|
133
136
|
|
134
137
|
def back_anchor_names(docxml)
|
data/metanorma-iso.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
|
-
lib = File.expand_path("
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
5
|
require "metanorma/iso/version"
|
6
6
|
|
@@ -29,22 +29,22 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
30
30
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
31
31
|
|
32
|
+
spec.add_dependency "isodoc", "~> 1.6.0"
|
33
|
+
spec.add_dependency "metanorma-standoc", "~> 1.9.0"
|
34
|
+
spec.add_dependency "mn2sts", "~> 1.5.0"
|
32
35
|
spec.add_dependency "ruby-jing"
|
33
|
-
spec.add_dependency "isodoc", "~> 1.5.0"
|
34
|
-
spec.add_dependency "metanorma-standoc", "~> 1.8.0"
|
35
36
|
spec.add_dependency "tokenizer", "~> 0.3.0"
|
36
37
|
spec.add_dependency "twitter_cldr"
|
37
|
-
spec.add_dependency "mn2sts", "~> 1.5.0"
|
38
38
|
|
39
39
|
spec.add_development_dependency "byebug"
|
40
|
-
spec.add_development_dependency "sassc", "2.4.0"
|
41
40
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
42
41
|
spec.add_development_dependency "guard", "~> 2.14"
|
43
42
|
spec.add_development_dependency "guard-rspec", "~> 4.7"
|
44
|
-
spec.add_development_dependency "
|
43
|
+
spec.add_development_dependency "iev", "~> 0.2.0"
|
44
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
45
45
|
spec.add_development_dependency "rspec", "~> 3.6"
|
46
46
|
spec.add_development_dependency "rubocop", "~> 1.5.2"
|
47
|
+
spec.add_development_dependency "sassc", "2.4.0"
|
47
48
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
48
49
|
spec.add_development_dependency "timecop", "~> 0.9"
|
49
|
-
spec.add_development_dependency "iev", "~> 0.2.0"
|
50
50
|
end
|
@@ -6,6 +6,11 @@ WORD_HTML_CSS = {
|
|
6
6
|
htmlstylesheet: "spec/assets/html.css",
|
7
7
|
}.freeze
|
8
8
|
|
9
|
+
WORD_HTML_CSS_SUBDIR = {
|
10
|
+
wordstylesheet: "word.css",
|
11
|
+
htmlstylesheet: "html.css",
|
12
|
+
}.freeze
|
13
|
+
|
9
14
|
WORD_HTML_CSS_HEADER_HTML = {
|
10
15
|
wordstylesheet: "spec/assets/word.css",
|
11
16
|
htmlstylesheet: "spec/assets/html.css",
|
@@ -93,7 +98,7 @@ RSpec.describe IsoDoc do
|
|
93
98
|
end
|
94
99
|
|
95
100
|
it "generates HTML output docs with null configuration from file" do
|
96
|
-
IsoDoc::Iso::HtmlConvert.new(
|
101
|
+
IsoDoc::Iso::HtmlConvert.new(WORD_HTML_CSS_SUBDIR.dup).convert("spec/assets/iso.xml", nil, false)
|
97
102
|
expect(File.exist?("spec/assets/iso.html")).to be true
|
98
103
|
html = File.read("spec/assets/iso.html", encoding: "UTF-8")
|
99
104
|
expect(html).to match(/<style>/)
|
@@ -102,7 +107,7 @@ RSpec.describe IsoDoc do
|
|
102
107
|
end
|
103
108
|
|
104
109
|
it "generates Word output docs with null configuration from file" do
|
105
|
-
IsoDoc::Iso::WordConvert.new(
|
110
|
+
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS_SUBDIR.dup).convert("spec/assets/iso.xml", nil, false)
|
106
111
|
expect(File.exist?("spec/assets/iso.doc")).to be true
|
107
112
|
word = File.read("spec/assets/iso.doc", encoding: "UTF-8")
|
108
113
|
expect(word).to match(/<w:WordDocument>/)
|
@@ -229,10 +234,7 @@ RSpec.describe IsoDoc do
|
|
229
234
|
</iso-standard>
|
230
235
|
INPUT
|
231
236
|
word = File.read("test.doc", encoding: "UTF-8")
|
232
|
-
|
233
|
-
"Content-Location: file:///C:/Doc/test_files/header.html")
|
234
|
-
.sub(/------=_NextPart.*$/m, "")
|
235
|
-
expect(word).to include(%{Content-Location: file:///C:/Doc/test_files/header.html})
|
237
|
+
expect(word).to include('Content-Disposition: inline; filename="header.html"')
|
236
238
|
end
|
237
239
|
|
238
240
|
it "populates Word ToC" do
|
metadata
CHANGED
@@ -1,73 +1,59 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: ruby-jing
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: isodoc
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - "~>"
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
19
|
+
version: 1.6.0
|
34
20
|
type: :runtime
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
24
|
- - "~>"
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
26
|
+
version: 1.6.0
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: metanorma-standoc
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
31
|
- - "~>"
|
46
32
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
33
|
+
version: 1.9.0
|
48
34
|
type: :runtime
|
49
35
|
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
38
|
- - "~>"
|
53
39
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
40
|
+
version: 1.9.0
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
42
|
+
name: mn2sts
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
45
|
- - "~>"
|
60
46
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
47
|
+
version: 1.5.0
|
62
48
|
type: :runtime
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
52
|
- - "~>"
|
67
53
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
54
|
+
version: 1.5.0
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
56
|
+
name: ruby-jing
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
59
|
- - ">="
|
@@ -81,27 +67,27 @@ dependencies:
|
|
81
67
|
- !ruby/object:Gem::Version
|
82
68
|
version: '0'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
70
|
+
name: tokenizer
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
73
|
- - "~>"
|
88
74
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
75
|
+
version: 0.3.0
|
90
76
|
type: :runtime
|
91
77
|
prerelease: false
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
93
79
|
requirements:
|
94
80
|
- - "~>"
|
95
81
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
82
|
+
version: 0.3.0
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
84
|
+
name: twitter_cldr
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
87
|
- - ">="
|
102
88
|
- !ruby/object:Gem::Version
|
103
89
|
version: '0'
|
104
|
-
type: :
|
90
|
+
type: :runtime
|
105
91
|
prerelease: false
|
106
92
|
version_requirements: !ruby/object:Gem::Requirement
|
107
93
|
requirements:
|
@@ -109,19 +95,19 @@ dependencies:
|
|
109
95
|
- !ruby/object:Gem::Version
|
110
96
|
version: '0'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
98
|
+
name: byebug
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - ">="
|
116
102
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
103
|
+
version: '0'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
107
|
requirements:
|
122
|
-
- -
|
108
|
+
- - ">="
|
123
109
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
110
|
+
version: '0'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: equivalent-xml
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,6 +150,20 @@ dependencies:
|
|
164
150
|
- - "~>"
|
165
151
|
- !ruby/object:Gem::Version
|
166
152
|
version: '4.7'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: iev
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 0.2.0
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 0.2.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rake
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -207,47 +207,47 @@ dependencies:
|
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: 1.5.2
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
|
-
name:
|
210
|
+
name: sassc
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- -
|
213
|
+
- - '='
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version:
|
215
|
+
version: 2.4.0
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
|
-
- -
|
220
|
+
- - '='
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version:
|
222
|
+
version: 2.4.0
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
|
-
name:
|
224
|
+
name: simplecov
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
227
|
- - "~>"
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: '0.
|
229
|
+
version: '0.15'
|
230
230
|
type: :development
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
234
|
- - "~>"
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version: '0.
|
236
|
+
version: '0.15'
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
|
-
name:
|
238
|
+
name: timecop
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
241
|
- - "~>"
|
242
242
|
- !ruby/object:Gem::Version
|
243
|
-
version: 0.
|
243
|
+
version: '0.9'
|
244
244
|
type: :development
|
245
245
|
prerelease: false
|
246
246
|
version_requirements: !ruby/object:Gem::Requirement
|
247
247
|
requirements:
|
248
248
|
- - "~>"
|
249
249
|
- !ruby/object:Gem::Version
|
250
|
-
version: 0.
|
250
|
+
version: '0.9'
|
251
251
|
description: |
|
252
252
|
metanorma-iso lets you write ISO standards in AsciiDoc syntax.
|
253
253
|
|
@@ -306,7 +306,6 @@ files:
|
|
306
306
|
- lib/isodoc/iso/html/htmlstyle.scss
|
307
307
|
- lib/isodoc/iso/html/isodoc.css
|
308
308
|
- lib/isodoc/iso/html/isodoc.scss
|
309
|
-
- lib/isodoc/iso/html/scripts.html
|
310
309
|
- lib/isodoc/iso/html/style-human.css
|
311
310
|
- lib/isodoc/iso/html/style-human.scss
|
312
311
|
- lib/isodoc/iso/html/style-iso.css
|
@@ -1,178 +0,0 @@
|
|
1
|
-
<script>
|
2
|
-
$("#toc").on('click', 'li', function(e) {
|
3
|
-
$(this).parent().find('li.toc-active').removeClass('toc-active');
|
4
|
-
$(this).addClass('toc-active');
|
5
|
-
});
|
6
|
-
</script>
|
7
|
-
|
8
|
-
<script>
|
9
|
-
//TOC toggle animation
|
10
|
-
$('#toggle').on('click', function(){
|
11
|
-
if( $('nav').is(':visible') ) {
|
12
|
-
$('nav').animate({ 'left': '-353px' }, 'slow', function(){
|
13
|
-
$('nav').hide();
|
14
|
-
});
|
15
|
-
$('body').animate({ 'margin-left': '0' }, 'slow');
|
16
|
-
}
|
17
|
-
else {
|
18
|
-
$('nav').show();
|
19
|
-
$('nav').animate({ 'left': '0px' }, 'slow');
|
20
|
-
$('body').animate({ 'margin-left': '298px' }, 'slow');
|
21
|
-
}
|
22
|
-
});
|
23
|
-
</script>
|
24
|
-
|
25
|
-
<script>
|
26
|
-
// Scroll to top button
|
27
|
-
window.onscroll = function() {scrollFunction()};
|
28
|
-
|
29
|
-
function scrollFunction() {
|
30
|
-
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
|
31
|
-
document.getElementById("myBtn").style.display = "block";
|
32
|
-
} else {
|
33
|
-
document.getElementById("myBtn").style.display = "none";
|
34
|
-
}
|
35
|
-
}
|
36
|
-
|
37
|
-
// When the user clicks on the button, scroll to the top of the document
|
38
|
-
function topFunction() {
|
39
|
-
document.body.scrollTop = 0;
|
40
|
-
document.documentElement.scrollTop = 0;
|
41
|
-
}
|
42
|
-
</script>
|
43
|
-
|
44
|
-
<script>
|
45
|
-
/*
|
46
|
-
$(document).ready(function() {
|
47
|
-
$('[id^=toc]').each(function ()
|
48
|
-
{
|
49
|
-
var currentToc = $(this);
|
50
|
-
var url = window.location.href;
|
51
|
-
currentToc.wrap("<a href='" + url + "#" + currentToc.attr("id") + "'></a>");
|
52
|
-
});
|
53
|
-
});
|
54
|
-
*/
|
55
|
-
</script>
|
56
|
-
|
57
|
-
|
58
|
-
<script>
|
59
|
-
|
60
|
-
// jQuery Inline Footnotes v1.0.3
|
61
|
-
// Copyright (c) 2011 Vesa Vänskä, released under the MIT License.
|
62
|
-
|
63
|
-
// Generated by CoffeeScript 1.6.1
|
64
|
-
(function() {
|
65
|
-
|
66
|
-
(function($) {
|
67
|
-
$.inlineFootnote = function(el, options) {
|
68
|
-
var _this = this;
|
69
|
-
this.el = $(el);
|
70
|
-
this.el.data("inlineFootnote", this);
|
71
|
-
this.initialize = function() {
|
72
|
-
this.options = $.extend({}, $.inlineFootnote.defaultOptions, options);
|
73
|
-
this.footnoteId = this.el.attr("href").match(/#(.*)/)[1];
|
74
|
-
if (this.footnoteId) {
|
75
|
-
this.el.mouseenter(this.openBox);
|
76
|
-
return $("body").mousemove(this.closeBox);
|
77
|
-
}
|
78
|
-
};
|
79
|
-
this.openBox = function(event) {
|
80
|
-
var footnoteContent, linkOffset;
|
81
|
-
if (!_this.box) {
|
82
|
-
footnoteContent = $("[id='" + _this.footnoteId + "']").children().filter(":not('" + _this.options.hideFromContent + "')");
|
83
|
-
linkOffset = _this.el.offset();
|
84
|
-
_this.box = $("<div />", {
|
85
|
-
id: _this.options.boxId,
|
86
|
-
html: footnoteContent.clone().find(_this.options.hideFromContent).remove().end(),
|
87
|
-
css: {
|
88
|
-
position: "absolute",
|
89
|
-
top: linkOffset.top,
|
90
|
-
left: linkOffset.left + _this.el.outerWidth()
|
91
|
-
}
|
92
|
-
}).appendTo("body");
|
93
|
-
return _this.positionBox();
|
94
|
-
}
|
95
|
-
};
|
96
|
-
this.closeBox = function(event) {
|
97
|
-
if (_this.box) {
|
98
|
-
if (_this.isHoveringFootnote(event)) {
|
99
|
-
clearTimeout(_this.closeTimeout);
|
100
|
-
return _this.closeTimeout = null;
|
101
|
-
} else {
|
102
|
-
if (!_this.closeTimeout) {
|
103
|
-
return _this.closeTimeout = setTimeout((function() {
|
104
|
-
_this.box.remove();
|
105
|
-
return _this.box = null;
|
106
|
-
}), _this.options.hideDelay);
|
107
|
-
}
|
108
|
-
}
|
109
|
-
}
|
110
|
-
};
|
111
|
-
this.isHoveringFootnote = function(event) {
|
112
|
-
return this.box.is(event.target) || $(event.target).closest(this.box).length > 0 || event.target === this.el[0];
|
113
|
-
};
|
114
|
-
this.positionBox = function() {
|
115
|
-
var boxHorizontalPadding, boxLeft, boxWidth, linkLeftOffset, windowWidth;
|
116
|
-
boxHorizontalPadding = parseInt(this.box.css("padding-left")) + parseInt(this.box.css("padding-right"));
|
117
|
-
linkLeftOffset = this.el.offset().left;
|
118
|
-
windowWidth = $(window).width();
|
119
|
-
if ((windowWidth / 2) > linkLeftOffset) {
|
120
|
-
boxLeft = linkLeftOffset + 20;
|
121
|
-
boxWidth = windowWidth - boxLeft - boxHorizontalPadding - this.options.boxMargin * 2;
|
122
|
-
if (boxWidth > this.options.maximumBoxWidth) {
|
123
|
-
boxWidth = this.options.maximumBoxWidth;
|
124
|
-
}
|
125
|
-
} else {
|
126
|
-
boxWidth = linkLeftOffset - boxHorizontalPadding - this.options.boxMargin * 2;
|
127
|
-
if (boxWidth > this.options.maximumBoxWidth) {
|
128
|
-
boxWidth = this.options.maximumBoxWidth;
|
129
|
-
}
|
130
|
-
boxLeft = linkLeftOffset - boxWidth - this.options.boxMargin * 2;
|
131
|
-
}
|
132
|
-
return this.box.css({
|
133
|
-
width: boxWidth,
|
134
|
-
left: boxLeft
|
135
|
-
});
|
136
|
-
};
|
137
|
-
return this.initialize();
|
138
|
-
};
|
139
|
-
$.inlineFootnote.defaultOptions = {
|
140
|
-
boxMargin: 20,
|
141
|
-
hideDelay: 200,
|
142
|
-
hideFromContent: "[rel=footnote]",
|
143
|
-
maximumBoxWidth: 500,
|
144
|
-
boxId: "footnote_box"
|
145
|
-
};
|
146
|
-
return $.fn.inlineFootnote = function(options) {
|
147
|
-
return this.each(function() {
|
148
|
-
return new $.inlineFootnote(this, options);
|
149
|
-
});
|
150
|
-
};
|
151
|
-
})(jQuery);
|
152
|
-
|
153
|
-
}).call(this);
|
154
|
-
</script>
|
155
|
-
|
156
|
-
<script>
|
157
|
-
$(function() {
|
158
|
-
$("[rel=footnote]").inlineFootnote();
|
159
|
-
});
|
160
|
-
</script>
|
161
|
-
<script>
|
162
|
-
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
|
163
|
-
//
|
164
|
-
// AnchorJS - v4.2.2 - 2020-04-20
|
165
|
-
// https://www.bryanbraun.com/anchorjs/
|
166
|
-
// Copyright (c) 2020 Bryan Braun; Licensed MIT
|
167
|
-
//
|
168
|
-
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
|
169
|
-
!function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function f(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.base=A.hasOwnProperty("base")?A.base:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64,A.titleText=A.hasOwnProperty("titleText")?A.titleText:""}function p(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],f(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,i,n,o,s,a,r,c,h,l,u,d=[];if(f(this.options),"touch"===(l=this.options.visible)&&(l=this.isTouchDevice()?"always":"hover"),0===(e=p(A=A||"h2, h3, h4, h5, h6")).length)return this;for(!function(){if(null!==document.head.querySelector("style.anchorjs"))return;var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(e):document.head.insertBefore(e,A);e.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",e.sheet.cssRules.length),e.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",e.sheet.cssRules.length),e.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",e.sheet.cssRules.length),e.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',e.sheet.cssRules.length)}(),t=document.querySelectorAll("[id]"),i=[].map.call(t,function(A){return A.id}),o=0;o<e.length;o++)if(this.hasAnchorJSLink(e[o]))d.push(o);else{if(e[o].hasAttribute("id"))n=e[o].getAttribute("id");else if(e[o].hasAttribute("data-anchor-id"))n=e[o].getAttribute("data-anchor-id");else{for(c=r=this.urlify(e[o].textContent),a=0;void 0!==s&&(c=r+"-"+a),a+=1,-1!==(s=i.indexOf(c)););s=void 0,i.push(c),e[o].setAttribute("id",c),n=c}(h=document.createElement("a")).className="anchorjs-link "+this.options.class,h.setAttribute("aria-label",this.options.ariaLabel),h.setAttribute("data-anchorjs-icon",this.options.icon),this.options.titleText&&(h.title=this.options.titleText),u=document.querySelector("base")?window.location.pathname+window.location.search:"",u=this.options.base||u,h.href=u+"#"+n,"always"===l&&(h.style.opacity="1"),""===this.options.icon&&(h.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(h.style.lineHeight="inherit")),"left"===this.options.placement?(h.style.position="absolute",h.style.marginLeft="-1em",h.style.paddingRight="0.5em",e[o].insertBefore(h,e[o].firstChild)):(h.style.paddingLeft="0.375em",e[o].appendChild(h))}for(o=0;o<d.length;o++)e.splice(d[o]-o,1);return this.elements=this.elements.concat(e),this},this.remove=function(A){for(var e,t,i=p(A),n=0;n<i.length;n++)(t=i[n].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(i[n]))&&this.elements.splice(e,1),i[n].removeChild(t));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){return this.options.truncate||f(this.options),A.trim().replace(/\'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),t=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||t||!1}}});
|
170
|
-
// @license-end
|
171
|
-
</script>
|
172
|
-
<script>
|
173
|
-
anchors.options = {
|
174
|
-
placement: 'left'
|
175
|
-
};
|
176
|
-
anchors.add('h1, h2, h3, h4');
|
177
|
-
</script>
|
178
|
-
|