Open main menu
Home
Random
Recent changes
Special pages
Community portal
Settings
About Stop Synthetic Filth! wiki
Disclaimers
Stop Synthetic Filth! wiki
Search
User menu
Talk
Contributions
Log in
Editing
Template:Citation/doc
(section)
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!
==Anchored citations== This template can generate a citation that can be combined with [[WP:CITESHORT|shortened footnotes]] or [[Wikipedia:Parenthetical referencing|parenthetical referencing]]. It does this by creating an [[HTML element#Anchor|HTML anchor]] containing an ID. The special parameter {{para|ref|harv}} generates an ID suitable for [[Harvard referencing]] templates such as {{tl|harv}} as specified in the next section; this is the default for the {{tl|citation}} template. To disable anchor generation, specify {{para|ref|none}}. You can also specify the ID directly, using the {{para|ref|<var>ID</var>}} parameter. For example, suppose an article's ''References'' section contains the markup: * <code><nowiki>{{Citation |author=Sigmund Freud |title=Civilization and Its Discontents |date=1930 |ref=CivDis}}</nowiki></code> which generates the citation: * {{Citation |author=Sigmund Freud |title=Civilization and Its Discontents |date=1930 |ref=CivDis}} Then, the markup "<code><nowiki>([[#CivDis|Freud 1930]])</nowiki></code>" generates a parenthetical reference "([[#CivDis|Freud 1930]])" containing a wikilink to the citation (try clicking on the wikilink). ===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 |date=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 |date=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. 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 |date=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. <!-- This paragraph appears to be outdated and probably needs to be updated to reflect current CS1/CS2 functionality: -->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 most 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}}. ===IDs must be unique=== Names, years, and hand-specified IDs must be chosen so that the IDs are unique within a page; otherwise the HTML will not conform to the W3C standards, and any references to the citations will not work reliably. For example, suppose a page contains the following two citations with {{tl|harv}}-compatible IDs: * {{Citation |last1=Montes |first1=G. |last2=Halterman |first2=J. S. |date=2008a |journal=Pediatrics |volume=121 |issue=4 |pages=e821βe826 |title=Association of Childhood Autism Spectrum Disorders and Loss of Family Income |doi=10.1542/peds.2007-1594 |pmid=18381511 |url=http://pediatrics.aappublications.org/cgi/content/full/121/4/e821}} * {{Citation |last1=Montes |first1=G. |last2=Halterman |first2=J. S. |date=2008b |journal=Pediatrics |volume=122 |issue=1 |pages=e202βe208 |title=Child Care Problems and Employment Among Families with Preschool-aged Children with Autism in the United States |doi=10.1542/peds.2007-3037 |pmid=18595965 |url=http://pediatrics.aappublications.org/cgi/content/full/122/1/e202}} If these citations were altered to say "2008" rather than "2008a" and "2008b", the resulting page would not work, because the two different citations would both attempt to use the ID "<code>CITEREFMontesHalterman2008</code>". To avoid this problem, distinguish the citations by appending suffixes to the years, e.g. "{{para|date|2008a}}" and "{{para|date|2008b}}", as was done above. Any Harvard references to these citations should use years with the same suffixes. It is good practice to verify that a page does not contain duplicate IDs by using the [[W3C Markup Validation Service]]; see ''[[#External links|External links]]''.
Summary:
Please note that all contributions to Stop Synthetic Filth! wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
SSF:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, 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.
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:
Cancel
Editing help
(opens in new window)