<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.statsape.com/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E6%9D%BF%3ASfnRef%2Fdoc</id>
	<title>模板:SfnRef/doc - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.statsape.com/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E6%9D%BF%3ASfnRef%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.statsape.com/index.php?title=%E6%A8%A1%E6%9D%BF:SfnRef/doc&amp;action=history"/>
	<updated>2026-11-10T14:40:05Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.statsape.com/index.php?title=%E6%A8%A1%E6%9D%BF:SfnRef/doc&amp;diff=4728&amp;oldid=prev</id>
		<title>Zeroclanzhang：​创建页面，内容为“{{Documentation subpage}} {{High-use}} {{Template shortcut|sfnref|harvid}} {{Lua|Module:Footnotes}} &lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&gt;  Generate an identifier suitable as an anchor for a Harvard citation. This template, which can be used with either the name {{tlc|SfnRef}} or the alias {{tlc|harvid}}, is intended to be paired with Harvard citation templates…”</title>
		<link rel="alternate" type="text/html" href="https://wiki.statsape.com/index.php?title=%E6%A8%A1%E6%9D%BF:SfnRef/doc&amp;diff=4728&amp;oldid=prev"/>
		<updated>2024-01-17T07:58:28Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“{{Documentation subpage}} {{High-use}} {{Template shortcut|sfnref|harvid}} {{Lua|Module:Footnotes}} &amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&amp;gt;  Generate an identifier suitable as an &lt;a href=&quot;/%E6%A8%A1%E6%9D%BF:Citation/doc#Anchors_for_Harvard_referencing_templates&quot; title=&quot;模板:Citation/doc&quot;&gt;anchor for a Harvard citation&lt;/a&gt;. This template, which can be used with either the name {{tlc|SfnRef}} or the alias {{tlc|harvid}}, is intended to be paired with Harvard citation templates…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
{{High-use}}&lt;br /&gt;
{{Template shortcut|sfnref|harvid}}&lt;br /&gt;
{{Lua|Module:Footnotes}}&lt;br /&gt;
&amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generate an identifier suitable as an [[Template:Citation/doc#Anchors for Harvard referencing templates|anchor for a Harvard citation]]. This template, which can be used with either the name {{tlc|SfnRef}} or the alias {{tlc|harvid}}, is intended to be paired with Harvard citation templates such as {{tlx|Sfnp}}, {{tlx|Sfn}}, {{tlx|Harvp}}, and {{tlx|Harvnb}}. This template uses the same arguments as the other citation templates. As explained below, this template is needed only in some cases when the Harvard citation templates are used.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
{{block indent|1=&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;SfnRef{{!}}{{var|Surname of author}}{{!}}&amp;#039;&amp;#039;Year&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;SfnRef{{!}}{{var|Surname of author 1}}{{!}}{{var|Surname of author 2}}{{!}}{{var|Surname of author 3}}{{!}}{{var|Surname of author 4}}{{!}}&amp;#039;&amp;#039;Year&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first parameter is the first author&amp;#039;s last name. Up to four authors can be given as parameters; if there are more than four authors, list only the first four. The last parameter is the year of publication, possibly with a letter suffixed to avoid ambiguity if there are multiple citations by the same set of authors in the same year.&lt;br /&gt;
&lt;br /&gt;
All named parameters such as {{para|p}} are ignored.&lt;br /&gt;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
This template creates the proper value for the {{para|ref}} parameter of [[Help:Citation Style 1|Citation Style 1]] templates ({{tlx|Cite journal}}, {{tlx|Cite book}}, {{tlx|Citation}}) and the generic [[Help:Citation Style 2|Citation Style 2]] template {{tlx|Citation}} (as well as {{tlx|Vcite journal}}, {{tlx|Vcite journal}}, {{tlx|Vcite book}} and other templates that generate [[Vancouver system]] references). It is intended to be paired with {{tlx|Sfnp}}, {{tlx|Sfn}}, {{tlx|Harvp}}, {{tlx|Harvnb}}, and related templates, and uses the same arguments. As explained below, {{tnull|SfnRef}} is only necessary in a subset of the cases where those are used.&lt;br /&gt;
&lt;br /&gt;
{{tlc|Sfnp}} and its variants create a short footnote that is linked to a full footnote. The templates create the link automatically, but the full footnote must be assigned the proper ID value to be a valid target for that link. This usually happens automatically using the full-citation template&amp;#039;s author/editor and date/year parameters, but some cases need a custom anchor, and that is what {{tnull|SfnRef}} is for.&lt;br /&gt;
&lt;br /&gt;
When using the Citation Style 1 and 2 family of citation templates, a default ID is generated from the last names of the first four authors (or editors if there are no authors specified). However, if none of {{para|last}}, {{para|editor-last}}, or their equivalents are present, use {{tlc|SfnRef}} inside the CS1/CS2 template&amp;#039;s {{para|ref}} parameter to create a link anchor (perhaps using the publisher name or work title or an abbreviation thereof) without having to know the rules for how {{tlc|Sfnp}}, etc., interpret the anchor ID string which is normally auto-generated.&lt;br /&gt;
&lt;br /&gt;
The {{tl|Vcite journal}} etc. templates (with &amp;lt;code&amp;gt;Vcite&amp;lt;/code&amp;gt;, not &amp;lt;code&amp;gt;Cite&amp;lt;/code&amp;gt; names) {{em|require}} the use of {{tlc|SfnRef}} to work with {{tnull|Sfn}}, {{tnull|Harvnb}}, and related templates.&lt;br /&gt;
&lt;br /&gt;
{{Strong|Consistent output:}} For use with CS1/CS2 templates, {{tlx|Sfnp}} and its {{tlx|Harvp}} companion produce the most [[WP:CITESTYLE|consistent citation formatting]].  For use with Vancouver citation templates (and any other citation styles that do not put dates in parentheses/round-brackets), the matching short-footnote templates are {{tlx|Sfn}} and {{tlx|Harvnb}}.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;With the shortened footnote template&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
When citing an article published in the December 2004 edition of &amp;#039;&amp;#039;Rolling Stone&amp;#039;&amp;#039; where the author is unknown, you might create a short footnote as follows:&lt;br /&gt;
&lt;br /&gt;
{{block indent|1=&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Sfn|Rolling Stone|2004}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
{{para|ref|harv}} will not work in this case because &amp;quot;Rolling Stone&amp;quot; is not the name of the author. You may code the value for the {{para|ref}} parameter manually, or you can use {{tlc|SfnRef}} and specify the same parameters as used with {{tlc|Sfn}}:&lt;br /&gt;
&lt;br /&gt;
{{block indent|1=&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{SfnRef|Rolling Stone|2004}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The full footnote:&lt;br /&gt;
&lt;br /&gt;
{{block indent|1=&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Cite news |work=[[Rolling Stone]] |title=The RS 500 Greatest Songs of All Time |ref={{SfnRef|Rolling Stone|2004}} |date=December 2004}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
You can copy and paste the {{tlc|Sfn}} template code and change the name of the template from &amp;quot;Sfn&amp;quot; to &amp;quot;SfnRef&amp;quot;. If your short footnote includes page numbers such as {{tlc|Sfn|Rolling&amp;amp;nbsp;Stone|2004|p{{=}}48}}, you can copy and paste it to create {{tlc|SfnRef|Rolling&amp;amp;nbsp;Stone|2004|p{{=}}48}}; the {{para|p|48}} parameter is not necessary but will do no harm.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;With other Harvard templates&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For example, a &amp;#039;&amp;#039;References&amp;#039;&amp;#039; section might contain the following markup:&lt;br /&gt;
&lt;br /&gt;
{{block indent|1=&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;[[Template:Vcite journal|Vcite journal]]&amp;lt;nowiki&amp;gt; |author=Peh WC, Ng KH |title=Preparing the references |journal=Singapore Medical Journal |volume=50 |issue=7 |pages=659–661 |date=2009 |pmid=19644619 |url=http://smj.sma.org.sg/5007/5007emw1.pdf |format=PDF |ref={{SfnRef|Peh|Ng|2009}} }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
This markup uses &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{SfnRef|Peh|Ng|2009}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to generate the anchor identifier &amp;quot;{{SfnRef|Peh|Ng|2009}}&amp;quot;, used internally to link Harvard references to citations. (This identifier is not visible to the article&amp;#039;s reader.) The generated citation looks like this:&lt;br /&gt;
&lt;br /&gt;
{{block indent|1={{Vcite journal |author=Peh WC, Ng KH |title=Preparing the references |journal=Singapore Medical Journal |volume=50 |issue=7 |pages=659–661 |date=2009 |pmid=19644619 |url=http://smj.sma.org.sg/5007/5007emw1.pdf |format=PDF |ref={{SfnRef|Peh|Ng|2009}} }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Deprecated inline use==&lt;br /&gt;
Running text can link to this citation with markup like the following:&lt;br /&gt;
: {{tlx|harv|Peh|Ng|2009}}&lt;br /&gt;
which generates the following:&lt;br /&gt;
: {{harv|Peh|Ng|2009}}&lt;br /&gt;
To see how it works, click on the &amp;quot;{{harv|Peh|Ng|2009}}&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
{{Strong|Note:}} Use of inline parenthetical referencing of that sort within articles has been [[WP:PARENTHETICAL|deprecated by the Wikipedia community]] since 2022. This usage has not been deprecated within internal pages such as Wikipedia documentation, user pages, or wikiprojects, though there is rarely a practical use for it instead of just using normal [[Help:Footnotes|citation footnotes]].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{tlx|sfnref inline}} – a {{tag|span|o}}-based version for use with manually formatted, non-templated citations&lt;br /&gt;
* {{tlx|citeref}} – a wrapper for {{tnull|SfnRef}} to create wikilinks with either superscript &amp;lt;sup&amp;gt;[n]&amp;lt;/sup&amp;gt; or plain-text labels to other citations from inside a citation&lt;br /&gt;
&lt;br /&gt;
{{Wikipedia referencing}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
[[Category:Author–date citation templates]]&lt;br /&gt;
[[Category:Footnote templates]]&lt;br /&gt;
&lt;br /&gt;
[[bn:টেমপ্লেট:SfnRef]]&lt;br /&gt;
[[ja:Template:SfnRef]]&lt;br /&gt;
[[sl:Template:SfnRef]]&lt;br /&gt;
[[simple:Template:SfnRef]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zeroclanzhang</name></author>
	</entry>
</feed>