La plantilla {{term}}
se utiliza en glosarios estructurados por plantillas para crear términos que se deben definir, que están correctamente estructurados, tienen valor semántico y se pueden vincular como si fueran secciones independientes. Es un contenedor para <dt>...</dt>
, el elemento HTML de término de lista de descripción . La plantilla tiene una redirección mnemotécnica en .{{dt}}
Uso básico:
{{ glosario }} {{ término|1= término }} {{ defn }} {{ fin del glosario }}
Se pueden aplicar plantillas en línea, citas de referencias, estilos de marcado wiki, etc. al término en el segundo parámetro ( |content=
o |2=
) siempre que permanezca sin marcado en el primer parámetro ( |term=
o |1=
). Técnicamente, los nombres de parámetros explícitos son opcionales si el término o el contenido no contienen el carácter "=", pero como cualquier editor puede agregar material, incluidas plantillas o URL con este carácter, siempre es más seguro nombrar o numerar explícitamente los parámetros .
{{term|term=E=MC²}}
{{term|1=E=MC²}}
{{term|E=MC²}}
Un uso más complejo suele ser:
{{term|term=term with no markup |content=term with markup}}
o
{{term|1=term with no markup |2=term with markup}}
o
{{term|1=term with no markup |content=term with markup}}
Si el segundo |content=
parámetro o tiene un estilo wikimarkup, está vinculado o se modifica de alguna otra forma dentro de la plantilla, el término también debe conservarse sin estilo como el primer |term=
parámetro o. Si no se hace esto, la plantilla no funcionará correctamente, ya que debe tener un nombre de término "limpio" para utilizarlo como el id
del elemento, para fines de vinculación, entre otras razones. El orden refleja intencionalmente el de los enlaces wiki entubados ( ).[[title|styled]]
{{term|1=esprit de corps|2=''esprit de corps''}}
{{term|1=''esprit de corps''}}
El estilo tampoco se puede aplicar alrededor de la plantilla, ya que es un contenedor de contenido (el término), no el contenido en sí (y hacerlo producirá un marcado no válido que tendrá resultados impredecibles según el navegador):
''
{{term|1=esprit de corps}}
''
Por las mismas razones que se desaconsejan los enlaces a otras páginas en los encabezados, se desaconsejan los enlaces en los términos del glosario :
{{term|1=esprit de corps|2=''[[esprit de corps]]''}}
{{term|1=esprit de corps|2=''esprit de corps''}}
{{ghat}}
{{defn}}
Nuevamente, al igual que con el primer parámetro (el término) en sí, si =
se utiliza el carácter " " (signo igual) en el contenido de este segundo parámetro, la sintaxis requiere que el parámetro se especifique explícitamente (y debido a que muchas URL, por ejemplo en citas de referencia, pueden contener este carácter, siempre es más seguro numerar o nombrar los parámetros):
numerado:
{{term|1=E=MC²|2=E=MC<sup>2</sup>}}
o nombrado:
{{term|term=E=MC²|content=E=MC<sup>2</sup>}}
{{term}}
crea automáticamente un punto de anclaje de enlace (un HTML id
) a partir de una conversión a minúsculas del término original ( |term=
o |1=
) o |id=
. Alrededor del 90% de los enlaces a las entradas del glosario estarán a mitad de la oración y, por lo tanto, comenzarán con una letra minúscula, excepto los nombres propios. La plantilla (y sus derivados como ) convertirán automáticamente en minúsculas cualquier entrada que se les proporcione como destino de enlace. Por lo tanto, el único problema es si crea manualmente un enlace como y no convierte la parte en minúsculas . Por lo tanto, debe usar .{{glossary link}}
{{cuegloss}}
[[Glossary of American political jargon#Democratic Party|Democratic Party]]
#Democratic Party
{{glossary link}}
Si su glosario tiene un caso inusual en el que una entrada y otra comparten exactamente el mismo nombre excepto por las mayúsculas y minúsculas (por lo tanto, obtendrían el mismo HTML en minúsculas ), entonces se le debe dar un valor id
único a la entrada en mayúsculas y se debe evitar que entre en conflicto con el HTML de la entrada en minúsculas . Esto se puede hacer cambiando su nombre a una variante (por ejemplo, con un número) y luego inyectando manualmente un segundo HTML.|id=
id
|id=
identificación(con mayúsculas) utilizando el |content=
parámetro y una plantilla de anclaje:
{{término|término=foo}} {{defn|Definición de la versión en minúsculas aquí... {{term|term=Foo |id=Foo_2 |content={{vanchor|Foo}} }} {{defn|Definición de versión de nombre propio aquí ...
Luego, puede vincularlos como #foo
y #Foo
, respectivamente. (Técnicamente, el segundo también se puede abordar como #foo_2
, que habrá sido convertido en minúscula por el código de plantilla, pero esto no sería muy intuitivo y es solo un artefacto de la solución alternativa).
La plantilla también se puede utilizar en el parámetro aka , por ejemplo, para proporcionar el plural del término (el uso más común), una ortografía alternativa, el nombre antiguo de una entrada a la que se vinculó pero que desde entonces ha cambiado, o un nombre de ancla de enlace de acceso directo.{{anchor}}
|content=
|2=
Al igual que con los términos con estilo, el primer parámetro debe utilizarse para proporcionar el término "sencillo" y el segundo para proporcionar este marcado adicional. No es necesario agregar el término en sí a la {{anchor}}
plantilla cuando se utiliza {{term}}
:
{{term|1=shortstop |content=shortstop{{anchor|shortstops|short-stop|short stop}}
}}
Por el contrario, cuando se utilizan términos delimitados por punto y coma en glosarios no estructurados, el término no necesita agregarse explícitamente como ancla si se desea un anclaje de enlace (lo que casi siempre sucede):
;shortstop
{{anchor|shortstop
|shortstops|short-stop|short stop}}
o utilizar{{vanchor}}
;
{{vanchor|shortstop
|shortstops|short-stop|short stop}}
(Estrictamente hablando, este hecho no tiene nada que ver con esta plantilla, pero puede ser de utilidad para los editores que estén pasando de un estilo de glosario a otro).
Se pueden usar dos o más {{terms}}
para sinónimos con una definición compartida, aunque tenga en cuenta que las personas que buscan uno y no lo encuentran donde esperan que esté ordenado alfabéticamente pueden asumir que falta si no crea una entrada de referencia cruzada.El parámetro |multi=y
se utiliza en el segundo término y en los términos subsiguientes para agrupar visualmente los términos de manera que quede claro que comparten una definición:
|multi=y
está obsoleto . Con el uso de TemplateStyles , {{term}}
los s sucesivos se agruparán visualmente de forma automática. Esto ayuda a que las plantillas de glosario {{term}}
se {{defn}}
adhieran más estrechamente a la semántica de HTML <dt>
y <dd>
las etiquetas.
El siguiente ejemplo demuestra que el uso del |multi=y
parámetro ya no tiene ningún efecto en la salida renderizada (porque ahora es el comportamiento predeterminado):
{{term|1=aspirina}}{{defn|1=Un analgésico suave de la familia de los antiinflamatorios no esteroides (AINE)...}}{{term|1=heroína}} {{term|1=diacetilmorfina |multi=y}} {{term|1=diamorpina |multi=y}}{{defn|1=Una droga narcótica sintética de la familia de los opiáceos...}}{{term|1=ranitidina}}{{defn|1=Un antiácido de la familia de los inhibidores de la bomba de protones...}}
Para indicar el idioma de un término que no sea inglés, utilice la plantilla y los códigos de idioma ISO 639 documentados en esa plantilla:{{lang}}
{{term|1=esprit de corps |content={{lang|fr|esprit de corps}}}}
Esto no muestra ningún cambio visual para la mayoría de los idiomas:
Para todos los idiomas distintos del inglés, esto proporciona muchas funciones de metadatos, pero es esencial para aquellos que no usan el alfabeto latino, para que el contenido se muestre correctamente en varios navegadores.
Si es útil indicar el nombre del idioma, existen plantillas individuales para la mayoría de los idiomas, con nombres basados en los códigos ISO , y que ponen automáticamente en cursiva el contenido extranjero:
{{term|1=esprit de corps |content={{langx|fr|esprit de corps}}}}
que se traduce como:
Como se detalla anteriormente, dos o más términos, como variaciones o alternativas, pueden compartir definiciones. El caso de uso más común para esto es presentar el término en dos variantes del inglés. Ejemplo:
{{term|1=neumático|content= {{langx|es-ES|neumático}} } }{{term|1=neumático|contenido= {{langx|es-ES|neumático}} }}{{defn|1=Una cubierta de rueda resistente, generalmente hecha de caucho vulcanizado.}}
Resultado:
En un formato diferente, más apropiado para glosarios alfabéticos:
{{term|1=tire|content= {{lang|en-US|tire}} {{small|([[Inglés americano]])}} } }{{term|1=neumático|contenido= {{lang|en-GB|neumático}} {{small|([[inglés británico]])}} } }{{defn|1=Una cubierta de rueda resistente, generalmente hecha de caucho vulcanizado.}}
Resultado:
Este ejemplo utiliza la plantilla con códigos de idioma como primer parámetro, en lugar de las plantillas.{{Lang}}
{{lang-xx}}
La {{Term}}
plantilla no tieneparámetro propio (y no debería: hay demasiados peligros).|lang=
El |style=
parámetro pasará el estilo CSS al <dt>
elemento, p. ej |style=font-family:serif;
., esto da estilo al término en sí, no a sus definiciones, a otras entradas de términos o al glosario en su totalidad. Esta característica es poco común, pero a veces importante, en los artículos (normalmente para dar formato a la apariencia de una entrada específica por alguna razón, p. ej., ciertas constantes matemáticas y similares que siempre se dan en una fuente serif). También puede ser útil fuera de los artículos, para cosas como hacer coincidir el estilo de la página de usuario o la página de proyecto personalizada.
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.
|id=
parámetro se puede utilizar para asignar un nombre de ID de una sola palabra que distinga entre mayúsculas y minúsculas al término. Debe ser único en la página. Esto se puede utilizar como otro objetivo #link y podría tener otros usos de metadatos. De forma predeterminada, el parámetro |term=
aka |1=
ya está configurado como el ID y esto rara vez se debe anular, a menos que haya dos términos idénticos en la misma página que creen ID en conflicto. Por lo general, la plantilla se utiliza para agregar más objetivos de enlace a una entrada . Tenga en cuenta que proporcionar un vacío (como con HTML ) emitirá un parámetro vacío a la etiqueta, que es HTML no válido.{{anchor}}
id
<!--comments-->
id
El |noid=
parámetro, si se proporciona como true/ / , suprimirá por completo la generación del campo. Esto suele ser indeseable, excepto en el caso en que el ancla del campo generado sea otra definida en el artículo.yyesid
|text=
|term=
{{Term}}
El |class=
parámetro pasará una o más clases CSS separadas por espacios al <dt>
elemento. Rara vez hay motivos para hacer esto, especialmente en el espacio principal.
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.
Esto muestra un ejemplo muy simple y otro bastante complejo:
Las imágenes, las notas de sombrero y otro contenido "adicional" que se pretende que siga 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. Por supuesto, las imágenes pueden colocarse en cualquier otro lugar dentro de {{defn}}
, y las notas de fondo como {{ more }} pueden colocarse al final de, pero dentro de , un {{defn}}
. Cuando se usa con un término de múltiples definiciones, la definición en la que {{ghat}}
aparece el debe numerarse manualmente (normalmente 1 ...
, como se muestra en el ejemplo siguiente).
Lo que hace esta plantilla a nivel técnico es envolver el término en el <dfn>...</dfn>
elemento HTML para marcar semánticamente el término como la instancia definitoria en la página del término definido, y coloca este contenido marcado dentro de un elemento <dt>...</dt>
de término de una <dl>...</dl>
lista de descripción (también conocida como lista de definición, lista de asociación; la lista es generada por las plantillas y ) y le da CSS al elemento. Esa clase aún no está haciendo nada, pero podría hacerlo más adelante, como un ligero aumento del tamaño de fuente.{{glossary}}
{{glossary end}}
class="glossary"
<dt>
No especifique un ID nulo (como ). Los parámetros HTML con IDid=<!-- no ID -->
nulos o vacíos generan una salida HTML5 no válida.
{{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