metanorma-m3aawg 2.2.1 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 520661f46047c4c0f2a11a5485a3b562d9c97f8c472c00c126ca2538c6d793ee
4
- data.tar.gz: 3f2f195f6f220741ac8a64880c1d494676851478b69883318fc93a4f364c8203
3
+ metadata.gz: 9518c9b0243d2af6756c53c9e8c7ca134f47a27e8c1a7f3853e64afe5356c683
4
+ data.tar.gz: 2ed5fda8227b7437f18bf8e2c3d3e79a78d1d1991e011498fdd3f5c79ced59c7
5
5
  SHA512:
6
- metadata.gz: 24da8605761b7e73c21a02c826818445428aba6db28227499cb361df4728e568966684d20a3e3324cd326adda656178be640c874fec970cdb2a1c9663a9b6634
7
- data.tar.gz: 7addc8e4535ec7e32f2365e823c756b6ca6c0830eccf497c23fd7dcf9f75d35fea17360c28303726015295d5c1326454b9e039f7e9698668cd96f26f6ce1eafd
6
+ metadata.gz: 6918e142b7feb406bb74ce70ecb8c1b44ebc4cba50db0294e996f60abc75d671044acc10242ca73b455fba4fc3a2bbc5f71a67c19814094d014a26c35f820aa6
7
+ data.tar.gz: 93b117b5c02bed144d6cbf4a014525c3dfa946f4e6aef6288d251554d85fe534dbef17c75083dfde1d3d8d960a3aa558625166623737efb08a2d37a2314822f9
@@ -138,6 +138,35 @@ a.FootnoteRef + a.FootnoteRef:before {
138
138
  color: red;
139
139
  text-decoration: line-through; }
140
140
 
141
+ /* code highlighting with line numbers */
142
+ table.rouge-line-table td.rouge-gutter {
143
+ -moz-user-select: none;
144
+ -ms-user-select: none;
145
+ -webkit-user-select: none;
146
+ user-select: none;
147
+ padding-right: 1em; }
148
+
149
+ table.rouge-line-table td.rouge-code {
150
+ -moz-user-select: all;
151
+ -ms-user-select: all;
152
+ -webkit-user-select: all;
153
+ user-select: all; }
154
+
155
+ table.rouge-line-table,
156
+ table.rouge-line-table th,
157
+ table.rouge-line-table td {
158
+ width: auto;
159
+ border: none;
160
+ margin: 0;
161
+ padding: 0;
162
+ font-size: 100%; }
163
+
164
+ table.rouge-line-table pre {
165
+ margin: 0;
166
+ padding: 0;
167
+ overflow-x: visible;
168
+ font-size: 100%; }
169
+
141
170
  #standard-band {
142
171
  background-color: #0AC442; }
143
172
 
@@ -800,7 +829,7 @@ table {
800
829
  table th, table td {
801
830
  padding: 1em; }
802
831
  table td.header {
803
- font-weigth: 400; }
832
+ font-weight: 400; }
804
833
  table th,
805
834
  table td {
806
835
  border: none !important;
@@ -2,7 +2,7 @@
2
2
 
3
3
  <xsl:output 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
 
@@ -3198,7 +3198,7 @@
3198
3198
  </fn>
3199
3199
  -->
3200
3200
  <!-- footnotes in text (title, bibliography, main body, table's, figure's names), not for tables, figures -->
3201
- <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">
3201
+ <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">
3202
3202
 
3203
3203
  <!-- list of footnotes to calculate actual footnotes number -->
3204
3204
  <xsl:variable name="p_fn_">
@@ -3255,8 +3255,7 @@
3255
3255
  </fo:basic-link>
3256
3256
  </fo:inline>
3257
3257
  </xsl:variable>
3258
- <!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
3259
- gen_id=<xsl:value-of select="$gen_id"/> -->
3258
+
3260
3259
  <xsl:choose>
3261
3260
  <xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
3262
3261
  <xsl:copy-of select="$footnote_inline"/>
@@ -3311,7 +3310,7 @@
3311
3310
  <!-- commented:
3312
3311
  .//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
3313
3312
  because 'fn' there is in biblio-tag -->
3314
- <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])]">
3313
+ <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])]">
3315
3314
  <!-- copy unique fn -->
3316
3315
  <fn gen_id="{generate-id(.)}">
3317
3316
  <xsl:copy-of select="@*"/>
@@ -5858,7 +5857,9 @@
5858
5857
 
5859
5858
  <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
5860
5859
  <xsl:if test="number($scale) &lt; 100">
5861
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
5860
+
5861
+ <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
5862
+
5862
5863
  </xsl:if>
5863
5864
 
5864
5865
  </xsl:if>
@@ -6871,6 +6872,12 @@
6871
6872
  </xsl:attribute>
6872
6873
  </xsl:for-each>
6873
6874
 
6875
+ <!-- remove margin between rows in the table with sourcecode line numbers -->
6876
+ <xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
6877
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
6878
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
6879
+ </xsl:if>
6880
+
6874
6881
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6875
6882
  </fo:block>
6876
6883
 
@@ -6919,7 +6926,7 @@
6919
6926
  </xsl:template>
6920
6927
 
6921
6928
  <!-- outer table with line numbers for sourcecode -->
6922
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']" priority="2">
6929
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
6923
6930
  <fo:block>
6924
6931
  <fo:table width="100%" table-layout="fixed">
6925
6932
  <xsl:copy-of select="@id"/>
@@ -6931,16 +6938,16 @@
6931
6938
  </fo:table>
6932
6939
  </fo:block>
6933
6940
  </xsl:template>
6934
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody']" priority="2">
6941
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']/*[local-name() = 'tbody']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
6935
6942
  <xsl:apply-templates/>
6936
6943
  </xsl:template>
6937
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']" priority="2">
6944
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
6938
6945
  <fo:table-row>
6939
6946
  <xsl:apply-templates/>
6940
6947
  </fo:table-row>
6941
6948
  </xsl:template>
6942
6949
  <!-- first td with line numbers -->
6943
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][not(preceding-sibling::*)]" priority="2">
6950
+ <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'] -->
6944
6951
  <fo:table-cell>
6945
6952
  <fo:block>
6946
6953
 
@@ -6960,8 +6967,9 @@
6960
6967
  </fo:block>
6961
6968
  </fo:table-cell>
6962
6969
  </xsl:template>
6970
+
6963
6971
  <!-- second td with sourcecode -->
6964
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2">
6972
+ <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'] -->
6965
6973
  <fo:table-cell>
6966
6974
  <fo:block>
6967
6975
  <xsl:apply-templates/>
@@ -7199,7 +7207,25 @@
7199
7207
  <xsl:template match="*[local-name()='pre']" name="pre">
7200
7208
  <fo:block xsl:use-attribute-sets="pre-style">
7201
7209
  <xsl:copy-of select="@id"/>
7202
- <xsl:apply-templates/>
7210
+ <xsl:choose>
7211
+
7212
+ <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' -->
7213
+ <xsl:if test="ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']"> <!-- is current tr isn't last -->
7214
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
7215
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
7216
+ </xsl:if>
7217
+ <fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
7218
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
7219
+ <mtext><xsl:value-of select="."/></mtext>
7220
+ </math>
7221
+ </fo:instream-foreign-object>
7222
+ </xsl:when>
7223
+
7224
+ <xsl:otherwise>
7225
+ <xsl:apply-templates/>
7226
+ </xsl:otherwise>
7227
+
7228
+ </xsl:choose>
7203
7229
  </fo:block>
7204
7230
  </xsl:template>
7205
7231
  <!-- =============== -->
@@ -2,7 +2,7 @@
2
2
 
3
3
  <xsl:output 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
 
@@ -3198,7 +3198,7 @@
3198
3198
  </fn>
3199
3199
  -->
3200
3200
  <!-- footnotes in text (title, bibliography, main body, table's, figure's names), not for tables, figures -->
3201
- <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">
3201
+ <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">
3202
3202
 
3203
3203
  <!-- list of footnotes to calculate actual footnotes number -->
3204
3204
  <xsl:variable name="p_fn_">
@@ -3255,8 +3255,7 @@
3255
3255
  </fo:basic-link>
3256
3256
  </fo:inline>
3257
3257
  </xsl:variable>
3258
- <!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
3259
- gen_id=<xsl:value-of select="$gen_id"/> -->
3258
+
3260
3259
  <xsl:choose>
3261
3260
  <xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
3262
3261
  <xsl:copy-of select="$footnote_inline"/>
@@ -3311,7 +3310,7 @@
3311
3310
  <!-- commented:
3312
3311
  .//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
3313
3312
  because 'fn' there is in biblio-tag -->
3314
- <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])]">
3313
+ <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])]">
3315
3314
  <!-- copy unique fn -->
3316
3315
  <fn gen_id="{generate-id(.)}">
3317
3316
  <xsl:copy-of select="@*"/>
@@ -5858,7 +5857,9 @@
5858
5857
 
5859
5858
  <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
5860
5859
  <xsl:if test="number($scale) &lt; 100">
5861
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
5860
+
5861
+ <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
5862
+
5862
5863
  </xsl:if>
5863
5864
 
5864
5865
  </xsl:if>
@@ -6871,6 +6872,12 @@
6871
6872
  </xsl:attribute>
6872
6873
  </xsl:for-each>
6873
6874
 
6875
+ <!-- remove margin between rows in the table with sourcecode line numbers -->
6876
+ <xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
6877
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
6878
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
6879
+ </xsl:if>
6880
+
6874
6881
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6875
6882
  </fo:block>
6876
6883
 
@@ -6919,7 +6926,7 @@
6919
6926
  </xsl:template>
6920
6927
 
6921
6928
  <!-- outer table with line numbers for sourcecode -->
6922
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']" priority="2">
6929
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
6923
6930
  <fo:block>
6924
6931
  <fo:table width="100%" table-layout="fixed">
6925
6932
  <xsl:copy-of select="@id"/>
@@ -6931,16 +6938,16 @@
6931
6938
  </fo:table>
6932
6939
  </fo:block>
6933
6940
  </xsl:template>
6934
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody']" priority="2">
6941
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']/*[local-name() = 'tbody']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
6935
6942
  <xsl:apply-templates/>
6936
6943
  </xsl:template>
6937
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']" priority="2">
6944
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
6938
6945
  <fo:table-row>
6939
6946
  <xsl:apply-templates/>
6940
6947
  </fo:table-row>
6941
6948
  </xsl:template>
6942
6949
  <!-- first td with line numbers -->
6943
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][not(preceding-sibling::*)]" priority="2">
6950
+ <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'] -->
6944
6951
  <fo:table-cell>
6945
6952
  <fo:block>
6946
6953
 
@@ -6960,8 +6967,9 @@
6960
6967
  </fo:block>
6961
6968
  </fo:table-cell>
6962
6969
  </xsl:template>
6970
+
6963
6971
  <!-- second td with sourcecode -->
6964
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2">
6972
+ <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'] -->
6965
6973
  <fo:table-cell>
6966
6974
  <fo:block>
6967
6975
  <xsl:apply-templates/>
@@ -7199,7 +7207,25 @@
7199
7207
  <xsl:template match="*[local-name()='pre']" name="pre">
7200
7208
  <fo:block xsl:use-attribute-sets="pre-style">
7201
7209
  <xsl:copy-of select="@id"/>
7202
- <xsl:apply-templates/>
7210
+ <xsl:choose>
7211
+
7212
+ <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' -->
7213
+ <xsl:if test="ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']"> <!-- is current tr isn't last -->
7214
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
7215
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
7216
+ </xsl:if>
7217
+ <fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
7218
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
7219
+ <mtext><xsl:value-of select="."/></mtext>
7220
+ </math>
7221
+ </fo:instream-foreign-object>
7222
+ </xsl:when>
7223
+
7224
+ <xsl:otherwise>
7225
+ <xsl:apply-templates/>
7226
+ </xsl:otherwise>
7227
+
7228
+ </xsl:choose>
7203
7229
  </fo:block>
7204
7230
  </xsl:template>
7205
7231
  <!-- =============== -->
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3AAWG
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-m3aawg
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: htmlentities