Difference between revisions of "Template:Refname rules"

From blackwiki
Jump to navigation Jump to search
(Explicitly list forbidden characters, for clarity.)
m (42 revisions imported)
 
(12 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<includeonly>{{{1|Names for footnotes and groups must follow these rules:}}}
+
{{{1|Names for footnotes and groups must follow these rules:}}}
* Names are case-sensitive
+
* Names are case-sensitive.  Please do not use raNdOM capitalization.
* Names may not be purely numeric
+
* Names {{strong|must not}} be purely numeric; the software will accept something like <code>":1"</code> (which is punctuation plus a number), but it will ignore <code>"1"</code> (purely numeric).
* Names must be unique—you may not use the same name to define different groups or footnotes
+
* Names should have semantic value, so that they can be more easily distinguished from each other by human editors who are looking at the wikitext.  This means that ref names like <code>"Nguyen 2010"</code> are preferred to names like <code>":1"</code>.
* Quotation marks are optional if the only characters used are letters <code>A–Z</code>, <code>a–z</code>, digits <code>0–9</code>, and the symbols <code> ! $ % & ( ) * , - . : ; < @ [ ] ^ _ ` { | } ~ </code>.
+
* Names must be unique.  You may not use the same name to define different groups or footnotes.
** The forbidden printable ASCII characters are <code> # " ' / = > ? \ </code>.
+
* Please consider keeping reference names simple and restricted to the standard [[English alphabet]] and numerals. Failing that, if spaces are used, including the following technical restrictions becomes relevant:
* Inclusion of any other characters, {{em|including spaces}}, requires that the reference name be enclosed in quotes: <code>name="<var>John Smith</var>"</code>.
+
** Quotation marks are preferred but optional if the only characters used are letters <code>A–Z</code>, <code>a–z</code>, digits <code>0–9</code>, and the symbols <code style="word-break: break-all;">!$%&()*,-.:;<@[]^_`{|}~</code>. That is, all printable ASCII characters except <code style="word-break: break-all;">#"'/=>?\</code>.  
* The quote marks must be the standard straight keyboard marks (<code>"</code>); curly or other quotes will be parsed as part of the reference name.
+
** Inclusion of any other characters, {{em|including spaces}}, requires that the reference name be enclosed in quotes; for example, <code>name="{{var|John Smith}}"</code>.
* Quote-enclosed reference names may not include a less-than sign (<code><</code>) or a double straight quote symbol (<code>"</code>). These may be escaped with <code>&amp;lt;</code> and <code>&amp;quot;</code>, respectively.{{#if: {{{2|}}}|
+
** The quote marks must be the standard, straight, double quotation marks (<code>"</code>); curly or other quotes will be parsed as part of the reference name.
 +
** Quote-enclosed reference names may not include a less-than sign (<code><</code>) or a double straight quote symbol (<code>"</code>). These may be escaped with <code>&amp;lt;</code> and <code>&amp;quot;</code>, respectively.{{#if: {{{2|}}}|
 
{{{2}}}}}
 
{{{2}}}}}
* Please consider keeping reference names simple and restricted to the standard [[English alphabet]] and numerals.
+
* You may optionally provide reference names even when the reference name is not required. This makes later re-use of the sourced reference easier.<noinclude>
* You may optionally provide reference names even when the reference name is not required. This makes later re-use of the sourced reference easier.</includeonly><noinclude>
 
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 08:15, 6 September 2020

Names for footnotes and groups must follow these rules:

  • Names are case-sensitive. Please do not use raNdOM capitalization.
  • Names must not be purely numeric; the software will accept something like ":1" (which is punctuation plus a number), but it will ignore "1" (purely numeric).
  • Names should have semantic value, so that they can be more easily distinguished from each other by human editors who are looking at the wikitext. This means that ref names like "Nguyen 2010" are preferred to names like ":1".
  • Names must be unique. You may not use the same name to define different groups or footnotes.
  • Please consider keeping reference names simple and restricted to the standard English alphabet and numerals. Failing that, if spaces are used, including the following technical restrictions becomes relevant:
    • Quotation marks are preferred but optional if the only characters used are letters A–Z, a–z, digits 0–9, and the symbols !$%&()*,-.:;<@[]^_`{|}~. That is, all printable ASCII characters except #"'/=>?\.
    • Inclusion of any other characters, including spaces, requires that the reference name be enclosed in quotes; for example, name="John Smith".
    • The quote marks must be the standard, straight, double quotation marks ("); curly or other quotes will be parsed as part of the reference name.
    • Quote-enclosed reference names may not include a less-than sign (<) or a double straight quote symbol ("). These may be escaped with &lt; and &quot;, respectively.
  • You may optionally provide reference names even when the reference name is not required. This makes later re-use of the sourced reference easier.
Template documentation[create]