Wikipedia talk:Citing sources/Example edits for different methods

Shortened notes with wikilinks vs. HTML 5
The Shortened notes with wikilinks section of this sub-article may need to be revised. See the discussion at Template talk:Citation. 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
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)

Simplification of rendering
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
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. ", 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)


 * ✅ Wtmitchell (talk) (earlier Boracay Bill) 03:08, 21 February 2010 (UTC)

Highlighting
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 and  for a reason. One of those reasons, is that is actually an incorrectly used here, considering its latest HTML5 definition. We use  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 ... vs. ...  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&mdash;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 and , I'll mention here that it seems to me that there should be a way to hilite the notes associated with 'd 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 method with  (or its alias ) on several articles, see Reading Southern railway station where we have:
 * This allows the cobstruction of shortened footnotes without special constructs; either
 * or
 * works with this. Does anybody know a method by which I might hunt down the places where I used the older method  so that they may be amended? -- Red rose64 (talk) 13:02, 10 March 2010 (UTC)
 * or
 * works with this. Does anybody know a method by which I might hunt down the places where I used the older method  so that they may be amended? -- Red rose64 (talk) 13:02, 10 March 2010 (UTC)
 * works with this. Does anybody know a method by which I might hunt down the places where I used the older method  so that they may be amended? -- Red rose64 (talk) 13:02, 10 March 2010 (UTC)


 * Hi SallyScot. For shortened notes linking to freehand citations on the project page, see Citing sources/Example edits for different methods. 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 ..., 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 (talk • contribs) 08:58, 11 March 2010

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

is exactly equivalent to:

and the reference parameter may be fed with one of the citation templates which does not have a ref parameter, such as. -- Red rose64 (talk) 11:16, 11 March 2010 (UTC)
 * OK. I tried it below.
 * link to wikicite-produced cite produces: link to wikicite-produced cite
 * produces:
 * 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:
 * produces:
 * So, can we arrive at a consensus that the project page should show hand-coded cites wrapped in wikicites? 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 wikicites in a day or two. Also, re hunting down occurrances of "&lt;cite id=...", see WP:VPT. Wtmitchell (talk) (earlier Boracay Bill) 02:26, 14 March 2010 (UTC)


 * I'd like to look at a small tweak to so that it can generate an anchor which is directly compatible with the  family, without the need for Reference-refDoe2010. I'm thinking along the lines of allowing direct use of the existing  template, which would allow something like this:
 * In this way, can be accommodated; this template uses the same basic syntax as  and a similar linking mechanism, but lacks the ref parameter. -- Red rose64 (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 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).
 * In this way, can be accommodated; this template uses the same basic syntax as  and a similar linking mechanism, but lacks the ref parameter. -- Red rose64 (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 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, and , 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  and , 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 . -- Red rose64 (talk) 14:17, 18 March 2010 (UTC)

Cleaning up broken handcrafted cites
As discussed in the section above, existing handcrafted cites like  Citation body  are now slightly broken and, once support for a new ref parameter is added to Wikicite, those should be changed to  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 element
Discussion at User talk:Wtmitchell 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:
 * Universal Declaration of Human Rights, United Nations, December 1948. Adopted by General Assembly resolution 217 A (III).

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  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  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  element is changed in style (appearance) in a browser-dependent manner. On some browsers, the effect is identical to , ie the text is italicised. -- Red rose64 (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  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  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.

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> 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) 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 (Footnotes), 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 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
Nice work cleaning up the code. One thing: shouldn't the examples with Harvnb use  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
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
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)

CSS references-small class
Apparently references-small class is deprecated according WP:CLASS and its associated talk page. I did not correct this project page because I am unsure if there is a standard way.

On my page, I ended up using  because this is the class that   uses. I will fix the project page if others are in agreement that this is the best way.

Also, is correct for some of the examples? I think it was meant to show three columns (which the rendered examples do not show) but that is also deprecated. Now it should be the size of the columns, like 30em.

This page has been very helpful to me and I'd like to see it continue on. <b style="color:#008080">Popular</b><b style="color:#8A2BE2">Outcast</b>talk2me! 22:43, 5 November 2018 (UTC)
 * A fixed number of columns, i.e., has been deprecated for some time now. This is primarily because of the wide variety of devices now in use for reading Wikipedia - from smart phones with screens that are perhaps two inches wide, up to desktops with monitors that may be twenty inches wide. Three columns on an Android may yield one or two words before it wraps to the next line; three columns on a widescreen desktop may produce broad vertical gaps between columns. Since you cannot know how wide the reader's screen is, you cannot lay out the page to suit that width. So, we specify a minimum column width and let the browser decide how many columns of that width may be fitted into the space available. More at Template talk:Reflist and its archives. -- Red rose64 &#x1f339; (talk) 17:49, 6 November 2018 (UTC)
 * thanks for the in-depth discussion. I will fix the examples on this reference page. The question still remains about references-small class if anyone else wants to chime in. <b style="color:#008080">Popular</b><b style="color:#8A2BE2">Outcast</b>talk2me! 19:35, 6 November 2018 (UTC)
 * The  class isn't deprecated, it's obsolete: the rules that produced the styling for that class were removed from the style sheets something like eight years ago. Hence, the class no longer has any effect, and it is pointless to use it. Where were you trying to use this class? -- Red rose64 &#x1f339; (talk) 10:03, 7 November 2018 (UTC)
 * , I was trying to use it in the same way as listed on the project page. It didn't work, obviously, and as I mentioned above, I ended up using  I am just not sure if that is what we should be doing. If it's fine, I'll update the project page. What you said about the class being removed eight years ago then brings to mind if this project page is still good. <b style="color:#008080">Popular</b><b style="color:#8A2BE2">Outcast</b>talk2me! 13:27, 7 November 2018 (UTC)
 * I will draw your attention to the table, where the only mention of  is made: the second cell in the row, headed "description", begins by stating: (Removed ). I suggest that you follow that link. -- Red rose64 &#x1f339; (talk) 23:26, 7 November 2018 (UTC)
 * , I think we are talking about different things. I am talking about the page attached to this talk page, WP:CITEX. Examples use  as a class in a   but as you said, it's obsolete. So I'd like to correct the project page with the appropriate markup in an effort to help other editors.  <b style="color:#008080">Popular</b><b style="color:#8A2BE2">Outcast</b>talk2me! 23:41, 7 November 2018 (UTC)
 * Your first link was to WP:CLASS. Anyway, the proper replacement for is ..., but those must not be wrapped around either  or . -- Red rose64 &#x1f339; (talk) 19:37, 8 November 2018 (UTC)
 * I do apologize for the confusion. The link was from where I got the information that the references-small class was deprecated. Thank you for the correct way/replacement. I tried that on a page I am working on and it seems to work just fine. I will attempt to fix the WP:CITEX page. This page does have examples with ... so I am unsure why the authors used another method. <b style="color:#008080">Popular</b><b style="color:#8A2BE2">Outcast</b>talk2me! 00:27, 9 November 2018 (UTC)

Error thrown by cite
An apparently unintended error message reading appears in the rendering shown in the Rendering for parenthetical references linked with  and citation templates section. This appears to be due to re-use of the ref target named refBakalar2006. Wtmitchell (talk) (earlier Boracay Bill) 20:15, 19 June 2022 (UTC)

(added) I just noticed that there are two instances of this. I haven't tried to untangle the section headings so as to describe here where they appear, but a text search for error finds them. I haven't attempted to fix these so as not to introduce disruption into the wikitext-level ref naming scheme. Wtmitchell (talk) (earlier Boracay Bill) 19:59, 20 June 2022 (UTC)