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

{prf:ref}`def-framework`

Definition 2

{prf:ref}`Framework <def-framework>`

Framework

{cite:p}`Geiringer1927`

[PollaczekGeiringer27]

{cite:p}`Laman1970{Thm 5.6}`

[Lam70, Thm 5.6]

{cite:p}`Geiringer1927,Laman1970`

[Lam70, PollaczekGeiringer27]

:prf:ref:`def-framework`

Definition 2

:prf:ref:`Framework <def-framework>`

Framework

:cite:p:`Geiringer1927`

[PollaczekGeiringer27]

:cite:p:`Laman1970{Thm 5.6}`

[Lam70, Thm 5.6]

:cite:p:`Geiringer1927,Laman1970`

[Lam70, PollaczekGeiringer27]

Cross-references to classes or methods

{class}`~pyrigi.framework.Framework`

Framework

{class}`pyrigi.framework.Framework`

pyrigi.framework.Framework

{meth}`pyrigi.framework.Framework.delete_edge`

pyrigi.framework.Framework.delete_edge()

{meth}`~pyrigi.framework.Framework.delete_edge`

delete_edge()

{meth}`~.Framework.delete_edge`

delete_edge()

{meth}`.Framework.delete_edge`

Framework.delete_edge()

{func}`networkx.classes.function.degree`

networkx.classes.function.degree()

{doc}`networkx:reference/drawing`

Drawing

:class:`~pyrigi.framework.Framework`

Framework

:class:`pyrigi.framework.Framework`

pyrigi.framework.Framework

:meth:`pyrigi.framework.Framework.delete_edge`

pyrigi.framework.Framework.delete_edge()

:meth:`~pyrigi.framework.Framework.delete_edge`

delete_edge()

:meth:`~.Framework.delete_edge`

delete_edge()

:meth:`.Framework.delete_edge`

Framework.delete_edge()

:func:`networkx.classes.function.degree`

networkx.classes.function.degree()

:doc:`networkx:reference/drawing`

Drawing

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
:::

Definition 22 (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:

\[\begin{equation*} \omega\colon S_0 \rightarrow \RR^{d-1}\,. \end{equation*} \]

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

\(\RR\)

real numbers

\CC

\(\CC\)

complex numbers

\QQ

\(\QQ\)

rational numbers

\ZZ

\(\ZZ\)

integers

\NN

\(\NN\)

natural numbers (including 0)

\PP

\(\PP\)

projective space

\KK

\(\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""" ... """.