Cheatsheet¶
While monospace
is done using `monospace`
in MyST,
two ``
are needed in reST (docstrings), namely ``variable``
.
For detailed overview of MyST syntax, see the MyST documentation.
Cross-references¶
Cross-references to definitions, theorems or literature¶
|
|
|
|
|
|
|
[Lam70, Thm 5.6] |
|
|
|
|
|
|
|
|
[Lam70, Thm 5.6] |
|
Cross-references to classes or methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sample definition¶
:::{prf:definition} Sample definition
:label: def-sample
Here one can introduce a new _concept_.
Inline math can be used: $\omega\colon S_0 \rightarrow \RR^{d-1}$, and also display:
\begin{equation*}
\omega\colon S_0 \rightarrow \RR^{d-1}\,.
\end{equation*}
{{pyrigi_crossref}} {class}`~pyrigi.framework.Framework`
{meth}`~.Framework.graph`
{meth}`~.Framework.realization`
% list of related objects, methods,..., no separating commas
{{references}} {cite:p}`Lee2008`
% list of related references, no separating commas
:::
(Sample definition)
Here one can introduce a new concept. Inline math can be used: \(\omega\colon S_0 \rightarrow \RR^{d-1}\), and also display:
PyRigi
: Framework
graph()
realization()
References: [LS08]
Math¶
See above in the definition example or MyST documentation for more details.
In the definition environment , $$ ... $$
does not work so
\begin{equation*}
...
\end{equation*}
must used (or an alternative like align
).
The following latex
macros can be used
|
\(\RR\) |
real numbers |
|
\(\CC\) |
complex numbers |
|
\(\QQ\) |
rational numbers |
|
\(\ZZ\) |
integers |
|
\(\NN\) |
natural numbers (including 0) |
|
\(\PP\) |
projective space |
|
\(\KK\) |
a field |
New latex
commands can be created by modifying both latex_elements
and mathjax3_config
in doc/conf.py
.
Docstrings that use latex
must be raw strings, namely r""" ... """
.