Jump to content

Help talk:Citation Style 1/Archive 34

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Lowercase sigmabot III (talk | contribs) at 05:50, 4 July 2017 (Archiving 1 discussion(s) from Help talk:Citation Style 1) (bot). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Archive 30Archive 32Archive 33Archive 34Archive 35Archive 36Archive 40

|ol= prefix

In its present incarnation, {{cite Q}} is a meta-template using {{citation}}. It uses parameter values obtained from wikdata. Wikidata holds OpenLibrary identifiers that begin with an 'OL' prefix. cs1|2 emits an error message when the value assigned to |ol= has an 'OL' prefix. Because this situation is reminiscent of this discussion, I have modified the |ol= error checking to quietly accept OL identifiers with the OL prefix. The appearance of the rendering has not changed:

Cite book comparison
Wikitext {{cite book|ol=OL7130221M|title=Treasure Island}}
Live Treasure Island. OL 7130221M.
Sandbox Treasure Island. OL 7130221M.

Trappist the monk (talk) 10:19, 28 May 2017 (UTC)

Thank you for this. It is a good application of Postel's Law. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:24, 28 May 2017 (UTC)
Thanks from me also. What's old is new again (link to previous discussion, September 2014). – Jonesey95 (talk) 14:35, 28 May 2017 (UTC)

single quote for an ASCII quote

As the Module talk:Citation/CS1/COinS seems to be moribund, I decided to post here.

It took me a hour or more to work out that this was the cause of a problem that I have, because I read Help:CS1 and could not see that it was an obvious feature (so I assumed it was some sort of hidden character in the string or a fault in my scripting):

* {{cite encyclopedia
  |title=[[wikisource:fr:Dictionnaire universel d’histoire et de géographie Bouillet Chassang/Spenser (edmond)]]
<!-- |encyclopedia=A well known encyclopedia -->
}}

Works

* {{cite encyclopedia
  |title=[[wikisource:fr:Dictionnaire universel d’histoire et de géographie Bouillet Chassang/Spenser (edmond)]]
|encyclopedia=A well known encyclopedia
}}

Does not work because the has been replaced with '

The reason for this substitution is in Module:Citation/CS1/COinS line 177:

value = value:gsub ('<span class="nowrap" style="padding%-left:0%.1em;">&#39;(s?)</span>', "'%1");	-- replace {{'}} or {{'s}} with simple apostrophe or apostrophe-s

What is the thinking behind this line? -- PBS (talk) 12:57, 25 May 2017 (UTC)

HO-hum it seems that is unlikely to be the line as &#39; is an ordinary ASCII single quote ' so presumably the conversion is elsewhere. -- PBS (talk) 13:13, 25 May 2017 (UTC)

Line 177 in Module:Citation/CS1/COinS is not the problem. That line is looking for all of the styling that is transcluded when the {{'}} and {{'s}} templates are part of a cs1|2 parameter value because we don't want all of that extraneous html and css in the metadata.
The bug you found is in the function kern_quotes() in Module:Citation/CS1. There, the and characters (U+2018 & U+2019) are replaced with simple typewriter quotes, perhaps a bit overzealously. I've tweaked the sandbox to limit that replacement so that only those curly quotes that are the first and last characters to the title are replaced:
{{cite encyclopedia/new |title=[[wikisource:fr:Dictionnaire universel d’histoire et de géographie Bouillet Chassang/Spenser (edmond)]] |encyclopedia=A well known encyclopedia}}
"fr:Dictionnaire universel d'histoire et de géographie Bouillet Chassang/Spenser (edmond)" . A well known encyclopedia.
Your example that 'worked', worked because the title is not rendered in quotes; it was instead rendered in italics. Kerning is only applied to titles that the cs1|2 templates wrap in quote marks.
Trappist the monk (talk) 13:55, 25 May 2017 (UTC)

When I was trying to understand the example, I was distracted by what I perceived as errors in writing the citation. Maybe the following would be less distracting:

* {{cite encyclopedia |title=[[wikisource:fr:Dictionnaire universel d’histoire et de géographie Bouillet Chassang/Spenser (edmond)| SPENSER (Edmond)]] |encyclopedia = Dictionnaire universel d'histoire et de géographie | last1 = Bouillet | first1 = Marie-Nicolas | last2 = Chassang | first2 = Alexis }}

  • Bouillet, Marie-Nicolas; Chassang, Alexis. "SPENSER (Edmond)" . Dictionnaire universel d'histoire et de géographie.

As in PBS's report, Wikisource can't find the article. Note that I intentionally changed the curly single quote (used as an apostrophe) to a straight quote in the encyclopedia parameter. Jc3s5h (talk) 14:35, 25 May 2017 (UTC)

The problem is that it can not easily be solved with redirects on Wikisource because as with this book, the will be hundreds subpages under the main page for many Wikisource sources. See for example:
This also affects links into sections within a page where, unlike Wikipedia, Wikisouce often uses ‘’ “” so potentially we have a problem that to access a section on Wikisource an ASCII single quote 's would be needed in the section header even though the rest of the text uses ’s. -- PBS (talk) 16:40, 25 May 2017 (UTC)
" I've tweaked .. those curly quotes that are the first and last characters to the title are replaced". Given that the links can be to sections this might not be sufficient as like this one s:1911 Encyclopædia Britannica/Great Rebellion#The "Crowning_Mercy" it is possible that a funny quotation mark may be at the end of a title string (or at least before a | or a ]]) — this particular example has been hacked to use strait double quotes in the anchor, but the text has a pair of “”.
This explains why a link using {{cite EB1911}} fails on trying to link to that section, but does link to the one immediately before it.
-- PBS (talk) 17:04, 25 May 2017 (UTC)

First things first: the reason that your {{cite EB1911}} example does not work has nothing to do with any kind of quotes. The link doesn't work because a space (or underscore) is missing from between 'Crowning' and 'Mercy'. If I rewrite that example as:

{{cite EB1911|short=x|wstitle=Great Rebellion#The "Crowning Mercy"}}
"Great Rebellion#The "Crowning Mercy". Encyclopædia Britannica (11th ed.). 1911.

the link works and takes me to the proper place in the wikisource text.

Now quotes and kerning. cs1|2 renders certain titles inside double quote marks. Sometimes titles, especially news article titles, contain single or double quote marks: Alien abduction survivor: 'They've got Elvis!' Without kerning, the terminal quote mark in my example would be placed directly adjacent to the trailing double quote mark applied by the cs1|2 template; kerning inserts a small amount of space so that the two quote marks can be distinguished. When I originally wrote the kerning code, I deferred support for wikilinked title text that cs1|2 would render in quotes because, in general, there is relatively little need for linking to en.wiki articles about a chapter or news article (if there are any such articles). Of course that ignores interwiki links to WikiSource among others.

The problem with wikilinked quoted title text is that kern_quotes() is looking for a single or double quote mark as the first and/or last character in the title text. With wikilinks, the wiki markup gets in the way and there are two forms of wikilink. For the time being, and until I noodle out an appropriate solution, for wikilinks like the first example below, kern_quotes() shall do nothing because there is no 'label' for that link. In the second example, because there is a label, kern_quotes() does insert the space to separate quote marks:

Cite encyclopedia comparison
Wikitext {{cite encyclopedia|encyclopedia=Encyclopædia Britannica|title=[[Wikisource:1911 Encyclopædia Britannica/Great Rebellion#The "Crowning Mercy"]]}}
Live "1911 Encyclopædia Britannica/Great Rebellion#The "Crowning Mercy". Encyclopædia Britannica.
Sandbox "1911 Encyclopædia Britannica/Great Rebellion#The "Crowning Mercy". Encyclopædia Britannica.
Cite encyclopedia comparison
Wikitext {{cite encyclopedia|chapter=[[Wikisource:1911 Encyclopædia Britannica/Great Rebellion#The "Crowning Mercy"|The “Crowning Mercy”]]|encyclopedia=Encyclopædia Britannica|title=Great Rebelion}}
Live "The "Crowning Mercy". Great Rebelion. Encyclopædia Britannica.
Sandbox "The "Crowning Mercy". Great Rebelion. Encyclopædia Britannica.

I have restored the curly quote replacement code because kerning shall not be applied to the link portion of a wikilink. The example above, uses curley quotes in the label part of the wikilink. The example below shows that even with the curley quote replacement code restored, the link to wikisource works:

Cite encyclopedia comparison
Wikitext {{cite encyclopedia|encyclopedia=A well known encyclopedia|title=[[wikisource:fr:Dictionnaire universel d’histoire et de géographie Bouillet Chassang/Spenser (edmond)]]}}
Live "fr:Dictionnaire universel d'histoire et de géographie Bouillet Chassang/Spenser (edmond)" . A well known encyclopedia.
Sandbox "fr:Dictionnaire universel d'histoire et de géographie Bouillet Chassang/Spenser (edmond)" . A well known encyclopedia.

Trappist the monk (talk) 17:15, 26 May 2017 (UTC)

The sandbox version of the first "Crowning Mercy" example now has properly kerning.
Trappist the monk (talk) 19:39, 26 May 2017 (UTC)

Sorry for the mistake, and thanks for pointing it out. "kerning" is nice to have, however not having it is not a show stopper. How soon can the fix to access to "wikisource:fr:Dictionnaire universel d’histoire et de géographie Bouillet Chassang/Index alphabétique - A" be available in production? -- PBS (talk) 12:25, 28 May 2017 (UTC)

I have made an interim change to the live module that permits:
{{cite encyclopedia |title=[[wikisource:fr:Dictionnaire universel d’histoire et de géographie Bouillet Chassang/Spenser (edmond)]] |encyclopedia=A well known encyclopedia}}
"fr:Dictionnaire universel d'histoire et de géographie Bouillet Chassang/Spenser (edmond)" . A well known encyclopedia.
Kerning in this live version is still broken.
Trappist the monk (talk) 13:38, 28 May 2017 (UTC)
Thanks for the improvement. -- PBS (talk) 09:18, 29 May 2017 (UTC)

Categorization for multiple languages in para language

Why there is only one category (for first language) added when there are two or more languages entered in para |language=? --Obsuser (talk) 03:03, 3 June 2017 (UTC)

Please link to an example article when raising questions like this. Thanks. – Jonesey95 (talk) 05:10, 3 June 2017 (UTC)
Good catch. Because of an oversight on the part of the programmer. The function add_prop_cat() has a primary purpose of preventing the addition of multiple duplicate categories of the same kind at the end of the rendered citation. When there are multiple languages in |language=, add_prop_cat() receives one of two key values: foreign_lang_source or foreign_lang_source_2. If add_prop_cat() has never seen these keys previously while processing |language=, then the property category is added to the list. Once seen, no more of that kind of property cat will be added.
I have modified language_parameter() append the ISO 639 language code to the property's key to make each key language specific and add_prop_cat() to remove the code for rendering. If you copy this:
{{code|{{cite book/new |script-title=he:Title |language=sr, he, Old English, es, fr, Delaware}}}}
and paste it into article space and click Show preview (don't save) you should see this:
<cite class="citation book"> <bdi lang="he" >Title</bdi> (in Serbian, Hebrew, Old English, Spanish, French, and Delaware).</cite><span title="ctx_ver=Z39.88-2004&rfr_id=info%3Asid%2Fen.wikipedia.org%3AFrank+Speck&rft.btitle=Title&rft.genre=book&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988"><span style="display:none;"> </span></span>[[Category:CS1 uses Hebrew-language script (he)]][[Category:CS1 Serbian-language sources (sr)]][[Category:CS1 Hebrew-language sources (he)]][[Category:CS1 foreign language sources (ISO 639-2)|ang]][[Category:CS1 Spanish-language sources (es)]][[Category:CS1 French-language sources (fr)]][[Category:CS1 foreign language sources (ISO 639-2)|del]]
I think that there is a slightly better way to do this and will pursue that idea a bit later.
Trappist the monk (talk) 12:07, 3 June 2017 (UTC)

CS1 maint: English language specified

Just wonder what happened to Category:CS1 maint: English language specified? Why was it removed? – Danmichaelo (talk) 04:30, 6 June 2017 (UTC)

Fishing lesson: Scroll to the top of this page, find the "Search archives" box, type "English language specified", and you will get this result. The discussion is in Archive 8. – Jonesey95 (talk) 04:57, 6 June 2017 (UTC)

hdl - OAbot - ELNEVER?

I am finding myself in a little edit war with User:Waldir , who added a "hdl" parameter to a ref in this dif with edit note: Added free to read links in citations with OAbot #oabot). The specific handle added here was hdl:10722/198790, which I hesitate to post, but I guess we need it for the discussion. There is a full-text link to the article on that webpage. I do not see any indication that this is a non-copyright-infringing copy.

My removal was reverted in this dif, with edit note Undid edit 784333522] -- restore link to full text, as existing DOI/PMID link to paywalled sources. and I again reverted.

So -

  • are people using hdl to violate WP:ELNEVER?
  • Is there a bot that is being used to violate WP:ELNEVER?

I've posted a link to this at the article talk page and may post other places to broaden this, depending on how this goes...who knows I may have something to learn here. Jytdog (talk) 03:15, 8 June 2017 (UTC)

I think it's an author copy, not a copyvio. An earlier version of OAbot had a problem with ELNEVER — it was posting citeseerx links, and those are often violations. But this one (as with all hdl OA links I have looked at) appears to be legitimate. More specifically, I think it's something one of the authors posted at their home institution, so I don't think it is problematic. I can't tell precisely which author did it, but three of them are listed as having the same institution as the preprint server (HKU). —David Eppstein (talk) 03:22, 8 June 2017 (UTC)
OK thanks for that background and analysis of this link. I will self-revert. Jytdog (talk) 03:55, 8 June 2017 (UTC)
For clarification, OAbot still uses |citeseerx= but is not run as a bot anymore (the BRFA was withdrawn). It has become a semi-automated tool where users are asked to check the links they add (https://tools.wmflabs.org/oabot/). Checking if a copy is legal can be genuinely hard even for librarians (it is not just whether it is an author manuscript or not! Very often, you need to take into account policies from publishers, from universities and funders, to assess the status of these copies). These considerations have little to do with the nature of the identifier used to insert the link (for instance, it is possible that a |doi= links to a copyvio, because some preprint servers can issue DOIs). − Pintoch (talk) 07:57, 8 June 2017 (UTC)

Identifier order messed up.

Why is bibcode displaying before arxiv in?

Identifiers should be listed in alphabetical order. Headbomb {t · c · p · b} 13:49, 10 June 2017 (UTC)

The identifier labels are sorted with a case sensitive sort. 'B' has an ascii numerical value of 66 (0x42) and 'a' has an ascii numerical value of 97 (0x61). Proof for that is here, where I've added |eissn=1365-2966 and |issn=0035-8711 from the journal's wikipedia article:
"The extended rotation curve and the dark matter halo of M33". Monthly Notices of the Royal Astronomical Society. 311 (2): 441–447. 2000. arXiv:astro-ph/9909252. Bibcode:2000MNRAS.311..441C. doi:10.1046/j.1365-8711.2000.03075.x. eISSN 1365-2966. ISSN 0035-8711. {{cite journal}}: Unknown parameter |authors= ignored (help)
Trappist the monk (talk) 14:42, 10 June 2017 (UTC)
Well, that ought to be fixed then, either with case-insensitive sorting, or by putting the sortkey in a {{lc:IDENTIFIERNAME}} type of thing. Because it wasn't like that before. Headbomb {t · c · p · b} 15:18, 10 June 2017 (UTC)
There have been no changes to the identifier sorting since at least this version (April 2013) of Module:Citation/CS1.
Trappist the monk (talk) 15:59, 10 June 2017 (UTC)
I distinctly remember those to be sorted correctly as late as this spring. But even if my memory somehow fails me, those should be sorted alphabetically, regardless of casing. Headbomb {t · c · p · b} 17:02, 10 June 2017 (UTC)

Any update on doi-broken-date?

If anything, the doi should at the very least still link. Other improvements can wait/get more discussion, but the linking part should be easy to fix. Headbomb {t · c · p · b} 14:25, 11 April 2017 (UTC)

@Trappist the monk: Any way we can get this bundled in the weekend's update? Headbomb {t · c · p · b} 05:29, 26 April 2017 (UTC)
The purpose of this interstitial period is to have a last chance to find and fix bugs; to create or modify supporting documentation, categories, templates, etc. – housekeeping preparatory to the update. It is not the time for new development or new features.
Trappist the monk (talk) 11:28, 26 April 2017 (UTC)
Yeah well this has been requested a long while ago, is an easy fix, and we have over half a week left. WP:BURO applies here. Headbomb {t · c · p · b} 11:57, 26 April 2017 (UTC)

Can we now implement this? Headbomb {t · c · p · b} 00:27, 2 May 2017 (UTC)

De-archived because discussion is ongoing/unresolved. @Trappist the monk:. Headbomb {t · c · p · b} 17:20, 23 May 2017 (UTC)
@Trappist the monk and Jonesey95: pinging. Headbomb {t · c · p · b} 19:13, 12 June 2017 (UTC)
It makes sense to me to have allegedly broken DOIs linked, since the doi-broken-date is checked by a bot and (a) could have been wrongly applied or (b) could have been a temporary problem or (c) both. There are plenty of links that don't work and are not flagged as such. That's just the state of the web, and always has been. – Jonesey95 (talk) 02:00, 13 June 2017 (UTC)