C.1 Markup#

<i>

[1] rivt String#


rivt markup is a readable, plain text language that generates formatted text, PDF or HTML docs from the same rivt file. The markup is included in a rivt string - a utf-8 text string argument of a API function.

The API function and header start in the first column (standard Python syntax), with subsequent lines indented 4 spaces for improved readability and section folding in IDEs.

rv._("""Section Label | print;hide, private;public, section;merge

    section text (utf-8 text)
    ...
    ...

    """)

The rivt string begins with a section header that includes a “section label” and parameters that define the section behavior.

<i>

[3] Section Text#


Section text is indented four spaces (for legibility and code folding) and includes tags for text formatting and commands for file operations.

rv._("""Section Label | write; nowrite, public; private

    section text
    ...

    """)

A section is processed line by line to a RestructuredText string, and then further processed to an HTML or PDF file. If a line does not contain a command or tag it is passed through as is. This allows for including restructured text directly, e.g. surrounding text with * for italics or ** for bold. Text docs are formatted separately.

<i>

[4] Tags and Commands#


Tags

A line tag formats a line of text and is denoted with _[TAG], usually at the end of the line.

A block tag formats a block of text that begins with _[[TAG]] and terminates with _[[Q]].

Commands

rivt commands read and write external files. They typically start in the first column with a vertical bar ( | ) followed by the file path, name and parameters. The exceptions to this pattern are the assignment (<= ) and definition (:=) commands, which are used to assign values to equation results and define variables.

| COMMAND | relative path | parameters

File paths are specified relative to the report folder or rivt file folder. The typical rivt report folder structure is described here.