Sha256: f2a3a40f7505d4da797d342acea0f27130a20390d0ac494eb9a8646bb78f26c1
Contents?: true
Size: 1.08 KB
Versions: 8
Compression:
Stored size: 1.08 KB
Contents
require "isodoc" require "metanorma-generic" require_relative "base_convert" module IsoDoc module Bipm class PdfConvert < IsoDoc::Generic::PdfConvert def initialize(options) super @libdir = File.dirname(__FILE__) end def pdf_stylesheet(docxml) docxml&.at(ns("//bibdata/ext/editorialgroup/committee/@acronym")) &.value == "JCGM" and return "jcgm.standard.xsl" doctype = @doctype doctype = "brochure" unless %w(guide mise-en-pratique rapport) .include? doctype "bipm.#{doctype}.xsl" end def pdf_options(docxml, filename) n = configuration.document_namespace q = "//m:bipm-standard/m:bibdata/m:language[@current = 'true']" if docxml.root.name == "metanorma-collection" && docxml.at("#{q}[. = 'fr']", "m" => n) && docxml.at("#{q}[. = 'en']", "m" => n) return super.tap do |h| h["--split-by-language"] = nil end end super end include Init include BaseConvert end end end
Version data entries
8 entries across 8 versions & 1 rubygems