~bouncepaw/mycomarkup#19: 
Add support for ordered lists that start at a given number

I have a list that must start with 0, but mycomarkup insists that an ordered list starts with 1.

Other convenient uses: E.g., an ordered list with 10 items that are grouped into 3 groups with a heading-like markup inbetween.

= TODO

We have 10 urgent matters to resolve:

== Home
1. one task
2. another task
3. a third task

== Work
4. task 4
5. task 5

== Play
6. task 6
7. task 7
8. task 8
9. task 9
10. last task

I'm unsure how to markup this, but *.N, where N is the “base”, is a possibility.

Status
REPORTED
Submitter
~kas
Assigned to
No-one
Submitted
7 months ago
Updated
7 months ago
Labels
No labels applied.

~bouncepaw 7 months ago

This is good stuff! I had a use-case for it before, see how I handled it.

Picking the exact syntax is difficult, yeah. Maybe even writing it outright as N. is a good choice. Maybe something like this:

== Work
base{4}
*. task 4
*. task 5

Do you know how other markups solve this?

~kas 7 months ago

I like your base{4} thing, but what will I do if I actually want to write “base{4}” over an ordered list?

I think I've seen a markup (TiddlyWiki, perhaps?) where you can start an ordered list with the “base” you want to start with, and then the rest of the numbers don't matter. So, e.g.:

1. first
1. second
1. third

will give you

1. first
2. second
3. third

and

4. task 4
77. task 5

will give you

4. task 4
5. task 5

But that is a little confusing and not very intuitive. Better keep it simple and memorable.

~bouncepaw 7 months ago

what will I do if I actually want to write “base{4}” over an ordered list?

Just write \base{4}, similar to how you would write \img {...} if you wanted to avoid inserting images.

Markdown has some funny behaviour regarding list numbering, I don't like it.

LaTeX has something similar to base{}: https://tex.stackexchange.com/questions/142/how-can-i-make-an-enumerate-list-start-at-something-other-than-1

\begin{enumerate}
  \setcounter{enumi}{4}
  \item fifth element
\end{enumerate}

Maybe something like this?:

*.4 task 4
*. task 5

~kas 7 months ago

Yes, the format *.4 (*.N) was my initial suggestion. I could live with that. Another possibility is:

4. task 4
*. task 5

This may be more intuitive than *.4, but I have no idea how that affects the parser (or other markup I haven't thought of).

Register here or Log in to comment, or comment via email.