metanorma-plateau 1.2.7 → 1.2.8
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/plateau/plateau.international-standard.xsl +168 -16
- data/lib/metanorma/plateau/version.rb +1 -1
- data/metanorma-plateau.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca345b6faf3c2b9ce8430af78e01a904d4abeafc168955d0d0bf6a4fc3a36acd
|
|
4
|
+
data.tar.gz: 7f808916fe80638d5e3fe80a4ca78c6e2ec1f19d757a2fe0732b0c21c05ec8a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3ede02fbfe34ebc32c4b0815c6bf79af3f1779869746d9740ee84e9b87ad1bac513579322524372764265acf7583a9e707e5a19d1ceea5d4f1c52a317bb54521
|
|
7
|
+
data.tar.gz: 46671628a599fa56f916a00586e1c7ab12da96c84a018765533dab8d328a34812968250025f333cc6517eee06d72d85d3b054df7a209c12952c3ac2c2c45dc72
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
<xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:fmt-name))]" use="@reference"/>
|
|
6
6
|
|
|
7
|
+
<xsl:key name="kid" match="*" use="@id"/>
|
|
8
|
+
|
|
7
9
|
<xsl:variable name="debug">false</xsl:variable>
|
|
8
10
|
|
|
9
11
|
<!-- <xsl:variable name="isIgnoreComplexScripts">true</xsl:variable> -->
|
|
@@ -888,6 +890,7 @@
|
|
|
888
890
|
</xsl:template>
|
|
889
891
|
|
|
890
892
|
<xsl:template match="mn:preface/mn:page_sequence/mn:clause" priority="3">
|
|
893
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
891
894
|
<fo:block>
|
|
892
895
|
<xsl:call-template name="setId"/>
|
|
893
896
|
<xsl:call-template name="addReviewHelper"/>
|
|
@@ -950,9 +953,13 @@
|
|
|
950
953
|
<styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"/></styles>
|
|
951
954
|
</xsl:variable>
|
|
952
955
|
|
|
956
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
953
957
|
<xsl:choose>
|
|
954
958
|
<xsl:when test="@inline-header = 'true' and following-sibling::*[1][self::mn:p]">
|
|
955
959
|
<fo:block role="H{$level}">
|
|
960
|
+
<xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
|
|
961
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
|
962
|
+
<xsl:apply-templates/>
|
|
956
963
|
<xsl:for-each select="following-sibling::*[1][self::mn:p]">
|
|
957
964
|
<xsl:call-template name="paragraph">
|
|
958
965
|
<xsl:with-param name="inline-header">true</xsl:with-param>
|
|
@@ -991,6 +998,8 @@
|
|
|
991
998
|
</xsl:choose>
|
|
992
999
|
</xsl:if>
|
|
993
1000
|
|
|
1001
|
+
<xsl:call-template name="setIDforNamedDestinationInline"/>
|
|
1002
|
+
|
|
994
1003
|
<xsl:call-template name="extractTitle"/>
|
|
995
1004
|
|
|
996
1005
|
<xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
|
@@ -1009,6 +1018,7 @@
|
|
|
1009
1018
|
</xsl:template>
|
|
1010
1019
|
|
|
1011
1020
|
<xsl:template match="mn:sections/mn:page_sequence//mn:clause" priority="20">
|
|
1021
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
1012
1022
|
<fo:block keep-with-next="always">
|
|
1013
1023
|
<fo:block id="{@id}"/>
|
|
1014
1024
|
</fo:block>
|
|
@@ -1017,6 +1027,7 @@
|
|
|
1017
1027
|
|
|
1018
1028
|
<!-- indent for clause level 4 and more -->
|
|
1019
1029
|
<xsl:template match="mn:sections/mn:page_sequence//mn:clause[mn:fmt-title[@depth >= 4]]" priority="20">
|
|
1030
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
1020
1031
|
<fo:block keep-with-next="always">
|
|
1021
1032
|
<fo:block id="{@id}"/>
|
|
1022
1033
|
</fo:block>
|
|
@@ -1040,6 +1051,7 @@
|
|
|
1040
1051
|
</xsl:template>
|
|
1041
1052
|
|
|
1042
1053
|
<xsl:template match="mn:annex" priority="2">
|
|
1054
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
1043
1055
|
<fo:block id="{@id}">
|
|
1044
1056
|
</fo:block>
|
|
1045
1057
|
<xsl:apply-templates/>
|
|
@@ -1060,11 +1072,14 @@
|
|
|
1060
1072
|
<xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
|
|
1061
1073
|
<xsl:variable name="element-name">
|
|
1062
1074
|
<xsl:choose>
|
|
1075
|
+
<xsl:when test="preceding-sibling::*[1][self::mn:fmt-title]/@inline-header = 'true'">fo:inline</xsl:when>
|
|
1063
1076
|
<xsl:when test="ancestor::mn:figure and parent::mn:note[not(@type = 'units')]">fo:inline</xsl:when>
|
|
1064
1077
|
<xsl:otherwise>fo:block</xsl:otherwise>
|
|
1065
1078
|
</xsl:choose>
|
|
1066
1079
|
</xsl:variable>
|
|
1067
1080
|
|
|
1081
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
1082
|
+
|
|
1068
1083
|
<xsl:variable name="p_styles">
|
|
1069
1084
|
<styles xsl:use-attribute-sets="p-style">
|
|
1070
1085
|
<xsl:call-template name="refine_p-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template>
|
|
@@ -1423,7 +1438,7 @@
|
|
|
1423
1438
|
<xsl:variable name="tag_font_en_bold_open">###<xsl:value-of select="$element_name_font_en_bold"/>###</xsl:variable>
|
|
1424
1439
|
<xsl:variable name="tag_font_en_bold_close">###/<xsl:value-of select="$element_name_font_en_bold"/>###</xsl:variable>
|
|
1425
1440
|
|
|
1426
|
-
<xsl:template match="mn:p//text()[not(ancestor::mn:strong) and not(ancestor::mn:fmt-stem)] | mn:dt
|
|
1441
|
+
<xsl:template match="mn:p//text()[not(ancestor::mn:strong) and not(ancestor::mn:fmt-stem)] | mn:dt//text()[not(ancestor::mn:strong)] | mn:td//text()[not(ancestor::mn:strong)] | mn:th//text()[not(ancestor::mn:strong)] | mn:xref//text() | mn:fmt-xref//text() | mn:origin/text() | mn:fmt-origin/text() | mn:fmt-link/text()" mode="update_xml_step1">
|
|
1427
1442
|
<!-- add hairspace after 'IDEOGRAPHIC SPACE' (U+3000) -->
|
|
1428
1443
|
<xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.), '(\u3000)', concat('$1',$hair_space))"/>
|
|
1429
1444
|
<xsl:variable name="text_en__">
|
|
@@ -1447,11 +1462,22 @@
|
|
|
1447
1462
|
</xsl:call-template>
|
|
1448
1463
|
</xsl:element>
|
|
1449
1464
|
</xsl:variable>
|
|
1450
|
-
<xsl:
|
|
1465
|
+
<xsl:choose>
|
|
1466
|
+
<xsl:when test="normalize-space($text_en) != ''">
|
|
1467
|
+
<xsl:copy-of select="xalan:nodeset($text_en)/*[local-name() = 'text']/node()"/>
|
|
1468
|
+
</xsl:when>
|
|
1469
|
+
<xsl:otherwise>
|
|
1470
|
+
<xsl:value-of select="."/>
|
|
1471
|
+
</xsl:otherwise>
|
|
1472
|
+
</xsl:choose>
|
|
1451
1473
|
</xsl:template>
|
|
1452
1474
|
|
|
1453
1475
|
<!-- <name>注記 1</name> to <name>注記<font_en> 1</font_en></name> -->
|
|
1454
|
-
<xsl:template match="mn:title/text() | mn:fmt-title
|
|
1476
|
+
<xsl:template match="mn:title/text() | mn:fmt-title//text() | mn:note/mn:name/text() | mn:note/mn:fmt-name//text() | mn:termnote/mn:name/text() | mn:termnote/mn:fmt-name//text() | mn:table/mn:name/text() | mn:table/mn:fmt-name//text() | mn:figure/mn:name/text() | mn:figure/mn:fmt-name//text() | mn:termexample/mn:name/text() | mn:termexample/mn:fmt-name//text()" mode="update_xml_step1">
|
|
1477
|
+
<!-- |
|
|
1478
|
+
mn:xref//text() | mn:fmt-xref//text() |
|
|
1479
|
+
mn:origin/text() | mn:fmt-origin/text() |
|
|
1480
|
+
mn:fmt-link/text() -->
|
|
1455
1481
|
<xsl:variable name="text_en_" select="java:replaceAll(java:java.lang.String.new(.), $regex_en, concat($tag_font_en_bold_open,'$1',$tag_font_en_bold_close))"/>
|
|
1456
1482
|
<xsl:variable name="text_en">
|
|
1457
1483
|
<xsl:element name="text" namespace="{$namespace_full}">
|
|
@@ -1462,7 +1488,14 @@
|
|
|
1462
1488
|
</xsl:call-template>
|
|
1463
1489
|
</xsl:element>
|
|
1464
1490
|
</xsl:variable>
|
|
1465
|
-
<xsl:
|
|
1491
|
+
<xsl:choose>
|
|
1492
|
+
<xsl:when test="normalize-space($text_en) != ''">
|
|
1493
|
+
<xsl:copy-of select="xalan:nodeset($text_en)/*[local-name() = 'text']/node()"/>
|
|
1494
|
+
</xsl:when>
|
|
1495
|
+
<xsl:otherwise>
|
|
1496
|
+
<xsl:value-of select="."/>
|
|
1497
|
+
</xsl:otherwise>
|
|
1498
|
+
</xsl:choose>
|
|
1466
1499
|
</xsl:template>
|
|
1467
1500
|
|
|
1468
1501
|
<!-- for $contents -->
|
|
@@ -1591,29 +1624,41 @@
|
|
|
1591
1624
|
|
|
1592
1625
|
<xsl:template match="*[local-name() = 'font_en_bold'][normalize-space() != '']">
|
|
1593
1626
|
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
|
|
1627
|
+
<xsl:variable name="keep_with_previous" select="normalize-space(java:endsWith(java:java.lang.String.new(normalize-space()),']') and 1 = 1)"/>
|
|
1594
1628
|
<xsl:choose>
|
|
1629
|
+
<xsl:when test="$isGenerateTableIF = 'false' and $keep_with_previous = 'true'"/>
|
|
1595
1630
|
<xsl:when test="$isGenerateTableIF = 'false'"><fo:inline font-size="0.1pt"><xsl:text> </xsl:text></fo:inline></xsl:when>
|
|
1596
1631
|
<xsl:otherwise><fo:inline><xsl:value-of select="$zero_width_space"/></fo:inline></xsl:otherwise>
|
|
1597
1632
|
</xsl:choose>
|
|
1598
1633
|
</xsl:if>
|
|
1599
|
-
<fo:inline font-family="Noto Sans Condensed" font-weight="
|
|
1634
|
+
<fo:inline font-family="Noto Sans Condensed" font-weight="bold"> <!-- font-weight="300" -->
|
|
1600
1635
|
|
|
1601
|
-
<xsl:if test="(ancestor::mn:figure or ancestor::mn:table) and parent::mn:fmt-name">
|
|
1636
|
+
<!-- <xsl:if test="(ancestor::mn:figure or ancestor::mn:table) and parent::mn:fmt-name">
|
|
1602
1637
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1603
1638
|
<xsl:if test="$doctype = 'technical-report'">
|
|
1604
1639
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
1605
1640
|
</xsl:if>
|
|
1606
|
-
</xsl:if>
|
|
1641
|
+
</xsl:if> -->
|
|
1607
1642
|
|
|
1608
1643
|
<xsl:if test="ancestor::mn:annex and ancestor::mn:fmt-title and not(ancestor::mn:clause)">
|
|
1609
1644
|
<xsl:attribute name="font-family">inherit</xsl:attribute>
|
|
1610
|
-
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1645
|
+
<!-- <xsl:attribute name="font-weight">bold</xsl:attribute> -->
|
|
1646
|
+
</xsl:if>
|
|
1647
|
+
|
|
1648
|
+
<xsl:if test="ancestor::mn:tt">
|
|
1649
|
+
<xsl:call-template name="refine_tt-style"/>
|
|
1650
|
+
<!-- <xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
1651
|
+
<xsl:if test="((ancestor::mn:figure or ancestor::mn:table) and ancestor::mn:fmt-name) or ancestor::mn:strong">
|
|
1652
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1653
|
+
</xsl:if> -->
|
|
1611
1654
|
</xsl:if>
|
|
1612
1655
|
|
|
1613
1656
|
<xsl:apply-templates/>
|
|
1614
1657
|
</fo:inline>
|
|
1615
1658
|
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
|
|
1659
|
+
<xsl:variable name="keep_with_next" select="normalize-space(java:endsWith(java:java.lang.String.new(normalize-space()),'[') and 1 = 1)"/>
|
|
1616
1660
|
<xsl:choose>
|
|
1661
|
+
<xsl:when test="$isGenerateTableIF = 'false' and $keep_with_next = 'true'"/>
|
|
1617
1662
|
<xsl:when test="$isGenerateTableIF = 'false'"><fo:inline font-size="0.1pt"><xsl:text> </xsl:text></fo:inline></xsl:when>
|
|
1618
1663
|
<xsl:otherwise><fo:inline><xsl:value-of select="$zero_width_space"/></fo:inline></xsl:otherwise>
|
|
1619
1664
|
</xsl:choose>
|
|
@@ -1623,7 +1668,9 @@
|
|
|
1623
1668
|
<xsl:template match="*[local-name() = 'font_en'][normalize-space() != '']">
|
|
1624
1669
|
<!-- <debug><xsl:copy-of select="ancestor::mn:td"/></debug> -->
|
|
1625
1670
|
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
|
|
1671
|
+
<xsl:variable name="keep_with_previous" select="normalize-space(java:endsWith(java:java.lang.String.new(normalize-space()),']') and 1 = 1)"/>
|
|
1626
1672
|
<xsl:choose>
|
|
1673
|
+
<xsl:when test="$isGenerateTableIF = 'false' and $keep_with_previous = 'true'"/>
|
|
1627
1674
|
<xsl:when test="$isGenerateTableIF = 'false'"><fo:inline font-size="0.1pt"><xsl:text> </xsl:text></fo:inline></xsl:when>
|
|
1628
1675
|
<xsl:otherwise><fo:inline><xsl:value-of select="$zero_width_space"/></fo:inline></xsl:otherwise>
|
|
1629
1676
|
</xsl:choose>
|
|
@@ -1636,10 +1683,18 @@
|
|
|
1636
1683
|
<xsl:if test="ancestor::mn:fmt-preferred">
|
|
1637
1684
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
1638
1685
|
</xsl:if>
|
|
1686
|
+
<xsl:if test="ancestor::mn:tt">
|
|
1687
|
+
<xsl:call-template name="refine_tt-style"/>
|
|
1688
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
1689
|
+
</xsl:if>
|
|
1690
|
+
|
|
1639
1691
|
<xsl:apply-templates/>
|
|
1640
1692
|
</fo:inline>
|
|
1693
|
+
|
|
1641
1694
|
<xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
|
|
1695
|
+
<xsl:variable name="keep_with_next" select="normalize-space(java:endsWith(java:java.lang.String.new(normalize-space()),'[') and 1 = 1)"/>
|
|
1642
1696
|
<xsl:choose>
|
|
1697
|
+
<xsl:when test="$isGenerateTableIF = 'false' and $keep_with_next = 'true'"/>
|
|
1643
1698
|
<xsl:when test="$isGenerateTableIF = 'false'"><fo:inline font-size="0.1pt"><xsl:text> </xsl:text></fo:inline></xsl:when>
|
|
1644
1699
|
<xsl:otherwise><fo:inline><xsl:value-of select="$zero_width_space"/></fo:inline></xsl:otherwise>
|
|
1645
1700
|
</xsl:choose>
|
|
@@ -2762,6 +2817,46 @@
|
|
|
2762
2817
|
</xsl:template>
|
|
2763
2818
|
|
|
2764
2819
|
<xsl:template name="addNamedDestinationAttribute">
|
|
2820
|
+
<xsl:variable name="docnum"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
2821
|
+
<xsl:variable name="caption_label" select="translate(normalize-space(.//mn:span[@class = 'fmt-caption-label']), ' ()', '')"/>
|
|
2822
|
+
|
|
2823
|
+
<xsl:variable name="named_dest_">
|
|
2824
|
+
<xsl:choose>
|
|
2825
|
+
<xsl:when test="count(ancestor::mn:figure) > 1"/> <!-- prevent id 'a)' -->
|
|
2826
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example or ancestor::mn:termnote or ancestor::mn:termexample or ancestor::mn:admonition"/>
|
|
2827
|
+
<xsl:when test="$caption_label = '' and parent::mn:foreword">
|
|
2828
|
+
<xsl:variable name="foreword_number"><xsl:number count="mn:foreword" level="any"/></xsl:variable>
|
|
2829
|
+
<xsl:if test="$foreword_number = 1">Foreword</xsl:if>
|
|
2830
|
+
</xsl:when>
|
|
2831
|
+
<xsl:when test="$caption_label = '' and parent::mn:introduction">
|
|
2832
|
+
<xsl:variable name="introduction_number"><xsl:number count="mn:introduction" level="any"/></xsl:variable>
|
|
2833
|
+
<xsl:if test="$introduction_number = 1">Introduction</xsl:if>
|
|
2834
|
+
</xsl:when>
|
|
2835
|
+
<xsl:when test="$caption_label = ''"/>
|
|
2836
|
+
<xsl:when test="../@unnumbered = 'true'"/>
|
|
2837
|
+
<xsl:when test="normalize-space(java:matches(java:java.lang.String.new($caption_label), '[\x21-\xFF]+')) = 'false'"/>
|
|
2838
|
+
<!-- 1.1 in Appendix 1 -->
|
|
2839
|
+
<xsl:otherwise>
|
|
2840
|
+
<xsl:if test="ancestor::mn:annex and string(number(substring($caption_label, 1, 1))) != 'NaN'">
|
|
2841
|
+
<xsl:variable name="annex_caption_label" select="translate(normalize-space(ancestor::mn:annex[1]/mn:fmt-title//mn:span[@class = 'fmt-caption-label']), ' ()', '')"/>
|
|
2842
|
+
<xsl:value-of select="concat($annex_caption_label, '_')"/>
|
|
2843
|
+
</xsl:if>
|
|
2844
|
+
<xsl:if test="parent::mn:formula">Formula</xsl:if>
|
|
2845
|
+
<xsl:value-of select="$caption_label"/>
|
|
2846
|
+
</xsl:otherwise>
|
|
2847
|
+
</xsl:choose>
|
|
2848
|
+
</xsl:variable>
|
|
2849
|
+
<xsl:variable name="named_dest" select="normalize-space($named_dest_)"/>
|
|
2850
|
+
<xsl:if test="$named_dest != ''">
|
|
2851
|
+
<xsl:variable name="named_dest_doc_">
|
|
2852
|
+
<xsl:value-of select="$named_dest"/>
|
|
2853
|
+
<xsl:if test="$docnum != '1'">_<xsl:value-of select="$docnum"/></xsl:if>
|
|
2854
|
+
</xsl:variable>
|
|
2855
|
+
<xsl:variable name="named_dest_doc" select="normalize-space($named_dest_doc_)"/>
|
|
2856
|
+
<xsl:if test="not(key('kid', $named_dest_doc))"> <!-- if element with id '$named_dest_doc' doesn't exist in the document -->
|
|
2857
|
+
<xsl:attribute name="named_dest"><xsl:value-of select="normalize-space($named_dest_doc)"/></xsl:attribute>
|
|
2858
|
+
</xsl:if>
|
|
2859
|
+
</xsl:if>
|
|
2765
2860
|
</xsl:template>
|
|
2766
2861
|
|
|
2767
2862
|
<xsl:template match="mn:fmt-name" mode="update_xml_step1">
|
|
@@ -3797,9 +3892,11 @@
|
|
|
3797
3892
|
</xsl:template>
|
|
3798
3893
|
|
|
3799
3894
|
<xsl:template match="mn:feedback-statement//mn:p">
|
|
3895
|
+
<xsl:param name="skip_id">false</xsl:param>
|
|
3800
3896
|
<xsl:param name="margin"/>
|
|
3801
3897
|
<!-- process in the template 'paragraph' -->
|
|
3802
3898
|
<xsl:call-template name="paragraph">
|
|
3899
|
+
<xsl:with-param name="skip_id" select="$skip_id"/>
|
|
3803
3900
|
<xsl:with-param name="margin" select="$margin"/>
|
|
3804
3901
|
</xsl:call-template>
|
|
3805
3902
|
</xsl:template>
|
|
@@ -4590,6 +4687,7 @@
|
|
|
4590
4687
|
|
|
4591
4688
|
<xsl:attribute-set name="tt-style">
|
|
4592
4689
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
|
4690
|
+
<xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
|
4593
4691
|
</xsl:attribute-set>
|
|
4594
4692
|
|
|
4595
4693
|
<xsl:template name="refine_tt-style">
|
|
@@ -4606,6 +4704,24 @@
|
|
|
4606
4704
|
</xsl:choose>
|
|
4607
4705
|
</xsl:attribute>
|
|
4608
4706
|
</xsl:if>
|
|
4707
|
+
<!-- <xsl:attribute name="baseline-shift">30%</xsl:attribute> -->
|
|
4708
|
+
<!-- for https://github.com/metanorma/mn-samples-plateau/issues/528 -->
|
|
4709
|
+
<xsl:variable name="baseline-shift">10%</xsl:variable>
|
|
4710
|
+
<xsl:choose>
|
|
4711
|
+
<xsl:when test="local-name() = 'font_en' or local-name() = 'font_en_bold'">
|
|
4712
|
+
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
|
4713
|
+
<xsl:if test="local-name() = 'font_en'">
|
|
4714
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
4715
|
+
</xsl:if>
|
|
4716
|
+
<xsl:if test="local-name() = 'font_bold'">
|
|
4717
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
4718
|
+
</xsl:if>
|
|
4719
|
+
<xsl:attribute name="baseline-shift">-<xsl:value-of select="$baseline-shift"/></xsl:attribute>
|
|
4720
|
+
</xsl:when>
|
|
4721
|
+
<xsl:otherwise>
|
|
4722
|
+
<xsl:attribute name="baseline-shift"><xsl:value-of select="$baseline-shift"/></xsl:attribute>
|
|
4723
|
+
</xsl:otherwise>
|
|
4724
|
+
</xsl:choose>
|
|
4609
4725
|
</xsl:template>
|
|
4610
4726
|
|
|
4611
4727
|
<xsl:variable name="color-added-text">
|
|
@@ -10224,7 +10340,12 @@
|
|
|
10224
10340
|
<xsl:template match="mn:figure[@class = 'pseudocode']">
|
|
10225
10341
|
<xsl:call-template name="setNamedDestination"/>
|
|
10226
10342
|
<fo:block id="{@id}">
|
|
10227
|
-
<
|
|
10343
|
+
<fo:block role="SKIP">
|
|
10344
|
+
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
|
10345
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
|
10346
|
+
</xsl:for-each>
|
|
10347
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
|
10348
|
+
</fo:block>
|
|
10228
10349
|
</fo:block>
|
|
10229
10350
|
<xsl:apply-templates select="mn:fmt-name"/>
|
|
10230
10351
|
</xsl:template>
|
|
@@ -12777,7 +12898,7 @@
|
|
|
12777
12898
|
</xsl:variable>
|
|
12778
12899
|
|
|
12779
12900
|
<xsl:template name="index-pages">
|
|
12780
|
-
<xsl:
|
|
12901
|
+
<xsl:param name="num"/>
|
|
12781
12902
|
|
|
12782
12903
|
<xsl:variable name="docid">
|
|
12783
12904
|
<xsl:call-template name="getDocumentId"/>
|
|
@@ -14764,6 +14885,15 @@
|
|
|
14764
14885
|
</xsl:if>
|
|
14765
14886
|
</xsl:template>
|
|
14766
14887
|
|
|
14888
|
+
<!-- debug templates -->
|
|
14889
|
+
<xsl:template name="debug_contents">
|
|
14890
|
+
<xsl:if test="$debug = 'true'">
|
|
14891
|
+
<redirect:write file="contents_.xml"> <!-- {java:getTime(java:java.util.Date.new())} -->
|
|
14892
|
+
<xsl:copy-of select="$contents"/>
|
|
14893
|
+
</redirect:write>
|
|
14894
|
+
</xsl:if>
|
|
14895
|
+
</xsl:template>
|
|
14896
|
+
|
|
14767
14897
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
14768
14898
|
<xsl:param name="num"/>
|
|
14769
14899
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
@@ -15998,14 +16128,18 @@
|
|
|
15998
16128
|
</xsl:template>
|
|
15999
16129
|
|
|
16000
16130
|
<xsl:template name="setIDforNamedDestination">
|
|
16001
|
-
<xsl:if test="
|
|
16002
|
-
<xsl:
|
|
16131
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
16132
|
+
<xsl:if test="@named_dest">
|
|
16133
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
|
16134
|
+
</xsl:if>
|
|
16003
16135
|
</xsl:if>
|
|
16004
16136
|
</xsl:template>
|
|
16005
16137
|
|
|
16006
16138
|
<xsl:template name="setIDforNamedDestinationInline">
|
|
16007
|
-
<xsl:if test="
|
|
16008
|
-
<
|
|
16139
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
16140
|
+
<xsl:if test="@named_dest">
|
|
16141
|
+
<fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
|
|
16142
|
+
</xsl:if>
|
|
16009
16143
|
</xsl:if>
|
|
16010
16144
|
</xsl:template>
|
|
16011
16145
|
|
|
@@ -16015,7 +16149,7 @@
|
|
|
16015
16149
|
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
16016
16150
|
<fox:destination internal-destination="{@id}"/>
|
|
16017
16151
|
</xsl:if>
|
|
16018
|
-
<xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
|
|
16152
|
+
<xsl:for-each select=". | mn:fmt-title[1] | mn:fmt-name[1]">
|
|
16019
16153
|
<xsl:if test="@named_dest">
|
|
16020
16154
|
<fox:destination internal-destination="{@named_dest}"/>
|
|
16021
16155
|
</xsl:if>
|
|
@@ -16023,6 +16157,12 @@
|
|
|
16023
16157
|
</xsl:if>
|
|
16024
16158
|
</xsl:template>
|
|
16025
16159
|
|
|
16160
|
+
<xsl:template name="copyParagraphId">
|
|
16161
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
16162
|
+
<xsl:copy-of select="@id"/>
|
|
16163
|
+
</xsl:if>
|
|
16164
|
+
</xsl:template>
|
|
16165
|
+
|
|
16026
16166
|
<xsl:template name="add-letter-spacing">
|
|
16027
16167
|
<xsl:param name="text"/>
|
|
16028
16168
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|
|
@@ -16245,7 +16385,7 @@
|
|
|
16245
16385
|
<xsl:template name="insertCoverPageFullImage">
|
|
16246
16386
|
<xsl:param name="name">coverpage-image</xsl:param>
|
|
16247
16387
|
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image">
|
|
16248
|
-
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
|
16388
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force" initial-page-number="1">
|
|
16249
16389
|
<fo:flow flow-name="xsl-region-body">
|
|
16250
16390
|
<xsl:call-template name="insertBackgroundPageImage">
|
|
16251
16391
|
<xsl:with-param name="number" select="position()"/>
|
|
@@ -16709,6 +16849,18 @@
|
|
|
16709
16849
|
</xsl:attribute>
|
|
16710
16850
|
</xsl:template>
|
|
16711
16851
|
|
|
16852
|
+
<xsl:template name="insert_firstpage_id">
|
|
16853
|
+
<xsl:param name="num"/>
|
|
16854
|
+
<fo:wrapper role="artifact">
|
|
16855
|
+
<fo:block-container absolute-position="fixed" top="1mm">
|
|
16856
|
+
<xsl:if test="$num = 1">
|
|
16857
|
+
<xsl:attribute name="id">firstpage_id_0</xsl:attribute>
|
|
16858
|
+
</xsl:if>
|
|
16859
|
+
<fo:block id="firstpage_id_{$num}" role="SKIP"> </fo:block>
|
|
16860
|
+
</fo:block-container>
|
|
16861
|
+
</fo:wrapper>
|
|
16862
|
+
</xsl:template>
|
|
16863
|
+
|
|
16712
16864
|
<xsl:template name="getCharByCodePoint">
|
|
16713
16865
|
<xsl:param name="codepoint"/>
|
|
16714
16866
|
<xsl:param name="radix">16</xsl:param>
|
data/metanorma-plateau.gemspec
CHANGED
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
|
29
29
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
|
30
30
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
|
31
31
|
|
|
32
|
-
spec.add_dependency "metanorma-jis", "~> 1.0.
|
|
32
|
+
spec.add_dependency "metanorma-jis", "~> 1.0.7"
|
|
33
33
|
spec.add_dependency "pubid"
|
|
34
34
|
|
|
35
35
|
spec.add_development_dependency "debug"
|
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: 1.2.
|
|
4
|
+
version: 1.2.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-04-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-jis
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 1.0.
|
|
19
|
+
version: 1.0.7
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 1.0.
|
|
26
|
+
version: 1.0.7
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: pubid
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|