Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/use/execute.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ executed.
(execute/cache)=
## Cacheing the notebook execution

As mentioned above, you can **cache the results of executing a notebook page** by setting
As mentioned above, you can **cache the results of executing a notebook page** by setting

```
jupyter_execute_notebooks = "cache"
Expand Down
3 changes: 2 additions & 1 deletion myst_nb/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"text/latex",
"text/plain",
],
"latex": ["image/svg+xml", "image/png", "image/jpeg", "text/latex", "text/plain"],
# TODO: add support for "image/svg+xml"
"latex": ["application/pdf", "image/png", "image/jpeg", "text/latex", "text/plain"],
}
RENDER_PRIORITY["readthedocs"] = RENDER_PRIORITY["html"]
RENDER_PRIORITY["singlehtml"] = RENDER_PRIORITY["html"]
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def sphinx_run(sphinx_params, make_app, tempdir):
(srcdir / "conf.py").write_text(
"# conf overrides (passed directly to sphinx):\n"
+ "\n".join(
["# " + l for l in json.dumps(confoverrides, indent=2).splitlines()]
["# " + item for item in json.dumps(confoverrides, indent=2).splitlines()]
)
+ "\n"
)
Expand Down
863 changes: 51 additions & 812 deletions tests/notebooks/complex_outputs.ipynb

Large diffs are not rendered by default.

Binary file added tests/notebooks/example.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ def test_complex_outputs(sphinx_run, file_regression):
}
print(filenames)
assert filenames == {
"complex_outputs_17_0.svg",
"complex_outputs_17_0.png",
"complex_outputs.ipynb",
"complex_outputs_17_0.pdf",
"complex_outputs.py",
"complex_outputs_24_0.png",
"complex_outputs_13_0.jpg",
Expand Down
28 changes: 14 additions & 14 deletions tests/test_transform/test_complex_outputs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
plt.ylabel(r'a y label with latex $\alpha$')
plt.legend();
<CellOutputNode classes="cell_output">
<image candidates="{'*': '_build/jupyter_execute/complex_outputs_17_0.svg'}" uri="_build/jupyter_execute/complex_outputs_17_0.svg">
<image candidates="{'*': '_build/jupyter_execute/complex_outputs_17_0.png'}" uri="_build/jupyter_execute/complex_outputs_17_0.png">
<section ids="tables-with-pandas" names="tables\ (with\ pandas)">
<title>
Tables (with pandas)
Expand All @@ -141,18 +141,18 @@
<CellOutputNode classes="cell_output">
<raw classes="output text_html" format="html" xml:space="preserve">
<div>
<style>
.dataframe thead tr:only-child th {
text-align: right;
}

.dataframe thead th {
text-align: left;
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}

.dataframe tbody tr th {
vertical-align: top;
}

.dataframe thead th {
text-align: right;
}
</style>
<table border="1" class="dataframe">
<thead>
Expand All @@ -169,22 +169,22 @@
<th>0</th>
<td>$\delta$</td>
<td>l</td>
<td>0.583</td>
<td>0.279</td>
<td>0.391</td>
<td>0.607</td>
</tr>
<tr>
<th>1</th>
<td>x</td>
<td>m</td>
<td>0.914</td>
<td>0.021</td>
<td>0.132</td>
<td>0.205</td>
</tr>
<tr>
<th>2</th>
<td>y</td>
<td>n</td>
<td>0.333</td>
<td>0.116</td>
<td>0.969</td>
<td>0.726</td>
</tr>
</tbody>
</table>
Expand Down
8 changes: 4 additions & 4 deletions tests/test_transform/test_complex_outputs_latex.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
plt.ylabel(r'a y label with latex $\alpha$')
plt.legend();
<CellOutputNode classes="cell_output">
<image candidates="{'*': '_build/jupyter_execute/complex_outputs_17_0.svg'}" uri="_build/jupyter_execute/complex_outputs_17_0.svg">
<image candidates="{'*': '_build/jupyter_execute/complex_outputs_17_0.png'}" uri="_build/jupyter_execute/complex_outputs_17_0.png">
<section ids="tables-with-pandas" names="tables\ (with\ pandas)">
<title>
Tables (with pandas)
Expand All @@ -144,9 +144,9 @@
\toprule
{} & a & b & c & d \\
\midrule
0 & $\delta$ & l & 0.583 & 0.279 \\
1 & x & m & 0.914 & 0.021 \\
2 & y & n & 0.333 & 0.116 \\
0 & \$\textbackslash delta\$ & l & 0.391 & 0.607 \\
1 & x & m & 0.132 & 0.205 \\
2 & y & n & 0.969 & 0.726 \\
\bottomrule
\end{tabular}
<section ids="equations-with-ipython-or-sympy" names="equations\ (with\ ipython\ or\ sympy)">
Expand Down