Gem Version Build Status Code Climate Pull Requests Commits since latest


This gem processes Metanorma documents following the Metanorma model for generating IEC standards.

The gem is basically the gem, with some tweaking of rendering to meet the particular requirements of the IEC.

It provides the following functions:

  1. Compiles Metanorma input into the Metanorma-IEC XML format (which is identical to Metanorma-ISO, since the two standards share the same document model)

  2. Validates XML output against the Metanorma-IEC document model

    • Errors are reported to console against the XML, and are intended for users to check that they have provided all necessary components of the document.

  3. Metanorma-IEC XML is then converted into desired output formats.

The following outputs are supported:

  • Primary: the canonical Metanorma-IEC XML representation (.xml).

  • Secondary: the Metanorma-IEC XML representation is processed to generate the following outputs as end deliverable IEC documents.

    • HTML (.html)

    • Word (.doc)


This gem inherits from the gem, and aligns closely to it.


Please see for instructions to get started.

If you are using a Mac, the repository has instructions on setting up your machine to run Metanorma scripts such as this one. You need only run the following in a Terminal console:

$ bash <(curl -s
$ gem install metanorma-cli
$ gem install metanorma-iec


Using the metanorma CLI:

$ metanorma --type iec a.adoc                   # output HTML
$ metanorma --type iec --extensions html a.adoc # output just HTML
$ metanorma --type iec --extensions xml a.adoc  # output Metanorma XML


Please refer to the Metanorma-ISO documentation for general documentation.