Help:Cite

From The Sims Wiki, a collaborative database for The Sims series
Jump to navigation Jump to search
This page is a help page
It is meant to detail processes or procedures of some aspect or aspects of The Sims Wiki's norms and practices. It is not a policy page.

The Cite extension allows you to add footnotes to a page. Footnotes are useful for adding references and citations to support a sentence or statement, or for adding explanatory notes that would not fit inside the body of the text but is still of use to the reader.

Overview[edit source]

When using the system, two elements are displayed on the page:

  • The footnote marker. This is shown as a bracketed, superscripted number, like this: [1][a][Note 1]. When clicked, the marker will take you to the full footnote. If JavaScript is enabled, simply moving your cursor over the number will show the footnote as well.
  • The footnote itself. These are usually collectively shown at the bottom of the page in an ordered list.

Each footnote is numbered according to the order they first appear on the page. Thus the first footnote marker would be [1], the second would be [2] and so on. Custom labels are also incremented: [a][b][c], [Note 1] [Note 2] [Note 3].

Footnotes are listed at the bottom of the page and will have an upwards-pointing arrow (↑) that links back to the footnote marker. For example:

1. ^ Citation

If a named footnote is used in the text multiple times, then the footnote will have multiple backlinks shown as letters:

2. ^ a b c Citation

Clicking on the backlinks will jump to their respective footnote markers. If you had previously arrived at a footnote by clicking on its marker, you can also return to where you last left off by pressing ⎇ Alt+.

Adding footnotes[edit source]

Two HTML-style tags are used to add footnotes and the footnote list: <ref> and <references />.

<ref>[edit source]

The <ref> tag is used to add footnote markers and the content of the footnotes themselves. The <ref> tag indicates the beginning of a footnote, while a </ref> tag signifies the end of the footnote. Any content placed between the <ref></ref> tags will be shown in the footnote list at the bottom (which will be explained later).

You type You get
This is text.<ref>This is a footnote.</ref>

<references />

This is text.[1]

  1. This is a footnote.

Generally, footnotes should be placed after punctuation (such as a period), and there should not be any space between the footnote and the punctuation mark.

You type You get
This is text.<ref>This is a footnote.</ref>

<references />

This is text.[1] Correct

  1. This is a footnote.
This is text<ref>This is a footnote.</ref>.

<references />

This is text[1]. Wrong (marker before punctuation)

  1. This is a footnote.
This is text. <ref>This is a footnote.</ref>

<references />

This is text. [1] Wrong (space before marker)

  1. This is a footnote.

Footnotes can contain most forms of wiki markup, so formatting like bold and italics work. Links can also be added. Some more advanced functions, like the pipe trick and substitution, do not work.

You type You get
This is text.<ref>This is '''bold''' and ''italics'' in a footnote.</ref>

<references />

This is text.[1]

  1. This is bold and italics in a footnote.
This is text.<ref>''[[The Sims 2]]'', The Sims Wiki, January 1, 2019.</ref>

<references />

This is text.[1]

  1. The Sims 2, The Sims Wiki, January 1, 2019.
This is text.<ref>''[http://www.example.com HTML for Newbies]'', First Edition, Smart Web, January 1, 2019.</ref>

<references />

This is text.[1]

  1. HTML for Newbies, First Edition, Smart Web, January 1, 2019.

Using a footnote more than once[edit source]

You can use the same footnote multiple times on the same page. To do this, you must first define that footnote with a name. You can do this by typing: <ref name="name">content</ref>, replacing name with a name of your choosing. To use that same footnote elsewhere on the same page, type: <ref name="name" />, replacing name with the name you gave previously.

The name can be anything of your choosing, but it should be unique (it shouldn't be in use elsewhere on the same page), and it should make sense. For example, if you're citing a source, setting the name to be "Author Year" (e.g. Nguyen 2016) is a good option. Names are case sensitive, and names can't just be a number (e.g. 1). Names should be surrounded by quotation marks and should, preferably, only use letters and numbers (from A-Z and 0-9).

You type You get
This is text.<ref name="Smart Web 2019">''[http://www.example.com HTML for Newbies]'', First Edition, Smart Web, January 1, 2019.</ref> This is more text.<ref name="Smart Web 2019" />

<references />

This is text.[1] This is more text.[1]

  1. 1.0 1.1 HTML for Newbies, First Edition, Smart Web, January 1, 2019.

Footnote labels are incremented in the order that they are first used. Unlike other footnote systems, which may use things like Ibid., these labels do not change when the same footnote is used multiple times. As such, footnote numbering can seem to be out of place.

You type You get
This is text.<ref name="Smart Web 2019">''[http://www.example.com HTML for Newbies]'', First Edition, Smart Web, January 1, 2019.</ref> This is more text.<ref name="The Sims Wiki 2019">''[[The Sims 2]]'', The Sims Wiki, January 1, 2019.</ref> And some more text.<ref name="Smart Web 2019" />

Oh look, a new paragraph.<ref name="The Sims Wiki 2019" />

<references />

This is text.[1] This is more text.[2] And some more text.[1]

Oh look, a new paragraph.[2]

  1. 1.0 1.1 HTML for Newbies, First Edition, Smart Web, January 1, 2019.
  2. 2.0 2.1 The Sims 2, The Sims Wiki, January 1, 2019.

<references />[edit source]

The <references /> tag is used to define where the reference list should be placed on the page. The reference list shows all of the footnotes that have been used on the page and orders them in one spot. If there is no <references /> tag on the page, the footnotes will default to being displayed at the very bottom of the page, below all other page content.

You type You get
This is text.<ref name="Smart Web 2019">''[http://www.example.com HTML for Newbies]'', First Edition, Smart Web, January 1, 2019.</ref> This is more text.<ref name="The Sims Wiki 2019">''[[The Sims 2]]'', The Sims Wiki, January 1, 2019.</ref> And some more text.<ref name="Smart Web 2019" />

Oh look, a new paragraph.<ref name="The Sims Wiki 2019" /> And some more text.<ref>''Harry Potter and the Philosopher's Stone'', J. K. Rowling, Bloomsbury, 1997.</ref>

==References==
<references />

This is text.[1] This is more text.[2] And some more text.[1]

Oh look, a new paragraph.[2] And some more text.[3]

References
  1. 1.0 1.1 HTML for Newbies, First Edition, Smart Web, January 1, 2019.
  2. 2.0 2.1 The Sims 2, The Sims Wiki, January 1, 2019.
  3. Harry Potter and the Philosopher's Stone, J. K. Rowling, Bloomsbury, 1997.

On The Sims Wiki, there is also the option to use {{Reflist}}, which offers a few more stylistic options. In practice, {{Reflist}} is used for citation footnotes, although both will usually work fine. Some wikis do not have the {{Reflist}} template.

You type You get
This is text.<ref name="Smart Web 2019">''[http://www.example.com HTML for Newbies]'', First Edition, Smart Web, January 1, 2019.</ref> This is more text.<ref name="The Sims Wiki 2019">''[[The Sims 2]]'', The Sims Wiki, January 1, 2019.</ref> And some more text.<ref name="Smart Web 2019" />

Oh look, a new paragraph.<ref name="The Sims Wiki 2019" /> And some more text.<ref>''Harry Potter and the Philosopher's Stone'', J. K. Rowling, Bloomsbury, 1997.</ref>

==References==
{{Reflist}}

This is text.[1] This is more text.[2] And some more text.[1]

Oh look, a new paragraph.[2] And some more text.[3]

References
  1. 1.0 1.1 HTML for Newbies, First Edition, Smart Web, January 1, 2019.
  2. 2.0 2.1 The Sims 2, The Sims Wiki, January 1, 2019.
  3. Harry Potter and the Philosopher's Stone, J. K. Rowling, Bloomsbury, 1997.

Advanced[edit source]

Footnote groups[edit source]

Footnotes can be grouped into different lists. This can be used to separate explanatory notes from references, or for listing references for tables and images. Footnote numbering is separate for each group.

Like with ref names, you need to specify a name for the group. This should be kept to no more than a single word, as the group name will be shown on the footnote marker before the number.

You type You get
This part of the text requires clarification,<ref group="note">Listed separately from the citation</ref> whereas the entire text is cited.<ref>Citation.</ref> And this needs even more clarification.<ref group="note">Another note</ref>

==Notes==
<references group="note" />

==References==
<references />

This part of the text requires clarification,[note 1] whereas the entire text is cited.[1] And this needs even more clarification.[note 2]

Notes
  1. Listed separately from the citation
  2. Another note
References
  1. Citation.

Grouped footnotes can be combined with named footnotes so they can be used multiple times on the same page.

You type You get
This part of the text requires clarification,<ref group="note" name="name">Listed separately from the citation</ref> whereas the entire text is cited.<ref>Citation.</ref> And this needs the same clarification.<ref group="note" name="name" />

==Notes==
<references group="note" />

==References==
<references />

This part of the text requires clarification,[note 1] whereas the entire text is cited.[1] And this needs the same clarification.[note 1]

Notes
  1. 1.0 1.1 Listed separately from the citation
References
  1. Citation.

List-defined references[edit source]

In a long article that uses a lot of named footnotes, it can become extremely difficult to track all of the different named references on the page. For example, if a footnote had the name "Smith 2014" and it was first used in the middle of the article, someone who wanted to edit the contents of that footnote would have to find <ref name="Smith 2014"> in the wikitext of the page, which could easily be anywhere on the page. Named references also do not have to be used in order; for example, <ref name="Smith 2014" /> could be used at the beginning of the article, and <ref name="Smith 2014">CONTENT</ref> at the very end, and it would still work just fine. This, however, means that named footnotes can be scattered all around the article, making them hard to find and organize.

To resolve this issue, you may want to use list-defined references (LDR) instead, where the contents of the named footnotes are all stored within the <references> tag, usually at the bottom of the page. For example:

<references>
<ref name="name1">Content</ref>
<ref name="name2">Content</ref>
<ref name="name...n">Content</ref>
</references>

The named footnotes are invoked like normal. The only difference is that their contents are all kept in one location, rather than within the body of the article.

You type You get
The Sun is pretty big.<ref name="Foot01" /> But the Moon<ref name="Foot02" /> is not so big.<ref name="Foot03" /> The Sun is also quite hot.<ref name="Foot04" />

==References==
<references>
<ref name="Foot01">Miller, ''The Sun'', Oxford, 2005, p. 23.</ref>
<ref name="Foot02">Jones, ''The Solar System'', MacMillan, 2005, p 623.</ref>
<ref name="Foot03">Brown, ''The Moon'', 2006, Penguin, p. 46.</ref>
<ref name="Foot04">Smith, ''The Universe'', Random House, 2005, p. 334.</ref>
</references>

The Sun is pretty big.[1] But the Moon[2] is not so big.[3] The Sun is also quite hot.[4]

References
  1. Miller, The Sun, Oxford, 2005, p. 23.
  2. Jones, The Solar System, MacMillan, 2005, p 623.
  3. Brown, The Moon, 2006, Penguin, p. 46.
  4. Smith, The Universe, Random House, 2005, p. 334.

List-defined references can be combined with grouped footnotes as well.

You type You get
The Sun is pretty big.<ref name="Foot01" /><ref group="note" name="Note01" /> But the Moon<ref name="Foot02" /><ref group="note" name="Note02" /> is not so big.<ref name="Foot03" /><ref group="note" name="Note03" /> The Sun is also quite hot.<ref name="Foot04" />

==Notes==
<references group="note">
<ref name="Note01">But Miller points out that the Sun is not as large as some other stars.</ref>
<ref name="Note02">The Moon goes by other names, such as Selena.</ref>
<ref name="Note03">Historically the Moon was not always considered to be large.</ref>
</ref>

==References==
<references>
<ref name="Foot01">Miller, ''The Sun'', Oxford, 2005, p. 23.</ref>
<ref name="Foot02">Jones, ''The Solar System'', MacMillan, 2005, p 623.</ref>
<ref name="Foot03">Brown, ''The Moon'', 2006, Penguin, p. 46.</ref>
<ref name="Foot04">Smith, ''The Universe'', Random House, 2005, p. 334.</ref>
</references>

The Sun is pretty big.[1][note 1] But the Moon[2][note 2] is not so big.[3][note 3] The Sun is also quite hot.[4]

Notes
  1. But Miller points out that the Sun is not as large as some other stars.
  2. The Moon goes by other names, such as Selena.
  3. Historically the Moon was not always considered to be large.
References
  1. Miller, The Sun, Oxford, 2005, p. 23.
  2. Jones, The Solar System, MacMillan, 2005, p 623.
  3. Brown, The Moon, 2006, Penguin, p. 46.
  4. Smith, The Universe, Random House, 2005, p. 334.

There are some important notes to keep in mind when using list-defined references. First, not all of the named footnotes on the page need to have their contents in the <references> tags, although it is best to be consistent on a page. Second, all of the references inside the LDR must be named, and they must be used somewhere in the text. The reference list may be placed in any order in the wikitext, but they will always be shown in the order where they are first used in the text like normal. Finally, it may be harder to insert new footnotes into the text, as editors will need to jump to the bottom of the page to add the footnote contents before returning to where they wanted to place the footnote markers.

Using list-defined references is purely an editorial convenience. It has no effect on the display of the page and is not noticed by readers.

Embedding footnotes[edit source]

Due to technical limitations, <ref></ref> tags cannot be nested. Attempting to use <ref>Foo bar.<ref>Footnote text.</ref></ref> will result in an error. It is possible to get around this by using the #tag magic word to invoke the <ref> tag. The syntax is: {{#tag:ref|refcontent|group=groupname|name=name}}. The contents of the footnote must come before any parameters. <ref></ref> tags can be used within {{#tag:ref}}.

You type You get
The quick brown fox jumps over the lazy dog.{{#tag:ref|A footnote.<ref>A reference for the footnote.</ref>|group="nb"}}

==Notes==
<references group="nb" />

==References==
<references />

The quick brown fox jumps over the lazy dog.[nb 1]

Notes
  1. A footnote.[1]
References
  1. A reference for the footnote.

On The Sims Wiki, you can also use the {{Refn}} template to accomplish the same in a cleaner format. The output is the same. Unlike #tag, the parameters do not need to be in order, making this the preferred method of creating nested footnotes.

You type You get
The quick brown fox jumps over the lazy dog.{{refn|group=nb|A footnote.<ref>A reference for the footnote.</ref>}}

==Notes==
<references group="nb" />

==References==
<references />

The quick brown fox jumps over the lazy dog.[nb 1]

Notes
  1. A footnote.[1]
References
  1. A reference for the footnote.

Previewing[edit source]

When editing a single section of the page, any footnotes used in that section will be previewed at the bottom of the preview window when you click 'Show preview'. You still will not be able to see named footnotes whose contents are located outside of the section you are editing.

Cite errors[edit source]

Main article: Help:Cite errors

The cite system will display an error message when it detects that its syntax is not being used correctly. These error messages will either appear where the marker of the affected footnote was placed, or within the reference list at the bottom of the page, and will appear in red, bold, and enlarged text. The software will automatically categorize such pages into Category:Pages with reference errors for tracking.

Fixing these error messages usually requires a bit of syntax checking, since something like an improperly closed <ref> can cause errors even in places where it seemingly isn't relevant. Errors may also be produced when a footnote does not contain any content, or when a named footnote is called when there is no <ref name="name"> providing it with its content.

See also[edit source]