Jump to content

Template talk:Reflib

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Reflib/doc)


Improve handling for misspelled or nonexistent section

[edit]

Currently, if a misspelled section name is passed in one of the positional parameters, the template will emit a bullet icon by itself, with no indication that there was no section matching the parameter. More robust handling would display an error message of some sort. Mathglot (talk) 00:21, 8 March 2023 (UTC)[reply]

Inline ref support

[edit]

Involves dropping the bullet (already available via param) but also the newline at the end. A question arises whether the user should supply the <ref>. . .</ref> tags in which case it's almost ready to go (except for the break), or whether the template should emit the tags. Also, whether we should add a param |page= in that case, or should they just use {{rp}} for that. Mathglot (talk) 00:32, 8 March 2023 (UTC)[reply]

Domain shortcuts

[edit]

Domain shortcuts (like 'FCL' for 'French criminal law') are currently implemented via template redirects, but a better way would be via {{Reflib/decode-lib}}. Mathglot (talk) 01:21, 8 March 2023 (UTC)[reply]

Subtemplate available, but not invoked. Mathglot (talk) 20:20, 22 October 2023 (UTC)[reply]

Bullet levels for chapters

[edit]

Currently, bullet levels for {{citec}} chapters not handled nicely. Best would be: single bullet here, double on the transcluding page, so they appear indented under the full citation. (And don't forget the |nob=1 case.) Mathglot (talk) 20:13, 22 October 2023 (UTC)[reply]

Covid domain

[edit]

The page WP:WikiProject COVID-19/Reference sources could be the base for a new article domain. Mathglot (talk) 07:28, 12 November 2023 (UTC)[reply]

Substify

[edit]

Making the template substable would expand its usability by opening it for use as a fast way to export (i.e., copy) many citations at the same time to the References section of an article, for those who wish to maintain local copies of the citations instead of accessing them via the template, without having to deal with multiple select–copy–paste operations. Mathglot (talk) 08:49, 13 December 2023 (UTC)[reply]

Request to suppress harv errors with ref=none

[edit]

Posting this request to add a parameter which would optionally allow you to add |ref=none to all generated citations. (But due to transclusion, would that be "seen" in time to prevent the harv errors from Module:Footnotes? Likely not, for the same reason that {{Sfn whitelist}} is needed—i.e., per false-positive error details; needs investigation.) If this is a viable solution, probably rather than hard-coding none into the output, it should just be |ref=whatever, and allow you to provide any value, whether none, or something else. An alternate approach might be to emit the {{sfn whitelist}} along with the citation, but that might be subject to the same technical limitation as noted above. Turning off harv errors from Module:Footnotes in common.css via .harv-error {display: none !important;} works and may be an alternate solution; user script User:Trappist the monk/HarvErrors documents how to style errors and warnings generated by that script. Mathglot (talk) 19:35, 13 December 2023 (UTC)[reply]

Enhancement: support LDR

[edit]

Add support for use in WP:List-defined references. This would be pretty simple, just embedding the citation in <ref name="{{{1|}}}">...</ref>. Mathglot (talk) 18:26, 19 December 2023 (UTC)[reply]

My first few attempts in the sandbox (starting at rev. 1190794280‎) failed; they were able to spit out the tags, but they weren't interpreted as <ref> tags, just as text, so didn't create superscript footnotes when tested alone (see blanked test in testcases). It may be impossible to generate a properly interpreted <ref> tag; note that {{BioRef}} calls add the tags outside the template call with <ref>{{|BioRef|ref|Cracraft-2014}}</ref> for example,[1], as pointed out by Jts1882 at this discussion at the BIRDS project. Next step would be to add a two-arg (one citation arg) version of Reflib to the sandbox that uses the blanked sandbox code that generated the <ref> tag, and try to go from there, but I suspect it's impossible. Mathglot (talk) 01:34, 30 December 2023 (UTC)[reply]
It looks possible; the rump sandbox now is generating a single ref tag. One of the issues may be the order of resolving parser functions *after* <ref> tags, as mentioned here:

Substitution and embedded parser functions
Since Cite's <ref> tag is parsed before MediaWiki's parser functions ( (e.g. {{#ifexpr:...}}) or variables (e.g. {{PAGENAME}}) or before {{subst:}}, these will not work inside of citation references. Instead, you have to use the magic word {{#tag:...}}.

Continuing the sandbox development along these lines with one ref and some parser function and the tag should prove the concept; then can explode back to 20 refs. Ideally, the whole thing should be substable. Mathglot (talk) 02:51, 5 January 2024 (UTC)[reply]

References

  1. ^ Cracraft, J. (2014). "Avian Higher-level Relationships and Classification: Passeriforms". In Dickinson, E.C. &; Christidis, L. (eds.). The Howard and Moore Complete Checklist of the Birds of the World. Vol. 2 (4th ed.). Eastbourne, U.K.: Aves Press. pp. xvii–xlv.