Jump to content

Template:Harvard citation documentation: Difference between revisions

no edit summary
(Created page with "{{tl1|{{{1}}}}} is designed to be used to create {{sfnote|lc=y}}, a citation style which pairs a short, author-date citation in a footnote with a complete citation in the references section at the end of the article (see example below). This citation style is used to reduce clutter in the edit window and to combine multiple citations to the same source. Common problems and known workarounds are given in the section #Possible issues|possible i...")
Tags: Mobile edit Mobile web edit
 
No edit summary
 
Line 188: Line 188:
If a specific link to the page or section is available, a [[Uniform Resource Locator|URL]] can be added to the location or page number.
If a specific link to the page or section is available, a [[Uniform Resource Locator|URL]] can be added to the location or page number.
{{markup
{{markup
|<nowiki>{{harv|Smith|2011|loc=[https://en.wikipedia.org chpt. 3]}}</nowiki>
|<nowiki>{{harv|Smith|2011|loc=[https://en.bharatpedia.org chpt. 3]}}</nowiki>
|{{harv|Smith|2011|loc=[https://en.wikipedia.org chpt. 3]}}
|{{harv|Smith|2011|loc=[https://en.bharatpedia.org chpt. 3]}}
|<nowiki>{{harv|Smith|2011|loc=[https://en.wikipedia.org &amp;sect;7]}}</nowiki>
|<nowiki>{{harv|Smith|2011|loc=[https://en.bharatpedia.org &amp;sect;7]}}</nowiki>
|{{harv|Smith|2011|loc=[https://en.wikipedia.org §7]}}
|{{harv|Smith|2011|loc=[https://en.bharatpedia.org §7]}}
|<syntaxhighlight lang="wikitext">Article text.{{sfn|Smith|2011|p=[https://en.wikipedia.org 3]}}
|<syntaxhighlight lang="wikitext">Article text.{{sfn|Smith|2011|p=[https://en.bharatpedia.org 3]}}


==Notes==
==Notes==
Line 201: Line 201:
other book }}</syntaxhighlight>
other book }}</syntaxhighlight>
|{{Fake notes and references
|{{Fake notes and references
|Article text.{{sfn|Smith|2011|p=[https://en.wikipedia.org 3]}}
|Article text.{{sfn|Smith|2011|p=[https://en.bharatpedia.org 3]}}
|* {{cite book | last = Smith | date = 2011 | title = Smith's other book }}
|* {{cite book | last = Smith | date = 2011 | title = Smith's other book }}
}}}}
}}}}
Line 451: Line 451:


===No author name in citation template===
===No author name in citation template===
Some sources do not have a single author with a last name, such as a magazine article or a report from a government institution. There is no consensus (in Wikipedia or among citation styles) about how to format author–date citations for works that do not have a specific author. Several choices are:
Some sources do not have a single author with a last name, such as a magazine article or a report from a government institution. There is no consensus (in Bharatpedia or among citation styles) about how to format author–date citations for works that do not have a specific author. Several choices are:
# For a newspaper or periodical, you may use the name of the paper and the date.
# For a newspaper or periodical, you may use the name of the paper and the date.
# For a publication by an institution, use either:
# For a publication by an institution, use either:
Line 689: Line 689:
#### The citation does not have an author's, or an editor's, last name (authors take precedence over editors). '''Solution''': check that {{para|ref|{{tl|harvid|''args''}}}} is set correctly (see below).
#### The citation does not have an author's, or an editor's, last name (authors take precedence over editors). '''Solution''': check that {{para|ref|{{tl|harvid|''args''}}}} is set correctly (see below).
### The citation uses a [[Help:Citation Style Vancouver|Citation Style Vancouver]] template. '''Solution''': check that {{para|harvid}} is set correctly (see below).
### The citation uses a [[Help:Citation Style Vancouver|Citation Style Vancouver]] template. '''Solution''': check that {{para|harvid}} is set correctly (see below).
### The citation uses a template that does not support {{para|ref}} (See [[Wikipedia:Citation templates and reference anchors]]). '''Solution''': Consider modifying the template to support {{para|ref}}. Alternatively, an anchor can be created using <code><nowiki>{{wikicite|id={{harvid|</nowiki>''args''<nowiki>}}|reference={{</nowiki>''citation''<nowiki>}}}}</nowiki></code>.
### The citation uses a template that does not support {{para|ref}} (See [[Bharatpedia:Citation templates and reference anchors]]). '''Solution''': Consider modifying the template to support {{para|ref}}. Alternatively, an anchor can be created using <code><nowiki>{{wikicite|id={{harvid|</nowiki>''args''<nowiki>}}|reference={{</nowiki>''citation''<nowiki>}}}}</nowiki></code>.
### The full citation does not use a template:
### The full citation does not use a template:
#### It has no wikicode to create an anchor. '''Solution''': If {{cite *}} citation templates are used liberally throughout the article, then reformat the full citation with the appropriate {{cite *}} template (and set the {{para|ref}} appropriately, if necessary). Otherwise consult with local editors on the talk page about how to proceed. Either add {{cite *}} templates and {{tl2|harv}} templates, or remove all templates, depending on what local editors prefer. A few articles use {{tl2|wikicite}} to create an anchor as an alternative to standard templates.
#### It has no wikicode to create an anchor. '''Solution''': If {{cite *}} citation templates are used liberally throughout the article, then reformat the full citation with the appropriate {{cite *}} template (and set the {{para|ref}} appropriately, if necessary). Otherwise consult with local editors on the talk page about how to proceed. Either add {{cite *}} templates and {{tl2|harv}} templates, or remove all templates, depending on what local editors prefer. A few articles use {{tl2|wikicite}} to create an anchor as an alternative to standard templates.
Line 695: Line 695:
#### It uses {{tl2|wikicite}}. '''Solution''': Check that the text in {{para|id|{{tl|harvid|''args''}}}} matches the text in {{tl2|wikicite}}.
#### It uses {{tl2|wikicite}}. '''Solution''': Check that the text in {{para|id|{{tl|harvid|''args''}}}} matches the text in {{tl2|wikicite}}.
## If the Harvard citation uses a handwritten wikilink, such as <code><nowiki>[[#Reference-Smith2006|Smith (2006)]]</nowiki></code>:
## If the Harvard citation uses a handwritten wikilink, such as <code><nowiki>[[#Reference-Smith2006|Smith (2006)]]</nowiki></code>:
### The citation uses a citation template which supports {{para|ref}} (See [[Wikipedia:Citation templates and reference anchors]]). '''Solution''': Check that {{para|ref}} is set to a matching id.
### The citation uses a citation template which supports {{para|ref}} (See [[Bharatpedia:Citation templates and reference anchors]]). '''Solution''': Check that {{para|ref}} is set to a matching id.
### Otherwise, check that the reference has <code><nowiki>{{wikicite|ref=</nowiki>''id''<nowiki>|reference=</nowiki>''citation''<nowiki>}}</nowiki></code> with a matching id.
### Otherwise, check that the reference has <code><nowiki>{{wikicite|ref=</nowiki>''id''<nowiki>|reference=</nowiki>''citation''<nowiki>}}</nowiki></code> with a matching id.


Line 707: Line 707:
: <span style="color:#d73333; font-weight:bold; font-size:115%">A [[Help:Footnotes#WP:LDR|list-defined reference]] named "{{nobr|. . .}}" is not used in the content (see the [[Help:Cite errors/Cite error references missing key|help page]]).</span>
: <span style="color:#d73333; font-weight:bold; font-size:115%">A [[Help:Footnotes#WP:LDR|list-defined reference]] named "{{nobr|. . .}}" is not used in the content (see the [[Help:Cite errors/Cite error references missing key|help page]]).</span>
{{tracked|T22707}}
{{tracked|T22707}}
This is a false-positive: list-defined references [[Wikipedia:Nesting footnotes#5. List-defined references|do not work correctly when references are nested]]. It is due to a long-standing bug in mediawiki software (see [[phab:T22707]]).  
This is a false-positive: list-defined references [[Bharatpedia:Nesting footnotes#5. List-defined references|do not work correctly when references are nested]]. It is due to a long-standing bug in mediawiki software (see [[phab:T22707]]).  
A [[Template:Sfnlink#example-3|workaround]] is possible using {{tl|sfnlink}}.
A [[Template:Sfnlink#example-3|workaround]] is possible using {{tl|sfnlink}}.


Line 762: Line 762:
===Applications of these templates===
===Applications of these templates===
====Harvard citation: [[Template:harv|<code><nowiki>{{harv}}</nowiki></code>]]====
====Harvard citation: [[Template:harv|<code><nowiki>{{harv}}</nowiki></code>]]====
<!--{{see also|Wikipedia:Citing sources#Parenthetical referencing}}-->
<!--{{see also|Bharatpedia:Citing sources#Parenthetical referencing}}-->


Template {{tl2|harv}} creates a [[Wikipedia:Citing sources#Parenthetical referencing|parenthetical reference]] with a link to the full citation in the references section at the bottom of the article.
Template {{tl2|harv}} creates a [[Bharatpedia:Citing sources#Parenthetical referencing|parenthetical reference]] with a link to the full citation in the references section at the bottom of the article.


{{Markup
{{Markup
Line 790: Line 790:
{{anchor|Shortened footnote}}
{{anchor|Shortened footnote}}
====Shortened footnote: [[Template:sfn|<code><nowiki>{{sfn}}</nowiki></code>]] or [[Template:harvnb|<code><nowiki>{{harvnb}}</nowiki></code>]]====
====Shortened footnote: [[Template:sfn|<code><nowiki>{{sfn}}</nowiki></code>]] or [[Template:harvnb|<code><nowiki>{{harvnb}}</nowiki></code>]]====
{{see also|Wikipedia:Citing sources#Short citations|Help:Shortened footnotes}}
{{see also|Bharatpedia:Citing sources#Short citations|Help:Shortened footnotes}}


Template {{tl2|harvnb}} inside a {{tag|ref|o}} span can be used to create a [[Help:Shortened footnotes|shortened footnote]] that is linked to the full citation at the bottom of the article. Template {{tl2|sfn}} (without the use of {{tag|ref|o}}) has the same effect, automatically adds a period (full stop) after the page number, and combines identical footnotes automatically.
Template {{tl2|harvnb}} inside a {{tag|ref|o}} span can be used to create a [[Help:Shortened footnotes|shortened footnote]] that is linked to the full citation at the bottom of the article. Template {{tl2|sfn}} (without the use of {{tag|ref|o}}) has the same effect, automatically adds a period (full stop) after the page number, and combines identical footnotes automatically.
Line 848: Line 848:


====In text attribution: [[Template:harvtxt|<code><nowiki>{{harvtxt}}</nowiki></code>]]====
====In text attribution: [[Template:harvtxt|<code><nowiki>{{harvtxt}}</nowiki></code>]]====
{{see also|Wikipedia:Citing sources#In-text attribution}}
{{see also|Bharatpedia:Citing sources#In-text attribution}}


Template {{tl2|harvtxt}} can be used to link an [[Wikipedia:Citing sources#In-text attribution|in-text attribution]] to the full citation at the bottom of the page.
Template {{tl2|harvtxt}} can be used to link an [[Bharatpedia:Citing sources#In-text attribution|in-text attribution]] to the full citation at the bottom of the page.
{{markup
{{markup
|<nowiki>According to {{harvtxt|Smith|2009|p=25}} ...
|<nowiki>According to {{harvtxt|Smith|2009|p=25}} ...
Line 872: Line 872:


====Bundled citation: [[Template:harvnb|<code><nowiki>{{harvnb}}</nowiki></code>]] or [[Template:sfnm|<code><nowiki>{{sfnm}}</nowiki></code>]]====
====Bundled citation: [[Template:harvnb|<code><nowiki>{{harvnb}}</nowiki></code>]] or [[Template:sfnm|<code><nowiki>{{sfnm}}</nowiki></code>]]====
{{see also|Wikipedia:Citing sources#Bundling citations}}
{{see also|Bharatpedia:Citing sources#Bundling citations}}
Template {{tl2|harvnb}} can be used to [[WP:CITE#Bundling citations|bundle citations]]. {{tl2|sfnm}} also produces bundled citations.
Template {{tl2|harvnb}} can be used to [[WP:CITE#Bundling citations|bundle citations]]. {{tl2|sfnm}} also produces bundled citations.


Line 973: Line 973:


===Citation template [[HTML element#Links and anchors|anchor]]===
===Citation template [[HTML element#Links and anchors|anchor]]===
{{See also|Wikipedia:Citation templates and reference anchors}}
{{See also|Bharatpedia:Citation templates and reference anchors}}


The most common citation templates are {{cs1}} or {{cs2}}. By default, [[Module:Citation/CS1]] creates an [[HTML element#Links and anchors|anchor]] {{tag|a|o|params=name="CITEREF"}} followed by the concatenation of the following parameters:
The most common citation templates are {{cs1}} or {{cs2}}. By default, [[Module:Citation/CS1]] creates an [[HTML element#Links and anchors|anchor]] {{tag|a|o|params=name="CITEREF"}} followed by the concatenation of the following parameters:
Line 986: Line 986:
* '''date''', '''year'''
* '''date''', '''year'''


This covers the most common templates. Information about all of the templates is available at [[Wikipedia:Citation templates and reference anchors]].
This covers the most common templates. Information about all of the templates is available at [[Bharatpedia:Citation templates and reference anchors]].


Use of the '''date''' parameter in place of the '''year''' parameter in citation templates is preferred.
Use of the '''date''' parameter in place of the '''year''' parameter in citation templates is preferred.
Line 1,015: Line 1,015:
The call to {{tl2|harvnb}} has been [[subst]]'ed for quicker load times.
The call to {{tl2|harvnb}} has been [[subst]]'ed for quicker load times.


{{Wikipedia referencing}}
{{Bharatpedia referencing}}


==Tracking categories==
==Tracking categories==
Autopatrolled, New page reviewers, Rollbackers
2,168

edits