15. Markdown Examples
15.1. Linking
15.1.1. Hyperlinks
Here is a hyperlink with a title that re-directs to the URL “http://fsf.org”.
15.1.2. Referencing other sections of the documentation
Referencing parts of the documentation is always useful when something that has already been documented is required in another context. To create a link to a different part of the documentation, use referencing via
{ref}`label`
where label
refers to a labelled part of the documentation, either automatically created or set by hand.
The two methods are described in the following.
15.1.2.1. Automatic labelling
The automatic label for this sub-section is created as
developerguide/examples.html:automatic labelling
and can be used via
{ref}`developerguide/examples:automatic labelling`
which when used in text gives Automatic labelling and should point to this section. Note that duplicate labels must be prevented when using this method. Therefore, it is possible to set labels by hand.
15.1.2.2. Setting labels by hand
To set a label for a section, write the following code style directly in the line before the section is defined
(sec:my-own-label)=
and then reference this label in the text as
{ref}`sec:my-own-label`
which when used in text gives Setting labels by hand and should point to this section.
15.2. Code environment
Either use fenced style (tildes)
if (a > 3) {
moveShip(5 * gravity, DOWN);
}
or indented style (4 white spaces)
if (a > 3) {
moveShip(5 * gravity, DOWN);
}
Both works with pandoc and wordpress. Also see pandoc verbatim code.
15.3. Equations
(@gleichung1) $\(a=b*c\)$ As (@gleichung1) shows, blabla.
15.4. Bibtex, cite
Cications are stored in
./piclas/docs/documentation/references.bib
using bibtex format, e.g.,
@article{mathiaud2022bgk,
title = {An ES-BGK model for diatomic gases with correct relaxation rates for internal energies},
author = {Mathiaud, Julien and Mieussens, Luc and Pfeiffer, Marcel},
journal = {arXiv preprint arXiv:2202.10906},
year = {2022}
}
and is accessed via
{cite}`mathiaud2022bgk`
which results in [90] when used in text.
15.5. section references
15.6. Figures, caption

Fig. 15.1 This is an example caption.
See Fig. 15.1 for an image from the web embedded in this documentation.

Fig. 15.2 This is an example caption.
See Fig. 15.2 for embedding a local file.
15.7. tables
15.8. unnumbered section headings
just add
{-}
after the heading
15.9. Code blocks for various languages
int a = 32;
int a = 32;