Difference between revisions of "Template:Doi/doc"

From blackwiki
Jump to navigation Jump to search
imported>Circeus
imported>Fayenatic london
 
(38 intermediate revisions by 24 users not shown)
Line 1: Line 1:
 +
{{lowercase}}
 
{{documentation subpage}}
 
{{documentation subpage}}
  
This template is intended to allow simple standardized links to [[digital object identifier]]s (DOIs).
+
This template produces a simple, standardized link to a [[digital object identifier]] (DOI).
  
==Examples==
+
== Usage ==
===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}}
 +
For instructions on how to use Wikipedia to automatically expand a DOI into a full reference complete with article title, author(s), date, journal name, volume, issue, page numbers, etc., please see [[User:Citation bot/use]].
  
===Usage 2===
+
'''''Note:''''' This template does not work properly if there is a space between the vertical bar and the DOI.
If the DOI contains characters such as &lt;, &gt; 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:
 
 
 
<nowiki>{{</nowiki>doi
 
  | id = 10.1175/1520-0442(2002)015'''%3C'''0487:SOCASI'''%3E'''2.0.CO;2
 
  | label = 10.1175/1520-0442(2002)015<0487:SOCASI>2.0.CO;2
 
}}
 
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
 
}}
 
 
 
If square brackets appear, a further problem is created, and the closing bracket (but not the opening one) must be also replaced in the <code>label</code> parameter:
 
 
 
<nowiki>{{</nowiki>doi
 
  | id = 10.1890/1051-0761(1998)008'''%5B'''0947:FROINI'''%5D'''2.0.CO;2
 
  | label = 10.1890/1051-0761(1998)008[0947:FROINI'''&amp;#x5d;'''2.0.CO;2
 
}}
 
producing
 
 
 
:{{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
 
}}
 
The escape code for &lt; is <code>%3C</code>. For &gt;, it is <code>%3E</code>. For [ and ], use respectively <code>%5B</code> and <code>%5D</code>.
 
  
 
==See also==
 
==See also==
*[[Template:Doi-inline]]
+
*{{tl|doi-inline}}
 
+
*{{tl|hdl}}
<includeonly>
+
*[[Wikipedia:Digital Object Identifier]]
<!-- ADD CATEGORIES BELOW THIS LINE -->
+
*[[Wikipedia:ISBN]]
[[Category:External link templates|{{PAGENAME}}]]
+
*[[Wikipedia:PMID]]
 
+
*[[Wikipedia:ISSN]]
<!-- ADD INTERWIKIS BELOW THIS LINE -->
+
*{{tl|bibcode}}
[[de:Vorlage:DOI]]
+
*{{tl|PII}}
[[es:Plantilla:DOI]]
 
[[ja:Template:Doi]]
 
[[no:Mal:Doi]]
 
  
</includeonly>
+
<includeonly>{{sandbox other|1=<!-- keep sandbox out of categories -->|2=
 +
[[Category:Catalog lookup templates]]
 +
}}</includeonly>

Latest revision as of 15:06, 15 April 2020

This template produces a simple, standardized link to a digital object identifier (DOI).

Usage

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

which produces:

doi:10.1016/j.coi.2004.08.001Template:Only in print

For instructions on how to use Wikipedia to automatically expand a DOI into a full reference complete with article title, author(s), date, journal name, volume, issue, page numbers, etc., please see User:Citation bot/use.

Note: This template does not work properly if there is a space between the vertical bar and the DOI.

See also