blob: 4f7bf4064db7534074ec368f7afc281f4a89b1ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
Treat an image alone in its paragraph (but not a figure)
as an independent image:
```
% pandoc -f native -t rst
[ Para
[ Image
( "" , [ "align-center" ] , [] )
[ Str "https://pandoc.org/diagram.jpg" ]
( "https://pandoc.org/diagram.jpg" , "" )
]
]
^D
.. image:: https://pandoc.org/diagram.jpg
:alt: https://pandoc.org/diagram.jpg
:align: center
```
Here we just omit the center attribute as it's not valid:
```
% pandoc -f native -t rst
[ Para
[ Str "hi "
, Image
( "" , [ "align-center" ] , [] )
[ Str "https://pandoc.org/diagram.jpg" ]
( "https://pandoc.org/diagram.jpg" , "" )
]
]
^D
hi |https://pandoc.org/diagram.jpg|
.. |https://pandoc.org/diagram.jpg| image:: https://pandoc.org/diagram.jpg
```
But we can use top, middle, or bottom alignment:
```
% pandoc -f native -t rst
[ Para
[ Str "hi "
, Image
( "" , [ "align-top" ] , [] )
[ Str "https://pandoc.org/diagram.jpg" ]
( "https://pandoc.org/diagram.jpg" , "" )
]
]
^D
hi |https://pandoc.org/diagram.jpg|
.. |https://pandoc.org/diagram.jpg| image:: https://pandoc.org/diagram.jpg
:align: top
```
|