Document attributes

This is the list of document attributes supported by all flavors of Metanorma.

Tip

If you’re using one of the officially supported flavors of Metanorma, please also see flavor-specific guidance for any additional supported or required document attributes.

Build and validation

:nodoc:

Instructs Metanorma to not generate Word and HTML output, means only XML output will be generated.

:novalid:

Suppress document validation.

Reference lookup

For bibliographic lookup, see automatic reference lookup.

:no-isobib:

If set, do not use the relaton or iev gem functionality to look up ISO and IEV references online, nor the cache of relaton and iev searches.

Caches

For bibliographic caches, see lookup result caching.

:no-isobib-cache:

If set, use the relaton and iev gem functionality to look up ISO and IEV references online, but do not use the cache of relaton and iev searches.

:local-cache:

Use the local relaton and iev search caches to override the global relaton and iev search caches. If a directory name is given for the attribute, that name overrides relaton as the cache name.

:local-cache-only:

Use the local relaton and iev search caches to the exclusion of the global relaton and iev search caches. If a directory name is given for the attribute, that name overrides relaton as the cache name.

:flush-caches:

If set, delete and reinitialise the cache of relaton searches.

Math

:stem:

This attribute is required if you have any AsciiMath, MathML, or LaTeX included in the document; otherwise they will not be detected. If you want the STEM expressions in your document to be interpreted as LaTeX by default, use :stem: latexmath.

Read more about mathematical expressions.

Languages and localization

See also the Languages topic.

:i18nyaml:

Name of YAML language template file. Use if you wish to output an standard in a language that’s not supported out of the box. For more on how to customise localization, see Localization and How can I localize the resulting output?

:language:

Two-letter code (ISO 639-1) of the language the document is written in. Defaults to en.

:script:

The script of the document (ISO 15924). Defaults to Latn. Must be supplied as Hans for Simplified Chinese.

Document info

:publisher:

The standards agency publishing the standard; can be multiple (comma-delimited).

:docnumber:

The numeric component of the document identifier. The full identifier is formed by prefixing and suffixing this element with other strings derived from metadata.

:edition:

The document edition.

:revdate:

The date the document was last updated.

:library-ics:

The ICS (International Categorization for Standards) number for the standard. There may be more than one ICS for a document; if so, they should be comma-delimited. (The ICS identifier is added to the document metadata, but may not be visible in the resulting document, depending on Metanorma flavor.)

:title:

The title of the document. If not supplied, the built-in AsciiDoc title (first line of document header) is used instead.

:title-XX:

The title of the document in the language XX (where “XX” is a ISO 639-1 code; for example, :title-en:, :title-fr:).

:doctype:

The document type; e.g. "standard", "guide", "report".

:status:

The status of the document; e.g. "draft", "published". Synonym: :docstage:.

:docsubstage:

The substage code for the document status, where applicable.

:iteration:

The iteration of a stage, in case there have been multiple drafts (e.g. 2 on a CD: this is the second iteration through the CD stage).

:keywords:

Comma-delimited list of keywords associated with the document.

:draft:

The document draft. Used in addition to document stage. The value must provide the exact draft iteration in X.Y format (major version number and minor version number separated by a dot). If present, reviewer notes will be rendered (otherwise those are suppressed).

Document relations

General

These attributes takes a document identifier in the Relaton format:

  • If the document can be found via Relaton auto-fetch (e.g. a published IEC standard), the actual bibliographic item will be used.

  • Otherwise, a dummy bibliographic item with an empty title and the nominated document identifier will be used.

Multiple document identifiers can be delimited by ;. If the document cannot be auto-fetched, a title for each document nominated can be introduced, delimited from the document identifier by ,. For example, NIST SP 800-1,Title 1;NIST SP 800-2,Title 2.

Part of

part-of

document identifier that the current document is a part of.

This document attribute applies to a document part in order to point to the parent document.

Translated from

translated-from

document identifier that the current document is a translation of.

This document attribute applies to a translated document, pointing to the original (untranslated) document.

URIs

:uri:

The URI to which this standard is published.

:xml-uri:

The URI to which the (Metanorma) XML representation of this standard is published.

:html-uri:

The URI to which the HTML representation of this standard is published.

:pdf-uri:

The URI to which the PDF representation of this standard is published.

:doc-uri:

The URI to which the DOC representation of this standard is published.

:relaton-uri:

The URI to which the Relaton XML representation of this standard is published.

Timestamps

:copyright-year:

The year which will be claimed as when the copyright for the document was issued.

:issued-date:

The date on which the standard was issued (authorised for publication by the issuing authority).

:published-date:

The date on which the standard was published (distributed by the publisher).

:implemented-date:

The date on which the standard became active.

:created-date:

The date on which the first version of the standard was created.

:updated-date:

The date on which the current version of the standard was updated.

:obsoleted-date:

The date on which the standard was obsoleted/revoked.

:confirmed-date:

The date on which the standard was reviewed and approved by the issuing authority.

:unchanged-date:

The date on which the standard was last renewed without any changes in content.

:circulated-date:

The date on which the unpublished standard was last circulated officially as a preprint. For standards, this is associated with the latest transition to a formally defined preparation stage, such as Working Draft or Committee Draft.

:date:

An arbitrary date in the production of the standard. Content of the attribute should be a token, giving the type of date, then space, then the date itself. Multiple dates can be added as :date_2:, :date_3:, etc.

Author info

:technical-committee:

The name of the relevant technical committee.

:fullname{_i}:

The full name of a person who is a contributor to the document. A second person is indicated by using a numeric suffix: :fullname:, :fullname_2:, fullname_3:, &c. The same convention applies to all the following attributes. (This and the other personal name attributes are not displayed in all standards.)

:surname{_i}:

The surname of a person who is a contributor to the document.

:givenname{_i}:

The given name(s) of a person who is a contributor to the document.

:initials{_i}:

The initials(s) of a person who is a contributor to the document.

:role{_i}:

The role of a a person who is a contributor to the document. By default, they are coded as an editor; they can also be represented as an author.

:affiliation{_i}:

The organizational affiliation of a person who is a contributor to the document.

:address{_i}:

The organizational address of a person who is a contributor to the document.

:contributor-uri{_i}:

The URI of a person who is a contributor to the document.

:email{_i}:

The email of a person who is a contributor to the document.

Visual appearance

:body-font:

Font for body text; will be inserted into CSS, overriding the default set for the particular Metanorma flavour.

:header-font:

Font for headers; will be inserted into CSS, overriding the default set for the particular Metanorma flavour.

:monospace-font:

Font for monospace; will be inserted into CSS, overriding the default set for the particular Metanorma flavour.

:htmlstylesheet:

SCSS stylesheet to use for HTML output. Defaults to built-in template for the particular Metanorma flavour. Overriding is not recommended.

:htmlcoverpage:

HTML template for cover page. Defaults to built-in template for the particular Metanorma flavour. Overriding is not recommended.

:htmlintropage:

HTML template for introductory section. Defaults to built-in template for the particular Metanorma flavour. Overriding is not recommended.

:scripts:

Javascript scripts for HTML output. Defaults to built-in scripts for the particular Metanorma flavour. Overriding is not recommended.

:scripts-pdf:

Javascript scripts for HTML to PDF output. Defaults to built-in scripts for the particular Metanorma flavour. Overriding is not recommended.

:wordstylesheet:

Primary SCSS stylesheet to use for Word output. Defaults to built-in template for the particular Metanorma flavour. Overriding is not recommended.

:standardstylesheet:

Secondary SCSS stylesheet use for Word output. Defaults to built-in template for the particular Metanorma flavour. Overriding is not recommended.

:header:

Header and footer file for Word output. Defaults to built-in template the particular Metanorma flavour. Overriding is not recommended.

:wordcoverpage:

Word template for cover page. Defaults to built-in template for the particular Metanorma flavour. Overriding is not recommended.

:wordintropage:

Word template for introductory section. Defaults to built-in template for the particular Metanorma flavour. Overriding is not recommended.

:ulstyle:

Word CSS selector for unordered lists in supplied stylesheets. Defaults to value for built-in stylesheet. Overriding is not recommended.

:olstyle:

Word CSS selector for ordered lists in supplied stylesheets. Defaults to value for built-in stylesheet. Overriding is not recommended.

:data-uri-image:

Encode all images in HTML output as inline data-URIs. Defaults to true.

:smartquotes:

Apply “smartquotes” and other autoformatting to the XML output (and hence the downstream outputs) (default true). The rules for smart formatting follow the sterile gem, and are given in smart_format_rules.rb. If this attribute is set to false, the AsciiDoc default is used to generate smart quotes: "` `", '` `'.

:toclevels

Number of table of contents levels to render (default: 2).

:htmltoclevels

Number of table of contents levels to render in HTML/PDF output; used to override :toclevels: (default: 2).

:doctoclevels

Number of table of contents levels to render in DOC output; used to override :toclevels: (default: 2).

:imagesdir

Directory in which images are located: all local image file locations are prefixed with this directory. (Optional.)