3

I have just tried to write an answer that involved writing a couple of ordered lists that reset to "1" for each list (lists of steps to carry out).

However, I couldn't help but notice that whenever I added a new list item (as that's all that's available on the markdown editor) to start a new set of steps (i.e. begin from list item 1 again) that all the steps would begin counting from the original list (e.g. if section 1 had 3 steps then the new section would start from step 4).

I cannot find any control of where to start or stop a list (to break the numbering, one might say). Nor can I find a HTML editor button (to close the preceding OL or UL).

Is there such a control and I've completely missed it?

2

There's no need to use HTML to create the lists. Providing there is a break between the lists, you can restart numbering using standard Markdown.

I use an empty HTML comment as a break: <!-- -->

  1. First
  2. Second
  1. First again
  2. Second again
1. First
2. Second

<!-- -->

1. First again
2. Second again

This also works with paragraph lists:

  1. First

  2. Second

  1. First again

  2. Second again

1. First

2. Second

<!-- -->

1. First again

2. Second again
  • This is very embarrassing... I've just gone to answer another question and the list buttons worked as expected... if I added a new line of text (as a header, for example) the new list item button started from 1... quite odd! Thank you so much for the answer, though... – Kinnectus Aug 24 '15 at 9:14
  • By the way, you did use HTML in your example; that comment tag in the middle is what I was saying at the end of my answer: you need a break in the middle. – Daniel Aug 24 '15 at 12:13
  • @Dopapp I said there's no need to "use HTML to create the lists". The lists themselves can be standard Markdown, without resorting to writing the HTML yourself. Apologies if that was unclear. – grg Aug 24 '15 at 12:14
1

I say this in advance: this part of my question is more fitting for SO but it does answer the question.

As you probably know, you can embed some simple HTML in your questions. You can use <a href=[URL]></a> tags, for links, <b></b> for bold text, and a good number of other tags. Two of these tags are the <ol></ol> and <li></li> tags as, from what I understand from your question, you already know about.

Here is an example of what you can do using HTML:

HTML:

<ol>
    <li>Thing 1</li>
    <li>Thing 2</li>
    <li>Thing 3</li>
</ol>

<!-- By closing the list using </ol>, you are ending the ordered list. It does not go past the end tag. BTW, this is a comment tag -->

<ol>
    <li>Thing 1 again</li>
    <li>Thing 2 again</li>
    <li>Thing 3 again</li>
</ol>

Output:

First part of ordered list:

  1. Thing 1
  2. Thing 2
  3. Thing 3

Second part of ordered list:

  1. Thing 1 again
  2. Thing 2 again
  3. Thing 3 again

If I understand your question correctly, then This should be what you're looking for.

Alternatively, you can do this:

  1. Thing 1.1
  2. Thing 2.1

Necessary break.

  1. Thing 1.2
  2. Thing 2.2

A break can also be the separation using the end of a block/this line or text is not a necessary line break.

  1. Item
  2. Item 2

If you have any issues with any of this or if this is not what you're looking for just tell me in the comments and I'll fix it accordingly.

I hope this helps!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .