How do I continue list indentation in Pandoc Markd

2019-07-18 15:48发布

问题:

I am facing an issue with using Pandoc Markdown. I want my pdf document to look something like below (please notice how the indentation of the list items continue after adding images)

  1. Point a

    Image for point a here.

    Continuation of point a.

  2. Point b

    Image for point b here.

    Continuation of point b

However, no matter what I try, I can't get the indentation to look right. After inserting the image, either the indentation is lost (<4 spaces) or it starts showing as code block (>=4 spaces).

How do I indent a list item when I want to insert a figure in it?

Edit #1

Markdown that I am using:

a. Point a starts here.\
[image for point a](image1.png)\
Point a continued.

b. Point b starts here.\
[image for point b](image2.png)\

    i. sub point 1 in point b.
    ii. sub point 2 in point b

continue point b here.

How it looks:

Edit #2

Following @mb21's suggestions, (copying the format exactly + adding my images), I get the following output:

The continuation of points after the images is not indented correctly.

Updated markdown:

## Problem 1 ##

a. Point a starts here.

   ![Frequency of fires in a given year](wildfires.png){height=50px}

   Point a continued.

b. Point b starts here.

   ![Frequency of fires in a given year](wildfires.png){height=50px}

   i. sub point 1 in point b.
   ii. sub point 2 in point b

   continue point b here.

回答1:

The correct indentation for what you want is:

## Problem 1

a. Point a starts here.

   ![image for point a](http://cdn.northlight-images.co.uk/downloadable_2/media_check.jpg){width=5cm}

   Point a continued.

b. Point b starts here.

   ![image for point b](http://cdn.northlight-images.co.uk/downloadable_2/media_check.jpg){width=5cm}

   i. sub point 1 in point b.
   ii. sub point 2 in point b

   continue point b here.

See http://pandoc.org/MANUAL.html#block-content-in-list-items

The above results in: