User:Omegatron/Sandbox/Cite

m:Talk:Cite/Cite.php

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:

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. Many more occurrences of the red rain were reported over the following 10 days, and with diminishing frequency until the end of September.
 * 1) They interrupt the article text a lot more than other styles.  Content like:
 * 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 and w:Wikipedia_talk:Footnote3.
 * 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, why not just ?  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 ?  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. 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. 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. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. == 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

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

I think this might even be backwards compatible with the current syntax.

Other additions
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: