Sha256: 3d68dcd44778e6902876ccfc0ef5d6e4986bba5423d5d9fd5eb29b29eac30fdb

Contents?: true

Size: 1.46 KB

Versions: 17

Compression:

Stored size: 1.46 KB

Contents

= I can translate my specifications into IsoDoc XML myself (i.e. I don't like AsciiDoc, or I already have my own toolchain). Can I only use IsoDoc XML to produce pretty output?

[TIP]
====
* Generate correct IsoDoc XML (make sure it validates!)
* Create just the `IsoDoc::...::HtmlConvert` and/or `IsoDoc::...::WordConvert` classes to convert the IsoDoc XML into target formats.
* Initialise the IsoDoc class passing the necessary information about fonts and scripts; the existing gems all illustrate this kind of initialisation.
* Create the target format using the method `.convert(filename, xml)`.
====

The Asciidoctor-to-XML and XML-to-Output classes are separate, so you can invoke just the latter without the former. Of course, you will need to make sure that the IsoDoc XML you are passing to the generators is valid.

The `IsoDoc::...::HtmlConvert` and/or `IsoDoc::...::WordConvert` are initialised in the existing gems with a hash giving the fonts to be used in the document (to be injected in the document SCSS stylesheets), the script of the document (to be used to pick the right font, in case of default font settings), and the `i18nyaml` YAML file for localisation. All existing gems have defaults set for these values on the Asciidoctor side invoking the class, so all parameters are optional.

Once you have the classes set up, all you need to do is invoke the conversion of XML to the target format, with the method `.convert(filename, xml)`, where XML is the IsoDoc XML.

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
metanorma-iso-1.2.4 docs/replacing-asciidoc.adoc
metanorma-iso-1.2.3 docs/replacing-asciidoc.adoc
metanorma-iso-1.2.2 docs/replacing-asciidoc.adoc
metanorma-iso-1.2.1 docs/replacing-asciidoc.adoc
metanorma-iso-1.2.0 docs/replacing-asciidoc.adoc
metanorma-iso-1.1.5 docs/replacing-asciidoc.adoc
metanorma-iso-1.1.4 docs/replacing-asciidoc.adoc
metanorma-iso-1.1.3 docs/replacing-asciidoc.adoc
metanorma-iso-1.1.2 docs/replacing-asciidoc.adoc
metanorma-iso-1.1.1 docs/replacing-asciidoc.adoc
metanorma-iso-1.1.0 docs/replacing-asciidoc.adoc
metanorma-iso-1.0.14 docs/replacing-asciidoc.adoc
metanorma-iso-1.0.13 docs/replacing-asciidoc.adoc
metanorma-iso-1.0.12 docs/replacing-asciidoc.adoc
metanorma-iso-1.0.11 docs/replacing-asciidoc.adoc
metanorma-iso-1.0.10 docs/replacing-asciidoc.adoc
metanorma-iso-1.0.9 docs/replacing-asciidoc.adoc