Conditional content in MyST¶
The MyST forms of the specimens on Conditional content, each rendered live by this page’s own Markdown parser.
Variant conditions¶
Variant conditions
```{if} var.stage == "review"
Shown while the `stage` is `review`.
```
```{if} var.stage == "published"
Left out until the `stage` is `published`.
```
Shown while the stage is review.
One branch of several¶
One branch of several
````{choose}
```{when} var.stage == "draft"
Drafting: nothing is reviewed yet.
```
```{when} var.stage == "review"
In review: this branch is the one taken.
```
```{otherwise}
Published.
```
````
In review: this branch is the one taken.
Raw output for one format¶
Raw HTML
```{raw} html
<p>Press <kbd>Ctrl</kbd> + <kbd>S</kbd> to save the page.</p>
```
Press Ctrl + S to save the page.