Sha256: cee3a5125dd28349510830f9182ae0d80ad1fb8f269ff259d2e5750058326ecc
Contents?: true
Size: 1.12 KB
Versions: 3
Compression:
Stored size: 1.12 KB
Contents
require_relative "init" require "isodoc" module IsoDoc module UN class PresentationXMLConvert < IsoDoc::PresentationXMLConvert def initialize(options) super @toc = options[:toc] end def note1(elem) return if elem.parent.name == "bibitem" return if elem["type"] == "title-footnote" # n = @xrefs.get[f["id"]] lbl = case elem["type"] when "source" then "Source" when "abbreviation" then "Abbreviations" else @i18n.note end prefix_name(elem, "", lbl, "name") end def admonition1(elem) return if elem["notag"] == "true" n = @xrefs.anchor(elem["id"], :label) or return lbl = l10n("#{@i18n.admonition} #{n}") prefix_name(elem, " — ", lbl, "name") end def annex1(elem) lbl = @xrefs.anchor(elem["id"], :label) if t = elem.at(ns("./title")) t.children = "<strong>#{t.children.to_xml}</strong>" end prefix_name(elem, "<br/>", lbl, "title") end include Init end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
metanorma-un-0.9.2 | lib/isodoc/un/presentation_xml_convert.rb |
metanorma-un-0.9.1 | lib/isodoc/un/presentation_xml_convert.rb |
metanorma-un-0.9.0 | lib/isodoc/un/presentation_xml_convert.rb |