Module talk:Citation/CS1

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

2015 arxiv errors[edit]

The format of arxiv identifiers has changed, with the sequence number being padded to five digits from 2015 onward. This change doesn't seem to be implemented in the check, with valid arxiv IDs resulting in "Check |arxiv= value" warnings, for example here. Huon (talk) 13:22, 10 January 2015 (UTC)

Fixed in sandbox. See Help talk:Citation Style 1#arXiv identifier. --  Gadget850 talk 14:19, 10 January 2015 (UTC)
So is there a timeline for implementing the fix? I've asked about that Wikipedia:Help_desk#Referencing_errors_on_PKS_1302-102 -- 65.94.40.137 (talk) 05:25, 19 January 2015 (UTC)
FWIW, ReferenceBot (talk · contribs) is delivering error notices based on the CS1 error message to editors who add arXiv id's in citation templates that use the new id# format; so there may be users who don't understand what's going on with messages they are receiving and therefore leaving enquiries at the various help outlets. -- 65.94.40.137 (talk) 07:55, 11 January 2015 (UTC)
Reference Errors on 4 February

Hello, I'm ReferenceBot. I have automatically detected that an edit performed by you may have introduced errors in referencing. It is as follows:

Please check this page and fix the errors highlighted. If you think this is a false positive, you can report it to my operator. Thanks, ReferenceBot (talk) 00:20, 5 February 2015 (UTC)

ReferenceBot is still producing error messages, even though this is a valid arXiv ID, so the module is giving editors invalid user talk page messages. -- 70.51.200.101 (talk) 11:40, 5 February 2015 (UTC)

Protected edit request on 22 January 2015[edit]

The behaviour of the quote= parameter has been changed, (in a recent edit), from plain un-formatted text, to wrapping it with <q>...</q> tags, which wrongly changes the text to all-italics. Quotations often contain italics of their own for Latin phrases, titles of works, translator added words in Bible quotes, etc. All-italics ruins everything.

Old code line 2074:
Quote = sepc .." " .. wrap( 'quoted-text', Quote );
New code line 2120:
Quote = sepc .." " .. wrap_style ('quoted-text', Quote ); -- wrap in <q>...</q> tags

There may be other code needing fixing as well. Thanks for your help. —Telpardec  TALK  21:22, 22 January 2015 (UTC)

Telpardec, can you please provide an example? Here's a {{cite book}} template that uses |quote=, and it does not show the quotation in italics (in my web browser):
"Chapter of book". Title of book. p. 45. This is a quotation from page 45. 
Here's another one with italicized text within the quotation.
"Chapter of book". Title of book. p. 45. This is a verbatim quotation from page 45. 
Thanks. – Jonesey95 (talk) 21:45, 22 January 2015 (UTC)
Answering as yes for now, since this needs discussion.
@Telpardec: Do you see this text in italics? If so, then something is changing your CSS to show quoted text as italics. --  Gadget850 talk 22:51, 22 January 2015 (UTC)
You could also try logging out of Wikipedia and then refreshing one of the pages that does not display correctly for you. If it looks fine, then something in your common.css file or a similar file may be causing italics for you (and not for others). – Jonesey95 (talk) 01:47, 23 January 2015 (UTC)
@Jonesey95, Gadget850: Both the cite book and <q> examples above are all italics, with no difference for the word verbatim. According to w3schools: "The <q> tag defines a short quotation. Browsers normally insert quotation marks around the quotation." I made a test page on my local hard drive with the result that the <q> tag is normally ignored by my browser. It does not add quote marks or italics. I don't have any local CSS set. It is only here on Wikipedia that the <q> tag is producing all italics. It is the same logged out and purged. It is the same for Vector or MonoBook skin.
Thanks for your help. —Telpardec  TALK  07:05, 23 January 2015 (UTC)
@Telpardec: Try logging out and see how it looks. What browser are you using? --  Gadget850 talk 09:29, 23 January 2015 (UTC)
@Gadget850: I already "logged out and purged" the page above.
I'm using IE6 on winXP. —Telpardec  TALK  10:49, 23 January 2015 (UTC)
@Telpardec: Aha. Looks like IE6 does not support <q>. The MediaWiki software has been stripping support for IE6, but we should be able to resolve this. My XP VM has IE8, so I can't test this immediately but this should work. Add this to your CSS:
q {font-style: normal}
--  Gadget850 talk 11:15, 23 January 2015 (UTC)
Good detective work by both of you. Telpardec, I'm sure this has been suggested before, but a browser upgrade would probably serve you well. If there is a reason you need to keep IE at version 6, maybe Chrome or Firefox can become your dedicated browser for Wikipedia. – Jonesey95 (talk) 15:57, 23 January 2015 (UTC)
@Gadget850, Jonesey95: Thanks. This machine cannot be upgraded further. The CSS fix above did not work because it did not have the q selector, like this:
q {font-style: normal}
That fix cancels the all italics for me while logged in, but there is still a problem for others. There is some rogue CSS somewhere that is wrongly changing <q> to italics. The correct behaviour for quote=, according to Help:Citation Style 1#Quote, is that the text should be "enclosed in quotes".
Anyway. Thanks again. —Telpardec  TALK  18:35, 23 January 2015 (UTC)
I updated the CSS rules above. I usually test this stuff, but I need to install a new XP VM to do so (and actually I just found a VM I can download instead of having to create it from scratch). Per Wikimedia Traffic Analysis Report - Browsers, MSIE 6 accounts for 0.22% of all requests. A number of fixes for MSIE 6 have been removed from core MediaWiki and more are scheduled for removal.
Unlike others, I'm not going to tell you that IE sucks and you should switch. As a support professional, I understand that many users do not have a choice, either by limitations of their system, corporate policy or compatibility with other software. But MSIE 6 just does not support the modern web. Wikipedia is rapidly implementing CSS3 and HTML5 which is leaving older browsers unable to render a page as the editors intend; more at Internet Explorer 6. XP can upgrade to MSIE 8 and it will support Firefox, Chrome and others.
I think the best we can do is start a Help page outlining the issue and giving what support we can. --  Gadget850 talk 18:56, 23 January 2015 (UTC)
IE6 and IE7 don't support the before and after pseudo-elements nor do they support the q property. The best we can do is change the style from italics to normal. I started Help:Internet Explorer. --  Gadget850 talk 15:24, 24 January 2015 (UTC)
What do you mean by "the q property"? There is no property of that name in CSS - there are no single-letter properties, the shortest property names are all:, cue: and top: with three letters. The way that you've used q above is as a type selector matching the <q>...</q> element. Whether a browsers supports that element isn't to do with CSS, but HTML - the browser must be older than HTML 4.01. --Redrose64 (talk) 15:43, 24 January 2015 (UTC)
<sigh> Thought I changed that before I saved. --  Gadget850 talk 15:54, 24 January 2015 (UTC)

────────────────────────────────────────────────────────────────────────────────────────────────────Gadget850, that Help:Internet Explorer looks useful. Do you mind if I mention it on VPT? I suspect that it may be useful as a FAQ-type page for answering Help Desk and VPT questions for people with IE6 and IE7 browsers. – Jonesey95 (talk) 20:01, 24 January 2015 (UTC)

Go ahead. My third help page in the week or two. --  Gadget850 talk 23:34, 24 January 2015 (UTC)

Found the problem[edit]

"Quotations often contain italics of their own for Latin phrases, titles of works, translator added words in Bible quotes, etc. All-italics ruins everything."

@Gadget850, Redrose64, Jonesey95:
The rogue CSS was found in one of the ResourceLoader modules, (introduced with MediaWiki 1.23,) that has CSS shared by both Vector and Monobook skins, called: "mediawiki.skinning.interface" which includes this:

  • q{*font-style:italic}

The asterisk is known as a "star hack", which causes all browswers to ignore that style, except Internet Explorer versions below IE8. The illegal CSS in this MediaWiki module is not limited in its affects to this template or Wikipedia alone, but undermines the integrity of all projects and languages where the <q> element is used; and therefore needs to be removed from the module ASAP.
Thanks. —Telpardec  TALK  10:22, 14 February 2015 (UTC)

Good detective work! Setting debug=true makes it more readable.[1] Which lets us see:
	/* IE 6 and 7 lack support for quotes aroud the <q> element ('::before' and '::after'
	   pseudoelements, 'quotes' property). Let's italicize it instead (using the star hack). */
	q {
		*font-style: italic;
	}
So a developer deliberately introduced this rule. Is this wrong? --  Gadget850 talk 13:07, 14 February 2015 (UTC)
It is wrong now. That was part of the early interface CSS that was copied out of Vector and Monobook CSS into a separate "skins/common/commonInterface.css" file, which was later converted to the present ResourceLoader module. I don't see where (if anywhere) in the early interface the <q> tag was used. It needs to be removed from the interface module.
Thanks Gadget850. —Telpardec  TALK  12:45, 15 February 2015 (UTC)
That's right: <q> was whitelisted only a year or so ago. I filed a task to remove the style: T89595 --  Gadget850 talk 12:54, 15 February 2015 (UTC)
Okay, thanks. —Telpardec  TALK  13:38, 15 February 2015 (UTC)
@Telpardec: The CSS rule will be removed from elements.css with mw:MediaWiki_1.25/wmf19. You can then clear that out of your CSS. --  Gadget850 talk 18:27, 27 February 2015 (UTC)

Protected edit request on 14 February 2015[edit]

Per this discussion, directly after line 1110:

  • function reducetoinitials(first)

insert:

  • if string.len(first) == 2 and string.match(first,'%u%u') then return(first) end -- if first already initialized, return unchanged

The purpose of this function is to convert the name in |firstn= to initials so that it conforms to the Vancouver system formatted author list. If the first and middle names are already initials, the function reducetoinitials(first) will strip the middle initial returning only the first initial. The above proposed addition will check for this special case (a string two characters long and containing only upper case letters) and if it finds it, return the parameter value unchanged. Boghog (talk) 15:29, 14 February 2015 (UTC)

name-list-format=scap now producing error[edit]

The authorformat=scap/name-list-format=scap, producing smallcaps, is now producing an " Invalid |name-list-format=scap" error across a large number of articles. Anyone have any idea why? Simon Burchell (talk) 15:26, 15 February 2015 (UTC)

|authorformat= has been deprecated and the scap value has been removed altogether. See Help talk:Citation Style 1#Update to the live CS1 module weekend of 14–15 February 2015. Discussion at Help talk:Citation Style 1/Archive 7#Separator parameters which references MOS:ALLCAPS. --  Gadget850 talk 15:35, 15 February 2015 (UTC)
Sigh. That's it, I'm done with CS1 citing. It was good while it lasted. Simon Burchell (talk) 15:37, 15 February 2015 (UTC)
@Simon Burchell: MOS:SMALLCAPS has long deprecated the use of small caps. Although I'm unhappy about some of the changes made to the citation templates, this one seems well justified. Peter coxhead (talk) 21:08, 15 February 2015 (UTC)
MOS smallcaps guidance seems more geared towards the body text of an article, and smallcaps in references helps author names stand out from the mass of text when looking up a reference. I find it ironic that supposedly there is no "house style" of referencing, yet widespread styles such as smallcaps are stamped out via citation templates. At any rate, I'm done with it. The citation template parameters are constantly changing, and I've reached my patience threshold with running to catch up. All the best, Simon Burchell (talk) 21:13, 15 February 2015 (UTC)
See also: All caps#Readability. --  Gadget850 talk 21:22, 15 February 2015 (UTC)
That's all very well for reading sentences or paragraphs of text, but when one is merely scanning for an author name I find that having smallcaps help pick out the author names for rapid identification of a cited source (which I admit becomes irrelevant if {{sfn}} is used). Simon Burchell (talk) 21:27, 15 February 2015 (UTC)
We're not going to come to a consensus, so have a nice day. --  Gadget850 talk 21:35, 15 February 2015 (UTC)
  • I think it is absolutely ridiculous to prohibit the use of small caps in references. What exactly is the rationale? What problems does it cause? And yes I agree with Simon that if supposedly we are free to choose our own citation style then we should also be free to use small caps for author names. The all caps readability argument is irrelevant since this is not about running prose but about making it easier to pick out author names in reference lists - something which is often done with small caps in professional publications. I will also, like Simon, consider to stop using citation templates all together.User:Maunus ·ʍaunus·snunɐw· 18:52, 16 February 2015 (UTC)
The templates implement the MOS. Per MOS:ALLCAPS: "Avoid writing with all capitals, including small caps." Have an issue with that, then get it changed at Wikipedia talk:Manual of Style/Capital letters.
You can certainly stop using templates, but that means you are not going to be adding citations to articles already using templates unless you have consensus to change per WP:CITEVAR. --  Gadget850 talk 19:13, 16 February 2015 (UTC)
That is about the text not about references. I will bloody well decide where and when I will add citations thank you very much.User:Maunus ·ʍaunus·snunɐw· 19:25, 16 February 2015 (UTC)
You are welcome. Unwatching page. --  Gadget850 talk 19:26, 16 February 2015 (UTC)
Well isn't that great. Driving off one of the most knowledgeable and helpful contributors to this page. Way to go, Maunus. --Redrose64 (talk) 01:53, 17 February 2015 (UTC)
Wtf? How on earth is Gadget805s decision to unwatch this page my fault? As for being helpful that doesnt exactly seem like a fitting description of their interactions with Simon Burchell above or with myself.User:Maunus ·ʍaunus·snunɐw· 02:01, 17 February 2015 (UTC)
Maunus / Simon, I have no strong opinion about the scap option. However, it seems to me that if you object to the result of the previous discussion, the best course of action is to express that objection at a broader forum. I would suggest Village Pump (policy) since this does seem to touch on how broadly the MOSCAPS guideline should be applied. This is a wiki, and the change to CS1 can be reverted if that is the consensus. Dragons flight (talk) 19:45, 16 February 2015 (UTC)
It seems to me that such a broader discussion should have been started before implementing these changes though. Nonetheless I have now initiated a discussion at Wikipedia_talk:Manual_of_Style/Capital_letters#Exceptions_to_Small_Caps and I have made a bold edit to the MOS. User:Maunus ·ʍaunus·snunɐw· 19:53, 16 February 2015 (UTC)

Use of aut template[edit]

The removal of |authorformat=scap may cause those who really like small caps for authors in citations to switch to using {{aut}}, which is worse as it contaminates the metadata. Should the occurrence of this template inside a CS1/CS2 citation template also cause a visible error message? Peter coxhead (talk) 21:30, 15 February 2015 (UTC)

Per previous discussion, I don't think the module can detect included templates. --  Gadget850 talk 21:36, 15 February 2015 (UTC)

Possible to use or simulate {{ill}} within CS1 templates?[edit]

(Pasted from Wikipedia:Teahouse/Questions#inline interlanguage link in citation template?, thanks to Margin1522's welcome suggestion. The actual request is below the line in green; the rest is silence context. Margin1522 also created an English page for the author, so I'm faking the redlinks here with a couple of character substitutions.*)

I'm copyediting an article for the current GOCE Blitz. Part of the work involves converting long citations that are currently in the text of the article to references. The citation templates have an argument for the author's article. But this source is in German, and English WP has no article about the author, although German WP does.

If this were an ordinary inline interlanguage link I'd use {{ill|de|Wılhelm Papɛ}} to get

*Wılhelm Papɛ (de)

But when I put that into {{cite book}} I get this:

[[Wılhelm Papɛ (de)|Papɛ, W.]] Check |authorlink= value (help); Benseler, G. E. (1875). Wörterbuch der griechischen Eigennamen [Dictionary of Greek Proper Names] (in German). F. Vieweg und sohn. Retrieved 20 February 2015. 

Any suggestions? Thnidu (talk) 07:21, 20 February 2015 (UTC)

[proposals and discussions of workarounds omitted here]
So, my helpful fellow editors, you have solved the problem for now, but not for the next time such a situation arises. I think we need an additional couple of parameters that, like "template-doc-demo", can be added to any citation template (at least!) to do the work that {{ill}} does: "There's a page for this on another wiki." E.g.,
|interwiki-for=Wılhelm Papɛ |interwiki-name=de:Wılhelm Papɛ
... and then, Gott mit uns, interwiki-for1, interwiki-name1, interwiki-for2..., for additional authors, editors, and who knows what else. Where should such a suggestion go? (Other than "where the sun don't shine", please!) --Thnidu (talk) 00:19, 21 February 2015 (UTC)

--Thnidu (talk) 07:00, 21 February 2015 (UTC)

I tweaked the authorlink code in Module:Citation/CS1/sandbox to get this using |author-link=de:Wılhelm Pape:

Papɛ, W.; Benseler, G. E. (1875). Wörterbuch der griechischen Eigennamen [Dictionary of Greek Proper Names] (in German). F. Vieweg und sohn. 

No error messages, but readers won't necessarily intuit what (de) actually means because it looks like it might be, perhaps, part of his name. We might leave the colon so that the linked author name looks like this: Papɛ W. (de:) but that isn't much better.

Trappist the monk (talk) 13:04, 21 February 2015 (UTC)

I think the OP might want something like this (rendered manually to show the desired effect):
Papɛ, W. (de); Benseler, G. E. (1875). Wörterbuch der griechischen Eigennamen [Dictionary of Greek Proper Names] (in German). F. Vieweg und sohn.
The tricky part about {{ill}} is this, from the documentation: "When the English article is created, the other language link won't be shown". That might be a challenge to program. – Jonesey95 (talk) 14:40, 21 February 2015 (UTC)
I'll take your word for that. As it is, I intend to give up (for now, at least) on using any tweak of |author-link=. Instead, I'll add a link after the {{cite}} and before </ref>, so the ref will display like this:
Pape, W.; Benseler, G. E. (1875). Wörterbuch der griechischen Eigennamen [Dictionary of Greek Proper Names] (in German). F. Vieweg und sohn. Retrieved 20 February 2015.  (Third Edition) (Author's article in German)
Thanks, all! --Thnidu (talk) 02:31, 22 February 2015 (UTC)
Very well. I have struck the interwiki test from Module:Citation/CS1/sandbox.
Trappist the monk (talk) 12:11, 22 February 2015 (UTC)

kern_quotes results in broken link underline[edit]

As visible in ref 4 of Justin_Hayward-Young, a title beginning with a single quote triggers this kerning function so that the inserted double quote and the title's single quote don't blend together, which is fine, except that it also introduces a weird break in the link underline. The code calls out to cfg.presentation['kern_left'], which as a relative newcomer to this codebase I don't know where to find. Does anyone know why this kerning breaks the link underline, and if it can be fixed? I'd also be happy to take a stab at it myself if someone points me to the code actually doing the kerning. Personman (talk) 13:36, 25 February 2015 (UTC)

cfg.presentation['kern_left'] and cfg.presentation['kern_right'] are both defined in Module:Citation/CS1/Configuration. But, I don't think that the underscore gap is the fault of the module as this (clearly contrived) example shows:
[[Abraham Lincoln|{{" '}}Abe' Lincoln]]"'Abe' Lincoln
Trappist the monk (talk) 13:48, 25 February 2015 (UTC)

I have to set the preference for underlined links to see this. The leading single quote is in a separate span, which causes the issue:

  • {{cite web |url=http://example.org |title='Title' title}}
  • "'Title' title". 
  • <span class="citation web">[http://example.org "<span style="padding-left:0.2em;">'</span>Title' title"].</span><span title="ctx_ver=Z39.88-2004&rfr_id=info%3Asid%2Fen.wikipedia.org%3AModule+talk%3ACitation%2FCS1&rft.btitle=%27Title%27+title&rft.genre=book&rft_id=http%3A%2F%2Fexample.org&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;">&nbsp;</span></span>

--  Gadget850 talk 20:39, 27 February 2015 (UTC)

Several languages[edit]

Some suggestion for such errors: |language= in Holy Archangel Mikhail Church, Riga? --Edgars2007 (talk/contribs) 10:34, 4 March 2015 (UTC)

Can you elaborate? It isn't clear to me what you are suggesting / asking.
Trappist the monk (talk) 11:21, 4 March 2015 (UTC)
I think the problem here is recording multiple languages for one work (four languages for the cited book). Simon Burchell (talk) 11:30, 4 March 2015 (UTC)
Yes, Simon Burchell is right. --Edgars2007 (talk/contribs) 11:43, 4 March 2015 (UTC)
Ok, what should we do about that? Apparently, there are books out there in the wild world that are in multiple languages. I still don't know what it is that you're looking for.
Trappist the monk (talk) 11:59, 4 March 2015 (UTC)
Sorry. I just read what category says :) Anyway, maybe it would be worth adding parameters language2, languag3, etc. for such cases? --Edgars2007 (talk/contribs) 12:20, 4 March 2015 (UTC)

Here is the citation in question:

Banga, Vita; Marina Levina et al (2007). Rīgas dievnami: Arhitektūra un māksla. Riga's Churches. Architecture and Art (in Latvian, German, English, Russian). Riga: Zinātne, Apgads Mantojums. ISBN 978-9984-823-00-3. OCLC 217266501. 

I don't see any errors. Am I correct that this work is in the four different languages? --  Gadget850 talk 14:13, 4 March 2015 (UTC)

I don't see any errors either. Someone looking at this page in the future and who has the hidden messages shown may see a maintenance message. See this discussion. – Jonesey95 (talk) 14:52, 4 March 2015 (UTC)