sym x
print("printed first")
factor(x^4 - 1)printed first
\[\left(x - 1\right) \left(x + 1\right) \left(x^{2} + 1\right)\]
A cell shows, in order, what it printed and what it displayed, and then — if its last statement is an expression — the value of that expression, as a notebook does. A trailing ; suppresses the value.
printed first
\[\left(x - 1\right) \left(x + 1\right) \left(x^{2} + 1\right)\]
A value with a LaTeX form is shown as display maths. That covers every ER2 type and every SymPy expression; other values are shown as text.
show() displays each of its arguments as maths, wherever it is called:
An inline expression in prose is evaluated where it appears. It is shown as text, or as inline maths when it is latex(…):
The derivative of \(\sin^3 x\) is \(3 \sin^{2}{\left(x \right)} \cos{\left(x \right)}\).
Every Matplotlib figure left open at the end of a cell is saved and shown, then closed: SVG for HTML, PDF for LaTeX and PDF output, PNG for everything else (fig-format overrides it). Matplotlib’s own return values, such as the list of lines plt.plot returns, are not shown.
Figure 1 is numbered and cross-referenced like any Quarto figure.
freeze: auto or freeze: true store results in _freeze/, and the paths stored there are relative, so the cache can be committed and replayed elsewhere. Quarto honours freeze only when a whole project is rendered; quarto render one-file.qmd always executes.