La plantilla {{defn}}
se utiliza en glosarios estructurados por plantillas para crear definiciones de términos. Es un contenedor para <dd>...</dd>
, el elemento HTML de definición de lista de descripciones . La plantilla tiene una redirección mnemotécnica en .{{dd}}
Uso básico:
{{glosario}} {{término|1= término }} {{defn|1= Definición. }} {{fin del glosario}}
Se pueden aplicar enlaces, plantillas en línea, citas de referencias, estilos de marcado wiki, etc. a la definición. Técnicamente, la |1=
parte es opcional si el contenido de la definición no contiene el carácter "=", pero como cualquier editor puede agregar contenido, incluidas plantillas que contengan este carácter, siempre es más seguro nombrar explícitamente el parámetro. El |1=
parámetro también puede ser llamado |defn=
por aquellos a quienes no les interesen los parámetros numéricos.
Un uso más complejo podría ser:
{{defn|1=Definition. |no=# |term=term_id}}
donde da un número inicial para una definición en una lista de definiciones y proporciona el nombre del término utilizado en la plantilla a la que pertenece esta definición.|no=#
|term=term_id
{{Term}}
Las imágenes, las notas de sombrero y otros contenidos "adicionales" destinados a seguir inmediatamente al {{term}}
deben usarse en la parte superior (dentro) del primero {{defn}}
de los {{term}}
. No pueden colocarse entre {{term}}
y {{defn}}
o romperán el marcado del glosario. Las imágenes pueden, por supuesto, colocarse en cualquier otro lugar dentro del {{defn}}
, y las notas de fondo como pueden colocarse al final de pero dentro del contenido de s.{{more}}
{{defn}}
Si un único parámetro {{term}}
tiene varias definiciones, simplemente se numeran con el símbolo |2=parameter
de forma explícita. Piense en el parámetro como si representara " 2. a definición o posterior". También puede llamarlo " |no=
, si lo prefiere" (de " N.º "). Ejemplo:
Debido a la longitud desigual de las definiciones, suele ser más conveniente colocarlas |2=
antes de la |1=
descripción:
{{defn |2=1 |1=Lorem ipsum dolor sit amet.}}
o
{{defn |no=1 |1=Lorem ipsum dolor sit amet.}}
Este es un método muy robusto, ya que permite contenido complejo como citas en bloque, listas anidadas, notas de referencia cruzada y otro marcado a nivel de bloque dentro de cada definición. Las definiciones también se pueden vincular de forma independiente.
El uso de una nota de sombrero "estándar" con una definición numerada requeriría una numeración manual o se vería extraño. Pero este método está en desuso de todos modos. Un ejemplo de cómo forzarlo para que funcione:
{{ term | 1 = blackjack | content = blackjack {{ anchor | Blackjack }} }} {{ defn | 1 = {{ main | Blackjack }}}} {{ defn | no = 1 | 1 = Un juego de cartas en el que los jugadores intentan aproximarse a 21 pero sin superarlo. }} {{ defn | no = 2 | 1 = La mejor mano posible en el juego de blackjack, compuesta por un as y una carta con valor 10 (a saber, 10, J, Q, K). }}
Es mejor usar la plantilla para las notas del glosario y colocarla dentro de la primera definición (o la más aplicable). Esto evita la creación de una pseudodefinición para incluir la nota, como se muestra arriba. (que usa Module:Hatnote inline ) tiene algunos ajustes CSS para funcionar mejor que y sus derivados, cuando se usa dentro de una definición.{{ghat}}
{{Ghat}}
{{Hatnote}}
La mayoría de las restricciones sobre el contenido de Wikipedia
id
se han eliminado, por lo queid
los valores ya no tienen que comenzar con un[a-z][A-Z]
carácter alfabético, evitar la mayoría de los signos de puntuación ni sufrir otras limitaciones similares. El motor MediaWiki de Wikipedia es lo suficientemente inteligente como para escapar automáticamente cualquier carácter problemático, sobre la marcha.
{{term}}
|id=foo
{{term}}
{{defn}}
|term=
#
term-defn#
Tenga en cuenta que algunos caracteres de snorkelweasel (noun)
" han sido convertidos sobre la marcha por MediaWikia en el momento en que envía el ID al navegador como snorkelweasel_.28noun.29-defn1
. Aún puede vincularlo en esta página como #snorkelweasel (sustantivo)-defn1 (vea el código fuente de la página y compruébelo usted mismo: ese enlace tiene href=#snorkelweasel_.28noun.29-defn1
).
Las identificacionesmonstruo de grasa-defn1,monstruo de grasa-defn2, ysnorkelweasel_(sustantivo)-defn1son todos enlazables individualmente, p. ej. como [[Glossary of weird terms#blubbermonster-defn1]]
. Esto es especialmente útil para referencias cruzadas dentro del glosario, p. ej.See also [[#blubbermonster-defn2|"blubbermonster", sense 2]].
Para agregar más de un ancla enlazable, utilice la plantilla {{ anchor }} al comienzo del contenido de la definición:
{{defn|no=2|1= {{ ancla |elit|Elit}} Consectetur adipisicing elit.|term=blubbermonster}}
No hay ningún |lang=
parámetro, ya que en la Wikipedia en inglés todas las definiciones están necesariamente en inglés. Para usos del marcado del glosario con fines distintos a los del glosario en los que parte del contenido puede estar en un idioma extranjero, utilice plantillas de idioma. Por ejemplo, en una lista de traducciones de títulos de películas formateadas con marcado de glosario:
{{ glosario }} {{ término | 1 = Títulos de La Vie en Rose en varios idiomas | contenido = Títulos de '' [[ La Vie en Rose ]] '' en varios idiomas }} {{ defn | 1 = Francés: '' {{ lang | fr | La Vie en Rose }} '' }} {{ defn | 1 = Inglés: ''La vida en rosa'' }}...{{ fin del glosario }}
Esto muestra un ejemplo muy simple y otro bastante complejo:
El |style=
parámetro pasará el estilo CSS al <dd>
elemento, por ejemplo |style=font-family:serif;
, o lo que sea. Es decir, esto aplica estilo a la definición en sí, no al término al que se aplica, a otras definiciones o al glosario en su totalidad. Esta característica rara vez se necesita en los artículos, pero puede ser útil en otros lugares para cosas como hacer coincidir el estilo de la página de usuario personalizada.
El |id=
parámetro se puede utilizar para asignar un nombre de ID de una sola palabra que distinga entre mayúsculas y minúsculas a la definición. Debe ser único en la página. Esto se puede utilizar como un destino de enlace y podría tener otros usos de metadatos. Consulte la sección #Cómo hacer que la definición sea vinculable de forma independiente para saber cómo hacer que una definición sea vinculable de forma normal. Probablemente, la única razón para utilizar esta función es si hay dos términos con el mismo nombre en la página, lo que daría lugar a ID conflictivos.
El |class=
parámetro pasará una o más clases CSS separadas por espacios al <dd>
elemento. Rara vez hay motivos para hacer esto.
Nota: Con el uso de TemplateStyles en el encapsulamiento {{glossary}}
(que genera la etiqueta HTML <dl class="glossary">
), esta plantilla ya no incluye la glossary
clase de forma predeterminada.
{{glossary}}
también conocido como o – La mitad de un par de plantillas; se usa con una clase para abrir la lista de definiciones del glosario estructurado que se cierra.{{glossary start}}
{{glossary begin}}
<dl>
{{glossary end}}
{{glossary end}}
– La otra mitad de este par de plantillas; se utiliza </dl>
para cerrar la lista de definiciones que {{glossary}}
se abre.{{term}}
– El término del glosario al que {{defn}}
se aplica la definición; un personalizado <dt>
con una clase y un incrustado <dfn>
.{{defn}}
– La definición que se aplica a los {{term}}
usos ; <dd>
con una clase{{ghat}}
– una plantilla de nota de sombrero con el formato adecuado para la parte superior de una {{defn}}
definición{{glossary link}}
– metaplantilla para crear plantillas de acceso directo para vincular a definiciones en glosarios específicos