B.2 | Markup#

[1] Tags and Commands#

In addition to a subset of restructuredText markup, rivt provides its own set of tags and commands scoped to the API methods. They are summarized in the following sections.

Line Tags

A line tag formats a line of text and is denoted with a single _[LETTER], placed at or near the end of the line, depending on the tag.

Block Tags

A block tag formats a block of text and begins with _[[TAGNAME]] and terminates with _[[END]].

Assignment Tags

The exceptions are the definition (==:), assignment (<=:), function (:=:) and compare (<>) commands that are used to define, assign and compare values.

Commands

rivt commands read and write external files. They typically start in the first column with a vertical bar ( | ) followed by the command name, file path, and parameters.

| COMMAND | relative path | parameters

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

If the path is ommitted the default path for each command is applied. If the singledoc parameter is set, the resource files and docs are stored in the rivt root folder.

Tag and Command syntax for each API type is defined and described using the following format:

Markup Key

_[TAG] or | COMMAND |


Description

    Syntax:
        _[TAG] or | COMMAND | syntax

    Example:
        This is a sentence. _[C]


[1] rv.R Markup#

The Run API executes scripts commands.

Command

Description

_[[SHELL]] process parameters

[6] Shell script

_[[END]]

[8] End block

| SHELL | relative path | os, wait

[2] Shell file


[2] rv.I Markup#

The Insert API inserts and formats static sources into the doc, including images, tables, links and formatted text.

Tags / Commands

Description

text _[C]

[2] Bold center text

text _[#] text

[6] Endnote number

text _[G] text, term | text

[7] Glossary link

text _[S] text, section link | text

[8] Section link

text _[U] text, label | text

[9] URL link

text _[V] var_name | text

[10] Substitute value

text math _[M] description

[4] Text math

LaTeX math _[L] description

[5] LaTeX math

title _[T]

[11] Table number

_[[ENDNOTES]]

[2] Endnotes Block

_[[END]]

[8] End block

| IMAGE | file | scale, caption, num, time

[5] Image file

| IMAGE2 | file | s1, s2, c1, c2, fig1, fig2, num1, num2,

[6] Adjacent images

| TABLE | file | title, width, rows, align, head

[4] Table file


[3] rv.V Markup#

The Values API defines values and evaluates equations and functions.

Tags / Commands / Assignment

Description

_[[ENDNOTES]]

[2] Endnotes Block

_[[END]]

[8] End block

TABLE | file | title,width,rows,align,head,num

[4] Table file

IMAGE | file | scale, caption, figure

[5] Image file

IMAGE2 | file1, file2 | c1, c2, s1, s2, f1, f2

[6] Adjacent images

VALTABLE | file | title, width, rows

[7] Valtable file

a ==: 1*IN | unit1, unit2, decimal, num | label

[2] Define values | ==:

c <=: expression | unit1, unit2, decimal, num | label

[3] Assign expression values | <=:

c :=: expression | unit1, unit2, decimal | label, number

[9] Function

a < c | decimal | text1,text2,align, num

[5] Compare values | <=


[4] rv.T Text#

The Text API processes text and scripts. It does not use markup. The header substring takes an additional parameter that specifies the type of text or script. The header substring has the form:

rv.(T"""Section title | script_type, file: filename""")

script type

Description

PYTHON

run Python code

python

Python code

text

literal text

rst

reStructuredText

html

HTML markup

mermaid

Mermaid diagram (requires mermaid installation)

latex

LaTeX (requires LaTeX installation)


[5] rv.D Markup#

The Doc API publishes formatted docs from the rivt API strings.

Tags / Commands / Assignment

Description

_[[METADATA]] label

[7] Metadata

_[[END]]

[8] End block

| PDFATTACH | relative path | place, cover

[11] Attach PDF

| PUBLISH | doc title | type

[12] Publish doc