Page MenuHomePhabricator

Need a way to use e.g. 01, 02... or i, ii... for numbered lists
Closed, DeclinedPublic

Description

There needs to be a way of defining ordered lists that use something other than 1,2,3. e.g. 01, 02, 03... / i., ii., iii... / A, B, C, etc.


Version: 1.22.0
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=1584
https://bugzilla.wikimedia.org/show_bug.cgi?id=4281

Details

Reference
bz53620

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:09 AM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz53620.
bzimport added a subscriber: Unknown Object (MLST).

I don't think we'd add new syntax for this, as it's doable through existing HTML and CSS.

See documentation for the CSS list-style or list-style-type properties, there are many options:
https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type

You can either put the styles into global stylesheets like MediaWiki:Common.css or you can manually put a style attribute on an HTML list element:

<ol style="list-style: decimal-leading-zero">
<li> shows 01.
<li> shows 02.
<li> shows 03.
</ol>

<ol style="list-style: lower-roman">
<li> shows i.
<li> shows ii.
<li> shows iii.
</ol>

Note that in the inline style case, you may need to use <li> explicitly rather than #/* markup.

In the CSS stylesheet case, you can reference the list by wrapping it in a div or something, in which case you can just use the existing # syntax for ordered lists:

In CSS:
.list-roman ol { list-style: lower-roman }

In page:
<div class="list-roman">

  1. shows i.
  2. shows ii.
  3. shows iii.

</div>

Aklapper subscribed.
In T55620#585571, brion wrote:

I don't think we'd add new syntax for this, as it's doable through existing HTML and CSS.

Closing as declined as a simple workaround is available compared to the additionally introduced code complexity and maintenance costs.