Difference between revisions of "Template:Wikicite"

From blackwiki
Jump to navigation Jump to search
test>SMcCandlish
m (Cat. fix.)
test>Ms2ger
(move documentation to subpage; -style="font-style:normal;": see Common.css)
Line 1: Line 1:
<cite id="Reference-{{{id}}}" style="font-style:normal;">{{{reference}}}</cite><noinclude>
+
<cite id="Reference-{{{id}}}">{{{reference}}}</cite><noinclude>{{Template doc}}</noinclude>
 
 
----
 
'''Template:wikicite''' makes a simple reference, for use in a "References" section for books, journals, web references, etc.  The reference text is formatted manually, and the template merely adds an anchor for linking from in-text citations, and wraps everything in an HTML &lt;cite> element. 
 
 
 
Cut-’n’-paste:
 
 
 
{| style="font-family:Courier; background-color:ghostwhite; border: 1px dashed blue; width:100%;  padding-left:.75em; "
 
|
 
<nowiki>{{wikicite | id= | reference= }}</nowiki>
 
|}
 
 
 
The "id" is a unique identifier used for the reference link on the page, compatible with some other reference templates (100% compatible with {{tl|wikiref}}, if you use the format ''Author-2006''; use an underscore for a space: ''Von_Autor-2006'').  The "reference" is the full text of a reference, including links.  The reference is formatted through ''editing wikitext''.  Recommended format:
 
 
 
{| style="font-family:Courier; background-color:ghostwhite; border: 1px dashed blue; width:100%; padding-left:.75em; "
 
|
 
<nowiki>* {{wikicite | id= Atwood-2003 | reference= Atwood, Margaret (2003). ''Oryx and Crake'', Toronto: McClelland & Stewart. ISBN 0-77100-868-6. }}</nowiki>
 
|}
 
 
 
Result:
 
 
 
* {{wikicite | id= Atwood-2003 | reference= Atwood, Margaret (2003). ''Oryx and Crake'', Toronto: McClelland & Stewart. ISBN 0-77100-868-6. }}
 
 
 
Resulting code:
 
 
 
{| style="font-family:Courier; background-color:ghostwhite; border: 1px dashed blue; width:100%; padding-left:.75em; "
 
|
 
<nowiki><li><cite id="Reference-Atwood-2003" style="font-style:normal;">Atwood, Margaret (2003). <i>Oryx and Crake</i>, Toronto: McClelland &amp; Stewart. <a href="/w/index.php?title=Special:Booksources&amp;isbn=0771008686" class="internal">ISBN 0-77100-868-6</a>.</cite></li></nowiki>
 
|}
 
 
 
 
 
This includes the HTML <code><nowiki><cite id="Reference-Atwood-2003"></nowiki></code>, allowing you to link to the citation in your article's text with, for example
 
<code><nowiki>[[#Reference-Atwood-2003 |(Atwood 2003)]]</nowiki></code>, yielding a Harvard-style reference [[#Reference-Atwood-2003 |(Atwood 2003)]].
 
 
 
== Features ==
 
* Compatible with any reference style: editor has 100% control of the format through a technology called ''editing wikitext''
 
 
 
Technical features:
 
* Produces well-formed, accessible, semantically-correct HTML code
 
* Compatible many other templates' in-text citation links (any id which starts with "Reference-")
 
* Complies with [[WP:AUM]]
 
* No conditionals
 
* No Qif
 
* No CSS hacks
 
 
 
== See also ==
 
* {{tl|wikiref}}, a compatible template for producing Harvard-style reference citations in an article's text
 
* [[Wikipedia:Citation templates]]
 
* [[Wikipedia:Citing sources]]
 
* [[Wikipedia:Citing sources/example style]]
 
* [[T-34#References]], example of use
 
 
 
[[Category:Citation templates|{{PAGENAME}}]]
 
[[Category:Inline templates|{{PAGENAME}}]]
 
</noinclude>
 

Revision as of 18:17, 12 August 2007

{{{reference}}}

Template documentation[create]