Editing
Template:Citation/doc
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Anchors for Harvard referencing templates=== IDs compatible with Harvard referencing templates such as {{tl|harv}} are computed from the last names of the authors (or editors, if no authors are given) and the year of the cited source. For example, the markup "<code><nowiki>{{harv|Wright|Evans|1851|p=ix}}</nowiki></code>" generates the Harvard reference "{{harv|Wright|Evans|1851|p=ix}}", which wikilinks to the citation whose markup and appearance are shown below: * <code><nowiki>{{Citation |last1=Wright |first1=Thomas |last2=Evans |first2=R. H. |title=Historical and Descriptive Account of the Caricatures of James Gillray |location=London |publisher=Henry G. Bohn |year=1851 |oclc=59510372}}</nowiki></code> * {{Citation |last1=Wright |first1=Thomas |last2=Evans |first2=R. H. |title=Historical and Descriptive Account of the Caricatures of James Gillray |location=London |publisher=Henry G. Bohn |year=1851 |oclc=59510372}} In this example the {{tl|citation}} template defines, and the {{tl|harv}} template uses, the HTML ID "<code>CITEREFWrightEvans1851</code>", composed by concatenating the string "<code>CITEREF</code>" with the last names of the authors and the year. The {{tl|harvid}} template can be used to generate such IDs, for example, <code><nowiki>{{harvid|Wright|Evans|1851}}</nowiki></code> generates "<code>{{harvid|Wright|Evans|1851}}</code>". Related methods which leave only a number in the text are to use the {{tl|harvnb}} template enclosed in the <nowiki><ref></ref></nowiki> html code, or to use the {{tl|sfn}} template alone. The example above would be <code><nowiki><ref>{{harvnb|Wright|Evans|1851|p=ix}}</ref></nowiki></code> or <code><nowiki>{{sfn|Wright|Evans|1851|p=ix}}</nowiki></code> both of which generate a footnote, such as :17. {{harvnb|Wright|Evans|1851|p=ix}} The names of only the first four authors are used; other author names are not concatenated to the ID. If no author names are given, editor names are used instead. For [[#Citing patents|patents]], inventor names are used instead of authors or editors. If these names are not given, this template does not generate an anchor. Last names are used, as specified by the parameters {{para|last1}} (or {{para|last}}), {{para|last2}}, {{para|last3}}, and {{para|last4}}, and similarly for {{para|editor1-last}} etc. and for {{para|inventor1-last}} etc. If a full name is given but no last name is specified, this template falls back on the full name, but this usage is not recommended. For example, in "<code><nowiki>{{Citation | author = Sigmund Freud | title = The Ego and the Id | year = 1923}}</nowiki></code>" no last name is given, so this citation cannot be combined with the Harvard reference "<code><nowiki>{{harv|Freud|1923}}</nowiki></code>". To make these {{tl|citation}} and {{tl|harv}} invocations compatible, either replace "{{para|author|Sigmund Freud}}" with "{{para|first|Sigmund}} {{para|last|Freud}}", or add "{{para|ref|<nowiki>{{harvid|Freud|1923}}</nowiki>}}" to the {{tl|citation}} invocation, or add the same ref parameter (say, "{{para|ref|EgoId}}") to both the {{tl|citation}} and the {{tl|harv}} invocations. Similarly, the year is used, as specified by {{para|year}}. If no year is given, this template attempts to derive the year from {{para|date}} (or, if no date is given, from {{para|publication-date}}) by applying the [[mw:Help:Extension:ParserFunctions##time|MediaWiki Β§ Time function]]. This heuristic works with many common date formats (American, International and [[ISO 8601#Calendar dates|ISO 8601 standard format]] YYYY-MM-DD as listed in [[WP:MOS]]), but may not work as expected with other formats, so when in doubt it may be safer to use {{para|year}}. Note that if only a year, say 2005, is known you must use {{para|year|2005}} rather than {{para|date|2005}}.
Summary:
Please note that all contributions to wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Template
Discussion
British English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information