Metanorma: Aequitate Verum

Document attributes

Metadata of a standard is entered as document attributes in Metanorma.

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 others expect a value to be provided.

Document attributes are supplied in the document header.

Document header example
= Rice model (1)
:docnumber: 17301 (2)
:tc-docnumber: 9999
:partnumber: 1
:edition: 2
:copyright-year: 2016
:language: en
:mn-document-class: iso
:mn-output-extensions: xml,html,doc,pdf (3)
:local-cache-only: (4)
  1. Title of the document.

  2. In Metanorma-ISO, the :docnumber: attribute specifies the document number, which is the value 17301 here.

  3. Some attributes allow multiple values, which is comma-delimited

  4. :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 does not 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.

When using one of the officially supported Metanorma flavors, please consult your flavor’s author documentation.

Re-using attributes in text

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

:technical-committee-number: 184
:technical-committee: Automation systems and integration
:subcommittee-number: 4
:subcommittee: Industrial data

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 Unicode characters

Document attribute values that contain Unicode characters must be entered directly as Unicode.

Any non-ASCII characters in document attribute values, or dashes for compound titles, will need to be entered as Unicode.

As an example, this would work:

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

Entering them as HTML Entities or XML Entities would not:

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