Skip to content

Commit 2389ca7

Browse files
committed
Move content under Media specifications heading for images, figures, video, and diagrams
1 parent 342f514 commit 2389ca7

File tree

1 file changed

+57
-18
lines changed

1 file changed

+57
-18
lines changed

docs/contributing/documentation/myst-reference.md

+57-18
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,24 @@ Use [Shimmer](http://example.com) for cleaner whiter teeth.
9191
```
9292

9393

94-
### Images and figures
94+
(media-specifications)=
9595

96-
[Figures](https://docutils.sourceforge.io/docs/ref/rst/directives.html#figure) allow a caption and legend, whereas [images](https://docutils.sourceforge.io/docs/ref/rst/directives.html#images) do not.
97-
However we can {ref}`enhance images with cards <enhance-images-label>` to add a caption and more features.
96+
### Media specifications
9897

99-
Use `image` for anything but diagrams.
98+
This section describes the specifications for images, figures, videos, diagrams, and other media.
10099

101-
Use `figure` for diagrams.
100+
101+
(width-of-media)=
102+
103+
#### Width of media
104+
105+
The main content area of a page in the documentation is 790 pixels wide.
106+
When taking screenshots or videos, resize your browser window, or try to limit the width of your media.
107+
This will preserve legibility of images and videos when displayed inline.
108+
109+
If you {ref}`enhance-images-label`, constrain the width of your media to 760 pixels, to accommodate the padding and margins from the enhancement.
110+
111+
If you don't enhance images, constrain the width of your media to 790 pixels.
102112

103113

104114
(static-assets-label)=
@@ -115,20 +125,9 @@ Don't use file-relative paths.
115125
Configuration in the {file}`conf.py` files for the main documentation and its submodules handle the resolution of `docs`-root-relative paths for you.
116126

117127

118-
#### Width of media
119-
120-
The main content area of a page in the documentation is 790 pixels wide.
121-
When taking screenshots or videos, resize your browser window, or try to limit the width of your media.
122-
This will preserve legibility of images and videos when displayed inline.
123-
124-
If you {ref}`enhance-images-label`, constrain the width of your media to 760 pixels, to accommodate the padding and margins from the enhancement.
128+
(enhance-media-label)=
125129

126-
If you don't enhance images, constrain the width of your media to 790 pixels.
127-
128-
129-
(enhance-images-label)=
130-
131-
#### Enhance images
130+
#### Enhance media
132131

133132
You can use cards from the Sphinx extension [`sphinx-design`](https://sphinx-design.readthedocs.io/en/latest/cards.html) to enhance the display and functionality of images.
134133

@@ -168,6 +167,30 @@ The following MyST example will display as shown below.
168167
````
169168

170169

170+
### Images and figures
171+
172+
[Figures](https://docutils.sourceforge.io/docs/ref/rst/directives.html#figure) allow a caption and legend, whereas [images](https://docutils.sourceforge.io/docs/ref/rst/directives.html#images) do not.
173+
However, we can {ref}`enhance images with cards <enhance-media-label>` to add a caption and more features.
174+
175+
Use `image` for anything but diagrams.
176+
177+
Use `figure` for diagrams.
178+
179+
```{seealso}
180+
{ref}`media-specifications`
181+
```
182+
183+
184+
#### Image example
185+
186+
The following is an example of an image that occupies the full width of the content area without {ref}`media enhancement <enhance-media-label>`.
187+
188+
````{example}
189+
```{image} /_static/caching/caching-disabled.png
190+
```
191+
````
192+
193+
171194
#### Inline images
172195

173196
For inline images, you can use the MyST extension [`html_image`](https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#html-images).
@@ -232,6 +255,10 @@ Example MyST syntax is shown below.
232255
````
233256
`````
234257

258+
```{seealso}
259+
{ref}`media-specifications`
260+
```
261+
235262

236263
### Video - remote
237264

@@ -272,6 +299,10 @@ For an in depth discussion of privacy issues, see [How to embed YouTube videos w
272299
- Vimeo's [supported player parameters](https://help.vimeo.com/hc/en-us/articles/12426260232977-About-Player-parameters#h_01FNYA7F7GKWE17XDQJPMBC058)
273300
```
274301

302+
```{seealso}
303+
{ref}`media-specifications`
304+
```
305+
275306

276307
### Diagrams and graphs with Mermaid
277308

@@ -307,6 +338,10 @@ block-beta
307338
```
308339
````
309340

341+
```{seealso}
342+
{ref}`media-specifications`
343+
```
344+
310345

311346
### Diagrams and graphs with Graphviz
312347

@@ -328,6 +363,10 @@ The following MyST example will display as shown below.
328363
```
329364
````
330365

366+
```{seealso}
367+
{ref}`media-specifications`
368+
```
369+
331370

332371
### Code block
333372

0 commit comments

Comments
 (0)