Sha256: 957e94da32728c0ec9eaf12a32ad255c567489d1b3de690ad5a83d64bfeccb1d
Contents?: true
Size: 1.08 KB
Versions: 3
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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
metanorma-bipm-2.5.3 | lib/isodoc/bipm/pdf_convert.rb |
metanorma-bipm-2.5.2 | lib/isodoc/bipm/pdf_convert.rb |
metanorma-bipm-2.5.1 | lib/isodoc/bipm/pdf_convert.rb |