Notebook Title
Authors: Author 1, Author 2, etc.
Keywords: [keywords that describe the content of the notebook, comma separated]
Methods
[Insert Methods Here]
Math and Equations
Equations can be included in your notebooks by either using $$
symbols to wrap the equation or by using the \begin{equation}
to start an equation/math block. Please see the examples below:
Example 1: Using $$
You can use LaTeX syntax for equations in your documents. For example, here is an example of a cross-product:
Example 2:
Using the $$
syntax, one can easily reference the equation too. For example here is the equation 1 with a label added that can be referenced:
Referencing and Cross-Referencing
Linking to equations
You can easily link to these equations using {eq}label
syntax. For example here is a link to example (2) equation.
Referencing figures
To reference a figure in your notebook, first add the figure with a name
. Next use the name to reference it.
🛠 Double click the next cell to see the MyST {figure}
syntax.
Check out how we referenced this figure: My bold mountain 🏔🚠.!!
Referencing Tables
To reference a table, first create a table and give it a name
.
Month |
Temperature (°C) |
---|---|
January |
5 |
February |
6 |
March |
10 |
April |
15 |
May |
20 |
June |
25 |
July |
30 |
August |
30 |
September |
25 |
October |
18 |
November |
10 |
December |
5 |
Now, you can reference this table My table title!!
See also
To see more examples on cross-referencing figures, please see this page.
Code Block Outputs
Jupyter Book will also embed your code blocks and output in your book. For example, here’s some sample Matplotlib code:
from matplotlib import rcParams, cycler
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
<contextlib.ExitStack at 0x10706d1f0>
# Fixing random state for reproducibility
np.random.seed(19680801)
N = 12 # 12 months
data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)]
data = np.array(data).T
monthly_medians = np.median(data, axis=0)
cmap = plt.cm.coolwarm
rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N)))
from matplotlib.lines import Line2D
custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4),
Line2D([0], [0], color=cmap(.5), lw=4),
Line2D([0], [0], color=cmap(1.), lw=4)]
fig, ax = plt.subplots(figsize=(10, 5))
lines = ax.plot(data)
ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']);
![../_images/notebook-template_8_0.png](../_images/notebook-template_8_0.png)
Note that the image above is captured and displayed in the published paper.