metanorma-csa 2.0.4 → 2.0.7

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: 4938f9ff49a51e7776a53a92b4c333e07c43619fa1159820289ba8414aafe4fd
4
- data.tar.gz: 4d88c0de0b204b6cb1e5e3af35cc27fc69f23f05ee98b905de4e0f2e01720f6e
3
+ metadata.gz: 3b0a1705cdddcbb2d90adb9ec5afb73ea1b146b4c4ef5429427b62ee88992525
4
+ data.tar.gz: aba8725802eacee441af7594229d1f587759008a065d4b1a6c15180d4f7ff90b
5
5
  SHA512:
6
- metadata.gz: dc59b516a63ec9800fa0b3d037c061f6141cda591d43983e4ceef645195cae8d62874df3d1c2da87ac555e8a96559189ad8c739c4e27b7dfef972dacde6f39e0
7
- data.tar.gz: 58594ff341c9f989f0c501360ece53f765b19d65d2374d60db216acf01de8367dbc4a49cfa65ea159a8e9559e1ca5d2ef42d58af233b4e0734ebbb3029f20bfe
6
+ metadata.gz: 491b5bd8d6ade019c40461496de89fc152f7a7517968d4516fb15afdac036900bdec5409f7428a2991dae29a83a85e0c2c6e44dc29e6f2197dab3ad51887b417
7
+ data.tar.gz: 71f599ff9ff0e5a5cf6bf9099ee0160a6741c5cc68502f3f1bd56643484b4904c128b4d38dda23fe83facfe2d8f319e7ed4cdb84af077e846bf09d72d714ad22
@@ -16,12 +16,14 @@
16
16
 
17
17
  <xsl:variable name="color-header-document">rgb(79, 201, 204)</xsl:variable>
18
18
 
19
- <xsl:variable name="contents">
19
+ <xsl:variable name="contents_">
20
20
  <contents>
21
21
  <xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
22
22
  <xsl:call-template name="processMainSectionsDefault_Contents"/>
23
+ <xsl:call-template name="processTablesFigures_Contents"/>
23
24
  </contents>
24
25
  </xsl:variable>
26
+ <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
25
27
 
26
28
  <xsl:template match="/">
27
29
  <xsl:call-template name="namespaceCheck"/>
@@ -104,7 +106,7 @@
104
106
  <xsl:if test="$debug = 'true'">
105
107
  <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
106
108
  DEBUG
107
- contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
109
+ contents=<xsl:copy-of select="$contents"/>
108
110
  <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
109
111
  </xsl:if>
110
112
 
@@ -193,7 +195,7 @@
193
195
  <fo:block font-size="26pt" color="black" margin-top="2pt" margin-bottom="30pt" role="H1"><xsl:value-of select="$title-toc"/></fo:block>
194
196
 
195
197
  <fo:block margin-left="-3mm" role="TOC">
196
- <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
198
+ <xsl:for-each select="$contents//item[@display = 'true']">
197
199
  <fo:block role="TOCI">
198
200
  <fo:list-block>
199
201
  <xsl:attribute name="provisional-distance-between-starts">
@@ -222,6 +224,27 @@
222
224
  </fo:list-block>
223
225
  </fo:block>
224
226
  </xsl:for-each>
227
+
228
+ <!-- List of Tables -->
229
+ <xsl:if test="$contents//tables/table">
230
+ <xsl:call-template name="insertListOf_Title">
231
+ <xsl:with-param name="title" select="$title-list-tables"/>
232
+ </xsl:call-template>
233
+ <xsl:for-each select="$contents//tables/table">
234
+ <xsl:call-template name="insertListOf_Item"/>
235
+ </xsl:for-each>
236
+ </xsl:if>
237
+
238
+ <!-- List of Figures -->
239
+ <xsl:if test="$contents//figures/figure">
240
+ <xsl:call-template name="insertListOf_Title">
241
+ <xsl:with-param name="title" select="$title-list-figures"/>
242
+ </xsl:call-template>
243
+ <xsl:for-each select="$contents//figures/figure">
244
+ <xsl:call-template name="insertListOf_Item"/>
245
+ </xsl:for-each>
246
+ </xsl:if>
247
+
225
248
  </fo:block>
226
249
  </fo:block-container>
227
250
 
@@ -240,6 +263,51 @@
240
263
  </fo:root>
241
264
  </xsl:template>
242
265
 
266
+ <xsl:template name="insertListOf_Title">
267
+ <xsl:param name="title"/>
268
+ <fo:block role="TOCI" keep-with-next="always">
269
+ <fo:list-block provisional-distance-between-starts="3mm">
270
+ <fo:list-item>
271
+ <fo:list-item-label end-indent="label-end()">
272
+ <fo:block font-size="1pt"> </fo:block>
273
+ </fo:list-item-label>
274
+ <fo:list-item-body start-indent="body-start()">
275
+ <fo:block>
276
+ <xsl:value-of select="$title"/>
277
+ </fo:block>
278
+ </fo:list-item-body>
279
+ </fo:list-item>
280
+ </fo:list-block>
281
+ </fo:block>
282
+ </xsl:template>
283
+
284
+ <xsl:template name="insertListOf_Item">
285
+ <fo:block role="TOCI">
286
+ <fo:list-block provisional-distance-between-starts="10mm">
287
+ <fo:list-item>
288
+ <fo:list-item-label end-indent="label-end()">
289
+ <fo:block font-size="1pt"> </fo:block>
290
+ </fo:list-item-label>
291
+ <fo:list-item-body start-indent="body-start()">
292
+ <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
293
+ <fo:basic-link internal-destination="{@id}">
294
+ <xsl:call-template name="setAltText">
295
+ <xsl:with-param name="value" select="@alt-text"/>
296
+ </xsl:call-template>
297
+ <xsl:apply-templates select="." mode="contents"/>
298
+ <fo:inline keep-together.within-line="always">
299
+ <fo:leader leader-pattern="dots"/>
300
+ <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
301
+ </fo:inline>
302
+ </fo:basic-link>
303
+ </fo:block>
304
+ </fo:list-item-body>
305
+ </fo:list-item>
306
+ </fo:list-block>
307
+ </fo:block>
308
+ </xsl:template>
309
+
310
+
243
311
  <xsl:template match="node()">
244
312
  <xsl:apply-templates/>
245
313
  </xsl:template>
@@ -543,7 +611,7 @@
543
611
  <xsl:text>Contents</xsl:text>
544
612
 
545
613
  </title-toc>
546
-
614
+
547
615
  <title-descriptors lang="en">Descriptors</title-descriptors>
548
616
 
549
617
  <title-part lang="en">
@@ -579,7 +647,31 @@
579
647
  <title-continued lang="en">(continued)</title-continued>
580
648
  <title-continued lang="fr">(continué)</title-continued>
581
649
 
582
- </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
650
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="title-list-tables">
651
+ <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
652
+ <xsl:value-of select="$toc_table_title"/>
653
+ <xsl:if test="normalize-space($toc_table_title) = ''">
654
+ <xsl:call-template name="getTitle">
655
+ <xsl:with-param name="name" select="'title-list-tables'"/>
656
+ </xsl:call-template>
657
+ </xsl:if>
658
+ </xsl:variable><xsl:variable name="title-list-figures">
659
+ <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
660
+ <xsl:value-of select="$toc_figure_title"/>
661
+ <xsl:if test="normalize-space($toc_figure_title) = ''">
662
+ <xsl:call-template name="getTitle">
663
+ <xsl:with-param name="name" select="'title-list-figures'"/>
664
+ </xsl:call-template>
665
+ </xsl:if>
666
+ </xsl:variable><xsl:variable name="title-list-recommendations">
667
+ <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
668
+ <xsl:value-of select="$toc_requirement_title"/>
669
+ <xsl:if test="normalize-space($toc_requirement_title) = ''">
670
+ <xsl:call-template name="getTitle">
671
+ <xsl:with-param name="name" select="'title-list-recommendations'"/>
672
+ </xsl:call-template>
673
+ </xsl:if>
674
+ </xsl:variable><xsl:variable name="bibdata">
583
675
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
584
676
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
585
677
  </xsl:variable><xsl:variable name="linebreak">&#8232;</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:variable name="non_breaking_hyphen">‑</xsl:variable><xsl:variable name="thin_space"> </xsl:variable><xsl:variable name="zero_width_space">​</xsl:variable><xsl:variable name="en_dash">–</xsl:variable><xsl:template name="getTitle">
@@ -1809,6 +1901,30 @@
1809
1901
  <xsl:sort select="@displayorder" data-type="number"/>
1810
1902
  <xsl:apply-templates select="." mode="contents"/>
1811
1903
  </xsl:for-each>
1904
+ </xsl:template><xsl:template name="processTablesFigures_Contents">
1905
+ <xsl:param name="always"/>
1906
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
1907
+ <xsl:call-template name="processTables_Contents"/>
1908
+ </xsl:if>
1909
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
1910
+ <xsl:call-template name="processFigures_Contents"/>
1911
+ </xsl:if>
1912
+ </xsl:template><xsl:template name="processTables_Contents">
1913
+ <tables>
1914
+ <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
1915
+ <table id="{@id}" alt-text="{*[local-name() = 'name']}">
1916
+ <xsl:copy-of select="*[local-name() = 'name']"/>
1917
+ </table>
1918
+ </xsl:for-each>
1919
+ </tables>
1920
+ </xsl:template><xsl:template name="processFigures_Contents">
1921
+ <figures>
1922
+ <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(*[local-name() = 'name'], 'Figure ') and normalize-space(@id) != '']">
1923
+ <figure id="{@id}" alt-text="{*[local-name() = 'name']}">
1924
+ <xsl:copy-of select="*[local-name() = 'name']"/>
1925
+ </figure>
1926
+ </xsl:for-each>
1927
+ </figures>
1812
1928
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1813
1929
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1814
1930
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -1830,8 +1946,27 @@
1830
1946
  <xsl:sort select="@displayorder" data-type="number"/>
1831
1947
  <xsl:apply-templates select="."/>
1832
1948
  </xsl:for-each>
1833
- </xsl:template><xsl:template match="text()">
1834
- <xsl:value-of select="."/>
1949
+ </xsl:template><xsl:variable name="tag_open">###fo:inline###</xsl:variable><xsl:variable name="tag_close">###/fo:inline###</xsl:variable><xsl:template match="text()" name="text">
1950
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
1951
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
1952
+ <xsl:call-template name="replace_fo_inline">
1953
+ <xsl:with-param name="text" select="$text"/>
1954
+ </xsl:call-template>
1955
+ </xsl:template><xsl:template name="replace_fo_inline">
1956
+ <xsl:param name="text"/>
1957
+ <xsl:choose>
1958
+ <xsl:when test="contains($text, $tag_open)">
1959
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
1960
+ <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text>
1961
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
1962
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
1963
+ <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text>
1964
+ <xsl:call-template name="replace_fo_inline">
1965
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
1966
+ </xsl:call-template>
1967
+ </xsl:when>
1968
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
1969
+ </xsl:choose>
1835
1970
  </xsl:template><xsl:template match="*[local-name()='br']">
1836
1971
  <xsl:value-of select="$linebreak"/>
1837
1972
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
@@ -2585,37 +2720,7 @@
2585
2720
 
2586
2721
  <!-- list of footnotes to calculate actual footnotes number -->
2587
2722
  <xsl:variable name="p_fn_">
2588
- <xsl:choose>
2589
- <xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
2590
- <fn gen_id="{generate-id(.)}">
2591
- <xsl:copy-of select="@*"/>
2592
- <xsl:copy-of select="node()"/>
2593
- </fn>
2594
- </xsl:when>
2595
- <xsl:otherwise>
2596
- <!-- itetation for:
2597
- footnotes in bibdata/title
2598
- footnotes in bibliography
2599
- footnotes in document's body (except table's head/body/foot and figure text)
2600
- -->
2601
- <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
2602
- <fn gen_id="{generate-id(.)}">
2603
- <xsl:copy-of select="@*"/>
2604
- <xsl:copy-of select="node()"/>
2605
- </fn>
2606
- </xsl:for-each>
2607
- <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
2608
- <xsl:sort select="@displayorder" data-type="number"/>
2609
- <xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[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])]">
2610
- <!-- copy unique fn -->
2611
- <fn gen_id="{generate-id(.)}">
2612
- <xsl:copy-of select="@*"/>
2613
- <xsl:copy-of select="node()"/>
2614
- </fn>
2615
- </xsl:for-each>
2616
- </xsl:for-each>
2617
- </xsl:otherwise>
2618
- </xsl:choose>
2723
+ <xsl:call-template name="get_fn_list"/>
2619
2724
  </xsl:variable>
2620
2725
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
2621
2726
 
@@ -2676,6 +2781,38 @@
2676
2781
  <xsl:copy-of select="$footnote_inline"/>
2677
2782
  </xsl:otherwise>
2678
2783
  </xsl:choose>
2784
+ </xsl:template><xsl:template name="get_fn_list">
2785
+ <xsl:choose>
2786
+ <xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
2787
+ <fn gen_id="{generate-id(.)}">
2788
+ <xsl:copy-of select="@*"/>
2789
+ <xsl:copy-of select="node()"/>
2790
+ </fn>
2791
+ </xsl:when>
2792
+ <xsl:otherwise>
2793
+ <!-- itetation for:
2794
+ footnotes in bibdata/title
2795
+ footnotes in bibliography
2796
+ footnotes in document's body (except table's head/body/foot and figure text)
2797
+ -->
2798
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
2799
+ <fn gen_id="{generate-id(.)}">
2800
+ <xsl:copy-of select="@*"/>
2801
+ <xsl:copy-of select="node()"/>
2802
+ </fn>
2803
+ </xsl:for-each>
2804
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
2805
+ <xsl:sort select="@displayorder" data-type="number"/>
2806
+ <xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[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])]">
2807
+ <!-- copy unique fn -->
2808
+ <fn gen_id="{generate-id(.)}">
2809
+ <xsl:copy-of select="@*"/>
2810
+ <xsl:copy-of select="node()"/>
2811
+ </fn>
2812
+ </xsl:for-each>
2813
+ </xsl:for-each>
2814
+ </xsl:otherwise>
2815
+ </xsl:choose>
2679
2816
  </xsl:template><xsl:template name="table_fn_display">
2680
2817
  <xsl:variable name="references">
2681
2818
 
@@ -2847,7 +2984,7 @@
2847
2984
  </fo:inline>
2848
2985
  </xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
2849
2986
  <fo:inline><xsl:value-of select="."/></fo:inline>
2850
- </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
2987
+ </xsl:template><xsl:template match="*[local-name()='fn']//*[local-name()='p']">
2851
2988
  <fo:inline>
2852
2989
  <xsl:apply-templates/>
2853
2990
  </fo:inline>
@@ -4537,13 +4674,14 @@
4537
4674
  <xsl:apply-templates mode="bookmarks"/>
4538
4675
  </xsl:template><xsl:template name="addBookmarks">
4539
4676
  <xsl:param name="contents"/>
4540
- <xsl:if test="xalan:nodeset($contents)//item">
4677
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
4678
+ <xsl:if test="$contents_nodes//item">
4541
4679
  <fo:bookmark-tree>
4542
4680
  <xsl:choose>
4543
- <xsl:when test="xalan:nodeset($contents)/doc">
4681
+ <xsl:when test="$contents_nodes/doc">
4544
4682
  <xsl:choose>
4545
- <xsl:when test="count(xalan:nodeset($contents)/doc) &gt; 1">
4546
- <xsl:for-each select="xalan:nodeset($contents)/doc">
4683
+ <xsl:when test="count($contents_nodes/doc) &gt; 1">
4684
+ <xsl:for-each select="$contents_nodes/doc">
4547
4685
  <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
4548
4686
  <xsl:if test="@bundle = 'true'">
4549
4687
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
@@ -4594,7 +4732,7 @@
4594
4732
  </xsl:for-each>
4595
4733
  </xsl:when>
4596
4734
  <xsl:otherwise>
4597
- <xsl:for-each select="xalan:nodeset($contents)/doc">
4735
+ <xsl:for-each select="$contents_nodes/doc">
4598
4736
 
4599
4737
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
4600
4738
 
@@ -4612,25 +4750,36 @@
4612
4750
  </xsl:choose>
4613
4751
  </xsl:when>
4614
4752
  <xsl:otherwise>
4615
- <xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
4753
+ <xsl:apply-templates select="$contents_nodes/contents/item" mode="bookmark"/>
4754
+
4755
+ <xsl:call-template name="insertFigureBookmarks">
4756
+ <xsl:with-param name="contents" select="$contents_nodes/contents"/>
4757
+ </xsl:call-template>
4758
+
4759
+ <xsl:call-template name="insertTableBookmarks">
4760
+ <xsl:with-param name="contents" select="$contents_nodes/contents"/>
4761
+ <xsl:with-param name="lang" select="@lang"/>
4762
+ </xsl:call-template>
4763
+
4616
4764
  </xsl:otherwise>
4617
4765
  </xsl:choose>
4618
4766
 
4767
+
4619
4768
 
4620
4769
 
4621
4770
 
4622
4771
 
4623
-
4624
-
4772
+
4625
4773
 
4626
4774
  </fo:bookmark-tree>
4627
4775
  </xsl:if>
4628
4776
  </xsl:template><xsl:template name="insertFigureBookmarks">
4629
4777
  <xsl:param name="contents"/>
4630
- <xsl:if test="xalan:nodeset($contents)/figure">
4631
- <fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
4778
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
4779
+ <xsl:if test="$contents_nodes/figure">
4780
+ <fo:bookmark internal-destination="{$contents_nodes/figure[1]/@id}" starting-state="hide">
4632
4781
  <fo:bookmark-title>Figures</fo:bookmark-title>
4633
- <xsl:for-each select="xalan:nodeset($contents)/figure">
4782
+ <xsl:for-each select="$contents_nodes/figure">
4634
4783
  <fo:bookmark internal-destination="{@id}">
4635
4784
  <fo:bookmark-title>
4636
4785
  <xsl:value-of select="normalize-space(title)"/>
@@ -4639,18 +4788,40 @@
4639
4788
  </xsl:for-each>
4640
4789
  </fo:bookmark>
4641
4790
  </xsl:if>
4791
+
4792
+
4793
+ <xsl:if test="$contents_nodes//figures/figure">
4794
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
4795
+
4796
+
4797
+
4798
+ <xsl:variable name="bookmark-title">
4799
+
4800
+ <xsl:value-of select="$title-list-figures"/>
4801
+
4802
+ </xsl:variable>
4803
+ <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
4804
+ <xsl:for-each select="$contents_nodes//figures/figure">
4805
+ <fo:bookmark internal-destination="{@id}">
4806
+ <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
4807
+ </fo:bookmark>
4808
+ </xsl:for-each>
4809
+ </fo:bookmark>
4810
+ </xsl:if>
4811
+
4642
4812
  </xsl:template><xsl:template name="insertTableBookmarks">
4643
4813
  <xsl:param name="contents"/>
4644
4814
  <xsl:param name="lang"/>
4645
- <xsl:if test="xalan:nodeset($contents)/table">
4646
- <fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
4815
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
4816
+ <xsl:if test="$contents_nodes/table">
4817
+ <fo:bookmark internal-destination="{$contents_nodes/table[1]/@id}" starting-state="hide">
4647
4818
  <fo:bookmark-title>
4648
4819
  <xsl:choose>
4649
4820
  <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
4650
4821
  <xsl:otherwise>Tables</xsl:otherwise>
4651
4822
  </xsl:choose>
4652
4823
  </fo:bookmark-title>
4653
- <xsl:for-each select="xalan:nodeset($contents)/table">
4824
+ <xsl:for-each select="$contents_nodes/table">
4654
4825
  <fo:bookmark internal-destination="{@id}">
4655
4826
  <fo:bookmark-title>
4656
4827
  <xsl:value-of select="normalize-space(title)"/>
@@ -4659,6 +4830,29 @@
4659
4830
  </xsl:for-each>
4660
4831
  </fo:bookmark>
4661
4832
  </xsl:if>
4833
+
4834
+
4835
+ <xsl:if test="$contents_nodes//tables/table">
4836
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
4837
+
4838
+
4839
+
4840
+ <xsl:variable name="bookmark-title">
4841
+
4842
+ <xsl:value-of select="$title-list-tables"/>
4843
+
4844
+ </xsl:variable>
4845
+
4846
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
4847
+
4848
+ <xsl:for-each select="$contents_nodes//tables/table">
4849
+ <fo:bookmark internal-destination="{@id}">
4850
+ <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
4851
+ </fo:bookmark>
4852
+ </xsl:for-each>
4853
+ </fo:bookmark>
4854
+ </xsl:if>
4855
+
4662
4856
  </xsl:template><xsl:template name="getLangVersion">
4663
4857
  <xsl:param name="lang"/>
4664
4858
  <xsl:param name="doctype" select="''"/>
@@ -4883,7 +5077,51 @@
4883
5077
  <xsl:with-param name="text" select="$text_step1"/>
4884
5078
  </xsl:call-template>
4885
5079
  </xsl:variable>
4886
- <xsl:value-of select="$text_step2"/>
5080
+
5081
+ <!-- <xsl:value-of select="$text_step2"/> -->
5082
+
5083
+ <!-- add zero-width space after space -->
5084
+ <xsl:variable name="text_step3" select="java:replaceAll(java:java.lang.String.new($text_step2),' ',' ​')"/>
5085
+
5086
+ <!-- split text by zero-width space -->
5087
+ <xsl:variable name="text_step4">
5088
+ <xsl:call-template name="split">
5089
+ <xsl:with-param name="pText" select="$text_step3"/>
5090
+ <xsl:with-param name="sep" select="$zero_width_space"/>
5091
+ <xsl:with-param name="normalize-space">false</xsl:with-param>
5092
+ <xsl:with-param name="keep_sep">true</xsl:with-param>
5093
+ </xsl:call-template>
5094
+ </xsl:variable>
5095
+
5096
+ <xsl:for-each select="xalan:nodeset($text_step4)/item">
5097
+ <xsl:choose>
5098
+ <xsl:when test="string-length() &gt; 30"> <!-- word with length more than 30 will be interspersed with zero-width space -->
5099
+ <xsl:call-template name="interspers">
5100
+ <xsl:with-param name="str" select="."/>
5101
+ </xsl:call-template>
5102
+ </xsl:when>
5103
+ <xsl:otherwise>
5104
+ <xsl:value-of select="."/>
5105
+ </xsl:otherwise>
5106
+ </xsl:choose>
5107
+ </xsl:for-each>
5108
+
5109
+ </xsl:template><xsl:template name="interspers">
5110
+ <xsl:param name="str"/>
5111
+ <xsl:param name="char" select="$zero_width_space"/>
5112
+ <xsl:if test="$str != ''">
5113
+ <xsl:value-of select="substring($str, 1, 1)"/>
5114
+
5115
+ <xsl:variable name="next_char" select="substring($str, 2, 1)"/>
5116
+ <xsl:if test="not(contains(concat(' -.:=_— ', $char), $next_char))">
5117
+ <xsl:value-of select="$char"/>
5118
+ </xsl:if>
5119
+
5120
+ <xsl:call-template name="interspers">
5121
+ <xsl:with-param name="str" select="substring($str, 2)"/>
5122
+ <xsl:with-param name="char" select="$char"/>
5123
+ </xsl:call-template>
5124
+ </xsl:if>
4887
5125
  </xsl:template><xsl:template match="*" mode="syntax_highlight">
4888
5126
  <xsl:apply-templates mode="syntax_highlight"/>
4889
5127
  </xsl:template><xsl:variable name="syntax_highlight_styles_">
@@ -5315,6 +5553,8 @@
5315
5553
  </xsl:otherwise>
5316
5554
  </xsl:choose> -->
5317
5555
  </fo:block>
5556
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ')]" priority="2">
5557
+ <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
5318
5558
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
5319
5559
  <xsl:if test="normalize-space() != ''">
5320
5560
  <xsl:value-of select="."/>
@@ -5349,7 +5589,8 @@
5349
5589
  <fo:inline><xsl:apply-templates/></fo:inline>
5350
5590
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
5351
5591
  <xsl:if test="normalize-space() != ''">
5352
- <xsl:value-of select="."/>
5592
+ <!-- <xsl:value-of select="."/> -->
5593
+ <xsl:call-template name="text"/>
5353
5594
  </xsl:if>
5354
5595
  </xsl:template><xsl:template match="*[local-name() = 'quote']">
5355
5596
  <fo:block-container margin-left="0mm">
@@ -5389,26 +5630,24 @@
5389
5630
  </xsl:template><xsl:template match="*[local-name() = 'author']">
5390
5631
  <xsl:text>— </xsl:text>
5391
5632
  <xsl:apply-templates/>
5392
- </xsl:template><xsl:variable name="bibitem_hidden_">
5633
+ </xsl:template><xsl:variable name="bibitems_">
5634
+ <xsl:for-each select="//*[local-name() = 'bibitem']">
5635
+ <xsl:copy-of select="."/>
5636
+ </xsl:for-each>
5637
+ </xsl:variable><xsl:variable name="bibitems" select="xalan:nodeset($bibitems_)"/><xsl:variable name="bibitems_hidden_">
5393
5638
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden='true']">
5394
5639
  <xsl:copy-of select="."/>
5395
5640
  </xsl:for-each>
5396
- <xsl:for-each select="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem']">
5641
+ <xsl:for-each select="//*[local-name() = 'references'][@hidden='true']//*[local-name() = 'bibitem']">
5397
5642
  <xsl:copy-of select="."/>
5398
5643
  </xsl:for-each>
5399
- </xsl:variable><xsl:variable name="bibitem_hidden" select="xalan:nodeset($bibitem_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
5400
-
5401
- <xsl:variable name="bibitemid">
5402
- <xsl:choose>
5403
- <!-- <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"></xsl:when>
5404
- <xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"></xsl:when> -->
5405
- <xsl:when test="$bibitem_hidden/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
5406
- <xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
5407
- </xsl:choose>
5408
- </xsl:variable>
5409
-
5644
+ </xsl:variable><xsl:variable name="bibitems_hidden" select="xalan:nodeset($bibitems_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
5645
+ <xsl:variable name="current_bibitemid" select="@bibitemid"/>
5646
+ <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
5647
+ <xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
5410
5648
  <xsl:choose>
5411
- <xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
5649
+ <!-- <xsl:when test="$external-destination != '' or not(key('bibitems_hidden', $current_bibitemid))"> --> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link (internal to the bibitem or external) -->
5650
+ <xsl:when test="$external-destination != '' or not($bibitems_hidden/*[local-name() ='bibitem'][@id = $current_bibitemid])"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link (internal to the bibitem or external) -->
5412
5651
  <fo:inline xsl:use-attribute-sets="eref-style">
5413
5652
  <xsl:if test="@type = 'footnote'">
5414
5653
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
@@ -5422,8 +5661,8 @@
5422
5661
  <xsl:variable name="text" select="normalize-space()"/>
5423
5662
 
5424
5663
 
5425
-
5426
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
5664
+
5665
+ <fo:basic-link fox:alt-text="{@citeas}">
5427
5666
  <xsl:if test="normalize-space(@citeas) = ''">
5428
5667
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
5429
5668
  </xsl:if>
@@ -5433,14 +5672,21 @@
5433
5672
 
5434
5673
  </xsl:if>
5435
5674
 
5436
-
5675
+ <xsl:choose>
5676
+ <xsl:when test="$external-destination != ''"> <!-- external hyperlink -->
5677
+ <xsl:attribute name="external-destination"><xsl:value-of select="$external-destination"/></xsl:attribute>
5678
+ </xsl:when>
5679
+ <xsl:otherwise>
5680
+ <xsl:attribute name="internal-destination"><xsl:value-of select="@bibitemid"/></xsl:attribute>
5681
+ </xsl:otherwise>
5682
+ </xsl:choose>
5437
5683
 
5438
5684
  <xsl:apply-templates/>
5439
5685
  </fo:basic-link>
5440
-
5686
+
5441
5687
  </fo:inline>
5442
5688
  </xsl:when>
5443
- <xsl:otherwise>
5689
+ <xsl:otherwise> <!-- if there is key('bibitems_hidden', $current_bibitemid) -->
5444
5690
  <fo:inline><xsl:apply-templates/></fo:inline>
5445
5691
  </xsl:otherwise>
5446
5692
  </xsl:choose>
@@ -6216,6 +6462,24 @@
6216
6462
  <xsl:apply-templates/>
6217
6463
  </fo:inline>
6218
6464
  </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
6465
+
6466
+ <!-- list of footnotes to calculate actual footnotes number -->
6467
+ <xsl:variable name="p_fn_">
6468
+ <xsl:call-template name="get_fn_list"/>
6469
+ </xsl:variable>
6470
+ <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
6471
+ <xsl:variable name="gen_id" select="generate-id(.)"/>
6472
+ <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
6473
+ <!-- fn sequence number in document -->
6474
+ <xsl:variable name="current_fn_number">
6475
+ <xsl:choose>
6476
+ <xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
6477
+ <xsl:otherwise>
6478
+ <!-- <xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1" /> -->
6479
+ <xsl:value-of select="count($p_fn//fn[@gen_id = $gen_id]/preceding-sibling::fn) + 1"/>
6480
+ </xsl:otherwise>
6481
+ </xsl:choose>
6482
+ </xsl:variable>
6219
6483
  <fo:footnote>
6220
6484
  <xsl:variable name="number">
6221
6485
 
@@ -6224,22 +6488,26 @@
6224
6488
  <xsl:number level="any" count="*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]//*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
6225
6489
  </xsl:when>
6226
6490
  <xsl:otherwise>
6227
- <xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
6491
+ <xsl:value-of select="$current_fn_number"/>
6228
6492
  </xsl:otherwise>
6229
6493
  </xsl:choose>
6230
6494
 
6231
6495
  </xsl:variable>
6496
+
6497
+ <xsl:variable name="current_fn_number_text">
6498
+ <xsl:value-of select="$number"/>
6499
+
6500
+ </xsl:variable>
6501
+
6232
6502
  <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
6233
- <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
6234
- <xsl:value-of select="$number"/>
6235
-
6503
+ <fo:basic-link internal-destination="{$gen_id}" fox:alt-text="footnote {$number}">
6504
+ <xsl:value-of select="$current_fn_number_text"/>
6236
6505
  </fo:basic-link>
6237
6506
  </fo:inline>
6238
6507
  <fo:footnote-body>
6239
6508
  <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
6240
- <fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
6241
- <xsl:value-of select="$number"/>
6242
-
6509
+ <fo:inline id="{$gen_id}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
6510
+ <xsl:value-of select="$current_fn_number_text"/>
6243
6511
  </fo:inline>
6244
6512
  <xsl:apply-templates/>
6245
6513
  </fo:block>
@@ -6479,6 +6747,78 @@
6479
6747
  <!-- processing for admonition/p found in the template for 'p' -->
6480
6748
  <xsl:call-template name="paragraph"/>
6481
6749
 
6750
+ </xsl:template><xsl:template match="@*|node()" mode="update_xml_step1">
6751
+ <xsl:copy>
6752
+ <xsl:apply-templates select="@*|node()" mode="update_xml_step1"/>
6753
+ </xsl:copy>
6754
+ </xsl:template><xsl:template match="*[local-name() = 'preface']" mode="update_xml_step1">
6755
+ <xsl:copy>
6756
+ <xsl:copy-of select="@*"/>
6757
+
6758
+ <xsl:variable name="nodes_preface_">
6759
+ <xsl:for-each select="*">
6760
+ <node id="{@id}"/>
6761
+ </xsl:for-each>
6762
+ </xsl:variable>
6763
+ <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
6764
+
6765
+ <xsl:for-each select="*">
6766
+ <xsl:sort select="@displayorder" data-type="number"/>
6767
+
6768
+ <!-- process Section's title -->
6769
+ <xsl:variable name="preceding-sibling_id" select="$nodes_preface/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
6770
+ <xsl:if test="$preceding-sibling_id != ''">
6771
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="update_xml_step1"/>
6772
+ </xsl:if>
6773
+
6774
+ <xsl:choose>
6775
+ <xsl:when test="@type = 'section-title' and not(@displayorder)"><!-- skip, don't copy, because copied in above 'apply-templates' --></xsl:when>
6776
+ <xsl:otherwise>
6777
+ <xsl:apply-templates select="." mode="update_xml_step1"/>
6778
+ </xsl:otherwise>
6779
+ </xsl:choose>
6780
+
6781
+ </xsl:for-each>
6782
+ </xsl:copy>
6783
+ </xsl:template><xsl:template match="*[local-name() = 'sections']" mode="update_xml_step1">
6784
+ <xsl:copy>
6785
+ <xsl:copy-of select="@*"/>
6786
+
6787
+ <xsl:variable name="nodes_sections_">
6788
+ <xsl:for-each select="*">
6789
+ <node id="{@id}"/>
6790
+ </xsl:for-each>
6791
+ </xsl:variable>
6792
+ <xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
6793
+
6794
+ <!-- move section 'Normative references' inside 'sections' -->
6795
+ <xsl:for-each select="* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
6796
+ <xsl:sort select="@displayorder" data-type="number"/>
6797
+
6798
+ <!-- process Section's title -->
6799
+ <xsl:variable name="preceding-sibling_id" select="$nodes_sections/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
6800
+ <xsl:if test="$preceding-sibling_id != ''">
6801
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="update_xml_step1"/>
6802
+ </xsl:if>
6803
+
6804
+ <xsl:choose>
6805
+ <xsl:when test="@type = 'section-title' and not(@displayorder)"><!-- skip, don't copy, because copied in above 'apply-templates' --></xsl:when>
6806
+ <xsl:otherwise>
6807
+ <xsl:apply-templates select="." mode="update_xml_step1"/>
6808
+ </xsl:otherwise>
6809
+ </xsl:choose>
6810
+
6811
+ </xsl:for-each>
6812
+ </xsl:copy>
6813
+ </xsl:template><xsl:template match="*[local-name() = 'bibliography']" mode="update_xml_step1">
6814
+ <xsl:copy>
6815
+ <xsl:copy-of select="@*"/>
6816
+ <!-- copy all elements from bibliography except 'Normative references' (moved to 'sections') -->
6817
+ <xsl:for-each select="*[not(@normative='true') and not(*[@normative='true'])]">
6818
+ <xsl:sort select="@displayorder" data-type="number"/>
6819
+ <xsl:apply-templates select="." mode="update_xml_step1"/>
6820
+ </xsl:for-each>
6821
+ </xsl:copy>
6482
6822
  </xsl:template><xsl:template name="convertDate">
6483
6823
  <xsl:param name="date"/>
6484
6824
  <xsl:param name="format" select="'short'"/>
@@ -6723,22 +7063,25 @@
6723
7063
  <xsl:param name="pText" select="."/>
6724
7064
  <xsl:param name="sep" select="','"/>
6725
7065
  <xsl:param name="normalize-space" select="'true'"/>
7066
+ <xsl:param name="keep_sep" select="'false'"/>
6726
7067
  <xsl:if test="string-length($pText) &gt;0">
6727
- <item>
6728
- <xsl:choose>
6729
- <xsl:when test="$normalize-space = 'true'">
6730
- <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
6731
- </xsl:when>
6732
- <xsl:otherwise>
6733
- <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
6734
- </xsl:otherwise>
6735
- </xsl:choose>
6736
- </item>
6737
- <xsl:call-template name="split">
6738
- <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
6739
- <xsl:with-param name="sep" select="$sep"/>
6740
- <xsl:with-param name="normalize-space" select="$normalize-space"/>
6741
- </xsl:call-template>
7068
+ <item>
7069
+ <xsl:choose>
7070
+ <xsl:when test="$normalize-space = 'true'">
7071
+ <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
7072
+ </xsl:when>
7073
+ <xsl:otherwise>
7074
+ <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
7075
+ </xsl:otherwise>
7076
+ </xsl:choose>
7077
+ </item>
7078
+ <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><item><xsl:value-of select="$sep"/></item></xsl:if>
7079
+ <xsl:call-template name="split">
7080
+ <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
7081
+ <xsl:with-param name="sep" select="$sep"/>
7082
+ <xsl:with-param name="normalize-space" select="$normalize-space"/>
7083
+ <xsl:with-param name="keep_sep" select="$keep_sep"/>
7084
+ </xsl:call-template>
6742
7085
  </xsl:if>
6743
7086
  </xsl:template><xsl:template name="getDocumentId">
6744
7087
  <xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
@@ -844,6 +844,26 @@ p.Tablebody, li.Tablebody, div.Tablebody {
844
844
  mso-bidi-font-family: {{bodyfont}};
845
845
  mso-ansi-language: EN-GB; }
846
846
 
847
+ p.TOCTitle, li.TOCTitle, div.TOCTitle {
848
+ mso-style-name: "TOC Title";
849
+ mso-style-unhide: no;
850
+ margin-top: 0in;
851
+ margin-right: 0in;
852
+ margin-bottom: {{normalfontsize}};
853
+ margin-left: 0in;
854
+ text-align: left;
855
+ page-break-after: avoid;
856
+ mso-pagination: none;
857
+ mso-hyphenate: none;
858
+ mso-layout-grid-align: none;
859
+ font-size: {{normalfontsize}};
860
+ mso-bidi-font-size: 10.0pt;
861
+ font-weight: bold;
862
+ font-family: {{headerfont}};
863
+ mso-fareast-font-family: {{headerfont}};
864
+ mso-bidi-font-family: {{headerfont}};
865
+ mso-fareast-language: EN-US; }
866
+
847
867
  /* Page Definitions */
848
868
  @page {
849
869
  size: 612.0pt 792.0pt;
@@ -793,6 +793,25 @@ p.Tablebody, li.Tablebody, div.Tablebody
793
793
  mso-fareast-font-family:$bodyfont;
794
794
  mso-bidi-font-family:$bodyfont;
795
795
  mso-ansi-language:EN-GB;}
796
+ p.TOCTitle, li.TOCTitle, div.TOCTitle
797
+ {mso-style-name:"TOC Title";
798
+ mso-style-unhide:no;
799
+ margin-top:0in;
800
+ margin-right:0in;
801
+ margin-bottom:$normalfontsize;
802
+ margin-left:0in;
803
+ text-align:left;
804
+ page-break-after:avoid;
805
+ mso-pagination:none;
806
+ mso-hyphenate:none;
807
+ mso-layout-grid-align:none;
808
+ font-size:$normalfontsize;
809
+ mso-bidi-font-size:10.0pt;
810
+ font-weight:bold;
811
+ font-family:$headerfont;
812
+ mso-fareast-font-family:$headerfont;
813
+ mso-bidi-font-family:$headerfont;
814
+ mso-fareast-language:EN-US;}
796
815
 
797
816
 
798
817
  /* Page Definitions */
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Csa
3
- VERSION = "2.0.4".freeze
3
+ VERSION = "2.0.7".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csa
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.7
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-02-21 00:00:00.000000000 Z
11
+ date: 2022-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  - !ruby/object:Gem::Version
248
248
  version: '0'
249
249
  requirements: []
250
- rubygems_version: 3.2.32
250
+ rubygems_version: 3.3.9
251
251
  signing_key:
252
252
  specification_version: 4
253
253
  summary: metanorma-csa lets you write CSA Normal Documents (CSAND) in AsciiDoc.