Template talk:Reflib

Improve handling for misspelled or nonexistent section
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)

Inline ref support
Involves dropping the bullet (already available via param) but also the newline at the end. A question arises whether the user should supply the &lt;ref>. . .&lt;/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)

Domain shortcuts
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)
 * Subtemplate available, but not invoked. Mathglot (talk) 20:20, 22 October 2023 (UTC)

Bullet levels for chapters
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 1 case.) Mathglot (talk) 20:13, 22 October 2023 (UTC)

Covid domain
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)

Substify
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)

Request to suppress harv errors with ref=none
Posting this request to add a parameter which would optionally allow you to add 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 into the output, it should just be whatever, and allow you to provide any value, whether, 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   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)

Enhancement: support LDR
Add support for use in WP:List-defined references. This would be pretty simple, just embedding the citation in. Mathglot (talk) 18:26, 19 December 2023 (UTC)
 * 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 &lt;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 &lt;ref> tag; note that BioRef calls add the tags outside the template call with  for example,, 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 &lt;ref> tag, and try to go from there, but I suspect it's impossible. Mathglot (talk) 01:34, 30 December 2023 (UTC)
 * 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* &lt;ref> tags, as mentioned here:
 * 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)
 * 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)