Skip to content

Commit b40f2aa

Browse files
authored
Merge pull request #2 from jupyter-book/sp/separate-dir-types
🗂️ separate pages for figures, embeds, xrefs
2 parents bc6509b + 2f55265 commit b40f2aa

File tree

5 files changed

+57
-16
lines changed

5 files changed

+57
-16
lines changed

content/embeds.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Embeds
2+
3+
MyST This supports embedding of notebook content and other files. The following are some examples using the embed directive.
4+
5+
## A Matplotlib Output
6+
7+
:::{embed} #fig-matplotlib
8+
:::
9+
10+
## A Plotly Figure
11+
12+
:::{embed} #fig-plotly-output
13+
:::
14+
15+
## A Bokeh Figure
16+
17+
:::{embed} #fig-bokeh
18+
:::

content/external.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# External content
2+
3+
MyST Supports cross-referencing into external content in order to create figures and embeds. External content could be in a different version of the AST and would need special handling.
4+
5+
6+
## An External Figure!
7+
8+
![](xref:guide#img:altair-horsepower)
9+
10+
11+
## An External Embed!
12+
13+
:::{embed} xref:guide#img:altair-horsepower
14+
:::

content/figures.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Figures
2+
3+
MyST supports using notebook outputs inside figures, This page contains some examples.
4+
5+
## A Matplotlib Figure
6+
7+
![](#fig-matplotlib)
8+
9+
## A Plotly Figure
10+
11+
:::{figure} #fig-plotly-output
12+
A plotly figure
13+
:::
14+
15+
## A Bokeh Figure
16+
17+
![](#fig-bokeh)
18+

content/index.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
11
# Plots
22

3-
MyST supports embedding plots from other pages and site! Here are some such plots, such as [](#fig-plotly-output) and [](#fig-bokeh-output). See them below!
3+
MyST supports embedding plots from other pages and site! Here are some such plots, such as [](#fig-plotly-output) and [](#fig-bokeh-output).
44

5-
## A Plotly Figure
5+
* [](./figures.md)
6+
* [](./embeds.md)
7+
* [](./external.md)
68

7-
:::{embed} #fig-plotly-output
8-
:::
9-
10-
## A Bokeh Figure
11-
12-
![](#fig-bokeh)
13-
14-
## A Matplotlib Figure
15-
16-
![](#fig-matplotlib)
17-
18-
## An External Figure!
19-
20-
![](xref:guide#img:altair-horsepower)

myst.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ project:
77
guide: https://mystmd.org/guide
88
toc:
99
- file: content/index.md
10+
- file: content/figures.md
11+
- file: content/embeds.md
12+
- file: content/external.md
1013
- file: content/bokeh.md
1114
- file: content/plotly.md
1215
- file: content/matplotlib.md

0 commit comments

Comments
 (0)