Template:Doi/doc

From Zoophilia Wiki
Revision as of 21:54, 10 June 2008 by meta>Circeus (→‎Usage 2)
Jump to navigationJump to search

This template is intended to allow simple standardized links to digital object identifiers (DOIs).

Examples

Usage 1

The basic usage is:

{{doi|10.1016/j.coi.2004.08.001}}

which produces:

doi:10.1016/j.coi.2004.08.001

Usage 2

If the DOI contains characters such as <, > and ], that cause the display to break, one may use the id and label variables. The id variable represents a URL encoded version of the DOI, where the label variable is the normal DOI:

{{doi
 | id = 10.1175/1520-0442(2002)015%3C0487:SOCASI%3E2.0.CO;2 
 | label = 10.1175/1520-0442(2002)015<0487:SOCASI>2.0.CO;2
}}

produces:

Error: Bad DOI specified!

If square brackets appear, a further problem is created, and the closing bracket (but not the opening one) must be also replaced in the label parameter:

{{doi
 | id = 10.1890/1051-0761(1998)008%5B0947:FROINI%5D2.0.CO;2
 | label = 10.1890/1051-0761(1998)008[0947:FROINI&#x5d;2.0.CO;2
}}

producing

Error: Bad DOI specified!

The escape code for < is %3C. For >, it is %3E. For [ and ], use respectively %5B and %5D.

See also