Template talk:Citation

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



Archives
Archive 1 Archive 2 Archive 3
Archive 4 Archive 5
edit·history·watch·refresh Stock post message.svg To-do list for Template:Citation:

Here are some tasks you can do:

Contents

[edit] CGNDB Discussion

I thought some page watchers might be interested in a discussion for changing CGNDB into a redirect here. Thanks! Plastikspork ―Œ(talk)

[edit] Language markup for non-English refs

Citation templates have |language=, which takes a prose value, such as "French". Shouldn't we also have a parameter or parameter which use an ISO value, such as "fr", and use that to mark up the language of the citation's title (avoiding the need to use {{Lang}}, which is often overlooked) and, where we link to an on-line source, using that value in an hHREFLANG attribute? Andy Mabbett (Pigsonthewing); Andy's talk; Andy's edits 11:34, 5 September 2011 (UTC)

Nudge. Andy Mabbett (Pigsonthewing); Andy's talk; Andy's edits 13:35, 31 October 2011 (UTC)
I'd support that. We'd probably need to decide whether to permit the use of the ISO 639-1, -2/B, -2/T and/or -3 codes, and whether to also include the ISO 15924 codes for the writing script. (ISO 639-1 is pretty easy to start, but maybe we should leave a path for expansion later.)

We also should think about the situation where we have a source in one language, and a quotation in another—my feeling is that's well-handled by citing the language of the source, and tagging the quoted text; if so, we'd need to explain that. Also, there's the issue of works in multiple languages; is lang-1=, etc. a good way to do that? TheFeds 05:49, 6 January 2012 (UTC)

Support. In Chinese Wikipedia if |language= is specified, e.g. "fr", (French) will appear. I'll try to introduce this feature in this template.--Dingruogu (talk) 22:13, 5 March 2012 (UTC)
Basically I know how to do this now with a lot of code. To be compatible with existing usage of this template, we will have to add #switch to Template:citation/core, in which we iterate all possible language names, like "English", "Chinese", "French", etc. to show (English), (Chinese) and (French), respectively. This is much larger work load than I thought. (In Chinese Wikipedia, nobody used "in English" style, and thus we could use (Chinese) without handling compatibility issues. Compatibility issues bring the above-mentioned huge workload.)
Therefore, I would like to make sure whether others are interested in this change before I actually proceed. It will look like this after this change, no matter it's |language=en or |language=French:
(English) Nowak, Ronald M. (1999). Walker's Mammals of the World, 6th edition. Johns Hopkins University Press. ISBN 0-8018-5789-9. 
(French) Spotorno, A.E., Marín, J.C., Manríquez, G., Valladares, J.P., Rico, E. and Rivas, C. (2006). "Ancient and modern steps during domestication of guinea pigs (Cavia porcellus L.)". Journal of Zoology: 060606025751032––. doi:10.1111/j.1469-7998.2006.00117.x. 
--Dingruogu (talk) 23:21, 5 March 2012 (UTC)
  • Do we really want to give more ammunition to the "all citation templates are evil" brigade? Their main arguments concern rendering time and WP:TLIMIT. This proposal cannot improve matters. --Redrose64 (talk) 00:16, 6 March 2012 (UTC)
I prefer citation templates to plain text citation. The main reason is that I translate English Wikipedia articles to Chinese Wikipedia. I have to rewrite all the <ref> tags to make the citation style consistent, if they are not citation templates.--Dingruogu (talk) 06:52, 6 March 2012 (UTC)
Additionally, I want to make the title non-italic when |language=Chinese. It looks ugly when the title of the reference is made up of Chinese characters, e.g. here. I don't know whether it is the same with Japanese and Korean, but in Chinese we never use italics as titles. zh:WP:STYLE states this: "非中文的出版物或书名有各自的写法,最常见的是西文的斜体。请注意中文并无这些用法,所以在中文维基百科,请不要滥用斜体等非中文书名格式。这种情况在翻译西文维基的文章时容易岀现,敬请留意。"
--Dingruogu (talk) 23:21, 5 March 2012 (UTC)
I recently found {{asiantitle}}. Probably most non-Latin based character sets should not be italicized. This should be split to a separate discussion. ---— Gadget850 (Ed) talk 23:40, 5 March 2012 (UTC)
Thanks for pointing this out. I guess #if is not expensive and adding this needs the input from ja/kr wikipedians too. --Dingruogu (talk) 06:52, 6 March 2012 (UTC)
The Chinese Wikipedia markup uses ​#ifexist:​ which is an "expensive parser function" in that it consumes resources and is limited to the number of uses on a page. It only gets parsed if language is defined, but any use requires careful resource testing. You could use ​#switch​, but that will run into a lot of markup with similar issues. ---— Gadget850 (Ed) talk 22:55, 5 March 2012 (UTC)
Yes we have to do this by using #switch instead of the zh-wiki approach tested in the sandbox, and that's why I mentioned there are a lot of code...--Dingruogu (talk) 06:52, 6 March 2012 (UTC)
I think you are on the wrong track here. The Chinese template calls {{language}}, which simply converts the ISO language code into the language name. I don't see the use there, especially as current uses of the language field are already the the language name. BTW, {{language}} uses ​#ifexist:​, which doubles the expense.
The original request is for an implementation of {{lang}}, which would span text with ​xml:lang​ which would "help web browsers choose the right font, screen readers use the right pronunciation and more." The question is what text– potentially this could be the fields for title, chapter and quote. I need to do more reading, but it appears that ​xml:lang​ will not be supported whenever we switch over to HTML5, but there are other ways. ---— Gadget850 (Ed) talk 11:58, 6 March 2012 (UTC)

Comment I see the reference language issue as a growing problem from a copyeditor's point of view. Some people are using the language parameter and some people are using the language icon templates to specify the language of the source. Both methods are in roughly equal usage and are often intermixed within the same article. The MOS suggests the language icons should go after the link but putting it after the whole ref seems common too. I think the language field should go after the URL field as the MOS suggests. If it's technically possible (I've never really learned the details of wiki-templates so forgive my ignorance), the field should first check to see if its value is a value ISO language code, then if the text is not a template, it should still be marked-up in the same format that the language icons use. The word "in" used with the langauage field should be removed from the citation too. It's not needed. Jason Quinn (talk) 21:22, 20 March 2012 (UTC)

[edit] The "at" parameter suppressed by "page" parameter

The "at" parameter (location within a resource) can be very useful, but is suppressed when the "page" parameter is used.

E.g., {{citation |author= Smith |title= Big Book |at= Sec. 4.1 }} produces this:

> Smith, Big Book, Sec. 4.1 

but {{citation |author= Smith |title= Big Book |at= Sec. 4.1 |page = 666 }} suppresses the "Sec. 4.1":

> Smith, Big Book, p. 666 .

({{Cite book}} does the same as {{citation}}.) Anyone know anything about this? Or any key terms to search for in the archives? If it is a bug, where should I take this? ~ J. Johnson (JJ) 21:31, 21 November 2011 (UTC)

Not a bug: it is intentional. They have similar purposes - they describe the lowest level of the place where the information was found. |at= is for use either where the book/etc. has no page numbers, or where it has some method better than pages, such as section/subsection/paragraph. If you really need to give both, use something like |at=p. 666, sec. 4.1 --Redrose64 (talk) 21:50, 21 November 2011 (UTC)
Yep. As documented. ---— Gadget850 (Ed) talk 22:55, 21 November 2011 (UTC)
I am curious as to why it was thought to be "a good thing" to not permit simultaneous use of both parameters. Just where is this documentation? ~ J. Johnson (JJ) 23:35, 21 November 2011 (UTC)
From Template:Citation:

at: Position within the resource when |page=/|pages= is inappropriate or insufficient. This parameter is ignored if |page=/|pages= is specified. Examples of usage of |at=: |at=para. 14 (when citing a source without page numbers), |at=02:56 (a film or audio timestamp), |at=no. 456 (something in a numbered list), |at=p. 6, col. 2 (for a page and a column because "column" is not a Citation template parameter), or |at=sec. F pp. 4–6 (for a section and a page within the section, "section" not being a parameter).

---— Gadget850 (Ed) talk 02:21, 22 November 2011 (UTC)
Sorry, I wasn't entirely clear. I did see that documentation, which describes what is, but does not explain if this is a bug, or a "feature". Certainly does not explain why this might be considered "a good thing", it just assumes (undocumented!) that these two parameters are exclusionary. As it is, I'd like to use both simultaneously. Is this the proper place to take that up? ~ J. Johnson (JJ) 23:27, 22 November 2011 (UTC)
The logic is if page then page, else if pages then pages, else if at then at. This conditional is in {{citation}} and in most of the Citation Style 1 templates, so it is obviously a feature. All three parameters feed into the meta-parameter |At= (notice the upper case) used by the meta-template {{citation/core}}. There is no real advantage to having three separate parameters that would be concatenated into one parameter. Indeed, we would have to add several lines of markup to deal with separators. ---— Gadget850 (Ed) talk 00:29, 23 November 2011 (UTC)
I see that the Citation/core documentation refers to "At" as a page reference, which I think indicates a basic problem: thinking of "at" as just another way of saying "page", an alias, and entirely substitutable. Not even for paragraph numbering, which is directly comparable to page numbering, would I say that one should preclude the other. Sections are comparable to chapters, and to have a page number suppress a chapter title would certainly be ludicrous, so why suppress sections?
Is there anything that might break if "at" was made independent of "page"? At least so both could simultaneously feed into "At"? ~ J. Johnson (JJ) 20:36, 23 November 2011 (UTC)
If they were independent, we would certainly encounter cases where the formatting of the "at" and "page" parts of a citation are in the wrong order or punctuated badly. But I think the biggest downside is that the logic in our citation templates is already comvoluted and slow, to the point where there is pressure not to use them at all, and such a change would make things worse rather than better. —David Eppstein (talk) 21:10, 23 November 2011 (UTC)
"Comvoluted" seems apt. Is the logic unnecessarily so, and ought to be re-written? Or does it merely reflect the demands made of it? I would think it fairly straightforward to simply concatenate the two fields (with the proper separator character), perhaps even reduce the ugly else-if structure. How would this make things end up in the wrong order?
To the extent these templates are slow (which seems to be the principal objection to using them), I have seen that attributed elsewhere to COINS bloat. If speed is a problem, then we ought to go after the problem (but that is a different discussion). ~ J. Johnson (JJ) 21:46, 23 November 2011 (UTC)

──────────────────────────────────────────────────────────────────────────────────────────────────── As Redrose64 noted earlier, you simply put both values into the |At= field}}:

{{citation |author=Smith |title=Big Book |at=Sec. 4.1, p. 666}}

Smith, Big Book, Sec. 4.1, p. 666 

If you want a completely separate |at= parameter, then the change must be made in {{citation core}}. Currently, |page=, |pages= and |at= feed into |At=. I am not sure what you need that would render differently. ---— Gadget850 (Ed) talk 23:24, 23 November 2011 (UTC)

Yes, I got that. But I am going to be setting some things up for other editors, and everytime someone gets the bright idea of using the familiar, handy-dandy |page= [hmm, nice template] parameter it will kill what ever was carefully tucked in on |at=. Which I think spells "broken" however you look at it. ~ J. Johnson (JJ) 23:53, 23 November 2011 (UTC)
So if someone adds |page=666 without noticing |at=Sec. 4.1, p. 666, then you also presume they will not notice that the citation shows ​p.=666, Sec. 4.1, p. 666​. Sounds more like we need to add error checking for uses where |page= and |at= are defined in the citation. ---— Gadget850 (Ed) talk 00:17, 24 November 2011 (UTC)
In what way is this any more broken than the fact that using both |page= and |pages= in the same citation will ignore one of them? —David Eppstein (talk) 01:04, 24 November 2011 (UTC)
As a professional programmer, I can state from many years experience that "broken" doesn't mean "this doesn't do what the user wants it to do", but "this doesn't do what the specification requires it to do". --Redrose64 (talk) 17:03, 24 November 2011 (UTC)
As a former professional programmer myself, I know to distinguish between nonconformance of the s/w to the spec, and nonconformance of the spec to what the user wants. In the end it does come down to what the user (customer?) wants. (Albeit that "want" gets filtered through the specification process to minimize random changes, maintain consistency, etc.) Here I would say that the suppression of |at= is not an explicit specification, it was a likely an under-considered assumption that just fell through. And I say that upon consideration the spec should be tonot to suppress.
The distinction between "page" and "pages" is trivial, as they are the same kind of metadata, and we don't expect to have overlapping pagination domains. (That is, a given location does not have more than one page number. Aside from pdfs.) Whereas the domain of (say) sections is independent of pagination, so it is quite reasonable for a given location to have both a page number and a section number/header.
Getting back to Ed's comment, my concern is not so much where a page has already been included in an |at=, but where it has not, and someone wanting to add a page number quite reasonably reaches for |page=. Of course we hope that people preview their work, and are alert for problems, but reality often falls short. And when they do see the effect, I think the general impression is "broken". ~ J. Johnson (JJ) 22:46, 25 November 2011 (UTC)
There are a lot of things that a user can do that will bork the template and make it render in an unanticipated manner. We can add error detection for every misuse, but it would require the addition of a lot of markup. See WP:CS1PROBS for some common issues. ---— Gadget850 (Ed) talk 23:17, 25 November 2011 (UTC)
Why is using |at= and |page= together a "misuse" – aside from the documentation saying it is a misuse? I am saying that it is not a misuse to specify both, but quite reasonable, and the problem is where the one suppresses the other. I think it would be easier to concatenate them then to tell the user he can't use them both. As to the "common problems" you point to: as the only ones applicable here are generic problems, I would hope there is a generic function for checking them. Which is invoked with a single call, not "a lot of markup". Alternately, since "At" presumably does the same checking regardless of whether it has "at" data or "page" data', why would there be a problem when it contains the concatenated data of both? ~ J. Johnson (JJ) 18:37, 26 November 2011 (UTC)
It is a misuse precisely because it contradicts both the documentation and the current implementation. It's reasonable to request, as you have done, that the template be changed, and I think it's also reasonable to oppose the change. But don't pretend that the current behavior is a bug. It's not, it's a feature. It may or may not be a good design, but it is currently performing exactly as designed. —David Eppstein (talk) 18:56, 26 November 2011 (UTC)
Let me rephrase my earlier question. Do you want:
  • |At={{{pages|}}}}}}|{{{page|{{{pages|}}}}}}, {{{at|}}}
Or;
  • |Pages={{{pages|}}}}}}|{{{page|{{{pages|}}}}}}
  • |At={{{at|}}}
---— Gadget850 (Ed) talk 19:41, 26 November 2011 (UTC)
I can't say as to which, as I don't understand the code well enough to be certain of what either snippet does. (Or how |Pages= and |At= are subsequently processed.) What I think would be reasonable (and what most editors would expect) is, given the example above, a result like "Smith, Big Book, Sec. 4.1, p. 666". ~ J. Johnson (JJ) 20:48, 27 November 2011 (UTC)
To me it seems likely that, about equally often, editors would want the "at" part after the page numbers, not before. And if they do want it before, where does it go when the citation is in the journal volume:pages format? To me this ambiguity seems another good reason for forcing the editors to specify themselves how to combine the at and page information in a single parameter (as it works now) rather than letting the template decide for them and getting it wrong half the time. —David Eppstein (talk) 20:56, 27 November 2011 (UTC)
David, your argument is circular. You're saying that the documentation correctly describes what the code does, and the code correctly does what the documenation describes – including what happens when both parameters are used – and therefore all is correct. But that is only internal consistency, nothing more. How can you say that using both parameters (and expecting a different results) is a misuse? How can you call this behavior a feature, when it contradicts a reasonable expectation? Where is the specification that requires this suppression? ~ J. Johnson (JJ) 21:54, 27 November 2011 (UTC)
(jumping in from the sidelines) Specification? what specification? We don't need no stiiiiiinking specification!!! Take that as an attempt to lighten things up a bit, please, though it does characterize the template development process with some accuracy.
The behavior at issue seems to have been instituted in October of 2007 here and here by User:COGDEN. I don't know how much prior discussion there was about that, or where the discussion might have taken place.
Personally, I think a change to the requirements spec (if there were such a thing) for this template to allow this might be a good idea. I've sandboxed a first-cut implementation as a possible aid to this discussion. I have not sandboxed an update to the documentation. If such a change is made, corresponding changes should probably be made in the {{cite xxx}} templates. I would urge asking COGDEN for his views on this before going live with changes. One concern would be the question of how many existing articles such a change would break. I suspect that it would not break many, but it might break some.
Actually, the sandboxed change was something like a tenth-cut implementation by the time I got it working. I think the template coding language ought to be named LISB (maybe LISBon) following on custom established by similar namings re parentheses in LISP. Wtmitchell (talk) (earlier Boracay Bill) 02:45, 28 November 2011 (UTC)
I guess Help:Citation Style 1 is a back specification since it was written after the templates were implemented. ---— Gadget850 (Ed) talk 03:33, 28 November 2011 (UTC)
Thanks for digging out the diffs, and yes on all points. On the prospect that this might go in, and being duly prudent re possible breakage: is there any idea of how many instances there are of {{citation}} or {tl|cite xxx}} using both parameters? ~ J. Johnson (JJ) 23:12, 28 November 2011 (UTC)
We would have to add detection and tracking categories toe each individual template. ---— Gadget850 (Ed) talk 23:45, 28 November 2011 (UTC)---— Gadget850 (Ed) talk 23:45, 28 November 2011 (UTC)
Why? (Note that my previous question concerns existing instances, for which I presume some kind of dump could be searched, not to track future usage, for which I see no point.) ~ J. Johnson (JJ) 21:14, 29 November 2011 (UTC)

────────────────────────────────────────────────────────────────────────────────────────────────────

[edit] break

Again, is there any way of (say) scanning the WP corpus to see where |at= is used in citation/cite templates? ~ J. Johnson (JJ) (talk) 00:46, 7 December 2011 (UTC)

This is a list of the 137 citations on en-wiki mainspace from the January 2012 database dump using both |at= and |page=. There are none using both |at= and |pages=, and 4707 using just |at=. Rjwilmsi 21:05, 31 January 2012 (UTC)
Looks like a few legitimate types of use and a lot of confusion confusion with location or website. ---— Gadget850 (Ed) talk 22:59, 31 January 2012 (UTC)
Thanks for doing that. My first impression of the list was: where are all the maps I've cited using "|at="? But of course, I generally use citation templates as a "full reference", without the specific page/paragraph/section/etc. specification. (I put those in with the Harv link.) Nonetheless, some of the uses I have made of |at= might be of interest:
  • at = 1 sheet, scale 1:250,000, with 15 p. text
  • at = Project Award Number 07HQGR0088
What this reminds me is that I have found "at" to be useful as a sort of miscellaneous parameter for data not readily accommodated in other parameters, much like many of the examples seen in the list. While I would agree that some of those uses seem inappropriate, yet the need for such a miscellaneous field seems evident, and "at" suffices. In this regard the data is not similar to "page" (etc.), and so I think one should not be suppressed in favor of the other.
That "at" (in the sense of "@") is so variously used does make me wonder if handling the various subdivisions smaller than chapters (sections, paragraphs, stanzas, etc.) should have a more specific parameter. Perhaps "section", or some such. ~ J. Johnson (JJ) (talk) 01:02, 1 February 2012 (UTC)
I think that |at=1 sheet, scale 1:250,000, with 15 p. text is misuse of the parameter. Since |pages= is not for the total number of pages in the book, it follows that the number of sheets or pages (in an atlas?) is also irrelevant. This leaves the scale, which is important for a map, but would be better placed in the edition, for example |edition=1:50 000 first series for the Ordnance Survey maps of the mid-1970s. Regarding |at=Project Award Number 07HQGR0088, this seems trivial: but if 07HQGR0088 is some sort of unique identifier, this would be better placed in the |id= parameter. --Redrose64 (talk) 12:39, 1 February 2012 (UTC)
 The "Project Award Number" is a unique identifier, and I can't remember why I didn't use "id" for it. I'll have to check on that.
 I would take issue with you re |pages=, but that is irrelevant here: the number of sheets (plates) and amount of text (pages) is considered key descriptive detail in regard of maps. I can see an argument that description is not the same as location within ("at"), but |id= seems limited to unique identifiers, and I don't see what other parameters would best handle such data. I think part of my preferred usage here stems from not liking the format that results from using other combinations of parameters.
 It seems to me that |at= is being used as the generic descriptive field. Though I certainly agree many of those uses are inappropriate. ~ J. Johnson (JJ) (talk) 20:45, 8 February 2012 (UTC)

[edit] Adding a second input for ASINs

I have added input2 to the sandbox version of this template so that the .com TLD can be changed to .ca, .es, or as needed .co.jp or .co.uk. I am not sure how this change should be documented so I would welcome any suggestions before I submit an edit request. – Allen4names 15:48, 1 December 2011 (UTC)

Please replace "http://www.amazon.com/dp/{{{input1|}}}" in Template:Citation/identifier with "http://www.amazon.{{{input2|{{{asin-pdn|com}}}}}}/dp/{{{input1|}}}" and update the documentation to indicate that "asin-pdn" may be used to change the "parent domain name". If you have a better way to do this feel free. – Allen4names 07:36, 7 December 2011 (UTC)
Why do we need input2 and asin-pdn? When adding new parameters it is generally simpler just to stick to one parameter name. — Martin (MSGJ · talk) 09:51, 7 December 2011 (UTC)
I'm not clear on the English Wikipedia why we want/need to link to an Amazon website in a foreign language? Rjwilmsi 15:19, 7 December 2011 (UTC)
We prefer English sources, but do allow non-English per WP:NOENG. The markup is not changing the parent domain name– more properly the second-level domain (amazon.com), but the top-level domain (.com). ---— Gadget850 (Ed) talk 15:33, 7 December 2011 (UTC)---— Gadget850 (Ed) talk 15:33, 7 December 2011 (UTC)
Further to the above, Amazon hosts different content at different TLDs. Legal constraints don't allow them to intrude on user privacy as much under EU or Canadian privacy law as they are permitted to do in the US, but this has a flip side in their ability to distribute licensed content more readily in the US. The real question that troubles me is "why are the asins not better replaced by isbns or by oclc numbers?" There's no real reason we should drive readers to visit one closed proprietary distributor site over another, let alone over relatively open ones. LeadSongDog come howl! 18:47, 7 December 2011 (UTC)
ISBN, etc. would be the preferred identifier, but Amazon distributes eBooks identified only by the Amazon Standard Identification Number and the same work in different formats with different ASINs. ---— Gadget850 (Ed) talk 18:57, 7 December 2011 (UTC)
I will deal with two of the questions brought up. One: The "asin-pdn" can be omitted without any objection from me. Two: I consider "amazon" to be the child domain of ".com", ".ca", ".co.uk" etc. – Allen4names 20:18, 7 December 2011 (UTC)

Any other objections or comments before this request is implemented? — Martin (MSGJ · talk) 17:09, 13 December 2011 (UTC)

YesY Deployed. Could someone update the documentation now? — Martin (MSGJ · talk) 23:15, 13 December 2011 (UTC)
First {{citation}} and {{citation/core}} must be updated to use this parameter, then each CS1 template must be updated, then the documentation for each template must be updated. I recommend that ASIN-TLD be used as the core parameter name. {{Citation/identifier}} would benefit from documentation. ---— Gadget850 (Ed) talk 00:15, 14 December 2011 (UTC)
Thank you. I have edited {{Citation/identifier/sandbox}} to match {{Citation/identifier}} for any future testing. – Allen4names 06:36, 14 December 2011 (UTC)
Added documentation for {{Citation/identifier}}. Started discussion to add core support at Template talk:Citation/core#ASIN-TLD. ---— Gadget850 (Ed) talk 00:18, 8 January 2012 (UTC)
YesY Done {{Citation/identifier}} updated so that only valid TLDs are accepted. Deployed to the Citation Style 1 and Citation Style 2 templates as |asin-tld=. Documentation updated at {{Citation Style documentation}}. ---— Gadget850 (Ed) talk 12:33, 6 February 2012 (UTC)

[edit] Alternative URLs for a single citation

Some computer science papers and conference materials are available in several forms (PDF, PS, HTML, AVI, LaTeX). Currently there is no proper way to provide several links for a single citation, but it might be nice in some cases. I first wanted to create a separate template for that, but may be it would be better to implement it here? The syntax might be:

|url1
|format1
|url2
|format2
<...>

The resulting citation could be shown as:

example page, http://example.com/link.html  (ps,, avi) or example page  (html, ps, , avi)

Another possible syntax would be:

|url     <!-- HTML links only -->
|url-ps
|url-pdf
|url-ps
|url-TeX
|url-avi
|url-ogg
|url-mov

Dmitrij D. Czarkoff (talk) 16:55, 3 December 2011 (UTC)

I'm sure that something like this has been requested before... you'd have to go through the archives to find the discussion. As I recall, it concluded with the recommendation that since the docs may differ from one another, you should give the URL of the document which you actually used as your source. --Redrose64 (talk) 17:09, 3 December 2011 (UTC)
Yes. There is no guarantee that these various versions are identical. ---— Gadget850 (Ed) talk 17:50, 3 December 2011 (UTC)
I don't think that possible misuse is a valid reason to ban the feature. Furthermore, it is editors' responsibility to check the the references, and limiting the number of URLs just changes nothing in this regard. Anyway, the field I'm talking about isn't prone to this sort of problems: nearly always these papers are generated from a single source markup. But the more important question is one of conference videos: to check the the video reference one has to download and watch it, though slides could make the process by far easier. At the same time, slides are often brief, so linking video instead is a better choice in most cases. — Dmitrij D. Czarkoff (talk) 18:28, 3 December 2011 (UTC)
It is always possible to add additional links following the citation template. And that might be the best way, generally, for handling obscure formats. ~ J. Johnson (JJ) (talk) 00:42, 7 December 2011 (UTC)
Is there a real world example where this would be useful? ---— Gadget850 (Ed) talk 01:22, 7 December 2011 (UTC)
Yes, for the reports of the IPCC (see Global warming#References, e.g.), where ISBNs have been included for both the hardback and paperback editions. (Having separate references that differed only in the ISBNs posed some problems in how to use them.) I think I've done something similar elsewhere, but offhand don't recall just where. The point is: in the rare instances where more links are desired than the template provides, they can be added after the template. ~ J. Johnson (JJ) (talk) 20:11, 7 December 2011 (UTC)
No need to elaborate the formats in most cases, just |url1= |url2= etc. It would be useful for such things as preprints and reprints that differ in minor ways from the wp:SAYWHEREYOUGOTIT source. LeadSongDog come howl! 05:49, 7 December 2011 (UTC)
The first thing that came to mind: Plan9 docs, though many other papers are released in several versions. — Dmitrij D. Czarkoff (talk) 07:57, 7 December 2011 (UTC)
Don't think it's a good idea to add links after template. This makes the overall feel of reference unclean. Having a way to specify multiple sources that can be refined at once for all citations out there (if needed) is a way better solution. Actually we need these templates exactly to minimize such hand-added cruft. — Dmitrij D. Czarkoff (talk) 14:38, 25 January 2012 (UTC)

[edit] Citations that use an 'id' rather than a page range

What should one do when an online journal article lists an 'id' rather than a page range? (For example: "id.A131" on the publication information for Borissova et al. (2011).) Does this identifier just go in the 'id=' field or the 'page=' field? Would the reader understand the significance of this? Thanks. Regards, RJH (talk) 19:56, 20 December 2011 (UTC)

In that particular case, it's rather redundant. Either |doi=10.1051/0004-6361/201116662 or |bibcode=2011A&A...532A.131B fully identifies the article. But I might use either the |page=A131 or |at=id.A131, trying to keep it consistent with other references in the article. For Pubmed indexed articles, that index shows article numbers as a variation on a page parameter, a practice that Vancouver style citations reflect. LeadSongDog come howl! 20:10, 20 December 2011 (UTC)
Thank you. Regards, RJH (talk) 21:05, 20 December 2011 (UTC)

[edit] Preferences & best practices regarding Citation Style 1

{{Citation}} isn't listed as a member of Help:Citation Style 1, but it appears to be part of it. Is there a rationale for excluding it from the list?

That leads to the second question: it appears to be the parent of the other templates. Does that mean its status is "special" in that you recommend against using it when a specific one is available? What do we do in the case where we've got fields that aren't officially supported by one template (like a volume number in a conference report)—just use {{Citation}} because it won't break, or use {{Cite conference}} and hope the volume parameter eventually gets official support? (Or edit the template/doc myself?) TheFeds 06:06, 6 January 2012 (UTC)

It is not the parent; both citation and the other cite templates use {{Citation/core}}. You should either use {{citation}} for everything, or use separate {{cite news}} etc templates for everything, rather than mixing the two kinds of citation templates within a single article, because for historical reasons their formats are inconsistent; for instance, {{citation}} separates parts of the citation by commas whereas the others use periods. —David Eppstein (talk) 06:29, 6 January 2012 (UTC)
By default they use different punctuation, but you can force the templates to use what punctuation you prefer by using the |separator= param. --Eisfbnore talk 08:49, 6 January 2012 (UTC)
Exactly. In practice, the punctuation options are little used. This should probably be documented better on the help page. ---— Gadget850 (Ed) talk 09:41, 6 January 2012 (UTC)
Two questions. First (I knew this once!), how much of the difference between {{citation}} and (say) {{cite book}} is just in the period/comma as separator? And second, is the recommendation against using both simply because of the stylistic inconsistency, or is there some kind of internal conflict? Alternately, could citation and cite be used together if the separator is appropriately specified? ~ J. Johnson (JJ) (talk) 23:31, 6 January 2012 (UTC)
{{citation}} has automatic linking for Harvard refs built in. With {{cite book}} this needs to be explicitly turned on for each instance by use of |ref=harv --Redrose64 (talk) 23:49, 6 January 2012 (UTC)

CS1 uses a series of templates, whereas Citation Style 2 (CS2) uses only {{citation}}. Differences are:

  • Punctuation: The default separator for sets of fields is a period (.) for CS1 and a comma (,) for CS2.
  • Anchors: CS1 anchors are optional and must be enabled; CS2 always generates an anchor.
  • Parameters: CS2 has only one set of parameters; CS2 templates use parameters based on the type of source and are generally easier to implement.

---— Gadget850 (Ed) talk 01:01, 7 January 2012 (UTC)

Thanks for the clarification. Yeah, the Citation vs. Citation/core thing tripped me up. I didn't realize that they were both calling core, but with different arguments. That's kind of strange, especially the part about the punctuation. (I remember seeing discussion of that years ago, but I assumed it had all been harmonized by now...I guess not. Why is that, anyway? Two factions unwilling to compromise on a semicolon?)

Are there instances where the CS2 template can't do something that one of the CS1 templates can? Or is it just a usability thing? Was it assumed easier to remember the parameters in terms of what they're conventionally called in (for example) a journal, than the generic parameter names from {{Citation}}? TheFeds 01:35, 7 January 2012 (UTC)

I guess you could consider me a reformed {{template}} user. I used to use the individual cite templates exclusively, but recently switched when I found 'citation' handles punctuation of name abbreviations better. Once I got used to it, I started using citation constantly because it's just easier to remember all the parameters and nuances for a single template. I only use the cite templates when I have to maintain consistency with the previous cite usage in an article. My $.02 worth. Regards, RJH (talk) 02:20, 7 January 2012 (UTC)
Yes, those are pretty much my sentiments also. And also thanks to Ed for the clarification; I had forgotton about the anchors. My sense is that cite/citation (which is equvialent to CS1/CS2?) can be used together, the problem being inconsistencies in format and the generation of anchors. Is that right? ~ J. Johnson (JJ) (talk) 21:48, 7 January 2012 (UTC)
I use {{citation}} in preference to the others, also, but for a different reason: I often use an external program to format the citations and I don't want to deal with programming it to figure out which of the many cite templates to use nor which variations in parameter names to use for them. Having it all in a single template is simpler for my program to handle. —David Eppstein (talk) 21:59, 7 January 2012 (UTC)
There is no technical reason why {{citation}} cannot be mixed with CS1 templates ({{cite book}}/{{cite journal}}/etc.) in the same way that there is no technical reason why plain-text citations cannot be mixed with templated citations. However, unless all those parameters like |postscript=|separator=|author-separator=|author-name-separator= are carefully set either for all the {{citation}}, or for all the others, it does create an inconsistency of referencing style, which can mean a knockback at WP:FAC. --Redrose64 (talk) 23:53, 7 January 2012 (UTC)

[edit] Please add "doi = " to article template example

Please add "doi = " to article template example. I would do it myself if it weren't locked. It's recommended practice to give DOIs for journal articles --mcld (talk) 10:03, 9 January 2012 (UTC)

The examples are all within the pale green portion of the page. This bit is not part of the template, but is the template's documentation. This is not locked (i.e. protected) - documentation pages should never be protected - you will notice that although there is no "edit" tab at the top of the page, there are a number of "[edit]" links for the sections of the documentation. Click the relevant one of those to edit that section. --Redrose64 (talk) 17:48, 9 January 2012 (UTC)

[edit] deadurl parameter

Hi! Could we please add the |deadurl= field to this citation template per Wikipedia:Requests for comment/Dead url parameter for citations.

The edit needs to be like this: [1].

You can see all the testcases at User:H3llkn0wz/Sandbox3. This basically does this:

{{Citation | url = http://liftoff.msfc.nasa.gov/academy/space/atmosphere.html | title = Earth's Atmosphere | accessdate = October 25, 2007 | year = 1995 | author = NASA | archiveurl = http://web.archive.org/web/20071013232332/http://liftoff.msfc.nasa.gov/academy/space/atmosphere.html | archivedate = October 13, 2007 }}
NASA (1995), Earth's Atmosphere, archived from the original on October 13, 2007, http://web.archive.org/web/20071013232332/http://liftoff.msfc.nasa.gov/academy/space/atmosphere.html, retrieved October 25, 2007 
to
{{Citation | url = http://liftoff.msfc.nasa.gov/academy/space/atmosphere.html | title = Earth's Atmosphere | accessdate = October 25, 2007 | year = 1995 | author = NASA | archiveurl = http://web.archive.org/web/20071013232332/http://liftoff.msfc.nasa.gov/academy/space/atmosphere.html | archivedate = October 13, 2007 | deadurl = no }}
NASA (1995), Earth's Atmosphere, archived from the original on October 13, 2007, http://liftoff.msfc.nasa.gov/academy/space/atmosphere.html, retrieved October 25, 2007 

—  HELLKNOWZ  ▎TALK 10:56, 14 January 2012 (UTC)

YesY Done ---— Gadget850 (Ed) talk 12:19, 14 January 2012 (UTC)

I went through all the Citation Style 1 templates— added deadurl to all and added archiveurl to a few that were missing it. I will be going through all the doc pages soon and doing some cleanup. ---— Gadget850 (Ed) talk 14:27, 14 January 2012 (UTC)
Thanks for effort! —  HELLKNOWZ  ▎TALK 14:56, 14 January 2012 (UTC)

[edit] Harvard references

The {{harv}} template is up for deletion: see Wikipedia:Templates for discussion/Log/2012 January 24#Template:Harvard citation. Please comment there. --Redrose64 (talk) 00:02, 25 January 2012 (UTC)

Closed (by me) as snow keep. BencherliteTalk 22:37, 25 January 2012 (UTC)

[edit] {{Citation}} used with no parameters

How easy would it be to add an error message or category when {{Citation}} is used with no parameters as here? The editor clearly meant {{Citation needed}}. I've seen this a few times now. -- John of Reading (talk) 12:42, 25 January 2012 (UTC)

Title should be mandatory— it would be fairly easy to add a check and show an error. I can look at this in a bit. ---— Gadget850 (Ed) talk 12:49, 25 January 2012 (UTC)
It would be probably wise to make {{citation}} with no arguments (or only "date" argument) render exactly as {{citation needed}} and to phase out {{citation needed}} at all. Probably same features should be implemented for WP:CS1 and other citation templates. — Dmitrij D. Czarkoff (talk) 15:08, 25 January 2012 (UTC)
I'm not sure we want to conflate two templates with opposite purposes like that. It's probably better just to show an error. Regards, RJH (talk) 15:42, 25 January 2012 (UTC)
And these templates are already eat enough resources. ---— Gadget850 (Ed) talk 16:01, 25 January 2012 (UTC)
I've got round to doing a database scan. There are 459 mainspace articles that match \{\{ *[Cc]it[e|ation] *\}\} so I guess I could switch them all to {{Citation needed|date=March 2012}} without too much hassle. Or is that too many to do without a bot approval? -- John of Reading (talk) 13:45, 6 March 2012 (UTC)

[edit] trans_title

Template doesn't currently seem to support "trans_title=" Template:Cite_web does. Can we have "trans_title " please Mddkpp (talk) 09:18, 1 February 2012 (UTC)

Supported but not documented. ---— Gadget850 (Ed) talk 10:19, 1 February 2012 (UTC)
Did someone break it ?- this isn't working for me :
  • Alain Jeunesse (18 Mar 1998), "La BB36000 : la locomotive multitension européenne" (in french), (REE) (Société de l'Electricité, de l'Electronique et des Technologies de l'Information et de la Communication (SEE)) (9): 71-91 

Mddkpp (talk) 10:24, 1 February 2012 (UTC)

Odd. |trans_title= doesn't work when |journal= is specified:
  • Alain Jeunesse (18 Mar 1998) (in french), La BB36000 : la locomotive multitension européenne [The BB36000 : A multi-voltage locomotive for Europe], Société de l'Electricité, de l'Electronique et des Technologies de l'Information et de la Communication (SEE), pp. 71-91 .
But it does work with {{cite journal}}:
  • Alain Jeunesse (18 Mar 1998). "La BB36000 : la locomotive multitension européenne [The BB36000 : A multi-voltage locomotive for Europe]" (in french). (REE) (Société de l'Electricité, de l'Electronique et des Technologies de l'Information et de la Communication (SEE)) (9): 71-91. 
Have to look into this later. ---— Gadget850 (Ed) talk 12:10, 1 February 2012 (UTC)
One of the reasons that I don't like {{citation}} but use the specific {{cite journal}}, {{cite book}} etc. is that {{citation}} tries to second-guess what the type of source is by which combinations of parameters are present or absent; some parameters change their meanings in this manner. Anyway, try using |trans_chapter= for journals, as here:
  • Alain Jeunesse (18 Mar 1998), "La BB36000 : la locomotive multitension européenne [The BB36000 : A multi-voltage locomotive for Europe]" (in french), (REE) (Société de l'Electricité, de l'Electronique et des Technologies de l'Information et de la Communication (SEE)) (9): 71-91 
--Redrose64 (talk) 14:49, 1 February 2012 (UTC)
Yes. I am still working some of the combinations and how they render. When you use journal, then the title is treated as a chapter. This needs some doc work. ---— Gadget850 (Ed) talk 15:07, 1 February 2012 (UTC)
Thanks - I avoid the "sub-templates" because mixed use seems to give an inconsistent style - though maybe this has been fixed. Can I assume this will work at somepoint at the future - I have no way of remembering all the places I've used citation Mddkpp (talk) 20:16, 1 February 2012 (UTC)
{{cite journal}}, {{cite book}} etc. are not subtemplates - they are front ends, just as {{citation}} is a front end. {{cite journal}}, {{cite book}} etc. are collectively known as Citation Style 1 (CS1), whereas {{citation}} is Citation Style 2 (CS2). All of these use the same {{citation/core}} engine behind the scenes, but CS1 templates instruct that to format the citations in one way, whereas CS2 instructs {{citation/core}} to format the citations in another way. The two ways primarily differ in the way that punctuation is handled. On any given article, you can mix the various CS1 methods because all those in that group use the same style as each other, but you should not mix CS1 with CS2 because the final appearance will be inconsistent. --Redrose64 (talk) 21:20, 1 February 2012 (UTC)

[edit] Display of long doi.

I have noticed various instances (including this) where a long doi in a double-column format doesn't wrap, and extends into the adjoining column. Is there any way of dealing with this? (The only mention I have found, at TT::Citation/Archive_1#Problem_with_longer_DOI, doesn't address this.) ~ J. Johnson (JJ) (talk) 20:45, 18 February 2012 (UTC)

Looks OK in Firefox 10; since you see columns, you aren't using IE9 or below. ---— Gadget850 (Ed) talk 22:08, 18 February 2012 (UTC)
Looks OK in Firefox 3.6.27 too --Redrose64 (talk) 22:36, 18 February 2012 (UTC)
Oh. So likely my Firefox 3.0.6 is just a few minor revisions behind curve, eh? Thanks for checking. One more item for the to-do list. ~ J. Johnson (JJ) (talk)
At present, Mozilla are pushing Firefox 10.0.2; but if you don't want to go that far the only "older" version that they still offer is 3.6.27 (released 17 February 2012), see here. Bear in mind that 3.6.x development may well cease soon. --Redrose64 (talk) 18:51, 19 February 2012 (UTC)

[edit] Minor author-link problem

Corbett, Richard; [|Jacobs, Francis]; Shackleton, Michael 

That partial citation in European Union#Literature produces the "|" and extra brackets in Jacobs; but seems to my novice eye to be done correctly. Any thoughts? Thanks. I'll check back. Swliv (talk) 19:26, 27 February 2012 (UTC)

The use of an URL in |authorlink= will break the link; this field is for the name of the Wikipedia article about the author, not a website. ---— Gadget850 (Ed) talk 19:32, 27 February 2012 (UTC)
Thanks. I guess I'm inclined to leave it despite the slight awkwardness of the look. Swliv (talk) 03:03, 28 February 2012 (UTC)
The link seems to be dead. A working archived copy is http://web.archive.org/web/20071015122553/http://europarl.ie/about.html. Wtmitchell (talk) (earlier Boracay Bill) 03:28, 28 February 2012 (UTC)
Don't worry, some helpful editor will notice the problem and fix it. ---— Gadget850 (Ed) talk 09:26, 29 February 2012 (UTC)

[edit] Bug in Template:Citation/identifier handling of OL works

The OL identifier is incorrectly presumed to refer to a specific edition. OL ids that end in W refer to works, at urls of the form (http://openlibrary.org/works/OL237370W). Such links are appropriate where the specific edition sourced is uncertain and often are helpful in finding an online-accessible edition in lieu of a similar less-accessible one. LeadSongDog come howl! 04:08, 29 February 2012 (UTC)

What needs to be don here? ---— Gadget850 (Ed) talk 22:58, 5 March 2012 (UTC)
OL IDs end in either W or M. Those ending in M are presently handled correctly, with the url for a specific edition, such as the link to http://openlibrary.org/books/OL14030155M for |ol=14030155M. Those ending in W refer to a work, which at OL refers to one or more editions, such as http://openlibrary.org/works/OL237370W for |ol=237370W. So the template should check to see if the value of |ol= ends in M or W, then use a different url in each case. Right now it treats both as if they ended in M. LeadSongDog come howl! 14:53, 6 March 2012 (UTC)
I see the issue. {{str endswith}} looks useful. Let me look at this later. What if the OL does not end with W or M?---— Gadget850 (Ed) talk 16:27, 6 March 2012 (UTC)
So far as I can tell the only other valid option is "A", which would map OL2548361A to http://openlibrary.org/authors/OL2548361A. While I don't forsee this being used much, it's at least a theoretical possibility that an editor might cite only the author name without the title.LeadSongDog come howl! 21:27, 6 March 2012 (UTC)
There's nothing wrong with how the template works. Identifiers should be used to identify what you actually cited, hence M (more or less the equivalent of an ISBN), and not W (more or less the equivalent of an ISSN). Headbomb {talk / contribs / physics / books} 17:39, 6 March 2012 (UTC)
Do you mean that W should go 404 or it should not be used? ---— Gadget850 (Ed) talk 18:04, 6 March 2012 (UTC)
That it should not be used (as an identifier). Headbomb {talk / contribs / physics / books} 18:17, 6 March 2012 (UTC)
Did you read the first line of this section: "where the specific edition sourced is uncertain..."? It is quite common for editors to provide only an author and title when citing, without bothering to give a year, publisher, etc. For citegnomes coming along after the fact, the next step is to more fully identify the work. It would be false precision were I to insert the "M" identifier for an edition without actually seeing it, but the "W" identifier is still valid. Having gotten that far, a subsequent editor can find a specific edition to check if it supports the in-text assertion and if so, can then cite that more specific edition, adding page number, publisher, and date. Incremental improvement is still improvement. LeadSongDog come howl! 21:09, 6 March 2012 (UTC)
And these people can still give a link to that page with |url=. Personally, I don't see the point, but I supposed some fancy-pants logic could be used for the 3-4 cases where that could happen for some weird reason. Whatever happens here should be synced with {{OL}}. Headbomb {talk / contribs / physics / books} 21:17, 6 March 2012 (UTC)
Looking at {{OL}}, it detects whether the id ends with A, M or W. The doc page needs some updating. ---— Gadget850 (Ed) talk 21:33, 6 March 2012 (UTC)
Ah: just checked the history. ---— Gadget850 (Ed) talk 21:53, 6 March 2012 (UTC)

[edit] Add doi-check

If an admin could put {{citation/identifier/sandbox}} (this revision) into {{citation/identifier}}, that would be peachy. What it does is check if the DOI starts with '10.Foobar'. If not, it throws an error message and populates Category:Pages with DOI errors. It's tested and everything. Headbomb {talk / contribs / physics / books} 19:05, 6 March 2012 (UTC)

Yes check.svg Done --Redrose64 (talk) 19:40, 6 March 2012 (UTC)

[edit] A new solution needs to be found for the "2001a" problem

The section "IDs must be unique" provides a sloppy kluge for getting around the problem of duplicate Harvard reference link-target anchor IDs, which arises when two sources share the same author and year. This needs to be fixed with a parameter, like |harvletter= or something, so that the letter is appended the year only for linking purposes, and is not actually appended to year data as the year data; doing so falsifies and invalidates that data. There is no such year as "2001a", and because automated systems we cannot predict can and will re-use WP content in ways we cannot predict, we have a responsibility to get this right. — SMcCandlish   Talk⇒ ɖ∘¿¤þ   Contrib. 20:26, 17 March 2012 (UTC)

Let's say that you're using Shortened footnotes. The inline template might be {{sfn|Doe|2012|p=12}}, which links to a {{cite book|last=Doe|first=John|title=A Book of Stuff|year=2012|ref=harv}} (or, if you prefer, to {{citation|last=Doe|first=John|title=A Book of Stuff|year=2012}}). Then the same guy writes a different book in the same year which is also useful in the article. How should the short notes distinguish? --Redrose64 (talk) 21:02, 17 March 2012 (UTC)
Using "2001a" etc is not solely for the purpose of making link-target anchors. It's also necessary as a way of unambiguously identifying references to human readers. —David Eppstein (talk) 21:09, 17 March 2012 (UTC)
Yeah, I know. I've used the |year=2012a technique several times myself and it works just fine. I'm just a bit pissed off because I know we've gone through this several times before. It must be in the archives but I just can't be arsed to look. --Redrose64 (talk) 21:57, 17 March 2012 (UTC)
It also has to work for printed versions. The use of year suffixes is used by most style author-date style guides. ---— Gadget850 (Ed) talk 22:17, 17 March 2012 (UTC)
I hate the whole appended digit idea; I use {{sfnRef}} to make a name that's unique. See Ernest Shackleton (2×Shackleton 1919), Amundsen's South Pole expedition (2×Huntford 1985), and Richard Nixon (8×Nixon Library) for examples. Others out there, too. SMcCandlish is very right about the falsified data aspect of this. Alarbus (talk) 06:47, 18 March 2012 (UTC)
Looking at those articles, you are using author-title, author-title-year and work-title. This may be even more tortured than the alpha suffix method.
  • Shackleton, South (film).
  • Shackleton, South
  • Huntford (The Last Place on Earth) 1985
  • Huntford (Shackleton) 1985
  • Nixon Library, Post Presidency
  • Nixon Library, President
  • Nixon Library, Childhood
  • Nixon Library, Vice President
The alpha suffix is a well used method:
  • "Two or more works by the same author in the same year must be differentiated by the addition of a, b, and so forth (regardless of whether they were authored, edited, compiled, or translated), and are listed alphabetically by title." CMOS 16 15.19
  • "Place lowercase letters—a, b, c, so forth—immediately after the year, withing the parentheses:" APA 6 p. 162 OWL
It would be technically possible to add something like |datesuffix= to the templates that would use the label to create the links but would not display it, unless printed. ---— Gadget850 (Ed) talk 13:43, 18 March 2012 (UTC)
Those formats are commonly used as plaintext, I'm just {sfn}'ing them up. I know the alpha suffix is well used in print, but we're not paper and all that; we're a website, a datebase. Links/anchors need to be unique and we should not be hiding things except for print; people need to be able to sort things out simply by reading off the screen. And actually adding the alpha character into the year parameter amounts to database corruption. Alarbus (talk) 19:10, 18 March 2012 (UTC)
The citation templates already hide the URL except in print. The proposal I made above would separate the suffix from the date: it would only be used when the anchor is created and in print. ---— Gadget850 (Ed) talk 19:22, 18 March 2012 (UTC)
I do think that separating suffixes from years is needful when they're used. My point was that a reader simply viewing the article (or listening with a screen reader) needs to be able to figure out which "2000" is meant; it's not enough that two links target different sources. The distinction has to be apparent without clicking (which is very useful and the whole linking helps verifiability). I'm glad url are printed. Not displaying them on screen is an internet-wide practise and some are insanely long. Alarbus (talk) 20:07, 18 March 2012 (UTC)
  I think you all are straining too hard on this. A couple of points. First, SM is right (also Alarbus) in that "2001a" is not a year (date). I reckon any such value in |year= (or |date=) as corrupt data, and I strongly urge against any such perversions. However (second point), in the link (e.g., "Smith 2001a") used to connect the short reference to the full reference this is not a problem, because that tag is not a date field. It is a composite (of author+year+suffix) which conveniently incorporates the year, but that tag is not intended as a date. (If it is parsed for year, then the suffix can be parsed as readily as author.)
  As to the question of how to get {{citation}} to build a suitable anchor for something like {{Harv|Smith|2001a}}, I find it handy to specify the ref link explicitly with "ref=CITEREFSmith2001a". We get the properly suffixed year in the link, but not in the full reference, nor is the metadata corrupted. I've been doing this for a while, and it works fine. ~ J. Johnson (JJ) (talk) 21:07, 18 March 2012 (UTC)
Pretty much right. I don't think anyone is objecting to a digit or whatever else in the link-text or #anchor (although I do prefer the other routes, above). It's the corrupt year field that's got to be cleaned-up, and there must be many hundreds of thousands out there. You should avoid the "ref=CITEREFSmith2001a" approach, though; see {{sfnRef}} or its redirect {{harvid}}; its job is to do exactly that without having to glue the encoding into each citation (which may want to change someday (see Encapsulation). {sfnRef} is building more complex forms of ref=CITEREF..." in the above examples. Alarbus (talk) 21:31, 18 March 2012 (UTC)
(edit conflict) There is a template specifically for that purpose. In the {{citation}} you would put |ref={{harvid|Smith|2001a}} which generates |ref=CITEREFSmith2001a. You don't need to remember any new syntax - {{harvid}} takes the same positional parameters as {{harv}}, it just lacks the named params like |p=. --Redrose64 (talk) 21:35, 18 March 2012 (UTC)
  Why should direct coding of the citeref be avoided? Sure, perhaps the citation will get changed someday, but how does that change an explicit "ref="? I don't see what is saved in adding another layer of templating. ~ J. Johnson (JJ) (talk) 23:55, 18 March 2012 (UTC)
The scheme of encoding might change; this thread is an example of the sort of issue that might benefit from that (or not), and glueing the scheme into a huge number of spots is limiting. See the article I linked for the concept: Encapsulation (object-oriented programming). The {{sfnRef}} template is friendlier and familiar and provides a means of encapsulating the encoding. It should be used. Someone should put a bot on the task of fixing embedded encoding instances. Alarbus (talk) 01:07, 19 March 2012 (UTC)
  Look, I understand encapsulation (and that article was not relevant to my question), and if a datum needs to be processed I quite understand running it through a standard "object" rather than coding the processing in every instance. But what is the benefit of "|ref={{harvid|Smith|2001a}}" over the hardcoded "|ref=CITEREFSmith2001a"? I don't believe the link-tag needs processing. (Alternately: should each component be processed with something like "|ref=CITEREF{{author-check|Smith}}{{year-check|2001}}{suffix|a}}"?) ~ J. Johnson (JJ) (talk) 22:18, 19 March 2012 (UTC)
If the method used by {{harv}} (and related templates) to generate the link changes (it's happened as recently as February 2011), amending a few templates is much easier than going through every single page. --Redrose64 (talk) 23:53, 19 March 2012 (UTC)
Exactly; explicitly encoding within articles should be strong discouraged for this reason. JJ, my meaning was that the encoding is encapsulated by the template; please use it. Alarbus (talk) 03:21, 20 March 2012 (UTC)
Yes this is a horrible kludge. There is however a ref field of some sort, and when I recommended dumping the year field some time ago, that was a good place to put a solution. At the time there were virtually no uses of a year with a letter, and not that many of the year parameter. Unfortunately my suggestion to deprecate "year" entirely (since we have a "date" field) resulted in AWB being modified to change all year-only dates to "year" fields. Never did figure why that was a good thing. Rich Farmbrough, 02:30, 20 March 2012 (UTC).
The CS1 templates extract the year from |date= using #time. If the date is a single number, it can be interpreted as a time and not properly parsed when creating the anchor. Examples:
  • last (2001).  anchor = ​CITEREFlast2001​; correct
  • last (916).  anchor = ​CITEREFlast​; wrong
The markup is in each CS1 template, not core. Perhaps we should look at fixing this. ---— Gadget850 (Ed) talk 03:03, 20 March 2012 (UTC)
By a relatively strange coincidence I just read up on a related PHP issue in one of the archives. This certainly bears some thought. Rich Farmbrough, 16:40, 21 March 2012 (UTC).

[edit] 'Cite newspaper The Times' and 'Cite wikisource'

Would someone following this page be willing to have a look at the question I've raised here about citing The Times Digital Archive? I'm trying to work out the best way to cite this wikisource obituary from The Times. I could use Template:Cite wikisource, but as I also have access to The Times Digital Archive, I could use that as well. I would prefer to cite direct to The Times Digital Archive, as the wikisource page appears to have been typed freehand, not verified from a page scan, but possibly including the wikisource page as a courtesy link, though I realise that might be too convoluted. Carcharoth (talk) 13:18, 18 March 2012 (UTC)

My view is, just cite it to The Times in the usual way. No need to mention the Times Digital Archive. Since there happens to be a copy of the article at Wikisource, there is no harm in giving the URL of that as a courtesy link; obviously not necessary but at any rate more useful, I think, than giving the URL of the Times Digital Archive, since most readers won't have access to that, and those who do (e.g. me with my local library card) will probably be aware of the fact already and will know how to look it up there if they wish. -- Alarics (talk) 14:29, 18 March 2012 (UTC)
See {T} New York Times Wikipedia reference generator.Moxy (talk) 14:43, 20 March 2012 (UTC)

[edit] translator(s)

There are plenty of texts which are translations, the translators of which are as important as the original author. My specific case in point was ISBN 9780195147339 - authored by Tsongkhapa - but translated by Garfield and Samten who are very well known in their field. (20040302 (talk) 11:10, 20 March 2012 (UTC))

This is one of the uses of the |others= parameter. Use |others=trans. Garfield, Jay L. and Samten, Ngawang or similar. --Redrose64 (talk) 13:20, 20 March 2012 (UTC)

I opted to include them as authors in an authors list, with (tr.) after their lastnames. They have positively contributed to the text, with many interpretations and much commentary; so much so that quite some of their work can be identified as secondary sources. I don't really like the idea of 'others' either. IMO it's a catch-all kludge. Anyhow, I'm not going to push for translators being added to the template, though I still consider it a good idea and far more relevant than some existing parameters. (20040302 (talk)) —Preceding undated comment added 14:41, 20 March 2012‎.

[edit] The "url" parameter

Discussion about changing Template:Citation/core so that the URL given with |url= won't slip to chapter is happening at Template talk:Citation/core#The "url" parameter.Dmitrij D. Czarkoff (talk) 00:01, 21 March 2012 (UTC)

Personal tools
Namespaces

Variants
Actions
Navigation
Interaction
Toolbox