Last modified: 2008-08-11 17:44:30 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T8271, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6271 - Allow multiple classes of footnotes on the same page
Allow multiple classes of footnotes on the same page
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Cite (Other open bugs)
unspecified
All All
: Normal enhancement with 19 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
: 5265 6309 7465 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-11 04:38 UTC by Aryeh Gregor (not reading bugmail, please e-mail directly)
Modified: 2008-08-11 17:44 UTC (History)
11 users (show)

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


Attachments
Proposed patch (21.00 KB, patch)
2006-06-12 21:59 UTC, Aryeh Gregor (not reading bugmail, please e-mail directly)
Details
Test case and output. (3.44 KB, text/plain)
2006-06-12 22:06 UTC, Aryeh Gregor (not reading bugmail, please e-mail directly)
Details
Alternate proposed patch (19.11 KB, patch)
2006-06-28 03:28 UTC, Aryeh Gregor (not reading bugmail, please e-mail directly)
Details

Description Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-06-11 04:38:57 UTC
A second attribute should be added to <ref> and <references> tags, perhaps
"group".  Ideal behavior would be

--------------------------------

a<ref>bleh</ref>
b<ref group="blah_group">blah</ref>
c<ref>blee</ref>
==Ref1==
<references />

==Ref2==
<references group="blah_group" />

-->

a[1]
b[1]
c[2]

==Ref1==
#bleh
#blee

==Ref2==
#blah

--------------------------------

Now, what in heaven's name would the point be of having multiple incompatible
numbers on the same page?    Look at, say,
http://en.wikipedia.org/wiki/Comparison_of_operating_systems.  Each section has
its own notes, which are for aesthetic purposes contained within their own
sections rather than being all at the end.
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-06-12 21:59:46 UTC
Created attachment 1942 [details]
Proposed patch
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-06-12 22:06:07 UTC
Created attachment 1943 [details]
Test case and output.

Note: XHTML errors are due to identical id's and are present in the current
Cite.php.
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-06-12 23:44:01 UTC
Another point on the usefulness of this, by the way: combined with Bug 6272, it
would allow the use of Harvard-style references (e.g., (Bob 2003) instead of
<sup>1</sup>) in articles.
Comment 4 Brion Vibber 2006-06-14 21:20:09 UTC
*** Bug 6309 has been marked as a duplicate of this bug. ***
Comment 5 NikoSilver 2006-06-14 22:33:58 UTC
There is a misunderstanding: "group" is to be used for this:

http://meta.wikimedia.org/wiki/Talk:Cite/Cite.php#Allowing_sub-references

and we also need "sections" like point 1.4 in 

http://en.wikipedia.org/wiki/Wikipedia_talk:Footnotes#Summary_of_proposals

The difference is that "group" refers to WITHIN the same book ref (for different pages 
etc)

While "sections" refers to splitting the refs (along with their [sub]"groups") under 
different headings. (i.e. if it is needed to have an article with book-refs and foot-
notes et.al SEPARATELY and with separate numbering or initial letter)
Comment 6 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-06-14 22:45:47 UTC
A "section" is a division of a single unit.  A "group" is a collection of
multiple units.  This bug deals with a way to *arrange* *multiple* references
into *groups*, which is what 1.4 is about.  If you would like to *divide* a
*single* reference into *sections*, per the Meta talk page you link to, that's a
different proposal, yes.  Bug 6309, as worded, *was* a duplicate of this bug;
try filing another for for the subsectioning request.

(Note: I am aware that it would be technically correct to refer to the
sectioning request as grouping of similar references that were already within
the same <references /> tag, but it's confusing, so I would suggest you call it
sectioning instead, or better yet, "sub-references" as in the page you link to.)
Comment 7 NikoSilver 2006-06-14 23:20:37 UTC
thanks. and thanks for the etymological approach too! :-) will post new bug request 
for "sub-references"

now, since the grouping will cause numbering problems for the tags, maybe the refX, refY, 
refZ proposal is better than the ref group. example:

----
quote from book<refB>Book details</ref>
text that needs clarification<refF=>Clarifying footnote</ref>

==Notes==
<referencesF />
<!--only refF's will appear here -->

==Bibliography==
<referencesB />
<!--only refB's will appear here -->


----->

quote from book[B1]
text that needs clarification[F1]

==Notes==
F1. Clarifying footnote
...F2, F3 etc more clarifying notes

==Bibliography==
B1. Book details
...B2, B3 etc more book details
Comment 8 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-06-14 23:28:05 UTC
As proposed, this fix is only really useful for cases such as "Comparison of X"
pages, where you don't want to interleave the references.  This is because
numbering is maintained separately for all lists, and if you had them
interspersed that would be completely confusing.  Combined with Bug 6272,
however, more flexibility would be possible.
Comment 9 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-06-28 03:28:33 UTC
Created attachment 2015 [details]
Alternate proposed patch

Sometime after posting the previous patch, I came across something that said
patches shouldn't change anything unrelated to their intent.  Previous patch
could still be applied, but this should be functionally identical without doing
distracting stuff like correcting typos, tweaking variable names, or changing
"else if" to slightly faster "elseif".
Comment 10 Brion Vibber 2006-10-02 18:10:45 UTC
*** Bug 7465 has been marked as a duplicate of this bug. ***
Comment 11 Brion Vibber 2006-10-02 18:11:15 UTC
*** Bug 7466 has been marked as a duplicate of this bug. ***
Comment 12 -jkb- 2006-10-16 11:56:44 UTC
Well, here once again my arguments from the duplicate bug: Especially in
Wikisources it occures very often, that we have some original references in the
text (document) itself, and them we need to comment some places with our own
references; both must be clearly distinguished in the text and also on the end
where the references are shown (original refs, refs of wikisource). ~~~~
Comment 13 joergens.mi 2006-10-18 16:29:45 UTC
I can only support jkb´s wish for having multiple reference systems available.
it wold be more than use especially on wikisource to distinguish between
references from the source and references added bay wikisource ~~~~
Comment 14 Frank Schulenburg 2006-10-18 16:48:53 UTC
Please have a look at
http://de.wikisource.org/wiki/Drei_Register_Arithmetischer_ahnfeng_zur_Practic:115
It would be very good to have a multiple reference system implemented in
Mediawiki to avoid those complicated constructions with templates. P.S.
Greetings to the developers - you're doing a great job :-)
Comment 15 Václav Brožík 2006-12-03 13:30:00 UTC
Another important reason for having multiple reference groups is the ability to
separate lists of footnotes and bibliographical references. Unfortunately it is
not possible with the current implementation. It might be useful to render the
links in the text differently for every group (i.e. [1], [2]... and [a], [b]...)
like in the example on the German Wikipedia above.

--------------------------------
Some text<ref group="notes">Footnote with a detail.</ref>.
Another text<ref group="bibrefs">Bibliographic reference</ref>.

==Notes==
<references group="notes" />

==References==
<references group="bibrefs" />
--------------------------------
Comment 16 Scot Wilcoxon 2007-02-09 06:14:41 UTC
If I understand '''linkRef''', this patch would display reference links as
numbers (as is presently done) but each Group has its own numbering.  So with
two groups there would be two links which would say "1".  A workaround is a
label to be displayed for the link (as in Bug 6272, easily fixed with an mRefs
addition, except for forward references).  Otherwise a decision on multiple
reference group formats would have to be made.

I also notice this patch is out of date because the forward reference section
"// If no text found before, use this text" is not present.
Comment 17 Mike Dillon 2007-09-15 20:54:44 UTC
I'd just like to add a comment here that this functionality would be very helpful on Wiktionary as well. The need there comes from the fact that one page often has separate listings for different languages where the terms share the same sequence of characters, but may be otherwise unrelated. Having a grouping mechanism on <ref>/<references> would allow us to use references/footnotes that are specific to a particular language's section of the page. This has been discussed recently at http://en.wiktionary.org/wiki/Wiktionary:Beer_parlour#References
Comment 18 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-09-16 02:11:30 UTC
Patch no longer applies cleanly.  I'll accept this to rework the patch at some point, unless someone else would care to do so (or to write their own).
Comment 19 sharon.dagan 2007-09-20 17:47:16 UTC
This is also *essential* feature for Right-to-Left languages like Hebrew and Arabic. Sometime there's a need to cite references in English, and then render those in their own section, aligned to the left. 

For example:

==REFERENCES==
<refrences/>

<div dir="ltr">
<references group="english"/>
</div>

Comment 20 cypsy 2008-01-08 00:32:44 UTC
Copy of comment seen at m:Village pump (proposals):

> * The problem might be solved more elegantly/generically (and without more html tags) 
>   by categorizing refs with a pseudo-"class type". For example, one would have...
>    <ref class="n">... something in class "n" (e.g. a note)... </ref>
>    <ref class="x">... something in class "x" (e.g. some other category of ref)... </ref>
>    <ref>... something without a class (e.g. a regular citation)... </ref>
>    The balancing <references /> would look like this:
>    <references class="n" /> to dump all <ref>s with class="n".
>    <references class="x" /> to dump all <ref>s with class="x".
>    <references /&gt; to dump all <ref>s with no class.
>  This way, a page could have as many "notes" (or whatever) sections as necessary. 
>  For example, examples on a wiki help page.

> * Another option is to give <references/> a regex filter function:
>    <references name="n*" /> dumps all refs whose name= starts with 'n'
>    <references name="x*" /> dumps all refs whose name= starts with 'x'
>    <references name="[^nx]*" /> dumps the rest
>   This is however not suitable For refs that need different numbering schemes (e.g. notes vs citations).

> * One way to resolve the autonumbering problem would be to use an alpha prefix for the 
>   numbering, perhaps even using the first letter of the class name (or restricting the length of 
>   the class name to 1). 
>   Another way would be to give each group N numbers (e.g. 1000), so the default would be 1-999, 
>   the next 1001-1999 and so on.

> * The problem with using any autonumbering format except numbers and a-b-c is that Citephp depends 
>   on ordered lists (&lt;ol&gt; tag). Thus, while prefix + number (e.g. 'n1') would be the most flexible 
>   way to solve the autonumbering problem, it would require Citephp to emit CSS magic to simulate 
>   a numbered <ol>. It would still be ol (with list-style-type:none & hanging indent formatting), 
>   but the li's would need to provide numbering. Tables are another option.

> -- Fullstop (talk) 22:27, 30 December 2007 (UTC)
Comment 21 cypsy 2008-01-08 00:37:39 UTC
*** Bug 5265 has been marked as a duplicate of this bug. ***
Comment 22 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-01-08 01:34:25 UTC
The first bullet plan is how it's going to be done, if/when I get around to doing it.
Comment 23 Bill Mitchell 2008-01-26 06:18:21 UTC
Please see related bug 12796, which allows a single list of footnotes to be separated into sections, grouped and numbered as desired and with each section introduced by an unnumbered header.
Comment 24 Steve Sanbeg 2008-03-20 21:51:12 UTC
Oh, now I find this!  Anyway, I just committed what I was working on in r32256, which shows the group name along with the number, so that it shouldn't be so confusing to interweave them.
Comment 25 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-03-20 22:06:31 UTC
Hmm, not sure that's a great idea.  It interferes with some uses (where you want multiple ref groups that are just "all refs up to this point") and isn't great for other uses.  I was thinking it was best to do this first with no way of distinguishing names, then allowing some mechanism to specify names for, e.g., Harvard-style references.

On the other hand, my way looks weird if you do mix the references together, like by accident.  Maybe the use case I give should be handled as separate functionality, like by having every <references /> (for a given group!) clear all memory of the footnotes that came before it.
Comment 26 Steve Sanbeg 2008-03-20 22:23:58 UTC
(In reply to comment #25)
> Hmm, not sure that's a great idea.  It interferes with some uses (where you
> want multiple ref groups that are just "all refs up to this point") and isn't
> great for other uses.  I was thinking it was best to do this first with no way
> of distinguishing names, then allowing some mechanism to specify names for,
> e.g., Harvard-style references.
> 
> On the other hand, my way looks weird if you do mix the references together,
> like by accident.  Maybe the use case I give should be handled as separate
> functionality, like by having every <references /> (for a given group!) clear
> all memory of the footnotes that came before it.
> 

I was looking at cases like http://en.wikipedia.org/wiki/Alcibiades, where they use templates and intermix them.  It would be a nice further enhancement to allow them to use letters instead of numbers for some groups; maybe a <note> tag that is otherwise the same as <ref>

I've always found the cumulative references unintuitive.  Simply clearing everything before would've messed up some of the numbering, such that multiple refs would get the same ID.  But now that I had to redo most of that anyway, to support multiple refs with the same name, it should be reset most of it, except for the ID labels.
Comment 27 Andrew 2008-03-26 14:27:19 UTC
Thanks for the patch, but it brings up a new question. See http://en.wikipedia.org/wiki/List_of_Governors_of_Wisconsin, which is the most developed of these lists. Right now, we use <ref>s for footnotes, and {{ref}}s for references; this also means we use {{ref}}s inside <ref> footnotes, to reference the information in those footnotes. Using the new system would be great, except we cannot nest <ref>s. Is there any way this can be resolved?
Comment 28 Andrew 2008-03-26 21:32:37 UTC
And, perhaps a standard group to make things be alphabetical, instead of having a prefix word? like, <ref group='alpha'>foobar</ref> would show [C] if it were the third reference in that group. Up to Z, then AA-ZZ, etc and so forth. That would be preferable to having to have the prefix word, i.e. [alpha C]. (but keep that ability too)
Comment 29 cypsy 2008-03-27 00:11:31 UTC
... or class="n", where (first letter of) the 'class name' serves as a prefix for the numbers. 

So, for class="n", one would get [n1], [n2], [n3] etc, 
and for class="f", one would get [f1], [f2], [f3] etc.

<references class="n" /> lists all 'n's.
<references class="f" /> lists all 'f's.
<references /> dumps the 'unclassed' refs.

And class= is of course already html-ish. (like <ref name= > really)

Btw, any scheme that does not use plain-vanilla 1-n, a-z, etc is also going to need to simulate html's <ol>.
Comment 30 Steve Sanbeg 2008-03-27 15:40:51 UTC
(In reply to comment #29)
> ... or class="n", where (first letter of) the 'class name' serves as a prefix
> for the numbers. 
> 
> So, for class="n", one would get [n1], [n2], [n3] etc, 
> and for class="f", one would get [f1], [f2], [f3] etc.
> 
> <references class="n" /> lists all 'n's.
> <references class="f" /> lists all 'f's.
> <references /> dumps the 'unclassed' refs.
> 
> And class= is of course already html-ish. (like <ref name= > really)
> 

that looks pretty similar to what's live now, except that it uses group="n", and the whole group is the prefix, so you can use single-letter groups, but don't have to. i.e. group="n" would give [n 1], [n 2], etc.

> Btw, any scheme that does not use plain-vanilla 1-n, a-z, etc is also going to
> need to simulate html's <ol>.
> 

Yes, I think it may be better to stick with what we can get from <ol> & CSS.

What I think would be the ideal way to go, although I haven't started doing anything with it, would be to have a <note> tag, which would be the same as <ref>, but with different numbering; this may even work with nested tags.  Although a special group(s) notation for letters does sound like an interesting idea.
Comment 31 Jelte (WebBoy) 2008-08-11 17:44:30 UTC
(In reply to comment #30)
> (In reply to comment #29)
> > ... or class="n", where (first letter of) the 'class name' serves as a prefix
> > for the numbers. 
> > 
> > So, for class="n", one would get [n1], [n2], [n3] etc, 
> > and for class="f", one would get [f1], [f2], [f3] etc.
> > 
> > <references class="n" /> lists all 'n's.
> > <references class="f" /> lists all 'f's.
> > <references /> dumps the 'unclassed' refs.
> > 
> > And class= is of course already html-ish. (like <ref name= > really)
> > 
> 
> that looks pretty similar to what's live now, except that it uses group="n",
> and the whole group is the prefix, so you can use single-letter groups, but
> don't have to. i.e. group="n" would give [n 1], [n 2], etc.

Therefore maked as FIXED (r32290).

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


Navigation
Links