Skip to content

Commit 60bea0c

Browse files
committed
testing multiple
1 parent 6bd357e commit 60bea0c

File tree

6 files changed

+86
-2
lines changed

6 files changed

+86
-2
lines changed

content/embeds.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,15 @@ MyST This supports embedding of notebook content and other files. The following
3333
## Embed some markdown generated in an output
3434

3535
![](#out-jupyter-markdown)
36+
37+
## Embed some ipywidgets
38+
39+
![](#out-lorenz)
40+
41+
## Embed some ipywidgets (precomputed outputs, ipynb)
42+
43+
![](#out-lorenz-2)
44+
45+
## Embed a cell with multiple outputs
46+
47+
![](#out-multiple)

content/figures-w-placeholders.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,12 @@ An ipywidgets figure with a placeholder
4545
:label: fig-lorenz-2-pl
4646
:placeholder: ./placeholder.jpg
4747
An ipywidgets figure with a placeholder
48+
:::
49+
50+
## A cell with multiple outputs
51+
52+
:::{figure} #out-multiple
53+
:label: fig-multiple-pl
54+
:placeholder: ./placeholder.jpg
55+
A notebook cell with mulitple outputs of differing mimetypes and a placeholder
4856
:::

content/figures.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,10 @@ An ipywidgets figure
3939
:label: fig-lorenz-2
4040
An ipywidgets figure
4141
:::
42+
43+
## A cell with multiple outputs
44+
45+
:::{figure} #out-multiple
46+
:label: fig-multiple
47+
A notebook cell with mulitple outputs of differeing mimetypes
48+
:::

content/multiple.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Mulitple Outputs from a Single Cell
3+
short_title: Multiple
4+
kernelspec:
5+
name: python3
6+
display_name: Python 3
7+
---
8+
9+
* Matplotlib
10+
* Text
11+
* Markdown
12+
* Image
13+
* HTML
14+
15+
16+
```{code-cell} python3
17+
:label: out-multiple
18+
import matplotlib.pyplot as plt
19+
import numpy as np
20+
from IPython.display import display, TextDisplayObject, Image, HTML, Markdown
21+
22+
img = np.random.random((5,5))
23+
24+
plt.figure(figsize=(3, 3))
25+
plt.xticks([])
26+
plt.yticks([])
27+
plt.imshow(img)
28+
plt.show()
29+
30+
display("Displaying some plain text above the rabbit")
31+
32+
display(Image("./placeholder.jpg"))
33+
34+
display(Markdown("""
35+
# This is Markdown
36+
37+
Albeit a pretty short example of:
38+
39+
* text
40+
* headings
41+
* a list
42+
"""))
43+
44+
display(HTML("""
45+
<div>
46+
<h1>This is HTML</h1>
47+
<p>A <strong>strong</strong> paragraph!</p.
48+
</div>
49+
"""))
50+
51+
```
52+

content/xrefs.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@ short_title: CrossReferencing
88
* [](#fig-bokeh-1)
99
* [](#fig-lorenz-1)
1010
* [](#fig-lorenz-2)
11+
* [](#fig-multiple)
1112
* [Figure %s with Placeholder](#fig-matplotlib-pl)
1213
* [Figure %s with Placeholder](#fig-plotly-pl)
1314
* [Figure %s with Placeholder](#fig-bokeh-pl)
1415
* [Figure %s with Placeholder](#fig-lorenz-pl)
1516
* [Figure %s with Placeholder](#fig-lorenz-2-pl)
17+
* [Figure %s with Placeholder](#fig-multiple-pl)
1618
* [Notebook Output (Matplotlib)](#out-matplotlib)
1719
* [Notebook Output (Plotly)](#out-plotly)
1820
* [Notebook Output (Bokeh)](#out-bokeh)
1921
* [Notebook Output (EQN)](#eqn-sympy)
2022
* [Notebook Output (EQN MLP)](#eqn-mlp)
2123
* [Notebook Output (EQN Manual)](#eqn-manual)
2224
* [Notebook Output (Markdown)](#out-jupyter-markdown)
25+
* [Notebook Output (Multiple)](#out-multiple)
26+

myst.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ project:
1919
- file: content/latex.md
2020
- title: Plots
2121
children:
22+
- file: content/multiple.md
2223
- file: content/bokeh.md
2324
- file: content/plotly.md
2425
- file: content/matplotlib.md
2526
- file: content/widgets.md
2627
- file: content/widgets.ipynb
2728
jupyter:
2829
server:
29-
url: http://localhost:8890
30-
token: steve-test
30+
url: http://localhost:8888
31+
token: my-local-token
3132
site:
3233
template: book-theme
3334
options:

0 commit comments

Comments
 (0)