metanorma-plateau 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/plateau/i18n.rb +8 -0
- data/lib/isodoc/plateau/plateau.international-standard.xsl +214 -91
- data/lib/metanorma/plateau/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: fad22267453817d7dd050971e3b16fd34fd304f4332883a236a99b780541af1e
|
4
|
+
data.tar.gz: 1d9f8a76a3b02fcab621de3b1001f25fad38470d58fdd7029fedf11ad98ee72f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46f87d72ac600e73e6b9d9e176b2cb3a35a78ce732333375c1e2f7daef8bcc0c80ddacf720b21361af70bd65ae15b6cbb0dafa05d43aeef9a93a9227781fc1ef
|
7
|
+
data.tar.gz: a837b067e6c8b9420177f80ebf04add84cd91584cce67613afe9489d12a940fdb3d2774abf156547b69c0cb0417712543feb7e2b8189edfe91b817db56955d24
|
data/lib/isodoc/plateau/i18n.rb
CHANGED
@@ -13,6 +13,14 @@ module IsoDoc
|
|
13
13
|
y = load_file("i18n-#{yaml_lang(lang, script)}.yaml")
|
14
14
|
y.empty? ? load_file("i18n-en.yaml").merge(super) : super.deep_merge(y)
|
15
15
|
end
|
16
|
+
|
17
|
+
# Numeric regnal year
|
18
|
+
def japanese_year(time)
|
19
|
+
era_yr = time.era_year.to_i
|
20
|
+
"#{time.strftime('%JN')}#{era_yr}年"
|
21
|
+
rescue StandardError
|
22
|
+
time.year.to_s
|
23
|
+
end
|
16
24
|
end
|
17
25
|
end
|
18
26
|
end
|
@@ -237,7 +237,7 @@
|
|
237
237
|
<!-- ========================== -->
|
238
238
|
|
239
239
|
<!-- Preface pages -->
|
240
|
-
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or
|
240
|
+
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">
|
241
241
|
|
242
242
|
<xsl:choose>
|
243
243
|
<xsl:when test="*[local-name() = 'clause'][@type = 'toc']">
|
@@ -305,7 +305,7 @@
|
|
305
305
|
<!-- END Preface and contents pages -->
|
306
306
|
<!-- ========================== -->
|
307
307
|
|
308
|
-
<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or
|
308
|
+
<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">
|
309
309
|
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
310
310
|
|
311
311
|
<xsl:attribute name="master-reference">
|
@@ -460,9 +460,8 @@
|
|
460
460
|
</xsl:for-each>
|
461
461
|
</xsl:element>
|
462
462
|
|
463
|
-
<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
|
464
|
-
|
465
463
|
<xsl:call-template name="insertAnnexInSeparatePageSequences"/>
|
464
|
+
<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
|
466
465
|
<xsl:call-template name="insertIndexInSeparatePageSequences"/>
|
467
466
|
|
468
467
|
</xsl:element>
|
@@ -538,7 +537,7 @@
|
|
538
537
|
</xsl:when>
|
539
538
|
<xsl:otherwise>
|
540
539
|
<xsl:choose>
|
541
|
-
<xsl:when test="@type = 'annex' or @type = 'bibliography'">
|
540
|
+
<xsl:when test="@type = 'annex' or @type = 'bibliography' or @type = 'index'">
|
542
541
|
<fo:block space-after="5pt">
|
543
542
|
<xsl:call-template name="insertTocItem"/>
|
544
543
|
</fo:block>
|
@@ -1728,6 +1727,36 @@
|
|
1728
1727
|
</fo:block-container>
|
1729
1728
|
</xsl:template>
|
1730
1729
|
|
1730
|
+
<!-- =================== -->
|
1731
|
+
<!-- Index processing -->
|
1732
|
+
<!-- =================== -->
|
1733
|
+
<xsl:template match="plateau:indexsect">
|
1734
|
+
<fo:block id="{@id}" span="all">
|
1735
|
+
<xsl:apply-templates select="plateau:title"/>
|
1736
|
+
</fo:block>
|
1737
|
+
<fo:block role="Index">
|
1738
|
+
<xsl:apply-templates select="*[not(self::plateau:title)]"/>
|
1739
|
+
</fo:block>
|
1740
|
+
</xsl:template>
|
1741
|
+
|
1742
|
+
<xsl:template match="plateau:xref[@pagenumber = 'true']" priority="2">
|
1743
|
+
<xsl:call-template name="insert_basic_link">
|
1744
|
+
<xsl:with-param name="element">
|
1745
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
1746
|
+
<fo:inline>
|
1747
|
+
<xsl:if test="@id">
|
1748
|
+
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
1749
|
+
</xsl:if>
|
1750
|
+
<fo:page-number-citation ref-id="{@target}"/>
|
1751
|
+
</fo:inline>
|
1752
|
+
</fo:basic-link>
|
1753
|
+
</xsl:with-param>
|
1754
|
+
</xsl:call-template>
|
1755
|
+
</xsl:template>
|
1756
|
+
<!-- =================== -->
|
1757
|
+
<!-- End of Index processing -->
|
1758
|
+
<!-- =================== -->
|
1759
|
+
|
1731
1760
|
<xsl:template name="insertHeaderFooter">
|
1732
1761
|
<xsl:call-template name="insertHeader"/>
|
1733
1762
|
<fo:static-content flow-name="footer">
|
@@ -3430,6 +3459,10 @@
|
|
3430
3459
|
<xsl:attribute-set name="indexsect-title-style">
|
3431
3460
|
<xsl:attribute name="role">H1</xsl:attribute>
|
3432
3461
|
|
3462
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3463
|
+
<xsl:attribute name="span">all</xsl:attribute>
|
3464
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
3465
|
+
|
3433
3466
|
</xsl:attribute-set>
|
3434
3467
|
|
3435
3468
|
<xsl:attribute-set name="indexsect-clause-title-style">
|
@@ -5125,7 +5158,9 @@
|
|
5125
5158
|
<fo:block role="SKIP">
|
5126
5159
|
|
5127
5160
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
5128
|
-
|
5161
|
+
|
5162
|
+
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
5163
|
+
|
5129
5164
|
</xsl:if>
|
5130
5165
|
|
5131
5166
|
<xsl:apply-templates/>
|
@@ -6150,7 +6185,17 @@
|
|
6150
6185
|
<xsl:call-template name="refine_dt-cell-style"/>
|
6151
6186
|
|
6152
6187
|
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
6153
|
-
|
6188
|
+
|
6189
|
+
<xsl:choose>
|
6190
|
+
<xsl:when test="$isGenerateTableIF = 'true'">
|
6191
|
+
|
6192
|
+
<xsl:copy-of select="@id"/>
|
6193
|
+
|
6194
|
+
</xsl:when>
|
6195
|
+
<xsl:otherwise>
|
6196
|
+
<xsl:copy-of select="@id"/>
|
6197
|
+
</xsl:otherwise>
|
6198
|
+
</xsl:choose>
|
6154
6199
|
|
6155
6200
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
6156
6201
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
@@ -6182,7 +6227,9 @@
|
|
6182
6227
|
<fo:block role="SKIP">
|
6183
6228
|
|
6184
6229
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
6185
|
-
|
6230
|
+
|
6231
|
+
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
6232
|
+
|
6186
6233
|
</xsl:if>
|
6187
6234
|
|
6188
6235
|
<xsl:choose>
|
@@ -7420,6 +7467,14 @@
|
|
7420
7467
|
</xsl:for-each>
|
7421
7468
|
</xsl:variable>
|
7422
7469
|
|
7470
|
+
<!-- <xsl:if test="$debug = 'true'">
|
7471
|
+
<redirect:write file="{generate-id()}_words_with_width_sorted.xml">
|
7472
|
+
<td_text><xsl:copy-of select="$td_text"/></td_text>
|
7473
|
+
<words_with_width><xsl:copy-of select="$words_with_width"/></words_with_width>
|
7474
|
+
<xsl:copy-of select="$words_with_width_sorted"/>
|
7475
|
+
</redirect:write>
|
7476
|
+
</xsl:if> -->
|
7477
|
+
|
7423
7478
|
<xsl:variable name="words">
|
7424
7479
|
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
|
7425
7480
|
<word>
|
@@ -7545,6 +7600,7 @@
|
|
7545
7600
|
<xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
|
7546
7601
|
<xsl:if test="ancestor::*[local-name() = 'sourcecode']"><tag>sourcecode</tag></xsl:if>
|
7547
7602
|
<xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
|
7603
|
+
<xsl:if test="ancestor::*[local-name() = 'font_en_vertical']"><tag>font_en_vertical</tag></xsl:if>
|
7548
7604
|
</tags>
|
7549
7605
|
</xsl:template>
|
7550
7606
|
<!-- =============================== -->
|
@@ -8085,7 +8141,16 @@
|
|
8085
8141
|
</xsl:when>
|
8086
8142
|
<xsl:otherwise>
|
8087
8143
|
<!-- output text from <link>text</link> -->
|
8088
|
-
<xsl:
|
8144
|
+
<xsl:choose>
|
8145
|
+
<xsl:when test="starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.')">
|
8146
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
8147
|
+
<xsl:with-param name="text" select="."/>
|
8148
|
+
</xsl:call-template>
|
8149
|
+
</xsl:when>
|
8150
|
+
<xsl:otherwise>
|
8151
|
+
<xsl:apply-templates/>
|
8152
|
+
</xsl:otherwise>
|
8153
|
+
</xsl:choose>
|
8089
8154
|
</xsl:otherwise>
|
8090
8155
|
</xsl:choose>
|
8091
8156
|
</fo:basic-link>
|
@@ -8724,16 +8789,29 @@
|
|
8724
8789
|
<xsl:template name="getImageSrc">
|
8725
8790
|
<xsl:choose>
|
8726
8791
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
8792
|
+
<xsl:call-template name="getImageSrcExternal"/>
|
8793
|
+
</xsl:when>
|
8794
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
8795
|
+
</xsl:choose>
|
8796
|
+
</xsl:template>
|
8797
|
+
|
8798
|
+
<xsl:template name="getImageSrcExternal">
|
8799
|
+
<xsl:choose>
|
8800
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
8801
|
+
<xsl:value-of select="@src"/>
|
8802
|
+
</xsl:when>
|
8803
|
+
<xsl:otherwise>
|
8804
|
+
<xsl:variable name="src_with_basepath" select="concat($basepath, @src)"/>
|
8805
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($src_with_basepath)))"/>
|
8727
8806
|
<xsl:choose>
|
8728
|
-
<xsl:when test="
|
8729
|
-
<xsl:value-of select="
|
8807
|
+
<xsl:when test="$file_exists = 'true'">
|
8808
|
+
<xsl:value-of select="$src_with_basepath"/>
|
8730
8809
|
</xsl:when>
|
8731
8810
|
<xsl:otherwise>
|
8732
|
-
<xsl:value-of select="
|
8811
|
+
<xsl:value-of select="@src"/>
|
8733
8812
|
</xsl:otherwise>
|
8734
8813
|
</xsl:choose>
|
8735
|
-
</xsl:
|
8736
|
-
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
8814
|
+
</xsl:otherwise>
|
8737
8815
|
</xsl:choose>
|
8738
8816
|
</xsl:template>
|
8739
8817
|
|
@@ -8781,14 +8859,8 @@
|
|
8781
8859
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
8782
8860
|
</xsl:when>
|
8783
8861
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
8784
|
-
<xsl:
|
8785
|
-
|
8786
|
-
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
8787
|
-
</xsl:when>
|
8788
|
-
<xsl:otherwise>
|
8789
|
-
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
8790
|
-
</xsl:otherwise>
|
8791
|
-
</xsl:choose>
|
8862
|
+
<xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
|
8863
|
+
<xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
|
8792
8864
|
</xsl:when>
|
8793
8865
|
<xsl:otherwise>
|
8794
8866
|
<xsl:value-of select="@src"/>
|
@@ -8809,16 +8881,8 @@
|
|
8809
8881
|
</svg>
|
8810
8882
|
</xsl:when>
|
8811
8883
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
8812
|
-
<xsl:variable name="
|
8813
|
-
|
8814
|
-
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
8815
|
-
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
8816
|
-
</xsl:when>
|
8817
|
-
<xsl:otherwise>
|
8818
|
-
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
8819
|
-
</xsl:otherwise>
|
8820
|
-
</xsl:choose>
|
8821
|
-
</xsl:variable>
|
8884
|
+
<xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
|
8885
|
+
<xsl:variable name="src" select="concat('url(file:///', $src_external, ')')"/>
|
8822
8886
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
8823
8887
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
8824
8888
|
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
@@ -12101,6 +12165,8 @@
|
|
12101
12165
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
12102
12166
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
12103
12167
|
|
12168
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
12169
|
+
|
12104
12170
|
<xsl:apply-templates/>
|
12105
12171
|
</fo:block>
|
12106
12172
|
</xsl:template>
|
@@ -12935,7 +13001,9 @@
|
|
12935
13001
|
<xsl:template name="add_id">
|
12936
13002
|
<xsl:if test="not(@id)">
|
12937
13003
|
<!-- add @id - first element with @id plus '_element_name' -->
|
12938
|
-
<xsl:
|
13004
|
+
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
13005
|
+
<xsl:variable name="prefix_id"><xsl:value-of select="$prefix_id_"/><xsl:if test="normalize-space($prefix_id_) = ''"><xsl:value-of select="generate-id()"/></xsl:if></xsl:variable>
|
13006
|
+
<xsl:attribute name="id"><xsl:value-of select="$prefix_id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
|
12939
13007
|
</xsl:if>
|
12940
13008
|
</xsl:template>
|
12941
13009
|
|
@@ -13974,7 +14042,14 @@
|
|
13974
14042
|
<xsl:variable name="title">
|
13975
14043
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
13976
14044
|
|
13977
|
-
<xsl:
|
14045
|
+
<xsl:choose>
|
14046
|
+
<xsl:when test="*[local-name() = 'title'][@language = $lang and @type = 'main']">
|
14047
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
|
14048
|
+
</xsl:when>
|
14049
|
+
<xsl:otherwise>
|
14050
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'title-main']"/>
|
14051
|
+
</xsl:otherwise>
|
14052
|
+
</xsl:choose>
|
13978
14053
|
|
13979
14054
|
</xsl:for-each>
|
13980
14055
|
</xsl:variable>
|
@@ -14345,6 +14420,7 @@
|
|
14345
14420
|
<xsl:param name="formatted">false</xsl:param>
|
14346
14421
|
<xsl:param name="lang"/>
|
14347
14422
|
<xsl:param name="returnEmptyIfNotFound">false</xsl:param>
|
14423
|
+
<xsl:param name="bibdata_updated"/>
|
14348
14424
|
|
14349
14425
|
<xsl:variable name="curr_lang">
|
14350
14426
|
<xsl:choose>
|
@@ -14358,6 +14434,9 @@
|
|
14358
14434
|
|
14359
14435
|
<xsl:variable name="data_value">
|
14360
14436
|
<xsl:choose>
|
14437
|
+
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
|
14438
|
+
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14439
|
+
</xsl:when>
|
14361
14440
|
<xsl:when test="$formatted = 'true'">
|
14362
14441
|
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14363
14442
|
</xsl:when>
|
@@ -14529,14 +14608,8 @@
|
|
14529
14608
|
<xsl:value-of select="$src"/>
|
14530
14609
|
</xsl:when>
|
14531
14610
|
<xsl:otherwise>
|
14532
|
-
<xsl:
|
14533
|
-
|
14534
|
-
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
14535
|
-
</xsl:when>
|
14536
|
-
<xsl:otherwise>
|
14537
|
-
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
14538
|
-
</xsl:otherwise>
|
14539
|
-
</xsl:choose>
|
14611
|
+
<xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
|
14612
|
+
<xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
|
14540
14613
|
</xsl:otherwise>
|
14541
14614
|
</xsl:choose>
|
14542
14615
|
</xsl:template>
|
@@ -14558,15 +14631,23 @@
|
|
14558
14631
|
<!-- END: insert cover page image -->
|
14559
14632
|
|
14560
14633
|
<!-- https://github.com/metanorma/docs/blob/main/109.adoc -->
|
14634
|
+
<xsl:variable name="regex_ja_spec_half_width_">
|
14635
|
+
\u0028 <!-- U+0028 LEFT PARENTHESIS (() -->
|
14636
|
+
\u0029 <!-- U+0029 RIGHT PARENTHESIS ()) -->
|
14637
|
+
\u007B <!-- U+007B LEFT CURLY BRACKET ({) -->
|
14638
|
+
\u007D <!-- U+007D RIGHT CURLY BRACKET (}) -->
|
14639
|
+
\uFF62 <!-- U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) -->
|
14640
|
+
\uFF63 <!-- U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」) -->
|
14641
|
+
\u005B <!-- U+005B LEFT SQUARE BRACKET ([) -->
|
14642
|
+
\u005D <!-- U+005D RIGHT SQUARE BRACKET (]) -->
|
14643
|
+
</xsl:variable>
|
14644
|
+
<xsl:variable name="regex_ja_spec_half_width" select="translate(normalize-space($regex_ja_spec_half_width_), ' ', '')"/>
|
14561
14645
|
<xsl:variable name="regex_ja_spec_">[
|
14562
14646
|
<!-- Rotate 90° clockwise -->
|
14563
|
-
|
14647
|
+
<xsl:value-of select="$regex_ja_spec_half_width"/>
|
14564
14648
|
\uFF08 <!-- U+FF08 FULLWIDTH LEFT PARENTHESIS (() -->
|
14565
|
-
\u0029 <!-- U+0029 RIGHT PARENTHESIS ()) -->
|
14566
14649
|
\uFF09 <!-- U+FF09 FULLWIDTH RIGHT PARENTHESIS ()) -->
|
14567
|
-
\u007B <!-- U+007B LEFT CURLY BRACKET ({) -->
|
14568
14650
|
\uFF5B <!-- U+FF5B FULLWIDTH LEFT CURLY BRACKET ({) -->
|
14569
|
-
\u007D <!-- U+007D RIGHT CURLY BRACKET (}) -->
|
14570
14651
|
\uFF5D <!-- U+FF5D FULLWIDTH RIGHT CURLY BRACKET (}) -->
|
14571
14652
|
\u3014 <!-- U+3014 LEFT TORTOISE SHELL BRACKET (〔) -->
|
14572
14653
|
\u3015 <!-- U+3015 RIGHT TORTOISE SHELL BRACKET (〕) -->
|
@@ -14574,21 +14655,16 @@
|
|
14574
14655
|
\u3011 <!-- U+3011 RIGHT BLACK LENTICULAR BRACKET (】) -->
|
14575
14656
|
\u300A <!-- U+300A LEFT DOUBLE ANGLE BRACKET (《) -->
|
14576
14657
|
\u300B <!-- U+300B RIGHT DOUBLE ANGLE BRACKET (》) -->
|
14577
|
-
\uFF62 <!-- U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) -->
|
14578
14658
|
\u300C <!-- U+300C LEFT CORNER BRACKET (「) -->
|
14579
|
-
\uFF63 <!-- U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」) -->
|
14580
14659
|
\u300D <!-- U+300D RIGHT CORNER BRACKET (」) -->
|
14581
14660
|
\u300E <!-- U+300E LEFT WHITE CORNER BRACKET (『) -->
|
14582
14661
|
\u300F <!-- U+300F RIGHT WHITE CORNER BRACKET (』) -->
|
14583
|
-
\u005B <!-- U+005B LEFT SQUARE BRACKET ([) -->
|
14584
14662
|
\uFF3B <!-- U+FF3B FULLWIDTH LEFT SQUARE BRACKET ([) -->
|
14585
|
-
\u005D <!-- U+005D RIGHT SQUARE BRACKET (]) -->
|
14586
14663
|
\uFF3D <!-- U+FF3D FULLWIDTH RIGHT SQUARE BRACKET (]) -->
|
14587
14664
|
\u3008 <!-- U+3008 LEFT ANGLE BRACKET (〈) -->
|
14588
14665
|
\u3009 <!-- U+3009 RIGHT ANGLE BRACKET (〉) -->
|
14589
14666
|
\u3016 <!-- U+3016 LEFT WHITE LENTICULAR BRACKET (〖) -->
|
14590
14667
|
\u3017 <!-- U+3017 RIGHT WHITE LENTICULAR BRACKET (〗) -->
|
14591
|
-
|
14592
14668
|
\u301A <!-- U+301A LEFT WHITE SQUARE BRACKET (〚) -->
|
14593
14669
|
\u301B <!-- U+301B RIGHT WHITE SQUARE BRACKET (〛) -->
|
14594
14670
|
\u301C <!-- U+301C WAVE DASH (〜) -->
|
@@ -14620,6 +14696,7 @@
|
|
14620
14696
|
<xsl:variable name="regex_ja_spec"><xsl:value-of select="translate(normalize-space($regex_ja_spec_), ' ', '')"/></xsl:variable>
|
14621
14697
|
<xsl:template name="insertVerticalChar">
|
14622
14698
|
<xsl:param name="str"/>
|
14699
|
+
<xsl:param name="char_prev"/>
|
14623
14700
|
<xsl:param name="writing-mode">lr-tb</xsl:param>
|
14624
14701
|
<xsl:param name="reference-orientation">90</xsl:param>
|
14625
14702
|
<xsl:param name="add_zero_width_space">false</xsl:param>
|
@@ -14629,53 +14706,99 @@
|
|
14629
14706
|
</xsl:when>
|
14630
14707
|
<xsl:otherwise>
|
14631
14708
|
<xsl:if test="string-length($str) > 0">
|
14632
|
-
|
14709
|
+
|
14710
|
+
<!-- <xsl:variable name="horizontal_mode" select="normalize-space(ancestor::*[local-name() = 'span'][@class = 'horizontal'] and 1 = 1)"/> -->
|
14633
14711
|
<xsl:variable name="char" select="substring($str,1,1)"/>
|
14634
|
-
<
|
14635
|
-
|
14636
|
-
|
14637
|
-
|
14638
|
-
|
14639
|
-
<xsl:
|
14640
|
-
<
|
14641
|
-
|
14642
|
-
|
14643
|
-
|
14644
|
-
|
14645
|
-
|
14646
|
-
|
14647
|
-
|
14648
|
-
|
14649
|
-
|
14650
|
-
|
14651
|
-
|
14652
|
-
|
14653
|
-
|
14654
|
-
|
14655
|
-
|
14656
|
-
</xsl:
|
14657
|
-
|
14712
|
+
<xsl:variable name="char_next" select="substring($str,2,1)"/>
|
14713
|
+
|
14714
|
+
<xsl:variable name="char_half_width" select="normalize-space(java:matches(java:java.lang.String.new($char), concat('([', $regex_ja_spec_half_width, ']{1,})')))"/>
|
14715
|
+
|
14716
|
+
<xsl:choose>
|
14717
|
+
<xsl:when test="$char_half_width = 'true'">
|
14718
|
+
<fo:inline>
|
14719
|
+
<xsl:attribute name="baseline-shift">7%</xsl:attribute>
|
14720
|
+
<xsl:value-of select="$char"/>
|
14721
|
+
</fo:inline>
|
14722
|
+
</xsl:when>
|
14723
|
+
<xsl:otherwise>
|
14724
|
+
<!-- namespace-uri(ancestor::*[local-name() = 'title']) != '' to skip title from $contents -->
|
14725
|
+
<xsl:if test="namespace-uri(ancestor::*[local-name() = 'title']) != '' and ($char_prev = '' and ../preceding-sibling::node())">
|
14726
|
+
<fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
14727
|
+
</xsl:if>
|
14728
|
+
<fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm" role="SKIP" text-align-last="center">
|
14729
|
+
<xsl:if test="normalize-space($writing-mode) != ''">
|
14730
|
+
<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
|
14731
|
+
<xsl:attribute name="reference-orientation">90</xsl:attribute>
|
14732
|
+
</xsl:if>
|
14733
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
|
14734
|
+
<xsl:attribute name="reference-orientation">0</xsl:attribute>
|
14735
|
+
</xsl:if>
|
14736
|
+
<xsl:if test="$char = '゜' or $char = '。' or $char = '﹒' or $char = '.'">
|
14737
|
+
<!-- Rotate 180°:
|
14738
|
+
U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK (゜)
|
14739
|
+
U+3002 IDEOGRAPHIC FULL STOP (。)
|
14740
|
+
U+FE52 SMALL FULL STOP (﹒)
|
14741
|
+
U+FF0E FULLWIDTH FULL STOP (.)
|
14742
|
+
-->
|
14743
|
+
<xsl:attribute name="reference-orientation">-90</xsl:attribute>
|
14744
|
+
</xsl:if>
|
14745
|
+
<fo:block-container width="1em" role="SKIP"><!-- border="0.5pt solid blue" -->
|
14746
|
+
<fo:block line-height="1em" role="SKIP">
|
14747
|
+
<!-- <xsl:choose>
|
14748
|
+
<xsl:when test="$horizontal_mode = 'true'">
|
14749
|
+
<xsl:value-of select="$str"/>
|
14750
|
+
</xsl:when>
|
14751
|
+
<xsl:otherwise>
|
14752
|
+
<xsl:value-of select="$char"/>
|
14753
|
+
</xsl:otherwise>
|
14754
|
+
</xsl:choose> -->
|
14658
14755
|
<xsl:value-of select="$char"/>
|
14659
|
-
</
|
14660
|
-
</
|
14661
|
-
</fo:
|
14662
|
-
|
14663
|
-
|
14664
|
-
|
14665
|
-
|
14666
|
-
|
14667
|
-
|
14668
|
-
|
14669
|
-
|
14670
|
-
<xsl:
|
14671
|
-
|
14672
|
-
|
14673
|
-
|
14756
|
+
</fo:block>
|
14757
|
+
</fo:block-container>
|
14758
|
+
</fo:inline-container>
|
14759
|
+
<xsl:if test="namespace-uri(ancestor::*[local-name() = 'title']) != '' and ($char_next != '' or ../following-sibling::node())">
|
14760
|
+
<fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
14761
|
+
</xsl:if>
|
14762
|
+
</xsl:otherwise>
|
14763
|
+
</xsl:choose>
|
14764
|
+
|
14765
|
+
<xsl:if test="$add_zero_width_space = 'true' and ($char = ',' or $char = '.' or $char = ' ' or $char = '·' or $char = ')' or $char = ']' or $char = '}' or $char = '/')"><xsl:value-of select="$zero_width_space"/></xsl:if>
|
14766
|
+
<!-- <xsl:if test="$horizontal_mode = 'false'"> -->
|
14767
|
+
<xsl:call-template name="insertVerticalChar">
|
14768
|
+
<xsl:with-param name="str" select="substring($str, 2)"/>
|
14769
|
+
<xsl:with-param name="char_prev" select="$char"/>
|
14770
|
+
<xsl:with-param name="writing-mode" select="$writing-mode"/>
|
14771
|
+
<xsl:with-param name="reference-orientation" select="$reference-orientation"/>
|
14772
|
+
<xsl:with-param name="add_zero_width_space" select="$add_zero_width_space"/>
|
14773
|
+
</xsl:call-template>
|
14774
|
+
<!-- </xsl:if> -->
|
14674
14775
|
</xsl:if>
|
14675
14776
|
</xsl:otherwise>
|
14676
14777
|
</xsl:choose>
|
14677
14778
|
</xsl:template>
|
14678
14779
|
|
14780
|
+
<xsl:template name="insertHorizontalChars">
|
14781
|
+
<xsl:param name="str"/>
|
14782
|
+
<xsl:param name="writing-mode">lr-tb</xsl:param>
|
14783
|
+
<xsl:param name="reference-orientation">90</xsl:param>
|
14784
|
+
<xsl:param name="add_zero_width_space">false</xsl:param>
|
14785
|
+
<xsl:choose>
|
14786
|
+
<xsl:otherwise>
|
14787
|
+
<fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm" role="SKIP">
|
14788
|
+
<xsl:if test="normalize-space($writing-mode) != ''">
|
14789
|
+
<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
|
14790
|
+
<xsl:attribute name="reference-orientation">90</xsl:attribute>
|
14791
|
+
</xsl:if>
|
14792
|
+
<fo:block-container width="1em" role="SKIP"> <!-- border="0.5pt solid green" -->
|
14793
|
+
<fo:block line-height="1em" role="SKIP">
|
14794
|
+
<xsl:value-of select="$str"/>
|
14795
|
+
</fo:block>
|
14796
|
+
</fo:block-container>
|
14797
|
+
</fo:inline-container>
|
14798
|
+
</xsl:otherwise>
|
14799
|
+
</xsl:choose>
|
14800
|
+
</xsl:template>
|
14801
|
+
|
14679
14802
|
<xsl:template name="number-to-words">
|
14680
14803
|
<xsl:param name="number"/>
|
14681
14804
|
<xsl:param name="first"/>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-plateau
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-jis
|