Lompat ke isi

Templat:Reflist: Perbedaan antara revisi

Dari Wiki Javasatu
dw>Izno
k 1 revisi diimpor
 
(3 revisi perantara oleh pengguna yang sama tidak ditampilkan)
Baris 1: Baris 1:
<templatestyles src="Reflist/styles.css" /><div class="reflist <!--
<div class="reflist <!--
-->{{#if:{{{1|}}}{{{colwidth|}}}|reflist-columns references-column-width}} <!--
-->{{#if: {{{1|}}}
-->{{#switch:{{{liststyle|{{{group|}}}}}}|upper-alpha|upper-roman|lower-alpha|lower-greek|lower-roman=reflist-{{{liststyle|{{{group}}}}}}}} <!--
    | columns {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
-->{{#if:{{{1|}}}|{{#iferror:{{#ifexpr: {{{1|1}}} > 1 }}||{{#switch:{{{1|}}}|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" <!-- end class
      | references-column-width
-->{{#if: {{{1|}}}<!-- start style -->
      | references-column-count references-column-count-{{#if:1|{{{1}}}}} }}
     | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }} |style="column-width: {{{1}}};"}}
    | {{#if: {{{colwidth|}}}
     | {{#if: {{{colwidth|}}}|style="column-width: {{{colwidth}}};"}}
      | references-column-width }} }}" style="<!--
    }}>
-->{{#if: {{{1|}}}
{{#tag:references|{{{refs|}}}|group={{{group|}}}|responsive={{#if:{{{1|}}}{{{colwidth|}}}|0|1}}}}</div>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using reflist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Reflist]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | group | liststyle | refs }}<noinclude>
     | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
      | column-width: {{{1|30em}}};
      | column-count: {{{1|2}}}; }}
     | {{#if: {{{colwidth|}}}
      | column-width: {{{colwidth|30em}}}; }} }} list-style-type: <!--
-->{{{liststyle|{{#switch: {{{group|}}}
    | upper-alpha
    | upper-roman
    | lower-alpha
    | lower-greek
    | lower-roman = {{{group}}}
    | #default = decimal}}}}};">
{{#tag:references|{{{refs|}}}|group={{{group|}}}}}</div><noinclude>
{{Documentation}}
{{Documentation}}
</noinclude>
</noinclude>

Revisi terkini sejak 13 Oktober 2023 16.17

<references group=""></references>
[lihat] [sunting] [riwayat] [hapus singgahan] Ikon dokumentasi Dokumentasi templat

This citation template provides formatting and organizational features for footnotes. It encapsulates the <references /> tag used by the cite.php MediaWiki extension to show the list of references as defined by <ref> tags. It adds support for a reduced font size, columns, groups.

If you don't use any of the additional features, then it produces the same output as the simpler and slightly faster <references /> tag.

Parameters

[sunting sumber]
  • First unnamed parameter:
    • column-count: a natural number specifying fixed columns into which the reference list is to be rendered. Example: |2|.
    • column-width: a typographic unit of measurement such as em, specifying the width for the reference list columns. Example: |30em|.
  • refs: used with named references (e.g., <ref name=name />); it specifies a list of some or all named references used in the article.
  • group: identifies by name the subset of references to be rendered; the value should correspond to that used inline, e.g., {{Reflist|group=groupname}} renders all references with groupname as the group name (<ref group=groupname>).
  • liststyle: specifies the style used when the reference list is enumerated; if none is specified, the default is to render a numbered list.
Lorem.<ref>ipsum</ref><ref>dolor</ref><ref>sit</ref><ref>amet</ref>
Consectetur.<ref>adipisicing</ref><ref>elit, sed</ref><ref>do</ref>

{{Reflist|3}}

gives:

Lorem.<ref>ipsum</ref><ref>dolor</ref><ref>sit</ref><ref>amet</ref> Consectetur.<ref>adipisicing</ref><ref>elit, sed</ref><ref>do</ref>

<references group=""></references>

TemplateData

[sunting sumber]
Ini dokumennya TemplateData untuk template ini digunakan oleh VisualEditor dan alat lainnya; lihat laporan penggunaan parameter bulanan untuk templat ini.

TemplateData untuk Reflist

<templatedata> { "description": { "en": "A reference list, with options for setting columns, groups, extra references etc.", "cs": "Seznam referencí s možnostmi nastavení sloupců, skupin, dalších odkazů atd.", "pt-br": "Uma lista de referências, com opções para definir colunas, grupos, referências extras etc." }, "params": { "1": { "label": { "en": "Column Count", "cs": "Počet sloupců", "pt-br": "Quantidade de colunas" }, "type": "number", "default": "1", "description": { "en": "A natural number specifying fixed columns into which the reference list is to be rendered.", "pt-br": "Um número natural que especifica colunas fixas nas quais a lista de referência deve ser renderizada." }, "example": { "en": "|2|", "cs": "|2|", "pt-br": "|2|" } }, "colwidth": { "label": { "en": "Column Width", "cs": "Šířka sloupce", "pt-br": "Largura da coluna" }, "type": "string", "description": { "en": "A typographic unit of measurement such as “em”, specifying the width for the reference list columns.", "pt-br": "Uma unidade de medida tipográfica como “em”, especificando a largura das colunas da lista de referência." }, "example": { "en": "|colwidth=30em|", "cs": "|colwidth=30em|", "pt-br": "|colwidth=30em|" } }, "liststyle": { "label": { "en": "List Style", "cs": "Styl seznamu", "pt-br": "Estilo de lista" }, "description": { "en": "Specifies the style used when the reference list is enumerated; accepts any valid CSS value defined for “list-style-type”.", "cs": "Určuje styl použitý při výčtu seznamu odkazů; přijímá jakoukoli platnou hodnotu CSS definovanou pro “typ-style-listu”.", "pt-br": "Especifica o estilo usado quando a lista de referência é enumerada; aceita qualquer valor CSS válido definido para “list-style-type”." }, "suggestedvalues": [ "decimal", "lower-alpha", "lower-greek", "lower-roman", "upper-alpha", "upper-roman" ], "default": "decimal", "type": "string" }, "group": { "label": { "en": "Group name", "cs": "Název skupiny", "pt-br": "Nome do grupo" }, "description": { "en": "The name of the references group. Identifies by name the subset of references to be rendered; the value should correspond to that used inline.", "cs": "Název skupiny doporučení.", "pt-br": "O nome do grupo da referência. Identifica pelo nome o subconjunto de referências a serem renderizadas; o valor deve corresponder ao inline usado." }, "type": "string", "example": {

"en": "
<references group="groupname"></references>
renders all references with “groupname” as the group name (<ref group=“groupname”>)", "pt-br": "
<references group="groupname"></references>
renderiza todas as referências com “groupname” como o nome do grupo (<ref group=“groupname”>)"

} }, "refs": { "label": { "en": "List of references", "cs": "Seznam doporučení", "pt-br": "Lista de referências" }, "description": { "en": "Provides a space to define named references for use in the article. Used with named references (e.g., ‎<ref name=“name” />); it specifies a list of some or all named references used in the article.", "cs": "Poskytuje prostor pro definování pojmenovaných odkazů pro použití v článku.", "pt-br": "Fornece um espaço para definir referências nomeadas para uso no artigo. Usado com referências nomeadas (por exemplo, <ref name=“name” />); ele especifica uma lista de algumas ou todas as referências nomeadas usadas no artigo." }, "suggested": true, "type": "content" } } } </templatedata>