metanorma-iec 2.2.1 → 2.2.2

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: e9bf31b4b7fc2357793b3c07735cae57e6623b0e8564789123a9ef5f39db2851
4
- data.tar.gz: 1dd5e2d159a8c2fb54abcb79246f68d703359b2560bd1e048edeb761a34179f3
3
+ metadata.gz: 2bff37d83c4a647ea86d14725b368ce42dcab9d69152343f419ee0c4d2225759
4
+ data.tar.gz: ccbeec73dc1c28b3d8201dc6fc201f90b050cf0b0c72f8e19e1b9354a6e99906
5
5
  SHA512:
6
- metadata.gz: f55c6a1aaffbe60e4a9b69b2c2761aabfddf2aa69bab97504fc670fa0d183e3d21ca0f6ae037f5690465ca41352b6befee80422258ea16a3a9a3a12e3fd359a7
7
- data.tar.gz: 8356d054cd2f97114e1da1fee0b4f3c6f5faca9d7d0377b98eeeae9be9a957b4f908f0eb08f0124ec22fd14fbcabcd76cbeb410ca7ab7c0ab8c800972e3f9ff4
6
+ metadata.gz: f735aafb8c12111182c2fdbbfb6ab4a4a03a044bd03b80fdd33be68fd0174e54028984617eac1c1da112335a7e8d8fe3b16d5eab8d7d07d41501ceb6f26eb6b8
7
+ data.tar.gz: 65153419c3b4d3a9a0bf055f210dcc1974134d9aa4b330e9b62284b241d4c8be5c47fae952dc3e48837196fe8ea753fd961ae83618e691b2fe778e0ebe9f33f8
@@ -131,6 +131,35 @@ a.FootnoteRef + a.FootnoteRef:before {
131
131
  color: red;
132
132
  text-decoration: line-through; }
133
133
 
134
+ /* code highlighting with line numbers */
135
+ table.rouge-line-table td.rouge-gutter {
136
+ -moz-user-select: none;
137
+ -ms-user-select: none;
138
+ -webkit-user-select: none;
139
+ user-select: none;
140
+ padding-right: 1em; }
141
+
142
+ table.rouge-line-table td.rouge-code {
143
+ -moz-user-select: all;
144
+ -ms-user-select: all;
145
+ -webkit-user-select: all;
146
+ user-select: all; }
147
+
148
+ table.rouge-line-table,
149
+ table.rouge-line-table th,
150
+ table.rouge-line-table td {
151
+ width: auto;
152
+ border: none;
153
+ margin: 0;
154
+ padding: 0;
155
+ font-size: 100%; }
156
+
157
+ table.rouge-line-table pre {
158
+ margin: 0;
159
+ padding: 0;
160
+ overflow-x: visible;
161
+ font-size: 100%; }
162
+
134
163
  #standard-band {
135
164
  background-color: #0AC442; }
136
165
 
@@ -903,7 +932,7 @@ table {
903
932
  table th, table td {
904
933
  padding: 1em; }
905
934
  table td.header {
906
- font-weigth: 400; }
935
+ font-weight: 400; }
907
936
  table td,
908
937
  table th {
909
938
  font-size: 0.95em;
@@ -4,7 +4,7 @@
4
4
 
5
5
  <xsl:param name="additionalXMLs" select="''"/> <!-- iec-rice.fr.xml -->
6
6
 
7
- <xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
7
+ <xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure' or local-name() = 'localized-strings')] and not(ancestor::*[local-name() = 'name']))]" use="@reference"/>
8
8
 
9
9
  <xsl:variable name="additionalXMLsArray">
10
10
  <xsl:call-template name="split">
@@ -4614,7 +4614,7 @@
4614
4614
  </fn>
4615
4615
  -->
4616
4616
  <!-- footnotes in text (title, bibliography, main body, table's, figure's names), not for tables, figures -->
4617
- <xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
4617
+ <xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" priority="2" name="fn">
4618
4618
 
4619
4619
  <!-- list of footnotes to calculate actual footnotes number -->
4620
4620
  <xsl:variable name="p_fn_">
@@ -4671,8 +4671,7 @@
4671
4671
  </fo:basic-link>
4672
4672
  </fo:inline>
4673
4673
  </xsl:variable>
4674
- <!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
4675
- gen_id=<xsl:value-of select="$gen_id"/> -->
4674
+
4676
4675
  <xsl:choose>
4677
4676
  <xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
4678
4677
  <xsl:copy-of select="$footnote_inline"/>
@@ -4727,7 +4726,7 @@
4727
4726
  <!-- commented:
4728
4727
  .//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
4729
4728
  because 'fn' there is in biblio-tag -->
4730
- <xsl:for-each select=".//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
4729
+ <xsl:for-each select=".//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
4731
4730
  <!-- copy unique fn -->
4732
4731
  <fn gen_id="{generate-id(.)}">
4733
4732
  <xsl:copy-of select="@*"/>
@@ -7291,7 +7290,9 @@
7291
7290
 
7292
7291
  <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
7293
7292
  <xsl:if test="number($scale) &lt; 100">
7294
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
7293
+
7294
+ <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
7295
+
7295
7296
  </xsl:if>
7296
7297
 
7297
7298
  </xsl:if>
@@ -8317,6 +8318,12 @@
8317
8318
  </xsl:attribute>
8318
8319
  </xsl:for-each>
8319
8320
 
8321
+ <!-- remove margin between rows in the table with sourcecode line numbers -->
8322
+ <xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
8323
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
8324
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
8325
+ </xsl:if>
8326
+
8320
8327
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8321
8328
  </fo:block>
8322
8329
 
@@ -8365,7 +8372,7 @@
8365
8372
  </xsl:template>
8366
8373
 
8367
8374
  <!-- outer table with line numbers for sourcecode -->
8368
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']" priority="2">
8375
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
8369
8376
  <fo:block>
8370
8377
  <fo:table width="100%" table-layout="fixed">
8371
8378
  <xsl:copy-of select="@id"/>
@@ -8377,16 +8384,16 @@
8377
8384
  </fo:table>
8378
8385
  </fo:block>
8379
8386
  </xsl:template>
8380
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody']" priority="2">
8387
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']/*[local-name() = 'tbody']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
8381
8388
  <xsl:apply-templates/>
8382
8389
  </xsl:template>
8383
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']" priority="2">
8390
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
8384
8391
  <fo:table-row>
8385
8392
  <xsl:apply-templates/>
8386
8393
  </fo:table-row>
8387
8394
  </xsl:template>
8388
8395
  <!-- first td with line numbers -->
8389
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][not(preceding-sibling::*)]" priority="2">
8396
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']/*[local-name()='td'][not(preceding-sibling::*)]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
8390
8397
  <fo:table-cell>
8391
8398
  <fo:block>
8392
8399
 
@@ -8406,8 +8413,9 @@
8406
8413
  </fo:block>
8407
8414
  </fo:table-cell>
8408
8415
  </xsl:template>
8416
+
8409
8417
  <!-- second td with sourcecode -->
8410
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2">
8418
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
8411
8419
  <fo:table-cell>
8412
8420
  <fo:block>
8413
8421
  <xsl:apply-templates/>
@@ -8645,7 +8653,25 @@
8645
8653
  <xsl:template match="*[local-name()='pre']" name="pre">
8646
8654
  <fo:block xsl:use-attribute-sets="pre-style">
8647
8655
  <xsl:copy-of select="@id"/>
8648
- <xsl:apply-templates/>
8656
+ <xsl:choose>
8657
+
8658
+ <xsl:when test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name()='td'][1][not(preceding-sibling::*)]"> <!-- pre in the first td in the table with @linenums = 'true' -->
8659
+ <xsl:if test="ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']"> <!-- is current tr isn't last -->
8660
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
8661
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
8662
+ </xsl:if>
8663
+ <fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
8664
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
8665
+ <mtext><xsl:value-of select="."/></mtext>
8666
+ </math>
8667
+ </fo:instream-foreign-object>
8668
+ </xsl:when>
8669
+
8670
+ <xsl:otherwise>
8671
+ <xsl:apply-templates/>
8672
+ </xsl:otherwise>
8673
+
8674
+ </xsl:choose>
8649
8675
  </fo:block>
8650
8676
  </xsl:template>
8651
8677
  <!-- =============== -->
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.2.1".freeze
3
+ VERSION = "2.2.2".freeze
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.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: 2022-12-19 00:00:00.000000000 Z
11
+ date: 2022-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso