Sha256: 2182b029e6888dcae6ffa50942f3f5118cf07711dd808eae8fb8f3f40e626334
Contents?: true
Size: 1.81 KB
Versions: 8
Compression:
Stored size: 1.81 KB
Contents
require "metanorma/processor" module Metanorma module Iso class Processor < Metanorma::Processor def initialize @short = :iso @input_format = :asciidoc @asciidoctor_backend = :iso end def output_formats super.merge( html: "html", html_alt: "alt.html", doc: "doc", pdf: "pdf", sts: "sts.xml", isosts: "iso.sts.xml" ) end def version "Metanorma::ISO #{Metanorma::ISO::VERSION}" end def fonts_manifest { "Cambria" => nil, "Cambria Math" => nil, "Times New Roman" => nil, "Source Han Sans" => nil, "Courier" => nil, "Courier New" => nil, } end def use_presentation_xml(ext) return true if ext == :html_alt super end def output(isodoc_node, inname, outname, format, options={}) case format when :html IsoDoc::Iso::HtmlConvert.new(options).convert(inname, isodoc_node, nil, outname) when :html_alt IsoDoc::Iso::HtmlConvert.new(options.merge(alt: true)).convert(inname, isodoc_node, nil, outname) when :doc IsoDoc::Iso::WordConvert.new(options).convert(inname, isodoc_node, nil, outname) when :pdf IsoDoc::Iso::PdfConvert.new(options).convert(inname, isodoc_node, nil, outname) when :sts IsoDoc::Iso::StsConvert.new(options).convert(inname, isodoc_node, nil, outname) when :isosts IsoDoc::Iso::IsoStsConvert.new(options).convert(inname, isodoc_node, nil, outname) when :presentation IsoDoc::Iso::PresentationXMLConvert.new(options).convert(inname, isodoc_node, nil, outname) else super end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems