Metanorma: Aequitate Verum

Semantic elements


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 1. Example of rendering a URI using the identifier command



Example 2. 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.

The semantic label is realised in Metanorma as a class attribute. That means that distinct rendering of spans can be specified by embedding custom CSS in the Metanorma document, with CSS classes matching the span:

== Metanorma-Extension

=== user-css

.green { background-color: green}


span:green[this text is highlighted as green]


The date command is used to introduce dates and date-times as semantic elements [added in]. The value of the date:[] macro is an ISO-8601 formatted date or date-time. The second argument given in the macro, if present, is a strftime formatting description of the date. (Space can be specified as %_.) Month and day names and abbreviations, if requested in the formatting string, are internationalised to the document language.

date[2012-02-02, %F]
date[2012-02-02, %A %d %B] # Thursday 2 February
date[2012-02-02T21:04:05, %F%_%l%_%p]