Template:Doi/doc: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Leyo Special characters |
meta>Circeus revert to last version that explain id/label, cf. revert on template |
||
Line 3: | Line 3: | ||
This template is intended to allow simple standardized links to [[digital object identifier]]s (DOIs). | This template is intended to allow simple standardized links to [[digital object identifier]]s (DOIs). | ||
== Examples == | ==Examples== | ||
The usage is: | ===Usage 1=== | ||
The basic usage is: | |||
<nowiki>{{doi|10.1016/j.coi.2004.08.001}}</nowiki> | <nowiki>{{doi|10.1016/j.coi.2004.08.001}}</nowiki> | ||
which produces: | which produces: | ||
:{{doi|10.1016/j.coi.2004.08.001}} | :{{doi|10.1016/j.coi.2004.08.001}} | ||
== | ===Usage 2=== | ||
If | If the DOI contains characters such as < and >, that cause the display to break, one may use the <var>id</var> and <var>label</var> variables. The <var>id</var> variable represents a [[Percent-encoding|URL encoded]] version of the DOI, where the <var>label</var> variable is the normal DOI: | ||
== See also == | <nowiki>{{doi | ||
* [[Template:Doi-inline]] | | 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 | |||
}}</nowiki> | |||
produces: | |||
:{{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 | |||
}} | |||
The escape code for < is <code>%3C</code>. For >, it is <code>%3E</code>. For [, use <code>%5B</code>, and for ], <code>%5D</code>. | |||
==See also== | |||
*[[Template:Doi-inline]] | |||
<includeonly> | <includeonly> |
Revision as of 21:44, 10 June 2008
This is a documentation subpage for Template:Doi. It may contain usage information, categories and other content that is not part of the original template page. |
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:
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!
The escape code for < is %3C
. For >, it is %3E
. For [, use %5B
, and for ], %5D
.
See also