Wikipedia:Naming references for beginners

On Wikipedia, you can use what's called "naming" references in order to use the same reference more than one time, but have it in the list only once.

Let's say I wanted to use this article to cite the italicized statements below (placeholder latin text):



The completed reference is going to be this using the web template:

<ref>{{cite web |last=Payne |first=Ed |title=Karzai, angry about Taliban's Qatar office, suspends peace, security talks - CNN.com |url=http://www.cnn.com/2013/06/19/world/asia/afghanistan-security-talks/index.html?hpt=hp_t2 |work=CNN |accessdate=19 June 2013 |coauthors=Mobasherat, Mitra}}</ref>

or this using the news template:

<ref>{{cite news |last=Payne |first=Ed |title=Karzai, angry about Taliban's Qatar office, suspends peace, security talks |url=http://www.cnn.com/2013/06/19/world/asia/afghanistan-security-talks/index.html?hpt=hp_t2 |accessdate=19 June 2013 |newspaper=CNN.com |date=19 June 2013 |author2=Mobasherat, Mitra}}</ref>

Using the ref-toolbar to create a citation

If you don't know how to easily make those citations using the "reftoolbar", there's an explanation and nice video here.

Now, using the cite news example from now on, if I put those after every time I cite from it, it shows up like this (with numbers instead of letters):



Now this is undesirable because it uses the same reference three times, and it shows up in the list three times.

If you'll notice in the code above, we put  <ref>  as the start of the reference. But there's a modifier we can use to give the reference a "name", or a unique identifier for the specific page it's used on. In the example above, I may name this ref "CNN report" or something similar. To do that, use this:  <ref name="NAME HERE">  as the first time. Only name the reference the first time you use it.

Then, after you name the first instance, go back and replace all of the following references with  <ref name="THE SAME NAME" />  with the space and slash. This will produce the following, with the reference only "recited".



This produces one citation, and uses the letters (a-z, then aa, bb, cc, etc.) to show how many times it's used in the article, as well as provide a "click" point to go to wherever the citation is used. Clicking on the a takes you to the first time it's used, the b to the second, and so on.

If you're doing this from a reference already in an article, the steps are as follows:

  1. Find the first instance of the reference on the page.
  2. Change the opening  <ref>  tag to be  <ref name="name here">
  3. Replace all following instances of the reference with  <ref name="name here" />
  4. Save the page.

You can do this for multiple references on the page, but no two different references can have the same name. This can be fixed by giving names such as "CNN report 1", "CNN report 2", and so on, but that causes confusion as to which report is 1, 2, and so on. The better way to fix this would be to give descriptive names, such as "CNN interviews Obama", and so on. This way, you can remember what reference name is which when you're using them again.

Uses material from the Wikipedia article Wikipedia:Naming references for beginners, released under the CC BY-SA 4.0 license.