Skip to content
Metanorma
On this page

Cross-references

General

Cross-references are an integral part of standards. The main mechanism for references are anchors and destinations.

There are the following types of cross-references:

The following clauses will provide the basics on how cross-referencing works in Metanorma.

Internal references

General

To link to an important section, table, figure, formula, or list item in your document:

  1. Set an anchor using double square brackets before the content you want to reference: \[[anchor]].
    Example for an anchor preceding an imageadoc
    [[figureC-1]]
    .Typical gelatinization curve
    image::images/rice_image2.png[Image of the gelatinization curve]

    image::/assets/author/learn/referencesimganchor.jpg[]

  2. To reference an anchor, type the anchor name like this \<<anchor>>.
    <<figureC-1>> gives an example of a typical gelatinization curve.

    image::/assets/author/learn/referencesimgtarget.jpg[]

  3. To set an alternative text other than the anchor text, append the text inside the brackets using a comma.
    <<figureC-1, The diagram>> gives an example of a typical gelatinization curve.

Auto-numbering of references

Metanorma automatically numbers and names references; because they are auto-numbered, they will be renumbered automatically if you insert any new text of the same type.

Metanorma markup is serialized into XML, hence the anchor should follow the XML namespace conventions.

i.e., an anchor name name must not contain:

  • colons
  • whitespaces
  • words starting with numbers

If you want to learn more about the technical aspects of cross-references, read Deep-dive into cross-references.

Edit this page on GitHub →