lib/isodoc/gb/gbbaseconvert.rb in metanorma-gb-1.3.26 vs lib/isodoc/gb/gbbaseconvert.rb in metanorma-gb-1.3.27
- old
+ new
@@ -55,20 +55,22 @@
def omit_docid_prefix(prefix)
super || prefix == "Chinese Standard"
end
def formula_parse(node, out)
- out.div **attr_code(id: node["id"], class: "formula") do |div|
+ out.div **formula_attrs(node) do |div1|
+ div1.div **attr_code(class: "formula") do |div|
insert_tab(div, 1)
- parse(node.at(ns("./stem")), out)
+ parse(node.at(ns("./stem")), div)
lbl = anchor(node['id'], :label, false)
unless lbl.nil?
insert_tab(div, 1)
div << "(#{lbl})"
end
end
- formula_where(node.at(ns("./dl")), out)
+ formula_where(node.at(ns("./dl")), div1)
+ end
end
def formula_where(dl, out)
return unless dl
out.p **{ style: "page-break-after:avoid;"} do |p|
@@ -100,16 +102,16 @@
def example_label(node)
l10n(super + ":")
end
def note_parse(node, out)
- note_parse1(node, out, note_label(node) + ":")
+ note_parse_table(node, out, note_label(node) + ":")
end
- def note_parse1(node, out, label)
+ def note_parse_table(node, out, label)
@note = true
- out.table **attr_code(id: node["id"], class: "Note") do |t|
+ out.table **note_attrs(node) do |t|
t.tr do |tr|
@libdir = File.dirname(__FILE__)
tr.td **EXAMPLE_TBL_ATTR do |td|
td << l10n(label)
end
@@ -120,10 +122,10 @@
end
@note = false
end
def termnote_parse(node, out)
- note_parse1(node, out, "#{anchor(node['id'], :label)}:")
+ note_parse_table(node, out, "#{anchor(node['id'], :label)}:")
end
def middle(isoxml, out)
super
end_line(isoxml, out)