Difference between revisions of "Template:Refname rules"
Jump to navigation
Jump to search
Template documentation[create]
test>DragonflySixtyseven (I am openly and proudly pro-human.) |
test>GKFX (Restructure for clarity. Remove block caps. Remove spaces in list of ASCII characters so that the full stop at the end does not appear to be part of the list.) |
||
| Line 1: | Line 1: | ||
| − | + | {{{1|Names for footnotes and groups must follow these rules:}}} | |
| − | * Names are case-sensitive | + | * Names are case-sensitive. |
| − | * Names | + | * Names '''must not''' be purely numeric; they should have semantic value so that they can be more easily distinguished from each other by human editors. |
| − | * Names must be unique—you may not use the same name to define different groups or footnotes | + | * Names must be unique—you may not use the same name to define different groups or footnotes. |
| − | * 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>. | + | * Please consider keeping reference names simple and restricted to the standard [[English alphabet]] and numerals. Failing that, including if spaces are used, the following technical restrictions become relevant: |
| − | + | ** 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 style="word-break: break-all;">!$%&()*,-.:;<@[]^_`{|}~</code>. That is, all printable ASCII characters except <code style="word-break: break-all;">#"'/=>?\</code>. | |
| − | * Inclusion of any other characters, {{em|including spaces}}, requires that the reference name be enclosed in quotes | + | ** Inclusion of any other characters, {{em|including spaces}}, requires that the reference name be enclosed in quotes; for example, <code>name="<var>John Smith</var>"</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. | + | ** 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. |
| − | * 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>&lt;</code> and <code>&quot;</code>, respectively.{{#if: {{{2|}}}| | + | ** 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>&lt;</code> and <code>&quot;</code>, respectively.{{#if: {{{2|}}}| |
{{{2}}}}} | {{{2}}}}} | ||
| − | + | * 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. | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 19:31, 2 April 2018
Names for footnotes and groups must follow these rules:
- Names are case-sensitive.
- Names must not be purely numeric; they should have semantic value so that they can be more easily distinguished from each other by human editors.
- 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, including if spaces are used, the following technical restrictions become relevant:
- Quotation marks are optional if the only characters used are letters
A–Z,a–z, digits0–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 keyboard 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<and", respectively.
- Quotation marks are optional if the only characters used are letters
- You may optionally provide reference names even when the reference name is not required. This makes later re-use of the sourced reference easier.
| Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |