Template talk:Citation/core/Archive 1

Latest comment: 15 years ago by Fullstop in topic Archival improvement
Archive 1Archive 2Archive 3Archive 5

Reinstating talk page

{{editprotected}} This page used to redirect to Template talk:Citation; now that other templates rely on it this isn't really appropriate so I've substantiated the talk page. To celebrate this I'll duplicate an edit request already advertised at Template talk:Cite book#Translator; please copy Template:citation/core/book to Template:citation/core.

Interested users may wish to add this page to their watchlist. Martin 04:51, 8 December 2008 (UTC)

I would argue that the talk pages of all these templates (citation, cite_book, cite_journal, cite_web) should also be unified; i.e. they should all redirect to Talk:Citation. I would also argue that the documentation should be unified as well. ---- CharlesGillingham (talk) 07:54, 8 December 2008 (UTC)
I agree that the former needs to happen at some point; maybe best to wait until outstanding issues from the update are resolved at {cite book}. Merging the documentation also seems to make sense. Martin 13:38, 8 December 2008 (UTC)

Parameter naming

Most of the parms in citation/core are named with InitialCaps, but there are a couple (format, language, amp, laysummary & its related ones) that are in all lowercase.

For consistency's sake, should we have all of citation/core's parms named/formatted the same way? For the 'wrapper' templates that are now calling this one like cite journal, cite book, all the parms are lowercase. I suppose that having citation/core's parms named with InitialCaps helps distinguish between what wld otherwise be identically named parms in the core, and in the wrapper templates.--cjllw 00:28, 11 December 2008 (UTC)

As editors never have to use Citation/core's parameters directly, I don't think it matters either way. Martin 13:33, 12 December 2008 (UTC)
Well, even if not an issue for {citation} or {cite XXX} template users, inconsistency may be a potential annoyance to folks who maintain this (increasingly complicated) code—not everyone doing this now and in the future may be familiar with the template's development. Particularly so since case matters in these parameter names, it's easy enough to misstype a parm as lowercase when it should be InitCaps, and vice versa, when say sandboxing some proposed modifications. Having more predictable parameter names/orthography ought to lessen the chances of such snafus, one would think.--cjllw 13:52, 18 December 2008 (UTC)
I would go for consistency. We did have a problem a while back with "DOI" vrs "doi" with both being used in the core template code. Adhering to an defined convention would have eliminated this. --Salix (talk): 16:20, 18 December 2008 (UTC)

Misc updates

{{editprotected}} Please copy the Sandbox to Template:Citation/core.

This incorporates miscellaneous changes:

  • Fix language and format parameter as requested at Template talk:Cite book without damaging Cite Journal
  • restoration of origyear functionality (requested at Cite Book)
  • Un-hardcoding a separator that was missed originally
  • Ensuring that the title displays with different URL specifications
  • Allowing the format of the accessdate to be manually specified

I've tested it against all the testcase pages and can't see any problems.

Thanks, Martin 14:07, 12 December 2008 (UTC)

  Done It Is Me Here 19:14, 12 December 2008 (UTC)

Another minor tweak

{{editprotected}} There was a convoluted twist in the code that could result in unusual combinations of parameters displaying the language and format twice. Replacing Template:Citation/core with Citation/core/sandbox resolves this anomaly, making the code more intuitive and slightly smaller (= faster to load). I did not observe any deleterious effects at the test case pages. Martin 19:26, 13 December 2008 (UTC)

  Done It Is Me Here 21:02, 13 December 2008 (UTC)
Thank you   Martin 23:29, 13 December 2008 (UTC)

More fields

Should Template:Citation/core support fields like artist, and inker, penciller (and/or derivatives of those)? These as something to default to if they exist but there's no author, along with the existing issue, periodical, title, and series fields, would make it possible to directly support manga and comic books. (They may not be cited much, but they're one of the few primary sources in articles actually having to do with those media.)

Also, some way to switch from the existing periodical formatting to more like "___ vol. 3" / "___ vol. 3, #100"? This is a much more common use for comics than something like "___ 3 (100)". Here's an example of what I mean:

Lee, Stan (w); Kirby, Jack (p); Ayers, Dick (i); Klein, George (i); Rule, Christopher (i). "The Fantastic Four!" The Fantastic Four vol. 1, #1 (10 November 1961). Lee, Stan ed. New York, NY: Marvel Comics. Cover. "Just wait and see, sister! The Fantastic Four have only begun to fight!"

The formatting doesn't have to be exactly that, of course, but it should get the gist across. Sukael \o/ 17:27, 20 December 2008 (UTC)

Support for these additional fields would have to be provided by, say, 'cite comic book', which would work out what to append to the authors and pass this information to 'citation/core'. Is such information really necessary in a citation? I should imagine that the source is no harder to find if you don't know whether Joe Bloggs was the inker or writer. Martin 18:54, 3 January 2009 (UTC)

{{editprotected}} Could we remove the brackets around laydate? It looks strange, and it seems the other dates are not linked. Make it {{{laydate}}} instead of [[{{{laydate}}}]]. --Apoc2400 (talk) 19:25, 28 December 2008 (UTC)

Before this edit is made, I think you need to muster consensus for the best solution – try advertising the proposed edit at Template talk:Citation, Template talk:Cite book and Template talk:Cite journal. Martin 18:57, 3 January 2009 (UTC)
Since all the other dates in this template are not linked I don't think it's controversial to unlink the laydate field as well. --Apoc2400 (talk) 13:53, 7 January 2009 (UTC)
What does "laydate" do? —Remember the dot (talk) 19:55, 10 January 2009 (UTC)
It appears to be a bad idea imported from {{cite science}}. The {{Cite journal}} talk archives have some damning things to say that were essentially unanswered, and it appears to have come here as a result of changes necessary to convert that template to use this one. RossPatterson (talk) 21:19, 10 January 2009 (UTC)
I don't know the history, but I have used it a few times. It's for when you cite a scientific article in a journal, but also an article in a newspaper or magazine that reports about the study in laymans terms. laydate is the access date for laysummary. Ross: How would you prefer to do it instead? Put the article and lay summary in separate refs? Put both {{cite journal}} and {{cite news}} in the same <ref></ref>? Or just cite one of them? --Apoc2400 (talk) 22:43, 10 January 2009 (UTC)
Yeah, I agree with fnielsen's suggestion of "<ref>{{cite journal|title=Really Dense Paper Einstein Couldn't Understand |...}}{{cite news|title=Oversimplified Article Written at a Moronic Level |...}}</ref>". It makes it patently obvious that the two sources are related and part of the same citation, without hiding all the details of the less-valuable-but-so-important-it-can't-be-omitted layperson's reference. RossPatterson (talk) 23:48, 10 January 2009 (UTC)
  Done Ruslik (talk) 14:42, 16 January 2009 (UTC)

Editor punctuation

{{editprotected}} An issue has been raised at template talk:Cite book regarding the double punctuation of the editor field. My comment and edit request is copied below.

As I understand it, we should see 'ed.' where the rest of the citation is separated by periods, and 'ed.,' where a comma separator is used. This can be resolved by changing Template:Citation/core by replacing the line

      }}, ed{{#if:{{{EditorSurname2|}}}|s}}.{{

with

      }}, ed{{#if:{{{EditorSurname2|}}}|s}}{{#ifeq|{{{Sep|,}}}|.||.}}{{

This will always display a period after 'ed', unless the citation separator is itself a period, where it will display 'ed.' instead of 'ed..'. Martin 18:57, 3 January 2009 (UTC)

PS while you're at it, could you please add the line <noinclude>{{documentation}}</noinclude> to the end of the template code, so that I can add documentation (I intend to provide a list of templates using this core, but as some editors are scared of the template it may be helpful if I provided a brief explanation of its functions.) Martin 19:17, 3 January 2009 (UTC)
Thanks. Martin (Smith609 – Talk) 21:39, 3 January 2009 (UTC)
The change you requested was implemented here, but - based on what I saw at John O'Donovan (scholar) and Constantine II of Scotland - it didn't work as designed. So I undid it. Angus McLellan (Talk) 18:03, 4 January 2009 (UTC)
There are two cases of "ed{{#if:{{{EditorSurname2|}}}|s}}." in he template, and I think the one that Martin suggested changing is to be the one that isn't used by the specific examples given. Martin: Check out lines 192 and 283 of the template - your change affected line 192 only. I suspect they both need to be changed. RossPatterson (talk) 17:29, 10 January 2009 (UTC)
Thanks, Ross. Admin - please replace
      }}, ed{{#if:{{{EditorSurname2|}}}|s}}.{{
and
        |{{{Sep|,}}} ed{{#if:{{{EditorSurname2|}}}|s}}.
with
      }}, ed{{#if:{{{EditorSurname2|}}}|s}}{{#ifeq:|{{{Sep|,}}}|.||.}}{{
and
      |, ed{{#if:{{{EditorSurname2|}}}|s}}{{#ifeq:|{{{Sep|,}}}|.||.}}

respectively. Martin (Smith609 – Talk) 00:24, 11 January 2009 (UTC)

  Done Ruslik (talk) 14:35, 16 January 2009 (UTC)
And I reverted it because it did not work on Jacobi polynomials. The Abramowitz reference was displayed as "Abramowitz, Milton; Stegun, Irene A., eds{{#ifeq|,|.||.}} (1965), …". -- Jitse Niesen (talk) 15:52, 16 January 2009 (UTC)
So many people engaged in this discussion, and still no solution is available! I probably need to try solving this enigmatic problem myself. Ruslik (talk) 16:36, 16 January 2009 (UTC)

{{editrequest}}

The correct fix is to replace

      }}, ed{{#if:{{{EditorSurname2|}}}|s}}.{{

and

        |{{{Sep|,}}} ed{{#if:{{{EditorSurname2|}}}|s}}.

with

      }}, ed{{#if:{{{EditorSurname2|}}}|s}}{{#ifeq:|{{{Sep|,}}}|.||.}}{{

and

      |, ed{{#if:{{{EditorSurname2|}}}|s}}{{#ifeq:|{{{Sep|,}}}|.||.}}

Thanks, Martin (Smith609 – Talk) 22:55, 19 January 2009 (UTC)

I has already made the change (there should be no | after #ifeq: or after #ifeq, as it was written initially. See mw:Help:Extension:ParserFunctions). Ruslik (talk) 19:53, 20 January 2009 (UTC)

Date formatting

I would like to suggest that this template reformat input like date=2009-01-10 into the format "10 January 2009". The DMY format is widely used for citations even in the United States (see [1] for example). Reformatting is already done on the AccessDate parameter, so it should be easy to apply the format to the Date parameter as well. —Remember the dot (talk) 20:01, 10 January 2009 (UTC)

Each template which calls the citation/core template has the option to specify a DateFormat= parameter to automatically format the date. Most templates have opted not to specify autoformatting. Martin (Smith609 – Talk) 00:17, 11 January 2009 (UTC)
Really? It looks like this template applies DateFormat to AccessDate but not to Date itself. —Remember the dot (talk) 00:26, 11 January 2009 (UTC)
Apologies; I misread you. Martin (Smith609 – Talk) 04:42, 11 January 2009 (UTC)
This version of the sandbox should format the date and publicationdate per the DateFormat parameter, which defaults to dmy. (It also includes the change in the section below). If this works, feel free to request the edit. Martin (Smith609 – Talk) 14:27, 28 January 2009 (UTC)
There's one error with the date formatting: if it tries to format a year, it produces 1901 instead of 1901. Martin (Smith609 – Talk) 13:55, 30 January 2009 (UTC)

Leading period with no author or title specified

The current version of this sandbox includes a fix so the punctuation before the 'journal' field is only displayed if an author, editor, title, or includedworktitle is specified. While I think this will work I haven't tested it; testing should be performed before anyone requests an edit. Martin (Smith609 – Talk) 14:22, 28 January 2009 (UTC)

Thanks for pointing the way. I found a couple of problems with that fix. First, it put the italicization of the journal title in the wrong place. Second, it included the period when either the author and title were specified, when what was wanted was to included it when just the title was specified. I did some further twiddling and got it to work; please see below. Eubulides (talk) 19:07, 30 January 2009 (UTC)

Test cases for stray dot problem

  1. Neither author nor title: {{cite journal |journal= Arch Dis Child |year=2007 |volume=92 |issue=6 |pages=540–5 |doi=10.1136/adc.2005.086280 |pmid=17515625}}
    • With installed version:

Arch Dis Child. 92 (6): 540–5. 2007. doi:10.1136/adc.2005.086280. PMID 17515625. {{cite journal}}: Missing or empty |title= (help)

    • With sandbox version:
  1. Just author: {{cite journal |journal= Arch Dis Child |year=2007 |volume=92 |issue=6 |pages=540–5 |author= Dover CJ, Le Couteur A |doi=10.1136/adc.2005.086280 |pmid=17515625}}
    • With installed version:

Dover CJ, Le Couteur A (2007). Arch Dis Child. 92 (6): 540–5. doi:10.1136/adc.2005.086280. PMID 17515625. {{cite journal}}: Missing or empty |title= (help)

    • With sandbox version:
  1. Just title: {{cite journal |journal= Arch Dis Child |year=2007 |volume=92 |issue=6 |pages=540–5 |title= How to diagnose autism |doi=10.1136/adc.2005.086280 |pmid=17515625}}
    • With installed version:

"How to diagnose autism". Arch Dis Child. 92 (6): 540–5. 2007. doi:10.1136/adc.2005.086280. PMID 17515625.

    • With sandbox version:
  1. Both author and title: {{cite journal |journal= Arch Dis Child |year=2007 |volume=92 |issue=6 |pages=540–5 |title= How to diagnose autism |author= Dover CJ, Le Couteur A |doi=10.1136/adc.2005.086280 |pmid=17515625}}
    • With installed version:

Dover CJ, Le Couteur A (2007). "How to diagnose autism". Arch Dis Child. 92 (6): 540–5. doi:10.1136/adc.2005.086280. PMID 17515625.

    • With sandbox version:

The first two cases currently fail. The last two currently work, and are included here as sanity checks to test that the fix doesn't break things. Eubulides (talk) 19:07, 30 January 2009 (UTC)

Please install this fix for the stray dot problem

{{editprotected}} Please install this edit, which fixes the problem for all the test cases listed above. The edit changes the following lines (lines 324 and 325 of the current version):

}}{{
  #if: {{{Periodical|}}}|{{{Sep|,}}}&#32;''{{{Periodical}}}''{{

to these lines:

}}{{#if: {{{Periodical|}}}
    |{{#if: {{{IncludedWorkTitle|}}}{{{Title|}}}
       |{{{Sep|,}}}&#32;
     }}''{{{Periodical}}}''{{

Please cut and paste from the sandbox edit, not from the source code of this talk page, as the talk-page source contains "&amp;#32;" when what we want is "&#32;" in the actual fix.

Eubulides (talk) 19:07, 30 January 2009 (UTC)

  Done Happymelon 20:26, 30 January 2009 (UTC)

Citations no longer ending in periods

Now that {{cite news}} has switched to cite/core, none of the news citations end in periods anymore. Can someone fix this? Kaldari (talk) 19:04, 30 January 2009 (UTC)

This was a Cite news problem and not a Citation/core problem. Pagrashtak 19:13, 30 January 2009 (UTC)

Invalid id attribute

{{editprotected}} Please replace the code with this revision of sandbox. It prevents invalid id attribute like "id=CITEREF". --fryed-peach (talk) 08:51, 6 February 2009 (UTC)

This change looks like it might have unintended consequences. The id= should be fixed, not removed, or harvard references using the template will be broken. And it's not immediately obvious what the other changes are for - could you explain these too? Thanks, Martin (Smith609 – Talk) 12:57, 6 February 2009 (UTC)
This change won't break proper harvard references which have |Surname1= or |EditorSurname1=. Others are cosmetic changes, which do you want me to explain? --fryed-peach (talk) 16:51, 6 February 2009 (UTC)
I didn't have time to take a careful look at the code before; it looked at first glance like you'd removed the id parameter altogether, although I now notice it's actually on the next line. The other changes I thought I saw were the removal of the date formatting, which isn't in the live template. This is waiting on an edit at Template talk:Date; would you be happy to wait for that to be implemented, then implement both your edit and the date formatting at once? I think it'll make things simpler if we avoid overlapping... Martin (Smith609 – Talk) 17:43, 6 February 2009 (UTC)
That's fine with me. --fryed-peach (talk) 18:22, 6 February 2009 (UTC)
Thanks. Template:Date has now been updated, so I've merged our two edits into the current sandbox. Perhaps you'd like to check that this is still working before we request an edit? Cheers, Martin (Smith609 – Talk) 22:52, 6 February 2009 (UTC)
My edit is merged correctly. --fryed-peach (talk) 14:33, 7 February 2009 (UTC)
Super. Would an admin mind merging this version of the sandbox into Template:Citation/core? Thanks, Martin (Smith609 – Talk) 16:13, 7 February 2009 (UTC)

Archival improvement

{{editprotected}} The current system for specifying archive details is imperfect; it is currently specified, quite clumsily, in the templates which call citation/core. This is a potential area of template drift; I have noticed discussion in several places about tweaking the system and it'd be much easier to implement these if the code was central. Therefore I've spent this morning bringing the Archive handling into Citation/core. This version of the sandbox contains an addition, which will continue to work alongside the existing code, and has been tested at Template:Citation/testcases/archive. It brings a number of immediate benefits, including better formatting and error-detection. It will not affect other templates until those templates are modified. In readiness for implementing other templates, please copy the current sandbox to Template:Citation/core. Note that this will also implement the change requested in the section above. Martin (Smith609 – Talk) 17:47, 7 February 2009 (UTC)

  Done. I'm particularly pleased to see the date formatting techniques employed consistently. Good job! Happymelon 23:13, 7 February 2009 (UTC)
It looks like this broke the year=2006b syntax in the case that you have two references with the same authors published in the same year, as noted on Template talk:Citation#Year bug. This syntax is suggested on Template:Harv and is in use. Should we revert? -- Jitse Niesen (talk) 18:06, 9 February 2009 (UTC)
The issue is at {{date}}, not here. Happymelon 20:53, 9 February 2009 (UTC)
The issue is not at {{date}}. Its {{citation/core}} that broke, not {{date}}. And {{date}} cannot possibly handle the range of date styles that are perfectly valid in a citation, but are not calendar dates. The only fields that can safely be passed on to {{date}} are those that will be assuredly calendar dates (i.e. access-date=), and even those should not be passed to {{date}} because it either clobbers the editor's preferred date format, or requires him/her to now use another parameter in order to not clobber the formatting. This is not backwards compatible, and its completely counter-intuitive.
Editors should define dates in whatever format is appropriate to that citation and in that article. The citation template should not ever second-guess the editor.
I have provided a fix for {{citation/core}} here. -- Fullstop (talk) 02:13, 10 February 2009 (UTC)