Sha256: 8ca98209b88a257d63c01d4486a18004b18ae1999409480d69680b87d7907716
Contents?: true
Size: 1.02 KB
Versions: 14
Compression:
Stored size: 1.02 KB
Contents
require "metanorma-generic" module IsoDoc module Ribose class Xref < IsoDoc::Generic::Xref def annex_name_lbl(clause, num) obl = l10n("(#{@labels['inform_annex']})") obl = l10n("(#{@labels['norm_annex']})") if clause["obligation"] == "normative" l10n("#{@labels['annex']} #{num}<br/>#{obl}") end def initial_anchor_names(d) preface_names(d.at(ns("//executivesummary"))) super sequential_asset_names( d.xpath(ns("//preface/abstract | //foreword | //introduction | "\ "//preface/clause | //acknowledgements | //executivesummary"))) end def section_names1(clause, num, level) @anchors[clause["id"]] = { label: num, level: level, xref: num } # subclauses are not prefixed with "Clause" clause.xpath(ns("./clause | ./terms | ./term | ./definitions | ./references")). each_with_index do |c, i| section_names1(c, "#{num}.#{i + 1}", level + 1) end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems