chirun-ncl / chirun

A Python package providing the command line interface for building flexible and accessible content with Chirun.
https://chirun.org.uk/
Other
30 stars 4 forks source link

Markdown ordered list sub-items numbers, letters, etc. #258

Open prowlett opened 2 months ago

prowlett commented 2 months ago

This Markdown code:

1. First item

    1. First sub-item

        1. Now a sub-sub-item
        2. And another

    2. Second sub-item
    3. Third sub-item

2. Now item 2
3. And a third

Produces this:

image

I realise this is exactly what I asked it for, but for me there are too many item 1s (etc.) and I think there isn't a way to tell Markdown to do anything else for sub-items. Is there a way to get something like "a.", "b.", "c." for the sub-items?

For example, something like this doesn't work.

1. First item

    a. First sub-item

        i. Now a sub-sub-item
        ii. And another

    b. Second sub-item
    c. Third sub-item

2. Now item 2
3. And a third

Here's something that works by adding in HTML.

1. First item

    <ol type="a">
        <li>First sub-item
        <ol type="i">
            <li>Now a sub-sub-item</li>
            <li>And another</li>
        </ol>
        </li>
        <li>Second sub-item</li>
        <li>Third sub-item</li>
    </ol>

2. Now item 2
3. And a third

I think this is in the sphere of 'Markdown doesn't work like that'. However, I think I've thought about reporting this a couple of times and I thought having it in the issues (even as a closed one) for people to find might be useful. I think the problem of sub-items in, say, exercise lists is a common enough occurrence.