Page MenuHomePhabricator

Allow users to set a starting digit in ordered lists
Open, LowPublic

Description

Author: apm

Description:
This bug is critical for my usage because I am trying to give a list of steps
interspersed with commands and images. I cannot use <ol> and <li> because they
collapse stuff onto one line and the "#" command assumes that if you skip a line
you want to start a new list. What I require is some sort of tags to denote a
whole list so that the # doesn't restart at 1 if I skip a line.

e.g.
<list>

  1. blah foo bar
  2. baz qux

</list>

Details

Reference
bz4281

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:01 PM
bzimport set Reference to bz4281.
bzimport added a subscriber: Unknown Object (MLST).

stanley wrote:

Maybe we should ask the developer to make enhancement, so that numbered list can
be started from any given number.

for example:

  1. #

will result:

  1. 2. 3.

#4

  1. #

will result:
4
5
6

gangleri wrote:

(In reply to comment #1)

Maybe we should ask the developer to make enhancement, so that numbered list can
be started from any given number.

for example: ...

This will mean that you have to readjust the numbers if you insert inbetween of
1 and 3. In *addition* to your requirement I would say that

#++ should be easy to remember.

best regards reinhardt [[user:gangleri]]

stanley wrote:

#4, #++, <# start="4"> <ol start="4"> whatever.. I use any tag

apm wrote:

One advantage of using the "#" command is that you don't have to re-number if
you insert something in the middle, so I would definitely prefer something
generic like #++ over specifying the number to start at.

avarab wrote:

Note: The start="" attribute has been deprecated by the W3C, the only standards
compilant way of achiving the same is through style sheets, and I think only
Opera supports that.

robchur wrote:

(In reply to comment #0)

interspersed with commands and images. I cannot use <ol> and <li> because they
collapse stuff onto one line and the "#" command assumes that if you skip a line

Does

#Foo
#:More about Foo
#Bar
#:More about Bar

not do what you want?

apm wrote:

(In reply to comment #6)

(In reply to comment #0)

interspersed with commands and images. I cannot use <ol> and <li> because they
collapse stuff onto one line and the "#" command assumes that if you skip a line

Does

#Foo
#:More about Foo
#Bar
#:More about Bar

not do what you want?

No, because I want to be able to call a template on the "More about Foo" line
and if I do so, I end up with:

  1. Foo

(result of template call goes here)

  1. Bar

In addition to the above, the other thing I'm trying to intersperse with the
numbered points is a chunk of code with the dotted border style you get when you
indent by a single space. #: is as specific as #* in that it allows me to have a
new line with a specific leading character in the midst of my list. I want to
be able to include anything that occurs to me, which is why what I'd really like
is "start" and "end" markers to essentially say "all # signs in this region
should increment consecutively regardless of what appears in between them" or,
more simply, "this section consitutes a single list".

robchur wrote:

*** Bug 8134 has been marked as a duplicate of this bug. ***

TheDJ added a comment.May 10 2009, 6:50 PM

(In reply to comment #5)

Note: The start="" attribute has been deprecated by the W3C

HTML 5 is undeprecating this attribute, perhaps it is time to revisit this problem? http://www.w3schools.com/tags/html5_ol.asp

IKhitron added subscribers: IKhitron, eranroz, Kipod.
Izno added a subscriber: Izno.Dec 7 2018, 4:34 AM

I'm going to copy the description from my T202083: First-class wikitext support for ordered list item value:

Right now, wikitext of the form

# <li value="N">List item content

needs to be added to start an ordered list from a number different from 1.

Under Remex, this outputs as

<li class="mw-empty-elt"></li>
<li value="N">List item content</li>

While skins currently will set the class to display:none, they shouldn't have to for this use case because the parser should probably not output not-great HTML.

It would thus be valuable to have first-class wikitext support for the notion of an ordered list item value. Something like the table syntax might be reasonable from a learnability perspective (with all of its pitfalls of course):

# value="N" | List item content

Such syntax could be extended to other attributes, such as the globals (class, id, etc.).

(Carried on from T50079: Tidy: Numbered list markup with <pre> inbetween creates empty first bullet after <pre> section.)

Izno added a project: Parsoid.
Izno updated the task description. (Show Details)
Izno moved this task from Backlog to Wikitext new features on the MediaWiki-Parser board.
Izno moved this task from Needs Triage to Future Ideas on the Parsoid board.
Izno added a subscriber: Aklapper.
Izno removed a subscriber: wikibugs-l-list.
Izno added a comment.Dec 7 2018, 4:47 AM

On an aside, I don't find the original report compelling for allowing this behavior. That's its own issue (T3584: Need method for multiparagraph list items, continuing numbered lists, and assigning specific numbers to list items especially the first item in the title) and should probably have its own fix. (Which, I may have falsely closed one or another in that duplicate chain....)