metanorma-ribose 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: fb795cd22cf6cdc75bf3a53c1b9d979799a89b8d0733a6510c4de6b6af975b8e
4
- data.tar.gz: 14eeadada4566d22bc576b9a28bc903d45cbaf17536ff62db78e59b8d167e75c
3
+ metadata.gz: b52a4ce5e81936ba043035a243a88a1fe2d8f1c17f8b1195499fbd0ea30ea8cd
4
+ data.tar.gz: e0f5af98060005b86849b0b8651b3fbae732dd8a446f9f03aae558a86f633eac
5
5
  SHA512:
6
- metadata.gz: 9225d6ff20a31be5bac5e041f4b566a87e6f49bd04ae3a8f05fa745a75367463321cd206865a47da30bbb3fc4c56049a4ef7bdb0aa25644cda7daa2265a0bbc5
7
- data.tar.gz: 7b18bff8d19e7c72cb36a6c64a60f498c4aca7a4664b9e7e69a67f2d966dec57fd51f9be7f72b04dab6a828b9c2adf6d4d740fce42d3a9ee015cfd1ad44e47e0
6
+ metadata.gz: a5857de14aea32a150ff1dea4cb9a59754b42d8f51f8bbbd71d8ce609a3945e0489ce4cbe44212f28fa75fd0b71c19d228f900514f6e5de64242c62bdb1435ad
7
+ data.tar.gz: d1e0d6d808ed9bc5b758d83395ba39e764c54364cf2e7214c976fd67a4ba27b9e7a7a36d309a2c06416ef080f694c65e6b89e0a0277706d3cbe32756fcfec5a7
@@ -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
 
@@ -787,7 +816,7 @@ table {
787
816
  table th, table td {
788
817
  padding: 1em; }
789
818
  table td.header {
790
- font-weigth: 400; }
819
+ font-weight: 400; }
791
820
 
792
821
  p.TableTitle {
793
822
  text-align: center;
@@ -2,7 +2,7 @@
2
2
 
3
3
  <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
4
4
 
5
- <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"/>
5
+ <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"/>
6
6
 
7
7
  <xsl:variable name="debug">false</xsl:variable>
8
8
 
@@ -3844,7 +3844,7 @@
3844
3844
  </fn>
3845
3845
  -->
3846
3846
  <!-- footnotes in text (title, bibliography, main body, table's, figure's names), not for tables, figures -->
3847
- <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">
3847
+ <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">
3848
3848
 
3849
3849
  <!-- list of footnotes to calculate actual footnotes number -->
3850
3850
  <xsl:variable name="p_fn_">
@@ -3901,8 +3901,7 @@
3901
3901
  </fo:basic-link>
3902
3902
  </fo:inline>
3903
3903
  </xsl:variable>
3904
- <!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
3905
- gen_id=<xsl:value-of select="$gen_id"/> -->
3904
+
3906
3905
  <xsl:choose>
3907
3906
  <xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
3908
3907
  <xsl:copy-of select="$footnote_inline"/>
@@ -3957,7 +3956,7 @@
3957
3956
  <!-- commented:
3958
3957
  .//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
3959
3958
  because 'fn' there is in biblio-tag -->
3960
- <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])]">
3959
+ <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])]">
3961
3960
  <!-- copy unique fn -->
3962
3961
  <fn gen_id="{generate-id(.)}">
3963
3962
  <xsl:copy-of select="@*"/>
@@ -6522,7 +6521,9 @@
6522
6521
 
6523
6522
  <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
6524
6523
  <xsl:if test="number($scale) &lt; 100">
6525
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
6524
+
6525
+ <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
6526
+
6526
6527
  </xsl:if>
6527
6528
 
6528
6529
  </xsl:if>
@@ -7469,7 +7470,7 @@
7469
7470
  </xsl:if> -->
7470
7471
 
7471
7472
  <xsl:choose>
7472
- <xsl:when test="ancestor::*[local-name() = 'table'][not(@type = 'sourcecode')]">inherit</xsl:when>
7473
+ <xsl:when test="ancestor::*[local-name() = 'table'][not(parent::*[local-name() = 'sourcecode'][@linenums = 'true'])]">inherit</xsl:when>
7473
7474
  <xsl:otherwise>95%</xsl:otherwise><!-- 110% -->
7474
7475
  </xsl:choose>
7475
7476
 
@@ -7556,6 +7557,12 @@
7556
7557
  </xsl:if>
7557
7558
  </xsl:if>
7558
7559
 
7560
+ <!-- remove margin between rows in the table with sourcecode line numbers -->
7561
+ <xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
7562
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
7563
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
7564
+ </xsl:if>
7565
+
7559
7566
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7560
7567
  </fo:block>
7561
7568
 
@@ -7602,7 +7609,7 @@
7602
7609
  </xsl:template>
7603
7610
 
7604
7611
  <!-- outer table with line numbers for sourcecode -->
7605
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']" priority="2">
7612
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
7606
7613
  <fo:block>
7607
7614
  <fo:table width="100%" table-layout="fixed">
7608
7615
  <xsl:copy-of select="@id"/>
@@ -7614,16 +7621,16 @@
7614
7621
  </fo:table>
7615
7622
  </fo:block>
7616
7623
  </xsl:template>
7617
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody']" priority="2">
7624
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']/*[local-name() = 'tbody']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
7618
7625
  <xsl:apply-templates/>
7619
7626
  </xsl:template>
7620
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']" priority="2">
7627
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
7621
7628
  <fo:table-row>
7622
7629
  <xsl:apply-templates/>
7623
7630
  </fo:table-row>
7624
7631
  </xsl:template>
7625
7632
  <!-- first td with line numbers -->
7626
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][not(preceding-sibling::*)]" priority="2">
7633
+ <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'] -->
7627
7634
  <fo:table-cell>
7628
7635
  <fo:block>
7629
7636
 
@@ -7643,8 +7650,9 @@
7643
7650
  </fo:block>
7644
7651
  </fo:table-cell>
7645
7652
  </xsl:template>
7653
+
7646
7654
  <!-- second td with sourcecode -->
7647
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2">
7655
+ <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'] -->
7648
7656
  <fo:table-cell>
7649
7657
  <fo:block>
7650
7658
  <xsl:apply-templates/>
@@ -7882,7 +7890,25 @@
7882
7890
  <xsl:template match="*[local-name()='pre']" name="pre">
7883
7891
  <fo:block xsl:use-attribute-sets="pre-style">
7884
7892
  <xsl:copy-of select="@id"/>
7885
- <xsl:apply-templates/>
7893
+ <xsl:choose>
7894
+
7895
+ <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' -->
7896
+ <xsl:if test="ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']"> <!-- is current tr isn't last -->
7897
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
7898
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
7899
+ </xsl:if>
7900
+ <fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
7901
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
7902
+ <mtext><xsl:value-of select="."/></mtext>
7903
+ </math>
7904
+ </fo:instream-foreign-object>
7905
+ </xsl:when>
7906
+
7907
+ <xsl:otherwise>
7908
+ <xsl:apply-templates/>
7909
+ </xsl:otherwise>
7910
+
7911
+ </xsl:choose>
7886
7912
  </fo:block>
7887
7913
  </xsl:template>
7888
7914
  <!-- =============== -->
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.2.1".freeze
3
+ VERSION = "2.2.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ribose
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: exe
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-generic