Metanorma: Aequitate Verum

Document attributes

The core metadata about a standard—who authored it, when it was published, etc.—comes from AsciiDoc document attributes. Document attributes are also used to adjust some aspects of document generation process and visual appearance of output documents.

Some of the attributes are simple flags, while other expect a value to be provided.

Supply meta attributes as part of document header:

Document header example
= Rice model (1)
Author (2)
:docnumber: 17301 (3)
:tc-docnumber: 17301
:partnumber: 1
:edition: 2
:copyright-year: 2016
:language: en
:docfile: iso-rice-en.adoc
:mn-document-class: iso
:mn-output-extensions: xml,html,doc,html_alt (4)
:local-cache-only: (5)
  1. Document title

  2. The author line is ignored by Metanorma, but needs to be present for Asciidoctor to process document attributes correctly.

  3. :docnumber: is the first document attribute, and it has the value 17301

  4. Some attributes allow multiple values, which usually must be comma-delimited

  5. :local-cache-only: demonstrates a kind of attribute that works without a value (the attribute itself is either present or not, Boolean style)

The order of attributes doesn’t matter to Metanorma.

Which attributes to specify?

The attributes required or allowed to be specified for given document depend on the type of document and the Metanorma flavor used.

See generic attribute reference for attributes supported by most Metanorma flavors. If you’re using one of the officially supported Metanorma flavors, consult your flavor’s author documentation as well.

Referencing attributes in the text

The body of the document can reference the values of document attributes. Here’s an example of referencing committee-related metadata entries:

This document was prepared by Technical Committee ISO/TC {technical-committee-number}, _{technical-committee}_, Subcommittee SC {subcommittee-number}, _{subcommittee}_.

If the corresponding document attributes are not populated in the header, then the references themselves will not be populated.

Dealing with HTML entities

Document attribute values, unlike document text, cannot deal with HTML entities. If you need to have non-ASCII characters in document title, or dashes for compound titles, you will need to enter them directly as Unicode.

As an example, this would work:

:title-part-en:Information Technology—Security
:title-main-fr: Spécification et méthodes d'essai

However, this wouldn’t:

:title-part-en:Information Technology\—Security
:title-main-fr: Sp\écification et m\éthodes d'essai