metanorma-bipm 2.7.0 → 2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.adoc +1 -1
- data/lib/isodoc/bipm/bipm.brochure.xsl +264 -122
- data/lib/isodoc/bipm/bipm.guide.xsl +264 -122
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +264 -122
- data/lib/isodoc/bipm/bipm.rapport.xsl +264 -122
- data/lib/isodoc/bipm/jcgm.standard.xsl +148 -59
- data/lib/isodoc/bipm/presentation_xml_convert.rb +4 -1
- data/lib/metanorma/bipm/basicdoc.rng +6 -6
- data/lib/metanorma/bipm/cleanup.rb +6 -4
- data/lib/metanorma/bipm/isodoc.rng +8 -60
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +2 -2
- metadata +5 -5
@@ -150,10 +150,10 @@
|
|
150
150
|
<xsl:template name="layout-master-set">
|
151
151
|
<fo:layout-master-set>
|
152
152
|
<!-- cover page -->
|
153
|
-
<fo:simple-page-master master-name="cover-page
|
153
|
+
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
154
154
|
<fo:region-body margin-top="85mm" margin-bottom="30mm" margin-left="100mm" margin-right="19mm"/>
|
155
155
|
<fo:region-before extent="85mm"/>
|
156
|
-
<fo:region-after region-name="cover-page-
|
156
|
+
<fo:region-after region-name="cover-page-footer" extent="30mm"/>
|
157
157
|
<fo:region-start extent="100mm"/>
|
158
158
|
<fo:region-end extent="19mm"/>
|
159
159
|
</fo:simple-page-master>
|
@@ -203,14 +203,14 @@
|
|
203
203
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
204
204
|
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
205
205
|
</fo:simple-page-master>
|
206
|
-
<fo:page-sequence-master master-name="document
|
206
|
+
<fo:page-sequence-master master-name="document">
|
207
207
|
<fo:repeatable-page-master-alternatives>
|
208
208
|
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
209
209
|
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even-jcgm"/>
|
210
210
|
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-jcgm"/>
|
211
211
|
</fo:repeatable-page-master-alternatives>
|
212
212
|
</fo:page-sequence-master>
|
213
|
-
<fo:page-sequence-master master-name="document-
|
213
|
+
<fo:page-sequence-master master-name="document-landscape">
|
214
214
|
<fo:repeatable-page-master-alternatives>
|
215
215
|
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
216
216
|
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even-jcgm-landscape"/>
|
@@ -262,12 +262,9 @@
|
|
262
262
|
|
263
263
|
<xsl:for-each select=".//mn:page_sequence[parent::mn:boilerplate or parent::mn:preface][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
|
264
264
|
|
265
|
-
<
|
265
|
+
<xsl:variable name="page_orientation"><xsl:call-template name="getPageSequenceOrientation"/></xsl:variable>
|
266
266
|
|
267
|
-
|
268
|
-
<xsl:text>document-jcgm</xsl:text>
|
269
|
-
<xsl:call-template name="getPageSequenceOrientation"/>
|
270
|
-
</xsl:attribute>
|
267
|
+
<fo:page-sequence master-reference="document{$page_orientation}" format="i">
|
271
268
|
|
272
269
|
<xsl:if test="position() = 1">
|
273
270
|
<xsl:attribute name="initial-page-number">2</xsl:attribute>
|
@@ -294,13 +291,10 @@
|
|
294
291
|
|
295
292
|
<xsl:for-each select=".//mn:page_sequence[not(parent::mn:boilerplate or parent::mn:preface)][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
|
296
293
|
|
297
|
-
|
298
|
-
<fo:page-sequence master-reference="document-jcgm" force-page-count="no-force">
|
294
|
+
<xsl:variable name="page_orientation"><xsl:call-template name="getPageSequenceOrientation"/></xsl:variable>
|
299
295
|
|
300
|
-
|
301
|
-
|
302
|
-
<xsl:call-template name="getPageSequenceOrientation"/>
|
303
|
-
</xsl:attribute>
|
296
|
+
<!-- JCGM BODY -->
|
297
|
+
<fo:page-sequence master-reference="document{$page_orientation}" force-page-count="no-force">
|
304
298
|
|
305
299
|
<xsl:if test="position() = 1">
|
306
300
|
<xsl:attribute name="initial-page-number">1</xsl:attribute>
|
@@ -323,7 +317,7 @@
|
|
323
317
|
</xsl:when> <!-- END: count(//mn:metanorma) = 1 -->
|
324
318
|
|
325
319
|
<xsl:otherwise> <!-- count(//mn:metanorma) != 1 -->
|
326
|
-
<fo:page-sequence master-reference="document
|
320
|
+
<fo:page-sequence master-reference="document" initial-page-number="1" force-page-count="no-force">
|
327
321
|
|
328
322
|
<xsl:call-template name="insertHeaderFooter"/>
|
329
323
|
|
@@ -368,8 +362,8 @@
|
|
368
362
|
</xsl:template>
|
369
363
|
|
370
364
|
<xsl:template name="cover-page">
|
371
|
-
<fo:page-sequence master-reference="cover-page
|
372
|
-
<fo:static-content flow-name="cover-page-
|
365
|
+
<fo:page-sequence master-reference="cover-page" font-family="Arial" font-size="10.5pt" force-page-count="no-force">
|
366
|
+
<fo:static-content flow-name="cover-page-footer" font-size="10pt">
|
373
367
|
<fo:block font-size="10pt" border-bottom="0.5pt solid black" padding-bottom="2.5mm" margin-left="-1mm" space-after="4mm">
|
374
368
|
<!-- Example: First edition July 2009 -->
|
375
369
|
<xsl:call-template name="printEdition"/>
|
@@ -571,32 +565,30 @@
|
|
571
565
|
|
572
566
|
<xsl:template name="insertListOf_Title">
|
573
567
|
<xsl:param name="title"/>
|
574
|
-
<fo:block
|
568
|
+
<fo:block xsl:use-attribute-sets="toc-listof-title-style">
|
575
569
|
<xsl:value-of select="$title"/>
|
576
570
|
</fo:block>
|
577
571
|
</xsl:template>
|
578
572
|
|
579
573
|
<xsl:template name="insertListOf_Item">
|
580
|
-
<fo:block
|
581
|
-
<fo:
|
582
|
-
<
|
583
|
-
<xsl:
|
584
|
-
|
585
|
-
|
586
|
-
<
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
<fo:
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
</fo:basic-link>
|
595
|
-
</fo:block>
|
574
|
+
<fo:block xsl:use-attribute-sets="toc-listof-item-style">
|
575
|
+
<fo:basic-link internal-destination="{@id}">
|
576
|
+
<xsl:call-template name="setAltText">
|
577
|
+
<xsl:with-param name="value" select="@alt-text"/>
|
578
|
+
</xsl:call-template>
|
579
|
+
<fo:inline>
|
580
|
+
<xsl:apply-templates select="." mode="contents"/>
|
581
|
+
</fo:inline>
|
582
|
+
<xsl:text> </xsl:text>
|
583
|
+
<fo:inline keep-together.within-line="always" font-weight="normal">
|
584
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
585
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
586
|
+
</fo:inline>
|
587
|
+
</fo:basic-link>
|
596
588
|
</fo:block>
|
597
589
|
</xsl:template>
|
598
590
|
|
599
|
-
<xsl:template match="mn:preface//mn:clause[@type = 'toc']" priority="3">
|
591
|
+
<xsl:template match="mn:preface//mn:clause[@type = 'toc']" name="toc" priority="3">
|
600
592
|
<fo:block-container>
|
601
593
|
<fo:block role="TOC">
|
602
594
|
|
@@ -620,24 +612,25 @@
|
|
620
612
|
</xsl:for-each>
|
621
613
|
|
622
614
|
<!-- List of Tables -->
|
623
|
-
<xsl:
|
624
|
-
<xsl:
|
625
|
-
<xsl:
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
</xsl:
|
615
|
+
<xsl:for-each select="$contents//mnx:tables/mnx:table">
|
616
|
+
<xsl:if test="position() = 1">
|
617
|
+
<xsl:call-template name="insertListOf_Title">
|
618
|
+
<xsl:with-param name="title" select="$title-list-tables"/>
|
619
|
+
</xsl:call-template>
|
620
|
+
</xsl:if>
|
621
|
+
<xsl:call-template name="insertListOf_Item"/>
|
622
|
+
</xsl:for-each>
|
631
623
|
|
632
624
|
<!-- List of Figures -->
|
633
|
-
<xsl:
|
625
|
+
<xsl:for-each select="$contents//mnx:figures/mnx:figure">
|
626
|
+
<xsl:if test="position() = 1">
|
634
627
|
<xsl:call-template name="insertListOf_Title">
|
635
628
|
<xsl:with-param name="title" select="$title-list-figures"/>
|
636
629
|
</xsl:call-template>
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
630
|
+
</xsl:if>
|
631
|
+
<xsl:call-template name="insertListOf_Item"/>
|
632
|
+
</xsl:for-each>
|
633
|
+
|
641
634
|
</xsl:if>
|
642
635
|
</fo:block>
|
643
636
|
</fo:block-container>
|
@@ -645,7 +638,7 @@
|
|
645
638
|
|
646
639
|
<xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
|
647
640
|
<fo:block text-align-last="justify">
|
648
|
-
<fo:inline
|
641
|
+
<fo:inline xsl:use-attribute-sets="toc-title-style">
|
649
642
|
<xsl:call-template name="getLocalizedString">
|
650
643
|
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
651
644
|
</xsl:call-template>
|
@@ -1001,7 +994,7 @@
|
|
1001
994
|
</fo:inline>
|
1002
995
|
<xsl:text> </xsl:text>
|
1003
996
|
<fo:inline keep-together.within-line="always" font-weight="normal">
|
1004
|
-
<fo:leader
|
997
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
1005
998
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
1006
999
|
</fo:inline>
|
1007
1000
|
</fo:basic-link>
|
@@ -1218,7 +1211,7 @@
|
|
1218
1211
|
<xsl:template match="mn:indexsect"/>
|
1219
1212
|
<xsl:template match="mn:indexsect" mode="index">
|
1220
1213
|
|
1221
|
-
<fo:page-sequence master-reference="document
|
1214
|
+
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
1222
1215
|
<xsl:variable name="header-title">
|
1223
1216
|
<xsl:choose>
|
1224
1217
|
<xsl:when test="./mn:title[1]/mn:tab">
|
@@ -7011,6 +7004,16 @@
|
|
7011
7004
|
</xsl:variable>
|
7012
7005
|
<xsl:variable name="quot">"</xsl:variable>
|
7013
7006
|
<xsl:variable name="styles_">
|
7007
|
+
<!-- PDF: Borderless tables https://github.com/metanorma/metanorma-jis/issues/344 -->
|
7008
|
+
<xsl:if test="@plain = 'true' or ancestor::mn:table/@plain = 'true'">
|
7009
|
+
<style name="border-top">none</style>
|
7010
|
+
<style name="border-right">none</style>
|
7011
|
+
<style name="border-left">none</style>
|
7012
|
+
<style name="border-bottom">none</style>
|
7013
|
+
<style name="color">inherit</style>
|
7014
|
+
<style name="background-color">transparent</style>
|
7015
|
+
</xsl:if>
|
7016
|
+
|
7014
7017
|
<xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
|
7015
7018
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
7016
7019
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
@@ -8963,6 +8966,10 @@
|
|
8963
8966
|
</xsl:attribute-set>
|
8964
8967
|
|
8965
8968
|
<xsl:template name="refine_note-style">
|
8969
|
+
<xsl:if test="parent::mn:references">
|
8970
|
+
<xsl:attribute name="margin-top">2pt</xsl:attribute>
|
8971
|
+
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
8972
|
+
</xsl:if>
|
8966
8973
|
</xsl:template>
|
8967
8974
|
|
8968
8975
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
@@ -9015,7 +9022,10 @@
|
|
9015
9022
|
|
9016
9023
|
<xsl:call-template name="setNamedDestination"/>
|
9017
9024
|
|
9018
|
-
<fo:block-container
|
9025
|
+
<fo:block-container xsl:use-attribute-sets="note-style" role="SKIP">
|
9026
|
+
<xsl:if test="not(parent::mn:references)">
|
9027
|
+
<xsl:copy-of select="@id"/>
|
9028
|
+
</xsl:if>
|
9019
9029
|
|
9020
9030
|
<xsl:call-template name="setBlockSpanAll"/>
|
9021
9031
|
|
@@ -11482,7 +11492,7 @@
|
|
11482
11492
|
|
11483
11493
|
<xsl:template name="insertFootnoteSeparatorCommon">
|
11484
11494
|
<xsl:param name="leader_length">30%</xsl:param>
|
11485
|
-
<fo:static-content flow-name="xsl-footnote-separator">
|
11495
|
+
<fo:static-content flow-name="xsl-footnote-separator" role="artifact">
|
11486
11496
|
<fo:block>
|
11487
11497
|
<fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
|
11488
11498
|
</fo:block>
|
@@ -11714,8 +11724,8 @@
|
|
11714
11724
|
</xsl:template> <!-- bibitem -->
|
11715
11725
|
|
11716
11726
|
<!-- Bibliography (non-normative references) -->
|
11717
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
11718
|
-
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
11727
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
|
11728
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
11719
11729
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
11720
11730
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
11721
11731
|
<xsl:call-template name="setNamedDestination"/>
|
@@ -11767,7 +11777,7 @@
|
|
11767
11777
|
</fo:list-item>
|
11768
11778
|
</xsl:otherwise>
|
11769
11779
|
</xsl:choose>
|
11770
|
-
<xsl:apply-templates select="following-sibling::*[1][self::mn:bibitem]
|
11780
|
+
<xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
|
11771
11781
|
<xsl:with-param name="skip">false</xsl:with-param>
|
11772
11782
|
</xsl:apply-templates>
|
11773
11783
|
</xsl:template>
|
@@ -11788,8 +11798,26 @@
|
|
11788
11798
|
</xsl:apply-templates>
|
11789
11799
|
<xsl:apply-templates select="mn:formattedref"/>
|
11790
11800
|
<!-- end bibitem processing -->
|
11801
|
+
|
11802
|
+
<xsl:call-template name="processBibliographyNote"/>
|
11791
11803
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
11792
11804
|
|
11805
|
+
<xsl:template name="processBibliographyNote">
|
11806
|
+
<xsl:if test="self::mn:note">
|
11807
|
+
<xsl:variable name="note_node">
|
11808
|
+
<xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
|
11809
|
+
<xsl:copy> <!-- skip @id -->
|
11810
|
+
<xsl:copy-of select="node()"/>
|
11811
|
+
</xsl:copy>
|
11812
|
+
</xsl:element>
|
11813
|
+
</xsl:variable>
|
11814
|
+
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
11815
|
+
<xsl:call-template name="note"/>
|
11816
|
+
</xsl:for-each> -->
|
11817
|
+
<xsl:call-template name="note"/>
|
11818
|
+
</xsl:if>
|
11819
|
+
</xsl:template>
|
11820
|
+
|
11793
11821
|
<xsl:template match="mn:title" mode="title">
|
11794
11822
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
11795
11823
|
</xsl:template>
|
@@ -12339,6 +12367,67 @@
|
|
12339
12367
|
<!-- End Form's elements processing -->
|
12340
12368
|
<!-- =================== -->
|
12341
12369
|
|
12370
|
+
<xsl:attribute-set name="toc-style">
|
12371
|
+
</xsl:attribute-set>
|
12372
|
+
|
12373
|
+
<xsl:template name="refine_toc-style">
|
12374
|
+
</xsl:template>
|
12375
|
+
|
12376
|
+
<xsl:attribute-set name="toc-title-style">
|
12377
|
+
<xsl:attribute name="font-size">15pt</xsl:attribute>
|
12378
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
12379
|
+
<xsl:attribute name="role">H1</xsl:attribute>
|
12380
|
+
</xsl:attribute-set>
|
12381
|
+
|
12382
|
+
<xsl:template name="refine_toc-title-style">
|
12383
|
+
</xsl:template>
|
12384
|
+
|
12385
|
+
<xsl:attribute-set name="toc-title-page-style">
|
12386
|
+
</xsl:attribute-set> <!-- toc-title-page-style -->
|
12387
|
+
|
12388
|
+
<xsl:template name="refine_toc-title-page-style">
|
12389
|
+
</xsl:template>
|
12390
|
+
|
12391
|
+
<xsl:attribute-set name="toc-item-block-style">
|
12392
|
+
</xsl:attribute-set>
|
12393
|
+
|
12394
|
+
<xsl:template name="refine_toc-item-block-style">
|
12395
|
+
</xsl:template>
|
12396
|
+
|
12397
|
+
<xsl:attribute-set name="toc-item-style">
|
12398
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
12399
|
+
</xsl:attribute-set> <!-- END: toc-item-style -->
|
12400
|
+
|
12401
|
+
<xsl:template name="refine_toc-item-style">
|
12402
|
+
</xsl:template> <!-- END: refine_toc-item-style -->
|
12403
|
+
|
12404
|
+
<xsl:attribute-set name="toc-leader-style">
|
12405
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
12406
|
+
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
12407
|
+
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
12408
|
+
|
12409
|
+
<xsl:attribute-set name="toc-pagenumber-style">
|
12410
|
+
</xsl:attribute-set>
|
12411
|
+
|
12412
|
+
<!-- List of Figures, Tables -->
|
12413
|
+
<xsl:attribute-set name="toc-listof-title-style">
|
12414
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
12415
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
12416
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
12417
|
+
</xsl:attribute-set>
|
12418
|
+
|
12419
|
+
<xsl:template name="refine_toc-listof-title-style">
|
12420
|
+
</xsl:template>
|
12421
|
+
|
12422
|
+
<xsl:attribute-set name="toc-listof-item-block-style">
|
12423
|
+
</xsl:attribute-set>
|
12424
|
+
|
12425
|
+
<xsl:attribute-set name="toc-listof-item-style">
|
12426
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
12427
|
+
<xsl:attribute name="margin-left">17mm</xsl:attribute>
|
12428
|
+
<xsl:attribute name="text-indent">-12mm</xsl:attribute>
|
12429
|
+
</xsl:attribute-set>
|
12430
|
+
|
12342
12431
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
12343
12432
|
<xsl:variable name="nodes_preface_">
|
12344
12433
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -12676,7 +12765,7 @@
|
|
12676
12765
|
</xsl:if>
|
12677
12766
|
|
12678
12767
|
<xsl:for-each select="$contents_nodes/mnx:doc">
|
12679
|
-
<fo:bookmark internal-destination="{contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
12768
|
+
<fo:bookmark internal-destination="{mnx:contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
12680
12769
|
<xsl:if test="@bundle = 'true'">
|
12681
12770
|
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
12682
12771
|
</xsl:if>
|
@@ -12710,7 +12799,7 @@
|
|
12710
12799
|
</xsl:choose>
|
12711
12800
|
</fo:bookmark-title>
|
12712
12801
|
|
12713
|
-
<xsl:apply-templates select="contents/mnx:item" mode="bookmark"/>
|
12802
|
+
<xsl:apply-templates select="mnx:contents/mnx:item" mode="bookmark"/>
|
12714
12803
|
|
12715
12804
|
<xsl:call-template name="insertFigureBookmarks">
|
12716
12805
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
@@ -86,10 +86,13 @@ module IsoDoc
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
+
BLACKSQUARE =
|
90
|
+
'<span style="font-size:130%">■</span>  '.freeze
|
91
|
+
|
89
92
|
def quoted_title_render(node, elem, variant_title)
|
90
93
|
add_id(variant_title)
|
91
94
|
variant_title.next =
|
92
|
-
fmt_caption(
|
95
|
+
fmt_caption(BLACKSQUARE, elem, variant_title, {}, {})
|
93
96
|
if s = variant_title.next.at(ns("./semx[@element='title']"))
|
94
97
|
s["source"] = variant_title["id"]
|
95
98
|
end
|
@@ -198,14 +198,14 @@ Applicable to modify and delete</a:documentation>
|
|
198
198
|
</zeroOrMore>
|
199
199
|
</element>
|
200
200
|
</optional>
|
201
|
-
<
|
201
|
+
<zeroOrMore>
|
202
202
|
<element name="description">
|
203
|
-
<a:documentation>Description of the change described in this block</a:documentation>
|
204
|
-
<
|
203
|
+
<a:documentation>Description(s) of the change described in this block</a:documentation>
|
204
|
+
<oneOrMore>
|
205
205
|
<ref name="BasicBlock"/>
|
206
|
-
</
|
206
|
+
</oneOrMore>
|
207
207
|
</element>
|
208
|
-
</
|
208
|
+
</zeroOrMore>
|
209
209
|
<optional>
|
210
210
|
<element name="newcontent">
|
211
211
|
<a:documentation>New content to be added to the document; applicable to add and modify</a:documentation>
|
@@ -1291,13 +1291,13 @@ Restricted recursively to contain only other such inline elements with no identi
|
|
1291
1291
|
<ref name="pure_strike"/>
|
1292
1292
|
<ref name="pure_smallcap"/>
|
1293
1293
|
<ref name="br"/>
|
1294
|
+
<ref name="stem"/>
|
1294
1295
|
</choice>
|
1295
1296
|
</define>
|
1296
1297
|
<define name="NestedTextElement">
|
1297
1298
|
<a:documentation>Contents of TextElement tags: leaves out tags that should occur only at top level of block: bookmark image hr pagebreak</a:documentation>
|
1298
1299
|
<choice>
|
1299
1300
|
<ref name="PureTextElement"/>
|
1300
|
-
<ref name="stem"/>
|
1301
1301
|
<ref name="eref"/>
|
1302
1302
|
<ref name="xref"/>
|
1303
1303
|
<ref name="hyperlink"/>
|
@@ -65,10 +65,12 @@ module Metanorma
|
|
65
65
|
|
66
66
|
# not language-specific, just space-delimited
|
67
67
|
def bibdata_docidentifier_enhance(id, parts)
|
68
|
-
ret =
|
69
|
-
|
70
|
-
|
71
|
-
|
68
|
+
ret = ""
|
69
|
+
p = parts["part"] and ret += "-#{p}"
|
70
|
+
p = parts["subpart"] and ret += "-#{p}"
|
71
|
+
p = parts["appendix"] and ret += " A#{p}"
|
72
|
+
p = parts["annexid"] and ret += ".#{p}"
|
73
|
+
id.children = "#{id.text}#{ret}"
|
72
74
|
end
|
73
75
|
end
|
74
76
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
|
-
<!-- VERSION v2.0
|
3
|
+
<!-- VERSION v2.1.0 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -42,36 +42,6 @@ All IdRefType instances point not to `@id` in Semantic XML, which is the Content
|
|
42
42
|
but to `@anchor`, the user-supplied cross-reference</a:documentation>
|
43
43
|
<text/>
|
44
44
|
</define>
|
45
|
-
<define name="index-primary">
|
46
|
-
<element name="primary">
|
47
|
-
<oneOrMore>
|
48
|
-
<choice>
|
49
|
-
<ref name="PureTextElement"/>
|
50
|
-
<ref name="stem"/>
|
51
|
-
</choice>
|
52
|
-
</oneOrMore>
|
53
|
-
</element>
|
54
|
-
</define>
|
55
|
-
<define name="index-secondary">
|
56
|
-
<element name="secondary">
|
57
|
-
<oneOrMore>
|
58
|
-
<choice>
|
59
|
-
<ref name="PureTextElement"/>
|
60
|
-
<ref name="stem"/>
|
61
|
-
</choice>
|
62
|
-
</oneOrMore>
|
63
|
-
</element>
|
64
|
-
</define>
|
65
|
-
<define name="index-tertiary">
|
66
|
-
<element name="tertiary">
|
67
|
-
<oneOrMore>
|
68
|
-
<choice>
|
69
|
-
<ref name="PureTextElement"/>
|
70
|
-
<ref name="stem"/>
|
71
|
-
</choice>
|
72
|
-
</oneOrMore>
|
73
|
-
</element>
|
74
|
-
</define>
|
75
45
|
<define name="review">
|
76
46
|
<a:documentation>Generalise BasicDoc element from just review comments, to general annotations;
|
77
47
|
the type attribute defaults to `review` for reviews</a:documentation>
|
@@ -592,28 +562,6 @@ normative or informative references, some split references into sections organiz
|
|
592
562
|
</oneOrMore>
|
593
563
|
</element>
|
594
564
|
</define>
|
595
|
-
<define name="sub">
|
596
|
-
<a:documentation>Subscript text. Corresponds to HTML `sub</a:documentation>
|
597
|
-
<element name="sub">
|
598
|
-
<zeroOrMore>
|
599
|
-
<choice>
|
600
|
-
<ref name="PureTextElement"/>
|
601
|
-
<ref name="stem"/>
|
602
|
-
</choice>
|
603
|
-
</zeroOrMore>
|
604
|
-
</element>
|
605
|
-
</define>
|
606
|
-
<define name="sup">
|
607
|
-
<a:documentation>Superscript text. Corresponds to HTML `sup`</a:documentation>
|
608
|
-
<element name="sup">
|
609
|
-
<zeroOrMore>
|
610
|
-
<choice>
|
611
|
-
<ref name="PureTextElement"/>
|
612
|
-
<ref name="stem"/>
|
613
|
-
</choice>
|
614
|
-
</zeroOrMore>
|
615
|
-
</element>
|
616
|
-
</define>
|
617
565
|
<define name="pagebreak">
|
618
566
|
<a:documentation>Page break. Only applicable in paged layouts (e.g. PDF, Word), and not flow layouts (e.g. HTML)</a:documentation>
|
619
567
|
<element name="pagebreak">
|
@@ -735,6 +683,12 @@ titlecase, or lowercase</a:documentation>
|
|
735
683
|
<ref name="BlockAttributes"/>
|
736
684
|
</define>
|
737
685
|
<define name="TableAttributes" combine="interleave">
|
686
|
+
<optional>
|
687
|
+
<attribute name="plain">
|
688
|
+
<a:documentation>Render as a plain attribute, with no shading or borders</a:documentation>
|
689
|
+
<data type="boolean"/>
|
690
|
+
</attribute>
|
691
|
+
</optional>
|
738
692
|
<optional>
|
739
693
|
<attribute name="width">
|
740
694
|
<a:documentation>Width of the table block in rendering</a:documentation>
|
@@ -1088,7 +1042,6 @@ That concept may be defined as a term within the current document, or it may be
|
|
1088
1042
|
<zeroOrMore>
|
1089
1043
|
<choice>
|
1090
1044
|
<ref name="PureTextElement"/>
|
1091
|
-
<ref name="stem"/>
|
1092
1045
|
<ref name="index"/>
|
1093
1046
|
<ref name="index-xref"/>
|
1094
1047
|
</choice>
|
@@ -1101,7 +1054,6 @@ That concept may be defined as a term within the current document, or it may be
|
|
1101
1054
|
<zeroOrMore>
|
1102
1055
|
<choice>
|
1103
1056
|
<ref name="PureTextElement"/>
|
1104
|
-
<ref name="stem"/>
|
1105
1057
|
<ref name="index"/>
|
1106
1058
|
<ref name="index-xref"/>
|
1107
1059
|
</choice>
|
@@ -2019,10 +1971,7 @@ used in document amendments</a:documentation>
|
|
2019
1971
|
<element name="name">
|
2020
1972
|
<a:documentation>The symbolic form of the designation</a:documentation>
|
2021
1973
|
<oneOrMore>
|
2022
|
-
<
|
2023
|
-
<ref name="PureTextElement"/>
|
2024
|
-
<ref name="stem"/>
|
2025
|
-
</choice>
|
1974
|
+
<ref name="PureTextElement"/>
|
2026
1975
|
</oneOrMore>
|
2027
1976
|
</element>
|
2028
1977
|
</element>
|
@@ -2075,7 +2024,6 @@ used in document amendments</a:documentation>
|
|
2075
2024
|
<zeroOrMore>
|
2076
2025
|
<choice>
|
2077
2026
|
<ref name="PureTextElement"/>
|
2078
|
-
<ref name="stem"/>
|
2079
2027
|
<ref name="index"/>
|
2080
2028
|
<ref name="index-xref"/>
|
2081
2029
|
</choice>
|
data/metanorma-bipm.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
29
29
|
|
30
|
-
spec.add_dependency "metanorma-generic", "~> 3.0
|
30
|
+
spec.add_dependency "metanorma-generic", "~> 3.1.0"
|
31
31
|
spec.add_dependency "metanorma-iso", "~> 3.1.0"
|
32
32
|
|
33
33
|
spec.add_development_dependency "debug"
|
@@ -42,5 +42,5 @@ spec.add_development_dependency "rubocop-performance"
|
|
42
42
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
43
43
|
spec.add_development_dependency "timecop", "~> 0.9"
|
44
44
|
spec.add_development_dependency "webmock"
|
45
|
-
spec.add_development_dependency "
|
45
|
+
spec.add_development_dependency "canon"
|
46
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-bipm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0
|
19
|
+
version: 3.1.0
|
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: 3.0
|
26
|
+
version: 3.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: metanorma-iso
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -207,7 +207,7 @@ dependencies:
|
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
|
-
name:
|
210
|
+
name: canon
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
213
|
- - ">="
|