Difference between revisions of "Template:Arxiv/doc"

From blackwiki
Jump to navigation Jump to search
(Added documentation for a new feature - not implemented yet, but I'm doing to docs first.)
(Reverted doc change; couldn't make the template work due to lack of m:StringFunctions.)
Line 11: Line 11:
 
* <tt><nowiki>{{</nowiki> arxiv | archive=''arch-ive'' | id=''0123456'' }}</tt>
 
* <tt><nowiki>{{</nowiki> arxiv | archive=''arch-ive'' | id=''0123456'' }}</tt>
 
* <tt><nowiki>{{</nowiki> arxiv | ''arch-ive'' | ''0123456'' }}</tt>
 
* <tt><nowiki>{{</nowiki> arxiv | ''arch-ive'' | ''0123456'' }}</tt>
* <tt><nowiki>{{</nowiki> arxiv | id=''0123.4567'' }}</tt>
+
* <tt><nowiki>{{</nowiki> arxiv | id=''0123456'' }}</tt>
* <tt><nowiki>{{</nowiki> arxiv | ''0123.4567'' }}</tt>
+
* <tt><nowiki>{{</nowiki> arxiv | ''0123456'' }}</tt>
  
The first two calling sequence are to be used for old-style identifiers (i.e., those before [[1 April]] [[2007]]), while the latter two are for newer papers (after [[31 March]] [[2007]]).
+
The first two calling sequence are to be used for old-style identifiers (i.e., those before [[1 April]] [[2007]]), while the latter two are for newer papers (after [[31 March]] [[2007]]).
'''New feature, undergoing implementation''': The archive name may be included with new-style identifiers, but the archive category name is used differently.  (A "new-style" identifier is one that contains a period.)
 
  
 
The parameters have the following meaning:
 
The parameters have the following meaning:
Line 45: Line 44:
 
</nowiki></code>
 
</nowiki></code>
 
|| {{arxiv|0704.0001}}
 
|| {{arxiv|0704.0001}}
|-
 
| <code><nowiki>
 
{{arxiv|archive=hep-th|id=0704.0001}}
 
</nowiki></code>
 
|| {{arxiv|archive=hep-th|id=0704.0001}}
 
|-
 
| <code><nowiki>
 
{{arxiv|hep-th|0704.0001}}
 
</nowiki></code>
 
|| {{arxiv|hep-th|0704.0001}}
 
 
|}
 
|}
  

Revision as of 08:43, 7 July 2007

Template:Template doc page viewed directly

Purpose

Provides a uniform method of formatting arXiv links, and makes it simpler to update if the format of those links changes in future.

Usage

This template can be used in the following ways:

  • {{ arxiv | archive=arch-ive | id=0123456 }}
  • {{ arxiv | arch-ive | 0123456 }}
  • {{ arxiv | id=0123456 }}
  • {{ arxiv | 0123456 }}

The first two calling sequence are to be used for old-style identifiers (i.e., those before 1 April 2007), while the latter two are for newer papers (after 31 March 2007).

The parameters have the following meaning:

  • archive specifies the arXiv archive (full list here) using the abbreviated code
  • id specifies the ID of the particular entry

Example

Code Result
{{arxiv|archive=cs.DL|id=0005003}} arXiv:cs.DL/0005003Template:Only in print
{{arxiv|cs.DL|0005003}} arXiv:cs.DL/0005003Template:Only in print
{{arxiv|id=0704.0001}} arXiv:0704.0001Template:Only in print
{{arxiv|0704.0001}} arXiv:0704.0001Template:Only in print