metanorma-cc 1.6.9 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bdb9f2761f3fac5e265f9ebcc494ccd85b950801217ae8da956108b1ee948437
4
- data.tar.gz: 82a3946e628c8d9c566638723d02eacbe6d6c27f6e2bbec7108762e68d0803e3
3
+ metadata.gz: 6f772278a0ba451f7f3ce1bb466df01ef45cb6fafacae4a07d73a6b1dfa62f77
4
+ data.tar.gz: ec7e9fc4bbc9fe2d57406bca69d53e180e80bba22ab2b4b798c05fb761a6d0fb
5
5
  SHA512:
6
- metadata.gz: fde04d9e0d59ba4f668613bbe8fe54688049a639ca666c7e88be4a114fad914d8a5de91c54dab29b329bd86202b9475ebe4fcd880dd566f6aa82a0c21f588c92
7
- data.tar.gz: a5cec184e815699e46a2256a358dd04a7adf2a1acd5bdd0f46cc7e78f95cfe88c30799be839c06cd14b0f98c784b18d5bedc2973b14aeb7b1105b92c3b033590
6
+ metadata.gz: 1e57614ae9bab53dd3eb3e859094f36706737945d3e219f073ef93827bc966bc001f763b0a31b0cbec71ab80d70e035374eddcaaf2c6320bff07529fd3de2ce3
7
+ data.tar.gz: a893724e0c82ba939cc9da512dd924da16d91bc2881df99c38b31363ca8602a376d89105c8a4653352b2184ae12e0591e228cf84ce08bbc4c5a943ee7e604553
@@ -86,6 +86,35 @@
86
86
  <text/>
87
87
  </element>
88
88
  </define>
89
+ <define name="erefType">
90
+ <optional>
91
+ <attribute name="normative">
92
+ <data type="boolean"/>
93
+ </attribute>
94
+ </optional>
95
+ <attribute name="citeas"/>
96
+ <attribute name="type">
97
+ <ref name="ReferenceFormat"/>
98
+ </attribute>
99
+ <optional>
100
+ <attribute name="alt"/>
101
+ </optional>
102
+ <optional>
103
+ <attribute name="case">
104
+ <choice>
105
+ <value>capital</value>
106
+ <value>lowercase</value>
107
+ </choice>
108
+ </attribute>
109
+ </optional>
110
+ <optional>
111
+ <attribute name="droploc">
112
+ <data type="boolean"/>
113
+ </attribute>
114
+ </optional>
115
+ <ref name="CitationType"/>
116
+ <text/>
117
+ </define>
89
118
  <define name="ul">
90
119
  <element name="ul">
91
120
  <attribute name="id">
@@ -775,6 +804,78 @@
775
804
  <ref name="paragraph"/>
776
805
  </element>
777
806
  </define>
807
+ <define name="em">
808
+ <element name="em">
809
+ <zeroOrMore>
810
+ <choice>
811
+ <ref name="PureTextElement"/>
812
+ <ref name="stem"/>
813
+ <ref name="index"/>
814
+ </choice>
815
+ </zeroOrMore>
816
+ </element>
817
+ </define>
818
+ <define name="strong">
819
+ <element name="strong">
820
+ <zeroOrMore>
821
+ <choice>
822
+ <ref name="PureTextElement"/>
823
+ <ref name="stem"/>
824
+ <ref name="index"/>
825
+ </choice>
826
+ </zeroOrMore>
827
+ </element>
828
+ </define>
829
+ <define name="tt">
830
+ <element name="tt">
831
+ <zeroOrMore>
832
+ <choice>
833
+ <ref name="PureTextElement"/>
834
+ <ref name="index"/>
835
+ </choice>
836
+ </zeroOrMore>
837
+ </element>
838
+ </define>
839
+ <define name="keyword">
840
+ <element name="keyword">
841
+ <zeroOrMore>
842
+ <choice>
843
+ <ref name="PureTextElement"/>
844
+ <ref name="index"/>
845
+ </choice>
846
+ </zeroOrMore>
847
+ </element>
848
+ </define>
849
+ <define name="strike">
850
+ <element name="strike">
851
+ <zeroOrMore>
852
+ <choice>
853
+ <ref name="PureTextElement"/>
854
+ <ref name="index"/>
855
+ </choice>
856
+ </zeroOrMore>
857
+ </element>
858
+ </define>
859
+ <define name="underline">
860
+ <element name="underline">
861
+ <zeroOrMore>
862
+ <choice>
863
+ <ref name="PureTextElement"/>
864
+ <ref name="index"/>
865
+ </choice>
866
+ </zeroOrMore>
867
+ </element>
868
+ </define>
869
+ <define name="smallcap">
870
+ <element name="smallcap">
871
+ <zeroOrMore>
872
+ <choice>
873
+ <ref name="PureTextElement"/>
874
+ <ref name="index"/>
875
+ </choice>
876
+ </zeroOrMore>
877
+ </element>
878
+ </define>
778
879
  </include>
779
880
  <!-- end overrides -->
780
881
  <define name="colgroup">
@@ -793,7 +894,35 @@
793
894
  <value>internal</value>
794
895
  </define>
795
896
  <define name="TextElement" combine="choice">
796
- <ref name="concept"/>
897
+ <choice>
898
+ <ref name="concept"/>
899
+ <ref name="add"/>
900
+ <ref name="del"/>
901
+ </choice>
902
+ </define>
903
+ <define name="add">
904
+ <element name="add">
905
+ <choice>
906
+ <ref name="PureTextElement"/>
907
+ <ref name="eref"/>
908
+ <ref name="stem"/>
909
+ <ref name="keyword"/>
910
+ <ref name="xref"/>
911
+ <ref name="hyperlink"/>
912
+ </choice>
913
+ </element>
914
+ </define>
915
+ <define name="del">
916
+ <element name="del">
917
+ <choice>
918
+ <ref name="PureTextElement"/>
919
+ <ref name="eref"/>
920
+ <ref name="stem"/>
921
+ <ref name="keyword"/>
922
+ <ref name="xref"/>
923
+ <ref name="hyperlink"/>
924
+ </choice>
925
+ </element>
797
926
  </define>
798
927
  <define name="concept">
799
928
  <element name="concept">
@@ -5,6 +5,7 @@
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
+ <xsl:param name="basepath"/>
8
9
 
9
10
  <xsl:variable name="pageWidth" select="'210mm'"/>
10
11
  <xsl:variable name="pageHeight" select="'297mm'"/>
@@ -1283,7 +1284,7 @@
1283
1284
 
1284
1285
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1285
1286
 
1286
-
1287
+
1287
1288
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1288
1289
 
1289
1290
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
@@ -1291,6 +1292,12 @@
1291
1292
 
1292
1293
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1293
1294
 
1295
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
1296
+ <xsl:attribute name="color">red</xsl:attribute>
1297
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1298
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
1299
+ <xsl:attribute name="color">red</xsl:attribute>
1300
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1294
1301
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
1295
1302
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1296
1303
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -2639,8 +2646,12 @@
2639
2646
  <fo:inline text-decoration="underline">
2640
2647
  <xsl:apply-templates/>
2641
2648
  </fo:inline>
2649
+ </xsl:template><xsl:template match="*[local-name()='add']">
2650
+ <fo:inline xsl:use-attribute-sets="add-style">
2651
+ <xsl:apply-templates/>
2652
+ </fo:inline>
2642
2653
  </xsl:template><xsl:template match="*[local-name()='del']">
2643
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2654
+ <fo:inline xsl:use-attribute-sets="del-style">
2644
2655
  <xsl:apply-templates/>
2645
2656
  </fo:inline>
2646
2657
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -3252,22 +3263,37 @@
3252
3263
  <xsl:apply-templates/>
3253
3264
  </fo:block>
3254
3265
  </xsl:template><xsl:template match="*[local-name() = 'image']">
3255
- <fo:block xsl:use-attribute-sets="image-style">
3256
-
3257
-
3258
- <xsl:variable name="src">
3259
- <xsl:choose>
3260
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3261
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3262
- </xsl:when>
3263
- <xsl:otherwise>
3264
- <xsl:value-of select="@src"/>
3265
- </xsl:otherwise>
3266
- </xsl:choose>
3267
- </xsl:variable>
3268
-
3269
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3270
- </fo:block>
3266
+ <xsl:choose>
3267
+ <xsl:when test="ancestor::*[local-name() = 'title']">
3268
+ <fo:inline padding-left="1mm" padding-right="1mm">
3269
+ <xsl:variable name="src">
3270
+ <xsl:call-template name="image_src"/>
3271
+ </xsl:variable>
3272
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
3273
+ </fo:inline>
3274
+ </xsl:when>
3275
+ <xsl:otherwise>
3276
+ <fo:block xsl:use-attribute-sets="image-style">
3277
+
3278
+ <xsl:variable name="src">
3279
+ <xsl:call-template name="image_src"/>
3280
+ </xsl:variable>
3281
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3282
+ </fo:block>
3283
+ </xsl:otherwise>
3284
+ </xsl:choose>
3285
+ </xsl:template><xsl:template name="image_src">
3286
+ <xsl:choose>
3287
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3288
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3289
+ </xsl:when>
3290
+ <xsl:when test="not(starts-with(@src, 'data:'))">
3291
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
3292
+ </xsl:when>
3293
+ <xsl:otherwise>
3294
+ <xsl:value-of select="@src"/>
3295
+ </xsl:otherwise>
3296
+ </xsl:choose>
3271
3297
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
3272
3298
  <xsl:apply-templates mode="contents"/>
3273
3299
  <xsl:text> </xsl:text>
@@ -108,6 +108,13 @@ a.FootnoteRef + a.FootnoteRef:before {
108
108
  content: ", ";
109
109
  vertical-align: super; }
110
110
 
111
+ .addition {
112
+ color: blue; }
113
+
114
+ .deletion {
115
+ color: red;
116
+ text-decoration: line-through; }
117
+
111
118
  #standard-band {
112
119
  background-color: #0AC442; }
113
120
 
@@ -108,6 +108,13 @@ a.FootnoteRef + a.FootnoteRef:before {
108
108
  content: ", ";
109
109
  vertical-align: super; }
110
110
 
111
+ .addition {
112
+ color: blue; }
113
+
114
+ .deletion {
115
+ color: red;
116
+ text-decoration: line-through; }
117
+
111
118
  #standard-band {
112
119
  background-color: #0AC442; }
113
120
 
@@ -320,6 +327,13 @@ a.FootnoteRef + a.FootnoteRef:before {
320
327
  content: ", ";
321
328
  vertical-align: super; }
322
329
 
330
+ .addition {
331
+ color: blue; }
332
+
333
+ .deletion {
334
+ color: red;
335
+ text-decoration: line-through; }
336
+
323
337
  #standard-band {
324
338
  background-color: #0AC442; }
325
339
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module CC
3
- VERSION = "1.6.9"
3
+ VERSION = "1.7.0".freeze
4
4
  end
5
5
  end
data/metanorma-cc.gemspec CHANGED
@@ -1,4 +1,4 @@
1
- lib = File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path("lib", __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require "metanorma/cc/version"
4
4
 
@@ -28,16 +28,16 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ["lib"]
29
29
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
30
30
 
31
- spec.add_dependency "metanorma-generic", "~> 1.9.0"
31
+ spec.add_dependency "metanorma-generic", "~> 1.10.0"
32
32
 
33
33
  spec.add_development_dependency "byebug", "~> 9.1"
34
- spec.add_development_dependency "sassc", "2.4.0"
35
34
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
36
35
  spec.add_development_dependency "guard", "~> 2.14"
37
36
  spec.add_development_dependency "guard-rspec", "~> 4.7"
38
37
  spec.add_development_dependency "rake", "~> 13.0"
39
38
  spec.add_development_dependency "rspec", "~> 3.6"
40
39
  spec.add_development_dependency "rubocop", "~> 1.5.2"
40
+ spec.add_development_dependency "sassc", "2.4.0"
41
41
  spec.add_development_dependency "simplecov", "~> 0.15"
42
42
  spec.add_development_dependency "timecop", "~> 0.9"
43
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-cc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.9
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-29 00:00:00.000000000 Z
11
+ date: 2021-04-12 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: 1.9.0
19
+ version: 1.10.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: 1.9.0
26
+ version: 1.10.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '9.1'
41
- - !ruby/object:Gem::Dependency
42
- name: sassc
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '='
46
- - !ruby/object:Gem::Version
47
- version: 2.4.0
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '='
53
- - !ruby/object:Gem::Version
54
- version: 2.4.0
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: equivalent-xml
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -136,6 +122,20 @@ dependencies:
136
122
  - - "~>"
137
123
  - !ruby/object:Gem::Version
138
124
  version: 1.5.2
125
+ - !ruby/object:Gem::Dependency
126
+ name: sassc
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '='
130
+ - !ruby/object:Gem::Version
131
+ version: 2.4.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '='
137
+ - !ruby/object:Gem::Version
138
+ version: 2.4.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: simplecov
141
141
  requirement: !ruby/object:Gem::Requirement