Jump to content

Module talk:Citation/CS1/Feature requests/Completed

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Trappist the monk (talk | contribs) at 11:26, 4 April 2015 (Create;`). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

This is an archive of Module:Citation/CS1/Feature requests for those requests that have been completed.

Asian titles

Main work titles are formatted in italics. This is not appropriate for Asian scripts such as kanji, hangul and the like. Asian titles may also be underlined or placed in brackets 『』 or 《》.

See {{Asiantitle}} for current support. --— Gadget850 (Ed) talk 14:36, 29 March 2013 (UTC)

And such styling should be done with CSS per #Presentation and content. --  Gadget850 (Ed) talk 14:42, 1 April 2013 (UTC)

See also: Module talk:Citation/CS1/Archive 11#non-italic titles

Trappist the monk (talk) 13:13, 12 September 2014 (UTC)

Error message help pages

 Done

Each error message should link to a help page. I will take on the task of creating the help. --  Gadget850 (Ed) talk 12:05, 3 April 2013 (UTC)

Page url

Editors often link to specific pages in an online book by wrapping a |page= or |pages= parameter in an external link. This practice can corrupt COinS data for the citation. This feature request suggests the creation of a new parameter that allows editors to continue linking to individual pages without corrupting COinS data. Linking to individual pages is supported at the WP:PAGELINKS guideline, which see.

|pageurl=: URL of an online book's page or pages where the cited text can be found. While not required, if provided, |url= must link to the same source as |pageurl=.

Examples:
Single-page link –
|page=18
|pageurl=http://books.google.com/books?id=kvpby7HtAe0C&pg=PA18
renders as: p. 18.
Page-range link (to the first page in the range) –
|pages=18–24
|pageurl=http://books.google.com/books?id=kvpby7HtAe0C&pg=PA18
renders as: pp. 18–24.
Multiple page links (only with |pages=; urls listed in |pageurl= must follow the same order as the pages listed in |pages=) –
|pages=18–24, 56
|pageurl=http://books.google.com/books?id=kvpby7HtAe0C&pg=PA18 http://books.google.com/books?id=kvpby7HtAe0C&pg=PA56
renders as: pp. 18–24, 56.
–or–
Multiple page links (forces pp. prefix unless |nopp=y; |pageurln= matches the last of |pagen= or |pagesn= or |atn=) –
|pages=18–24
|pages2=34this parameter ignored because it is followed by |page2=
|page2=56
|pageurl=http://books.google.com/books?id=kvpby7HtAe0C&pg=PA18
|pageurl2=http://books.google.com/books?id=kvpby7HtAe0C&pg=PA56
renders as: pp. 18–24, 56.

While two possible multiple page link handling methods are described, only one should be implemented.

Categories

Trappist the monk (talk) 18:55, 3 April 2013 (UTC)

Me gusta This is needed. I think I like the pageurl1, pageurl2, etc version. Jason Quinn (talk) 00:35, 16 September 2013 (UTC)
I've been recently wondering if |pageurl= is the wrong solution to the problem. The problem is that urls in |page=, |pages=, and |at= corrupt COinS metadata. Because specifying external links using wiki-markup is standardized, it seems to me that its possible that with the application of a little bit of code, the page numbers can be extracted from the external link wiki-markup for use in COinS without the need for new parameters.
The benefit is that nothing except the template code needs to be reworked.
Trappist the monk (talk) 12:12, 16 September 2013 (UTC)

website for cite web

 Done

Add 'website' as an alias for 'work'. Many editors seem confused by the use of 'work' to indicate the website. --  Gadget850 (Ed) talk 16:28, 6 April 2013 (UTC)

Done in sandbox. Dragons flight (talk) 19:56, 8 April 2013 (UTC)
{{cite web}} documentation updated.
Trappist the monk (talk) 14:34, 27 April 2013 (UTC)

Move toward uniform parameter name style

Add these parameter names to the whitelist. These replace their counterparts which are hyphenated, spaced, underscored, or camelcased. Template documentation should be updated to use these parameter names. The purpose is to move toward uniform parameter-name style. Other variants of these names should then, over time, be deprecated (I can always hope).

['authorfirst#'] = true,
['authorlast#'] = true,
['authornamesep'] = true,
['authorseparator'] = true,
['doibrokendate'] = true,
['doiinactivedate'] = true,
['editorfirst#'] = true,
['editorgiven#'] = true,
['editorlast#'] = true,
['editornamesep'] = true,
['editorseparator'] = true,
['namesep'] = true,
['seriessep'] = true,
['templatedocdemo'] = true,
['transchapter'] = true,
['transtitle'] = true,

Trappist the monk (talk) 18:27, 6 April 2013 (UTC)

I agree we are very inconsistent about word separators, either nothing, hyphen, underscore, or space, and moving toward consistency is an excellent goal. That said, I'm not sure that removing the separator actually makes the most sense. For example, would it be easier for users if we consistently supported the use of a hyphen as the preferred word separator in parameter names? I have to think that having some separator is easier to read than having no separator. Dragons flight (talk) 19:19, 8 April 2013 (UTC)
Infoboxes (and navboxes, IIRC) seem to be standardising, de facto, on an underscore. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 16:15, 17 May 2013 (UTC)

 Done. This was resolved in favor of hyphenated multi-word parameters in a July 2014 RFC. – Jonesey95 (talk) 06:38, 12 December 2014 (UTC)

Check for uri scheme in url parameters

 Done

One of the more common url errors is the omission of the uri scheme in |url=-type parameters.

{{cite web |url=www.example.com |title=Missing scheme |accessdate=2013-04-10}}[www.example.com "Missing scheme"]. Retrieved 2013-04-10. {{cite web}}: Check |url= value (help)

CS1 can check for this and report an error |url= requires http:// and categorize into Category:CS1 url missing uri scheme errors or some such.

Trappist the monk (talk) 11:29, 10 April 2013 (UTC)

See Help:External link icons for the list of supported URIs. --  Gadget850 (Ed) talk 11:32, 10 April 2013 (UTC)
"requires http://" would not be appropriate phrasing; as another scheme may apply. Were that not the case, we could programmatically apply http://. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:38, 10 April 2013 (UTC)
Ok, how about this: |url= missing URI scheme?
Trappist the monk (talk) 11:53, 10 April 2013 (UTC)
OK, but it is URI scheme. Note to implementer: news: and mailto: do not require the //. --  Gadget850 (Ed) talk 12:02, 10 April 2013 (UTC)
Ok, changed.
Trappist the monk (talk) 13:10, 10 April 2013 (UTC)
Given the reality of URI schemes, I think the best we are likely to do is check that a URL either starts with "//" (protocol relative URLs) or has a ":" occurring in it somewhere. That covers most uses though it wouldn't catch the case of a bad "scheme", like htp://www.foobar.com/. Dragons flight (talk) 20:20, 10 April 2013 (UTC)
Check added in sandbox. Dragons flight (talk) 23:32, 10 April 2013 (UTC)

Date: error checking

Currently, and invalid date shows as entered:

Markup Renders as
{{cite book |last=Drucker |title=Book |date=Flubtember 2013 |ref=harv}}

Drucker (Flubtember 2013). Book. {{cite book}}: Check date values in: |date= (help); Invalid |ref=harv (help)

But the year is not extracted and inserted into the anchor as expected. There is no error message on this, so the editor is not aware of the issue.

I don't know how much checking can be done on 'date', but at a minimum if |ref=harv and the extracted year is blank, then an error message should be generated. --  Gadget850 talk 15:46, 6 May 2013 (UTC)

Is it also an error if |ref=harv and no date / year is given at all? Dragons flight (talk) 22:02, 20 May 2013 (UTC)
Yes. --  Gadget850 talk 22:08, 20 May 2013 (UTC)
What about websites and other resources where the date of publication may be not obvious or missing? Even if there is no date, I believe that {{sfn}}, etc. will still work as long as the year is also omitted from the footnote template. At the moment, I'd lean towards reporting an error when date is present and it can't figure out the year, but not report an error if date is blank. Dragons flight (talk) 18:33, 22 May 2013 (UTC)
One problem is if the author has more than one publication, then the id is going to be duplicated. --  Gadget850 talk 18:43, 22 May 2013 (UTC)
You mean if there are multiple works by the same author(s) and several different works lack dates? That seems like a rare edge case. Dragons flight (talk) 19:47, 22 May 2013 (UTC)
It is quite common for dates to be in the format that is not recognised by the date parameter. eg date=January-March 2013, the work around for that is to include a year=value as well as a date parameter. The date displays and the year does not, but the year parameter is used in the CITEREF generated by ref=harv. For author publications in the same year the usual solution is to use year=2013 in the first one year=2013b in the second etc. Another method (which works for no date) is to set ref={{SfnRef}} to whatever is wanted as a CITEREF. Also ff no year or date is set, but either author or last is set then an error should not be generated as harv will work on just author. -- PBS (talk) 10:29, 15 June 2013 (UTC)

Check for missing authors

I posted this on Help talk:Citation Style 1 in a section on a similar error (coauthors without authors). This is a separate error from "coauthors without authors". I believe that it should be detectable.

The general case is that in a list of authors or editors, if one is missing, the remaining authors are not displayed, even though the intent of the editor creating the citation is usually for all of the authors or editors to appear.

Example 1: If there are multiple authors but no "author1" or "last1", no authors are displayed. Like this:

Example 2: The same thing happens with editors as well:

Example 3: If you include author1 and leave out author2, the remaining authors are omitted:

I expect that there are additional variations on this parsing as well.

As for what to do about it, it is clear that the editor adding the citation intended for authors to appear, but they are not appearing. I suggest the following:

  • Easy: Display an error message (or leave it hidden by default, I don't care, but definitely place the articles into a maintenance category that some of us can monitor) saying something like "Missing author parameter".
  • Easy: Change the documentation to reflect the fact that author2 etc. or first2/last2 etc. require author1 or last1, and that each subsequent author requires the previous one.
  • More Difficult: In addition to the changes above, change the citation module so that the other authors are displayed. This would be the flexible thing to do, though it may be challenging to code and would lead to citations with screwy syntax. It may also lead to strange corner cases with respect to "displayauthors" and other parameters. – Jonesey95 (talk) 23:49, 23 October 2013 (UTC)

 Done. This request has been implemented in the CS1 module, as you can see from the error messages above. The documentation has been mostly updated. – Jonesey95 (talk) 06:34, 12 December 2014 (UTC)

Check for author first names without last names

When a "firstn" parameter is present in a citation without a corresponding "lastn" citation, no author/editor name is displayed for that author/editor. Either the citation's creator wants something to appear there, or there is some other kind of error that should be resolved. An error message will help editors resolve this problem.

Example 1: "first1" but no "last1". No author is displayed.

  • {{cite journal|last1= |first1 = John |title=Sample title |journal=Journal of samples|date=March 2009|pages=6–8|volume=8|issue=2}}
  • "Sample title". Journal of samples. 8 (2): 6–8. March 2009. {{cite journal}}: |first1= missing |last1= (help)

Example 2: "last1" but no "first1". Author's last name is displayed. This is fine; no error should be displayed.

  • {{cite journal|last1= Doe |first1 = |title=Sample title |journal=Journal of samples|date=March 2009|pages=6–8|volume=8|issue=2}}
  • Doe (March 2009). "Sample title". Journal of samples. 8 (2): 6–8.

Example 3: Same as Example 1, but with "editor-last1" missing while "editor1-first" exists.

  • {{cite journal|author1=John Doe| editor-last1= |editor-first1 = Mary |title=Sample title |journal=Journal of samples|date=March 2009|pages=6–8|volume=8|issue=2}}
  • John Doe (March 2009). "Sample title". Journal of samples. 8 (2): 6–8. {{cite journal}}: |editor-first1= missing |editor-last1= (help)

Recommended behavior:

  • Display an error message (or leave it hidden by default, I don't care, but definitely place the articles into a maintenance category that some of us can monitor) saying something like "Missing author last name parameter".
  • Change the documentation to reflect the fact that firstn requires a corresponding lastn, and that the name of an author/editor with only one name (e.g. Sting or Bono) should be placed in "authorn" or "lastn" (or editorn/editor-lastn). – Jonesey95 (talk) 00:03, 24 October 2013 (UTC)
In my travels through Category:CS1 errors: coauthors without author, I am finding a number of articles with |first= followed by |coauthors=. It appears that editors thought that |first= was for the "first author", but it ends up displaying nothing. It would be useful to show an error message for these cases.
Examples from actual articles:
1. "| first = Christopher D. K. Herd | coauthors = Alexandra Blinova, Danielle N. Simkus, Yongsong Huang, et al. " from Tagish Lake (meteorite). – Jonesey95 (talk) 07:02, 23 January 2014 (UTC)
2. "|first=Thiruvalluvar |coauthors=Rev.G.U.Pope (translation) " from Tamil literature.
These are easy to fix, but without the "coauthors without author" error message, which appears only because |coauthors= is used, citations like these will languish invisibly. – Jonesey95 (talk) 07:02, 23 January 2014 (UTC)
I believe that there are hundreds, if not thousands, of these errors out in the wild. Here's one I just fixed. – Jonesey95 (talk) 14:59, 27 March 2014 (UTC)

Ontology and or schema for Citation template parameters to and from COinS, BIBO?

I'm interested in extending Diberri's citation filler to use Metadata or COinS information in it's cite web generation, to provide appropriate cite web, news, journal, book, ... output. Wikipedia:Scripts/Perl scripts/hdump-head.pl is a sketch that does ok on some journal articles. Is there an ontology or mapping of citation parameters to COinS data that generates the code or is it interleaved in the Lua? EutilsRDF Web Service: an RDF interface to NCBI Entrez Utilities could be interesting for NLM resources, building on the Bibliographic Ontology (BIBO). BIBO mentions projects using it at Worldcat and the UK National Library. Obvious mappings are

bibo:asin	Citation/core:ASIN ?
bibo:doi == prism:doi	Citation/core:DOI
bibo:edition == prism:edition Citation/core:Edition
bibo:isbn == prism:isbn	Citation/core:ISBN
bibo:issn == prism:issn	Citation/core:ISSN
bibo:issue	Citation/core:Issue
bibo:lccn	Citation/core:LCCN
bibo:oclcnum	Citation/core:OCLC
bibo:pmid	Citation/core:PMID
bibo:uri	Citation/core:URL
bibo:volume == prism:volume	Citation/core:Volume

(not quite to leaf nodes since (bibo:eissn == prism:eissn) is a bibo:issn, similarly with isbn10, isbn13 (Note that my understanding of this is at the little knowledge is a dangerous thing stage.) More table driven citation generation tools could be useful. RDBrown (talk) 14:28, 11 November 2013 (UTC)

See Template:Cite_book#Syntax for a list of parameters that are included in the COinS metadata. Or, search Module:Citation/CS1 for the term "OCinSoutput" (without quotes).
Trappist the monk (talk) 18:27, 12 November 2013 (UTC)
See Module talk:Citation/CS1/COinS. --  Gadget850 talk 21:45, 14 March 2014 (UTC)

Editions in cite map template

This entry is to track a request made on the Help Talk page: Help_talk:Citation_Style_1#Editions_in_cite_map. – Jonesey95 (talk) 14:16, 19 November 2013 (UTC)

Support for day and year ranges

Support for day and year ranges? Examples of valid day and year ranges were provided in this discussion and this discussion.

Trappist the monk (talk) 17:30, 8 December 2013 (UTC)

 Done in the sandbox. – Jonesey95 (talk) 21:01, 14 March 2014 (UTC)

Add the new "Draft" and "Draft Talk" namespaces to the module

Minor feature request for the sandbox after this week's updates (I would put it in directly, but I don't want to interfere with this week's migration of code to the live module):

There will soon (December 17, 2013, at this writing) be a "Draft" namespace, with an accompanying "Draft Talk" namespace, in Wikipedia. We need to include it in the list of namespaces that are not included in the CS1 error categories. Errors should be shown in those namespaces but not categorized.

We'll need to update the module itself, along with the module's documentation. I think it makes sense to wait until after this week's module updates before making any changes. – Jonesey95 (talk) 00:28, 13 December 2013 (UTC)

Green tickY Done in the sandbox and in a comment on the Help:CS1 errors page. – Jonesey95 (talk) 00:45, 18 December 2013 (UTC)
Done through {{broken ref}}. --  Gadget850 talk 21:43, 14 March 2014 (UTC)

Detect and report duplicated parameters

Duplicated parameters in CS1 citations could be reported so that editors could avoid creating them in error and gnomes could fix them where they occur. I'm not talking about the existing redundant parameters errors. This would simply be reporting where there are multiple instances of e.g. |first= or |url= in the same citation. Duplicated parameters exist for numerous reasons, but only the last instance of the parameter is displayed, which is usually not the intent of the editor who creates or edits the citation. – Jonesey95 (talk) 21:00, 14 March 2014 (UTC)

If I understand correctly, parameters are parsed by the MediaWiki software before they are passed to the CS1 module. By the time it gets to the module, previous parameters are already ignored. There is no way for a template or mudule to do this detection. --  Gadget850 talk 21:42, 14 March 2014 (UTC)
Oof, that's disappointing. I don't feel like starting a giant discussion about this, but would there be a valid reason for having two identical parameters in the same template? It seems to my naive self that this would always be an error that should be flagged by the MW software so that editors could fix this inadvertent mistake. Maybe there are some situations in which this arrangement is not an error, and I am just not clever enough to think of any. – Jonesey95 (talk) 23:11, 14 March 2014 (UTC)