This is a documentation subpage for Template:SfnRef inline. It may contain usage information, categories and other content that is not part of the original template page. |
This template uses Lua: |
{{SfnRef inline}}
is a variant of {{SfnRef}}
(a.k.a. {{harvid}}
) that works in manually written, non-templated citations. In most cases, this is expected to be used temporarily, in cases where an editor is not certain how to format the full citation data into a template, or does not have time to do it, or there is a dispute on the talk page about which citation format should be used, etc. In a handful of cases, however, there remain some articles with local consensus to use entirely manually formatted citations, to exactly mirror some off-site citation style. This rare, but technically permitted by the WP:CITESTYLE guideline.
This template provides a link anchor to work with the shortened-footnote templates {{sfnp}}
, {{harvp}}
(and their Vancouver-citation-style equivalents {{sfn}}
and {{harvnb}}
). Until this template, there was no easy way to cite the same manually-cited source multiple times at different pages in such an article, using short citations that link to the full citation, and auto-combining duplicate cite to the same page into a single short cite. (It was technically possible, but required manually creating an anchor point with a complicated CITEREF...
ID that matched the input expected by a template like {{sfnp}}
or {{harvp}}
.)
What the original {{SfnRef}}
does is just generate a CITEREF...
anchor string using author and year data, and pass this to the |ref=
parameter of a CS1 ({{Cite book}}
, {{Cite journal}}
, etc.) or CS2 ({{Citation}}
) template, which then generates the necessary anchor.
What {{SfnRef inline}}
does is create an invisible-to-the-reader anchor using the same CITEREF...
ID, in a span: <span class="anchor" id="CITEREF..."></span>
This is equivalent to manually doing {{Anchor|CITEREF...}}
, except of course that you don't have to manually figure out the CITEREF...
ID.