Wikipedia talk:Citing sources/Example edits for different methods

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Shortened notes with wikilinks vs. HTML 5[edit]

The Shortened notes with wikilinks section of this sub-article may need to be revised. See the discussion at Template talk:Citation#HTML cite element. I add parenthetically that this is one example of a good argument for using templated cites rather than resorting to hand-coded HTML. It looks like someone may need to code up a WP:bot to root out hand-coded HTML cite element usage which is noncompliant with HTML 5. -- Boracay Bill (talk) 01:06, 6 January 2009 (UTC)

Excellent[edit]

This is an excellent detailed review of how use in practice multiple different citation methods. I commend the authors on their thoroughness. --User:Ceyockey (talk to me) 05:14, 3 January 2010 (UTC)

I'm wondering: is it necessary to have so many different citation methods? I'm confused as to why Wikipedia hasn't decided on one and made it standard. I'm not sure which to use. I'm going with the short footnote and full reference; seems simplest.--TheSoundAndTheFury (talk) 14:57, 17 February 2010 (UTC)

Planned edits[edit]

Simplification of rendering[edit]

When this project page initially appeared (kudos to SallyScot), the rendering was dummied-up because of a cite.php bug which existed at the time. That bug has since been fixed. Therefore, unless someone sees a good reason not to do this, I plan to edit this page so that the rendering is done directly by echoing the associated example wikitext. I've done a test-run of this here for interested editors to take a look at. Comments? Wtmitchell (talk) (earlier Boracay Bill) 03:56, 18 February 2010 (UTC)

There having been neither comment here nor intervening edits to the project page, I've moved my test-run edit mentioned above into place. Wtmitchell (talk) (earlier Boracay Bill) 00:39, 21 February 2010 (UTC)

Expansion[edit]

I've long thought that the examples could use expansion to illustrate some techniques for handling complications which impact Refs in general. Looking at the example text, I see that the initial sentence of the final paragraph has no Ref. The full cite for (Kummer 2003) just cites a single chapter of that book. The Ref for that is named but is not reused, The cited chapter has material on page 152 which relates to that presently unsourced sentence.

I'm thinking of changing that initial sentence to agree more closely with (Kummer 2003:152), and using that to illustrate some things. Here's what I now think I'll do:

  • in the first Shortened notes example, just re-use the Ref named Kummer2003 at the end of that sentence, and probably add some explanatory text about that.
  • in the rest of the Shortened notes examples, don't reuse the ref, but make it two separate refs, the first giving a page number range for the cited chapter and the second citing p.152. The full cite would appear in the first Ref, and the second Ref would link back to that.
  • in the Full references examples, the added ref would render as "Op. cit. Kummer 2003, p. 152", and would link to the full citation in footnote No. 1.

Also, I'm thinking of moving the the Shortened footnotes examples below the Full References examples, and pointing out that using shortened footnotes allows editors to control the ordering of the citations.

Comments? Wtmitchell (talk) (earlier Boracay Bill) 03:56, 18 February 2010 (UTC)

Yes check.svg Done Wtmitchell (talk) (earlier Boracay Bill) 03:08, 21 February 2010 (UTC)

Highlighting[edit]

This is actually part of what should be a larger discussion and probably in a different venue, but I'm starting here with this particular bit because it has immediate relevance here.

Note in the Shortened notes with wikilinks section of the project page, the highlighting of cites has been broken; it still works in the Shortened notes with {{Harvnb}} and {{Citation}} links section. This is because the rules have changed, and the hand-coded cite examples have not (yet) caught up with the changes in the rules. This apparently was broken at some time for templated cites as well, but was fixed with this edit to {{Citation/core}}. I haven't found the discussion leading up to that and, as I'm on the road using internet cafes at present, I'm not going to pursue that now; however, see discussions here and here for some apparently related background.

As a somewhat separate but apparently related matter, I note the comment in this Mediawiki talk page edit, "That article is using raw HTML, which it really shouldn't. We have {{Ref}} and {{cite}} for a reason. One of those reasons, is that <cite> is actually an incorrectly used here, considering it's latest HTML5 definition. We use {{Ref}} in order to be able to change such things." I'm not sure how correct that is re {{Ref}} and {{Cite}}, but I take the point that if such things as <cite id="Ritter2002">...</cite> vs. <span class="citation" id="Ritter2002">...</span> were done via a template rather than with raw html, such changes could be easily done via a template edit vs. finding and fixing all the raw html in articles which the changes broke.

So—what now? I'd say fix the raw html in the project page for this article for now and, unless the proper long-term fix is more obvious to someone else than it is to me at this moment, get a discussion started about how such things ought to be done long-term. Separately, something needs to be done to find and fix all the raw html hiliting which this change in the rules broke.

As a sidebar, harking back to the prior mention of {{Ref}} and {{cite}}, I'll mention here that it seems to me that there should be a way to hilite the notes associated with {{Rref}}'d {{cite}}s. Wtmitchell (talk) (earlier Boracay Bill) 21:14, 6 March 2010 (UTC)

For templated citations it was never broken, they initiated the change actually. It was discussed here. Implemented and then 30days later executed. ATM only elements under <references /> are highlighted it seems. The discussion on how to proceed with that is here: MediaWiki_talk:Common.css#Coloring_of_the_cited_source_missing. —TheDJ (talkcontribs) 13:56, 8 March 2010 (UTC)
The mention of {{Ref}} confused me there. I repeated the mention of {{Cite}}, but I actually had in mind {{Note}}, which is the companion to {{Ref}}, as in the following from Template:Ref/doc:
*Text that requires a footnote.{{ref|1|1}}
==Notes==
:1.{{note|1}}Body of the footnote.
Rendering
  • Text that requires a footnote.1
Notes
1.^ Body of the footnote.
This is often used to footnote tables; note that the referenced note is not highlighted when it is accessed via the link provided by the {{Ref}}.
I see that {{Harv}} family templates and {{Citation}} (which is aliased as {{Cite}}) highlight linked cites as follows:
{{Harv|Authorsurname1|Year}}
==References==
*{{Citation|last=Authorsurname1|year=Year|title=Title|publisher=Publisher}}
Rendering

(Authorsurname1 Year)

References
  • Authorsurname1 (Year), Title, Publisher  Check date values in: |date= (help)
This is (currently) accomplished by placing the cites in a span with class="citation".
hand-crafted cites could be highlighted, then, as follows:
*([[#Authorsurname2Year|Authorsurname2 Year]])
;Reference
*<span class="citation" id=Authorsurname2Year>Authorsurname2 (Year), ''Title'', Publisher</span>
Rendering
Reference
  • Authorsurname2 (Year), Title, Publisher
I've been thinking that it might be useful to offer a new template named, perhaps, {{span idclass}}. Such a template would require an id= parameter and would place the content of its required first unnamed parameter into a span with class "citation" by default or into whatever other class might be specified by an optional class= parameter.
At some point, work needs to be done to fix all the now-broken hand-crafted cites which use the now deprecated <cite id=whatever>...</cite> raw HTML coding now in existing articles. It might be better to wrap those cites in such a template rather than to replace that now-deprecated HTML idiom with more raw HTML.
That would allow the optional prettification of the above hand-crafted example by hiding the raw html in a template, and would perhaps provide a way to modify the {{note}} template to highlight its notes when they are accessed. I'm currently traveling and doing WP stuff from internet cafes, and I haven't actually tried working out the details of that.
What do you think? Wtmitchell (talk) (earlier Boracay Bill) 01:11, 9 March 2010 (UTC)

<span class="citation" id=AuthorsurnameYear>, rather than <cite id=refAuthorsurnameYear>, sounds like it's a more proper way of achieving highlighted linking from shortened notes to freehand citations, and a new {{span idclass}} template might be an option too. But note however that there aren't any shortened notes linking to freehand citations included on the project page.

For the examples of shortened notes linking to cite xxx templates that we have, I'd suggest the neater option of changing these to show usage of the ref=ID parameter, which creates the HTML anchor containing that ID (i.e. ref=AuthorsurnameYear).

--SallyScot (talk) 23:08, 9 March 2010 (UTC)

I've successfully used the <span></span> method with {{SfnRef}} (or its alias {{harvid}}) on several articles, see Reading Southern railway station where we have:
*<span id={{SfnRef|Conolly|1976}} class=citation>{{cite map |... |year=1976 |cartography=W. Philip Conolly |... }}</span>
This allows the cobstruction of shortened footnotes without special constructs; either
{{sfn|Conolly|1976|loc=p. 4, section A2}}
or
<ref>{{harvnb|Conolly|1976|loc=p. 4, section A2}}</ref>
works with this. Does anybody know a method by which I might hunt down the places where I used the older method <cite id=xxx>...</cite> so that they may be amended? --Redrose64 (talk) 13:02, 10 March 2010 (UTC)
Hi SallyScot. For shortened notes linking to freehand citations on the project page, see Wikipedia:Citing sources/Example edits for different methods#Shortened notes with wikilinks. Since all three of the "Shortened notes linking to ..." examples are supposed to produce the same rendering, only one of the examples is rendered, and that happens to be one of the templated examples. The "Shortened notes with wikilinks" example uses <cite id=refAuthorsurnameYear>...</cite>, for which the rendering of highlighting when accessed is now broken. I haven't fixed this because this discussion about how it ought to be fixed (raw HTML in the article wikitext vs. wrapping the details of the raw HTML in a template) is still ongoing. I don't know how to hunt down occurrences of particular unrendered wikitext (e.g., raw HTML idioms) in articles. —Preceding unsigned comment added by Wtmitchell (talkcontribs) 08:58, 11 March 2010

──────────────────────────────────────────────────────────────────────────────────────────────────── Before we start writing new templates, I've found that {{wikicite}} may already provide most of the required action. The wikicode

{{wikicite |id=refDoe2010 |reference=Doe, John (2010) ''A fictional account'' }}

is exactly equivalent to:

<span class="citation wikicite" id="Reference-refDoe2010">Doe, John (2010) ''A fictional account''</span>

and the |reference= parameter may be fed with one of the citation templates which does not have a |ref= parameter, such as {{cite map}}. --Redrose64 (talk) 11:16, 11 March 2010 (UTC)

OK. I tried it below.
The above highlight the accessed cites as expected when they are accessed via a hand-coded wikilink or a Harv family template with a Ref= parameter matching the reference= parameter of the wikicite. No need for a new template like {{span idclass}}. Here's the wikicite-produced cite:
  • {{wikicite |id=refDoe2010 |reference=Doe, John (2010), ''A fictional account'' }} produces: Doe, John (2010), A fictional account
So, can we arrive at a consensus that the project page should show hand-coded cites wrapped in {{wikicite}}s? Wtmitchell (talk) (earlier Boracay Bill) 01:57, 13 March 2010 (UTC)

────────────────────────────────────────────────────────────────────────────────────────────────────If nobody objects, I'll redo the project page to wrap hand-crafted cites in {{wikicite}}s in a day or two. Also, re hunting down occurrances of "<cite id=...", see WP:VPT#Searching for unrendered wikitext. Wtmitchell (talk) (earlier Boracay Bill) 02:26, 14 March 2010 (UTC)

I'd like to look at a small tweak to {{wikicite}} so that it can generate an anchor which is directly compatible with the {{harv}} family, without the need for |Ref=Reference-refDoe2010. I'm thinking along the lines of allowing direct use of the existing {{harvid}} template, which would allow something like this:
{{harvnb|Doe|2010}}
{{wikicite |harvref={{harvid|Doe|2010}} |reference=Doe, John (2010), ''A fictional account'' }}
In this way, {{sfn}} can be accommodated; this template uses the same basic syntax as {{harvnb}} and a similar linking mechanism, but lacks the |ref= parameter. --Redrose64 (talk) 12:36, 14 March 2010 (UTC)
That sounds like a worthwhile change, but it should be discussed on the talk page for that template. I've opened a discussion about this at Template talk:wikicite#Changes and offered a modified version of the template there. One small change in what I've offered vs. what you suggested is that I've named the added parameter ref instead of harvref, as the harv-specific stuff is confined to {{harvid}}. Wtmitchell (talk) (earlier Boracay Bill) 01:37, 15 March 2010 (UTC).

--

Not sure I've followed all the nuances above, but nor that what I was suggesting was fully understood either, so I've just edited the examples of shortened notes linking to cite xxx templates that we have, to what I think is the neater option of changing these to show usage of the ref=ID parameter, which creates the HTML anchor containing that ID. - Just revert if I've got the wrong end of the stick.

--SallyScot (talk) 23:42, 17 March 2010 (UTC)

What you have done appears to be correct for those particular cases, which use {{cite web}}, {{cite journal}} and {{cite book}}, all of which have a |ref= parameter. The above discussion mainly concerns the necessary workarounds for those templates which do not have this parameter, a group which appears to be shrinking: until very recently these included {{cite map}} and {{cite album-notes}}, but both have recently been amended to permit |ref=.
I think that we need to dig out some cite templates which as yet do not permit |ref=, and construct some examples for the use of those in conjunction with {{wikicite}}. --Redrose64 (talk) 14:17, 18 March 2010 (UTC)

Cleaning up broken handcrafted cites[edit]

As discussed in the #Highlighting section above, existing handcrafted cites like <cite id="id for this cite">Citation body</cite> are now slightly broken and, once support for a new ref parameter is added to {{Wikicite}}, those should be changed to {{wikicite |ref="id for this cite" |reference=Citation body}} to unbreak them. User:Gadget850 has searched the database and found about 75 templates and 2500 articles which may be candidates for this change (many of the articles certainly are candidates). Links to these can be found at User:Gadget850/dbsearch/cite 2010-Feb-03. Does anyone have any thoughts about what should or should not be done about this? Wtmitchell (talk) (earlier Boracay Bill) 08:12, 15 March 2010 (UTC)

Use of the HTML <cite>...</cite> element[edit]

Discussion at User talk:Wtmitchell#Cite search just caused me to look at Section 4.6 of the HTML 5 dDraft Standard. That says, in part, "The cite element is obviously a key part of any citation in a bibliography, but it is only used to mark the title:", giving the example:

<p><cite>Universal Declaration of Human Rights</cite>, United Nations, December 1948. Adopted by General Assembly resolution 217 A (III).</p>

I don't think this has any immediate effect on the discussions in the two preceding sections or on action growing out of those discussions. However, it does bring up the question whether this project page should show the title in hand-crafted cites as being wrapped in an HTML <cite>...</cite> element, as in the example above. I think the answer to that question is "Yes". Unless there is objection, I'll wrap the titles in the example hand-crafted citations in the project page in HTML <cite>...</cite> elements when I do the edit to wrap those hand-crafted citations in {{wikicite}} templates. Wtmitchell (talk) (earlier Boracay Bill) 18:45, 15 March 2010 (UTC)

When no style sheets are in effect, text enclosed by a <cite>...</cite> element is changed in style (appearance) in a browser-dependent manner. On some browsers, the effect is identical to <i>...</i>, ie the text is italicised. --Redrose64 (talk) 23:05, 15 March 2010 (UTC)
I'm not a CSS jock and my reference books are packed up while I'm between houses, but I see that MediaWiki:Common.css currently contains the following:
/* Styling for citations */
span.citation, cite {
    font-style: normal;
    word-wrap: break-word;
}

Section 4.6.5 of the HTML 5 Draft Standard currently says, in part, "The cite element is obviously a key part of any citation in a bibliography, but it is only used to mark the title". The question at issue in this section is, I think, "Should titles in hand-crafted citations on the project page be marked with <cite>...</cite> tags?" AFAICS, the answer should be "Yes". Wtmitchell (talk) (earlier Boracay Bill) 23:25, 15 March 2010 (UTC)

────────────────────────────────────────────────────────────────────────────────────────────────────I see that in this edit, SallyScot has removed all <Cite>...</Cite> occurrences from the project page. I don't have a problem with that but I'm wondering whether there is a consensus position within WP on this. Note that there is a related discussion going on at MediaWiki talk:Common.css#Coloring of the cited source missing.

On a possibly related point, I've noticed that the Full references written freehand subsection uses hand-crafted cites but the Shortened notes and Shortened notes with wikilinks subsections do not. Unless there is objection, I'll probably edit those two last-mentioned subsections to use hand-crafted citations. If I do that, I'll tweak the cites so that the examples, if rendered, look like the corresponding sections using {{Harvnb}} and {{Citation}} templates. I had been thinking of wrapping titles in the hand-crafted cites in <ciite>...</ciite> element, but I'll hold off on that unless some consensus about it emerges. Wtmitchell (talk) (earlier Boracay Bill) 02:26, 19 March 2010 (UTC) ──────────────────────────────────────────────────────────────────────────────────────────────────── I've done the edits described in the preceding paragraph. The links in the wikilinked example work OK, but I notice that the links in the templated example are not working. This seems to be because of problems with the {{Citation}} template (see WP:VPT#Time warp?) which I am pursuing separately. Wtmitchell (talk) (earlier Boracay Bill) 07:08, 19 March 2010 (UTC)

Just mentioning here that the wikilinks in the templated examples now work. Apparently, I hadn't published my sandboxed changes to {{Citation}} after all. They've now been published. {{Cite journal}} and {{Cite book}} haven't been synchronized with the changes yet, but that's on the do-do list. Wtmitchell (talk) (earlier Boracay Bill) 04:39, 20 March 2010 (UTC)

Adding Shortened notes with wikilinks to references written freehand was fine, but I didn't see a reason to lose comparative information from Shortened notes with wikilinks using citation templates, so I've added that back in.

Perhaps the Shortened notes with {{Harvnb}} and {{Citation}} links example could be temporarily removed until issues with it not working are resolved.

Also, I like the way the first three examples, the examples in section 1 - Full references in footnotes (which are not wikilinked), only shows one rendering, as all three of the footnote examples render exactly the same. I think this better illustrates that there's more than one way to skin a cat. The three Shortened notes with wikilinks examples could be made to do the same. There's only the minor difference of the Kummer 2003 ref (in one example named with the name= parameter and re-used at a second point in the text, in the other specifying the page number info in each short ref), and slight formatting differences in the {{Harvnb}} example (which would be resolved by using the same templates as in the "Shortened notes with wikilinks using citation templates" example). Naming a ref tag so it can be used more than once is well covered elsewhere (Wikipedia:Footnotes#Reference name (naming a ref tag so it can be used more than once)), so I propose making Shortened notes with wikilinks examples all render exactly the same and showing the rendering on the project page just the once.

--SallyScot (talk) 17:29, 19 March 2010 (UTC)

The recent issues with {{Citation/core}} (see the talk page there) involved Editor and Coauthors fields, and (hopefully) have now been resolved. I expect to be updating {{Cite book}} and {{Cite journal}} soon with changes similar to what has been done with {{tl|Citation) re the treatment of the coauthors parameters (i.e., not putting that info in the id of the link target). Wtmitchell (talk) (earlier Boracay Bill) 00:16, 26 March 2010 (UTC)

ref = harv[edit]

Nice work cleaning up the code. One thing: shouldn't the examples with {{Harvnb}} use ref=harv or {{Citation}}? I'm not sure I understand why they needed to be changed. ---- CharlesGillingham (talk) 02:25, 25 March 2010 (UTC)

Ok, now I get it. Corporate authors, etc. Several of these can be fixed. Do you mind if I do it? ---- CharlesGillingham (talk)

Lots of broken links in a rendered example[edit]

There are lots of broken links between the shortened footnotes and the full cites in the rendered example in the Rendering for shortened notes linked with {{sfn}} and citation templates section. That being the case, it's not a very good example. I haven't checked, but I wonder whether the assertion reading "All three of the above shortened notes with wikilinks examples would render exactly the same." there is actually true. Wtmitchell (talk) (earlier Boracay Bill) 12:58, 8 September 2011 (UTC)

Fixed. All the links were broken in this example. The |ref= was set to the wrong value. It looks they got copied from one of the other examples on this page. Someone must have clobbered it accidentally in a cleanup at some point. ---- CharlesGillingham (talk) 00:46, 9 September 2011 (UTC)
CharlesGillingham, thanks for the fixes here. I had thought about looking into the details, but didn't have the time at the time. Cheers. Wtmitchell (talk) (earlier Boracay Bill) 00:52, 9 September 2011 (UTC)
The Wikitext version of the example was correct! (I stupidly fixed the rendered version rather than checking if the wikitext was correct first.) They are now precisely identical (except for {{fake header}}, of course) ---- CharlesGillingham (talk) 00:57, 9 September 2011 (UTC)

Merge from[edit]

I think that we should merge this page with WP:Verification methods. The latter does a better job of presenting the differences in a clear a readable way. The former does a better job of showing how the methods actually look in the real world. Thoughts? ---- CharlesGillingham (talk) 18:05, 7 November 2011 (UTC)

Four months ... no thoughts ... ---- CharlesGillingham (talk) 07:03, 7 March 2012 (UTC)