fmv1992
fmv1992

Reputation: 322

How to put images with captions inside bulleted lists in pandoc

I'm trying to write a pandoc markdown text with an image inside a bulleted list that also shows captions. That is:

* Item 1.
* Item 2.
![This is my caption](image.png "I tried using this as caption too")
Item 2 text is supposed to continue here (thus same indenting).
* Item 3.

But the caption doesn't show up.

If I place a figure in its own paragraph the label shows but the indenting/continuation is messed up.

* Item 1.
* Item 2.

![This is my caption](image.png "I tried using this as caption too")

Item 2 text does not continue with the same indenting/continuation : (
* Item 3.

My final conversion is a HTML file.

Upvotes: 2

Views: 2453

Answers (1)

Waylan
Waylan

Reputation: 42567

Paragraphs (and other block level elements) are nested in a list item with indentation. You need to indent the elements one level and wrap with blank lines:

* Item 1.
* Item 2.

    ![This is a caption](image.png "This is a title")

    Item 2 text must continue with the same indenting.

* Item 3.

Upvotes: 5

Related Questions