Documenting with Markdown#
Citations#
{cite}`Seigel1959` did something great
[Seigel, 1959] did something great
Evaluate code#
import pygimli as pg
mesh = pg.createGrid(20,5)
data = pg.x(mesh)
pg.show(mesh, data)
(<Axes: xlabel='$x$ in m', ylabel='$y$ in m'>,
<matplotlib.colorbar.Colorbar at 0x1460a825db50>)
Some Markdown features#
Math#
Since Pythagoras, we know that $a^2 + b^2 = c^2$
$$
(a + b)^2 = (a + b)(a + b) \\
= a^2 + 2ab + b^2
$$ (mymath2)
The equation {eq}"mymath2" is also a quadratic equation.
Since Pythagoras, we know that \(a^2 + b^2 = c^2\)
(1)#\[\begin{split}
(a + b)^2 = (a + b)(a + b) \\
= a^2 + 2ab + b^2
\end{split}\]
The equation {eq}“mymath2” is also a quadratic equation.
Custom latex macros#
Some custom latex macros inspired by physics latex package:
Macro |
Output |
|---|---|
|
\(\order{h^{2}}\) |
|
\(\vb{v}\) |
|
\(\grad{u}\) |
|
\(\div{\vb{v}}\) |
|
\(\curl{\vb{v}}\) |
|
\(\laplacian{u}\) |
|
\(\sin(x)\) |
|
\(\dd x\) |
Some text-like stuff!
:::{admonition} Here's my title
:class: tip
Here's my admonition content.
:::
Here’s my title
Here’s my admonition content.
Tables#
:::{table} Table caption
:widths: auto
:align: center
| foo | bar |
| --- | --- |
| baz | bim |
:::
foo |
bar |
|---|---|
baz |
bim |
Typography#
**strong**, _emphasis_, `literal text`, \*escaped symbols\*
strong, emphasis, literal text, *escaped symbols*
Footnotes#
A longer footnote definition.[^mylongdef]
[^mylongdef]: This is the _**footnote definition**_.
That continues for all indented lines
- even other block elements
Plus any preceding unindented lines,
that are not separated by a blank line
This is not part of the footnote.
A longer footnote definition.[1]
This is not part of the footnote.
Cards#
:::{card} Card Title
Header
^^^
Card content
+++
Footer
:::
Header
Card Title
Card content
Tabs#
::::{tab-set}
:::{tab-item} Label1
Content 1
:::
:::{tab-item} Label2
Content 2
:::
::::
Content 1
Content 2