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()

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

Cross-references to pages

For creating a label on a page use (label)= before a section title. This label is used together with ref for internal references, see below.

For references to networkx we use doc instead provided by the setting intersphinx_mapping in conf.py. This is also available for references to python and sympy.

{ref}`installation-guide`

Installation Guide

{ref}`Link to Instalation Guide<installation-guide>`

Link to Instalation Guide

{doc}`networkx:reference/drawing`

Drawing

:ref:`installation-guide`

Installation Guide

:ref:`Link to Instalation Guide<installation-guide>`

Link to Instalation Guide

: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 49 (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""" ... """.