User:John Broughton/Cite.php version 2

From Wikipedia, the free encyclopedia

Cite.php version 2 is a proposal to create an enchanced version of the current footnotes system in Wikipedia. Conceptually, this moves Wikipedia further away from the "blank slate" methodology of edit pages (vanilla wiki), toward more specialized features appropriate for a high-quality encyclopedia. Operationally, this version of php.cite would make it very easy for inexperienced editors to add a citation, and would encompass Harvard referencing as well as footnotes, again simplifying the citation process.

See December 2007 discussion of ref tags - much detailed thought there.

Goals[edit]

  • To end the endless debate about the advantages and disadvantages of having the text of citations embedded in the body of articles, as the current cite.php system does. (See M200G Volantor for a demo of how far cite.php can be stretched to avoid having footnote text in the body of an article.)
  • To end the technical bifurcation that exists with (Chicago-style) footnotes (cite.php) and Harvard referencing (now generally done with templates), and to eliminate the need for the hybrid approach used in articles such as Charles Darwin.
  • To make citations easier to add and more logical for relatively inexperienced editors.

What goes where[edit]

Body of the article[edit]

  • In the body of the article, an editor would simply put <cite name="foobar"> (If no quotation marks, the system assumes that everything between "=" and ">", excluding leading and trailing blanks, is the name of the source.) This is NOT a paired tag; there should be no trailing "/" within the tag. (The software might simply ignore a trailing "/") The "name=" parameter is mandatory. (If not present, the system shoulld generate an error.)

There is an optional parameter for page numbers, so that the tag can also be <cite name="foobar" page=112>.

Citations section[edit]

Data entry[edit]

  • The TEXT of each citation goes into the Citations section. The header for this section is software-generated (similar to an article's table of contents) and isn't available to be editing (in edit mode, it isn't visible). This allows for the name to be “References”, “Footnotes”, “Notes”, “Citations”, or whatever, based on editor choice (see below).
  • Citations in this section should be in the format:
  • Footnote information (use of a citation template is optional)
  • Footnote information

All citations require a name; <cite> by itself is a bad tag.

Citations should be in alphabetical order (by the "name" parameter). If they are not so sorted, it will inconvenience editors (see below) and will cause Harvard references to be listed out of order. (The alternative is to have the software do the such a sort, when saving the file, which might not be that difficult to program.)

Storing data[edit]

The text of footnotes is stored, by the system, between a <citations> tag and a closing </citations> tag, but the ending tag is only visible when viewing the source for a page; it is system-generated.

An editor manually adds (in normal edit mode) a <citations> tag (the closing tag isn't needed) to specify the location of this section within an article. This tag can be moved by normal editing.

What the reader sees[edit]

Body[edit]

Where there is a <cite>, the reader will see a superscripted footnote number. Also displayed will be a superscripted "p. XXX" if the page= parameter is used.

Also displayed should be a superscripted text that reads "link" (and is a link) IF the text of the footnote is templatized and the url= parameter has a value. (This last feature eliminates any advantage of the embedded citations method.)

(Functionality for both the superscripted page number and the superscipted link is currently available via the {{Rp}} template.)

Citations section[edit]

Citations are displayed as is currently the case, except that the "name=" parameter of a citation should display when the cursor is over it (tool tip? popups?).

If a citation exists in the citations section without any corresponding tag in the body of the article, the citation is ignored. That's because the software uses the <cite> tags to build the citations section, on the fly. (Rather than having the software flag such ignored citations, tools should be built that can compare <cite> tags to information in the Citations section, and note discrepancies (either way) that a human editor would need to take care of - perhaps posting a list to the article talk page.)

Editing[edit]

The entire page[edit]

In edit mode, there are TWO edit boxes, not one. The top edit box is the page or section being edited; if a section, the <citations> tag is never visible (because it's in its own section, if it exists). The lower edit box (which is just below the top edit box, so it's above the edit summary) is the citations edit box. It shows the text of citations, and is present even if there are no citations for the page at the start of the edit. The lower box does not show the two <citations> tags.

If the editor makes no changes to the citations (lower box), he/she should check the "No changes" checkbox; this reduces server workload and speeds up saves.

If an editor adds text to the lower box and there is no <citations> tag on the page (that is, there were previously no citations), the software makes a "best" guess as to where to put the tag, and does so

A section other than the citations section[edit]

This is the same as editing the entire page, except:

  • Only applicable footnotes are shown (essentially, the system does a "pre-build" to identify citations in a section before opening the section for editing).
  • When doing a preview, the system shows (applicable) footnotes (essentially a mini-citations section).
  • When doing a save, the system actually does TWO saves. If locks the citations section, then tries to save the section being edited. If that fails due to an edit conflict, it behaves as it now does, adding a "Your text" box at the bottom of the page.
    • If the section save succeeds, then the system tries to save the citations section. If that fails, only the second text box, plus a diff, plus the "your text" box are displayed.
    • The edit summary for the first save is done exactly as now; for the second save, "FS:" is prefixed to whatever is in the edit summary box.

The Citations section[edit]

If an editor is editing only the citations section, then the top edit box isn't visible. There (obviously) is only one save, not two.

Additional notes[edit]

Harvard citations[edit]

When in edit mode, there should be a checkbox just above citations edit box that says "Use Harvard referencing. If the box is checked, then the system use the name=parameter to display citations in the Harvard referencing system. (That means, of course, that editors use appropriate citation names, such as name="Smith, 2002".

If this checkbox is checked, the system does not display superscripted numbers (footnote numbers). Instead, the citation name ("Smith, 2002") is displayed as the link to the citation text in the citations section. If the page= parameter is in the cite tag, it is displayed Harvard-style.

The system also changes the citations section header to "References". This approach would allow elimination of all of the Harvard-specific templates (other than, possibly, Harvard citation templates).

Note: the value of this checkbox is stored in the <citations> tag when saving the page; it's visible only when looking at the page source.

<citations> tag parameters[edit]

In addition to the harvard="Y" parameter, there should be parameters that specify the font size, number of columns, etc. The values for these parameters are set via checkboxes, in edit mode, that say "90% font size", "80% font size", "two columns", etc. Again, the values for these checkboxes are stored in the <citations> tag when saving the page; they are visible only when looking at the page source.

Conversion[edit]

Conversions of footnoted articles could be done by an editor invoking a tool/bot for a single article. The tool/bot would validate that every <ref></ref> pair had a "name=" parameter and that there was a <references /> tag or a {{reflist}} template in place.

It's not clear how easy it would be to use an automated approach to convert pages using the Harvard citation method.

The current cite.php system would be deprecated but would stay in place (forever, presumably) so that older pages continue to display correctly.