Jump to content

Talk:Cite/Cite.php: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Latest comment: 18 years ago by Omegatron in topic A different idea
Content deleted Content added
Omegatron (talk | contribs)
→‎A better way?: «"ul" → "ol style='list-style-type:lower-alpha;'", "ul" → "ol", "ul" → "ol style='list-style-type:lower-alpha;'", "</ul> <ul>" → " ", "ul" → "ol"»
(3 intermediate revisions by the same user not shown)
Line 473: Line 473:
If some developers of cite.php could possibly take a look at the discussion at [[en:Template_talk:Cite_journal#Wikipedia:Featured_article_candidates.2FAIDS]]. Thanks, --[[User:Irpen|Irpen]] 02:02, 21 March 2006 (UTC)
If some developers of cite.php could possibly take a look at the discussion at [[en:Template_talk:Cite_journal#Wikipedia:Featured_article_candidates.2FAIDS]]. Thanks, --[[User:Irpen|Irpen]] 02:02, 21 March 2006 (UTC)
::Also, could you take a look at the page: [[Wikipedia:Featured article candidates/AIDS]]. Thanks. --[[User:132.239.240.95|132.239.240.95]] 17:56, 21 March 2006 (UTC)
::Also, could you take a look at the page: [[Wikipedia:Featured article candidates/AIDS]]. Thanks. --[[User:132.239.240.95|132.239.240.95]] 17:56, 21 March 2006 (UTC)

== A different idea ==

I mostly like the new references, but they have a lot of shortcomings. I used them for the first time in [[w:Red rain in Kerala|Red rain in Kerala]], and these are the things I didn't like/ideas I had:

# They interrupt the article text a lot more than other styles. Content like:<br/><blockquote><pre><nowiki>
As well as red rain, some reports suggested that other colours of rain were also seen. Many
more occurrences of the red rain were reported over the following 10 days, and with diminishing
frequency until the end of September.</nowiki></pre></blockquote>becomes:<br/><blockquote><pre><nowiki>
As well as red rain, some reports suggested that other colours of rain were also seen <ref>{{cite web
| last = Ramakrishnan
| first = Venkitesh
| authorlink =
| coauthors =
| year = 2001
| url = http://news.bbc.co.uk/1/hi/world/south_asia/1465036.stm
| title = Coloured rain falls on Kerala
| format =
| work =
| publisher = BBC
| accessdate = March 6
| accessyear = 2006
}}</ref>. Many more occurrences of the red rain were reported over the following 10 days, and
with diminishing frequency until the end of September.</nowiki></pre></blockquote>
# Editing the format of a reference requires finding where it is first cited in the article, instead of just editing the ''References'' section, where it appears. This is confusing (especially to newcomers) and inconvenient.
# Section editing is useless if you want to change references. You can't just edit the ''References'' section because that's not where the references actually are. You can't just edit the section that contains the reference since that's not where the rendered references are (so they won't show up in the preview). You have to edit and preview the entire article to see the change.
# Since they aren't centralized, it's hard to know if a reference exists already, leading to duplicates which then have to be merged manually.
# Additional references that aren't created with the extension, but added to the References section (as per [[Wikipedia:Citing_sources#Complete_citations_in_a_.22References.22_section|WP:CITE]]) do not continue the numbered list.
# I heard the reason for using brackets around the numbers was to increase the clickable area. I think the brackets should be removed and the same thing done with CSS; increase the horizontal padding around the numbers and vertical arrows to make them more easily clickable instead. Discussion was here: [[w:Wikipedia_talk:Manual_of_Style#Changes_to_Cite.]] and [[w:Wikipedia_talk:Footnote3#Superscripts_2]].
# If a named reference is used in an article, and another reference to the same document is placed ''before'' that one, it doesn't work. The reference has to be moved to the first position instead of just using the name, since the text inside the first reference determines the displayed text. This is a huge pain.
# ('''Curiousity; not a problem:''' <nowiki>Is there any reason why it has to look like well-formed XHTML? Instead of <ref name="something"/>, why not just <ref something>? Is it thought that the functionality might be expanded? Why wasn't it based on the syntax already in use for [external link references]? Why isn't it more {{wiki-like}}? Our syntax is quickly becoming completely impossible for the average non-computer scientist to edit. No wonder we're accused of systemic bias.)</nowiki>

=== A better way? ===

A better implementation would have the context and format of the reference centralized in the references section, where it actually appears, and the context of the particular fact near that fact:

<dl><dd>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<span style="color:red;"><nowiki><ref name="foo"/></nowiki></span>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<span style="color:red;"><nowiki><ref name="bar"></nowiki>
pages 34&ndash;37<nowiki></ref></nowiki></span> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim
id est laborum.<span style="color:red;"><nowiki><ref name="bar">Section 7.1: Table of baz</ref></nowiki></span> Lorem ipsum dolor sit amet,
consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua.<span style="color:red;"><nowiki><ref name="foo">page 56</ref></nowiki></span>
<nowiki>
== References ==
<references>
<ref name="foo"> {{cite book
| first = Foo
| last = Bar
| authorlink = Foo bar
| year = 1587
| title = Research into the inclusion of references in online encyclopedias
}}</ref>
<ref name="bar">
{{cite web
| author=R.L. Bar
| title=Talking to your children about HTML addiction
| year=April 30, 2005
| url=http://www.example.com/
| accessdate=July 6
| accessyear=2005
}}
</ref>
</references>
</nowiki></dd></dl>

which would render as:
<div style="border: 1px solid rgb(153, 153, 153); margin: 2em; padding: 0.5em; ">
<blockquote>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<small><sup id="foorefback">[[#fooref|1]]</sup></small> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<small><sup id="barpagesback">[[#barpages|2]]</sup></small> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<small><sup id="bartableback">[[#bartable|2]]</sup></small> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<small><sup id="foopageback">[[#foopage|1]]</sup></small><br/><br/>

<u style="font-size: large;"><b>References</b></u>

<ol class="references">
<li id="fooref"><b>[[#foorefback|↑]]</b> [[w:Foo bar|Bar, Foo]] (1587). ''Research into the inclusion of references in online encyclopedias.''
<ol style="list-style-type:lower-alpha;"><li id="foopage"><b>[[#foopageback|↑]]</b> page 56</li></ol></li>
<li>R.L. Bar (April 30, 2005). [http://www.example.com/ Talking to your children about HTML addiction]. URL accessed on [[w:July 6|July 6]], [[w:2005|2005]].
<ol style="list-style-type:lower-alpha;"><li id="barpages"><b>[[#barpagesback|↑]]</b> pages 34–37</li>
<li id="bartable"><b>[[#bartableback|↑]]</b> Section 7.1: Table of baz</li></ol>
</li>
</ol>
</blockquote>
</div>

I think this might even be backwards compatible with the current syntax. (I can't demonstrate the padding method without editing the [[Mediawiki:Common.css|site-wide CSS]].)

For ease of use, you could still insert full references next to a fact, like we do with [external link] references or the current ref system, but, on saving the page, it would be given a name (if you didn't give it one) and the actual content moved into the references section.

References could be merged by putting both names around the same content:

<blockquote><pre><nowiki>
== References ==

<references>
<ref name="foo"> {{cite book
| last = Bar
| first = Foo
| authorlink = http://www.university.edu/~foobar
| year = 3702
| title = Research into the inclusion of references in online encyclopedias
}}</ref>
<ref name="baz">
{{cite web
| author=Dr. Foo Bar
| title=Research into the inclusion of references in online encyclopedias (e-book)
| year=3702
| url=http://www.university.edu/~foobar/e-book/index.html
| accessdate=July 6
| accessyear=2005
}}
</ref>
</references>
</nowiki></pre></blockquote>

could be merged together like so:

<blockquote><pre><nowiki>
== References ==

<references>
<ref name="foo">
<ref name="baz">
{{cite book
| last = Bar
| first = Dr. Foo
| authorlink = http://www.university.edu/~foobar
| url=http://www.university.edu/~foobar/e-book/index.html
| year = 3702
| accessdate=July 6
| accessyear=2005
| title = Research into the inclusion of references in online encyclopedias
}}
</ref>
</ref>
</references>
</nowiki></pre></blockquote>

without editing every ref in the article to the combined name. Then if it turns out they're from different editions of the same source text, they might need to be broken apart again later, but the actual reference sources are still there. — [[User:Omegatron|Omegatron]] 05:00, 23 March 2006 (UTC)

Revision as of 22:37, 23 March 2006

Problem installing

I put Cite.php in my extensions directory, and added the line "require_once("extensions/Cite.php"); to my LocalSettings.php, and now my wiki gives me this error:

Fatal error: Call to undefined function: wfmsgforcontentnotrans() in mediawiki-1.5.5/extensions/Cite.php on line 572

Any ideas? --69.237.153.190 06:34, 19 January 2006 (UTC)Reply

Okay, I think I found out what was missing. includes/GlobalFunctions.php looks like it's old in mediawiki-1.5.5.tar.gz - I'm going to try grabbing just that function. --69.237.153.190 06:55, 19 January 2006 (UTC)Reply
Well, it looks like it's harder than I thought to enable this on v1.5.5. I guess I'll wait till it is in the normal build. --69.237.153.190 07:15, 19 January 2006 (UTC)Reply

It depends on changes in the parser itself, how hooks are added to the parser, hooks in the parser, behaviour in the sanitizer & parser all of which are in CVS HEAD and not in REL1_5 (that list if just of the top of my head), if you want to use it you'll either have to backport the needed changes or use CVS HEAD. I do work for hire if you need someone for the former;) —Ævar Arnfjörð Bjarmason 02:42, 21 January 2006 (UTC)Reply

I have not understand. Same problem as above. Is the cite.php not for mediawiki 1.5.5 ? --Farm 04:13, 24 January 2006 (UTC)Reply
No. —Ævar Arnfjörð Bjarmason 08:43, 29 January 2006 (UTC)Reply
The CVS HEAD source code has not the endding code "?>", why? 14:00, 24 Jan 2006 (UTC).
I forgot to add it. —Ævar Arnfjörð Bjarmason 08:43, 29 January 2006 (UTC)Reply
I have v1.5.6 and it's not working. Can you tell me why? I did'nt understood what you previously wrote here.
In short because there have been massive changes in the MediaWiki API since 1.5 which this extension uses. —Ævar Arnfjörð Bjarmason 20:25, 28 February 2006 (UTC)Reply
Same for 1.5.7? But working for 1.6alpha? --Edi 22:22, 2 March 2006 (UTC)Reply

Sorry if my question seems naïve, but in fact, is there anyway to make cite.php work with 1.5.6 or not ? If there's a way, would it be to difficult for you to explain how ? If it's not too difficult but that you don't have time, do you think you may have time someday ? Thanks. --Henrique 23:35, 2 March 2006 (UTC)Reply

See my comment above for what needs to be changed, although I may have forgotten something, your best bet it to look at the CVS logs from that time if you want to backport it.
I don't plan to backport it. Backporting is boring and I'm doing this in my free time. But even if I did it would have to be released as a seperate patch because the 1.5 branch is accepting security fixes and other bug fixes only. —Ævar Arnfjörð Bjarmason 16:57, 4 March 2006 (UTC)Reply

No response

I put the cite.php in the extensions directory and added the reuqired_one line in the localsettings.php and noting happens. No footnotes appear and the <ref... is shown in the article! Any suggestions? Thanks!

Multiple quotes from same source (<ref/> Wish)

I'd like to quote the same source multiple times. If there would be a <ref name=id />, it could only generate the citation, but use the inner part of a previous <ref name=id >blahblah</ref>. In the next step it would be great to use this for referencing definitions on other wiki pages, i.e. <ref name=/TheOtherArticle/id />. Additionally generating a printable version or PDF from a wikipedia article gets easier, too.
-- Herbert 19:40, 14 January 2006 (CET)

You obviously haven't tried doing that first part, because it works perfectly (and is used in the example here). I don't understand what you mean in the second part (sorry)… Jon Harald Søby 18:50, 14 January 2006 (UTC)Reply

Wish

In my browser (IE and Firefox) in Win XP, I see:

Uranus's moons were observed to be declining in orbit[1], by the Hubble space telescope[2], the Martians were not avalible for comment on the matter[3]. The New York times[4] however reported[5] that ...
1. ^ NASA
2. ^ 1 2 December 2005 issue, page 12
3. ^ 1 2 January 2006 issue, page 16

Could it be

  • ^ 1 NASA
  • ^ 2 3 December 2005 issue, page 12
  • ^ 4 5 January 2006 issue, page 16

,I mean, the number in the references should correspond to the number in the text?

Thanks193.52.24.125 13:29, 28 December 2005 (UTC)Reply

You might want to reply on Ævar's English Wikipedia talk page, there's some discussion there about this right now: en:User talk:Ævar Arnfjörð Bjarmason. —Locke Coletc 21:15, 28 December 2005 (UTC)Reply

Second wish

It's long been said by people opposed to increased usage of inline citation that inline citations damage readability. I'm somewhat sympathetic to that, and the easy solution is to have a way for the people that want to to make inline citations invisible. Would that be hard to implement as a user preference for example? Or is there a better way to do that? Thanks - Taxman 16:35, 31 December 2005 (UTC)Reply

It's already a user preference, you just have to add
span.reference { display: none; }
Or something like that to your user stylesheet. —Ævar Arnfjörð Bjarmason 17:43, 31 December 2005 (UTC)Reply

A better method may be to add another parameter that allows individual citations to be hidden. This would allow for an article author to fully reference each paragraph, or even every sentence, and still keep the number of footnotes generated at a reasonable level. If this is impractical to implement, we can still use HTML comments. --Allen3 23:36, 31 December 2005 (UTC)Reply

The whole point of the extension is to be able to maintain an automatically generated references table just like one can maintain an automatically generated table of contents in the software, if you're not going to use that (the only) feature and don't want display any references in the article at all then you're probably best off with a simple inline comment, unless I'm misunderstanding you. —Ævar Arnfjörð Bjarmason 15:25, 12 January 2006 (UTC)Reply
I would restate this a different way. Is it possible to have a citation level variable. E.g. 0/1/2.. or none/default/all or none/few/default/lots/all where citations will be displayed according to the setting. The default level would be a sensible level which gives reasonable citations without going overboard. The "all" level would be something which makes fact checking very easy. Mozzerati 22:10, 17 February 2006 (UTC)Reply
Let's keep it simple. What about <ref class="foo" ...>, and the specified class ends up included in the resulting span's class. Then you can do whatever you want in CSS. --P3d0

<ref> can't be used in image captions

Code of the form [[Image:Yagan.jpg|thumbnail|''Portrait of Yagan'' by [[George Cruikshank]].<ref name="Dale 1834">Dale 1834, p 1</ref>]] misrenders disastrously. Snottygobble 12:06, 2 January 2006 (UTC)Reply

That's a known issue with the parser and doesn't have anything to do with this extension in particular, except that it affects it. I made a known issues section at Cite/Cite.php to track these. –Ævar Arnfjörð Bjarmason 07:02, 3 January 2006 (UTC)Reply

Bugs? Or operator error?

I really like this new feature, but I'm having trouble getting it to work consistently. This is particularly a problem when a single reference is used more than once. The article I'm trying to fix is Dixie (song). As you can see, there are six page citations that repeat at least once (Notes 4, 17, 28, 58, 69, and 84). However, when you click on the reference links by these repeaters, nothing happens (the page does not pop up or down properly like it does with the page citations that are used only once). Secondly, Note 17 should read "Quoted in Abel 36.", but currently it says nothing. Likewise, Note 72 should read "Abel 49.", but it too is blank. Can someone tell me if I'm doing something wrong? Thanks . . . . — BrianSmithson 19:25, 6 January 2006 (UTC)Reply

This was a known issue with MediaWiki which happened not because you were using references more than once but because you were using a character (0x20) that needed to be escaped. I've fixed the issue in MediaWiki that caused this.
As for your other issue that is indeed a user error, you can't recall a reference later in the text by its content, only by a key you provide, so <ref>foo</ref> <ref name=foo/> won't do what you seem to expect it should. But <ref name=foo>foo</ref> <ref name=foo/> probably will. —Ævar Arnfjörð Bjarmason 09:55, 7 January 2006 (UTC)Reply

HTML format

This cite stuff is totally cool. But I have a few suggestions about the way the HTML code is formatted. —Michael Z.

Hi an thanks for the suggestions and sorry for the late reply, I saw this a few days ago but hadn't gotten around to replying. —Ævar Arnfjörð Bjarmason 14:44, 9 January 2006 (UTC)Reply

<cite> element

Each note should be enclosed in an HTML <cite> element, since it is a citation. Since the in-text citation marker is linking to the citation, perhaps the note ID should be an attribute of the cite, rather than of the list item (<li>):

 <li><cite id="_note-NoteID">Note</cite><li>

Michael Z.

If you check the history of the file you'll see that what you suggest used to be the default but after reading a bit more up on the element in the W3C standards (see links in the file) and after some comments on the English Wikipedia I changed it again.
The reason it's not in there is because the cite element should only ever be used for a direct citation, and since users are likely to do something like:
<ref>Page 52 of XYZ written by Foo, the only remaining copy of this book was lost in the great fire of Bar</ref>
I.e. include something that isn't directly relevant to the citation (the fate of the referenced work in this case). If the software were to automatically wrap things in the cite element you'd end up with a lot of mismarked text, so now users are expected to simply write:
<ref><cite>Page 52 of XYZ written by Foo</cite>, the only remaining copy of this book was lost in the great fire of Bar</ref>
Ævar Arnfjörð Bjarmason 14:44, 9 January 2006 (UTC)Reply
Okay, I see; this is also meant for footnotes, not just citations. But I don't see any harm in an HTML citation also containing a bit of explanatory text, like in your example. —Michael Z.

Back-link text

The back-link text is currently the single character ^ (U+005E CIRCUMFLEX ACCENT)—this is not an arrow, and doesn't really look like an arrow. It's a w:circumflex, a diacritic used in some languages, and on its own indicates mathematical exponentiation in primitive ASCII-only displays. For the sake of its meaningless semantics (therefore poor accessibility), as well as sheer graphical ugliness, let's change it to ↑ (U+2191 UPWARDS ARROW), or ← (U+2190 LEFTWARDS ARROW).

See also:

I agree that a proper mark should be used, but the replacement you mentioned (↑) looks way too large and not as neat as ^, ← on the other hand doesn't convey anything meaningful, the link is up, not to the left. Do you have something like ↑ that doesn't look so big (a bit more like ^)? —Ævar Arnfjörð Bjarmason 14:44, 9 January 2006 (UTC)Reply
I don't think there are any smaller arrows, although an arrow could be made smaller using CSS formatting. See en:Template talk:Ref#^ revisited for some of the others, but MSIE/Win has trouble rendering most of them, without extra help from CSS.
Putting the arrows at the end of the note will make them less prominent, because they won't be all lined up (see below). —Michael Z.

And the back-link text should definitely not be superscripted; typographers use that for in-text citations only, never for footnote labels. —Michael Z.

You're suggesting[1] stuff[2] like this instead (i.e. rendering it the same way as the surrounding text)? —Ævar Arnfjörð Bjarmason
Superscripts are appropriate for the in-text citation references, but footnote labels should not be superscripts. "Back-links" don't appear in standard typography, but it makes sense that they should not be confused with citation references, possibly leading readers to look for another notes section below. —Michael Z.

Back-link position

The back-link looks like a label at the beginning of each note. But the note already has a number label. The back-link is an interface feature attached to the note, and subordinate to it. It belongs at the end. Don't the examples 4 to 6 below look better? Or if the arrow alone seems like too small a mouse-click target, put it in brackets so it is graphically associated with the citation link, like example 7 and 8.

  1. ^ Bloggins, Joe (2006). Old-fashioned carat back-links. Oldville: Tradition.
  2. ^ Brown, Sam (2006). At the beginning of the line: look like labels. Oldville: Tradition.
  3. ^ 3.1 3.2 Smith-Jones, John (2006). Attract attention and misalign authors. Oldville: Tradition.
  4. The Great, El Borbah (2006). New-fangled back-links. Newtown: Innovation.
  5. Verne, Jules (2006). Citations start with authors name: just like in books. Newtown: Innovation.
  6. Who, Joe (2006). Back-links are visually subordinate to the note's content. Newtown: Innovation. ↑6.1 ↑6.2
  7. Heinlein, Robert (2006). Brackets look like the in-text citations. Newtown: Innovation. [↑]
  8. Asimov, Isaac (2006). Brackets help visually associate notes with back-links. Newtown: Innovation. [↑8.1] [↑8.2]

Michael Z.

Mm, matter of taste really, I like having all the backlinks in the same row for quick jumping up & down in the article. If by "The back-link looks like a label at the beginning of each note. But the note already has a number label." you're referring to the rational numbers in #3 then you don't need to use numbers at all, the system allows for using custom labels (defined in cite_references_link_many_format_backlink_labels) in cite_references_link_many_format using the 3rd paramater ($3) so you could have something like this as well:
  1. a b Text of citation
Regarding the different styling of arrows (again) I really don't like to put myself in the position of deciding what should be the default. I just used the styling that was being used in the Ref and Note templates in enwiki at the time and I think the manual of style talk page is a much better venue for discussing how it should look, if editors are generally happy with something else than the current default I'd be quite happy to change the default in the software. —Ævar Arnfjörð Bjarmason 14:49, 12 January 2006 (UTC)Reply

Title attribute for the back-link

The back-link currently contains an empty title attribute, which prevents it from showing a pop-up 'tooltip'.

 title=""

Readers are used to looking for tool-tips in puzzling interface elements. Why not put some meaningful information there, which would help users figure out what this is? How about something like:

 title="Jump back to footnote 1 in the text"


Michael Z.

This is actually a "feature" of wikitext rather than this extension, and since it's basically just a macro that generates wikitext (from a final output point of view) the extension itself doesn't have control over the title attribute, it just sends wikitext to the parser for rendering. You'll notice that the same thing happens when you put code like [[#foo|bar]] on a normal page. I've added this to the issues list so that people are aware of this. —Ævar Arnfjörð Bjarmason 14:57, 12 January 2006 (UTC)Reply

Parsable ID, using hyphens

If the ID assigned to the notes used the hyphen as a separator (instead of underscore), then it could be parsed using the CSS2 Hyphen Attribute Value Selector. [1] The current format is like the following:

 <li id="_note_NoteID">Note<li>

If it instead used a hyphen to separate the parts:

 <li id="_note-NoteID">Note<li>

Then all notes could be formatted using a CSS selector like this (in a modern browser; MSIE/Win doesn't support this):

 li[id|="_note"] { . . . }

Michael Z.

I didn't know you could do that, I've fixed it. —Ævar Arnfjörð Bjarmason 15:21, 12 January 2006 (UTC)Reply
The hyphen-attribute selector is CSS2; supported by Firefox, Safari, Opera, but not MSIE. Thanks for changing it. —Michael Z.

Order of references

Is there any way to control the order in which the references appear at the end ? In Maharajkumar of Vizianagram for instance, references 2-5 are in the different parts of the article but since they are all from the same book, they are listed together at the end. Will I be able to do the same with this scheme ? 208.246.215.5 00:04, 11 January 2006 (UTC)Reply

Flushing of previously-used references

One nice feature to have would be a flush attribute to <references />, so that using <references flush="yes" /> would delete all of the previously-used citations. This would be useful in en:Comparison of operating systems, for example, where each section has footnotes. æle 20:53, 13 January 2006 (UTC)Reply

That would actually be pretty neat, although it's hard to do because you can't guarantee top-down parsing (and it being consistent with other tags) when you have multiple tags. —Ævar Arnfjörð Bjarmason 21:27, 14 January 2006 (UTC)Reply
Maybe you could have "types" of references, so that you could have <ref type=book>{{Book reference…</ref> and <ref type=web>{{Web reference…</ref>, then display them with <references type="book"/> and <references type="web"/>. You could then have <references type="all"/> display absolutely everything, and <references/> display those without a specified type. HTH HAND —Phil | Talk 12:19, 17 January 2006 (UTC)Reply

Wikitext is not HTML

This reference style is contrary to the spirit of w:wikitext, which is supposed to be free of such line noise. It renders pages uneditable (by novices and experienced editors alike) and unmaintainable. Is there a poll somewhere where this abomination can be opposed?

chocolateboy 05:30, 21 January 2006 (UTC)Reply

Er.. well, a Wikitext way of handling this wasn't obvious, and there are other HTML/XML style tags in use in Wikipedia (see <charinsert> for example, or <gallery>, etc). I strongly disagree with your assertion that it makes pages "uneditable and unmaintable". HTML is well known, and it made more sense to use an HTML-like syntax than to use some "abomination" that was non-obvious or difficult to use/type. Using HTML-style markup also makes it easy to extend the syntax (add additional attributes to the psuedo-tags). —Locke Coletc 08:55, 21 January 2006 (UTC)Reply
Can you cite some specific issues you have with it? "contrary to the spirit of wikitext", "line noise", "uneditable" and "unmaintainable" are all big statements but you fail to provide anything to back them up. What exactly do you have an issue with and how should that be fixed? —Ævar Arnfjörð Bjarmason 01:40, 22 January 2006 (UTC)Reply

---

a Wikitext way of handling this wasn't obvious

What's wrong with plain old {{ref|foo}} and {{note|foo}}?

Which flavour of footnote did you actually have in mind?
This and this (and also this and this which describe obsolete systems which apparently are still operational even though deprecated) show no less than five tags for creating a reference (and I might have missed one):
  1. {{Template:ref}}
  2. {{Template:ref label}}
  3. {{Template:fn}}
  4. {{Template:an}}
  5. {{Template:mn}}
each of which must be coupled with the correct corresponding tag for the footnote to work properly.
There are also various systems in place for renumbering footnotes; it is unlear which of the above tags each system will sort properly.
Replacing this lot with a single uniform method would seem to be an excellent idea. HTH HAND —Phil | Talk 12:48, 23 January 2006 (UTC)Reply
What exactly do you have an issue with and how should that be fixed?

Isn't it obvious? See the debate over HTML entities for endash and emdash on w:Wikipedia talk:Manual of Style (dashes) for long prior discussion of this issue. Wiki means "quick", and wikitext is supposed to be quick and easy to edit by nontechnical users. This solution betrays both of those principles. Sure, we could all write markup in XML, which would provide the ultimate in flexibility and expressiveness, but that's not the Wiki way:

The source format, sometimes known as "wikitext", is augmented with a simplified markup language to indicate various structural and visual conventions.
The reasoning behind this design is that HTML, with its many cryptic tags, is not especially human-readable. Making typical HTML source visible makes the actual text content very hard to read and edit for most users. It is therefore better to promote plain-text editing with a few simple conventions for structure and style.

&c.

Also, I don't understand why this is being discussed here rather than on Wikipedia.

Because "Wikipedia" (I'll presume you're meaning enwiki) is one of approx. 800 Wikimedia projects that use this and this is also used outside Wikimedia, the metawiki is an appropriate place to discuss issues relating to more than one project. —Ævar Arnfjörð Bjarmason 16:44, 22 January 2006 (UTC)Reply

chocolateboy 05:24, 22 January 2006 (UTC)Reply

Chocolateboy - please see the comparison between ref/note and Cite.php style I just added to the page. In fact, Cite.php is about as close to ref/note style as is possible, and it provides a number of advantages(which I can list, or you can just look at the page). I suppose a syntax like {{ref|name of note}}text of note{{endref}} and {{references}} could be used, but really, is that so much more evil than <ref name="name of note">text of note</ref> and <references/>? And others can probably provide reasons why even that syntax would have problems(i.e. it would look like a template, but actually be MediaWiki code, and probably some more subtle ones, too). What was your objection, again? JesseW 08:21, 22 January 2006 (UTC)Reply

The comparison only demonstrates that this solution is redundant as well as contrary to the spirit of wikitext, which is supposed to be easy to edit. And yes, it is much more evil for the reasons outlined above, which is presumably why it's been snuck in without discussion.

No it does not, the purpose of this tool is to provide a way to automatically generate a table of references, something you'd have to do manually with the tools you suggest. And as a general note could you please avoid snide comments like "snuck in without discussion." (you'll find there has been plenty of discussion and announcements if you do some searching) as well as accusing me of some conspiracy to make people use Dreamweaver (below), please stay on topic. —Ævar Arnfjörð Bjarmason 16:44, 22 January 2006 (UTC)Reply
What was your objection, again?

See Wiki and Wikitext:

MediaWiki, the software that runs Wikipedia, has a wiki markup language that allows many common HTML tags, but provides a simple, readable syntax that is intended to allow users to use it without knowing HTML. A description can be found at How to edit a page.

I look forward to your overhaul of these pages to reflect this clandestine campaign to turn Wikipedians into Dreamweaver customers.

The syntax that's used for this is not HTML, any more than any other wikitext construct is HTML. Just because it uses angle brackets and not curly brackets or square brackets does not make it HTML. —Ævar Arnfjörð Bjarmason 16:44, 22 January 2006 (UTC)Reply

If you want a specific example, please scroll down to the last paragraph here, and explain how that is more readable, maintainable, or useful than this, and how it squares with the Wiki tenets of quick and easy editing.

chocolateboy 13:49, 22 January 2006 (UTC)Reply

Ævar, could you "please" avoid dismembering comments with interlineations. The civil way to reply is to quote. I have searched, and have found only a "this is a fait accompli" announcement, rather than a "should we violate the principles of wikitext?" discussion. As for your other "objection", please see the HTML format comments above.

(I'm not flaming your coding. And I think the comments on your homepage are, frankly, adorable, so stop licking your "wounds".)

The topic, by the way, is Wiki and Wikitext...

chocolateboy 00:48, 31 January 2006 (UTC)Reply

Uh...Johnleemk's comment

Frankly, this discussion is very confusing, so I thought I'd break off into my own section and avoid any dismembering of my remarks. (It would probably help if chocolateboy didn't constantly break his comments into short paragraphs, which become ugly after several comments.) Anyway, I think chocolateboy is misreading policy here. As Ævar said, something that uses angle brackets isn't automatically HTML any more than it's automatically Cold Fusion. It resembles HTML, but it's plainly not. There's no such thing as a ref tag in HTML, AFAIK. This seems rather pedantic to me - would things suddenly be alright if we used [ref]foo[/ref] instead? While I agree this is rather messy when it comes to editing, it's not really as daunting as it might seem if enough spacing is used. Since I don't use the preformatted templates to cite sources, the footnotes I use are rather easy reading, even in edit mode (see, say, en:ketuanan Melayu or en:Article 153 of the Constitution of Malaysia). Furthermore, this format beats the old templates flat when it comes to previewing (c'mon, don't tell me you haven't been pissed off just once by losing your edits after accidentally clicking a footnote in preview mode), section editing (I don't need to perform mental gymnastics to footnote properly, which is a real pain on long articles), etc. Johnleemk 09:36, 4 February 2006 (UTC)Reply

Whether the Cite.php syntax more closely resembles HTML, XML or Cold Fusion is irrelevant. The point is that it doesn't resemble Wikitext as defined here and here.
chocolateboy 13:31, 24 February 2006 (UTC)Reply


Doing it later

I think that I agree that this is not wikitext. Ævar's example above, having proper start and end tags is still XML in spirit, even if you use a different escape character. The correct solution would be something like {[Jeff 1999|How to do it in the Snow; computers and weather, Jeff Jeffersen, 1999, Casanopress]}. However, there are a very limited number of such possible escapes. Plus it needs to be something which is extremely rare in the current wikipedias. Rare enough to be fixable in every individual case. [, [[m, {{ etc. are taken. @ delimited text, for example, wouldn't work (like @ref here@) since email addresses use that symbol.

However, XML text is perfectly standard in wikipedia. <nowiki> being the classic example. I think it's perfectly appropriate to start with an XML style system and then, when we have a clear agreement what the better alternative is, implement a compatible non-XML system. What is really needed is proper harvard references, side templates etc. implemented on top of Ævar's current syntax. Preferably with user configuration options to allow each different system to be compared on the same pages.

Finally, if wikimedia can be "fixed"/improved so that the current system interacts well with templates, a simple template based syntax might be perfectly acceptable whilst just keeping the current syntax. Mozzerati 10:49, 4 March 2006 (UTC)Reply

Agreed. There's no need to get nasty about what a travesty this is. Once the kinks are ironed out, it's simple enough to conjure up a more wiki-like syntax for this mechanism, and do a global search-and-replace on the wikis. (BTW, I'd just like to add that I was delighted to stumble across this mechanism in an article just now. Glad to see there's finally a simple, powerful citation mechnaism.) --199.246.40.54 21:24, 13 March 2006 (UTC)Reply

BUG?

There seems to be a problem with cite.php at the moment. See: En:Wikipedia:Village pump (technical) 150.203.178.30 04:33, 27 January 2006 (UTC)Reply

Another example of an issue with Cite - see en:List of temples of The Church of Jesus Christ of Latter-day Saints. The first cite was not working so I put a null cite in so that the rest would work fine as a workaround. Trodel 17:58, 29 January 2006 (UTC)Reply

Example text

I get the following for the reference list in the example text

Uranus's moons were observed to be declining in orbit[1], by the Hubble space telescope[2], the Martians were not available for comment on the matter[2]. The New York times[3] however reported[3] that ...

^ NASA

^ 2.1 2.2 December 2005 issue, page 12

^ 3.1 3.2 January 2006 issue, page 16

Is that what's meant to appear? If it were real text, how would the person know that source number 2 was "Popular Science"? Thanks, Andjam 09:50, 5 February 2006 (UTC)</ref>Reply

Is the example better now? encephalon 01:26, 13 February 2006 (UTC)Reply

Awesome work

Ævar, I just wanted to say thanks for doing this: it's a very compelling solution to some of the problems we've had with the earlier systems (FN1-4). One concern is the inline references cluttering the source text; editing articles can become very daunting, especially if cite.php is used in conjunction with a "prompter" template for reference styles. See for example en:Template talk:Cite journal#Cite.php compatibility. Is implementing Splash's suggestion feasible? I've just noticed that Taxman raises the same concern above. I'm not sure I understand your suggestion correctly. If I placed span.reference { display: none; } in my css, what exactly happens? Will I be able to see the inline refs in the edit box? Regards encephalon 00:34, 13 February 2006 (UTC)Reply

Suppressing a citation

A big problem with using Cite in a real wikipedia article is that when the citations are large, it makes editing the article difficult.

One workaround is having the ability to suppress printing the number of a citation. That way, an individual can put all the references for an article at the top, cite them in the article, and flush them at the bottom.

I was thinking of something along the lines of <ref name="one" suppress="true">This is a long reference</ref>

The above should be rendered as a space or not at all (some sort of hidden attribute). In this way, all the references can be placed at the top of the article (maybe with a comment in the HTML saying that they should all go there), not get rendered at the top, get cited in the text, and flushed (shown) at the bottom.

Ksheka 13:21, 21 February 2006 (UTC)Reply

Addendum - I notice that if the reference is defined in a comment, the reference number is not printed out. This is near-perfect! The only problem now is that when the references are flushed, there is a backlinking pointer to the initial references (which is not visible. Here is an example of what I am trying to do. Notice that when editing the article, the text is easier to read (and edit).
If there was a way to disable the backlinking pointers from the reference section to the article itself, I would consider this a complete solution. Ksheka 14:00, 21 February 2006 (UTC)Reply
Addendum 2 - I discovered the obvious problem with what I said, above. If the references are defined at the top of the article, they have to be in the same order as they are in the body of the article, otherwise the numbers are off.
I guess the solution is that the references have to be defined at the bottom of the article, and allow for references to be used in the body of the article without being defined yet. Ksheka 19:42, 21 February 2006 (UTC)Reply
In which case do the references at the end need to be in order ? ie is the numerical order defined by their occurences up in the main text of an article ? If this works (?currently so, or could be made so) then the only required feature would be to suppress forward-links to the hidden list of citation details. DavidRuben(talk) 12:55, 28 February 2006 (UTC)Reply
What I mean is that, if the references are defined in a comment section at the top of the article they are assigned numbers based on the order they are defined there. So, if they are referenced in a different order in the body of the article, the references will be out of order. Not a big deal, really. It just means that in the text you might have reference #4 before reference #1. The references will match up with their proper definitions, so no real harm done. (And fairly easy to fix, by just re-ordering the references in the comment section.) Ksheka 15:55, 3 March 2006 (UTC)Reply
Do not do that, that's a bug in the parser that's going to be fixed. Relying on parser bugs to do what you want is a very bad idea. —Ævar Arnfjörð Bjarmason 17:00, 4 March 2006 (UTC)Reply

Regarding pre-defined references

A lot of people have been suggesting using something like <ref value=something silent=yes>reference here</ref> due to reference definitions inline looking like line noise.

I'm aware of the problem and will try to get to implementing it along with other improvements soon-ish, hopefully this weekend.

Sorry for the delay, busy with life;)

--Ævar Arnfjörð Bjarmason 15:33, 23 February 2006 (UTC)Reply

Update

I implemented displaying named references as if they were anonymous references when only one is defined, i.e. you'll never see output like:

  1. a Ref text

If someone could update the ref example to reflect this that would be nice, I'm too lazy;) —Ævar Arnfjörð Bjarmason 22:15, 23 February 2006 (UTC)Reply

Locating referenced articles?

One of the advantages of footnote2/3/4 along with several other systems was that since they used templates, articles using them could be easily located e.g. for updates / statistics / surveying / correction. This doesn't seem to work with <ref>. Is there an easy way to implement this? If not, would it be an idea to hide the actual ref tags behind a simple template which would make the articles locatable? Eventually, I guess, we would want to have the reverse. Locate articles which do not have references. Mozzerati 13:44, 26 February 2006 (UTC)Reply

You can't encapsulate ref tags in templates due to limitations in MediaWiki, and even then it wouldn't be a good idea.
Regarding logging then yes, it's very possible. In fact I've been logging usage of it since it was deployed but I can't give users general access to the method I'm using due to scalability issues. But keeping a link table for parser extensions would be very possible and not a bad idea.. —Ævar Arnfjörð Bjarmason 20:03, 26 February 2006 (UTC)Reply

Problems with Cite.php

I have installed Cite.php on my fresh Mediawiki 1.5.6 installation. When I include a <ref>, it causes this PHP error:

Fatal error: Call to undefined function: array() in [full path ommitted]/mediawiki-1.5.6/includes/Parser.php on line 427

Is there something I am missing here? -James Howard (talk/web) 23:07, 26 February 2006 (UTC)Reply

See the #Problem installing section above. —Ævar Arnfjörð Bjarmason 03:03, 27 February 2006 (UTC)Reply

Syntax question

Is it necessary to include the whole stuff like: <ref name=Marx>Marx, J. L. New disease baffles medical community. Science. 1982;217(4560):618-621.</ref> wherever a citation occurs, or would it be enough to do <ref name=Marx> when the quotation is used a second, third etc. time? It sure would help a lot. Kosebamse 09:27, 2 March 2006 (UTC)Reply

Update: It seems that <ref name=Marx/> is what I was looking for, but thta is apparently not mentioned in the desription. I don't understand this well enough to rewrite the description, but this should be mentioned. Kosebamse 10:12, 2 March 2006 (UTC)Reply

Done. encephalon 14:15, 4 March 2006 (UTC)Reply

Flushing out silent references

It has been suggested that an option be added to the <ref> tag to allow a reference to be defined which does not appear in the text at the point of definition; these references could then be used by means of the <ref name=caption/> syntax. I would like to suggest that all such references which have not already been used or which have no name attribute should be flushed out during the processing of the <references/> tag: they should be added to the bottom of the numbered list, as a non-numbered list.

So for example, a ==References == section like this (assuming that a silent reference is defined using <ref_silent>):

==References ==
<references/>
<ref_silent>Author, A.N. ''Some book or other''</ref_silent>

would appear as:

References
list of numbered references as usual
  • Author, A.N. Some book or other

This would aid massively in converting current reference lists to the new format. HTH HAND —Phil | Talk 08:14, 6 March 2006 (UTC)Reply

Allowing sub-references

There are many places where it is necessary to refer to several different parts of the same work. See for example en:Gettysburg Address where the first footnote is linked to from three different places, corresponding to three different page-ranges. See also en:Mahatma Gandhi where almost all the footnotes are to the same work, which is displayed in the subsequent list of references: the former are not linked to the latter, so it is not immediately obvious that they are the same. I would like to propose that references be given an extra attribute—section—which would allow the particular section to be specified. Section references would be displayed as sub-lists of the main reference.

Taking the en:Mahatma Gandhi example as a guide, references might be defined like this:

Some stuff <ref name=source>Author, A.N., ''A book''</ref> and some more stuff<ref name=source section="Page 31"/>. Yet more stuff<ref name=source section="Appendix 1"/>.

which might be displayed in the ==References == section like this:

References
  1. ^ Author, A.N. Some book or other
    • a Page 31
    • b Appendix 1

This would drastically simplify the interaction between "footnotes" and "references" which appear to function independently in many places because linking them is too complicated. HTH HAND —Phil | Talk 09:06, 6 March 2006 (UTC)Reply

YES. I would love to have this. It makes life so much easier, and you don't have to resort to things like ibid or op cit. Johnleemk 16:49, 9 March 2006 (UTC)Reply

Distinguish between references to same item

If you have several different references to the same item, you get "sub-reference" letters (a, b, etc) in the reference list: these link back to the various references. However there is nothing in the reference link to distinguish between these "sub-references": they all display as something like [2]. Is it possible to format these links as [2a], [2b], etc? HTH HAND —Phil | Talk 14:17, 6 March 2006 (UTC)Reply

Yeah, it's not fun having people bitch at you about "ZOMG, the references are out of order!" Johnleemk 16:50, 9 March 2006 (UTC)Reply

Refs in templates?

First, I really like the ref/reference format of referencing as opposed to all previous formats. However one problem I have is that if you include a >ref< entry in a template, when that template is included in another page the references to not show up in the >references< section on that page. Is this fixable? — en:User:Jdorje 65.184.68.155 22:58, 6 March 2006 (UTC)Reply

Possible bug

I've just noticed that if you put <ref name=foo/> before <ref name=foo>foobity foobity boo</ref>, then neither of them will have a name at the bottom. This is a problem if you're going through and adding more citations later, as you always have to make sure that the cite with with the full name is first.

i am also having problems with this kind of bug. there is a discussion about it at http://en.wikipedia.org/wiki/Wikipedia:Footnotes and one user suggested this:

:I think a simple way to accomplish this would be for the software to use the first non-empty ref. Then, as long as you use empty references (like <ref name="slime" />) for all but one reference, the order doesn't matter.

would it be difficult to implement this? cheers. 62.177.95.239 14:02, 11 March 2006 (UTC) english wikipedia: [User:Zzzzz]Reply

Also, in terms of chocolate boy's problem with this cite style, I do have a certain sympathy with him. When simply trying to edit an article for something small like a comma, it can be hard to scan past a full citation within the text, with all its commas, parentheses, and quotes. It's easy to read through a <ref>foo</ref>, but much more difficult to scan past <ref name="Troubadours, trouvères">John Stevens,Ardis Butterfield,Theodore Karp. "Troubadours, trouvères", ''[[Grove Dictionary of Music and Musicians|Grove Music Online]]'', ed. L. Macy (accessed [[February 20]] [[2006]]), [http://www.grovemusic.com/ grovemusic.com] (subscription access).</ref>. Just a couple thoughts, but I do really like this cite, nice work. Makemi 04:07, 8 March 2006 (UTC)Reply

So write it like this:
 Hey, here's a sentence that has a reference at the end.
 <ref name="Troubadours, trouvères">
    John Stevens,Ardis Butterfield,Theodore Karp. "Troubadours, trouvères",
    ''[[Grove Dictionary of Music and Musicians|Grove Music Online]]'',
    ed. L. Macy (accessed [[February 20]] [[2006]]),
    [http://www.grovemusic.com/ grovemusic.com] (subscription access).
 </ref>

-- P3d0

And another thing

If you subst templates, even while they're in the ref, it works out fine. Makemi 04:14, 8 March 2006 (UTC)Reply

Subst

Huh? I just came here to point out that subst:ing templates within a <ref> fails. Have a look at this old version of Wikipedia article Charles Fraser. To save time I have subst:ed in references that I use a lot, and the subst: has failed dismally. Snottygobble 04:28, 12 March 2006 (UTC)Reply

You're right, I just tried it in the sandbox, but I could have sworn that that's what I did in this edit. Perhaps it has been broken since? I could be mistaken. Makemi 18:37, 13 March 2006 (UTC)Reply

What's wrong with numeric labels?

Trying to use a label containing only digits

<ref name="123">blablabla</ref>

gives an error

Cite error 1; Invalid call; expecting a non-integer key

Is it a bug or a feature? I don't see any reason to disallow numeric labels.

Anyway this should be documented. Maxim Razin 08:44, 14 March 2006 (UTC)Reply

This is because the PHP datastructure I'm using would corrupt if I were to allow user input in the form of integers since PHP does not distringuish between (string)1 and (int)1 in array keys. This minor limitation makes the implementation a lot simpler because I don't have to use two or three datastructures to do basically the same thing. This is actually documented in the source code (with a comment). Ævar Arnfjörð Bjarmason 11:58, 17 March 2006 (UTC)Reply
I see - yet another reason why PHP sucks :) But it's easy to fix - simply append some prefix to all strings in keys. Maxim Razin 08:16, 18 March 2006 (UTC)Reply

discussion at en:talk:Cite journal

If some developers of cite.php could possibly take a look at the discussion at en:Template_talk:Cite_journal#Wikipedia:Featured_article_candidates.2FAIDS. Thanks, --Irpen 02:02, 21 March 2006 (UTC)Reply

Also, could you take a look at the page: Wikipedia:Featured article candidates/AIDS. Thanks. --132.239.240.95 17:56, 21 March 2006 (UTC)Reply

A different idea

I mostly like the new references, but they have a lot of shortcomings. I used them for the first time in Red rain in Kerala, and these are the things I didn't like/ideas I had:

  1. They interrupt the article text a lot more than other styles. Content like:

As well as red rain, some reports suggested that other colours of rain were also seen. Many more occurrences of the red rain were reported over the following 10 days, and with diminishing

frequency until the end of September.becomes:

As well as red rain, some reports suggested that other colours of rain were also seen <ref>{{cite web | last = Ramakrishnan | first = Venkitesh | authorlink = | coauthors = | year = 2001 | url = http://news.bbc.co.uk/1/hi/world/south_asia/1465036.stm | title = Coloured rain falls on Kerala | format = | work = | publisher = BBC | accessdate = March 6 | accessyear = 2006 }}</ref>. Many more occurrences of the red rain were reported over the following 10 days, and

with diminishing frequency until the end of September.
  1. Editing the format of a reference requires finding where it is first cited in the article, instead of just editing the References section, where it appears. This is confusing (especially to newcomers) and inconvenient.
  2. Section editing is useless if you want to change references. You can't just edit the References section because that's not where the references actually are. You can't just edit the section that contains the reference since that's not where the rendered references are (so they won't show up in the preview). You have to edit and preview the entire article to see the change.
  3. Since they aren't centralized, it's hard to know if a reference exists already, leading to duplicates which then have to be merged manually.
  4. Additional references that aren't created with the extension, but added to the References section (as per WP:CITE) do not continue the numbered list.
  5. I heard the reason for using brackets around the numbers was to increase the clickable area. I think the brackets should be removed and the same thing done with CSS; increase the horizontal padding around the numbers and vertical arrows to make them more easily clickable instead. Discussion was here: w:Wikipedia_talk:Manual_of_Style#Changes_to_Cite. and w:Wikipedia_talk:Footnote3#Superscripts_2.
  6. If a named reference is used in an article, and another reference to the same document is placed before that one, it doesn't work. The reference has to be moved to the first position instead of just using the name, since the text inside the first reference determines the displayed text. This is a huge pain.
  7. (Curiousity; not a problem: Is there any reason why it has to look like well-formed XHTML? Instead of <ref name="something"/>, why not just <ref something>? Is it thought that the functionality might be expanded? Why wasn't it based on the syntax already in use for [external link references]? Why isn't it more {{wiki-like}}? Our syntax is quickly becoming completely impossible for the average non-computer scientist to edit. No wonder we're accused of systemic bias.)

A better way?

A better implementation would have the context and format of the reference centralized in the references section, where it actually appears, and the context of the particular fact near that fact:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<ref name="foo"/> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<ref name="bar"> pages 34–37</ref> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<ref name="bar">Section 7.1: Table of baz</ref> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<ref name="foo">page 56</ref> == References == <references> <ref name="foo"> {{cite book | first = Foo | last = Bar | authorlink = Foo bar | year = 1587 | title = Research into the inclusion of references in online encyclopedias }}</ref> <ref name="bar"> {{cite web | author=R.L. Bar | title=Talking to your children about HTML addiction | year=April 30, 2005 | url=http://www.example.com/ | accessdate=July 6 | accessyear=2005 }} </ref> </references>

which would render as:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.1

References

  1. Bar, Foo (1587). Research into the inclusion of references in online encyclopedias.
    1. page 56
  2. R.L. Bar (April 30, 2005). Talking to your children about HTML addiction. URL accessed on July 6, 2005.
    1. pages 34–37
    2. Section 7.1: Table of baz

I think this might even be backwards compatible with the current syntax. (I can't demonstrate the padding method without editing the site-wide CSS.)

For ease of use, you could still insert full references next to a fact, like we do with [external link] references or the current ref system, but, on saving the page, it would be given a name (if you didn't give it one) and the actual content moved into the references section.

References could be merged by putting both names around the same content:

== References ==

<references>
<ref name="foo"> {{cite book
 | last = Bar
 | first = Foo
 | authorlink = http://www.university.edu/~foobar
 | year = 3702
 | title = Research into the inclusion of references in online encyclopedias
}}</ref>
<ref name="baz">
{{cite web
 | author=Dr. Foo Bar
 | title=Research into the inclusion of references in online encyclopedias (e-book)
 | year=3702
 | url=http://www.university.edu/~foobar/e-book/index.html
 | accessdate=July 6
 | accessyear=2005
}}
</ref>
</references>

could be merged together like so:

== References ==

<references>
<ref name="foo"> 
<ref name="baz">
{{cite book
 | last = Bar
 | first = Dr. Foo
 | authorlink = http://www.university.edu/~foobar
 | url=http://www.university.edu/~foobar/e-book/index.html
 | year = 3702
 | accessdate=July 6
 | accessyear=2005
 | title = Research into the inclusion of references in online encyclopedias
}}
</ref>
</ref>
</references>

without editing every ref in the article to the combined name. Then if it turns out they're from different editions of the same source text, they might need to be broken apart again later, but the actual reference sources are still there. — Omegatron 05:00, 23 March 2006 (UTC)Reply