Metanorma: Aequitate Verum

Rendering a draft document

To render a draft that your peers should review, you need to add these metadata to the document header:

  • :draft:: Tells the compiler to display comments in the final output

  • :status: draft Defines the current document stage.
    NOTE: Some flavors, for example ISO, use :docstage: and a status code to indicate in what stage the document is.

To compile a Metanorma document you must enter the name of the application Metanorma and the document you want to compile document.adoc.

Metanorma document.adoc

With this command you trigger the Metanorma toolchain to:

  • Read the AsciiDoc input

  • Convert it into XML

  • Check the XML against the document model (XML schema)

  • Create HTML, PDF, and DOC output

Practice time

The code for this exercise is available on GitHub.

The corresponding file is named exercise-3-2.adoc

Let’s check out what happens when we compile exercise-3-2.adoc To compile our document:

  1. Open a new terminal

  2. Start Docker using Docker Desktop.

  3. Go to the directory where your Metanorma document(s) are stored. For example:

    $ cd Documents/Metanorma/metanorma-tutorial
  4. Start the container and compile the document. To learn more about the command syntax and options, read the metanorma-cli documentation.

    Note
    The fontist automatically installs all needed fonts. The --agree-to-terms option agrees to all font license agreements that come up during the compilation process. If you don’t set this option, you will be asked to agree to the licenses during the compilation process which might break it.
    Docker on Linux and macOS
    docker run -v "$(pwd)":/metanorma/ -w /metanorma metanorma/metanorma metanorma compile -t ogc exercises/exercise-3-2.adoc --agree-to-terms
    Docker on Windows
    docker run -v "%cd%":/metanorma/ -w /metanorma metanorma/metanorma metanorma compile -t ogc exercises/exercise-3-2.adoc --agree-to-terms
Hint Result
  1. Relaton fetches checks the cited standards if it can fetch some information automatically. .

Now that you are familiar with the simplest way of creating a Metanorma document, let’s look at different ways to compile documents in the next lesson.