Last modified: 2014-09-23 23:40:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 5641 - Allow named, auto-incrementing elements
Allow named, auto-incrementing elements
Status: NEW
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
All All
: Low enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: newparser, parser
Depends on:
  Show dependency treegraph
Reported: 2006-04-18 17:24 UTC by Robert Shimmin
Modified: 2014-09-23 23:40 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

Patch to support this. (11.31 KB, patch)
2006-04-23 11:50 UTC, Andrew Miller
Newer patch: Fix a bug, update parser tests for this patch (12.93 KB, patch)
2006-04-24 09:11 UTC, Andrew Miller

Description Robert Shimmin 2006-04-18 17:24:03 UTC
A number of issues, including the (still ongoing) controversies over citation
formats, but also numbered figures, equations, etc., which must still be
numbered (see Bug 5600), and situations in which numbered lists don't work right
(see Bug 4281) would be resolved by the ability to create (possibly more than
one) named, auto-incrementing element on a page.

Suppose the markup for this is ##_name (though this markup is provided purely
for example purposes).  Then the first instance of ##_figno on a page will
produce a 1, the second a 2, and so forth.  Other counters (suppose the same
page had numbered equations, numberd by another counter ##_eqno) would not
interfere with each other.

An extension would be auto-incrementing counters using symbols other than
numerals, such as letters or Roman numberals.  Maybe ##A_name for A, B, C,
##a_name for a, b, c, ##I_name for I, II, III, ##i_name for i, ii, iii.
Comment 1 Andrew Miller 2006-04-23 11:45:44 UTC
I have written a patch to support this. I used syntax like
#{counter} First item
# Second item
# Third item
Some intervening text
#{} Fourth item
A separate list...
# First item, list two
# Second item list two
Back to the original list...
#{counter} Fifth item, list one
Skip five...
#{counter|+5} Tenth item, list one
Go to a specific number...
#{30} Thirtieth item, list two
#{counter|20} Twentieth item, list one
Comment 2 Andrew Miller 2006-04-23 11:50:03 UTC
Created attachment 1601 [details]
Patch to support this.
Comment 3 Andrew Miller 2006-04-23 11:52:24 UTC
BTW I don't have SVN access, someone please commit (to somewhere where
experimental code is allowed).
Comment 4 Andrew Miller 2006-04-24 09:11:46 UTC
Created attachment 1603 [details]
Newer patch: Fix a bug, update parser tests for this patch
Comment 5 Sumana Harihareswara 2012-01-10 23:18:16 UTC
Andrew, thank you for the patch.  I'm very sorry, but in the time since you provided your patch, MediaWiki's codebase has changed enough that your patch no longer applies cleanly to our trunk.  Therefore I'm marking it obsolete and removing the "need-review" and "patch" keywords.

We are currently rewriting the parser ; I am cc'ing Gabriel Wicke, who is one od the developers on that effort. If this issue is still one you're interested in fixing, please join us in IRC and talk with other developers before renewing and possibly revising your approach; it would be great to get your help in the rewrite.  Thanks for your interest in improving MediaWiki!  And, again, sorry for the very long delay in response.
Comment 6 Sumana Harihareswara 2012-01-10 23:18:42 UTC
Comment on attachment 1603 [details]
Newer patch: Fix a bug, update parser tests for this patch

This patch no longer applies to trunk per Rusty Burchfield's automated testing
Comment 7 Gabriel Wicke 2012-11-03 17:42:18 UTC
Could this be fully or partly solved using CSS counters? or have some information about this.

Doing this in an extension would introduce a lot of dependencies between elements of a page. We are considering to do incremental updates to parts of a page DOM in the future to improve performance and responsiveness, which would be complicated by adding more dependencies.
Comment 8 Helder 2012-11-03 17:45:19 UTC
Wouldn't that require the ability to have per page/category/template/whathever CSS?
Comment 9 Gabriel Wicke 2012-11-03 18:33:37 UTC
Yes, but adding such a thing does not appear to be that hard from a technical point of view and would likely provide the mechanism for other CSS-based solutions too.

Browser support seems to be quite good already according to (search for counters). I did not check if the feature set is sufficient, and think it would make sense to evaluate that first.

Also relevant is the support for various list-style-type values:

Note You need to log in before you can comment on or make changes to this bug.