For quick one-cell illustrations the full .ipynb embed is overkill.
The {% nb_cell %} block tag renders an inline
notebook-style cell, auto-numbered, with optional output.
Plain stdout
import numpy as np
print(np.array([1, 2, 3]).sum())6
Error / traceback
1 / 0Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: division by zero
Multiple outputs in one cell
Mix stdout, image, and HTML in the same cell — sentinels just stack:
import matplotlib.pyplot as plt
plt.plot([0, 1, 4, 9, 16, 25])
plt.show()
print("plotted squares")plotted squares

(The image sentinel takes a normal site path — drop your plot under
images/ or assets/ and point at it.)
Different language
ls _notes/ | wc -l4
No prompt gutter (clean code snippet)
Pass no_prompt to drop the In[n]: / Out[n]: labels — useful when
the prompt is visual noise:
def fuse(imu, lidar):
return kalman_update(imu, lidar)<kalman update result>
Reset counter
The In[n]/Out[n] counter auto-increments per page. To restart it (e.g., a new “session” within one note), drop:
{% nb_reset %}
Syntax reference
{% nb_cell <language>[, no_prompt] %}
<code>
---out
<plain text output>
---err
<error / stderr text>
---img <path>
---html
<raw html>
{% endnb_cell %}
Supported languages: python, bash, ruby, js, cpp, rust,
go, r, julia. Unknown → falls back to python.
Use the full {% jupyter_notebook %} embed when
you want a multi-cell .ipynb with real plots, dataframes, and LaTeX
outputs. Use nb_cell for a quick illustration that lives in the
note itself.