metanorma-itu 1.0.14 → 1.0.15

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: fa11ca775d53301386b4213e8d168d31ffa66fdfc1e66ef1fa880bd45fc7d2d3
4
- data.tar.gz: cffd94e8a380da22a7828480135ac09825ea90ba4f973cf518223dded868bae1
3
+ metadata.gz: 1716cf558f18bf55eec7bd90d86283304f0ff55fc7d8f384f0f85ce7808fdcc6
4
+ data.tar.gz: 3bb69ae66bfd7e2a1f8a791a7b1536f204830a40c16ae6ca972c5e7e86510190
5
5
  SHA512:
6
- metadata.gz: c7ab3479fc531fb4860b2a58afb0e6cd968480a23297a8c783f848fbde8193605ef8aa2ac7d021791bae9128ad2509eb4caa9d1b410b54b4ed164077ff7e37be
7
- data.tar.gz: 99d00b7dacc6e26078aac82809c3ac189f56ad4147c08af0f089e58d6e8306d532af346f6ba0c581b98d4cf78a1e3600e7345ffc3a68ab0705adb1c589b1ae1f
6
+ metadata.gz: 6e76f70372f778f9d487af3b6e2f7af48bee0fe0275b7facd4562d5106588f8e0141ea5a2af3113312674c946db7c39ac5b6a5a15065ffce3a493b6ec54947da
7
+ data.tar.gz: c3b7170b688848cd7dec19f96a504a5ae55a86645bae0bb11b48ea8ca9a84541c6d6033a526e8ae82cc80cba6a1e07f2b9d58b36fe244597ab3e4d6da1e30556
@@ -43,8 +43,8 @@ module Asciidoctor
43
43
  x.at("./*/annex[last()] | ./*/sections").next =
44
44
  "<bibliography><sentinel/></bibliography>"
45
45
  ins = x.at("//bibliography").elements.first
46
- unless x.at("//bibliography/references/title[text() = 'References']")
47
- ins.previous = "<references><title>References</title><p>"\
46
+ unless x.at("//bibliography/references[@normative = 'true']")
47
+ ins.previous = "<references normative='true'><title>References</title><p>"\
48
48
  "#{@labels['clause_empty']}</p></references>"
49
49
  end
50
50
  x&.at("//sentinel")&.remove
@@ -160,6 +160,13 @@ module Asciidoctor
160
160
  biblio_reorder1(r)
161
161
  end
162
162
  end
163
+
164
+ def normref_cleanup(xmldoc)
165
+ super
166
+ r = xmldoc.at(NORM_REF) || return
167
+ title = r.at("./title") and
168
+ title.content = "References"
169
+ end
163
170
  end
164
171
  end
165
172
  end
@@ -90,15 +90,6 @@ module Asciidoctor
90
90
  end
91
91
  end
92
92
 
93
- def norm_ref_parse(attrs, xml, node)
94
- @norm_ref = true
95
- xml.references **attr_code(attrs) do |xml_section|
96
- xml_section.title { |t| t << "References" }
97
- xml_section << node.content
98
- end
99
- @norm_ref = false
100
- end
101
-
102
93
  def term_def_title(toplevel, node)
103
94
  return node.title unless toplevel
104
95
  "Definitions"
@@ -131,8 +122,6 @@ module Asciidoctor
131
122
  div.next = "<p>#{@term_def_boilerplate}</p>"
132
123
  end
133
124
 
134
- NORM_REF = "//bibliography/references[title = 'References']".freeze
135
-
136
125
  def load_yaml(lang, script)
137
126
  y = if @i18nyaml then YAML.load_file(@i18nyaml)
138
127
  elsif lang == "en"
@@ -129,6 +129,9 @@
129
129
  </choice>
130
130
  </attribute>
131
131
  </optional>
132
+ <attribute name="normative">
133
+ <data type="boolean"/>
134
+ </attribute>
132
135
  <optional>
133
136
  <ref name="section-title"/>
134
137
  </optional>
@@ -303,11 +306,11 @@
303
306
  <ref name="paragraph"/>
304
307
  </element>
305
308
  </define>
306
- <define name="TextElement" combine="choice">
307
- <ref name="concept"/>
308
- </define>
309
309
  </include>
310
310
  <!-- end overrides -->
311
+ <define name="TextElement" combine="choice">
312
+ <ref name="concept"/>
313
+ </define>
311
314
  <define name="concept">
312
315
  <element name="concept">
313
316
  <optional>
@@ -17,9 +17,9 @@ module IsoDoc
17
17
 
18
18
  def default_fonts(options)
19
19
  {
20
- bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Open Sans",sans-serif'),
21
- headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Open Sans",sans-serif'),
22
- monospacefont: '"Space Mono",monospace'
20
+ bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Times New Roman",serif'),
21
+ headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Times New Roman",serif'),
22
+ monospacefont: '"Courier New",monospace'
23
23
  }
24
24
  end
25
25