Metanorma: Aequitate Verum

Text formatting

Metanorma supports extensive inline formatting functionality. The following formatting macros are available in Metanorma.

Basic markup


AsciiDoc allows you to:

  • Emphasize words in bold using asterisks

  • Italicise words with underscores

  • Apply monospace format using backticks

  • Specify superscript and subscript characters (CO2, x4)

Example 1. Example of basic inline markup

Renders as:

bold italic monospace superscript subscript



The strike command renders text with a middle line strikethrough.

The syntax is as follows:



  • text is the text to be rendered with the strikethrough style

Example 2. Illustration of strikethrough text in Metanorma.
[strike]#strike through text#


Illustration of strikethrough text

Small caps

The smallcap command renders text in small capital letters.

The syntax is as follows:



  • text is the text to be rendered in small caps

Example 3. Illustration of small caps text
[smallcap]#small caps text#


Illustration of small caps text in Metanorma


The underline command renders text with an underline. [added in].

The syntax is as follows:



  • text is the text to be underlined

Example 4. Illustration of underlined text
[underline]#underline text#


Illustration of underlined text in Metanorma


Ruby annotations in East Asian text are provided [added in] using the ruby:{annotation}[{base text}] macro.

The ruby command supports these optional parameters:

  • lang= for language of annotation

  • script= for script of annotation

  • type= for the type of annotation (pronunciation or annotation, with pronunciation as the default value).

ruby:とう[東] ruby:きょう[京]

Metanorma supports "double-sided" Ruby annotations, with annotations both above and below characters; these are marked up as nested Ruby annotation macros, with the deeper nested annotation assumed to be the annotation below the characters.

ruby:とう[ruby:tou[東\]] ruby:なん[ruby:nan[南\]] の方角

As of this writing, double-sided annotations are not supported in Word, and the nested annotations are realised as bracketed text.


Capitalisation may be applied automatically in the rendering of documents, despite not being present in the source material; for example, titles and captions may be title-cased or put in all caps. In order to prevent a span of text automatically having its case changed, use CSS styling to set its CSS text-transform property to "none" [added in]:

Example 5. Example of a word in a title not to be capitalised
:title: [css text-transform:none]#IoT# and content standards


=== Approaches to [css text-transform:none]#IoT#

As shown, such styling extends to document titles as document attributes.

Custom character sets

When a private use codepoint is used in a document, reflecting an agreement between the document author and the document renderer, but not a standard like Unicode, the custom character set that includes that codepoint needs to be flagged. So U+F8D0 is the Klingon letter for "a" in the Conscript Unicode Registry, but the Kanji-Katakana hybrid of 訁and コ (equivalent to 講) in the BabelStone PUA.

In order to flag such a custom interpretation of the codepoint, the interpretation can be named in a formatting directive, flagged as custom-charset [added in]. For example:


In order to be rendered, a font implementing that interpretation needs to be indicated as a processing hint for Metanorma. This is done with the Presentation XML metadata directive :presentation-metadata-custom-charset-font: {name of interpretation}:"{name of font}", as a document attribute, giving a comma-delimited list of charset-font pairs. For instance:

:presentation-metadata-custom-charset-font: conscript:"Code 2000",babelstone:"BabelStone PUA"
:fonts: "Code 2000","BabelStone PUA"

As with CSS declarations, any font specified as a custom charset font also needs to be passed to Metanorma in the :fonts: document attribute.

Numeric ranges

Numeric ranges, like dates (e.g., 1981–1995), make use of en dashes in between the numbers, usually without any white space around.

At the time writing, there is no AsciiDoc encoding to render en dashes.

In Metanorma, there is a vision of implementing a semantic encoding for numeric ranges, perhaps an option like range:[n,m] or shorthands like n..m.

For the time being, the existent workaround for such cases is the use of entity codes, more specifically:

Example 6. Examples of encoding numeric ranges
See chapters 15–17...

Issues 18–20 are in fact a single issue...

_Laser Physics_ *17* 1017–1024 (2007).


See chapters 15–17…​

Issues 18–20 are in fact a single issue…​

Laser Physics 17 1017–1024 (2007).

Character substitutions


Metanorma AsciiDoc also recognises HTML and XML character references, and decimal and hexadecimal Unicode code points.

Table 1. Supported Metanorma AsciiDoc character substitutions
Source Rendered as Note


© (Unicode 'Copyright Sign' U+00A9)


® (Unicode 'Registered Sign' U+00AE)


™ (Unicode 'Trade Mark Sign' U+2122)


— (Unicode 'Em Dash' U+2014)

See NOTE below.


  1. (Unicode 'Horizontal Ellipsis' U+2026)


→ (Unicode 'Rightwards Arrow' U+2192)


⇒ (Unicode 'Rightwards Double Arrow' U+21D2)


← (Unicode 'Leftwards Arrow' U+2190)


⇐ (Unicode 'Leftwards Double Arrow' U+21D0)


Smart single quote, smart apostrophe


Smart double quote

Replacement of - only occurs when placed between two word characters, between a word character and a line boundary, or flanked by spaces. Flanking spaces (as in x — y) are rendered as thin spaces (Unicode 'Thin Space' U+2009).



CSS declarations

The css command is used to wrap content with a CSS declaration (MDN) [added in].

This feature only applies to HTML output.

CSS declarations are also used within the HTML style attribute.

The syntax is as follows:

[css {css-directive}]#{styled-text}#


  • {css-directive} is a CSS declaration

  • {styled-text} is text where the CSS declaration is to be applied

Example 7. Example of applying a custom CSS declaration to content
[css font-family:"Noto Sans JP"]#お好み焼き#

[css font-family:"Noto Sans Canadian Aboriginal"]#ᓀᐦᐃᔭᐍᐏᐣ#
Any font specified in [css font-family:…​] needs to be passed to Metanorma for processing by specifying it in the :fonts: document attribute.


The identifier command, used to indicate that its contents are an identifier as semantic markup (and not to be processed as a hyperlink) [added in].

The syntax is as follows:



  • my-identifier is the identifier to be encoded.

This functionality is very useful for encoding URIs, which can be virtually indistinguishable from URLs that can be resolved. URIs very often cannot be resolved since they are simply namespaced identifiers.

Example 8. Example of rendering a URI using the identifier command



Example 9. Example of rendering a URN using the identifier command



Semantic spans

The span command is used to introduce semantic markup into Metanorma text [added in].

The syntax is as follows:



  • category is a semantic label for the content given as text

  • text is the textual content

Here, the text is tagged as belonging to category.

A semantically-tagged text with span is not normally rendered any different to normal, although the semantic markup introduced can be used to influence rendering.

Only certain Metanorma flavors support enhanced rendering for semantically-tagged content.

Nesting of styles

Character styles can be nested within each other, with both constrained and unconstrained formatting marks.

See Asciidoctor Text.