-
-
Notifications
You must be signed in to change notification settings - Fork 45
Documentation markup
rocky edited this page Sep 11, 2021
·
1 revision
There is a lot of special markup syntax you can use in the documentation. It is kind of a mixture of XML, LaTeX, Python doctest, and custom markup.
The following commands can be used to specify test cases.
Syntax | Explanation |
---|---|
>> $query$ |
a test query. |
: $message$ |
a message in the result of the test query. |
| $print$ |
a printed line in the result of the test query. |
= $result$ |
the actual result of the test query. |
. $newline$ |
a newline in the test result. |
$$identifier$$ |
a variable identifier in Mathics code or in text. |
#> $query$ |
a test query that is not shown in the documentation. |
X> |
a test query that is shown in the documentation but is not run. |
S> |
a test query that is shown in the documentation but is only run if the SANDBOX environment variable is not set. |
-Graphics- |
graphics in the test result. |
... |
a part of the test result which is not checked in the test, e.g., for randomized or system-dependent output. |
The following commands can be used to markup documentation text.
Syntax | Explanation |
---|---|
## $comment$ |
a comment line that is not shown in the documentation. |
<dl>$list$</dl> |
a definition list with <dt> and <dd> entries. |
<dt>$title$ |
the title of a description item. |
<dd>$description$ |
the description of a description item. |
<ul>$list$</ul> |
an unordered list with <li> entries. |
<ol>$list$</ol> |
an ordered list with <li> entries. |
<li>$item$ |
an item of an unordered or ordered list. |
'$code$' |
inline Mathics code or other code. |
<console>$text$</console> |
a console (shell/bash/Terminal) transcript in its own paragraph. |
<con>$text$</con> |
an inline console transcript. |
<em>$text$</em> |
emphasized (italic) text. |
<i>$text$</i> |
the same as <em> . |
<url>$url$</url> |
a URL. |
<img src="$src$" title="$title$" label="$label$"> |
an image. |
<imgpng src="$src$" title="$title$" label="$label$"> |
the same as img . |
<ref label="$label$"> |
a reference to an image. |
\skip |
a vertical skip. |
\LaTeX , \Mathematica , \Mathics
|
special product and company names. |
\' |
a single ' . |
To include images in the documentation, use the img
tag, place an EPS file $sc$.eps
in documentation/images
and run images.sh
in the doc
directory.