Last modified: 2008-08-11 17:44:30 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.
Created attachment 1942 [details] Proposed patch
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.
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.
*** Bug 6309 has been marked as a duplicate of this bug. ***
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)
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.)
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
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.
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".
*** Bug 7465 has been marked as a duplicate of this bug. ***
*** Bug 7466 has been marked as a duplicate of this bug. ***
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). ~~~~
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 ~~~~
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 :-)
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" /> --------------------------------
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.
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
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).
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>
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 /> 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 (<ol> 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)
*** Bug 5265 has been marked as a duplicate of this bug. ***
The first bullet plan is how it's going to be done, if/when I get around to doing it.
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.
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.
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.
(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.
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?
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)
... 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>.
(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.
(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).