Skip to content

Commit 1dcb984

Browse files
committed
Clean up implicit_figure documentation.
Explain how to specify alt text. See #11082.
1 parent 66cbd24 commit 1dcb984

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

MANUAL.txt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5712,29 +5712,37 @@ The link text will be used as the image's alt text:
57125712

57135713
An image with nonempty alt text, occurring by itself in a
57145714
paragraph, will be rendered as a figure with a caption. The
5715-
image's alt text will be used as the caption.
5715+
image's description will be used as the caption.
57165716

5717-
![This is the caption](/url/of/image.png)
5717+
![This is the caption.](image.png)
57185718

57195719
How this is rendered depends on the output format. Some output
57205720
formats (e.g. RTF) do not yet support figures. In those
57215721
formats, you'll just get an image in a paragraph by itself, with
5722-
no caption. For LaTeX output, you can specify a [figure's
5723-
positioning](https://www.overleaf.com/learn/latex/Positioning_images_and_tables#The_figure_environment)
5724-
by adding the `latex-placement` attribute.
5725-
5726-
![This is the caption](/url/of/image.png){latex-placement="ht"}
5722+
no caption.
57275723

57285724
If you just want a regular inline image, just make sure it is not
57295725
the only thing in the paragraph. One way to do this is to insert a
57305726
nonbreaking space after the image:
57315727

5732-
![This image won't be a figure](/url/of/image.png)\
5728+
![This image won't be a figure](image.png)\
57335729

57345730
Note that in reveal.js slide shows, an image in a paragraph
57355731
by itself that has the `r-stretch` class will fill the screen,
57365732
and the caption and figure tags will be omitted.
57375733

5734+
To specify an alt text for the image that is different
5735+
from the caption, you can use an explicit attribute (assuming the
5736+
`link_attributes` extension is set):
5737+
5738+
![The caption.](image.png){alt="description of image"}
5739+
5740+
For LaTeX output, you can specify a [figure's
5741+
positioning](https://www.overleaf.com/learn/latex/Positioning_images_and_tables#The_figure_environment)
5742+
by adding the `latex-placement` attribute.
5743+
5744+
![The caption.](image.png){latex-placement="ht"}
5745+
57385746
### Extension: `link_attributes` ###
57395747

57405748
Attributes can be set on links and images:

0 commit comments

Comments
 (0)