Help talk:Citation Style 1/Archive 99

{{Automatic archive navigator}}

Is there a reason Template:CS1 language sources uses Module:Cs1 documentation support/sandbox?

Looking into supporting {{tl|CS1 language sources}} categories for Wikipedia:Bots/Requests for approval/AnomieBOT 84, I found that {{tl|CS1 language sources/core}} invokes a function from Module:Cs1 documentation support/sandbox rather than Module:Cs1 documentation support. Is there a reason the sandbox hasn't been synced to the main module and the template updated to use it instead of the sandbox? If not, I'll probably go ahead and do that. Anomie 02:29, 3 May 2025 (UTC)

:That comes from this edit 17 November 2024. Editor Gonnym?

:—Trappist the monk (talk) 02:45, 3 May 2025 (UTC)

::No idea why I left it like this. If there are no issues you see with it, I can sync with the live verison. Gonnym (talk) 18:20, 4 May 2025 (UTC)

Citation templates script-title

For the various {{tl|citation}}/cite templates, could we make it so that script-title is an adequate replacement for "title"? When referencing a non-English source, to my understanding it's more appropriate to use script-title and not title, but when doing so I get a warning message in VisualEditor that tells me that title is required. seefooddiet (talk) 14:42, 4 May 2025 (UTC)

:This is not a failing of cs1|2. But, it is yet another failing of visual editor and templatedata. All cs1|2 templates accept {{para|script-title}} regardless of the presence or absence of {{para|title}}. If you believe differently, please give a real example of such failing.

:—Trappist the monk (talk) 18:30, 4 May 2025 (UTC)

::I had suspected it was a problem of visual editor and template data. Is it possible to fix/work around? To my knowledge it isn't. seefooddiet (talk) 19:45, 4 May 2025 (UTC)

:In these cases, besides putting the original title in {{para|script-title}}, it is often useful to put a romanization of the title in {{para|title}}. Kanguole 19:51, 4 May 2025 (UTC)

::Imo romanizations of titles are often excessively long and useful to few (difficult to read). Instead, I use {{para|trans-title}}. But if you use that param instead of title it still triggers the warning in VisualEditor. seefooddiet (talk) 19:57, 4 May 2025 (UTC)

:::I typically use all three, but it is true that Chinese and Japanese romanizations are more useful than Korean ones. But the reference list is out of the flow of the article text, so space is not at a premium. Kanguole 20:06, 4 May 2025 (UTC)

::::I'll still respectfully withhold from using it though; it's an extremely rare practice for Korea-related articles on enwiki. I've basically never seen it done. seefooddiet (talk) 20:10, 4 May 2025 (UTC)

Trans-series?

It has already been suggested in an [https://en.wikipedia.org/wiki/Help_talk:Citation_Style_1/Archive_30#Edit_request:_|script-series_and_|trans-series edit request], but would it be useful to add a translated version of the paramater series; trans-series? Similar to title and chapter. I have a series of books ("Parlementaire geschiedenis van Nederland na 1945"), and it would be helpful for English readers to know what this series is about. Dajasj (talk) 08:50, 6 May 2025 (UTC)

Parameters for English translations of foreign sources?

When citing an English translation, how do you indicate the original language, title and chapter title? The documentation for {{tl|citation}} seems to suggest that the obvious parameters are only for use when citing in the original language. -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 12:31, 7 May 2025 (UTC)

:I would refer to a separate {{tl|citation}} for the original work after the translation. Kanguole 21:00, 7 May 2025 (UTC)

::What if all I have is the translation? -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 14:22, 8 May 2025 (UTC)

:

:For {{tlx|Cite book}}, if you want to indicate the original title there is {{para|trans-title}} and {{para|trans-chapter}}, or the original publication date {{para|orig-date}} or year {{para|orig-year}}. The translator is {{para|translator-last}} and {{para|translator-first}}. Usually these (trans-* and orig-*) are sufficient. There is no {{para|orig-lang}} option, don't know why. -- GreenC 00:21, 8 May 2025 (UTC)

::That's what I would assume given only the names of the parameters, but the documentation says things like {{tqq|trans-title: If the cited source is in a foreign language,}}. In the case I'm concerned with, the cited source is the translation. Thus, for this{{cite book

| edition = 2nd

| script-title = he:פִּרְקֵי אָבוֹת

| title = Sayings of the Jewish Fathers - comprising - Pirqe Aboth - in Hebrew and English - with Notes and Excursuses

| translator = Charles Taylor

| translator-link = Charles Taylor (Hebraist)

| url = https://www.sacred-texts.com/jud/sjf/

| year = 1897

| access-date = May 8, 2025

| publisher = Cambridge University Press

}}

citation, {{para|title|פִּרְקֵי אָבוֹת}} and {{para|trans-title|Sayings of the Jewish Fathers (Pirqe Aboth)}} would imply that I was citing the original rather than the translation, as would {{para|script-title|פִּרְקֵי אָבוֹת}} and {{para|trans-title|Sayings of the Jewish Fathers (Pirqe Aboth)}}. There's also the problem that the English title is not actually a translation of the original Hebrew. -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 14:22, 8 May 2025 (UTC)

:::The documentation for {{para|trans-title}} says (in part):

::::trans-title: English translation of the title if the source cited is in a foreign language.

:::If you are citing the source at sacred-texts.com, do not include {{para|script-title|he:פִּרְקֵי אָבוֹת}} because that text does not appear to be present in that source. Do not shoehorn multiple sources into a single cs1|2 template; the templates are designed (if we can use that term) to support only one source at a time.

:::—Trappist the monk (talk) 15:12, 8 May 2025 (UTC)

{{reflist-talk}}

Template:Cite book#csdoc_trans_title

"[[:Module:Citation]]" listed at [[Wikipedia:Redirects for discussion|Redirects for discussion]]

30px

The redirect [//en.wikipedia.org/w/index.php?title=Module:Citation&redirect=no Module:Citation] has been listed at redirects for discussion to determine whether its use and function meets the redirect guidelines. Readers of this page are welcome to comment on this redirect at Wikipedia:Redirects for discussion/Log/2025 April 14#Module:Citation until a consensus is reached. Rusalkii (talk) 22:17, 7 May 2025 (UTC)

|page= same value as last n-digits of |doi=

I'm seeing more and more of this sort of misuse of {{para|page(s)}}. What to do about templates like this where {{para|page(s)}} matches the trailing digits of {{para|doi}}?

:{{cite journal |last1=Kesari |first1=Vigya |last2=Ramesh |first2=Aadi Moolam |last3=Rangan |first3=Latha |title=Rhizobium pongamiae sp. nov. from root nodules of Pongamia pinnata |journal=BioMed Research International |volume=2013 |pages=165198 |year=2013 |pmid=24078904 |pmc=3783817 |doi=10.1155/2013/165198 |doi-access=free }}

Example template taken from this edit.

If we look at the [https://onlinelibrary.wiley.com/doi/epdf/10.1155/2013/165198 pdf version of the article], we can see that 165198 is the article ID so 165198 properly belongs in {{para|article-number}}.

Maintenance message? {{tlx|citation}} with {{para|journal}} and {{tlx|cite journal}} templates only? Value assigned to {{para|page(s)}} must be greater than some threshold value, perhaps 9999? Other constraints?

Trappist the monk (talk) 16:44, 18 April 2025 (UTC)

:The example came from this edit[https://en.wikipedia.org/w/index.php?title=Rhizobium&diff=prev&oldid=1006413516] a few years prior. I thought this would be citoid being flaky, but it just ignores the article number (at least now it does).
I've come across a limited selection of journals that run there page numbers across issues in the same year, but even then they don't get to over 10k page numbers. A maintenance message would be good as the page number is obviously invalid, although I wouldn't think there's that many. -- LCU ActivelyDisinterested «@» °∆t° 20:22, 18 April 2025 (UTC)

::[https://en.wikipedia.org/w/index.php?search=hastemplate%3A%22Cite+journal%22+insource%3A%2F%5C%7B+*%5BCc%5Dite+journal%5B%5E%5C%7D%5D*%5C%7C+*pages%3F+*%3D+*%5B0-9%5D%7B5%2C%7D%5Cs*%5B%5C%7C%5C%7D%5D%2F&ns0=1 This crude search] (times out) suggests that there are more than 4000 articles that have {{para|page(s)}} with five-digit values. There are journals that do use 5 digit pagination: {{doi|10.1073/pnas.1203495109|doi-access=free}}

::—Trappist the monk (talk) 20:51, 18 April 2025 (UTC)

:::As you know my ability to write regex extends to asking someone else how to do it, but I expected that that would time out. Could the code be set to check configuration and ignore certain journals? It would allow a method to hide false positives en masse, 10.1073 alone has tens of thousands of uses. -- LCU ActivelyDisinterested «@» °∆t° 23:22, 18 April 2025 (UTC)

::::{{tq|Could the code be set to check configuration and ignore certain journals?}} What code are you asking about? The regex? The cs1|2 module? Sommat else?

::::

::::If the regex: not really. We can exclude all articles that have the doi prefix 10.1073 ([https://en.wikipedia.org/w/index.php?ns0=1&search=insource%3A%2210.1073%22 ~26000]). [https://en.wikipedia.org/w/index.php?search=hastemplate%3A%22Cite+journal%22+-insource%3A%2210.1073%22+insource%3A%2F%5C%7B+*%5BCc%5Dite+journal%5B%5E%5C%7D%5D*%5C%7C+*pages%3F+*%3D+*%5B0-9%5D%7B5%2C%7D%5Cs*%5B%5C%7C%5C%7D%5D%2F&ns0=1 This search found] ~3350 articles but it also times out.

::::

::::If the cs1|2 module: yes if necessary.

::::—Trappist the monk (talk) 13:32, 19 April 2025 (UTC)

:::::Sorry that was ambiguous, I did mean the cs1|2 module. That way any other journals that commonly use such large pages numbers could be excluded using the same method. -- LCU ActivelyDisinterested «@» °∆t° 18:10, 19 April 2025 (UTC)

::::::I'm not convinced that we need to filter by doi prefix. Generally, these days, {{tlx|cite journal}} templates use {{para|page(s)}} to list a page-range so a journal citation with five-digit pagination will contain some form of dash. When a {{para|page(s)}} value has dashes, commas, or semicolons, the code will skip the test.

::::::

::::::Journals use a variety of formats for article numbers: some are all digits, some are alphanumeric, some begin with a lowercase 'e', some numeric forms include a dot in the matching doi. It may not be possible to create a test that will find all possible article numbers in {{para|page(s)}} but we can start with these more-or-less common formats and see where that gets us.

::::::—Trappist the monk (talk) 19:02, 19 April 2025 (UTC)

:Physical Review journals have pages in the 6 digit range, e.g. {{doi|10.1103/PhysRevLett.89.170405}}. 22:41, 19 April 2025 (UTC) Headbomb {t · c · p · b} 22:41, 19 April 2025 (UTC)

::But those seem to be article numbers, not page numbers. Looking at the PDF for the article you linked, I see pages numbered from "170405-1" to "170405-4". FWIW, what I assume to be the CCC string is "0031-9007=02=89(17)=170405(4)$20.00".

::Solomon Ucko (talk) 21:22, 27 April 2025 (UTC)

:

:As an experiment, I have written an awb script that trawls articles looking for {{tlx|cite journal}} templates that have {{para|doi}} and {{para|page(s)}}. The list of tested articles is more-or-less the first 25000 articles that transclude {{tld|cite journal}} – the same list you would get from Special:WhatLinksHere/Template:Cite journal. The most recent test found 9575 {{tld|cite journal}} templates that have {{para|doi}} and {{para|page(s)}} that meet certain criteria. The script skips templates that have {{para|page(s)}} values that:

:*are ranges separated by underscore, hyphen, emdash, endash, figure dash, or minus character

:*are comma- or semicolon-separated lists of pages

:*have external urls

:*are digit-only values less than 10000

:

:For those templates that are not skipped, the script compares the trailing (rightmost) characters of the {{para|doi}} value against the whole value of the {{para|page(s)}} value. When there is a match, the script saves the {{para|doi}} and {{para|page(s)}} values to a file with the test result.

:

:When the first test does not indicate a match, the script modifies the {{para|page(s)}} value:

:*when the value is exactly 8 digits, the script inserts a dot between the fourth and fifth digits and retests against the {{para|doi}} value

:*when the first character is a lowercase e, the script removes that character and retests against the {{para|doi}} value

:*when the first two characters are uppercase CD, the script retests against the {{para|doi}} value

:*when the first two characters are uppercase CD, the script retests against the {{para|doi}} value but accepts values where the {{para|page(s)}} value is suffixed by .pub{{var|n}} where {{var|n}} is any single digit

:With those simple tests, the script identified 8611 templates that likely are using {{para|page(s)}} when they ought to be using {{para|article-number}}.

:*3604 numbers only (example)

:*319 dotted 8-digit numbers (example)

:*687 alpha-numeric (includes some CD and e prefixes) (example)

:*1199 CD prefixes with .pub{{var|n}} suffixes (example)

:*2802 e prefixes (example)

:The quantities mentioned reflect the number of templates with these various characteristics, not the number of articles.

:—Trappist the monk (talk) 15:19, 22 April 2025 (UTC)

::8k is small enough that it could be cleared down without any of the things I mentioned. -- LCU ActivelyDisinterested «@» °∆t° 11:17, 25 April 2025 (UTC)

:::The 8k number is the number of {{em|templates}} found in 25k articles. {{tlx|cite journal}} is used in approximately [https://templatecount.toolforge.org/index.php?lang=en&namespace=10&name=Cite_journal 1.1 million articles] so we can expect perhaps something like (1,100,000/25,000) * 8,000 = {{formatnum:{{#expr:(1100000/25000) * 8000}}}} articles in the maintenance category.

:::—Trappist the monk (talk) 13:19, 25 April 2025 (UTC)

:I have hacked Module:Citation/CS1/sandbox to implement prospective detection:

:*{{cite journal/new |title= Title |journal=Journal |doi=10.1016/j.gfs.2020.100393 |page=100393}} – {{para|page(s)}} is five or more digits

:*:{{cite journal/new |title= Title |journal=Journal |doi=10.1016/j.gfs.2020.100393 |page=100393}}

:*{{cite journal/new |title= Title |journal=Journal |doi=10.1002/14651858.CD004052|page=CD004052}} – {{para|page(s)}} is five or more characters

:*:{{cite journal/new |title= Title |journal=Journal |doi=10.1002/14651858.CD004052|page=CD004052}}

:*{{cite journal/new |title= Title |journal=Journal |doi=10.1126/sciadv.adl0822 |page=eadl0822}} – {{para|page(s)}} is five or more characters with e prefix (case insensitive)

:*:{{cite journal/new |title= Title |journal=Journal |doi=10.1126/sciadv.adl0822 |page=eadl0822}}

:*{{cite journal/new |title= Title |journal=Journal |doi=10.1098/rsbl.2017.0301|page=20170301}} – special case: {{para|page(s)}} is exactly eight digits modified by the test to insert a dot between the 4th and 5th digits

:*:{{cite journal/new |title= Title |journal=Journal |doi=10.1098/rsbl.2017.0301|page=20170301}}

:*{{cite journal/new |title= Title |journal=Journal |doi=10.1002/14651858.CD005216.pub2|page=CD005216}} – special case: {{para|page(s)}} has CD prefix (case insensitive) followed by typically six digits modified by the test to append .pub{{var|n}} suffix where {{var|n}} is a single digit

:*:{{cite journal/new |title= Title |journal=Journal |doi=10.1002/14651858.CD005216.pub2|page=CD005216}}

:Needs a better category name; {{color|#085|page}} will most likely be read to mean 'article' which is not the intended meaning. Suggestions?

:—Trappist the monk (talk) 22:27, 27 April 2025 (UTC)

::Changed category name from 'CS1 maint: page has article number' to 'CS1 maint: article number as page number' which is a smidge better, perhaps?

::—Trappist the monk (talk) 22:03, 10 May 2025 (UTC)

ignored parameters not ignored

I recently found this template:

:{{cite SSRN |first1=Amanda |last1=Glazer |first2=Jacob |last2=Spertus |orig-date=8 March 2020 |date=2020-02-10 |df=dmy-all |title=Start spreading the news: New York's post-election audit has major flaws |ssrn=3536011}}

::{{cite SSRN |first1=Amanda |last1=Glazer |first2=Jacob |last2=Spertus |orig-date=8 March 2020 |date=2020-02-10 |df=dmy-all |title=Start spreading the news: New York's post-election audit has major flaws |ssrn=3536011}}

The error message says that {{para|orig-date}} should be ignored yet there it is in the rendering.

Module:Citation gets parameters from the parent frame's args table. Though this table cannot be modified, the code attempted to modify it by setting the value assigned args['orig-date'] = ''. Fixed in the sandbox:

:{{cite SSRN/new |first1=Amanda |last1=Glazer |first2=Jacob |last2=Spertus |orig-date=8 March 2020 |date=2020-02-10 |df=dmy-all |title=Start spreading the news: New York's post-election audit has major flaws |ssrn=3536011}}

::{{cite SSRN/new |first1=Amanda |last1=Glazer |first2=Jacob |last2=Spertus |orig-date=8 March 2020 |date=2020-02-10 |df=dmy-all |title=Start spreading the news: New York's post-election audit has major flaws |ssrn=3536011}}

Trappist the monk (talk) 15:01, 14 May 2025 (UTC)