mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-02 05:35:38 +00:00
Also, when falling back to a Div with class `figure` for a figure that can't be represented any other way, include a Div with class `caption` containing the caption. Closes #10755.
72 lines
1.3 KiB
Markdown
72 lines
1.3 KiB
Markdown
```
|
|
% pandoc -f native -t markdown
|
|
[ Figure
|
|
( "" , [] , [] )
|
|
(Caption
|
|
Nothing [ Para [ Str "An" , Space , Str "image." ] ])
|
|
[ Plain
|
|
[ Image
|
|
( ""
|
|
, []
|
|
, []
|
|
)
|
|
[ Str "An" , Space , Str "image." ]
|
|
( "media/rId20.jpg" , "" )
|
|
]
|
|
]
|
|
]
|
|
^D
|
|

|
|
```
|
|
|
|
```
|
|
% pandoc -f native -t markdown -t markdown-implicit_figures
|
|
[ Figure
|
|
( "" , [] , [] )
|
|
(Caption
|
|
Nothing [ Para [ Str "An" , Space , Str "image." ] ])
|
|
[ Plain
|
|
[ Image
|
|
( ""
|
|
, []
|
|
, []
|
|
)
|
|
[ Str "An" , Space , Str "image." ]
|
|
( "media/rId20.jpg" , "" )
|
|
]
|
|
]
|
|
]
|
|
^D
|
|
<figure>
|
|
<img src="media/rId20.jpg" alt="An image." />
|
|
<figcaption aria-hidden="true"><p>An image.</p></figcaption>
|
|
</figure>
|
|
```
|
|
|
|
```
|
|
% pandoc -f native -t markdown -t markdown-implicit_figures-raw_html
|
|
[ Figure
|
|
( "" , [] , [] )
|
|
(Caption
|
|
Nothing [ Para [ Str "An" , Space , Str "image." ] ])
|
|
[ Plain
|
|
[ Image
|
|
( ""
|
|
, []
|
|
, []
|
|
)
|
|
[ Str "An" , Space , Str "image." ]
|
|
( "media/rId20.jpg" , "" )
|
|
]
|
|
]
|
|
]
|
|
^D
|
|
:::: figure
|
|

|
|
|
|
::: caption
|
|
An image.
|
|
:::
|
|
::::
|
|
```
|