Template talk:Sfnlink

(Redirected from Template talk:Sfnlink/sandbox)
Latest comment: 7 months ago by Mathglot in topic Parenthetical citation

Default text param

edit

We should probably default param |text= to author (1..4) plus year, maybe in parentheses, as for one of the harv templates, followed by the page number, maybe in a new |p= or |pp= parameter. This would be backwards compatible. Specifying a value for it would override the default. Mathglot (talk) 10:01, 9 November 2023 (UTC)Reply

  Done. Mathglot (talk) 18:27, 10 November 2023 (UTC)Reply

Loc

edit

Param |loc= needed for eBooks and similar. Mathglot (talk) 21:45, 10 November 2023 (UTC)Reply

  Done. Mathglot (talk) 20:17, 13 November 2023 (UTC)Reply

Improve error message

edit

The error message for unsupported lang codes is ugly because it's embedded in a non-working link:

  • {{sfnlink|Klaaß|2009|lang=de|article=Salzburg|p=38}}
    [[:de:Salzburg#ERROR: de-wiki does not support sfn linkageKlaaß2009|Klaaß (2009)]] p. 38

(Output from rev. 1185961660 copied from result of Special:ExpandTemplates in lieu of subst.) This should be improved to display a clean error message and not a borken link if the lang code is not valid. Mathglot (talk) 04:56, 20 November 2023 (UTC)Reply

Title

edit

Thinking about swapping the title and redirect, so that Sfnlink becomes one of the redirects and Citelink the title. Mathglot (talk) 23:03, 23 November 2023 (UTC)Reply

Wrapper needed

edit

Reminder to create wrapper {{sfnlinknb}} to add |nb=y and all other params pass through. Mathglot (talk) 07:12, 2 December 2023 (UTC)Reply

  Done. Mathglot (talk) 22:40, 3 December 2023 (UTC)Reply

Parenthetical citation

edit

When used as a workaround for T22707 in list-defined explanatory notes, {{Sfnlink}} at present produces a parenthetical citation that looks like "Courcelles (1823) p. 403", as tested on the article Philippe, Duke of Vendôme, 3rd and 4th explanatory footnotes. However, the example in HELP:Shortened footnotes shows "(Mahler 2005, p23)", which separates the citation better from the text. The present format looks bad when the citation is not at the end of the explanatory note but between two sentences or even after one particlular word in the middle of a sentence, placed there for reasons of WP:INTEGRITY. Best regards Johannes Schade (talk) 21:02, 10 March 2024 (UTC)Reply

Not quite sure if this is a general comment on style, a question about how to use the template in a given situation, or a request for a change to functionality. If a how-to-use question, have you considered using either |nb=yes to suppress parentheses, or |text=Any string here to emit exactly the format you wish to have, if the default doesn't work in your situation? If not, can you elaborate? Mathglot (talk) 04:52, 11 March 2024 (UTC)Reply
Dear Mathglot, you guessed right and gave me what I needed: the parameter |nb=, which I did not find in the documentation because it appears in Example 4 (section Examples) but not in the list of parameters (section Parameters) above the examples. Now I can produce parenthetical citations like "(Courcelles 1823 p. 403)", but should there not be a comma between the year and the page in parenthetical citations, thus: (Courcelles 1823, p. 403). Could you please add the comma?. With many thanks, Johannes Schade (talk) 08:44, 12 March 2024 (UTC)Reply
It looks like |nb= got left out of the parameters documentation; I'm stretched kinda thin, but will try to remember to add it. But feel free to do so yourself, if you wish. Mathglot (talk) 09:22, 12 March 2024 (UTC)Reply
Fixed! The description of the parameter was for some reason surrounded with <noinclude>...</noinclude>, so I removed these tags. Thank you for allowing me to touch this. Johannes Schade (talk) 11:24, 12 March 2024 (UTC)Reply
Johannes, thanks. You certainly don't need to ask me for permission. By the way, can you have one more look? Now it's in there twice. I think the top one is better than the bottom one, but whatever you think works best. Mathglot (talk) 03:37, 13 March 2024 (UTC)Reply