Skip to content

Commit

Permalink
🔧 MAINTAIN: Moving admonition section (jupyter-book#934)
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf committed Sep 3, 2020
1 parent 51b7ef1 commit 6e0397e
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions docs/content/content-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,35 @@ Admonition dropdowns require JavaScript to be enabled on the browser which they
By contrast, the [dropdown directive](content/panels) below works purely *via* HTML+CSS.
:::

### Insert code cell outputs into admonitions

If you'd like to insert the outputs of running code *inside* admonition
blocks, we recommend using [Glue functionality](content:code-outputs:glue).
For example, we'll insert one of the outputs that was glued into the book from the [code outputs page](./code-outputs.md).

The below code:

````md
```{note}
Here's my figure:
{glue:figure}`sorted_means_fig`
```
````
generates:
```{note}
Here's my figure:
{glue:}`sorted_means_fig`
```
See [](content:code-outputs:glue) for more information on how to use Glue to insert your outputs directly into your content.
:::{tip}
To hide code input and output that generated the variable you are inserting, use the `remove_cell` tag.
See [](../interactive/hiding.md) for more information and other tag options.
:::
(content/panels)=
## Panels and Dropdowns
Expand Down Expand Up @@ -326,35 +355,6 @@ Term 3
<img src="../images/fun-fish.png" alt="fishy" width="200px">
```

### Insert code cell outputs into admonitions

If you'd like to insert the outputs of running code *inside* admonition
blocks, we recommend using [Glue functionality](content:code-outputs:glue).
For example, we'll insert one of the outputs that was glued into the book from the [code outputs page](./code-outputs.md).

The below code:

````md
```{note}
Here's my figure:
{glue:figure}`sorted_means_fig`
```
````
generates:
```{note}
Here's my figure:
{glue:}`sorted_means_fig`
```
See [](content:code-outputs:glue) for more information on how to use Glue to insert your outputs directly into your content.
:::{tip}
To hide code input and output that generated the variable you are inserting, use the `remove_cell` tag.
See [](../interactive/hiding.md) for more information and other tag options.
:::
## Quotations and epigraphs

Quotations and epigraphs provide ways to highlight information given by others.
Expand Down

0 comments on commit 6e0397e

Please sign in to comment.