www.fgks.org   »   [go: up one dir, main page]

Template:Wikicite: Difference between revisions

Content deleted Content added
use tables so that the sample code wraps
Added alt for reference
 
(18 intermediate revisions by 16 users not shown)
Line 1:
<templatestyles src="Citation/styles.css"/><cite class="citation wikicite" id={{{ref|"Reference-{{{id}}}" style="font-style:normal;"}}}>{{{reference|{{{1}}}}}}</cite><noinclude>{{Documentation}}</noinclude>
 
----
'''Template:wikicite''' makes a simple citation, for use in a "References" section for books, journals, web references, etc. 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]] [don't know what that is? It doesn't matter!]
* No conditionals [ditto]
* No Qif [uhuh]
* No CSS hacks [sigh]
 
== See also ==
* {{tl|wikiref}}, a compatible template for producing Harvard-style reference citations in an article's text
* [[Wikipedia:Citing sources]]
* [[Wikipedia:Citing sources/example style]]
* [[T-34#References]], example of use
 
[[Category:Citation templates|{{PAGENAME}}]]
</noinclude>