Jump to content

Template talk:Refn

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

Potential issues

[edit]

Is this template worth developing just to insulate the user from the cryptic #tag magic word? Does it cause any egregious overhead? Would it be better to teach how to use #tag than push this template? ---— Gadget850 (Ed) talk 00:07, 6 March 2010 (UTC)[reply]

I found it useful and straightforward for the listed use case, because I used to replace a set of
{{Infobox ... | content = something{{smallsup|1}} ... | footnote1 = note stuff<ref name="rn"> ...}}
with
{{Infobox ... | content = something{{refn|group="Note"|note stuff<ref name="rn">}} ... }}
{{reflist|group="Note"}}
The change was a bit less invasive than with #tag:ref and produced a more readable diff. --Joy [shallot] (talk) 10:16, 27 October 2011 (UTC)[reply]

Wording of "Purpose" section

[edit]

Here's the current wording of the Purpose section:

Parser tags such as <ref> do not allow the inclusion of wikimarkup such as substing, variables or templates. The magic word {{#tag:ref}} can be used to resolve these issues, but the syntax can be non-obvious. This template uses {{#tag:ref}} with easy to understand parameters.

This template is an alternative to using <ref>...</ref>, especially in the following scenarios:

  1. Nested <ref>...</ref>: Because of a technical limitation, a set of <ref>...</ref> does not work inside another. But they do work inside this template. This is mainly useful for explanatory footnotes that requires a cite using <ref>...</ref>. (For more information, see Help:Footnotes § Grouping footnotes.)
  2. Substitution within references: Substitution, the process of rendering the contents of template into the target article, does not work inside <ref>...</ref> but does work inside this template.

Editors here disagree on the content of this section, and there have been multiple reverts. Please discuss here before making changes. I'm sure we can figure something out in this tiny little corner of Wikipedia. Thanks. – Jonesey95 (talk) 15:49, 6 April 2014 (UTC)[reply]

Hi.
I have highlighted two parts of Jonesey95's message above. These areas say the exact same thing, only the first one, which I reverted, is more technical and is added out of context later.
For those who cannot see the highlight, here a reproduction the redundant paragraphs:
  • Paragraph 1: Parser tags such as <ref> do not allow the inclusion of wikimarkup such as substing, variables or templates. The magic word {{#tag:ref}} can be used to resolve these issues, but the syntax can be non-obvious. This template uses {{#tag:ref}} with easy to understand parameters.
  • Paragraph 2: Because of a technical limitation, a set of <ref>...</ref> does not work inside another. But they do work inside this template. This is mainly useful for explanatory footnotes that requires a cite using <ref>...</ref>. (For more information, see Help:Footnotes § Grouping footnotes.)
Best regards,
Codename Lisa (talk) 02:31, 7 April 2014 (UTC)[reply]
I have read both of the paragraphs multiple times, and I do not see either of them as redundant to the other.
The first one mentions substing, variables, and templates. The second one does not.
The second one talks about nesting ref tags. The first one does not.
I see little to no redundancy, and I have been editing references for a while.
Usually, in situations like this, what works best is a rewrite, along with some clear examples, to explain what is really going on, rather than trying to work with the existing cobbled-together language. – Jonesey95 (talk) 03:09, 7 April 2014 (UTC)[reply]
Hi.
First, two out of three assertions of the sentence is wrong: In this case, Wikipedia does not support variables outside LUA module at all (maybe you meant parameters?) and templates are okay inside <ref>...</ref>; in fact, template {{Cite web}} is frequently used inside these tags. Hence I reverted these bold allegations. These two seemed so wrong to me that I though if mention them in my revert rationale, it'd be taken as an aggressive act of throwing obvious mistakes in one's face. I was wrong in that account, but here we go.
Now, I initially thought "substing" was typo for subsetting, which is a programmers term for nesting. But now, I am thinking maybe it meant to be "substitution". (I had never seen "subst" without colon and with "ing" before.) But again, substitution is already discussed:
  • Paragraph 3: Substitution within references: Substitution, the process of rendering the contents of template into the target article, does not work inside <ref>...</ref> but does work inside this template.
Best regards,
Codename Lisa (talk) 14:56, 7 April 2014 (UTC)[reply]
It sounds like the whole section needs a rewrite. I did not write any of it in the first place, and I do not have the necessary technical knowledge. Would you like to take a stab at a rewrite that is accurate and comprehensible? I think you would do a good job, given your knowledge of the vocabulary involved. – Jonesey95 (talk) 21:11, 7 April 2014 (UTC)[reply]
I am always willing to change something if I come up with an excellent idea. But the current state is a rewrite: [1]. But I'll see what I can do. Best regards, Codename Lisa (talk) 03:34, 8 April 2014 (UTC)[reply]
Okay, see how it looks like now. Best regards, Codename Lisa (talk) 04:03, 8 April 2014 (UTC)[reply]
It looks much clearer to me. Great work. I added a few words to clarify what was happening in the examples, in case it is not obvious to readers what is supposed to happen. – Jonesey95 (talk) 15:54, 8 April 2014 (UTC)[reply]

{{refn}} template inside the "|Refs=" field

[edit]
  • Notes used outside {{reflist}} template work correctly:

Group1, Note 11:{{refn|group=group1|name=n11}}
Group1, Note 12:{{refn|group=group1|name=n12}}
{{refn|group=group1|name=n11|Note 11 <ref name="ref_a" />}}
{{refn|group=group1|name=n12|Note 12 <ref name="ref_b" />}}
Notes - group 1
{{reflist|group=group1}}
References
{{reflist |refs=
<ref name="ref_a">ref_a</ref>
<ref name="ref_b">ref_b</ref>
}}

  • but inside "Refs" field don't, for example references are spoiled (don't appear or this message is displayed: "Cite error: A list-defined reference named "name_here" is not used in the content" if the same reference is used in two or more notes) or the note inside Refs behaves like note outside (in the text) and is pointing at itself but such links don't work.

Group1, Note 11:{{refn|group=group1|name=n11}}
Group1, Note 12:{{refn|group=group1|name=n12}}
Notes - group 1
{{reflist|group=group1|Refs=
{{refn|group=group1|name=n11|Note 11 <ref name="ref_a" />}}
{{refn|group=group1|name=n12|Note 12 <ref name="ref_b" />}}
}}
References
{{reflist |refs=
<ref name="ref_a">ref_a</ref>
<ref name="ref_b">ref_b</ref>
}}

This is probably intended or this template is used incorrectly. You can delete later this question. Thank you in advance for possible answer. Darekk2 (talk) 01:10, 14 April 2014 (UTC)[reply]

I've noticed the same problem. I don't think it is intended, but I'm not able to fix it. --Dennis J au (talk) 16:12, 21 June 2017 (UTC)[reply]
Just ran into this. Yes, it is a known bug since 2009 (phab:T22707) that WP:list-defined references do not work with nesting. This is currently listed under things that do not work at WP:Nesting footnotes. juanitogan (talk) 22:59, 28 March 2023 (UTC)[reply]

Confusing error

[edit]

In this article section, I wanted to use {{refn}} to encapsulate the huge note so I could subsequently convert all the internal links into references. I changed <ref group="note"> to {{refn|group="note"| and the ending </ref> to }}. After making these changes, I get the error "Cite error: There are <ref> tags on this page without content in them (see the help page)." The only thing that would make the error message go away was substantially shortening the enclosed note. Is there is a size limit for refn, or is there something else I should look at? Stevie is the man! TalkWork 19:20, 22 February 2015 (UTC)[reply]

@Stevietheman: If the unnamed parameter contains an equals sign (such as one that's part of a URL), you need to escape that by explicitly numbering it, i.e. {{refn|group=groupname|1=text of note}} I strongly suggest that you add titles to those bare URLs. --Redrose64 (talk) 19:32, 22 February 2015 (UTC)[reply]
Thanks from the "learning something new every day dept.".  :) Fixing all the bare URLs was my intention. Note that I'm cleaning up someone else's mess. Stevie is the man! TalkWork 19:43, 22 February 2015 (UTC)[reply]

Refn references getting sent to the bottom of the page?

[edit]

I used refn to nest some reference on a page I was working on, and I recently noticed that it has been putting the refn references at the bottom of the page rather than in reflist. I have a stripped down example in my sandbox User:Tarchon/sandbox to demonstrate. It seems to me like it didn't do this until recently, or at least I just noticed it recently. Does anyone know whether this is a bug or something I'm doing wrong? Thx.Tarchon (talk) 18:08, 22 May 2015 (UTC)[reply]

@Tarchon: It's not a fault with {{refn}}, but is because you've got a reference inside a reference. The {{reflist}} expands the outermost reference, but can't do anything with the inner one, so it falls out the bottom. AFAIK it's always been like that. Rather than a sandbox, do you have a real-world example? Then, I might be able to suggest an alternative. --Redrose64 (talk) 18:42, 22 May 2015 (UTC)[reply]
I could've sworn it was putting the nested references in the reflist when I first put them in last year. I only noticed it because the reference names weren't resolving between the two lists, and I'm pretty sure I would've noticed those big resolution error messages before now. Well, I guess I'll just use something else if that's how it's supposed to work, but it seems like that behavior is really wrong. Aren't nested references one of the main reasons for having this template? Tarchon (talk) 19:05, 22 May 2015 (UTC)[reply]
They need to be in different groups, see for example LB&SCR A1X Class W8 Freshwater#Notes - ref [38] inside note [a] is constructed using {{sfn|...}} inside {{efn|...}} but the same effect would be produced by {{refn|...}} inside {{refn|group=lower-alpha|...}} --Redrose64 (talk) 19:14, 22 May 2015 (UTC)[reply]
Ah, thanks. I wondered if the lack of group names was the problem, but I wasn't sure what to use. The {{refn}} docs say "Group name per WP:REFGROUP; if not specified, then the main and nested references will be rendered into the same reference list" which is what I was going by. Maybe it's just that the doc page is wrong. Tarchon (talk) 20:56, 22 May 2015 (UTC)[reply]
I am seeing the same problem in Oxley, Queensland. I understood from the documentation (item 3 in purpose) that refn could be used to nest references and that in the absence of group names the references end up in a single reference list (which is what I want). Certainly it has worked for many months and has suddenly stopped working recently and there's been no change to the use of refn in the article. It looks like something has changed with this template? that's forcing the inner references into a separate group which then throws an unknown reference name exception. Kerry (talk) 08:14, 23 May 2015 (UTC)[reply]
given that it doesn't look like this template has recently changed, is it possible that the underlying processing of references has changed? Something different is going on that is making this template not work as it claims to and as it used to. Kerry (talk) 08:31, 23 May 2015 (UTC)[reply]
The {{refn}} template was changed two days ago, but it was an error that was reverted 26 minutes later. The current version is identical to that of three years ago. If there has been a change in behaviour, it will be the underlying parser function, {{#tag:ref|...}}. This may be tested thus:
... [[Australia]].<ref name=qpn>{{cite QPN|43018|Oxley (suburb)|accessdate=27 July 2014}}</ref> It is located approximately {{convert|10.8|km|mi}} from the [[Brisbane central business district|Brisbane CBD]].{{#tag:ref|Distance calculated based on coordinates given in <ref name=qpn/> and <ref>{{cite QPN|46580|Brisbane City (suburb)|accessdate=27 July 2014}}</ref>}}
{{reflist}}
which gives ... Australia.[1] It is located approximately 10.8 kilometres (6.7 mi) from the Brisbane CBD.[3]
  1. ^ a b "Oxley (suburb) (entry 43018)". Queensland Place Names. Queensland Government. Retrieved 27 July 2014.
  2. ^ "Brisbane City (suburb) (entry 46580)". Queensland Place Names. Queensland Government. Retrieved 27 July 2014.
  3. ^ Distance calculated based on coordinates given in [1] and [2]
As may be seen, the problem occurs in an example which doesn't use {{refn}} at all. --Redrose64 (talk) 13:17, 23 May 2015 (UTC)[reply]
The following nested references have fallen out the bottom of the original reflist from Redrose64's example above. The blank first one is named ref "qpn", the first actual ref, and could probably be glossed over as "Queensland Place Ref 43018" or just "the Oxley ref above".   — Jeff G. ツ (talk) 04:44, 26 May 2015 (UTC)[reply]

References

The meaning of the refs is immaterial. The intention was to use a real-world, non-sandbox example, viz. Oxley, Queensland that had already been mentioned in this discussion (at 08:14, 23 May 2015) and demonstrate that the same problem occurs without the use of {{refn}}, thus removing that template from the list of suspects. --Redrose64 (talk) 10:06, 26 May 2015 (UTC)[reply]
  • Coming to report the same issue of refn refs being relegated to the bottom of the page at Fez (video game) and Albany Free School. These articles were fine the last time they were touched and the only refs in the articles affected are the ones within {{refn}}. Where was this processing change made and whom should we contact? – czar 18:18, 24 May 2015 (UTC)[reply]
@Redrose64, re: sfn, my issue in Albany Free School is that I want the footnote to appear in {{reflist}} alongside the other notes rather than needing a separate {{notelist}} with lower-alpha. Up until very recently, this was {{refn}}'s normal function... The template is designed to support nested {{sfn}} or <ref> refs, or we'd otherwise just use {{efn}}. One of {{refn}}'s constituent functions must have changed recently and that change should be reverted. Can you help us trace back the change? – czar 18:25, 24 May 2015 (UTC)[reply]
I already did trace it as far as I can, see my post of 13:17, 23 May 2015. {{#tag:ref|...}}, which is common to {{efn}}, {{refn}} and {{sfn}}, is as deep as I can go. The change must be in that or the code which underlies it, none of which is accessible to me. --Redrose64 (talk) 18:47, 24 May 2015 (UTC)[reply]
Here is another example using {{reflist|group=n}}:
... [[Australia]].<ref name=qpn>{{cite QPN|43018|Oxley (suburb)|accessdate=27 July 2014}}</ref> It is located approximately {{convert|10.8|km|mi}} from the [[Brisbane central business district|Brisbane CBD]].{{#tag:ref|Distance calculated based on coordinates given in <ref name=qpn/> and <ref>{{cite QPN|46580|Brisbane City (suburb)|accessdate=27 July 2014}}</ref>|group=n}}
:::::'''Notes'''
{{reflist|group=n}}
:::::'''References'''
{{reflist|30em}}
which gives ... Australia.[1] It is located approximately 10.8 kilometres (6.7 mi) from the Brisbane CBD.[n 1]
Notes
  1. ^ Distance calculated based on coordinates given in [1] and [2]
References
  1. ^ a b "Oxley (suburb) (entry 43018)". Queensland Place Names. Queensland Government. Retrieved 27 July 2014.
  2. ^ "Brisbane City (suburb) (entry 46580)". Queensland Place Names. Queensland Government. Retrieved 27 July 2014.
As may be seen, the problem does not occur in a similar example (which also doesn't use {{refn}} at all), but instead of actual nesting uses a group so as to not look bad and is used in the current edition of the affected page.   — Jeff G. ツ (talk) 05:28, 26 May 2015 (UTC)[reply]
@Jeff G.: I think you're misinterpreting the problem. The {{refn}} template is merely a wrapper for {{#tag:ref|...}} and has not itself changed. It seems that until recently, it was possible to nest <ref>...</ref> inside {{#tag:ref|...}} with no group name being specified on either of them, and have them displayed in the same {{reflist}}. That behaviour has apparently changed, and it is now necessary to specify a group on one or the other, requiring two {{reflist}}. If only one is given, the "inner" refs fall out the bottom of the page, apparently they didn't do that until a few days ago. --Redrose64 (talk) 09:59, 26 May 2015 (UTC)[reply]
Yeah, I'd say it's clear now that the bug is in MediaWiki rather than the template. Tarchon (talk) 18:26, 26 May 2015 (UTC)[reply]

Reported bug at phabricator:T100477 – czar 23:59, 26 May 2015 (UTC)[reply]

Probably related to the resolution of T22707. This patch was applied with mw:MediaWiki 1.26/wmf6 but is not on the change list. -- Gadget850 talk 22:38, 27 May 2015 (UTC)[reply]
@Jackmcbarn, FYI – czar 23:33, 27 May 2015 (UTC)[reply]
I already know. In fact, I already submitted a patch (currently awaiting review) that will fix it. It's attached to the Phab ticket. Jackmcbarn (talk) 00:53, 28 May 2015 (UTC)[reply]
There is now a how-to page explaining how nesting can & cannot be achieved with the present software. When the bug is resolved - and there is currently no sign of movement - that page will need to be reviewed. However, I think there is anyway a place for a full helpsheet on the topic: Noyster (talk), 18:22, 7 June 2015 (UTC)[reply]
It seems to be fixed now.Tarchon (talk) 06:18, 7 July 2015 (UTC)[reply]
Yes and no. You can now have your note and subnote both in the same defined group or in no defined group. However, certain cases using <ref> tags that used to render correctly now show a cite error message: you can see examples at this help page, which I need to devote some time to revising: Noyster (talk), 10:08, 7 July 2015 (UTC)[reply]

Introduction of Cite errors

[edit]

Hi. I am having a problem with refn appearing to add Cite errors, perhaps due to an underlying bug. Please see User talk:AnomieBOT/Archive 7#Introduction of Cite errors for details. Thank you.   — Jeff G. ツ (talk) 02:43, 26 May 2015 (UTC)[reply]

Numbering of refs and refns

[edit]

Hi, Am I correct in thinking that there are Technical Limitations™ to do with the order in which the Refn and its <ref>s are parsed? My vaguely tidy mind complains at the first ref in an article not being number [1].[4] I don't imagine there is a way to get round this sort of thing, not that it matters much. >MinorProphet (talk) 03:31, 19 November 2016 (UTC)[reply]

References

  1. ^ Should be ref 2
  2. ^ Should be ref 3
  3. ^ Should be ref 4
  4. ^ A sentence fragment.[1] Another fragment.[2] And another.[3] But I would prefer this one to be ref 1.
@MinorProphet:Yes, if a subnote (or sub-reference) appears in the same list as the footnote in which it is nested, the subnote will appear above the main note that refers to it. You can get the footnotes in the desired order by using separate "groups" each linked to its own list. Two possible formats are shown here: Noyster (talk), 09:10, 19 November 2016 (UTC)[reply]
It's nothing to do with {{refn}} (or any other template), it's inherent to the cite.php extension - that's the part of the MediaWiki software that recognises <ref>...</ref> and <references />, builds the ref list at the bottom, and puts the superscripted links like [1] into the page text. Nothing that we can do about it here. --Redrose64 (talk) 09:30, 19 November 2016 (UTC)[reply]
Thank you both for your prompt and helpful replies confirming what I thought. Just one of those things, then... >MinorProphet (talk) 12:31, 19 November 2016 (UTC)[reply]

Documentation page for template refn-display parameters table

[edit]

Please see this talk page, to display parameters table again, by 2know4power (talk) 00:20, 16 February 2017 (UTC).[reply]

Fixed, I believe. Someone should check the error report (linked in the TemplateData section) to see if any of them are real errors that need to be fixed. – Jonesey95 (talk) 01:01, 16 February 2017 (UTC)[reply]

Parameter 1 (content)

[edit]

Per TemplateData, Parameter 1 (content) is not required when Template:Refn is used as a named ref, cf. <ref name="name" /> - 74.138.106.1 (talk) 13:37, 28 February 2018 (UTC)[reply]

Parameter 1 is the content of the note. It is required. Omitting it will produce an error, as shown in the Errors section of the documentation. – Jonesey95 (talk) 15:30, 28 February 2018 (UTC)[reply]
  • 1[1] : {{refn|1=1+1=2|name=one.plus.one.is.two}}
  • 2[1] : {{refn|name=one.plus.one.is.two}}
  1. ^ a b 1+1=2
Parameter 1 omitted in item 2 without error. - 74.138.106.1 (talk) 17:14, 28 February 2018 (UTC)[reply]
Right you are. I stand corrected. You are welcome to edit the Template Data. It is not protected, since it lives in the documentation. – Jonesey95 (talk) 21:21, 28 February 2018 (UTC)[reply]

Difficult to understand

[edit]

I find the instructions really arcane. That is, "difficult to understand." It's like coders talking to coders. Any chance you can get this page looked over by a copy editor who could help in making it sensible? Thanks! BeenAroundAWhile (talk) 19:06, 4 April 2018 (UTC)[reply]

Notes in 1987 Major League Baseball draft

[edit]

Does anyone know why the refn notes in 1987 Major League Baseball draft are not clickable? Therapyisgood (talk) 09:57, 28 April 2020 (UTC)[reply]

Is the template designed to be unclickable? I am noticing this in several articles that link here. Therapyisgood (talk) 10:04, 28 April 2020 (UTC)[reply]
If I click on any of the notes it takes me to the list at the bottom. I assume this is not happening for you? I am using Chrome on Windows. Spike 'em (talk) 10:20, 28 April 2020 (UTC)[reply]

Supported markup?

[edit]

Is not clear what wiki markup is permitted inside of {{refn}}. In particular, are tables supposed to work? Shmuel (Seymour J.) Metz Username:Chatul (talk) 23:46, 13 December 2020 (UTC)[reply]

Where are you trying to do this? --Redrose64 🌹 (talk) 21:30, 14 December 2020 (UTC)[reply]
@Redrose64: I'd like to put the table in IBM System/370#IBM 308x in a footnote. Shmuel (Seymour J.) Metz Username:Chatul (talk) 21:57, 14 December 2020 (UTC)[reply]
Which version did you try to do it in? --Redrose64 🌹 (talk) 22:53, 15 December 2020 (UTC)[reply]
This footnote
{{refn
|{| class="wikitable"
|-
! Number
! style="align:left;" | Name
|-
|
| BTAM/SP
|-
|
| GAM/SP
|-
| 5740-XC6
| MVS/System Product - JES2 Version 2
|-
| 5685-291
| MVS/System Product - JES3 Version 2 (5665-291)
|-
| 5665-293
| TSO Extensions (TSO/E) for MVS/XA
|-
| 5665-284
| MVS/Extended Architecture Data Facility Product Version 1<ref>{{cite manual
 |     title = MVS/Extended Architecture Data Facility Product: General Information
 |      date = January 1984
 |   edition = Third
 |       url = http://bitsavers.org/pdf/ibm/370/MVS_XA/DFP_Version_1/GC26-4007-2_MVS_XA_DFP_Release_1.2_General_Information_Jan1984.pdf
 | publisher = IBM
 }}
|}
}}
displays like this (commented out because it breaks the rest of the page – Jonesey95 (talk) 18:24, 18 October 2022 (UTC)) Shmuel (Seymour J.) Metz Username:Chatul (talk) 00:21, 16 December 2020 (UTC)[reply]
The table markup is being parsed as pipes within the {{refn}} template. You can hack your way around it if you insist, but it's ugly (and I don't know of a way to include references inside this reference). It looks like this (view the code to see the ugliness):[1]
I can't recommend it, but it appears to work. Consider putting the information into the article instead. – Jonesey95 (talk) 00:35, 16 December 2020 (UTC)[reply]
Thanks. I see what's happening, and I agree that the hack is ugly. I guess that I'll just leave the table inline. Shmuel (Seymour J.) Metz Username:Chatul (talk) 03:22, 16 December 2020 (UTC)[reply]
Now that I've seen it demonstrated, I realise that I answered virtually the same question elsewhere (possibly VPT) several months ago. In short: in the table start marker {|, the pipe is being treated as a parameter separator and so the { is being taken as a literal character. --Redrose64 🌹 (talk) 21:51, 17 December 2020 (UTC)[reply]

Notes

References

  1. ^
    Number Name
    BTAM/SP
    GAM/SP
    5740-XC6 MVS/System Product - JES2 Version 2
    5685-291 MVS/System Product - JES3 Version 2 (5665-291)
    5665-293 TSO Extensions (TSO/E) for MVS/XA
    5665-284 MVS/Extended Architecture Data Facility Product Version 1

Template-protected edit request on 11 July 2022

[edit]

Change the code of this template to add follow parameter, like mw:Help:Cite#Merging two texts into a single reference. I have tested it in Template:Refn/testcases.

<includeonly>{{#if:{{{follow|}}}|{{#tag:ref|{{{1|{{{refn|}}}}}}|group={{{group|}}}|follow={{{follow|}}}}}|{{#if:{{{name|}}}|{{#tag:ref|{{{1|{{{refn|}}}}}}|name={{{name|}}}|group={{{group|}}}}}|{{#tag:ref|{{{1|{{{refn|}}}}}}|group={{{group|}}}}}}}}}</includeonly><noinclude>{{documentation}}</noinclude>

Thingofme (talk) 14:12, 11 July 2022 (UTC)[reply]

 Done. Editor Thingofme, please update this template's documentation as needed. Thank you! P.I. Ellsworth , ed. put'r there 20:39, 19 July 2022 (UTC)[reply]

Reusing named references in notelist

[edit]

In 2022 ICC Men's T20 World Cup squads#Bangladesh (see this version), I've tried creating a set of footnotes using {{efn}} and {{notelist}}. The notes are defined in the notelist, and I'd like to use the same final reference for both entries (using a <ref name="ban2" /> tag, but if I add the to the second entry I get an error: Cite error: A list-defined reference with the name "ban2" has been invoked, but is not defined in the references tag (see the help page).. I copied to a sandbox, but don't get the same error there. Is there a way to do this (I've tried using a {{refn}} as the inner reference, but still gives an error)? Even with the error being shown, the refs display correctly.

The working is effectively:

  1. ^ a b c Soumya Sarkar swapped with Sabbir Rahman.[1]
  2. ^ a b Shoriful Islam also swapped with MS.[1]
Cite error: A list-defined reference with the name "ban2" has been invoked, but is not defined in the <references> tag (see the help page).

References

  1. ^ "Bangladesh Final Squad Submission for ICC Men's T20 World Cup Australia 2022". Bangladesh Cricket Board. Retrieved 14 October 2022.

Thanks Spike 'em (talk) 17:31, 18 October 2022 (UTC)[reply]

This keeps coming up on various talk pages, e.g. Template talk:Efn. In short: don't attempt to combine {{efn}} with WP:LDR. It never has worked properly, and there are several discussions on the matter. --Redrose64 🌹 (talk) 06:21, 22 October 2022 (UTC)[reply]
Ok, thanks. If I preview the page with the notes defined in-line it seems to display properly and without any warnings. I seem to be involved in a slow-moving edit war over the use of efn / notelist rather than manually created superscripts / notes so will try for real later. Spike 'em (talk) 13:24, 27 October 2022 (UTC)[reply]

Embedding math tags into a reference notes

[edit]

I tried using this template today on page Electric dipole moment. That page has footnotes that contain both complex equations using <math></math> and also citations embedded in footnotes. When i did this I got a number of weird errors. Any thoughts on what i can do here? Mblumber (talk) 20:57, 20 December 2022 (UTC)[reply]

@Mblumber: What weird errors would those be? --Redrose64 🌹 (talk) 22:15, 20 December 2022 (UTC)[reply]
@Redrose64:I put the code here, let me know what you think. Mblumber (talk) 01:05, 21 December 2022 (UTC)[reply]
The problem is nothing to do with the <math>, it's that in the non-math part you have an unescaped = in the unnamed parameter, so it gets interpreted as a parameter with a strangely long and complex name instead. You could escape it with {{=}} or name the parameter as |1= or |refn=. Anomie 12:23, 21 December 2022 (UTC)[reply]
@Anomie:Yep, those solutions all fix it. thanks. Mblumber (talk) 23:14, 22 December 2022 (UTC)[reply]