Help talk:Citation Style 1

(Redirected from Template talk:Citation Style documentation/cs1)
Latest comment: 1 hour ago by Trappist the monk in topic DOI, title, URL and Citation bot

    CS0

    edit

    We have a slew of CS1-adjacent templates for identifiers. For purpose of documentation/style, I propose that we call those CS0 style. Specifically,

    And possibly others from Template:Catalog_lookup_link#See also.

    We could then bring error checking and other features from Module:Citation/CS1, which could share documentation and code, thereby facilitating maintenance etc...

    We'd mirror the category scheme, so we'd have, for example

    CS1 CS0

    Category:CS1 maintenance

    Category:CS1 maint: bibcode
    Category:CS1 maint: DOI inactive
    Category:CS1 maint: ignored DOI errors
    Category:CS1 maint: ignored ISBN errors
    Category:CS1 maint: ignored ISSN errors
    Category:CS1 maint: JFM format
    Category:CS1 maint: MR format
    Category:CS1 maint: PMC embargo expired
    Category:CS1 maint: PMC format
    Category:CS1 maint: unflagged free DOI
    Category:CS1 maint: Zbl

    Category:CS0 maintenance

    Category:CS0 maint: bibcode
    Category:CS0 maint: DOI inactive
    Category:CS0 maint: ignored DOI errors
    Category:CS0 maint: ignored ISBN errors
    Category:CS0 maint: ignored ISSN errors
    Category:CS0 maint: JFM format
    Category:CS0 maint: MR format
    Category:CS0 maint: PMC embargo expired
    Category:CS0 maint: PMC format
    Category:CS0 maint: unflagged free DOI
    Category:CS0 maint: Zbl

    and the same for other categories, like Category:CS1 errors and its subcategories.

    These would effectively have the same documention, and we'd just change "Citation Style 1 and Citation Style 2" to "Citation Style 0, Citation Style 1 and Citation Style 2" "CS1|2" to "CS0|1|2".

    Thoughts? Headbomb {t · c · p · b} 16:43, 29 May 2025 (UTC)Reply

    I object to "CS0" solely on the grounds that normal humans do not start counting at zero and "CS0" does not enlighten a casual reader. Let's not make this place look even more like a programmers-only exclusive club. I wouldn't be averse to a set of parallel categories with more human-friendly names like "Citation identifier templates: XXX errors". – Jonesey95 (talk) 16:52, 29 May 2025 (UTC)Reply
    Lets clarify what CS1 and CS2 are, before we decide if we should call this set of tools "CS0".
    • CS1 by default requires the user to specify what kind of source it is (book, web, journal, etc.) and by default separates the elements with periods.
    • CS2 by default auto-detects the kind of source based on which parameters have values and which don't, and by default separates the elements with commas.
    • In printed style guides, comma separators are typical of footnotes and endnotes.
    • In printed style guides, period separators are typical of alphabetical bibliographies.
    • In Wikipedia, endnotes predominate but period separators also predominate.
    • The choice between CS1 and CS2 seems to be mostly based on whether the early editors of an article wanted to auto-detect the kind of source, with no concern about whether commas or periods were used.
    Considering what a mish-mash this is, I'm not sure we can make a sensible statement about what CS0 means. For me, the reasoning for this term must be all about making it more understandable for editors. If it's all about making the organization of the coding of the templates and modules easier, then it isn't a style at all; it's something like "citation utility template group" (CUTG). Jc3s5h (talk) 17:05, 29 May 2025 (UTC)Reply

    For purpose of documentation and categories

    For all documentations purposes and categorization purposes, CS1 and CS2 are identical. The only difference is one uses a period for delimiter (with a final period), the other uses a comma (with no final period).

    What I'm proposing here is that for purpose of coding/documentation/categorization/error messages, we call CS0 those semi-templated citations that invoke those catalog lookup templates, and that they share code and documentation with CS1/2 templates when possible. If CS0 offends you, call it CS3 (or CS Platypus or whatever). Headbomb {t · c · p · b} 17:27, 29 May 2025 (UTC)Reply

    Templates like {{doi}} do not implement a citation style, which is what "CS" stands for. An actual descriptive name would help both readers and editors. – Jonesey95 (talk) 17:40, 29 May 2025 (UTC)Reply
    I know it's not a style. Not the point. The point is to unify and streamline the codebase, documentation, categories, etc. Headbomb {t · c · p · b} 17:44, 29 May 2025 (UTC)Reply
    If it's not a style, don't call it a style. Jc3s5h (talk) 18:51, 29 May 2025 (UTC)Reply

    Returning to the nub of this discussion, there are issues that would need to be addressed somehow. Mostly it is the variety of parameters and options supported by the identifier templates:

    • {{arxiv}} – takes a single value; has support for |archive= parameter; the parameter is documented as deprecated and not apparently used in mainspace but is still supported in the template
    • {{bibcode}} – takes a single value
    • {{biorxiv}} – takes a single value
    • {{citeseerx}} – host appears to be currently dead (502 bad gateway) – has support for up to nine identifiers; supports |type= with values doi and pid
    • {{doi}} – takes a single value
    • {{hdl}} – takes a single value; supports |hdl-access= values free, limited, registration, subscription
    • {{isbn}} – has support for up to nine identifiers; supports |plainlink=, |link=, |leadout=, |invalid1= .. |invalid9=, |template_name=
    • {{issn}} – has support for up to nine identifiers; supports |plainlink=, |link=, |leadout=, |invalid1= .. |invalid9=
    • {{jfm}} – has support for up to nine identifiers; supports |leadout=
    • {{jstor}} – takes a single value; supports |stable=, |sici=, |issn=
    • {{lccn}} – takes a single value; supports |title=, |name=, |long=; uses Module:LCCN
    • {{medrxiv}} – takes a single value
    • {{mr}} – has support for up to nine identifiers; supports |leadout=
    • {{oclc}} – has support for up to nine identifiers; supports |leadout=, |show=
    • {{osti}} – takes a single value
    • {{pmc}} – takes a single value
    • {{pmid}} – has support for up to nine identifiers; supports |plainlink=, |leadout=
    • {{ssrn}} – takes a single value
    • {{zbl}} – has support for up to nine identifiers; supports |leadout=

    Trappist the monk (talk) 19:42, 29 May 2025 (UTC)Reply

    All of them should be brought in line with how they behave in CS1|2 templates. Corner cases can be either handled seperatly and offloaded to seperate templates (like multiple MRs/PMIDs being handled by a seperate templates).
    I also believe doi, hdl, both support |<identifier>-access=. bibcode, jstor, osti, ssrn should support it too. Headbomb {t · c · p · b} 02:07, 30 May 2025 (UTC)Reply
    I've updated {{arxiv}}, {{biorxiv}}, {{citeseerx}}, and {{pmc}} to display green access locks by default (and recreated {{medrxiv}}). I've also updated {{bibcode}}, {{doi}}, {{hdl}}, {{jstor}}, {{osti}}, and {{ssrn}} to support |<identifier>-access=free. Headbomb {t · c · p · b} 03:07, 30 May 2025 (UTC)Reply
    I've been poking at a module in my sandbox that supports, in whole or in part, all of the above named identifier templates. Some of the current templates use {{Catalog lookup link}}. That template supports up to nine identifiers and the parameters |leadout=, |link=, and |plainlink=. The sandbox module supports these parameters and essentially unlimited numbers of identifier-values for all of the identifier templates.
    Some identifier templates have other special features/parameters that are not supported by the sandbox module:
    • {{citeseerx}} – host seems to be mostly dead; most often returning 502 gateway errors. When marginally alive, doesn't seem to recognize dois in the form 10.x.x.x (where 'x' is some number of digits). Supports an undocumented parameter |type= which accepts doi and pid as values. Used in <5 articles; those specifying |type=pid appear to work when the host is working; pid type identifiers not supported by cs1|2
    • {{hdl}} – besides free, supports |hdl-access= values limited, registration, and subscription; these parameter values do not appear to be used
    • {{ISBN}} – supports:
      |invalidn== used in ~120 articles; can be replaced with accept-as-written markup ((..)) if rendered with the sandbox module
      |template_name= not documented; used to identify the template calling Module:Check isxn (a cs1|2 derived module to do error checking)
    • {{ISSN}} – supports |invalidn= used in ~10 articles; can be replaced with accept-as-written markup ((..)) if rendered with the sandbox module
    • {{JSTOR}} – supports:
      |stable= used in ~5 articles; alias of {{{1}}}
      |sici= does does not appear to be used; cannot be used with {{{1}}} or |stable=
      |issn= used in <5 articles; cannot be used with {{{1}}} or |stable= or |sici=
      |no= does not appear to be used; alias of |issn=
    • {{lccn}} – has its own Module:LCCN; supports:
      {{{2}}} (a title or label) used in ~10 articles
      |long= used in ~15 articles
    • {{OCLC}} – supports |show=; used in ~270 articles; when used, WorldCat requires registration to view results
    Some testing of the sandbox module can be seen in my sandbox (permalink).
    Templates not currently supported by the sandbox module but might be are:
    Certainly the sandbox module can be used to transparently upgrade these templates:
    With a documentation tweak, {{hdl}} can be upgraded. To upgrade {{isbn}} and {{issn}} (and {{ismn}} and {{sbn}}?) we must replace |invalidn= in instances of those templates; a relatively minor task.
    That leaves us with these:
    • {{citeseerx}}
    • {{jstor}}
    • {{lccn}}
    • {{oclc}}
    If we are to proceed with the notion of consolidating these identifiers with the sandbox module, what to do about these four.
    I suppose the more important question is: Should we consolidate these templates so that the supported templates use the cs1|2 module suite?
    Trappist the monk (talk) 18:28, 16 June 2025 (UTC)Reply
    I've purged the non-standard parameters from {{JSTOR}}, and updated the hdl doc. Headbomb {t · c · p · b} 19:27, 16 June 2025 (UTC)Reply
    CiteSeerX pid links purged too. They weren't working, but I converted those without alternatives to regular |url=. Headbomb {t · c · p · b} 19:35, 16 June 2025 (UTC)Reply
    These five templates were noted above as not supported by the sandbox module. All are now supported in whole or in part:
    Of them, two are problematic:
    • {{asin}} – used in ~4700 articles.
      • Of those:
        ~2920 articles with numeric identifier (a 10-digit ISBN); the sandbox module will mark these as errors
        <15 articles with 630... numeric identifier (not a 10-digit ISBN but looks like one); the sandbox module will accept these
        ~1820 articles with alphanumeric identifier
      • supports:
        |country= used in ~2990 articles; can be replaced with |asin-tld=
        • of those, ~2880 articles use the template in cs1|2 |id= parameters
        |date= used in ~80 articles; no cs1|2 replacement
        |title= used in <5 articles; no cs1|2 replacement
    • {{OL}} –used in ~140 articles
      supports Internet Archive ia:... identifiers (not currently used in any articles; not supported by cs1|2; the identifier can be converted to an Internet Archive url:
    My sandbox (permalink) has been updated to include example renderings of these five templates.
    Trappist the monk (talk) 17:40, 19 June 2025 (UTC)Reply
    Are we going to do anything with this? Should I create Module:Identifiers (or perhaps Module:CS1 identifiers would be a better name)?
    Trappist the monk (talk) 23:06, 13 July 2025 (UTC)Reply
    CS1 identifier(s) is probably a better name for it. Headbomb {t · c · p · b} 23:24, 13 July 2025 (UTC)Reply
    As you've been updating these, shouldn't {{arxiv}}/{{cite arxiv}} support |version= ? (and |version-date=) -- 65.93.183.249 (talk) 15:15, 21 June 2025 (UTC)Reply

    No. If you're citing arXiv:0704.0001v1 specifically, then you use

    • Balázs, C.; Berger, E. L.; Nadolsky, P. M.; Yuan, C. -P. (2 April 2007). "Calculation of prompt diphoton production cross sections at Tevatron and LHC energies". arXiv:0704.0001v1 [hep-ph].

    If you're citing arXiv:0704.0001v2, then you use

    • Balázs, C.; Berger, E. L.; Nadolsky, P.; Yuan, C.-P. (27 July 2007). "Calculation of prompt diphoton production cross sections at Fermilab Tevatron and CERN LHC energies". arXiv:0704.0001v2 [hep-ph].

    Headbomb {t · c · p · b} 15:56, 21 June 2025 (UTC)Reply

    I have created Module:CS1 identifiers and used it to replace Module:Doi in {{doi}}. I will pick away at the other identifier templates.
    Trappist the monk (talk) 00:02, 30 July 2025 (UTC)Reply

    Picking away at this list; those with a  Y mark have been converted to use Module:CS1 identifiers. No doubt, no doubt, template and category documentation needs improvement.

    Trappist the monk (talk) 22:44, 31 July 2025 (UTC)Reply

    {{ProQuest}} ? —David Eppstein (talk) 00:33, 4 August 2025 (UTC)Reply
    There is no cs1|2 parameter |proquest=.
    Trappist the monk (talk) 17:35, 4 August 2025 (UTC)Reply
    How about {{IETF RFC}}, {{Listed Invalid ISBN}}, {{doi-inline}}? --FlatLanguage (talk) 23:41, 12 August 2025 (UTC)Reply
    I fixed {{Listed Invalid ISBN}}. --FlatLanguage (talk) 09:38, 24 August 2025 (UTC)Reply

    Please participate. Headbomb {t · c · p · b} 16:28, 28 July 2025 (UTC)Reply

    Now that it's gone, should we use {{cite report}} or {{cite technical report}} for Federal Information Processing Standards (FIPS) standards? -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 17:48, 12 August 2025 (UTC)Reply
    Neither? Cite web seems fine here. Headbomb {t · c · p · b} 18:19, 12 August 2025 (UTC)Reply
    {{cite web}} seems like a strange choice for a document published on a dead tree. -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 18:40, 12 August 2025 (UTC)Reply
    I also don't like Cite web for this. Most commonly, these are PDFs that resemble books. The most useful way of locating content within the document will be the same ways one would use for a technical book, such as page number, chapter, or paragraph number. The only things about them that isn't book-like is they usually have a standard number. There may also be a version number. Jc3s5h (talk) 18:55, 12 August 2025 (UTC)Reply
    Well, ideally that's what {{cite document}} would be for, but it inexplicably doesn't support urls. Headbomb {t · c · p · b} 22:15, 12 August 2025 (UTC)Reply
    Cite document was deliberately created for papers which have no web presence and no enclosing work. This is a deliberate choice. {{cite web}} or one of the cite reports is the appropriate template for use here if cite document's restrictions are unuseful. Izno (talk) 19:53, 21 August 2025 (UTC)Reply
    I can't really get behind {{cite report}} or {{cite technical report}} because the documentation does not provide a useful description of how to cite a report. They seem to treat the main name of the report as |journal= with |work= as one of several aliases, but a standard is not a periodical. The terminology used by most readers of standards is that it has a title, which is treated like a book title. In my mind, a citation template with crappy documentation should not be used. Jc3s5h (talk) 18:50, 12 August 2025 (UTC)Reply

    Option to suppress full stop (period) at end of Title & other title-like parameters

    edit

    Agreement to make this so appears to have been reached back in 2013: of course a lot has changed since then!

    Anyway, the issue resurfaced here (quite possibly, ofc, elsewhere, over the years?). How about it?

    To reduce server load, I wouldn't suggest auto-detection of !, ?, ... => suppression, but rather creating a new parameter along the lines of |title-period=no

    Protalina (talk) 10:48, 29 July 2025 (UTC)Reply

    This is a long time tracked feature request. That page probably doesn't get enough use. Izno (talk) 19:56, 21 August 2025 (UTC)Reply

    OCLC limit needs increase

    edit

    The OCLC limit needs to be increased as there are now OCLC values that exceed the present limit. Example:

    PizzaKing13 (¡Hablame!) 🍕👑 20:24, 29 July 2025 (UTC)Reply

    This is in Module:Citation/CS1/Configuration. Is there an OCLC website where we can verify the valid number range? --Redrose64 🌹 (talk) 21:09, 29 July 2025 (UTC)Reply
    No. The limit is found by running into it. Headbomb {t · c · p · b} 21:26, 29 July 2025 (UTC)Reply

    Cited in Genetic history of the African diaspora:

    Anomalocaris (talk) 08:45, 25 August 2025 (UTC)Reply

    Citations wrapped in <cite>

    edit

    Currently, Wikipedia's citation templates wrap each citation in the <cite> tag. This is an improper use of the <cite> tag and should likely be replaced by <span> (although I don't really care what we replace it with, so long as we stop using it in this way).

    According to the HTML specification, The cite element represents the title of a work.... The cite element is a key part of any citation in a bibliography, but it is only used to mark the title... The spec then gives an example of a citation where cite is used to wrap the title of the work being cited, but not the whole citation.

    I think the current state of affairs may have come about from there being a different description of the cite element's purpose in the W3C's specification back when they maintained a separate one, although I haven't checked to make sure. Regardless of the original reason, it seems clear that this should be corrected. Mr. Starfleet Command (talk) 06:50, 6 August 2025 (UTC)Reply

    History:
    <cite>...</cite> implemented at this edit per this discussion:
    Help talk:Citation Style 1/Archive 9 § <cite> has been fixed, so we can now use it for entire citation
    preceding discussions (organized by namespace and archive number):
    Template talk:Citation/core/Archive 5 § Problem...
    Template talk:Citation/core/Archive 6 § Cite element, take two
    Template talk:Citation/core/Archive 12 § Separating content from formatting.
    MediaWiki talk:Common.css/Archive 15 § Restore default style for HTML cite element
    MediaWiki talk:Common.css/Archive 16 § Compensate for italic lean
    MediaWiki talk:Common.css/Archive 17 § The cite element needs to not auto-italicize any longer
    Module talk:Citation/CS1/Archive 3 § Optimization suggestions
    Help talk:Citation Style 1/Archive 6 § Lua module and css presentation
    Help talk:Citation Style 1/Archive 8 § HTML5 bait-and-switch: The cite element again
    Trappist the monk (talk) 15:49, 6 August 2025 (UTC)Reply
    Yes, that is how the affairs occurred. That said, I am of the mind simply to ignore the WHATWG's decision here. Izno (talk) 20:00, 21 August 2025 (UTC)Reply
    When we wrapped the whole citation in <cite>...</cite> tags in 2015, this was the state of the HTML5 recommendation that we were following. We appear to have been in compliance at that point. It looks like they changed their minds at some point in the last ten years, invalidating many formerly valid implementations. I am not privy to the conversations that led to a revision in the guidance, but I am not inclined to worry about it here. They will probably change the guidance again at some point. – Jonesey95 (talk) 20:27, 21 August 2025 (UTC)Reply
    The FAQ may illuminate. There's plenty elsewise about the element if you just google "cite WHATWG" or similar. Basically "it make italics so we make it title only" was it. Which totally ignores non-Latin language titles and totally ignores titles of what one might call lesser works such as chapters, sections, articles, and papers. Izno (talk) 20:51, 21 August 2025 (UTC)Reply
    That FAQ contains essentially the opposite explanation of our 2015 discussion. The HTML gods in 2009 to 2013 tried to make <cite>...</cite> apply only to titles, and HTML developers apparently revolted, so the HTML folks relented. Then, at some point, according to the FAQ, they made the same change again, possibly while nobody was looking, and I guess there wasn't a revolt, or developers had stopped listening, or something. A tempest in a teapot, followed by a calm teapot. Let's just have some tea and work on something else. – Jonesey95 (talk) 21:00, 21 August 2025 (UTC)Reply
    The some point is when the W3C ceded all authority to deciding how HTML works to WHATWG. Izno (talk) 00:36, 22 August 2025 (UTC)Reply

    More generic cite titles

    edit

    I have collected some more generic cite titles related to bot protection. Below are the ones with the most results:

    There are also other ones with only a couple results, if anyone wants them. OutsideNormality (talk) 18:38, 16 August 2025 (UTC)Reply

    How to cite a book imprint

    edit

    I have a book. Do I cite the imprint? Do I link the publisher Pen and Sword Books?

    PEN AND SWORD HISTORY
    an imprint of
    Pen & Sword Books Ltd
    Yorkshire – Philadelphia — 🌊PacificDepths (talk) 22:12, 16 August 2025 (UTC)Reply

    Good question. I've seen no rhyme or reason. It can get messy. Independent "Publisher A" is bought by mega "Publisher B", who now makes an imprint called "Publisher A". "Publisher B" is bought by super-mega "Publisher C" and continues the Publisher A imprint. Most editors pick whatever name is on the cover or pops up on the credits pages. Maybe it's the publisher, or the imprint. Sometimes they are the same thing, or nearly so (Pen & Sword). The imprint can be key marker of identification, sometimes not. Other sources sometimes reference the imprint, sometimes not. We don't apparently have guidance about it. -- GreenC 00:19, 17 August 2025 (UTC)Reply
    I tend to cite the imprint on the theory that it's more precise and what's found in the book. Mackensen (talk) 00:46, 17 August 2025 (UTC)Reply
    An imprint is just another name for a publisher. Pick one, either the imprint or its owner. Izno (talk) 20:01, 21 August 2025 (UTC)Reply

    Why is my at= not showing?

    edit

    In Special:Permalink/1306794489 I have:

    {{Cite AV media |url=https://s3.amazonaws.com/ixn-p-81a77edd0ffa/wp-content/uploads/2021/02/03200358/new-york-ooh-transit-advertising-media-kit-intersection.pdf?utm_source=chatgpt.com |title=New York Media Kit 2021 |type=Slide deck |publisher=Intersection Agency |at=Slide 26}}

    which renders as:

     New York Media Kit 2021 (PDF) (Slide deck). Intersection Agency.
    

    Why does the "Slide 26" not render? Is {{Cite AV media}} the correct template to be using for this? RoySmith (talk) 19:11, 19 August 2025 (UTC)Reply

    The in-source ___location parameters, |page=, |pages=, |at=, are not supported by {{cite av media}}. You might write:
    {{Cite AV media |section-url=https://s3.amazonaws.com/ixn-p-81a77edd0ffa/wp-content/uploads/2021/02/03200358/new-york-ooh-transit-advertising-media-kit-intersection.pdf#page=26 |section=Slide 26: Interior Cards |title=New York Media Kit 2021 |publisher=Intersection Agency}}
    "Slide 26: Interior Cards" (PDF). New York Media Kit 2021. Intersection Agency.
    Trappist the monk (talk) 19:44, 19 August 2025 (UTC)Reply
    Interesting. Is there some way to teach that to Visual Editor? VE offers "In-source ___location: At" in its menu of available fields, and it does not offer "section". Doing it manually in the source editor does however work, so thank you for that suggestion. RoySmith (talk) 19:55, 19 August 2025 (UTC)Reply
    I know little and care even less about the abomination that is visual editor. By 'teach', I presume that you are talking about the {{cite av media}} template data. That is not protected so you can edit it to delete 'In-source ___location: At' and, for that matter, 'In-source ___location: Page' which is also not a supported parameter. While you're there, if you want, you might add |section=, |section-url=, |section-url-access=, |script-section=, |trans-section=, and |section-format=. I can offer no further assistance if teaching ve about these parameters involves more than simply adding the parameters to the template data.
    Trappist the monk (talk) 21:59, 19 August 2025 (UTC)Reply
    I removed "at" and "page" and borrowed some parameters from Template:Citation/doc. |script-section= still needs to be added as an alias of |script-chapter= on most of the CS1 TemplateData pages. I think the same is true for |trans-section= and |trans-chapter=. Rjjiii (talk) 03:12, 20 August 2025 (UTC)Reply

    How to cite Jargon File/The Hacker Dictionary

    edit

    Could you suggest me a way to cite an entry on Jargon File/The Hacker Dictionary website (e.g. in Impossible trident)?-- Carnby (talk) 12:10, 24 August 2025 (UTC)Reply

    One way:
    {{cite dictionary |entry=blivet |title=Jargon File |url=http://www.catb.org/~esr/jargon/oldversions/jarg271.txt |version=v. 2.7.1 |date1 March 1991}}
    "blivet". Jargon File. v. 2.7.1. 1 March 1991.
    Trappist the monk (talk) 12:27, 24 August 2025 (UTC)Reply
    Probably better way
    {{cite dictionary |entry-url=http://www.catb.org/~esr/jargon/html/L/lossage.html |entry=lossage |dictionary=The Jargon File |version=4.4.7}}
    to give
    Raymond, Eric (29 December 2003). "lossage". The Jargon File. v. 4.4.7.
    Change |entry= and |entry-url= as needed. Headbomb {t · c · p · b}

    module suite update 30–31 August 2025

    edit

    I propose to update the cs1|2 module suite over the weekend 30–31 August 2025. Here are the changes:

    Module:Citation/CS1:

    • maint cat to track {{cite journal}} templates misusing |page= for |article-number=; discussion
    • fix url access parameter application on wikipedia library url errors; discussion

    Module:Citation/CS1/Configuration:

    • add script-lang tkr;
    • change color of maint warning message in preveiw box from #3a3 to #085 to match cs1|2 maint message color;
    • tweak tabular data fetch; discussion
    • maint cat to track {{cite journal}} templates misusing |page= for |article-number=
    • add 10.1016/j.patter to free DOI prefix recognition (Patterns); 10.9778 to free DOI recognition (CMAJ Open)
    • maint cat for post 2007 arxiv format without |class=; see discussion
    • add 'updated' as bad author name; discussion
    • fix url access parameter application on wikipedia library url errors

    Module:Citation/CS1/Date validation:

    • make |date=Jan 0500, |date=0999–1000, |date=090–100 error, accept |date=Jan 500; discussion
    • make |date=2000-10-01, |year=2010 error; discussion

    Module:Citation/CS1/Identifiers:

    • maint cat for post 2007 arxiv format without |class=
    • tweak wikidata identifier article name fetch; discussion
    • fix 8-digit only medRxiv test; discussion

    Trappist the monk (talk) 19:16, 24 August 2025 (UTC)Reply

    Before this is rolled out, could we get support for |proquest=? Usage is certainly high enough to warrant it. Headbomb {t · c · p · b} 09:55, 25 August 2025 (UTC)Reply

    Can't figure out what I am doing wrong

    edit

    Why doesn't the following information result in a reference number? "Uzbekistan National Park acquires a new look". Uzbekistan: ГУ «Редакция газет «Янги Ўзбекистон» и «Правда Востока». August 27, 2022. Retrieved August 20, 2025. AkilinaL (talk) 22:14, 24 August 2025 (UTC)Reply

    You need to put <ref> in front of the template, and then add </ref> at the end of the template (like this: <ref>{{cite web ........ }}</ref>), then it should work. ~Oshwah~(talk) (contribs) 22:16, 24 August 2025 (UTC)Reply
    thanks. AkilinaL (talk) 23:04, 24 August 2025 (UTC)Reply

    Spaces in anchor

    edit

    Is it permissible to have spaces in an anchor, e.g.,

    • {{cite book|title = foo|ref = bar ed. 1}} rendering as} rendering as foo.
    • {{cite book|title = fu|ref = {{sfnref|fu ed. 1}}}}} rendering as fu.}

    Text citing fu{{sfn|fu ed. 1}} rendering as fu[1]? It seems to work, but is it legitimate? -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 12:07, 25 August 2025 (UTC)Reply

    Are you asking if the first unnamed parameter of {{sfn}} can contain spaces? If so, the answer is yes. There is an example in the template's documentation (do a find on the page for "Big Government Agency"). – Jonesey95 (talk) 13:17, 25 August 2025 (UTC)Reply
    I was asking whether it was fortuitous that it worked. The cite you gave me suggests that it's deliberate and should be safe to use. Thanks. -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 13:53, 25 August 2025 (UTC)Reply
    Safe to use. In anchor IDs created by {{sfnref}}, space characters are replaced with underscores:
    {{sfnref|fu ed. 1}}CITEREFfu_ed._1
    {{sfn}} and {{harvnb}} will create a matching link with underscores replacing space characters ({{harvnb}} used here for simplicity):
    {{harvnb|fu ed. 1}}[[#CITEREFfu_ed._1|fu ed. 1]]
    When the anchor ID is plain text assigned to |ref= in a cs1|2 template, white space is also replaced with underscores:
    {{cite book |title=foo |ref=bar ed. 1}}
    '"`UNIQ--templatestyles-0000004B-QINU`"'<cite id="bar_ed._1" class="citation book cs1">''foo''.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=foo&rfr_id=info%3Asid%2Fen.wikipedia.org%3AHelp+talk%3ACitation+Style+1" class="Z3988"></span>
    To link to this sort of |ref=, either of [[#bar ed. 1]] or [[#bar_ed._1]] will work.
    I suspect that best practice is to use {{sfnref}} in |ref= so that hovering a mouse pointer over the {{sfn}} link highlights the target cs1|2 template or shows the target in a popup.
    Space characters must be allowed in anchor IDs because there are human names that use spaces (Spanish surnames come to mind).
    Trappist the monk (talk) 14:58, 25 August 2025 (UTC)Reply

    References

    Revisiting https

    edit

    We talked about detecting "hhttps" and similar malformed URL starters in 2023 and before that in 2020, but the module was not changed to detect them.

    There appear to be about 100 articles using |url=hhttp at this time. Is it worth detecting these? – Jonesey95 (talk) 13:06, 25 August 2025 (UTC)Reply

    It's probably worth detecting known misspellings, but not flagging every scheme you don't recognize; new ones are added periodically. -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 13:49, 25 August 2025 (UTC)Reply

    occasional breakage that goes away after purge

    edit

    I've been keeping an eye on Category:Pages with script errors, and occasionally it's happened that I see the error:

    Lua error in Module:Citation/CS1/Configuration at line 2123: attempt to index a boolean value.

    It shows up on articles that do not have recent edits, for many months, and usually just goes away after a purge.

    It sounds like the caching engine is still occasionally reprocessing older, less hot pages, but with an older, broken version of the template. As soon as we force its hand with an explicit purge, the render with the current versions works fine.

    Do we know what this was? --Joy (talk) 16:02, 26 August 2025 (UTC)Reply

    transient error. Sometimes, when the cs1|2 module attempts to fetch tabular identifier limit data from c:Data:CS1/Identifier limits.tab, Commons returns false instead of the tabular data; don't know why that happens. The next update to the cs1|2 module suite won't fix Commons' problems but will change how cs1|2 reacts when Commons falls on its face.
    Trappist the monk (talk) 16:46, 26 August 2025 (UTC)Reply

    DOI, title, URL and Citation bot

    edit

    The |url= parameter causes the title to link to the provided URL, which |DOI= does not. If you specify both |doi= and |url=, Citation bot removes |url=, leaving a link from the DOI but not from the title. Is that a bug or a feature? If the bot is legitimate then there should be a warning. -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 18:58, 26 August 2025 (UTC)Reply

    Typically a DOI url (|url=https://doi.org/10..../...) that matches the value assigned to |doi= (|doi=10..../...) is hidden behind a paywall and is redundant so I can understand why Citation bot would delete the |url= parameter. As to whether Citation bot should perform that deletion is not a topic for this venue.
    Are you suggesting that redundant |doi= and |url= parameters should emit some sort of maintenance message when they match?
    When {{cite journal}} has a |doi= that links to a free-to-read copy of the source, setting |doi-access=free will cause {{cite journal}} to link |title= to https://doi.org/10..../... as if |url=https://doi.org/10..../... had been set. This automatic process yields to |url= with an assigned value.
    Trappist the monk (talk) 19:14, 26 August 2025 (UTC)Reply