isodoc 2.12.1 → 2.12.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/isodoc.gemspec +1 -1
  3. data/lib/isodoc/convert.rb +0 -21
  4. data/lib/isodoc/function/blocks.rb +8 -8
  5. data/lib/isodoc/function/blocks_example_note.rb +46 -23
  6. data/lib/isodoc/function/inline.rb +31 -8
  7. data/lib/isodoc/function/lists.rb +4 -4
  8. data/lib/isodoc/function/references.rb +5 -5
  9. data/lib/isodoc/function/reqt.rb +2 -2
  10. data/lib/isodoc/function/section.rb +25 -25
  11. data/lib/isodoc/function/section_titles.rb +15 -12
  12. data/lib/isodoc/function/table.rb +1 -1
  13. data/lib/isodoc/function/terms.rb +17 -14
  14. data/lib/isodoc/function/to_word_html.rb +5 -0
  15. data/lib/isodoc/html_function/footnotes.rb +2 -1
  16. data/lib/isodoc/html_function/html.rb +1 -5
  17. data/lib/isodoc/init.rb +14 -4
  18. data/lib/isodoc/metadata.rb +9 -0
  19. data/lib/isodoc/metadata_contributor.rb +1 -1
  20. data/lib/isodoc/metadata_date.rb +1 -1
  21. data/lib/isodoc/presentation_function/autonum.rb +139 -0
  22. data/lib/isodoc/presentation_function/block.rb +48 -39
  23. data/lib/isodoc/presentation_function/docid.rb +0 -23
  24. data/lib/isodoc/presentation_function/erefs.rb +4 -2
  25. data/lib/isodoc/presentation_function/image.rb +21 -5
  26. data/lib/isodoc/presentation_function/inline.rb +1 -1
  27. data/lib/isodoc/presentation_function/reqt.rb +1 -1
  28. data/lib/isodoc/presentation_function/section.rb +46 -118
  29. data/lib/isodoc/presentation_function/sourcecode.rb +7 -4
  30. data/lib/isodoc/presentation_function/terms.rb +3 -4
  31. data/lib/isodoc/presentation_function/title.rb +107 -0
  32. data/lib/isodoc/presentation_function/xrefs.rb +17 -10
  33. data/lib/isodoc/presentation_xml_convert.rb +2 -1
  34. data/lib/isodoc/version.rb +1 -1
  35. data/lib/isodoc/word_function/body.rb +7 -35
  36. data/lib/isodoc/word_function/footnotes.rb +1 -1
  37. data/lib/isodoc/word_function/lists.rb +12 -10
  38. data/lib/isodoc/word_function/postprocess_cover.rb +0 -2
  39. data/lib/isodoc/word_function/postprocess_table.rb +1 -1
  40. data/lib/isodoc/word_function/postprocess_toc.rb +1 -1
  41. data/lib/isodoc/word_function/table.rb +2 -2
  42. data/lib/isodoc/xref/xref_anchor.rb +31 -16
  43. data/lib/isodoc/xref/xref_counter_types.rb +3 -2
  44. data/lib/isodoc/xref/xref_gen.rb +57 -33
  45. data/lib/isodoc/xref/xref_gen_seq.rb +145 -56
  46. data/lib/isodoc/xref/xref_sect_gen.rb +60 -28
  47. data/lib/isodoc/xref/xref_util.rb +43 -1
  48. data/lib/isodoc/xref.rb +3 -0
  49. data/lib/isodoc-yaml/i18n-ar.yaml +9 -9
  50. data/lib/isodoc-yaml/i18n-de.yaml +9 -9
  51. data/lib/isodoc-yaml/i18n-en.yaml +9 -9
  52. data/lib/isodoc-yaml/i18n-es.yaml +9 -9
  53. data/lib/isodoc-yaml/i18n-fr.yaml +9 -9
  54. data/lib/isodoc-yaml/i18n-ja.yaml +10 -10
  55. data/lib/isodoc-yaml/i18n-ru.yaml +9 -9
  56. data/lib/isodoc-yaml/i18n-zh-Hans.yaml +9 -9
  57. data/lib/nokogiri/xml/node.rb +1 -0
  58. metadata +6 -4
@@ -104,8 +104,10 @@ module IsoDoc
104
104
  title = clause_title(clause, use_elem_name: true)
105
105
  preface_name_anchors(clause, 1, title)
106
106
  clause.xpath(ns(SUBCLAUSES)).each_with_index do |c, i|
107
- preface_names1(c, c.at(ns("./title"))&.text,
108
- "#{title}, #{i + 1}", 2)
107
+ t = c.at(ns("./title"))
108
+ tt = "#{semx(clause, title, clause.name)}" \
109
+ "<span class='fmt-comma'>,</span> #{semx(c, i + 1)}"
110
+ preface_names1(c, t ? semx(c, t.text, c.name) : nil, tt, 2)
109
111
  end
110
112
  end
111
113
 
@@ -113,15 +115,18 @@ module IsoDoc
113
115
  label = title || parent_title
114
116
  preface_name_anchors(clause, level, title || parent_title)
115
117
  clause.xpath(ns(SUBCLAUSES)).each_with_index do |c, i|
116
- preface_names1(c, c.at(ns("./title"))&.text, "#{label} #{i + 1}",
118
+ t = c.at(ns("./title"))
119
+ preface_names1(c, t ? semx(c, t.text, c.name) : nil,
120
+ "#{label} #{semx(c, i + 1)}",
117
121
  level + 1)
118
122
  end
119
123
  end
120
124
 
121
125
  def preface_name_anchors(clause, level, title)
126
+ xref = semx(clause, title, clause.name)
122
127
  @anchors[clause["id"]] =
123
128
  { label: nil, level:,
124
- xref: title, title: nil,
129
+ xref:, title: nil,
125
130
  type: "clause", elem: @labels["clause"] }
126
131
  end
127
132
 
@@ -136,20 +141,32 @@ module IsoDoc
136
141
  def section_names(clause, num, lvl)
137
142
  unnumbered_section_name?(clause) and return num
138
143
  num.increment(clause)
139
- section_name_anchors(clause, num.print, lvl)
144
+ lbl = semx(clause, num.print)
145
+ section_name_anchors(clause, lbl, lvl)
140
146
  clause.xpath(ns(SUBCLAUSES))
141
- .each_with_object(clause_counter(0, prefix: num.print)) do |c, i|
142
- section_names1(c, i.increment(c).print, lvl + 1)
147
+ .each_with_object(clause_counter(0)) do |c, i|
148
+ section_names1(c, lbl, i.increment(c).print, lvl + 1)
143
149
  end
144
150
  num
145
151
  end
146
152
 
147
- def section_names1(clause, num, level)
153
+ def clause_number_semx(parentnum, clause, num)
154
+ if clause["branch-number"]
155
+ semx(clause, clause["branch-number"])
156
+ elsif parentnum.nil?
157
+ semx(clause, num)
158
+ else
159
+ "#{parentnum}#{delim_wrap(clausesep)}#{semx(clause, num)}"
160
+ end
161
+ end
162
+
163
+ def section_names1(clause, parentnum, num, level)
148
164
  unnumbered_section_name?(clause) and return num
149
- section_name_anchors(clause, num, level)
150
- i = clause_counter(0, prefix: num)
165
+ lbl = clause_number_semx(parentnum, clause, num)
166
+ section_name_anchors(clause, lbl, level)
167
+ i = clause_counter(0)
151
168
  clause.xpath(ns(SUBCLAUSES)).each do |c|
152
- section_names1(c, i.increment(c).print, level + 1)
169
+ section_names1(c, lbl, i.increment(c).print, level + 1)
153
170
  end
154
171
  end
155
172
 
@@ -162,10 +179,16 @@ module IsoDoc
162
179
  false
163
180
  end
164
181
 
182
+ def clausesep
183
+ "."
184
+ end
185
+
165
186
  def section_name_anchors(clause, num, level)
187
+ xref = labelled_autonum(@labels["clause"], num)
188
+ label = num
189
+ c = clause_title(clause) and title = semx(clause, c, "title")
166
190
  @anchors[clause["id"]] =
167
- { label: num, xref: "#{@labels['clause']} #{num}",
168
- title: clause_title(clause), level:, type: "clause",
191
+ { label:, xref:, title:, level:, type: "clause",
169
192
  elem: @labels["clause"] }
170
193
  end
171
194
 
@@ -173,44 +196,53 @@ module IsoDoc
173
196
  obl = "(#{@labels['inform_annex']})"
174
197
  clause["obligation"] == "normative" and
175
198
  obl = "(#{@labels['norm_annex']})"
199
+ obl = "<span class='fmt-obligation'>#{l10n obl}</fmt>"
176
200
  title = Common::case_with_markup(@labels["annex"], "capital",
177
201
  @script)
178
- "<strong>#{title} #{num}</strong><br/>#{obl}"
202
+ s = labelled_autonum(title, num)
203
+ "<strong><span class='fmt-caption-label'>#{s}</span></strong><br/>#{obl}"
179
204
  end
180
205
 
181
206
  def annex_name_anchors(clause, num, level)
182
207
  label = num
183
208
  level == 1 && clause.name == "annex" and
184
- label = annex_name_lbl(clause, num)
209
+ label = annex_name_lbl(clause, label)
210
+ xref = labelled_autonum(@labels["annex"], num)
211
+ c = clause_title(clause) and title = semx(clause, c, "title")
185
212
  @anchors[clause["id"]] =
186
- { label:,
213
+ { label:, xref:, title:,
187
214
  elem: @labels["annex"], type: "clause",
188
- subtype: "annex", value: num.to_s, level:,
189
- title: clause_title(clause),
190
- xref: "#{@labels['annex']} #{num}" }
215
+ subtype: "annex", value: num.to_s, level: }
191
216
  end
192
217
 
193
218
  def annex_names(clause, num)
194
- annex_name_anchors(clause, num, 1)
219
+ label = semx(clause, num)
220
+ annex_name_anchors(clause, label, 1)
195
221
  if @klass.single_term_clause?(clause)
196
222
  annex_names1(clause.at(ns("./references | ./terms | ./definitions")),
197
- num.to_s, 1)
223
+ nil, num.to_s, 1)
198
224
  else
199
225
  clause.xpath(ns(SUBCLAUSES))
200
- .each_with_object(clause_counter(0, prefix: num)) do |c, i|
201
- annex_names1(c, i.increment(c).print, 2)
226
+ .each_with_object(clause_counter(0)) do |c, i|
227
+ annex_names1(c, label, i.increment(c).print, 2)
202
228
  end
203
229
  end
204
- hierarchical_asset_names(clause, num)
230
+ hierarchical_asset_names(clause, label)
205
231
  end
206
232
 
207
- def annex_names1(clause, num, level)
208
- annex_name_anchors(clause, num, level)
209
- i = clause_counter(0, prefix: num)
233
+ def annex_names1(clause, parentnum, num, level)
234
+ lbl = clause_number_semx(parentnum, clause, num)
235
+ annex_name_anchors1(clause, lbl, level)
236
+ i = clause_counter(0)
210
237
  clause.xpath(ns(SUBCLAUSES)).each do |c|
211
- annex_names1(c, i.increment(c).print, level + 1)
238
+ annex_names1(c, lbl, i.increment(c).print, level + 1)
212
239
  end
213
240
  end
241
+
242
+ # subclauses of Annexes
243
+ def annex_name_anchors1(clause, num, level)
244
+ annex_name_anchors(clause, num, level)
245
+ end
214
246
  end
215
247
  end
216
248
  end
@@ -14,7 +14,7 @@ end
14
14
 
15
15
  module IsoDoc
16
16
  module XrefGen
17
- module Blocks
17
+ module Util
18
18
  def blank?(text)
19
19
  text.nil? || text.empty?
20
20
  end
@@ -43,6 +43,48 @@ module IsoDoc
43
43
 
44
44
  CHILD_SECTIONS = "./clause | ./appendix | ./terms | ./definitions | " \
45
45
  "./references".freeze
46
+
47
+ def child_sections
48
+ CHILD_SECTIONS
49
+ end
50
+
51
+ # if hierarchically marked up node in label already,
52
+ # leave alone, else wrap in semx
53
+ def semx(node, label, element = "autonum")
54
+ label = label.to_s
55
+ id = node["id"] || node[:id]
56
+ /<semx element='[^']+' source='#{id}'/.match?(label) and return label
57
+ l = stripsemx(label)
58
+ %(<semx element='#{element}' source='#{id}'>#{l}</semx>)
59
+ end
60
+
61
+ # assume parent is already semantically annotated with semx
62
+ def hiersemx(parent, parentlabel, counter, element, sep: nil)
63
+ sep ||= hier_separator(markup: true)
64
+ "#{semx(parent, parentlabel)}#{sep}#{semx(element, counter.print)}"
65
+ end
66
+
67
+ def delim_wrap(delim, klass = "fmt-autonum-delim")
68
+ delim.blank? and return ""
69
+ "<span class='#{klass}'>#{delim}</span>"
70
+ end
71
+
72
+ def stripsemx(elem)
73
+ elem.nil? and return elem
74
+ xml = Nokogiri::XML::DocumentFragment.parse(elem)
75
+ xml.traverse do |x|
76
+ x.name == "semx" ||
77
+ (x.name == "span" && /^fmt-/.match?(x["class"])) and
78
+ x.replace(x.children)
79
+ end
80
+ xml.to_xml(indent: 0, encoding: "UTF-8",
81
+ save_with: Nokogiri::XML::Node::SaveOptions::AS_XML)
82
+ end
83
+
84
+ def labelled_autonum(label, autonum)
85
+ label.blank? and return autonum
86
+ l10n("<span class='fmt-element-name'>#{label}</span> #{autonum}")
87
+ end
46
88
  end
47
89
  end
48
90
  end
data/lib/isodoc/xref.rb CHANGED
@@ -4,6 +4,7 @@ require_relative "xref/xref_counter_types"
4
4
  require_relative "xref/xref_gen_seq"
5
5
  require_relative "xref/xref_gen"
6
6
  require_relative "xref/xref_sect_gen"
7
+ require_relative "xref/xref_util"
7
8
  require_relative "class_utils"
8
9
  require_relative "function/utils"
9
10
 
@@ -92,5 +93,7 @@ module IsoDoc
92
93
  def l10n(text, lang = @lang, script = @script, locale = @locale)
93
94
  @i18n.l10n(text, lang, script, locale)
94
95
  end
96
+
97
+ include ::IsoDoc::XrefGen::Util
95
98
  end
96
99
  end
@@ -33,15 +33,15 @@ internal_external_terms_boilerplate: |
33
33
  لأغراض هذه الوثيقة ،تنطبق المصطلحات والتعاريف الواردة في % وما يلي.
34
34
  no_information_available: "[لا توجد معلومات متاحة]"
35
35
  term_defined_in: "(%)"
36
- binary_and: "%1 و %2"
37
- multiple_and: "%1, و %2"
38
- binary_or: "%1 او %2"
39
- multiple_or: "%1, او %2"
40
- chain_and: "%1 و %2"
41
- chain_or: "%1 او %2"
42
- chain_from: "%1 %من 2"
43
- chain_to: "من %1 إلى %2"
44
- nested_xref: "%1, %2"
36
+ binary_and: "%1 <conn>ﻭ</conn> %2"
37
+ multiple_and: "%1<enum-comma>,</enum-comma> <conn>ﻭ</conn> %2"
38
+ binary_or: "%1 <conn>ﺍﻭ</conn> %2"
39
+ multiple_or: "%1<enum-comma>,</enum-comma> <conn>ﺍﻭ</conn> %2"
40
+ chain_and: "%1 <conn>ﻭ</conn> %2"
41
+ chain_or: "%1 <conn>ﺍﻭ</conn> %2"
42
+ chain_from: "%1 <conn>%ﻢﻧ</conn> 2"
43
+ chain_to: "<conn>ﻢﻧ</conn> %1 <conn>ﺈﻟﻯ</conn> %2"
44
+ nested_xref: "%1<comma>,</comma> %2"
45
45
  list_nested_xref: "%1 %2"
46
46
  ordinal_keys: [gender]
47
47
  SpelloutRules:
@@ -35,15 +35,15 @@ internal_external_terms_boilerplate: |
35
35
  Für die Zwecke dieses Dokuments gelten die in % und im Folgenden aufgeführten Begriffe und Definitionen.
36
36
  no_information_available: "[KEINE INFORMATION VERFÜGBAR]"
37
37
  term_defined_in: "(%)"
38
- binary_and: "%1 und %2"
39
- multiple_and: "%1, und %2"
40
- binary_or: "%1 oder %2"
41
- multiple_or: "%1, oder %2"
42
- chain_and: "%1 und %2"
43
- chain_or: "%1 oder %2"
44
- chain_from: "%1 von %2"
45
- chain_to: "%1 bis %2"
46
- nested_xref: "%1, %2"
38
+ binary_and: "%1 <conn>und</conn> %2"
39
+ multiple_and: "%1<enum-comma>,</enum-comma> <conn>und</conn> %2"
40
+ binary_or: "%1 <conn>oder</conn> %2"
41
+ multiple_or: "%1<enum-comma>,</enum-comma> <conn>oder</conn> %2"
42
+ chain_and: "%1 <conn>und</conn> %2"
43
+ chain_or: "%1 <conn>oder</conn> %2"
44
+ chain_from: "%1 <conn>von</conn> %2"
45
+ chain_to: "%1 <conn>bis</conn> %2"
46
+ nested_xref: "%1<comma>,</comma> %2"
47
47
  list_nested_xref: "%1 %2"
48
48
  ordinal_keys: [gender,number]
49
49
  SpelloutRules:
@@ -38,15 +38,15 @@ internal_external_terms_boilerplate: |
38
38
  For the purposes of this document, the terms and definitions given in % and the following apply.
39
39
  no_information_available: "[NO INFORMATION AVAILABLE]"
40
40
  term_defined_in: "(%)"
41
- binary_and: "%1 and %2"
42
- multiple_and: "%1, and %2"
43
- binary_or: "%1 or %2"
44
- multiple_or: "%1, or %2"
45
- chain_and: "%1 and %2"
46
- chain_or: "%1 or %2"
47
- chain_from: "%1 from %2"
48
- chain_to: "%1 to %2"
49
- nested_xref: "%1, %2"
41
+ binary_and: "%1 <conn>and</conn> %2"
42
+ multiple_and: "%1<enum-comma>,</enum-comma> <conn>and</conn> %2"
43
+ binary_or: "%1 <conn>or</conn> %2"
44
+ multiple_or: "%1<enum-comma>,</enum-comma> <conn>or</conn> %2"
45
+ chain_and: "%1 <conn>and</conn> %2"
46
+ chain_or: "%1 <conn>or</conn> %2"
47
+ chain_from: "%1 <conn>from</conn> %2"
48
+ chain_to: "%1 <conn>to</conn> %2"
49
+ nested_xref: "%1<comma>,</comma> %2"
50
50
  list_nested_xref: "%1 %2"
51
51
  ordinal_keys: []
52
52
  SpelloutRules: spellout-ordinal
@@ -37,15 +37,15 @@ internal_external_terms_boilerplate: |
37
37
  Para los propósitos de este documento, se aplican los términos y definiciones dados en % y los siguientes.
38
38
  no_information_available: "[NO HAY INFORMACIÓN DISPONIBLE]"
39
39
  term_defined_in: "(%)"
40
- binary_and: "%1 y %2"
41
- multiple_and: "%1, y %2"
42
- binary_or: "%1 o %2"
43
- multiple_or: "%1, o %2"
44
- chain_and: "%1 y %2"
45
- chain_or: "%1 o %2"
46
- chain_from: "%1 del %2"
47
- chain_to: "%1 al %2"
48
- nested_xref: "%1, %2"
40
+ binary_and: "%1 <conn>y<//conn> %2"
41
+ multiple_and: "%1<enum-comma>,</enum-comma> <conn>y</conn> %2"
42
+ binary_or: "%1 <conn>o</conn> %2"
43
+ multiple_or: "%1<enum-comma>,</enum-comma> <conn>o</conn> %2"
44
+ chain_and: "%1 <conn>y</conn> %2"
45
+ chain_or: "%1 <conn>o</conn> %2"
46
+ chain_from: "%1 <conn>del</conn> %2"
47
+ chain_to: "%1 <conn>al</conn> %2"
48
+ nested_xref: "%1<comma>,</comma> %2"
49
49
  list_nested_xref: "%1 %2"
50
50
  ordinal_keys: [gender,number]
51
51
  SpelloutRules:
@@ -34,15 +34,15 @@ internal_external_terms_boilerplate: |
34
34
  Pour les besoins du présent document, les termes et définitions de % ainsi que les suivants, s’appliquent.
35
35
  no_information_available: "[PAS D’INFORMATION DISPONIBLE]"
36
36
  term_defined_in: "(%)"
37
- binary_and: "%1 et %2"
38
- multiple_and: "%1, et %2"
39
- binary_or: "%1 ou %2"
40
- multiple_or: "%1, ou %2"
41
- chain_and: "%1 et %2"
42
- chain_or: "%1 ou %2"
43
- chain_from: "%1 de %2"
44
- chain_to: "%1 à %2"
45
- nested_xref: "%1, %2"
37
+ binary_and: "%1 <conn>et</conn> %2"
38
+ multiple_and: "%1<enum-comma>,</enum-comma> <conn>et</conn> %2"
39
+ binary_or: "%1 <conn>ou</conn> %2"
40
+ multiple_or: "%1<enum-comma>,</enum-comma> <conn>ou</conn> %2"
41
+ chain_and: "%1 <conn>et</conn> %2"
42
+ chain_or: "%1 <conn>ou</conn> %2"
43
+ chain_from: "%1 <conn>de</conn> %2"
44
+ chain_to: "%1 <conn>à</conn> %2"
45
+ nested_xref: "%1<comma>,</comma> %2"
46
46
  list_nested_xref: "%1 %2"
47
47
  ordinal_keys: [gender,number]
48
48
  SpelloutRules:
@@ -34,16 +34,16 @@ internal_external_terms_boilerplate: |
34
34
  この規格で用いる主な用語及び定義は,次によるほか,% による。
35
35
  no_information_available: "[情報はありません]"
36
36
  term_defined_in: "(%)"
37
- binary_and: "%1 and %2"
38
- multiple_and: "%1, and %2"
39
- binary_or: "%1 or %2"
40
- multiple_or: "%1, or %2"
41
- chain_and: "%1 and %2"
42
- chain_or: "%1 or %2"
43
- chain_from: "%1 from %2"
44
- chain_to: "%1~%2"
45
- nested_xref: "%1の%2"
46
- list_nested_xref: "%1の%2"
37
+ binary_and: "%1 <conn>及び</conn> %2"
38
+ multiple_and: "%1<enum-comma>、</enum-comma>%2"
39
+ binary_or: "%1 <conn>または</conn> %2"
40
+ multiple_or: "%1<enum-comma>、</enum-comma> <conn>または</conn> %2"
41
+ chain_and: "%1 <conn>及び</conn> %2"
42
+ chain_or: "%1 <conn>または</conn> %2"
43
+ chain_from: "%1 <conn>から</conn> %2"
44
+ chain_to: "%1<conn>~</conn>%2"
45
+ nested_xref: "%1<conn>の</conn>%2"
46
+ list_nested_xref: "%1<conn>の</conn>%2"
47
47
  no_conflate_xref_locations: true
48
48
  ordinal_keys: []
49
49
  SpelloutRules: spellout-ordinal
@@ -37,15 +37,15 @@ internal_external_terms_boilerplate: |
37
37
  Для целей этого документа применяются термины и определения, данные в % и следующие.
38
38
  no_information_available: "[ИНФОРМАЦИЯ ОТСУТСТВУЕТ]"
39
39
  term_defined_in: "(%)"
40
- binary_and: "%1 и %2"
41
- multiple_and: "%1, и %2"
42
- binary_or: "%1 или %2"
43
- multiple_or: "%1, или %2"
44
- chain_and: "%1 и %2"
45
- chain_or: "%1 или %2"
46
- chain_from: "%1 от %2"
47
- chain_to: "%1 до %2"
48
- nested_xref: "%1, %2"
40
+ binary_and: "%1 <conn>и</conn> %2"
41
+ multiple_and: "%1<enum-comma>,</enum-comma> <conn>и</conn> %2"
42
+ binary_or: "%1 <conn>или</conn> %2"
43
+ multiple_or: "%1<enum-comma>,</enum-comma> <conn>или</conn> %2"
44
+ chain_and: "%1 <conn>и</conn> %2"
45
+ chain_or: "%1 <conn>или</conn> %2"
46
+ chain_from: "%1 <conn>от</conn> %2"
47
+ chain_to: "%1 <conn>до</conn> %2"
48
+ nested_xref: "%1<comma>,</comma> %2"
49
49
  list_nested_xref: "%1 %2"
50
50
  ordinal_keys: [gender,number,case]
51
51
  SpelloutRules:
@@ -36,15 +36,15 @@ internal_external_terms_boilerplate: |
36
36
  % 界定的以及下列术语和定义适用于本文件。
37
37
  no_information_available: "[无资料]"
38
38
  term_defined_in: "(%)"
39
- binary_and: "%1和%2"
40
- multiple_and: "%1、和%2"
41
- binary_or: "%1或%2"
42
- multiple_or: "%1、或%2"
43
- chain_and: "%1和%2"
44
- chain_or: "%1或%2"
45
- chain_from: "%1从%2"
46
- chain_to: "%1到%2"
47
- nested_xref: "%1, %2"
39
+ binary_and: "%1<conn>和</conn>%2"
40
+ multiple_and: "%1<enum-comma>、</enum-comma><conn>和</conn>%2"
41
+ binary_or: "%1<conn>或</conn>%2"
42
+ multiple_or: "%1<enum-comma>、</enum-comma><conn>或</conn>%2"
43
+ chain_and: "%1<conn>和</conn>%2"
44
+ chain_or: "%1<conn>或</conn>%2"
45
+ chain_from: "%1<conn>从</conn>%2"
46
+ chain_to: "%1<conn>到</conn>%2"
47
+ nested_xref: "%1<comma>,</comma> %2"
48
48
  list_nested_xref: "%1 %2"
49
49
  ordinal_keys: []
50
50
  SpelloutRules: spellout-ordinal
@@ -7,6 +7,7 @@ module Nokogiri
7
7
  else
8
8
  children.first.previous = content
9
9
  end
10
+ self
10
11
  end
11
12
  end
12
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.1
4
+ version: 2.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-11 00:00:00.000000000 Z
11
+ date: 2024-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.7.1
89
+ version: 0.8.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.7.1
96
+ version: 0.8.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: roman-numerals
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -418,6 +418,7 @@ files:
418
418
  - lib/isodoc/metadata_contributor.rb
419
419
  - lib/isodoc/metadata_date.rb
420
420
  - lib/isodoc/pdf_convert.rb
421
+ - lib/isodoc/presentation_function/autonum.rb
421
422
  - lib/isodoc/presentation_function/bibdata.rb
422
423
  - lib/isodoc/presentation_function/block.rb
423
424
  - lib/isodoc/presentation_function/concepts.rb
@@ -432,6 +433,7 @@ files:
432
433
  - lib/isodoc/presentation_function/section.rb
433
434
  - lib/isodoc/presentation_function/sourcecode.rb
434
435
  - lib/isodoc/presentation_function/terms.rb
436
+ - lib/isodoc/presentation_function/title.rb
435
437
  - lib/isodoc/presentation_function/xrefs.rb
436
438
  - lib/isodoc/presentation_xml_convert.rb
437
439
  - lib/isodoc/sassc_importer.rb