metanorma-taste 0.1.8 → 0.1.9
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/data/csa/csa.standard.xsl +15 -19
- data/data/elf/elf.xsl +70 -62
- data/data/pdfa/config.yaml +1 -0
- data/data/pdfa/htmlstylesheet-override.scss +4 -0
- data/data/pdfa/pdfa.xsl +71 -11
- data/lib/metanorma/taste/base.rb +10 -0
- data/lib/metanorma/taste/value_attributes.rb +14 -0
- data/lib/metanorma/taste/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 812cc3c5e22adf1444ebcbebf45361cbb0421dca3c14d23249d2c85253e73549
|
|
4
|
+
data.tar.gz: bd00cc0088d50b25aa5340001b896e84e9313ae123d6d3a7f068d53a4ec02ce6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 22da853111eee40c34cbfe29b7b621853245081b916a3f89793191de11b59b850ef6e210ec125eea6e666d17dbb2b7051637bfd63971827f44811190687b32fa
|
|
7
|
+
data.tar.gz: a9babef9eb397416ff3782b3f0ce3a50929806b28836f711396de851856c27d2170b3797599f6b0c236ed923c201cbad2d183d2b9d5addfda7a4d86ff77c7f22
|
data/data/csa/csa.standard.xsl
CHANGED
|
@@ -450,14 +450,6 @@
|
|
|
450
450
|
<!-- ====== -->
|
|
451
451
|
<!-- title -->
|
|
452
452
|
<!-- ====== -->
|
|
453
|
-
<xsl:template match="mn:annex/mn:fmt-title">
|
|
454
|
-
<fo:block xsl:use-attribute-sets="annex-title-style">
|
|
455
|
-
<xsl:call-template name="refine_annex-title-style"/>
|
|
456
|
-
|
|
457
|
-
<xsl:apply-templates/>
|
|
458
|
-
<xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
|
459
|
-
</fo:block>
|
|
460
|
-
</xsl:template>
|
|
461
453
|
|
|
462
454
|
<xsl:template match="mn:fmt-title" name="title">
|
|
463
455
|
|
|
@@ -10555,10 +10547,10 @@
|
|
|
10555
10547
|
<!-- END Admonition -->
|
|
10556
10548
|
<!-- ================ -->
|
|
10557
10549
|
|
|
10558
|
-
<xsl:attribute-set name="
|
|
10550
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
10559
10551
|
</xsl:attribute-set>
|
|
10560
10552
|
|
|
10561
|
-
<xsl:template name="
|
|
10553
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
10562
10554
|
</xsl:template>
|
|
10563
10555
|
|
|
10564
10556
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
|
@@ -12608,23 +12600,15 @@
|
|
|
12608
12600
|
<!-- ===================================== -->
|
|
12609
12601
|
|
|
12610
12602
|
<xsl:attribute-set name="annex-title-style">
|
|
12603
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
12611
12604
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
12612
12605
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
12613
12606
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
12614
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
12615
12607
|
<xsl:attribute name="color">black</xsl:attribute>
|
|
12616
12608
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
12617
12609
|
</xsl:attribute-set> <!-- annex-title-style -->
|
|
12618
12610
|
|
|
12619
12611
|
<xsl:template name="refine_annex-title-style">
|
|
12620
|
-
<!-- <xsl:call-template name="setIDforNamedDestination"/> -->
|
|
12621
|
-
<xsl:variable name="level">
|
|
12622
|
-
<xsl:call-template name="getLevel"/>
|
|
12623
|
-
</xsl:variable>
|
|
12624
|
-
<xsl:if test="$level >= 2">
|
|
12625
|
-
<xsl:attribute name="color">rgb(3, 115, 200)</xsl:attribute>
|
|
12626
|
-
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
|
12627
|
-
</xsl:if>
|
|
12628
12612
|
</xsl:template>
|
|
12629
12613
|
|
|
12630
12614
|
<xsl:attribute-set name="p-zzSTDTitle1-style">
|
|
@@ -12688,6 +12672,18 @@
|
|
|
12688
12672
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
12689
12673
|
</xsl:if>
|
|
12690
12674
|
</xsl:if>
|
|
12675
|
+
<xsl:if test="parent::mn:annex"><!-- Annex title -->
|
|
12676
|
+
<xsl:variable name="annex_title_styles">
|
|
12677
|
+
<styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
|
|
12678
|
+
</xsl:variable>
|
|
12679
|
+
<xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
|
|
12680
|
+
</xsl:if>
|
|
12681
|
+
<xsl:if test="parent::mn:references[not(@normative='true')]"><!-- Bibliography section title -->
|
|
12682
|
+
<xsl:variable name="bibliography_title_styles">
|
|
12683
|
+
<styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
|
|
12684
|
+
</xsl:variable>
|
|
12685
|
+
<xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
|
|
12686
|
+
</xsl:if>
|
|
12691
12687
|
<!-- $namespace = 'csa' -->
|
|
12692
12688
|
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
|
12693
12689
|
</xsl:template> <!-- refine_title-style -->
|
data/data/elf/elf.xsl
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
</xsl:for-each>
|
|
55
55
|
</fo:block>
|
|
56
56
|
</fo:table-cell>
|
|
57
|
-
<fo:table-cell text-align="right" color="
|
|
57
|
+
<fo:table-cell text-align="right" color="{$color_blue}">
|
|
58
58
|
<fo:block font-size="15.24pt">
|
|
59
59
|
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier"/>
|
|
60
60
|
</fo:block>
|
|
@@ -292,50 +292,79 @@
|
|
|
292
292
|
</fo:block-container>
|
|
293
293
|
</xsl:template>
|
|
294
294
|
|
|
295
|
-
<xsl:
|
|
296
|
-
|
|
295
|
+
<xsl:attribute-set name="title-style">
|
|
296
|
+
<xsl:attribute name="font-size">19pt</xsl:attribute>
|
|
297
|
+
<xsl:attribute name="color">rgb(34,30,31)</xsl:attribute>
|
|
298
|
+
<xsl:attribute name="space-before">25mm</xsl:attribute>
|
|
299
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
300
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
301
|
+
<xsl:attribute name="line-height">125%</xsl:attribute>
|
|
302
|
+
</xsl:attribute-set>
|
|
303
|
+
|
|
304
|
+
<xsl:template name="refine_title-style">
|
|
297
305
|
<xsl:variable name="level">
|
|
298
306
|
<xsl:call-template name="getLevel"/>
|
|
299
307
|
</xsl:variable>
|
|
308
|
+
<xsl:if test="$level = 2">
|
|
309
|
+
<xsl:attribute name="font-size">13pt</xsl:attribute>
|
|
310
|
+
<xsl:attribute name="space-before">9mm</xsl:attribute>
|
|
311
|
+
</xsl:if>
|
|
312
|
+
<xsl:if test="$level > 2">
|
|
313
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
|
314
|
+
</xsl:if>
|
|
315
|
+
<xsl:if test="$level = 3">
|
|
316
|
+
<xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
|
|
317
|
+
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
|
318
|
+
</xsl:if>
|
|
319
|
+
<xsl:if test="$level >= 4">
|
|
320
|
+
<xsl:attribute name="space-before">8pt</xsl:attribute>
|
|
321
|
+
<xsl:attribute name="margin-bottom">4pt</xsl:attribute>
|
|
322
|
+
</xsl:if>
|
|
323
|
+
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
|
300
324
|
|
|
301
|
-
<xsl:
|
|
302
|
-
<xsl:
|
|
303
|
-
<xsl:
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
325
|
+
<xsl:if test="parent::mn:annex"><!-- Annex title -->
|
|
326
|
+
<xsl:variable name="annex_title_styles">
|
|
327
|
+
<styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
|
|
328
|
+
</xsl:variable>
|
|
329
|
+
<xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
|
|
330
|
+
</xsl:if>
|
|
331
|
+
|
|
332
|
+
<xsl:if test="parent::mn:references[not(@normative='true')]"><!-- Bibliography section title -->
|
|
333
|
+
<xsl:variable name="bibliography_title_styles">
|
|
334
|
+
<styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
|
|
335
|
+
</xsl:variable>
|
|
336
|
+
<xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
|
|
337
|
+
</xsl:if>
|
|
338
|
+
</xsl:template>
|
|
339
|
+
|
|
340
|
+
<xsl:attribute-set name="annex-title-style">
|
|
341
|
+
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
|
342
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
343
|
+
<xsl:attribute name="margin-bottom">48pt</xsl:attribute>
|
|
344
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
345
|
+
<xsl:attribute name="role">H1</xsl:attribute>
|
|
346
|
+
</xsl:attribute-set>
|
|
315
347
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
<xsl:when test="$level >= 4">normal</xsl:when>
|
|
319
|
-
<xsl:otherwise>bold</xsl:otherwise>
|
|
320
|
-
</xsl:choose>
|
|
321
|
-
</xsl:variable> -->
|
|
348
|
+
<xsl:template name="refine_annex-title-style">
|
|
349
|
+
</xsl:template>
|
|
322
350
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
351
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
352
|
+
<xsl:attribute name="font-size">19pt</xsl:attribute>
|
|
353
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
354
|
+
<xsl:attribute name="color">inherit</xsl:attribute>
|
|
355
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
356
|
+
<xsl:attribute name="text-transform">uppercase</xsl:attribute>
|
|
357
|
+
<xsl:attribute name="space-before">0mm</xsl:attribute>
|
|
358
|
+
<xsl:attribute name="margin-bottom">12mm</xsl:attribute>
|
|
359
|
+
</xsl:attribute-set>
|
|
360
|
+
|
|
361
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
362
|
+
</xsl:template>
|
|
363
|
+
|
|
364
|
+
<xsl:template match="mn:fmt-title" name="title">
|
|
332
365
|
|
|
333
|
-
<xsl:variable name="
|
|
334
|
-
<xsl:
|
|
335
|
-
<xsl:when test="$level = 1">12pt</xsl:when>
|
|
336
|
-
<xsl:when test="$level >= 4">4pt</xsl:when>
|
|
337
|
-
<xsl:otherwise>12pt</xsl:otherwise>
|
|
338
|
-
</xsl:choose>
|
|
366
|
+
<xsl:variable name="level">
|
|
367
|
+
<xsl:call-template name="getLevel"/>
|
|
339
368
|
</xsl:variable>
|
|
340
369
|
|
|
341
370
|
<xsl:variable name="element-name">
|
|
@@ -345,15 +374,10 @@
|
|
|
345
374
|
</xsl:choose>
|
|
346
375
|
</xsl:variable>
|
|
347
376
|
|
|
377
|
+
<xsl:variable name="title_styles"><styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"/></styles></xsl:variable>
|
|
378
|
+
|
|
348
379
|
<xsl:element name="{$element-name}">
|
|
349
|
-
<xsl:
|
|
350
|
-
<xsl:attribute name="color"><xsl:value-of select="$color"/></xsl:attribute>
|
|
351
|
-
<!-- <xsl:attribute name="font-weight"><xsl:value-of select="$font-weight"/></xsl:attribute> -->
|
|
352
|
-
<xsl:attribute name="space-before"><xsl:value-of select="$space-before"/></xsl:attribute>
|
|
353
|
-
<xsl:attribute name="margin-bottom"><xsl:value-of select="$margin-bottom"/></xsl:attribute>
|
|
354
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
355
|
-
<xsl:attribute name="line-height">125%</xsl:attribute>
|
|
356
|
-
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
|
380
|
+
<xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
|
|
357
381
|
|
|
358
382
|
<xsl:choose>
|
|
359
383
|
<xsl:when test="$level = 1">
|
|
@@ -622,14 +646,6 @@
|
|
|
622
646
|
<xsl:attribute name="text-transform">uppercase</xsl:attribute>
|
|
623
647
|
</xsl:attribute-set>
|
|
624
648
|
|
|
625
|
-
<xsl:attribute-set name="references-non-normative-title-style">
|
|
626
|
-
<xsl:attribute name="font-size">19pt</xsl:attribute>
|
|
627
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
628
|
-
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
629
|
-
<xsl:attribute name="text-transform">uppercase</xsl:attribute>
|
|
630
|
-
<xsl:attribute name="margin-bottom">12mm</xsl:attribute>
|
|
631
|
-
</xsl:attribute-set>
|
|
632
|
-
|
|
633
649
|
<xsl:template match="mn:references[not(@normative='true')]" priority="2">
|
|
634
650
|
<fo:block-container margin-left="-12.5mm" margin-right="12.5mm" role="SKIP">
|
|
635
651
|
<fo:block-container xsl:use-attribute-sets="reset-margins-style">
|
|
@@ -640,14 +656,6 @@
|
|
|
640
656
|
</fo:block-container>
|
|
641
657
|
</xsl:template>
|
|
642
658
|
|
|
643
|
-
<xsl:attribute-set name="annex-title-style">
|
|
644
|
-
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
|
645
|
-
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
646
|
-
<xsl:attribute name="margin-bottom">48pt</xsl:attribute>
|
|
647
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
648
|
-
<xsl:attribute name="role">H1</xsl:attribute>
|
|
649
|
-
</xsl:attribute-set>
|
|
650
|
-
|
|
651
659
|
<xsl:attribute-set name="table-style">
|
|
652
660
|
<xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
|
|
653
661
|
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
data/data/pdfa/config.yaml
CHANGED
|
@@ -19,6 +19,7 @@ base-override:
|
|
|
19
19
|
header-font: "'Source Sans Pro', 'Helvetica Neue', Helvetica, sans-serif"
|
|
20
20
|
fonts: Source Sans 3;Source Sans Pro
|
|
21
21
|
output-extensions: xml,html,pdf
|
|
22
|
+
toclevels-html: 6
|
|
22
23
|
doctypes:
|
|
23
24
|
- taste: specification # Specification # The name goes into i18n.yaml
|
|
24
25
|
base: standard
|
data/data/pdfa/pdfa.xsl
CHANGED
|
@@ -18,16 +18,26 @@
|
|
|
18
18
|
<fo:simple-page-master master-name="copyright-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
|
19
19
|
<fo:region-body margin-top="20mm" margin-bottom="35mm" margin-left="18mm" margin-right="18mm"/>
|
|
20
20
|
</fo:simple-page-master>
|
|
21
|
+
|
|
22
|
+
<fo:simple-page-master master-name="first" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
|
23
|
+
<fo:region-body margin-top="14mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
|
24
|
+
<fo:region-before region-name="header-LB-yellow" extent="14mm"/>
|
|
25
|
+
<fo:region-after region-name="footer-even" extent="12.5mm"/>
|
|
26
|
+
<fo:region-start region-name="left-region" extent="13mm"/>
|
|
27
|
+
<fo:region-end region-name="right-region" extent="12mm"/>
|
|
28
|
+
</fo:simple-page-master>
|
|
21
29
|
</fo:layout-master-set>
|
|
22
30
|
</xsl:template>
|
|
23
31
|
|
|
24
32
|
<xsl:variable name="cover_page_color_box1">rgb(202,152,49)</xsl:variable>
|
|
25
33
|
<xsl:variable name="cover_page_color_box2">rgb(139,152,91)</xsl:variable>
|
|
26
|
-
<xsl:variable name="cover_page_color_box3">rgb(208,63,78)</xsl:variable
|
|
34
|
+
<xsl:variable name="cover_page_color_box3">rgb(208,63,78)</xsl:variable><!-- #d03f4e -->
|
|
27
35
|
<xsl:variable name="cover_page_color_box4">rgb(72,145,175)</xsl:variable>
|
|
28
36
|
<xsl:variable name="cover_page_color_box_border_width">2.5pt</xsl:variable>
|
|
29
37
|
<xsl:variable name="cover_page_color_box_height">57mm</xsl:variable>
|
|
30
38
|
|
|
39
|
+
<xsl:variable name="color_secondary" select="$cover_page_color_box3"/>
|
|
40
|
+
|
|
31
41
|
<xsl:attribute-set name="cover_page_box">
|
|
32
42
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
|
33
43
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
|
@@ -96,12 +106,20 @@
|
|
|
96
106
|
<fo:block>
|
|
97
107
|
<!-- Status / Version.
|
|
98
108
|
e.g. "Draft Release Candidate 1.2", or just a version -->
|
|
99
|
-
<xsl:variable name="status" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:status"/>
|
|
100
|
-
<xsl:
|
|
101
|
-
<xsl:
|
|
102
|
-
<xsl:
|
|
103
|
-
</xsl:
|
|
104
|
-
|
|
109
|
+
<!-- <xsl:variable name="status" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:status"/> -->
|
|
110
|
+
<xsl:variable name="status">
|
|
111
|
+
<xsl:call-template name="capitalize">
|
|
112
|
+
<xsl:with-param name="str" select="/mn:metanorma/mn:bibdata/mn:status/mn:stage"/>
|
|
113
|
+
</xsl:call-template>
|
|
114
|
+
</xsl:variable>
|
|
115
|
+
<!-- <xsl:choose> -->
|
|
116
|
+
<xsl:if test="normalize-space($status) != '' and $status != 'Published'">
|
|
117
|
+
<fo:block color="{$color_secondary}">
|
|
118
|
+
<xsl:value-of select="$status"/>
|
|
119
|
+
</fo:block>
|
|
120
|
+
</xsl:if>
|
|
121
|
+
<!-- </xsl:when>
|
|
122
|
+
<xsl:otherwise> --><!-- just a version -->
|
|
105
123
|
<xsl:variable name="i18n_version"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">version</xsl:with-param></xsl:call-template></xsl:variable>
|
|
106
124
|
<xsl:call-template name="capitalize">
|
|
107
125
|
<xsl:with-param name="str" select="$i18n_version"/>
|
|
@@ -110,8 +128,8 @@
|
|
|
110
128
|
<xsl:variable name="edition" select="/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = '']"/>
|
|
111
129
|
<xsl:value-of select="$edition"/>
|
|
112
130
|
<xsl:if test="not(contains($edition, '.'))">.0</xsl:if>
|
|
113
|
-
</xsl:otherwise>
|
|
114
|
-
</xsl:choose>
|
|
131
|
+
<!-- </xsl:otherwise>
|
|
132
|
+
</xsl:choose> -->
|
|
115
133
|
</fo:block>
|
|
116
134
|
<fo:block margin-bottom="2mm">
|
|
117
135
|
<xsl:value-of select="substring(/mn:metanorma/mn:bibdata/mn:version/mn:revision-date, 1, 7)"/>
|
|
@@ -256,8 +274,8 @@
|
|
|
256
274
|
<xsl:template name="insertFooter">
|
|
257
275
|
<!-- <xsl:param name="invert"/> -->
|
|
258
276
|
<xsl:variable name="footerText">
|
|
259
|
-
<xsl:text>PDF Association</xsl:text>
|
|
260
|
-
<xsl:text> </xsl:text>
|
|
277
|
+
<!-- <xsl:text>PDF Association</xsl:text>
|
|
278
|
+
<xsl:text> </xsl:text> -->
|
|
261
279
|
<xsl:call-template name="capitalizeWords">
|
|
262
280
|
<xsl:with-param name="str">
|
|
263
281
|
<xsl:choose>
|
|
@@ -285,4 +303,46 @@
|
|
|
285
303
|
</xsl:if>
|
|
286
304
|
</xsl:template>
|
|
287
305
|
|
|
306
|
+
<xsl:template name="refine_list-item-label-style"><?extend?>
|
|
307
|
+
<xsl:if test="parent::mn:ul">
|
|
308
|
+
<xsl:attribute name="color"><xsl:value-of select="$color_secondary"/></xsl:attribute>
|
|
309
|
+
</xsl:if>
|
|
310
|
+
</xsl:template>
|
|
311
|
+
|
|
312
|
+
<xsl:template name="refine_title-style"><?extend?>
|
|
313
|
+
<xsl:attribute name="color"><xsl:value-of select="$color_secondary"/></xsl:attribute>
|
|
314
|
+
</xsl:template>
|
|
315
|
+
|
|
316
|
+
<xsl:template name="refine_list-item-label-style"><?extend?>
|
|
317
|
+
<xsl:if test="parent::mn:ul">
|
|
318
|
+
<xsl:attribute name="color"><xsl:value-of select="$color_secondary"/></xsl:attribute>
|
|
319
|
+
</xsl:if>
|
|
320
|
+
</xsl:template>
|
|
321
|
+
|
|
322
|
+
<xsl:template name="refine_sourcecode-style"><?extend?>
|
|
323
|
+
<xsl:attribute name="font-size">85%</xsl:attribute>
|
|
324
|
+
</xsl:template>
|
|
325
|
+
|
|
326
|
+
<xsl:template match="mn:ul/mn:li/mn:fmt-name[normalize-space() = 'o']" priority="3" mode="update_xml_step1">
|
|
327
|
+
<xsl:attribute name="label">■</xsl:attribute>
|
|
328
|
+
</xsl:template>
|
|
329
|
+
|
|
330
|
+
<xsl:attribute-set name="note-style"><?extend?>
|
|
331
|
+
<xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
|
|
332
|
+
<xsl:attribute name="margin-left">0.5mm</xsl:attribute>
|
|
333
|
+
<xsl:attribute name="margin-right">0.5mm</xsl:attribute>
|
|
334
|
+
<xsl:attribute name="padding">1mm</xsl:attribute>
|
|
335
|
+
<xsl:attribute name="padding-left">1.5mm</xsl:attribute>
|
|
336
|
+
<xsl:attribute name="padding-right">1.5mm</xsl:attribute>
|
|
337
|
+
<xsl:attribute name="font-size">85%</xsl:attribute>
|
|
338
|
+
</xsl:attribute-set>
|
|
339
|
+
|
|
340
|
+
<xsl:attribute-set name="note-name-style"><?extend?>
|
|
341
|
+
<xsl:attribute name="padding-right">3mm</xsl:attribute>
|
|
342
|
+
</xsl:attribute-set>
|
|
343
|
+
|
|
344
|
+
<xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
|
|
345
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
|
346
|
+
</xsl:template>
|
|
347
|
+
|
|
288
348
|
</xsl:stylesheet>
|
data/lib/metanorma/taste/base.rb
CHANGED
|
@@ -38,6 +38,8 @@ module Metanorma
|
|
|
38
38
|
# @example Configuration to attribute mapping
|
|
39
39
|
# config.base_override.value_attributes.publisher => :publisher:
|
|
40
40
|
# config.base_override.value_attributes.presentation_metadata_color_secondary => :presentation-metadata-color-secondary:
|
|
41
|
+
#
|
|
42
|
+
# TODO: metaprogramming to extract these from value_attributes.rb
|
|
41
43
|
VALUE_ATTRIBUTE_MAPPINGS = {
|
|
42
44
|
publisher: "publisher",
|
|
43
45
|
publisher_abbr: "publisher_abbr",
|
|
@@ -56,6 +58,14 @@ module Metanorma
|
|
|
56
58
|
monospace_font: "monospace-font",
|
|
57
59
|
fonts: "fonts",
|
|
58
60
|
output_extensions: "output-extensions",
|
|
61
|
+
toclevels: "toclevels",
|
|
62
|
+
htmltoclevels: "toclevels-html",
|
|
63
|
+
doctoclevels: "toclevels-doc",
|
|
64
|
+
pdftoclevels: "toclevels-pdf",
|
|
65
|
+
toc_figures: "toc-figures",
|
|
66
|
+
toc_tables: "toc-tables",
|
|
67
|
+
toc_recommendations: "toc-recommendations",
|
|
68
|
+
|
|
59
69
|
}.freeze
|
|
60
70
|
|
|
61
71
|
|
|
@@ -24,6 +24,13 @@ module Metanorma
|
|
|
24
24
|
attribute :presentation_metadata_ol_label_template_arabic, :string
|
|
25
25
|
attribute :fonts, :string
|
|
26
26
|
attribute :output_extensions, :string
|
|
27
|
+
attribute :toclevels, :string
|
|
28
|
+
attribute :htmltoclevels, :string
|
|
29
|
+
attribute :doctoclevels, :string
|
|
30
|
+
attribute :pdftoclevels, :string
|
|
31
|
+
attribute :toc_figures, :string
|
|
32
|
+
attribute :toc_tables, :string
|
|
33
|
+
attribute :toc_recommendations, :string
|
|
27
34
|
|
|
28
35
|
key_value do
|
|
29
36
|
map "publisher", to: :publisher
|
|
@@ -53,6 +60,13 @@ module Metanorma
|
|
|
53
60
|
map "presentation-metadata-ol-label-template-arabic",
|
|
54
61
|
to: :presentation_metadata_ol_label_template_arabic
|
|
55
62
|
map "output-extensions", to: :output_extensions
|
|
63
|
+
map "toclevels", to: :toclevels
|
|
64
|
+
map "toclevels-html", to: :htmltoclevels
|
|
65
|
+
map "doclevels-doc", to: :doctoclevels
|
|
66
|
+
map "toclevels-pdf", to: :pdftoclevels
|
|
67
|
+
map "toc-figures", to: :toc_figures
|
|
68
|
+
map "toc-tables", to: :toc_tables
|
|
69
|
+
map "toc-recommendations", to: :toc_recommendations
|
|
56
70
|
end
|
|
57
71
|
end
|
|
58
72
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-taste
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-11-
|
|
11
|
+
date: 2025-11-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|