metanorma-ieee 1.1.8 → 1.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -8
- data/lib/isodoc/ieee/html/htmlstyle.css +8 -0
- data/lib/isodoc/ieee/ieee.amendment.xsl +12 -2
- data/lib/isodoc/ieee/ieee.standard.xsl +12 -2
- data/lib/isodoc/ieee/word_cleanup.rb +7 -0
- data/lib/isodoc/ieee/word_wp_cleanup.rb +13 -0
- data/lib/metanorma/ieee/basicdoc.rng +26 -17
- data/lib/metanorma/ieee/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5421d6b00aa18347ac348fcea8b8270551554809aeb5794bf687b2d1b7e689ed
|
4
|
+
data.tar.gz: ecf67feb4ef2531f0606e3466385d7195426191c5f09cd4372511063749d19e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d820f4622b8e4c45b9da086164a552613376c88c7ce30dacc0bb2a308457626466553fe9b32362526e02a5fee7279802f55a3e3fa7ee87dfbf1088aa2e56f90c
|
7
|
+
data.tar.gz: 07c8c2bb80f737dfb1fbe14589f052de209056da3b51bb8d354635f7ebdb90ab22f6b5fe00218a9f812c777adbf44faa51ef11f0d235d7642651d2958119f665
|
data/Gemfile
CHANGED
@@ -4,12 +4,6 @@ Encoding.default_internal = Encoding::UTF_8
|
|
4
4
|
source "https://rubygems.org"
|
5
5
|
git_source(:github) { |repo| "https://github.com/#{repo}" }
|
6
6
|
|
7
|
-
group :development, :test do
|
8
|
-
gem "rspec"
|
9
|
-
end
|
10
|
-
|
11
|
-
if File.exist? "Gemfile.devel"
|
12
|
-
eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
|
13
|
-
end
|
14
|
-
|
15
7
|
gemspec
|
8
|
+
|
9
|
+
eval_gemfile("Gemfile.devel") rescue nil
|
@@ -139,6 +139,14 @@ a.FootnoteRef, span.FootnoteRef {
|
|
139
139
|
color: red;
|
140
140
|
text-decoration: line-through; }
|
141
141
|
|
142
|
+
ruby {
|
143
|
+
ruby-position: over;
|
144
|
+
-webkit-ruby-position: before; }
|
145
|
+
|
146
|
+
ruby ruby {
|
147
|
+
ruby-position: under;
|
148
|
+
-webkit-ruby-position: after; }
|
149
|
+
|
142
150
|
/* code highlighting with line numbers */
|
143
151
|
table.rouge-line-table td.rouge-gutter {
|
144
152
|
-moz-user-select: none;
|
@@ -13052,6 +13052,16 @@
|
|
13052
13052
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
13053
13053
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
13054
13054
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
13055
|
+
|
13056
|
+
<xsl:variable name="bibitem_label">
|
13057
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
13058
|
+
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
13059
|
+
</xsl:apply-templates>
|
13060
|
+
</xsl:variable>
|
13061
|
+
<xsl:if test="string-length(normalize-space($bibitem_label)) > 5">
|
13062
|
+
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
13063
|
+
</xsl:if>
|
13064
|
+
|
13055
13065
|
<fo:list-item>
|
13056
13066
|
<fo:list-item-label end-indent="label-end()">
|
13057
13067
|
<fo:block role="SKIP">
|
@@ -13259,10 +13269,10 @@
|
|
13259
13269
|
|
13260
13270
|
<xsl:variable name="toc_level">
|
13261
13271
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
13262
|
-
<xsl:variable name="
|
13272
|
+
<xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
|
13263
13273
|
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
13264
13274
|
<xsl:choose>
|
13265
|
-
<xsl:when test="$
|
13275
|
+
<xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
13266
13276
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
13267
13277
|
<xsl:otherwise><!-- default value -->
|
13268
13278
|
|
@@ -13052,6 +13052,16 @@
|
|
13052
13052
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
13053
13053
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
13054
13054
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
13055
|
+
|
13056
|
+
<xsl:variable name="bibitem_label">
|
13057
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
13058
|
+
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
13059
|
+
</xsl:apply-templates>
|
13060
|
+
</xsl:variable>
|
13061
|
+
<xsl:if test="string-length(normalize-space($bibitem_label)) > 5">
|
13062
|
+
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
13063
|
+
</xsl:if>
|
13064
|
+
|
13055
13065
|
<fo:list-item>
|
13056
13066
|
<fo:list-item-label end-indent="label-end()">
|
13057
13067
|
<fo:block role="SKIP">
|
@@ -13259,10 +13269,10 @@
|
|
13259
13269
|
|
13260
13270
|
<xsl:variable name="toc_level">
|
13261
13271
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
13262
|
-
<xsl:variable name="
|
13272
|
+
<xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
|
13263
13273
|
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
13264
13274
|
<xsl:choose>
|
13265
|
-
<xsl:when test="$
|
13275
|
+
<xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
13266
13276
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
13267
13277
|
<xsl:otherwise><!-- default value -->
|
13268
13278
|
|
@@ -157,6 +157,13 @@ module IsoDoc
|
|
157
157
|
p["class"] = stylesmap[:MsoNormal]
|
158
158
|
end
|
159
159
|
end
|
160
|
+
|
161
|
+
def insert_toc(intro, docxml, level)
|
162
|
+
toc = assemble_toc(docxml, level)
|
163
|
+
source = docxml.at("//div[@class = 'WordSectionContents']") and
|
164
|
+
source << toc
|
165
|
+
intro
|
166
|
+
end
|
160
167
|
end
|
161
168
|
end
|
162
169
|
end
|
@@ -215,6 +215,19 @@ module IsoDoc
|
|
215
215
|
end
|
216
216
|
end
|
217
217
|
end
|
218
|
+
|
219
|
+
def insert_toc(intro, docxml, level)
|
220
|
+
toc = assemble_toc(docxml, level)
|
221
|
+
if intro&.include?("WORDTOC")
|
222
|
+
#s = docxml.at("//div[@class = 'WordSectionContents']")
|
223
|
+
#s.at("./p[@class='Unnumberedheading']")&.remove
|
224
|
+
intro.sub("WORDTOC", toc)
|
225
|
+
else
|
226
|
+
source = docxml.at("//div[@class = 'TOC']") and
|
227
|
+
source.children = toc
|
228
|
+
intro
|
229
|
+
end
|
230
|
+
end
|
218
231
|
end
|
219
232
|
end
|
220
233
|
end
|
@@ -715,27 +715,36 @@
|
|
715
715
|
</define>
|
716
716
|
<define name="ruby">
|
717
717
|
<element name="ruby">
|
718
|
-
<
|
719
|
-
<
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
718
|
+
<choice>
|
719
|
+
<ref name="ruby_pronunciation"/>
|
720
|
+
<ref name="ruby_annotation"/>
|
721
|
+
</choice>
|
722
|
+
<choice>
|
723
|
+
<text/>
|
724
|
+
<ref name="ruby"/>
|
725
|
+
</choice>
|
725
726
|
</element>
|
726
727
|
</define>
|
727
|
-
<define name="
|
728
|
-
<element name="
|
729
|
-
<
|
730
|
-
|
731
|
-
|
728
|
+
<define name="ruby_pronunciation">
|
729
|
+
<element name="pronunciation">
|
730
|
+
<attribute name="value"/>
|
731
|
+
<optional>
|
732
|
+
<attribute name="script"/>
|
733
|
+
</optional>
|
734
|
+
<optional>
|
735
|
+
<attribute name="lang"/>
|
736
|
+
</optional>
|
732
737
|
</element>
|
733
738
|
</define>
|
734
|
-
<define name="
|
735
|
-
<element name="
|
736
|
-
<
|
737
|
-
|
738
|
-
|
739
|
+
<define name="ruby_annotation">
|
740
|
+
<element name="annotation">
|
741
|
+
<attribute name="value"/>
|
742
|
+
<optional>
|
743
|
+
<attribute name="script"/>
|
744
|
+
</optional>
|
745
|
+
<optional>
|
746
|
+
<attribute name="lang"/>
|
747
|
+
</optional>
|
739
748
|
</element>
|
740
749
|
</define>
|
741
750
|
<define name="br">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ieee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.9
|
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-12-
|
11
|
+
date: 2023-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|