metanorma-un 0.10.1 → 0.10.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 +4 -4
- data/lib/isodoc/un/html/htmlstyle.css +30 -1
- data/lib/isodoc/un/un.plenary-attachment.xsl +40 -13
- data/lib/isodoc/un/un.plenary.xsl +40 -13
- data/lib/isodoc/un/un.recommendation.xsl +39 -13
- data/lib/metanorma/un/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: 5bf468cba8a3337fef7dde1c10540150adb9df6e0dc7b2d3a09ae8c6949cd257
|
4
|
+
data.tar.gz: aa1015d7812c6519258ce72d52a9ea39296f5f265e5aa3a522f44f6b1c44cf98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de873712b53505b22a4c3b5ab370ae34349debb2face1a555315dd1dbea0f10eb5ab6fe2f781b49a042251053ce374b65832cb9c9a0d06cdfcfad16269cb77b7
|
7
|
+
data.tar.gz: 445278fb7efd96b0fe58ed8cd0c5a3d4c3eb9090317416e0270cd78492610e3d260dc7d674a2ab4bbdef7aab944f6a05e3cfd9dc698469efe48b948c331b8420
|
@@ -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
|
|
@@ -843,7 +872,7 @@ table {
|
|
843
872
|
table th, table td {
|
844
873
|
padding: 1em; }
|
845
874
|
table td.header {
|
846
|
-
font-
|
875
|
+
font-weight: 400; }
|
847
876
|
|
848
877
|
p.TableTitle {
|
849
878
|
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'])) and not(ancestor::*[local-name() = 'bibdata'] and ancestor::*[local-name() = 'abstract'])]" use="@reference"/>
|
6
6
|
|
7
7
|
<xsl:variable name="debug">false</xsl:variable>
|
8
8
|
|
@@ -645,7 +645,7 @@
|
|
645
645
|
<!-- ============================ -->
|
646
646
|
|
647
647
|
<xsl:template match="un:figure" priority="2">
|
648
|
-
<fo:block-container id="{@id}">
|
648
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
649
649
|
<fo:block>
|
650
650
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
651
651
|
</fo:block>
|
@@ -1561,6 +1561,7 @@
|
|
1561
1561
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1562
1562
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1563
1563
|
<xsl:attribute name="border">2pt solid black</xsl:attribute>
|
1564
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1564
1565
|
|
1565
1566
|
</xsl:attribute-set>
|
1566
1567
|
|
@@ -3297,7 +3298,7 @@
|
|
3297
3298
|
</fn>
|
3298
3299
|
-->
|
3299
3300
|
<!-- footnotes in text (title, bibliography, main body, table's, figure's names), not for tables, figures -->
|
3300
|
-
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])
|
3301
|
+
<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">
|
3301
3302
|
|
3302
3303
|
<!-- list of footnotes to calculate actual footnotes number -->
|
3303
3304
|
<xsl:variable name="p_fn_">
|
@@ -3354,8 +3355,7 @@
|
|
3354
3355
|
</fo:basic-link>
|
3355
3356
|
</fo:inline>
|
3356
3357
|
</xsl:variable>
|
3357
|
-
|
3358
|
-
gen_id=<xsl:value-of select="$gen_id"/> -->
|
3358
|
+
|
3359
3359
|
<xsl:choose>
|
3360
3360
|
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
3361
3361
|
<xsl:copy-of select="$footnote_inline"/>
|
@@ -3410,7 +3410,7 @@
|
|
3410
3410
|
<!-- commented:
|
3411
3411
|
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
3412
3412
|
because 'fn' there is in biblio-tag -->
|
3413
|
-
<xsl:for-each select=".//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])
|
3413
|
+
<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])]">
|
3414
3414
|
<!-- copy unique fn -->
|
3415
3415
|
<fn gen_id="{generate-id(.)}">
|
3416
3416
|
<xsl:copy-of select="@*"/>
|
@@ -5964,7 +5964,9 @@
|
|
5964
5964
|
|
5965
5965
|
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
|
5966
5966
|
<xsl:if test="number($scale) < 100">
|
5967
|
-
|
5967
|
+
|
5968
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale * 0.985"/>%</xsl:attribute><!-- 0.985 due border around image -->
|
5969
|
+
|
5968
5970
|
</xsl:if>
|
5969
5971
|
|
5970
5972
|
</xsl:if>
|
@@ -6978,6 +6980,12 @@
|
|
6978
6980
|
</xsl:attribute>
|
6979
6981
|
</xsl:for-each>
|
6980
6982
|
|
6983
|
+
<!-- remove margin between rows in the table with sourcecode line numbers -->
|
6984
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
|
6985
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
6986
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
6987
|
+
</xsl:if>
|
6988
|
+
|
6981
6989
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
6982
6990
|
</fo:block>
|
6983
6991
|
|
@@ -7026,7 +7034,7 @@
|
|
7026
7034
|
</xsl:template>
|
7027
7035
|
|
7028
7036
|
<!-- outer table with line numbers for sourcecode -->
|
7029
|
-
<xsl:template match="*[local-name()='
|
7037
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
|
7030
7038
|
<fo:block>
|
7031
7039
|
<fo:table width="100%" table-layout="fixed">
|
7032
7040
|
<xsl:copy-of select="@id"/>
|
@@ -7038,16 +7046,16 @@
|
|
7038
7046
|
</fo:table>
|
7039
7047
|
</fo:block>
|
7040
7048
|
</xsl:template>
|
7041
|
-
<xsl:template match="*[local-name()='
|
7049
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']/*[local-name() = 'tbody']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
|
7042
7050
|
<xsl:apply-templates/>
|
7043
7051
|
</xsl:template>
|
7044
|
-
<xsl:template match="*[local-name()='
|
7052
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
|
7045
7053
|
<fo:table-row>
|
7046
7054
|
<xsl:apply-templates/>
|
7047
7055
|
</fo:table-row>
|
7048
7056
|
</xsl:template>
|
7049
7057
|
<!-- first td with line numbers -->
|
7050
|
-
<xsl:template match="*[local-name()='
|
7058
|
+
<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'] -->
|
7051
7059
|
<fo:table-cell>
|
7052
7060
|
<fo:block>
|
7053
7061
|
|
@@ -7067,8 +7075,9 @@
|
|
7067
7075
|
</fo:block>
|
7068
7076
|
</fo:table-cell>
|
7069
7077
|
</xsl:template>
|
7078
|
+
|
7070
7079
|
<!-- second td with sourcecode -->
|
7071
|
-
<xsl:template match="*[local-name()='
|
7080
|
+
<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'] -->
|
7072
7081
|
<fo:table-cell>
|
7073
7082
|
<fo:block>
|
7074
7083
|
<xsl:apply-templates/>
|
@@ -7306,7 +7315,25 @@
|
|
7306
7315
|
<xsl:template match="*[local-name()='pre']" name="pre">
|
7307
7316
|
<fo:block xsl:use-attribute-sets="pre-style">
|
7308
7317
|
<xsl:copy-of select="@id"/>
|
7309
|
-
<xsl:
|
7318
|
+
<xsl:choose>
|
7319
|
+
|
7320
|
+
<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' -->
|
7321
|
+
<xsl:if test="ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']"> <!-- is current tr isn't last -->
|
7322
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
7323
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
7324
|
+
</xsl:if>
|
7325
|
+
<fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
|
7326
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
7327
|
+
<mtext><xsl:value-of select="."/></mtext>
|
7328
|
+
</math>
|
7329
|
+
</fo:instream-foreign-object>
|
7330
|
+
</xsl:when>
|
7331
|
+
|
7332
|
+
<xsl:otherwise>
|
7333
|
+
<xsl:apply-templates/>
|
7334
|
+
</xsl:otherwise>
|
7335
|
+
|
7336
|
+
</xsl:choose>
|
7310
7337
|
</fo:block>
|
7311
7338
|
</xsl:template>
|
7312
7339
|
<!-- =============== -->
|
@@ -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'])) and not(ancestor::*[local-name() = 'bibdata'] and ancestor::*[local-name() = 'abstract'])]" use="@reference"/>
|
6
6
|
|
7
7
|
<xsl:variable name="debug">false</xsl:variable>
|
8
8
|
|
@@ -645,7 +645,7 @@
|
|
645
645
|
<!-- ============================ -->
|
646
646
|
|
647
647
|
<xsl:template match="un:figure" priority="2">
|
648
|
-
<fo:block-container id="{@id}">
|
648
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
649
649
|
<fo:block>
|
650
650
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
651
651
|
</fo:block>
|
@@ -1561,6 +1561,7 @@
|
|
1561
1561
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1562
1562
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1563
1563
|
<xsl:attribute name="border">2pt solid black</xsl:attribute>
|
1564
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1564
1565
|
|
1565
1566
|
</xsl:attribute-set>
|
1566
1567
|
|
@@ -3297,7 +3298,7 @@
|
|
3297
3298
|
</fn>
|
3298
3299
|
-->
|
3299
3300
|
<!-- footnotes in text (title, bibliography, main body, table's, figure's names), not for tables, figures -->
|
3300
|
-
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])
|
3301
|
+
<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">
|
3301
3302
|
|
3302
3303
|
<!-- list of footnotes to calculate actual footnotes number -->
|
3303
3304
|
<xsl:variable name="p_fn_">
|
@@ -3354,8 +3355,7 @@
|
|
3354
3355
|
</fo:basic-link>
|
3355
3356
|
</fo:inline>
|
3356
3357
|
</xsl:variable>
|
3357
|
-
|
3358
|
-
gen_id=<xsl:value-of select="$gen_id"/> -->
|
3358
|
+
|
3359
3359
|
<xsl:choose>
|
3360
3360
|
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
3361
3361
|
<xsl:copy-of select="$footnote_inline"/>
|
@@ -3410,7 +3410,7 @@
|
|
3410
3410
|
<!-- commented:
|
3411
3411
|
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
3412
3412
|
because 'fn' there is in biblio-tag -->
|
3413
|
-
<xsl:for-each select=".//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])
|
3413
|
+
<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])]">
|
3414
3414
|
<!-- copy unique fn -->
|
3415
3415
|
<fn gen_id="{generate-id(.)}">
|
3416
3416
|
<xsl:copy-of select="@*"/>
|
@@ -5964,7 +5964,9 @@
|
|
5964
5964
|
|
5965
5965
|
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
|
5966
5966
|
<xsl:if test="number($scale) < 100">
|
5967
|
-
|
5967
|
+
|
5968
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale * 0.985"/>%</xsl:attribute><!-- 0.985 due border around image -->
|
5969
|
+
|
5968
5970
|
</xsl:if>
|
5969
5971
|
|
5970
5972
|
</xsl:if>
|
@@ -6978,6 +6980,12 @@
|
|
6978
6980
|
</xsl:attribute>
|
6979
6981
|
</xsl:for-each>
|
6980
6982
|
|
6983
|
+
<!-- remove margin between rows in the table with sourcecode line numbers -->
|
6984
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
|
6985
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
6986
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
6987
|
+
</xsl:if>
|
6988
|
+
|
6981
6989
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
6982
6990
|
</fo:block>
|
6983
6991
|
|
@@ -7026,7 +7034,7 @@
|
|
7026
7034
|
</xsl:template>
|
7027
7035
|
|
7028
7036
|
<!-- outer table with line numbers for sourcecode -->
|
7029
|
-
<xsl:template match="*[local-name()='
|
7037
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
|
7030
7038
|
<fo:block>
|
7031
7039
|
<fo:table width="100%" table-layout="fixed">
|
7032
7040
|
<xsl:copy-of select="@id"/>
|
@@ -7038,16 +7046,16 @@
|
|
7038
7046
|
</fo:table>
|
7039
7047
|
</fo:block>
|
7040
7048
|
</xsl:template>
|
7041
|
-
<xsl:template match="*[local-name()='
|
7049
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']/*[local-name() = 'tbody']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
|
7042
7050
|
<xsl:apply-templates/>
|
7043
7051
|
</xsl:template>
|
7044
|
-
<xsl:template match="*[local-name()='
|
7052
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
|
7045
7053
|
<fo:table-row>
|
7046
7054
|
<xsl:apply-templates/>
|
7047
7055
|
</fo:table-row>
|
7048
7056
|
</xsl:template>
|
7049
7057
|
<!-- first td with line numbers -->
|
7050
|
-
<xsl:template match="*[local-name()='
|
7058
|
+
<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'] -->
|
7051
7059
|
<fo:table-cell>
|
7052
7060
|
<fo:block>
|
7053
7061
|
|
@@ -7067,8 +7075,9 @@
|
|
7067
7075
|
</fo:block>
|
7068
7076
|
</fo:table-cell>
|
7069
7077
|
</xsl:template>
|
7078
|
+
|
7070
7079
|
<!-- second td with sourcecode -->
|
7071
|
-
<xsl:template match="*[local-name()='
|
7080
|
+
<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'] -->
|
7072
7081
|
<fo:table-cell>
|
7073
7082
|
<fo:block>
|
7074
7083
|
<xsl:apply-templates/>
|
@@ -7306,7 +7315,25 @@
|
|
7306
7315
|
<xsl:template match="*[local-name()='pre']" name="pre">
|
7307
7316
|
<fo:block xsl:use-attribute-sets="pre-style">
|
7308
7317
|
<xsl:copy-of select="@id"/>
|
7309
|
-
<xsl:
|
7318
|
+
<xsl:choose>
|
7319
|
+
|
7320
|
+
<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' -->
|
7321
|
+
<xsl:if test="ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']"> <!-- is current tr isn't last -->
|
7322
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
7323
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
7324
|
+
</xsl:if>
|
7325
|
+
<fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
|
7326
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
7327
|
+
<mtext><xsl:value-of select="."/></mtext>
|
7328
|
+
</math>
|
7329
|
+
</fo:instream-foreign-object>
|
7330
|
+
</xsl:when>
|
7331
|
+
|
7332
|
+
<xsl:otherwise>
|
7333
|
+
<xsl:apply-templates/>
|
7334
|
+
</xsl:otherwise>
|
7335
|
+
|
7336
|
+
</xsl:choose>
|
7310
7337
|
</fo:block>
|
7311
7338
|
</xsl:template>
|
7312
7339
|
<!-- =============== -->
|
@@ -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'])) and not(ancestor::*[local-name() = 'bibdata'] and ancestor::*[local-name() = 'abstract'])]" use="@reference"/>
|
6
6
|
|
7
7
|
<xsl:variable name="debug">false</xsl:variable>
|
8
8
|
|
@@ -750,7 +750,7 @@
|
|
750
750
|
<!-- ============================ -->
|
751
751
|
|
752
752
|
<xsl:template match="un:figure" priority="2">
|
753
|
-
<fo:block-container id="{@id}">
|
753
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
754
754
|
<xsl:if test="ancestor::un:admonition">
|
755
755
|
<xsl:attribute name="margin-left">-5mm</xsl:attribute>
|
756
756
|
<xsl:attribute name="margin-right">-5mm</xsl:attribute>
|
@@ -3391,7 +3391,7 @@
|
|
3391
3391
|
</fn>
|
3392
3392
|
-->
|
3393
3393
|
<!-- footnotes in text (title, bibliography, main body, table's, figure's names), not for tables, figures -->
|
3394
|
-
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])
|
3394
|
+
<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">
|
3395
3395
|
|
3396
3396
|
<!-- list of footnotes to calculate actual footnotes number -->
|
3397
3397
|
<xsl:variable name="p_fn_">
|
@@ -3448,8 +3448,7 @@
|
|
3448
3448
|
</fo:basic-link>
|
3449
3449
|
</fo:inline>
|
3450
3450
|
</xsl:variable>
|
3451
|
-
|
3452
|
-
gen_id=<xsl:value-of select="$gen_id"/> -->
|
3451
|
+
|
3453
3452
|
<xsl:choose>
|
3454
3453
|
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
3455
3454
|
<xsl:copy-of select="$footnote_inline"/>
|
@@ -3504,7 +3503,7 @@
|
|
3504
3503
|
<!-- commented:
|
3505
3504
|
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
3506
3505
|
because 'fn' there is in biblio-tag -->
|
3507
|
-
<xsl:for-each select=".//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])
|
3506
|
+
<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])]">
|
3508
3507
|
<!-- copy unique fn -->
|
3509
3508
|
<fn gen_id="{generate-id(.)}">
|
3510
3509
|
<xsl:copy-of select="@*"/>
|
@@ -6067,7 +6066,9 @@
|
|
6067
6066
|
|
6068
6067
|
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
|
6069
6068
|
<xsl:if test="number($scale) < 100">
|
6070
|
-
|
6069
|
+
|
6070
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
6071
|
+
|
6071
6072
|
</xsl:if>
|
6072
6073
|
|
6073
6074
|
</xsl:if>
|
@@ -7081,6 +7082,12 @@
|
|
7081
7082
|
</xsl:attribute>
|
7082
7083
|
</xsl:for-each>
|
7083
7084
|
|
7085
|
+
<!-- remove margin between rows in the table with sourcecode line numbers -->
|
7086
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
|
7087
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
7088
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
7089
|
+
</xsl:if>
|
7090
|
+
|
7084
7091
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
7085
7092
|
</fo:block>
|
7086
7093
|
|
@@ -7129,7 +7136,7 @@
|
|
7129
7136
|
</xsl:template>
|
7130
7137
|
|
7131
7138
|
<!-- outer table with line numbers for sourcecode -->
|
7132
|
-
<xsl:template match="*[local-name()='
|
7139
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
|
7133
7140
|
<fo:block>
|
7134
7141
|
<fo:table width="100%" table-layout="fixed">
|
7135
7142
|
<xsl:copy-of select="@id"/>
|
@@ -7141,16 +7148,16 @@
|
|
7141
7148
|
</fo:table>
|
7142
7149
|
</fo:block>
|
7143
7150
|
</xsl:template>
|
7144
|
-
<xsl:template match="*[local-name()='
|
7151
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']/*[local-name() = 'tbody']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
|
7145
7152
|
<xsl:apply-templates/>
|
7146
7153
|
</xsl:template>
|
7147
|
-
<xsl:template match="*[local-name()='
|
7154
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
|
7148
7155
|
<fo:table-row>
|
7149
7156
|
<xsl:apply-templates/>
|
7150
7157
|
</fo:table-row>
|
7151
7158
|
</xsl:template>
|
7152
7159
|
<!-- first td with line numbers -->
|
7153
|
-
<xsl:template match="*[local-name()='
|
7160
|
+
<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'] -->
|
7154
7161
|
<fo:table-cell>
|
7155
7162
|
<fo:block>
|
7156
7163
|
|
@@ -7170,8 +7177,9 @@
|
|
7170
7177
|
</fo:block>
|
7171
7178
|
</fo:table-cell>
|
7172
7179
|
</xsl:template>
|
7180
|
+
|
7173
7181
|
<!-- second td with sourcecode -->
|
7174
|
-
<xsl:template match="*[local-name()='
|
7182
|
+
<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'] -->
|
7175
7183
|
<fo:table-cell>
|
7176
7184
|
<fo:block>
|
7177
7185
|
<xsl:apply-templates/>
|
@@ -7409,7 +7417,25 @@
|
|
7409
7417
|
<xsl:template match="*[local-name()='pre']" name="pre">
|
7410
7418
|
<fo:block xsl:use-attribute-sets="pre-style">
|
7411
7419
|
<xsl:copy-of select="@id"/>
|
7412
|
-
<xsl:
|
7420
|
+
<xsl:choose>
|
7421
|
+
|
7422
|
+
<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' -->
|
7423
|
+
<xsl:if test="ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']"> <!-- is current tr isn't last -->
|
7424
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
7425
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
7426
|
+
</xsl:if>
|
7427
|
+
<fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
|
7428
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
7429
|
+
<mtext><xsl:value-of select="."/></mtext>
|
7430
|
+
</math>
|
7431
|
+
</fo:instream-foreign-object>
|
7432
|
+
</xsl:when>
|
7433
|
+
|
7434
|
+
<xsl:otherwise>
|
7435
|
+
<xsl:apply-templates/>
|
7436
|
+
</xsl:otherwise>
|
7437
|
+
|
7438
|
+
</xsl:choose>
|
7413
7439
|
</fo:block>
|
7414
7440
|
</xsl:template>
|
7415
7441
|
<!-- =============== -->
|
data/lib/metanorma/un/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-un
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.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-
|
11
|
+
date: 2022-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iso-639
|