Realiza una donación a la Enciclopedia Colchagüina para poder preservarla
Realiza una donación a la Enciclopedia Colchagüina para poder preservarla

Ayuda:Cite

De la Enciclopedia Colchagüina
PD Nota: Los contenidos de esta página se encuentran bajo la licencia CC0, y han sido importados desde MediaWiki.org. Estas páginas están disponibles aquí a modo informativo, y puede que algunas se encuentren en el idioma inglés.
Algunas antiguas revisiones de esta página se encontraban bajo la licencia CC BY-SA. Solo las nuevas contribuciones son de dominio público.
PD

<translate> Cite makes it possible to add footnotes to a page.

See the page on the <tvar name=1>Cite extension </tvar> for technical details.

Usage

The basic concept of the <tvar name=1><ref></tvar> tag is that it inserts the text enclosed by the ref tags as a footnote in a designated section, which you indicate with the placeholder tag <tvar name=2><references /></tvar>. This format cannot be used interchangeably with the older format—you must pick one or the other.

Additional placeholder tags <tvar name=1><references /></tvar> can be inserted in the text, and all <tvar name=2><ref></tvar> tags up to that point, in that group, will be inserted there.

If you forget to include <tvar name=1><references /></tvar> in the article, the footnotes will not disappear, but the references will be displayed at the end of the page. </translate>

<translate> This page itself uses footnotes, such as the one at the end of this sentence.</translate>[note 1] <translate> If you [<tvar name=url>http://enciclopedia.auroradecolchagua.cl/index.php?title=Ayuda:Cite&action=edit</tvar> view the source] of this page by clicking "Edit this page", you can see a working example of footnotes.</translate>

<translate> Wikitext</translate> <translate> Rendering</translate>
<translate nowrap><!--T:104--> The Sun is pretty big.</translate><ref><translate nowrap><!--T:219--> E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23–25.</translate></ref> <translate nowrap><!--T:220--> The Moon, however, is not so big.</translate><ref><translate nowrap><!--T:221--> R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44–46.</translate></ref>

<translate nowrap>
==Notes== <!--T:105-->
</translate>
<references />

<translate> The Sun is pretty big.</translate>[1] <translate> The Moon, however, is not so big.</translate>[2]

Plantilla:Fake heading

  1. <translate> E. Miller, The Sun, (New York: Academic Press, 2005), 23–25.</translate>
  2. <translate> R. Smith, "Size of the Moon", Scientific American, 46 (April 1978): 44–46.</translate>

<translate>

Multiple uses of the same footnote

</translate> <translate> To give a footnote a unique identifier, use {{<tvar name=1>tmpl|0=<ref Plantilla:Attr></tvar>|name}}.</translate> <translate> You can then refer to the same footnote again by using a ref tag with the same name.</translate> <translate> The text inside the second tag doesn't matter, because the text already exists in the first reference.</translate> <translate> You can either copy the whole footnote, or you can use a terminated empty ref tag that looks like this: {{<tvar name=1>tmpl|0=<ref Plantilla:Attr /></tvar>|name}}.</translate>

<translate> In the following example, the same source is cited three times. </translate>

<translate> Wikitext</translate> <translate> Result</translate>
<translate nowrap><!--T:109--> This is an example of multiple references to the same footnote.</translate><ref name="multiple"><translate nowrap><!--T:226--> Remember that when you refer to the same footnote multiple times, the text from the first reference is used.</translate></ref>

<translate nowrap><!--T:110--> Such references are particularly useful if different statements come from the same source.</translate><ref name="multiple" /> <translate nowrap><!--T:227--> Any reused tag should not contain extra content, that will spawn an error.</translate> <translate nowrap><!--T:228--> Only use empty tags in this role.</translate>

<translate nowrap><!--T:111--> A concise way to make multiple references is to use empty ref tags, which have a slash at the end.</translate>
<translate nowrap><!--T:229--> Although this may reduce redundant work, please be aware that if a future editor removes the first reference, this will result in the loss of all references using the empty ref tags.</translate><ref name="multiple" />

<translate nowrap>
==Notes== <!--T:112-->
</translate>
<references />

<translate> This is an example of multiple references to the same footnote.</translate>[1]

<translate> Such references are particularly useful when citing sources, if different statements come from the same source</translate>[1] <translate> Any reused tag should not contain extra content, that will spawn an error.</translate> <translate> Only use empty tags in this role.</translate>

<translate> A concise way to make multiple references is to use empty ref tags, which have a slash at the end.</translate> <translate> Although this may reduce redundant work, please be aware that if a future editor removes the first reference, this will result in the loss of all references using the empty ref tags.</translate>[1]

Plantilla:Fake heading

  1. 1,0 1,1 1,2 <translate> Remember that when you refer to the same footnote multiple times, the text from the first reference is used.</translate>

Plantilla:Note

<translate>

The <tvar name=1><references /></tvar> tag

</translate> <translate> The <tvar name=1><references /></tvar> tag inserts the text of all the citations which have been defined in <tvar name=2><ref></tvar> tags up to that point in the page.</translate> <translate> For example, based on the citations above, there should be reference for the <tvar name=1>note</tvar> group.</translate>

<translate> Wikitext</translate> <translate> Result</translate>
<references group="note"/>
  1. <translate> This footnote is used as an example in the "How to use" section.</translate>

<translate> The reference list [[<tvar name=1>Special:MyLanguage/Contributors/Projects/Columns for references</tvar>|can have a responsive width]] (displaying in some cases the references in several columns).</translate> <translate> In that case, the <tvar name=1>responsive</tvar> attribute is used to configure that behavior.</translate> <translate> On wikis with the default configuration, this will happen on every page; on others, you need to activate it.</translate>

<translate> If a page includes more than one <tvar name=1><references /></tvar> list, each list includes the <tvar name=2><ref></tvar> tags defined after the previous references list.</translate> <translate> If these references lists are produced by templates, each one lists the ref tags defined before the first references list, and there is an error message saying that there is a ref tag but not a references list.</translate>

<translate>

Grouped references

This may be disabled by <tvar name=1>$wgAllowCiteGroups = false;</tvar> if desired.

The following example generates separate reference lists for citations and miscellaneous footnotes: </translate>

<translate> Wikitext</translate> <translate> Result</translate>
<translate nowrap><!--T:130--> According to scientists, the Sun is pretty big.</translate><ref><translate nowrap><!--T:240--> E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23–25.</translate></ref> <translate nowrap><!--T:241--> In fact, it is very big.</translate><ref group="footnotes"> <translate nowrap><!--T:242--> Take their word for it.</translate> <translate nowrap><!--T:243--> Don't look directly at the sun!</translate></ref>

<translate nowrap>
==Notes== <!--T:131-->
</translate>
<references group="footnotes" />

<translate nowrap>
==References== <!--T:132-->
</translate>
<references />
<translate> According to scientists, the Sun is pretty big.</translate>[1] <translate> In fact, it is very big.</translate>[footnotes 1]

Plantilla:Fake heading

  1. <translate> Take their word for it.</translate> <translate> Don't look directly at the sun!</translate>

Plantilla:Fake heading

  1. <translate> E. Miller, The Sun, (New York: Academic Press, 2005), 23–25.</translate>

<translate> The anonymous group works as before, while references destined for the named group will only show up in the designated <tvar name=1><references /></tvar> element. </translate>

Plantilla:Note

<translate> The rendering of a given group can be customized across the wiki by creating {{<tvar name=1>tmpl|0=Plantilla:Blue</tvar>|name}} and listing the used signs in the order they appear, separated by spaces or newlines.</translate>

<translate> For example, if <tvar name=1>Plantilla:Blue</tvar> is created with the content <tvar name=2>

a b c d e f g h i j k l m n o p q r s t u v w x y z

</tvar> then the first <tvar name=3><ref group="lower-alpha">...</ref></tvar> renders <tvar name=4>[a]</tvar>, the second one renders <tvar name=5>[b]</tvar>, and so on, the 26th renders <tvar name=6>[z]</tvar>.</translate>

<translate> It is an error to use more footnotes in a custom-rendered group than the number of signs defined, so the 27th footnote in this group causes an error.</translate>

<translate> The following group names are often defined as custom groups by the following messages respectively: </translate>

<translate> group name</translate> <translate> message</translate>
upper-alpha MediaWiki:Cite link label group-upper-alpha
lower-alpha MediaWiki:Cite link label group-lower-alpha
upper-roman MediaWiki:Cite link label group-upper-roman
lower-roman MediaWiki:Cite link label group-lower-roman
lower-greek MediaWiki:Cite link label group-lower-greek

Plantilla:Note

<translate>

Citing different parts of the same source

</translate> <translate> When several parts from the same work are used as references in an article, you can cluster them in the reference section.</translate> <translate> This gives readers a way to identify which references originate from the same source.</translate> <translate> It also allows you to cite different parts of the same source without repeating the entire source every time.</translate>

<translate> Wikitext</translate> <translate> Result</translate>
<translate nowrap><!--T:141--> According to scientists, the Sun is pretty big.</translate><ref name="Miller"><translate nowrap><!--T:253--> E. Miller, ''The Sun'', (New York: Academic Press, 2005).</translate></ref> <translate nowrap><!--T:254--> In fact, it is very big.</translate><ref extends="Miller">p. 123</ref> <translate nowrap><!--T:255--> Take their word for it.</translate> <translate nowrap><!--T:256--> Don't look directly at the sun!</translate><ref extends="Miller">p. 42</ref>

<translate nowrap>
==References== <!--T:142-->
</translate>
<references />
<translate> According to scientists, the Sun is pretty big.</translate>[1] <translate> In fact, it is very big.</translate>[1.1] <translate> Take their word for it.</translate> <translate> Don't look directly at the sun!</translate>[1.2]

Plantilla:Fake heading

<translate> 1. E. Miller, The Sun, (New York: Academic Press, 2005)</translate>
   1.1 ↑ p. 123
   1.2 ↑ p. 42

Plantilla:Note

<translate>

Separating references from text

</translate> <translate> In-text references make it easy to copy the text to another page; on the other hand, they make it hard to read.</translate> <translate> References containing a lot of data, quotes or elaborate citation templates can make up a significantly larger fraction of the source than the text that will actually be visible.</translate> <translate> To avoid this, recent versions of the extension allow moving some or all of the references into the <tvar name=1><references /></tvar> section, to the place where they will actually appear to the reader.</translate>

<translate> Wikitext</translate> <translate> Result</translate>
<translate nowrap><!--T:152--> According to scientists, the Sun is pretty big.</translate><ref name="miller" /> <translate nowrap><!--T:262--> The Moon, however, is not so big.</translate><ref name="smith" />

<translate>
==Notes== <!--T:153-->
</translate>
<references>
<ref name="miller"><translate nowrap><!--T:263--> E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23–25.</translate></ref>
<ref name="smith"><translate nowrap><!--T:264--> R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44–46.</translate></ref>
</references>

<translate> According to scientists, the Sun is pretty big.</translate>[1] <translate> The Moon, however, is not so big.</translate>[2] Plantilla:Fake heading

  1. <translate> E. Miller, The Sun, (New York: Academic Press, 2005), 23–25.</translate>
  2. <translate> R. Smith, "Size of the Moon", Scientific American, 46 (April 1978): 44–46.</translate>

<translate> Thus, the code above will have the same output as the [[<tvar name=1>#Example</tvar>|first example]] above, although the numbering and order of the references will not in general be the same.

Substitution and embedded parser functions

</translate> <translate> Since Cite's <tvar name=1><ref></tvar> tag is parsed before MediaWiki's parser functions (e.g. <tvar name=2>{{#ifexpr:…}}</tvar>) or variables (e.g. <tvar name=3>{{PAGENAME}}</tvar>) or before <tvar name=4>subst:</tvar>, these will not work inside of citation references.</translate> <translate> Instead, you have to use the [[<tvar name=1>Special:MyLanguage/Help:Magic words#Miscellaneous</tvar>|magic word <tvar name=2>{{#tag:…}}</tvar>]].</translate>

<translate> Wikitext</translate> <translate> Result</translate>
Foo<ref><translate nowrap><!--T:159--> This is not working, see {{<tvar name=1>cite journal|url=https://www.google.com |author= |date= |accessdate={{subst:#time:Y-m-d|now}}</tvar>|title=Search}}</translate></ref> bar baz…
Foo{{#tag:ref|<translate nowrap><!--T:270--> Whereas this does, see {{<tvar name=1>cite journal|url=https://www.google.com |author= |date= |accessdate=2024-01-15</tvar>|title=Search}}</translate>}} bar baz…
<references />

Foo[1] bar baz… Foo[2] bar baz…

  1. <translate> This is not working, see {{<tvar name=1>cite journal|url=https://www.google.com |author= |date= |accessdate={{subst:#time:Y-m-d|now}}</tvar>|title=Search}}</translate>
  2. <translate> Whereas this does, see {{<tvar name=1>cite journal|url=https://www.google.com |author= |date= |accessdate=2021-03-11</tvar>|title=Search}}</translate>

<translate>

Adding an automatic heading before the references list

</translate> <translate> Up to MediaWiki 1.28, one could use the system message <tvar name=1>MediaWiki:Cite references prefix</tvar> to define a wiki-wide heading which would be automatically inserted before each references list.</translate> <translate> In MediaWiki 1.29, this system message was removed.</translate> <translate> A hacky way to enter a headline now is to add the following code to <tvar name=1>MediaWiki:Common.js</tvar>:</translate>

$(document).ready(function(){
    $('.mw-references-wrap').before('<h2><translate nowrap><!--T:275--> References</translate></h2>');
});

<translate> Note that this adds the header unconditionally, i.e. if you already have the header it gets added again thus creating duplicated headers.

If you only need a text heading (no link or other active elements) you could add the following to <tvar name=1>MediaWiki:Common.css</tvar> (Chrome 4, IE9, FF 3.5, Safari 3.1, Opera 7): </translate>

.mw-references-wrap::before {
  content: "Blue references";
  color: #0645ad;
  text-decoration: none;
  background: none;
  font-style: italic;
  font-size: 100%;
  font-weight: bold;
  line-height: 1.6;
  direction: ltr;
  font-family: sans-serif;
}

<translate>

Merging two texts into a single reference

</translate> <translate> A typical Wikisource issue are references that span multiple pages in the source material.</translate> <translate> These can be merged using a {{<tvar name=1>tmpl|0=<ref Plantilla:Attr></tvar>|name}} tag for the first part of the reference, and tagging the following parts with a tag {{<tvar name=2>tmpl|0=<ref Plantilla:Attr></tvar>|name}} using the same name.</translate>

<translate> Example: </translate>

<translate> Wikitext</translate> <translate> Result</translate>
<translate nowrap><!--T:168--> This is an example of merging multiple texts into the same footnote.</translate><ref name="main"><translate nowrap><!--T:276--> Remember that all the texts will be included into the reference containing the <tvar name=1>name="…"</tvar> attribute.</translate></ref>

<ref follow="main"><translate nowrap><!--T:169--> Simply include the additional text in a tag with the <tvar name=1>follow="…"</tvar> attribute, matching the first ref's name.</translate></ref>

<translate>
==References== <!--T:170-->
</translate>
<references/>

<translate> This is an example of merging multiple texts into the same footnote.</translate>[1]


<translate> References</translate>

  1. <translate> Remember that all the texts will be included in the reference containing the <tvar name=1>name="…"</tvar> attribute.</translate> <translate> Simply include the additional text in a tag with the <tvar name=1>follow="…"</tvar> attribute, matching the first ref's name.</translate>

<translate> When using this syntax, take care that the "<tvar name=1>follow</tvar>" part of the footnote is included on the same page as the first part of the reference.</translate>

<translate> Note that reference names cannot start with a number, so always include some text like, <tvar name=2><ref name="p32"></tvar> and <tvar name=3><ref follow="p32"></tvar>.</translate>

<translate>

Customization

The format of the output of <tvar name=1><ref></tvar> and <tvar name=2><references></tvar> is almost completely customizable through MediaWiki [[<tvar name=3>Special:MyLanguage/Help:System message</tvar>|messages]], that can be modified, for example, through the MediaWiki namespace depending on the configuration of the wiki.

For a list of messages that control the output of <tvar name=ref><ref></tvar> and <tvar name=references><references></tvar> and the values, if any, that are passed to them ($1, $2, $3 ...), see [<tvar name=url>https://www.mediawiki.org/w/index.php?title=Special%3AAllMessages&prefix=Cite_ref&filter=all&lang=en&limit=300</tvar> an up-to-date listing of the default values] that can be obtained directly from MediaWiki. </translate>

<translate> Incomplete list</translate>
  • cite_reference_link_key_with_num
    1. key
    2. num
  • cite_reference_link_prefix
  • cite_reference_link_suffix
  • cite_references_link_prefix
  • cite_references_link_suffix
  • cite_reference_link
    1. <translate> ref ID</translate>
    2. <translate> backlink ID</translate>
    3. <translate> count to display</translate>
  • cite_references_link_one
    • <translate> Used to format the source list that <tvar name=1><references /></tvar> outputs, it configures 3 things: the backlink ID, the ref ID, and text of note.</translate>
    1. <translate> backlink ID</translate> — <translate> Used for creating the number order of the source list.</translate>
    2. <translate> ref ID</translate> — <translate> Used to link back to the actual reference in the text, this is where you can configure the <tvar name=1>^</tvar> symbol.</translate>
    3. <translate> text of note</translate> — <translate> text used above describing the source info</translate>
  • cite_references_link_many
    1. <translate> backlink ID</translate>
    2. <translate> list of links</translate>
    3. <translate> text of note</translate>
  • cite_references_link_many_format
    1. <translate> ref ID</translate>
    2. <translate> numeric value to use as a backlink</translate>
    3. <translate> custom value (as defined in <tvar name=1>cite_references_link_many_format_backlink_labels</tvar> to use as a backlink)</translate>
  • cite_references_link_many_format_backlink_labels
  • cite_references_link_many_sep
  • cite_references_link_many_and
  • cite_references_suffix

<translate>

Set references to use <tvar name=1>^</tvar> and letters

</translate> <translate> To replace the default uparrow (<tvar name=1>↑</tvar>) with caret (<tvar name=2>^</tvar>), modify the following [[<tvar name=3>Special:MyLanguage/Help:System message</tvar>|system message]].</translate> <translate> All of these pages can be found on <tvar name=1>Special:AllMessages</tvar>.</translate>

MediaWiki:Cite reference backlink symbol
<translate> From</translate> <translate> To</translate>
^
MediaWiki:Cite references link many format

<translate> Replacing $2 with $3 changes the links from 1.0, 1.1, 1.2 to a, b, c etc… </translate>

<translate> From</translate> <translate> To</translate>
<sup>[[#$1|$2]]</sup>
<sup>[[#$1|$3]]</sup>

<translate> Searching for these pages for the first time will result in no matches.</translate> <translate> Simply click "Create this page" to edit the code.</translate> <translate> The changes will not show up until a page with references is rebuilt.</translate>

<translate>

Set reference and reference number highlighting

</translate>

Plantilla:Note

<translate> Add the following code to the <tvar name=1>MediaWiki:Common.css</tvar> page. </translate>

/* <translate nowrap><!--T:300--> make the Cite extension list of references look smaller and highlight clicked reference in blue</translate> */
ol.references { font-size: 90%; }
ol.references li:target { background-color: #ddeeff; }
sup.reference:target { background-color: #ddeeff; }

<translate>

Broken references

</translate>

<translate> If the <tvar name=ref><ref></tvar> or <tvar name=references><references /></tvar> tags are used incorrectly, the Cite extension will add an error message to the page, and will add the "<tvar name=category>Páginas con errores en las referencias</tvar>" category.</translate> <translate> These error messages will appear in the user interface language, either in the article content or in the References section.</translate> <translate> For example:</translate>

<translate> Wikitext</translate> <translate> Result</translate>
<translate nowrap><!--T:191--> This is an example of a references error message.</translate><ref broken><translate nowrap><!--T:192--> Intended text.</translate></ref>

<translate nowrap>
==Notes== <!--T:193-->
</translate>
<references />

<translate> This is an example of a references error message.</translate>Error en la cita: Etiqueta <ref> no válida; nombres no válidos, p. ej. demasiados

Plantilla:Fake heading

<translate> See the [[<tvar name=1>Specs/HTML/Extensions/Cite#Error representation</tvar>|spec for Parsoid's Cite error representation]].

See also

</translate>