You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contributing/documentation/myst-reference.md
+57-18
Original file line number
Diff line number
Diff line change
@@ -91,14 +91,24 @@ Use [Shimmer](http://example.com) for cleaner whiter teeth.
91
91
```
92
92
93
93
94
-
### Images and figures
94
+
(media-specifications)=
95
95
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
98
97
99
-
Use `image`for anything but diagrams.
98
+
This section describes the specifications for images, figures, videos, diagrams, and other media.
100
99
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.
102
112
103
113
104
114
(static-assets-label)=
@@ -115,20 +125,9 @@ Don't use file-relative paths.
115
125
Configuration in the {file}`conf.py` files for the main documentation and its submodules handle the resolution of `docs`-root-relative paths for you.
116
126
117
127
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)=
125
129
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
132
131
133
132
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.
134
133
@@ -168,6 +167,30 @@ The following MyST example will display as shown below.
168
167
````
169
168
170
169
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
+
171
194
#### Inline images
172
195
173
196
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.
232
255
````
233
256
`````
234
257
258
+
```{seealso}
259
+
{ref}`media-specifications`
260
+
```
261
+
235
262
236
263
### Video - remote
237
264
@@ -272,6 +299,10 @@ For an in depth discussion of privacy issues, see [How to embed YouTube videos w
272
299
- Vimeo's [supported player parameters](https://help.vimeo.com/hc/en-us/articles/12426260232977-About-Player-parameters#h_01FNYA7F7GKWE17XDQJPMBC058)
273
300
```
274
301
302
+
```{seealso}
303
+
{ref}`media-specifications`
304
+
```
305
+
275
306
276
307
### Diagrams and graphs with Mermaid
277
308
@@ -307,6 +338,10 @@ block-beta
307
338
```
308
339
````
309
340
341
+
```{seealso}
342
+
{ref}`media-specifications`
343
+
```
344
+
310
345
311
346
### Diagrams and graphs with Graphviz
312
347
@@ -328,6 +363,10 @@ The following MyST example will display as shown below.
0 commit comments