Jump to content

Help:Cite errors/Cite error ref too many keys

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Gadget850 (talk | contribs) at 22:50, 13 December 2011 ({{bots|allow=none}}). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This page will help you to fix the cite error message:

The <ref> tag has too many names (see the help page).

  • If you have read this help page and find something missing or confusing, please discuss it at the main talk page.
  • Please reference this page and the page where you have the problem so we can understand your issues.
  • For basic information on the footnotes system, see Referencing for beginners; for advanced help, see Footnotes.

Overview

A footnote used multiple times may be defined with a name:

<ref name="foo">content</ref>

Any footnote can be assigned to a group:

<ref group="foobar">content</ref>

Or both:

<ref group="foobar" name="foo">content</ref>

The ref name need not be placed within quotes unless it contains a space, certain punctuation marks, or non-ASCII characters. Specifically, quotes are not necessary if the name contains only printable ASCII characters excluding space, straight double quote ("), dollar sign ($), percent sign (%), straight single quote ('), plus sign (+), equals sign (=), backslash (\), and the greater-than sign (>). With quotes, the only restriction is that the name may not contain the less-than sign (<) or the quote character. The wiki parser converts single word quoteless attribute values into validly quoted XHTML. Note that any quotation marks placed around the ref name must be straight quotes (") rather than curly quotes ( or ).

Issues and resolution

A named reference tag has too many names or parameters. A quoteless name such as foo bar will be parsed as two separate names due to the space, thus generating the error. You can only specify two parameters, name and group. You can't, for instance, format a reference with <ref style="color:red;">content</ref>, or give it an id.

Examples

In this example, reference 1 is named foo bar, which is invalid due to the space. In reference 2 foo bar is valid as it is enclosed in quotes and reference 3 is valid as foo_bar uses an underscore.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<ref name=foo bar>Reference 1</ref> Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<ref name="foo bar">Reference 2</ref> Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<ref name=foo bar>Reference 3</ref> Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida.

==References==
{{reflist}}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.[1] Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.[2] Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.[3] Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida.

References
  1. ^ Reference 1 Cite error: The <ref> tag has too many names (see the help page).
  2. ^ Reference 1
  3. ^ Reference 3