# Template talk:Ref

## <ref group="note"> markup tag

I would say that the <ref group="note"> markup tag seems to have superceded the {{note}} template tag for use in the body of the text (not for tables, etc.).

Example:

Body text about something [note 1].
More body text about something else.
• ^ Some annotation text goes here.

Code:

== Article ==
Body text about something <ref group="note">Some annotation text goes here.</ref>.
== Notes ==
More body text about something else.
<references group="note" />

—DIV (138.194.12.32 (talk) 08:17, 20 October 2010 (UTC))

Yes, the Wikipedia:Footnote3 system has been long deprecated. The Cite.php group notes are intrusive when used in tables, navboxes and other elements, thus the continued use of ref/note. There is an update to cite.php that has not yet been implemented that would add alpha and custom labels; see Wikipedia:Manual of Style (footnotes)/Cite link labels. ---— Gadget850 (Ed) talk 12:10, 20 October 2010 (UTC)

New feature discussed at Wikipedia:Village pump (technical)#Cite.php: Custom cite links. ---— Gadget850 (Ed) talk 15:41, 25 February 2011 (UTC)

## Cite label styles

For more details on this topic, see WP:CITELABEL.

As previously announced, we now have a way to change the labels in citations. This is now implemented and documented. For example, using the group name of "lower-alpha", the cite labels will use lower case alpha characters.

{| class="wikitable" style="text-align: center;"
|-
! 05/08
| 4266 || 7828 || 7282<ref group=lower-alpha name=elk1/> || 1105 || 224<ref group=lower-alpha name=elk2/> || 161 || 916<ref group=lower-alpha name=elk3/>|| 506 || 231 || 4127 || 6190 || 6487 || 1139 || 241 || 205 || 1165 || 478 || 301
|}

{{reflist |group=lower-alpha |refs=
<ref name=elk1>{{cite book |last=Elk |first=Anne |title=[[Anne Elk's Theory on Brontosauruses]] |date=November 16, 1972}}</ref>
<ref name=elk2>{{cite book |last=Elk |first=Anne |title=Anne Elk's Other Theory on Brontosauruses |date=November 16, 1972}}</ref>
<ref name=elk3>{{cite book |last=Elk |first=Anne |title=Anne Elk's Greater Theory on Brontosauruses |date=November 16, 1972}}</ref>}}

 05/08 4266 7828 7282[a] 1105 224[b] 161 916[c] 506 231 4127 6190 6487 1139 241 205 1165 478 301
1. ^ Elk, Anne (November 16, 1972). Anne Elk's Theory on Brontosauruses.
2. ^ Elk, Anne (November 16, 1972). Anne Elk's Other Theory on Brontosauruses.
3. ^ Elk, Anne (November 16, 1972). Anne Elk's Greater Theory on Brontosauruses.

Other styles are decimal, lower-greek and lower-roman. ---— Gadget850 (Ed) talk 15:21, 11 March 2011 (UTC)

## When to use {{ref}} and when to use <ref>?

As the documentation states, it is possible to combine Ref family templates with the alternative referencing style. Why is this desirable? As it seems to me, it only creates links with identical indexes, which only seems confusing to me. This means that if an article has used the ref template a lot, it will be impossible to use the add citation tool in Wikipedia's built in text editor if you still want the indexing function to work properly. —Kri (talk) 21:32, 5 August 2011 (UTC)

The documentation is out of date. With Cite.php footnotes, you could not create separate references for notes or tables, this was fixed, see WP:REFGROUP. The next problem was that grouped references used in-text labels that were a minimum of three characters long and could be intrusive in tables. A number of articles used {{ref}} with alpha or Greek labels. This issue was resolved with WP:CITELABEL. Footnote3 has been deprecated since 2006, but still hangs on.
The major issues with Footnote3 are reuse of a reference creates a duplicate HTML id and renders invalid HTML; there is no error checking so it is very easy to create an in-text link with no matching reference or vice versa. ---— Gadget850 (Ed) talk 23:19, 5 August 2011 (UTC)
One large issue with {{ref}} is that some articles (for example volume rendering in a very recent version) have all their references marked with the ref template, which in my opinion makes it impossible to use the citation tool in Wikipedia's text editor, as mentioned earlier. I don't know if it's just me or if other people feel the same way; anyway, I had to convert all references in from {{ref}} to <ref> in the article volume rendering in order to make them compatible with my source citings since the indexes started over from 1 again when I started using <ref>. —Kri (talk) 23:42, 5 August 2011 (UTC)
That is another issue when different editors mix the systems. ---— Gadget850 (Ed) talk 00:46, 6 August 2011 (UTC)
If you want to see some fun markup, peruse Wikipedia:Footnote1, Wikipedia:Footnote2, Wikipedia:Footnote3 and Wikipedia:Footnote4. The redlinked templates had been deprecated for years— I converted thousands of articles some time back and had those templates deleted. See User:Gadget850/In-text citation templates for the few still in use. ---— Gadget850 (Ed) talk 01:05, 6 August 2011 (UTC)
Haha, okay thanks, I will consider to use that the next time I have to convert a lot of references. —Kri (talk) 19:17, 6 August 2011 (UTC)

If there is no second parameter, then this markup is invoked:

[{{fullurl:{{FULLPAGENAME}}}}#endnote_{{anchorencode:{{{1|}}}}}]


This causes the full page URL to be used. When you click on the link generated by {{ref}}, the entire page reloads and jumps to the matching {{note}}. If you are in edit mode and testing the link, this kicks you out of edit mode. ---— Gadget850 (Ed) talk 03:49, 1 October 2011 (UTC)

## Derive numbering templates from {{ref}} and {{note}}?

I was wondering if it is possible to derive a template that can be used to number figures, tables, equations etc. from these template? It could be useful for example when you do a long mathematical derivation and you need to refer to a specific formula in the article. There is the {{EquationRef}} template but that is bad since it only allows for static equation numbering. In LaTeX , equations that are entered using the equation environment are auto-numbered, and then it's possible to define a label (a name) for each equation which isn't visible in the compiled document but is used if you later want to refer to the equation (see Wikibooks:LaTeX/Labels and Cross-referencing#Formulas). —Kri (talk) 10:31, 1 June 2012 (UTC)

I would have to see and example of what you want, but I would recommend {tl|efn}} / {{notelist}} if you want simple lower-alpha footnotes. The Footnotes system has a number of labels that can be used; see Help:Footnotes#Predefined groups. ---— Gadget850 (Ed) talk 20:33, 1 June 2012 (UTC)
On the wikibooks page I linked to there is an example. The use the following LaTeX code:
LaTeX code Output
\begin{equation} \label{eq:solve}
x^2 - 5 x + 6 = 0
\end{equation}

\begin{equation}
x_1 = \frac{5 + \sqrt{25 - 4 \times 6}}{2} = 3
\end{equation}

\begin{equation}
x_2 = \frac{5 - \sqrt{25 - 4 \times 6}}{2} = 2
\end{equation}

and so we have solved equation \ref{eq:solve}

As can be seen in this example, the equations are not numbered in the source code; they are merely labeled when needed.—Kri (talk) 12:48, 2 June 2012 (UTC)
Using Footnotes or Footnote3 would insert a superscript such as [1], which could be confusing in conjunction with the equation. You could use {{anchor}} at the beginning of the equation and link to it as needed. ---— Gadget850 (Ed) talk 12:56, 2 June 2012 (UTC)
Yes I know it would be confusing, that is why I'm wondering if it's possible to derive templates from {{ref}} and {{note}}, which would not insert superscripts, but just plain, unformatted numbers. I have taken a look at the source code for the {{ref}} and {{note}} templates, but I don't understand how they work, so I must get some help to accomplish what I want to do.
Using anchors is a good idea, but it doesn't help me to auto-number stuff. —Kri (talk) 16:23, 2 June 2012 (UTC)
Can you give some mockup of what you want to achieve? ---— Gadget850 (Ed) talk 16:28, 2 June 2012 (UTC)
What's wrong with the example I took from the Wikibooks page, isn't that a good enough mockup? I want to be able to do basic cross-referencing with auto-numbering within documents; MS Word has functionality for it, LaTeX has functionality for it (these are the only two typesetting program I have used extensively so I don't know about the others), but not Wikipedia, as far as I know.
The {{ref}} and the {{note}} templates does just that (although it can't differ between different kinds of objects like figures and tables, since it just recognizes references), but it also formats the number by superscripting it, enclosing it in square brackets, linking it and coloring it blue. I just want the number, unformatted. —Kri (talk) 17:17, 2 June 2012 (UTC)
I understand how {{ref}} can auto-number the references now. It just creates normal links with using the [&nbsp;...&nbsp;] notation; hence it utilizes the built in counter for unlabeled external links. For example, "[http://en.wikipedia.org]" creates "[1]", but if you write the same code again, you will get "[2]", which is different from the first result. This unfortunately means that I can't use the same method that {{ref}} utilizes and hence I will have to request for counters to be built in to Wikipedia in order to make this work! —Kri (talk) 10:06, 3 June 2012 (UTC)

I echo Kri's concern: It's common in other literature to number parts, chapters, sections, figures, tables, and expressions in a way that supports cross referencing by number, e.g., "equation (3) in Chapter 2". This would be written where Chapter 2 would include an equation set off in a separate line with the number (3) appearing near either the left or right margin with the equation centered on the same line. The Chicago Manual of Style is a standard reference in this area. As Kri noted, Microsoft Word and LaTeX includes features for creating various counters that can be used to facilitate numbering parts, chapters, etc., in various ways with pointers to the parts, etc., set on the fly. This allows parts, chapters, etc., to be inserted or deleted with the numbering automatically adjusted, just as {{Reflist}} allows people to insert new references with the numbers for all the notes following being automatically adjusted. Multiple references to the same note can be achieved using &lt;ref name="..."&gt;. In Wikibooks, Wikiversity, and elsewhere it would be great to be able to create various kinds of internal references like these that would automatically adjust when others are added, deleted, or moved.
Anchors seem appropriate to use in conjunction with numeric references. However, when an article is printed, all hotlinks are lost, and all references that rely on them are unclear at best. Even in electronic formats, a reader may have to click on the link to find the reference, and that can sometimes disrupt the flow of reading. DavidMCEddy (talk) 21:37, 30 October 2013 (UTC)

## Missing anchorencode?

Shouldn't Template:Note have {{anchorencode}} as in template:Ref? Helder 22:17, 2 November 2012 (UTC)

## Duplicate ids

I see there is a difference of opinion on ids. If the id is duplicated, then the markup is invalid. The backlink is also ambiguous- some browsers will back link to the first in-text cite, others to the last. See the W3C markup validation for Template talk:Ref.

Markup Renders as
Text alpha.{{ref|Alpha|α}} Text alpha.{{ref label|Alpha|α}}

==Notes==
:{{note|Alpha|α}} Information on alpha


Text alpha.α Text alpha.[α]

Notes
Information on alpha

--— Gadget850 (Ed) talk 14:53, 3 January 2013 (UTC)

## List of notes?

Is there a method in Template: Note that allows it to be used similarly to: ((reflist|width|refs=list of references))? As in the "refs=" part, where you can add various notes there, keeping them out of the body text but linking to them in the text. Darkwarriorblake (talk) 18:04, 4 January 2014 (UTC)

## Note vs. Notelist+Efn

It would really help if the documentation for {{note}} (and possibly also for {{ref label}} and {{note label}}) would not just state that "This is no longer the recommended method of citing sources." (and point to Wikipedia:Citing sources and Help:Footnotes), but if it would also mention {{Efn}} and/or {{Notelist}}. Editors - like me - who are looking for a way to add notes, either by entering Template:Note in the address bar or by searching for 'Wikipedia note template' via Google, end up at {{note}}. --82.136.210.153 (talk) 14:22, 19 January 2015 (UTC)