Plantilla:Refn/doc

De Bestiario del Hypogripho

Propósito[editar]

Esta plantilla se utiliza para crear notas a pie de página, como alternativa y complemento a la etiqueta <ref>. Debido a una limitación técnica, algunos de los elementos de marcado estándar que se utilizan a menudo en el artículo no funcionan dentro de un conjunto de etiquetas <ref>...</ref>, incluyendo pero no limitado a Truco de tubería, sustitución de plantilla y otro conjunto "anidado" de etiquetas <ref>...</ref>. Por ejemplo, lo siguiente no funciona como se esperaría:

  1. <ref>[[Ayuda:Notas al pie|]]</ref> (Genera: [[Ayuda:Notas al pie|]] en vez de un wikilink)
  2. <ref>{{SUBST:TODAY}}</ref> (Genera: {{SUBST:TODAY}} en lugar de la fecha en que se realizó la edición)
  3. <ref>Nota explicativa a pie de página<ref>Citation</ref></ref> (Genera: Cite error: A <ref> tag is missing the closing </ref> (ver Help:Cite errors). </ref>)

Reemplazar el grupo de etiquetas <ref>...</ref> más externo con {{Refn}} permite el uso de los elementos de marcado enumerados anteriormente.

Uso[editar]

{{refn|group=groupname|name=name|Contents of the footnote}}

  • groupname: Groupname per WP:REFGROUP; if not specified, then the main and nested references will be rendered into the same reference list
  • name: Reference name per WP:REFNAME

Names for footnotes and groups must follow these rules:

  • Names are case-sensitive. Please do not use raNdOM capitalization.
  • Names must not be purely numeric; the software will accept something like ":1" (which is punctuation plus a number), but it will ignore "1" (purely numeric).
  • Names should have semantic value, so that they can be more easily distinguished from each other by human editors who are looking at the wikitext. This means that ref names like "Nguyen 2010" are preferred to names like ":1".
  • Names must be unique. You may not use the same name to define different groups or footnotes.
  • Please consider keeping reference names simple and restricted to the standard English alphabet and numerals. Failing that, if spaces are used, the following technical restrictions become relevant:
    • Quotation marks are preferred but optional if the only characters used are letters A–Z, a–z, digits 0–9, and the symbols !$%&()*,-.:;<@[]^_`{|}~. That is, all printable ASCII characters except #"'/=>?\.
    • Inclusion of any other characters, including spaces, requires that the reference name be enclosed in quotes; for example, name="John Smith".
    • The quote marks must be the standard, straight, double quotation marks ("); curly or other quotes will be parsed as part of the reference name.
    • Quote-enclosed reference names may not include a less-than sign (<) or a double straight quote symbol ("). These may be escaped with &lt; and &quot;, respectively.
  • You may optionally provide reference names even when the reference name is not required. This makes later re-use of the sourced reference easier.

Ejemplos[editar]

Notas al pie con citas[editar]

Markup Renders asError de Lua: expandTemplate: template "format item" does not exist.

Sustitución[editar]

El primer ejemplo muestra que la sustitución no funciona en una etiqueta <ref>...</ref> (el parametro |access-date= no aparece correctamente). El segundo ejemplo muestra que el parametro |access-date= se sustituye correctamente dentro de {{refn}}.

Markup Renders asError de Lua: expandTemplate: template "format item" does not exist.

Errores[editar]

Si falta el contenido de la referencia o de la nota, entonces Cite error: Invalid <ref> tag; las referencias sin nombre deben tener contenido. Será mostrado.

Si el contenido de la nota contiene un signo igual (=), el signo igual se interpretará como la activación de un parámetro con nombre y provocará un error. Esto se puede solucionar usando un parámetro numerado, por ejemplo:

Markup Renders asError de Lua: expandTemplate: template "format item" does not exist.


Ayuda:Footnotes

Véase también[editar]

Ayuda:Cite errors/Cite error group refs without references

{{Wikipedia referencing}}

TemplateData[editar]

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Refn

Esta plantilla se utiliza para crear notas a pie de página en Wikipedia, como alternativa y complemento a la etiqueta <ref>.

Parámetros de la plantilla

Es preferible escribir los parámetros en una sola línea.

ParámetroDescripciónTipoEstado
content1 refn

El contenido de la nota a pie de página.

Contenidoobligatorio
namename

El nombre de la nota al pie. Corresponde al atributo "name" de la etiqueta <ref>.

Cadenaopcional
groupgroup

El grupo de la nota al pie. Corresponde al atributo "group" de la etiqueta <ref>.

Cadenaopcional