metanorma-bipm 0.0.4 → 0.0.5

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: 7f7ed7028b4a5bd6a311aff675bd47272c2170dad7adfcf59457ca3f4a55d218
4
- data.tar.gz: 96e9451da240b36fe420324838d69a0d5fde69cb956d74977f83b7ca9c736cae
3
+ metadata.gz: acbf74f3d4254887e6ce398e2ffd5617b0761f01009fa4b1f320dc31d709d664
4
+ data.tar.gz: 8c95ac2b9d1feebf1b51cc84bd9b7336c6ef3502789bf75fb66cdd4b8468a23e
5
5
  SHA512:
6
- metadata.gz: 98b7383018c3822867381823ed9d19bc4cd02e5db2fbf97862014bde19079e13f28fc1e0342b3d41986b3a0d249104746a14f475db05fe6a273bb8c860bc8df6
7
- data.tar.gz: 531be848c577965373bdbab1408304b06fc292998b89e2fdc3f81948ba93799a4a9f0a4b19897974ea6fb38518738ab6ac9cb33196dee90fd04305ef5825d16b
6
+ metadata.gz: a47f5b9fe13ffda0d817d157c627282403055f14d6efaf4a2ba57462c883f8f6bf985b8ebb99ffed3f3fa5a3eac550d116087afaef0a12ccafa8783027a75c7c
7
+ data.tar.gz: fb36934650d098544c1a338797ec1f368553aee70b43c1b0b141bad43a9193e549a9f2a78bf6ce053748aea27b00c369fcd4d0e2c16468f2fc5263db0d2e471e
@@ -36,7 +36,7 @@ jobs:
36
36
  with:
37
37
  ruby-version: ${{ matrix.ruby }}
38
38
 
39
- - uses: actions/cache@v1
39
+ - uses: actions/cache@v2
40
40
  with:
41
41
  path: vendor/bundle
42
42
  key: bundle-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
@@ -48,16 +48,15 @@ jobs:
48
48
 
49
49
  - run: bundle exec rake
50
50
 
51
- notify:
52
- name: Trigger notify workflow
51
+ tests-passed:
53
52
  needs: rake
54
53
  runs-on: ubuntu-latest
55
54
  steps:
56
- - name: Trigger notify workflow
55
+ - name: Trigger tests passed event
57
56
  uses: Sibz/github-status-action@v1
58
57
  with:
59
- authToken: ${{ secrets.GITHUB_TOKEN }}
58
+ authToken: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
60
59
  context: 'tests-passed-successfully'
61
60
  description: 'Tests passed successfully'
62
61
  state: 'success'
63
- sha: ${{ github.event.pull_request.head.sha || github.sha }}
62
+ sha: ${{ github.event.pull_request.head.sha || github.sha }}
@@ -42,6 +42,11 @@
42
42
  <data type="boolean"/>
43
43
  </attribute>
44
44
  </optional>
45
+ <optional>
46
+ <attribute name="nosee">
47
+ <data type="boolean"/>
48
+ </attribute>
49
+ </optional>
45
50
  <text/>
46
51
  </element>
47
52
  </define>
@@ -209,9 +214,9 @@
209
214
  <oneOrMore>
210
215
  <ref name="committee"/>
211
216
  </oneOrMore>
212
- <oneOrMore>
217
+ <zeroOrMore>
213
218
  <ref name="workgroup"/>
214
- </oneOrMore>
219
+ </zeroOrMore>
215
220
  </element>
216
221
  </define>
217
222
  <define name="structuredidentifier">
@@ -123,11 +123,15 @@ module Asciidoctor
123
123
  end
124
124
 
125
125
  def inline_anchor_xref_attrs(node)
126
- if /pagenumber%/.match(node.text)
127
- node.text = node.text.sub(/pagenumber%/, "")
128
- page = true
126
+ flags = %w(pagenumber nosee).each_with_object({}) do |w, m|
127
+ if /#{w}%/.match(node.text)
128
+ node.text = node.text.sub(/#{w}%/, "")
129
+ m[w] = true
130
+ end
129
131
  end
130
- page ? super.merge(pagenumber: true) : super
132
+ ret = super
133
+ flags.keys.each { |k| ret[k.to_sym] = true }
134
+ ret
131
135
  end
132
136
 
133
137
  def clause_parse(attrs, xml, node)
@@ -188,6 +192,6 @@ module Asciidoctor
188
192
  return nil if node.attr("no-pdf")
189
193
  IsoDoc::BIPM::PdfConvert.new(doc_extract_attributes(node))
190
194
  end
195
+ end
191
196
  end
192
197
  end
193
- end
@@ -18,6 +18,41 @@ module IsoDoc
18
18
  def middle_clause
19
19
  "//sections/*"
20
20
  end
21
+
22
+ def render_identifier(id)
23
+ ret = super
24
+ ret[1] = nil if !id[1].nil? && id[1]["type"] == "BIPM"
25
+ ret[2] = nil if !id[2].nil? && id[2]["type"] == "BIPM"
26
+ ret
27
+ end
28
+
29
+ def nonstd_bibitem(list, b, ordinal, biblio)
30
+ list.p **attr_code(iso_bibitem_entry_attrs(b, biblio)) do |ref|
31
+ ids = bibitem_ref_code(b)
32
+ identifiers = render_identifier(ids)
33
+ if biblio then ref_entry_code(ref, ordinal, identifiers, ids)
34
+ else
35
+ ref << "#{identifiers[0] || identifiers[1]}"
36
+ ref << " #{identifiers[1]}" if identifiers[0] && identifiers[1]
37
+ end
38
+ ref << " " unless biblio && !identifiers[1]
39
+ reference_format(b, ref)
40
+ end
41
+ end
42
+
43
+ def std_bibitem_entry(list, b, ordinal, biblio)
44
+ list.p **attr_code(iso_bibitem_entry_attrs(b, biblio)) do |ref|
45
+ identifiers = render_identifier(bibitem_ref_code(b))
46
+ if biblio then ref_entry_code(ref, ordinal, identifiers, nil)
47
+ else
48
+ ref << "#{identifiers[0] || identifiers[1]}"
49
+ ref << " #{identifiers[1]}" if identifiers[0] && identifiers[1]
50
+ end
51
+ date_note_process(b, ref)
52
+ ref << " " unless biblio && !identifiers[1]
53
+ reference_format(b, ref)
54
+ end
55
+ end
21
56
  end
22
57
  end
23
58
  end
@@ -43,6 +43,7 @@
43
43
  <xsl:variable name="current_document">
44
44
  <xsl:apply-templates select="." mode="change_id">
45
45
  <xsl:with-param name="lang" select="$lang"/>
46
+ <xsl:with-param name="ignoreReferenceFrom" select="'true'"/>
46
47
  </xsl:apply-templates>
47
48
  </xsl:variable>
48
49
  <xsl:for-each select="xalan:nodeset($current_document)">
@@ -89,6 +90,17 @@
89
90
 
90
91
  </xsl:variable>
91
92
 
93
+ <xsl:variable name="ids">
94
+ <xsl:for-each select="//*[@id]">
95
+ <id><xsl:value-of select="@id"/></id>
96
+ </xsl:for-each>
97
+ <xsl:for-each select="//bipm:locality[@type='anchor']/bipm:referenceFrom">
98
+ <referenceFrom><xsl:value-of select="."/></referenceFrom>
99
+ </xsl:for-each>
100
+ </xsl:variable>
101
+
102
+
103
+
92
104
  <xsl:variable name="independentAppendix" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:appendix)"/>
93
105
  <!-- <xsl:variable name="independentAppendix" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:title[@type = 'appendix'])"/> -->
94
106
 
@@ -96,8 +108,14 @@
96
108
 
97
109
  <xsl:template name="generateContents">
98
110
  <contents>
99
- <xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
100
- <xsl:call-template name="processMainSectionsDefault_Contents"/>
111
+
112
+ <xsl:apply-templates select="/*/bipm:preface/*[position() &gt; 1]" mode="contents"/>
113
+
114
+ <xsl:apply-templates select="/*/bipm:sections/*" mode="contents"/>
115
+ <xsl:apply-templates select="/*/bipm:bibliography/bipm:references[@normative='true']" mode="contents"/>
116
+ <xsl:apply-templates select="/*/bipm:annex" mode="contents"/>
117
+ <xsl:apply-templates select="/*/bipm:bibliography/bipm:references[not(@normative='true')]" mode="contents"/>
118
+
101
119
  </contents>
102
120
  </xsl:template>
103
121
 
@@ -230,6 +248,7 @@
230
248
  <xsl:variable name="current_document">
231
249
  <xsl:apply-templates select="." mode="change_id">
232
250
  <xsl:with-param name="lang" select="$lang"/>
251
+ <xsl:with-param name="ignoreReferenceFrom" select="'true'"/>
233
252
  </xsl:apply-templates>
234
253
  </xsl:variable>
235
254
 
@@ -382,8 +401,34 @@
382
401
  <xsl:apply-templates mode="flatxml"/>
383
402
  </xsl:template>
384
403
 
404
+
405
+ <!-- move note(s) inside element -->
406
+ <!-- but ignore quote, move inside element which before quote -->
407
+ <xsl:template match="bipm:clause/* [not(local-name() = 'quote')] [following-sibling::* [not(local-name()='quote')] [1][local-name() = 'note']]" mode="flatxml"> <!-- find element, which has next 'note' -->
408
+ <xsl:copy>
409
+ <xsl:apply-templates select="@*|node()" mode="flatxml"/>
410
+ <xsl:variable name="element-id" select="generate-id(.)"/>
411
+ <xsl:for-each select="following-sibling::bipm:note[generate-id(preceding-sibling::*[not(local-name()='note') and not(local-name()='quote')][1]) = $element-id]">
412
+ <xsl:call-template name="change_note_kind"/>
413
+ </xsl:for-each>
414
+
415
+ <!-- if current node is title level is 3 with notes, and next level is 4 -->
416
+ <xsl:if test="local-name() = 'title' and @depth = 3 and ../bipm:clause/bipm:title/@depth = 4 and count(following-sibling::*[1][local-name() = 'note']) &gt; 0">
417
+ <!-- then move here footnotes from clause level 4 -->
418
+ <xsl:for-each select="../bipm:clause//bipm:fn[ancestor::bipm:quote or not(ancestor::bipm:table)]">
419
+ <xsl:call-template name="fn_to_note_side"/>
420
+ </xsl:for-each>
421
+ </xsl:if>
422
+
423
+ </xsl:copy>
424
+ </xsl:template>
425
+
426
+ <!-- remove note(s), which was moved into element in previous template -->
427
+ <xsl:template match="bipm:clause/bipm:note" mode="flatxml" priority="2"/>
428
+
429
+
385
430
  <!-- move clause/note inside title, p, ul or ol -->
386
- <xsl:template match="bipm:clause/*[local-name() != 'quote' and local-name() != 'note' and local-name() != 'clause'][last()]" mode="flatxml">
431
+ <xsl:template match="bipm:clause2/*[local-name() != 'quote' and local-name() != 'note' and local-name() != 'clause'][last()]" mode="flatxml">
387
432
  <xsl:copy>
388
433
  <xsl:apply-templates select="@*|node()" mode="flatxml"/>
389
434
  <!-- <xsl:copy-of select="following-sibling::*[local-name() = 'note']"/> -->
@@ -407,7 +452,7 @@
407
452
  </xsl:template> -->
408
453
 
409
454
  <!-- <xsl:template match="bipm:clause/bipm:note[count(following-sibling::*) = 0]" mode="flatxml"/> -->
410
- <xsl:template match="bipm:clause/bipm:note[count(following-sibling::*[local-name() != 'clause' and local-name() != 'note']) = 0]" mode="flatxml" priority="2"/>
455
+ <!-- <xsl:template match="bipm:clause/bipm:note[count(following-sibling::*[local-name() != 'clause' and local-name() != 'note']) = 0]" mode="flatxml" priority="2"/> -->
411
456
 
412
457
 
413
458
  <xsl:template match="bipm:note" name="change_note_kind" mode="flatxml">
@@ -1111,7 +1156,7 @@
1111
1156
  <xsl:call-template name="insertCoverPageCommon"/>
1112
1157
 
1113
1158
  <fo:block-container height="100%" display-align="center" border="0pt solid black"><!-- -->
1114
- <fo:block font-family="WorkSans" font-size="50pt" line-height="115%">
1159
+ <fo:block font-family="Work Sans" font-size="50pt" line-height="115%">
1115
1160
 
1116
1161
  <xsl:variable name="languages">
1117
1162
  <xsl:call-template name="getLanguages"/>
@@ -1182,7 +1227,7 @@
1182
1227
 
1183
1228
  <fo:page-sequence master-reference="cover-page-appendix" force-page-count="even" initial-page-number="1">
1184
1229
 
1185
- <fo:flow flow-name="xsl-region-body" font-family="WorkSans">
1230
+ <fo:flow flow-name="xsl-region-body" font-family="Work Sans">
1186
1231
 
1187
1232
  <xsl:call-template name="insertCoverPageCommon"/>
1188
1233
 
@@ -1316,7 +1361,7 @@
1316
1361
  </fo:block-container>
1317
1362
 
1318
1363
  <!-- <fo:block-container>
1319
- <fo:block font-family="WorkSans" font-size="16pt" line-height="120%" font-weight="400" margin-top="20mm">
1364
+ <fo:block font-family="Work Sans" font-size="16pt" line-height="120%" font-weight="400" margin-top="20mm">
1320
1365
  <fo:block>
1321
1366
  <xsl:value-of select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $lang]"/>
1322
1367
  <xsl:text> (</xsl:text>
@@ -1336,7 +1381,7 @@
1336
1381
  <xsl:value-of select="/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:appendix"/>
1337
1382
  </fo:block>
1338
1383
  </fo:block>
1339
- <fo:block font-family="WorkSans" font-size="36pt" font-weight="600" margin-top="15mm">
1384
+ <fo:block font-family="Work Sans" font-size="36pt" font-weight="600" margin-top="15mm">
1340
1385
  <xsl:value-of select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@type = 'appendix' and @language = $lang]"/>
1341
1386
  </fo:block>
1342
1387
  </fo:block-container> -->
@@ -1585,6 +1630,7 @@
1585
1630
  <fo:block>
1586
1631
  <xsl:if test="@level = 1 or (@level = 2 and not(@parent = 'annex'))">
1587
1632
  <xsl:value-of select="@section"/>
1633
+ <xsl:if test="normalize-space(@section) != '' and @type = 'annex'">.</xsl:if>
1588
1634
  </xsl:if>
1589
1635
  <!-- <fo:inline font-size="10pt" color="white">Z</fo:inline> --> <!-- for baseline alignment in string -->
1590
1636
  </fo:block>
@@ -1836,7 +1882,7 @@
1836
1882
  </fo:block>
1837
1883
  </xsl:template>
1838
1884
 
1839
- <xsl:template match="bipm:license-statement//bipm:link">
1885
+ <!-- <xsl:template match="bipm:license-statement//bipm:link">
1840
1886
  <fo:inline color="blue" text-decoration="underline">
1841
1887
  <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
1842
1888
  <xsl:choose>
@@ -1849,7 +1895,7 @@
1849
1895
  </xsl:choose>
1850
1896
  </fo:basic-link>
1851
1897
  </fo:inline>
1852
- </xsl:template>
1898
+ </xsl:template> -->
1853
1899
 
1854
1900
 
1855
1901
  <xsl:template match="bipm:feedback-statement">
@@ -2905,18 +2951,31 @@
2905
2951
  <xsl:template match="bipm:xref" priority="2">
2906
2952
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">
2907
2953
  <xsl:choose>
2908
- <xsl:when test="@pagenumber='true'"><!-- ToC in Appendix -->
2909
- <fo:inline font-weight="bold"><fo:page-number-citation ref-id="{@target}"/></fo:inline>
2954
+ <xsl:when test="@pagenumber='true'"><!-- ToC in Appendix, and page in references like this: « Le BIPM et la Convention du Mètre » (page 5). -->
2955
+ <fo:inline> <!-- font-weight="bold" -->
2956
+ <fo:page-number-citation ref-id="{@target}"/>
2957
+ </fo:inline>
2910
2958
  </xsl:when>
2911
2959
  <xsl:when test="starts-with(normalize-space(following-sibling::node()[1]), ')')">
2912
2960
  <!-- add , see p. N -->
2913
2961
  <!-- add , voir p. N -->
2914
2962
  <xsl:apply-templates/>
2915
2963
  <xsl:text>, </xsl:text>
2916
- <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
2917
- <xsl:value-of select="ancestor::bipm:bipm-standard/bipm:localized-strings/bipm:localized-string[@key='see' and @language=$curr_lang]"/>
2918
- <xsl:text> p. </xsl:text>
2919
- <fo:page-number-citation ref-id="{@target}"/>
2964
+
2965
+ <xsl:variable name="nosee" select="normalize-space(@nosee)"/>
2966
+ <xsl:if test="$nosee != 'true'">
2967
+ <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
2968
+ <fo:inline>
2969
+ <xsl:if test="ancestor::bipm:note_side">
2970
+ <xsl:attribute name="font-style">italic</xsl:attribute>
2971
+ </xsl:if>
2972
+ <xsl:value-of select="ancestor::bipm:bipm-standard/bipm:localized-strings/bipm:localized-string[@key='see' and @language=$curr_lang]"/>
2973
+ </fo:inline>
2974
+ <xsl:text> </xsl:text>
2975
+ </xsl:if>
2976
+
2977
+ <xsl:text>p. </xsl:text>
2978
+ <fo:page-number-citation ref-id="{@target}"/>
2920
2979
  </xsl:when>
2921
2980
  <xsl:otherwise>
2922
2981
  <fo:inline><xsl:apply-templates/></fo:inline>
@@ -2925,6 +2984,16 @@
2925
2984
  </fo:basic-link>
2926
2985
  </xsl:template>
2927
2986
 
2987
+ <xsl:template match="bipm:eref[.//bipm:locality[@type = 'anchor']]" priority="2">
2988
+ <xsl:variable name="target" select=".//bipm:locality[@type = 'anchor']/bipm:referenceFrom"/>
2989
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{$target}">
2990
+ <!-- <xsl:apply-templates select="node()[not(local-name() = 'localityStack')]"/> -->
2991
+ <xsl:if test="xalan:nodeset($ids)//id = $target">
2992
+ <fo:page-number-citation ref-id="{$target}"/>
2993
+ </xsl:if>
2994
+ </fo:basic-link>
2995
+ </xsl:template>
2996
+
2928
2997
  <xsl:template match="bipm:note[not(ancestor::bipm:preface)]/bipm:name" priority="2" mode="presentation">
2929
2998
  <xsl:choose>
2930
2999
  <xsl:when test="not(../preceding-sibling::bipm:note) and not((../following-sibling::bipm:note))">
@@ -3491,31 +3560,58 @@
3491
3560
 
3492
3561
  <xsl:template match="node()" mode="change_id">
3493
3562
  <xsl:param name="lang"/>
3563
+ <xsl:param name="ignoreReferenceFrom"/>
3494
3564
  <xsl:copy>
3495
3565
  <xsl:apply-templates select="@*|node()" mode="change_id">
3496
3566
  <xsl:with-param name="lang" select="$lang"/>
3567
+ <xsl:with-param name="ignoreReferenceFrom" select="$ignoreReferenceFrom"/>
3568
+ </xsl:apply-templates>
3569
+ </xsl:copy>
3570
+ </xsl:template>
3571
+
3572
+ <xsl:template match="bipm:locality[@type='anchor']/bipm:referenceFrom " mode="change_id">
3573
+ <xsl:param name="lang"/>
3574
+ <xsl:param name="ignoreReferenceFrom"/>
3575
+ <xsl:copy>
3576
+ <xsl:apply-templates select="@*" mode="change_id">
3577
+ <xsl:with-param name="lang" select="$lang"/>
3578
+ <xsl:with-param name="ignoreReferenceFrom" select="$ignoreReferenceFrom"/>
3497
3579
  </xsl:apply-templates>
3580
+ <xsl:choose>
3581
+ <xsl:when test="$ignoreReferenceFrom = 'true'"><xsl:value-of select="."/></xsl:when>
3582
+ <xsl:otherwise><xsl:value-of select="."/>_<xsl:value-of select="$lang"/></xsl:otherwise>
3583
+ </xsl:choose>
3498
3584
  </xsl:copy>
3499
3585
  </xsl:template>
3500
3586
 
3501
3587
  <xsl:template match="@*" mode="change_id">
3502
3588
  <xsl:param name="lang"/>
3589
+ <xsl:param name="ignoreReferenceFrom"/>
3503
3590
  <xsl:choose>
3504
- <xsl:when test="local-name() = 'id' or local-name() = 'bibitemid' or (local-name() = 'target' and local-name(..) = 'xref')">
3591
+ <xsl:when test="$ignoreReferenceFrom = 'true' and local-name() = 'id' and xalan:nodeset($ids)//referenceFrom = .">
3592
+ <xsl:attribute name="{local-name()}">
3593
+ <xsl:value-of select="."/>
3594
+ </xsl:attribute>
3595
+ </xsl:when>
3596
+ <xsl:when test="local-name() = 'id' or local-name() = 'bibitemid' or (local-name() = 'target' and local-name(..) = 'xref')">
3505
3597
  <xsl:attribute name="{local-name()}">
3506
3598
  <xsl:value-of select="."/>_<xsl:value-of select="$lang"/>
3507
3599
  </xsl:attribute>
3508
3600
  </xsl:when>
3509
- <xsl:otherwise>
3601
+ <xsl:otherwise>
3602
+ <!-- no change -->
3510
3603
  <xsl:copy>
3511
3604
  <xsl:apply-templates select="@*" mode="change_id">
3512
3605
  <xsl:with-param name="lang" select="$lang"/>
3606
+ <xsl:with-param name="ignoreReferenceFrom" select="$ignoreReferenceFrom"/>
3513
3607
  </xsl:apply-templates>
3514
3608
  </xsl:copy>
3515
3609
  </xsl:otherwise>
3516
3610
  </xsl:choose>
3517
3611
  </xsl:template>
3518
3612
 
3613
+
3614
+
3519
3615
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
3520
3616
 
3521
3617
  <title-annex lang="en">Annex </title-annex>
@@ -3679,11 +3775,14 @@
3679
3775
  </xsl:choose>
3680
3776
  </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="root-style">
3681
3777
 
3682
- <xsl:attribute name="font-family">Times New Roman, STIX Two Math, HanSans</xsl:attribute>
3778
+ <xsl:attribute name="font-family">Times New Roman, STIX Two Math, Source Han Sans</xsl:attribute>
3683
3779
  <xsl:attribute name="font-size">10.5pt</xsl:attribute>
3684
3780
 
3685
3781
  </xsl:attribute-set><xsl:attribute-set name="link-style">
3686
3782
 
3783
+ <xsl:attribute name="color">blue</xsl:attribute>
3784
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
3785
+
3687
3786
 
3688
3787
 
3689
3788
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
@@ -3903,6 +4002,13 @@
3903
4002
  </xsl:attribute-set><xsl:attribute-set name="term-style">
3904
4003
 
3905
4004
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
4005
+
4006
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
4007
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4008
+ <xsl:attribute name="text-align">left</xsl:attribute>
4009
+ <xsl:attribute name="margin-left">19mm</xsl:attribute>
4010
+ <xsl:attribute name="text-indent">-19mm</xsl:attribute>
4011
+
3906
4012
 
3907
4013
 
3908
4014
 
@@ -5263,6 +5369,7 @@
5263
5369
  </fo:inline>
5264
5370
  </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
5265
5371
  <fo:inline font-weight="bold">
5372
+
5266
5373
  <xsl:apply-templates/>
5267
5374
  </fo:inline>
5268
5375
  </xsl:template><xsl:template match="*[local-name()='sup']">
@@ -5671,6 +5778,7 @@
5671
5778
  </xsl:choose>
5672
5779
  </xsl:variable>
5673
5780
  <fo:inline xsl:use-attribute-sets="link-style">
5781
+
5674
5782
  <xsl:choose>
5675
5783
  <xsl:when test="$target = ''">
5676
5784
  <xsl:apply-templates/>
@@ -5891,7 +5999,12 @@
5891
5999
  </fo:inline>
5892
6000
  </xsl:if>
5893
6001
  </xsl:template><xsl:template match="*[local-name() = 'figure']">
5894
- <fo:block-container id="{@id}">
6002
+ <fo:block-container id="{@id}">
6003
+
6004
+ <xsl:if test="*[local-name() = 'name']">
6005
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
6006
+ </xsl:if>
6007
+
5895
6008
  <fo:block>
5896
6009
  <xsl:apply-templates/>
5897
6010
  </fo:block>
@@ -5942,7 +6055,7 @@
5942
6055
  <xsl:apply-templates mode="bookmarks"/>
5943
6056
  </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
5944
6057
  <xsl:apply-templates select="."/>
5945
- </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
6058
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
5946
6059
  <xsl:apply-templates mode="bookmarks"/>
5947
6060
  </xsl:template><xsl:template name="addBookmarks">
5948
6061
  <xsl:param name="contents"/>
@@ -6680,7 +6793,7 @@
6680
6793
  <fo:block id="{@id}">
6681
6794
  <xsl:apply-templates/>
6682
6795
  </fo:block>
6683
- </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
6796
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
6684
6797
 
6685
6798
  <fo:block id="{@id}">
6686
6799
  <xsl:apply-templates/>