metanorma-ribose 2.8.9 → 2.8.10

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: 77aa22f23bce2580656b32140d0f798a346343f7909d374b8d125e0ee0808a5c
4
- data.tar.gz: b7f8a1be9b229e045a028793e4bc774b6840e7926616805dd3aa84596f0fbe75
3
+ metadata.gz: c5a217fc0065806768fd86c3e1ff0a8b02ebbbb6698cb71c77f9f03e4a4733e9
4
+ data.tar.gz: 1b2ae81cb2a5166397dd25ec859e9e41e01a4aa5cc04779f14b08bafe6bd0386
5
5
  SHA512:
6
- metadata.gz: 37b836b133d6db726d9711902ec92505fea0d0de873466b9d7ae7882a7064aa04106edee3c04544072c9e262c30233482ee940398c92603bc1a18798c4833d53
7
- data.tar.gz: 871c6504223f35262f071edcdafa7b8144a86485e217dd9cbb979b7ce2c5f685e7cad73fe09cc4dae8962681dfd52314a437bb8a1ec7043fbe2e3cf0562ab8ee
6
+ metadata.gz: e33e0e60d71554f252e9ac21939e3017d0aef852026712345e9dc97d51e5a6d36e9489beb7aea5a00889596ad1f0501c6f74e6d6e4052238765bab3c48b326d1
7
+ data.tar.gz: f2883efb42dc757a2808bc11d4b49b93cf2b4d0038d1cc704cf918b95c717c4b9e5da65378252ef605188f638ffad0a5ee34e511ff33d130fbd37ff2367e8591
data/.rubocop.yml CHANGED
@@ -2,6 +2,15 @@
2
2
  # See https://github.com/metanorma/cimas
3
3
  inherit_from:
4
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
5
+ # .rubocop_todo.yml MUST be the last entry. inherit_from is last-wins:
6
+ # if listed before oss-guides, the shared config's stricter Metrics/
7
+ # (MethodLength, BlockLength, etc.) rules override the todo's per-file
8
+ # grandfathering, and the todo becomes inert on those cops. Empirically
9
+ # verified on suma 2026-07-06: with todo listed first, 34 Metrics/* offenses
10
+ # remained; moved last, cleared. Every gem in the metanorma-org fleet
11
+ # already ships a `.rubocop_todo.yml` on its live tree (audited 2026-07-06,
12
+ # 54/54 have it), so this reference is safe to emit unconditionally.
13
+ - .rubocop_todo.yml
5
14
 
6
15
  # Rubocop plugins enabled centrally so every metanorma-org gem picks them up
7
16
  # on cimas sync — best practice belongs at the shared-template layer, not
@@ -150,6 +150,11 @@ a.FootnoteRef, span.FootnoteRef {
150
150
  vertical-align: super;
151
151
  }
152
152
 
153
+ a.TableFootnoteRef, a.FootnoteRef, a.footnote-number,
154
+ sup a, a:has(> sup) {
155
+ vertical-align: baseline;
156
+ }
157
+
153
158
  .addition {
154
159
  color: blue;
155
160
  }
@@ -562,7 +562,11 @@
562
562
  <xsl:call-template name="setAltText">
563
563
  <xsl:with-param name="value" select="@alt-text"/>
564
564
  </xsl:call-template>
565
- <xsl:apply-templates select="." mode="contents"/>
565
+ <xsl:variable name="item">
566
+ <!-- mnx:table/mn:fmt-name, mnx:figure/mn:fmt-name, mnx:example/mn:fmt-name -->
567
+ <xsl:apply-templates select="mn:fmt-name" mode="contents_item"/>
568
+ </xsl:variable>
569
+ <xsl:apply-templates select="xalan:nodeset($item)/node()"/>
566
570
  <xsl:text>  </xsl:text>
567
571
  <fo:inline role="SKIP">
568
572
  <fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
@@ -616,7 +620,7 @@
616
620
  <!-- List of Tables -->
617
621
  <xsl:if test="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
618
622
  <xsl:call-template name="insertListOf_Title">
619
- <xsl:with-param name="title" select="$title-list-tables"/>
623
+ <xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
620
624
  </xsl:call-template>
621
625
  <fo:block role="TOC">
622
626
  <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
@@ -628,7 +632,7 @@
628
632
  <!-- List of Figures -->
629
633
  <xsl:if test="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
630
634
  <xsl:call-template name="insertListOf_Title">
631
- <xsl:with-param name="title" select="$title-list-figures"/>
635
+ <xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
632
636
  </xsl:call-template>
633
637
  <fo:block role="TOC">
634
638
  <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
@@ -640,7 +644,7 @@
640
644
  <!-- List of Examples -->
641
645
  <xsl:if test="$contents/mnx:doc[@num = $num]//mnx:examples/mnx:example">
642
646
  <xsl:call-template name="insertListOf_Title">
643
- <xsl:with-param name="title" select="$title-list-examples"/>
647
+ <xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
644
648
  </xsl:call-template>
645
649
  <fo:block role="TOC">
646
650
  <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:examples/mnx:example">
@@ -1486,45 +1490,59 @@
1486
1490
 
1487
1491
  <xsl:variable name="ace_tag">ace-tag_</xsl:variable>
1488
1492
 
1489
- <xsl:variable name="title-list-tables">
1490
- <xsl:variable name="toc_table_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title"/>
1491
- <xsl:value-of select="$toc_table_title"/>
1492
- <xsl:if test="normalize-space($toc_table_title) = ''">
1493
- <xsl:call-template name="getLocalizedString">
1494
- <xsl:with-param name="key">toc_tables</xsl:with-param>
1495
- </xsl:call-template>
1496
- </xsl:if>
1497
- </xsl:variable>
1493
+ <xsl:variable name="toc_title_lists_">
1494
+ <xsl:for-each select="//mn:metanorma">
1495
+ <xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
1496
+ <xsl:variable name="docid"><xsl:call-template name="getDocumentId"/></xsl:variable>
1497
+ <xsl:variable name="current_document">
1498
+ <xsl:copy-of select="."/>
1499
+ </xsl:variable>
1500
+ <xsl:for-each select="xalan:nodeset($current_document)">
1501
+ <mnx:doc id="{$docid}" num="{$num}">
1502
+ <mnx:title-list-tables>
1503
+ <xsl:variable name="toc_table_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title"/>
1504
+ <xsl:value-of select="$toc_table_title"/>
1505
+ <xsl:if test="normalize-space($toc_table_title) = ''">
1506
+ <xsl:call-template name="getLocalizedString">
1507
+ <xsl:with-param name="key">toc_tables</xsl:with-param>
1508
+ </xsl:call-template>
1509
+ </xsl:if>
1510
+ </mnx:title-list-tables>
1498
1511
 
1499
- <xsl:variable name="title-list-figures">
1500
- <xsl:variable name="toc_figure_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title"/>
1501
- <xsl:value-of select="$toc_figure_title"/>
1502
- <xsl:if test="normalize-space($toc_figure_title) = ''">
1503
- <xsl:call-template name="getLocalizedString">
1504
- <xsl:with-param name="key">toc_figures</xsl:with-param>
1505
- </xsl:call-template>
1506
- </xsl:if>
1507
- </xsl:variable>
1512
+ <mnx:title-list-figures>
1513
+ <xsl:variable name="toc_figure_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title"/>
1514
+ <xsl:value-of select="$toc_figure_title"/>
1515
+ <xsl:if test="normalize-space($toc_figure_title) = ''">
1516
+ <xsl:call-template name="getLocalizedString">
1517
+ <xsl:with-param name="key">toc_figures</xsl:with-param>
1518
+ </xsl:call-template>
1519
+ </xsl:if>
1520
+ </mnx:title-list-figures>
1508
1521
 
1509
- <xsl:variable name="title-list-examples">
1510
- <xsl:variable name="toc_example_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title"/>
1511
- <xsl:value-of select="$toc_example_title"/>
1512
- <xsl:if test="normalize-space($toc_example_title) = ''">
1513
- <xsl:call-template name="getLocalizedString">
1514
- <xsl:with-param name="key">toc_examples</xsl:with-param>
1515
- </xsl:call-template>
1516
- </xsl:if>
1517
- </xsl:variable>
1522
+ <mnx:title-list-examples>
1523
+ <xsl:variable name="toc_example_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title"/>
1524
+ <xsl:value-of select="$toc_example_title"/>
1525
+ <xsl:if test="normalize-space($toc_example_title) = ''">
1526
+ <xsl:call-template name="getLocalizedString">
1527
+ <xsl:with-param name="key">toc_examples</xsl:with-param>
1528
+ </xsl:call-template>
1529
+ </xsl:if>
1530
+ </mnx:title-list-examples>
1518
1531
 
1519
- <xsl:variable name="title-list-recommendations">
1520
- <xsl:variable name="toc_requirement_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='requirement']/mn:title"/>
1521
- <xsl:value-of select="$toc_requirement_title"/>
1522
- <xsl:if test="normalize-space($toc_requirement_title) = ''">
1523
- <xsl:call-template name="getLocalizedString">
1524
- <xsl:with-param name="key">toc_recommendations</xsl:with-param>
1525
- </xsl:call-template>
1526
- </xsl:if>
1532
+ <mnx:title-list-recommendations>
1533
+ <xsl:variable name="toc_requirement_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='requirement']/mn:title"/>
1534
+ <xsl:value-of select="$toc_requirement_title"/>
1535
+ <xsl:if test="normalize-space($toc_requirement_title) = ''">
1536
+ <xsl:call-template name="getLocalizedString">
1537
+ <xsl:with-param name="key">toc_recommendations</xsl:with-param>
1538
+ </xsl:call-template>
1539
+ </xsl:if>
1540
+ </mnx:title-list-recommendations>
1541
+ </mnx:doc>
1542
+ </xsl:for-each>
1543
+ </xsl:for-each>
1527
1544
  </xsl:variable>
1545
+ <xsl:variable name="toc_title_lists" select="xalan:nodeset($toc_title_lists_)"/>
1528
1546
 
1529
1547
  <xsl:variable name="bibdata">
1530
1548
  <xsl:copy-of select="//mn:metanorma/mn:bibdata"/>
@@ -2304,7 +2322,7 @@
2304
2322
  <xsl:apply-templates mode="update_xml_step1"/>
2305
2323
  </xsl:template>
2306
2324
 
2307
- <xsl:template match="mn:semx" mode="update_xml_step1">
2325
+ <xsl:template match="mn:semx[not(@element = 'name')]" mode="update_xml_step1">
2308
2326
  <xsl:apply-templates mode="update_xml_step1"/>
2309
2327
  </xsl:template>
2310
2328
 
@@ -2597,7 +2615,7 @@
2597
2615
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
2598
2616
  <xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
2599
2617
 
2600
- <xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or (ancestor::mn:tt and ancestor::mn:table and string-length() &gt; 20) or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
2618
+ <xsl:template match="text()[not( (ancestor::mn:bibdata and not(ancestor::mn:title)) or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or (ancestor::mn:tt and ancestor::mn:table and string-length() &gt; 20) or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or (ancestor::mn:fmt-name and not(ancestor::mn:semx[@element = 'name'])) or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
2601
2619
 
2602
2620
  <xsl:variable name="parent" select="local-name(..)"/>
2603
2621
 
@@ -2642,7 +2660,7 @@
2642
2660
  <xsl:variable name="text">
2643
2661
  <xsl:element name="text" namespace="{$namespace_full}">
2644
2662
  <xsl:choose>
2645
- <xsl:when test="ancestor::mn:table"><xsl:value-of select="."/></xsl:when> <!-- no need enclose standard's number into tag 'keep-together_within-line' in table cells -->
2663
+ <xsl:when test="ancestor::mn:table and not(ancestor::mn:fmt-name)"><xsl:value-of select="."/></xsl:when> <!-- no need enclose standard's number into tag 'keep-together_within-line' in table cells -->
2646
2664
  <xsl:otherwise>
2647
2665
  <xsl:variable name="text_" select="java:replaceAll(java:java.lang.String.new(.), $regex_standard_reference, concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
2648
2666
  <!-- <xsl:value-of select="$text__"/> -->
@@ -2720,6 +2738,10 @@
2720
2738
  <xsl:copy-of select="."/>
2721
2739
  </xsl:template>
2722
2740
 
2741
+ <xsl:template match="mn:semx" mode="update_xml_enclose_keep-together_within-line">
2742
+ <xsl:apply-templates mode="update_xml_enclose_keep-together_within-line"/>
2743
+ </xsl:template>
2744
+
2723
2745
  <xsl:template name="replace_text_tags">
2724
2746
  <xsl:param name="tag_open"/>
2725
2747
  <xsl:param name="tag_close"/>
@@ -10105,6 +10127,7 @@
10105
10127
  <xsl:variable name="svg_content">
10106
10128
  <xsl:apply-templates select="." mode="svg_update"/>
10107
10129
  </xsl:variable>
10130
+ <!-- <svg_content><xsl:copy-of select="$svg_content"/></svg_content> -->
10108
10131
 
10109
10132
  <xsl:variable name="alt-text">
10110
10133
  <xsl:choose>
@@ -10319,7 +10342,7 @@
10319
10342
  </xsl:copy>
10320
10343
  </xsl:template>
10321
10344
 
10322
- <xsl:template match="mn:image/@href" mode="svg_update">
10345
+ <xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
10323
10346
  <xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
10324
10347
  <xsl:value-of select="."/>
10325
10348
  </xsl:attribute>
@@ -13004,13 +13027,13 @@
13004
13027
 
13005
13028
  <xsl:template name="processTablesFigures_Contents">
13006
13029
  <xsl:param name="always"/>
13007
- <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
13030
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
13008
13031
  <xsl:call-template name="processTables_Contents"/>
13009
13032
  </xsl:if>
13010
- <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
13033
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
13011
13034
  <xsl:call-template name="processFigures_Contents"/>
13012
13035
  </xsl:if>
13013
- <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
13036
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title)">
13014
13037
  <xsl:call-template name="processExamples_Contents"/>
13015
13038
  </xsl:if>
13016
13039
  </xsl:template>
@@ -13061,22 +13084,22 @@
13061
13084
 
13062
13085
  <xsl:template name="processExamples_Contents">
13063
13086
  <mnx:examples>
13064
- <xsl:for-each select="//mn:example[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != '']">
13065
- <xsl:choose>
13066
- <xsl:when test="mn:fmt-name">
13067
- <xsl:variable name="fmt_name">
13068
- <xsl:apply-templates select="mn:fmt-name" mode="update_xml_step1"/>
13069
- </xsl:variable>
13070
- <mnx:example id="{@id}" alt-text="{normalize-space($fmt_name)}">
13071
- <xsl:copy-of select="$fmt_name"/>
13072
- </mnx:example>
13073
- </xsl:when>
13074
- <xsl:otherwise>
13075
- <mnx:example id="{@id}" alt-text="{mn:name}">
13076
- <xsl:copy-of select="mn:name"/>
13077
- </mnx:example>
13078
- </xsl:otherwise>
13079
- </xsl:choose>
13087
+ <xsl:for-each select="//mn:example[@id and mn:fmt-name and normalize-space(@id) != '']">
13088
+ <!-- https://github.com/metanorma/metanorma-pdfa/issues/32#issuecomment-4929133938:
13089
+ //example/fmt-xref-label[@container] + //example/fmt-name/span[@class = 'fmt-caption-delim'] + //example/name,
13090
+ with the last two elements dropped if //example/name does not exist. -->
13091
+ <xsl:variable name="example_name">
13092
+ <xsl:apply-templates select="mn:name/node()" mode="update_xml_step1"/>
13093
+ </xsl:variable>
13094
+ <mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
13095
+ <xsl:element name="fmt-name" namespace="{$namespace_full}">
13096
+ <xsl:value-of select="mn:fmt-xref-label[@container]"/>
13097
+ <xsl:if test="normalize-space($example_name) != ''">
13098
+ <xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
13099
+ <xsl:copy-of select="$example_name"/>
13100
+ </xsl:if>
13101
+ </xsl:element>
13102
+ </mnx:example>
13080
13103
  </xsl:for-each>
13081
13104
  </mnx:examples>
13082
13105
  </xsl:template>
@@ -13349,15 +13372,18 @@
13349
13372
 
13350
13373
  <xsl:call-template name="insertFigureBookmarks">
13351
13374
  <xsl:with-param name="contents" select="mnx:contents"/>
13375
+ <xsl:with-param name="num" select="@num"/>
13352
13376
  </xsl:call-template>
13353
13377
 
13354
13378
  <xsl:call-template name="insertTableBookmarks">
13355
13379
  <xsl:with-param name="contents" select="mnx:contents"/>
13380
+ <xsl:with-param name="num" select="@num"/>
13356
13381
  <xsl:with-param name="lang" select="@lang"/>
13357
13382
  </xsl:call-template>
13358
13383
 
13359
13384
  <xsl:call-template name="insertExampleBookmarks">
13360
13385
  <xsl:with-param name="contents" select="mnx:contents"/>
13386
+ <xsl:with-param name="num" select="@num"/>
13361
13387
  <xsl:with-param name="lang" select="@lang"/>
13362
13388
  </xsl:call-template>
13363
13389
 
@@ -13372,15 +13398,18 @@
13372
13398
 
13373
13399
  <xsl:call-template name="insertFigureBookmarks">
13374
13400
  <xsl:with-param name="contents" select="mnx:contents"/>
13401
+ <xsl:with-param name="num" select="@num"/>
13375
13402
  </xsl:call-template>
13376
13403
 
13377
13404
  <xsl:call-template name="insertTableBookmarks">
13378
13405
  <xsl:with-param name="contents" select="mnx:contents"/>
13406
+ <xsl:with-param name="num" select="@num"/>
13379
13407
  <xsl:with-param name="lang" select="@lang"/>
13380
13408
  </xsl:call-template>
13381
13409
 
13382
13410
  <xsl:call-template name="insertExampleBookmarks">
13383
13411
  <xsl:with-param name="contents" select="mnx:contents"/>
13412
+ <xsl:with-param name="num" select="@num"/>
13384
13413
  <xsl:with-param name="lang" select="@lang"/>
13385
13414
  </xsl:call-template>
13386
13415
 
@@ -13393,15 +13422,18 @@
13393
13422
 
13394
13423
  <xsl:call-template name="insertFigureBookmarks">
13395
13424
  <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
13425
+ <xsl:with-param name="num" select="@num"/>
13396
13426
  </xsl:call-template>
13397
13427
 
13398
13428
  <xsl:call-template name="insertTableBookmarks">
13399
13429
  <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
13430
+ <xsl:with-param name="num" select="@num"/>
13400
13431
  <xsl:with-param name="lang" select="@lang"/>
13401
13432
  </xsl:call-template>
13402
13433
 
13403
13434
  <xsl:call-template name="insertExampleBookmarks">
13404
13435
  <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
13436
+ <xsl:with-param name="num" select="@num"/>
13405
13437
  <xsl:with-param name="lang" select="@lang"/>
13406
13438
  </xsl:call-template>
13407
13439
 
@@ -13417,6 +13449,7 @@
13417
13449
 
13418
13450
  <xsl:template name="insertFigureBookmarks">
13419
13451
  <xsl:param name="contents"/>
13452
+ <xsl:param name="num"/>
13420
13453
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
13421
13454
  <xsl:if test="$contents_nodes/mnx:figure">
13422
13455
  <fo:bookmark internal-destination="{$contents_nodes/mnx:figure[1]/@id}" starting-state="hide">
@@ -13434,7 +13467,7 @@
13434
13467
  <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
13435
13468
 
13436
13469
  <xsl:variable name="bookmark-title">
13437
- <xsl:value-of select="$title-list-figures"/>
13470
+ <xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
13438
13471
  </xsl:variable>
13439
13472
  <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
13440
13473
  <xsl:for-each select="$contents_nodes//mnx:figures/mnx:figure">
@@ -13448,6 +13481,7 @@
13448
13481
 
13449
13482
  <xsl:template name="insertTableBookmarks">
13450
13483
  <xsl:param name="contents"/>
13484
+ <xsl:param name="num"/>
13451
13485
  <xsl:param name="lang"/>
13452
13486
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
13453
13487
  <xsl:if test="$contents_nodes/mnx:table">
@@ -13471,7 +13505,7 @@
13471
13505
  <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
13472
13506
 
13473
13507
  <xsl:variable name="bookmark-title">
13474
- <xsl:value-of select="$title-list-tables"/>
13508
+ <xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
13475
13509
  </xsl:variable>
13476
13510
 
13477
13511
  <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
@@ -13486,8 +13520,9 @@
13486
13520
  </xsl:if>
13487
13521
  </xsl:template> <!-- insertTableBookmarks -->
13488
13522
 
13489
- <xsl:template name="insertExampleBookmarks">
13523
+ <xsl:template name="insertExampleBookmarks">
13490
13524
  <xsl:param name="contents"/>
13525
+ <xsl:param name="num"/>
13491
13526
  <xsl:param name="lang"/>
13492
13527
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
13493
13528
  <xsl:if test="$contents_nodes/mnx:example">
@@ -13511,7 +13546,7 @@
13511
13546
  <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
13512
13547
 
13513
13548
  <xsl:variable name="bookmark-title">
13514
- <xsl:value-of select="$title-list-examples"/>
13549
+ <xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
13515
13550
  </xsl:variable>
13516
13551
 
13517
13552
  <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
@@ -13672,6 +13707,18 @@
13672
13707
  </xsl:copy>
13673
13708
  </xsl:template>
13674
13709
 
13710
+ <xsl:template match="mn:tt" mode="contents_item">
13711
+ <xsl:copy>
13712
+ <xsl:apply-templates mode="contents_item"/>
13713
+ </xsl:copy>
13714
+ </xsl:template>
13715
+
13716
+ <xsl:template match="*[local-name() = 'keep-together_within-line']" mode="contents_item">
13717
+ <xsl:copy>
13718
+ <xsl:apply-templates mode="contents_item"/>
13719
+ </xsl:copy>
13720
+ </xsl:template>
13721
+
13675
13722
  <xsl:template match="mn:stem" mode="contents_item"/>
13676
13723
  <xsl:template match="mn:fmt-stem" mode="contents_item">
13677
13724
  <xsl:copy-of select="."/>
@@ -1931,7 +1931,7 @@ or as the string "auto"</a:documentation>
1931
1931
  </element>
1932
1932
  </define>
1933
1933
  <define name="mathml">
1934
- <a:documentation>Encoding of MathML: the official W3C MathML 3.0 grammar (namespace
1934
+ <a:documentation>Encoding of MathML: the official W3C MathML 4 grammar (namespace
1935
1935
  http://www.w3.org/1998/Math/MathML), via the metanorma wrapper in
1936
1936
  grammars/mathml/. See grammars/mathml/README.adoc and basicdoc-models#35.</a:documentation>
1937
1937
  <externalRef href="metanorma-mathml.rng"/>