Skip to content

Latest commit

 

History

History
69 lines (52 loc) · 1.07 KB

File metadata and controls

69 lines (52 loc) · 1.07 KB
jupytext
cell_metadata_filter formats text_representation
-all
md:myst
extension format_name format_version jupytext_version
.md
myst
0.13
1.11.5
kernelspec
display_name language name
Python 3 (ipykernel)
python
python3

MyST Notebooks

sphinx-togglebutton is particularly useful with MyST-NB notebooks. This is used to show and hide code cell inputs and outputs.

Here is a demonstration of the functionality.

{toggle-all-button} usage

The code below generated the buttons that follow:

```{toggle-all-button}
```

```{toggle-all-button} cell-inputs
```

```{toggle-all-button} cell-outputs
```

Cell inputs

:tags: [hide-input]
for ii in range(20):
  print(f"Number: {ii}")

Cell outputs

:tags: [hide-output]
for ii in range(20):
  print(f"Number: {ii}")

Hide the whole cell

:tags: [hide-cell]
for ii in range(20):
  print(f"Number: {ii}")