metanorma-ieee 1.1.8 → 1.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e751c71b2677c711ecac9cefd4b1c73147d9d79b4d781fbb12ab45ad48f9727c
4
- data.tar.gz: 58833522ef648abab886770c3fb0be4c58dd8d2ecb2a2053b1a668c0c23e52f5
3
+ metadata.gz: a3a6c74c844149f002a1ebd200b398e2d5ab166858d2a8131fea9f348f5f2d58
4
+ data.tar.gz: dd9a99edeaa959c3d199eb6906baedd93af2f3e189ee9dd18fb6ea033fc26a97
5
5
  SHA512:
6
- metadata.gz: 41d512183e36da0202860881176a5eafb0cc09a8472102e95d7705960430e2c4b252d433ef22183c41187a43af5ed4b13f6eb50f3dff5d5df883116d26ce9697
7
- data.tar.gz: d64b1882fc5f303e41c1b040501d73139cd87f111d41b5d3eec789a6e08215013932d0d4e01414fe65599534aa79b79217802c786310d50fdcafe3bdba7fbfe4
6
+ metadata.gz: bd5300a786ae9e99557b8bdb96cd60f79a23fbcd713a512229eef84e38c33e3196d840e9ac9d4c5ba44070d3ab4aa4dee3910d49cce5b372dec7b4196f97a713
7
+ data.tar.gz: f0d1fafb3146544b1423ec9f4e7d3b5daebe5d6584d320d06040c40d2b645902e49af7a7a427e53e2e8dd3632bf099fd930c91d1f5bc4489fdb997872be40bb7
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)) &gt; 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="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
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="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
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)) &gt; 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="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
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="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
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,17 @@ 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
+ intro.sub("WORDTOC", toc)
223
+ else
224
+ source = docxml.at("//div[@class = 'TOC']") and
225
+ source.children = toc
226
+ intro
227
+ end
228
+ end
218
229
  end
219
230
  end
220
231
  end
@@ -715,27 +715,36 @@
715
715
  </define>
716
716
  <define name="ruby">
717
717
  <element name="ruby">
718
- <zeroOrMore>
719
- <choice>
720
- <ref name="PureTextElement"/>
721
- <ref name="rp"/>
722
- <ref name="rt"/>
723
- </choice>
724
- </zeroOrMore>
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="rp">
728
- <element name="rp">
729
- <zeroOrMore>
730
- <ref name="PureTextElement"/>
731
- </zeroOrMore>
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="rt">
735
- <element name="rt">
736
- <zeroOrMore>
737
- <ref name="PureTextElement"/>
738
- </zeroOrMore>
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">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IEEE
3
- VERSION = "1.1.8".freeze
3
+ VERSION = "1.1.10".freeze
4
4
  end
5
5
  end
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.8
4
+ version: 1.1.10
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-10 00:00:00.000000000 Z
11
+ date: 2023-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc