Template:Refbegin/doc: Difference between revisions

→‎Option 3: Hanging indentation: split subsections, {{tlx}} {{fake heading|sub=2|}}
m (1 revision imported)
imported>Cedar101
(→‎Option 3: Hanging indentation: split subsections, {{tlx}} {{fake heading|sub=2|}})
 
Line 2: Line 2:
{{Uses TemplateStyles|Template:Refbegin/styles.css}}
{{Uses TemplateStyles|Template:Refbegin/styles.css}}


'''{{tl|refbegin}}''' and its complementary closing template '''{{tl|refend}}''' are used to apply any of several optional styles or presentational choices for [[bibliography|bibliographies]] or reference lists—that is, lists of fully-specified references, sources, and/or works cited, sorted alphabetically by author or contributor) that appear in Wikipedia articles.
'''{{tl|refbegin}}''' and its complementary closing template '''{{tl|refend}}''' are used to apply any of several optional styles or presentational choices for [[bibliography|bibliographies]] or reference lists—that is, lists of fully-specified references, sources, or works cited, sorted alphabetically by author or contributor) that appear in Wikipedia articles.


These bibliographies or reference lists frequently appear in dedicated sections within an article, variously titled <code>==References==</code>, <code>==Works cited==</code>, <code>==Bibliography==</code>, <code>==Further reading==</code>, <code>==Published works==</code>, and so on.
These bibliographies or reference lists frequently appear in dedicated sections within an article, variously titled <code>==References==</code>, <code>==Works cited==</code>, <code>==Bibliography==</code>, <code>==Further reading==</code>, <code>==Published works==</code>, and so on.
Line 23: Line 23:
! scope="row" style="text-align: left;" | apply hanging indent
! scope="row" style="text-align: left;" | apply hanging indent
| <code><nowiki>{{refbegin|indent=yes}}</nowiki></code>||will apply hanging indent if an individual reference wraps over more than one line in the browser's display window
| <code><nowiki>{{refbegin|indent=yes}}</nowiki></code>||will apply hanging indent if an individual reference wraps over more than one line in the browser's display window
|-
! scope="row" style="text-align: left;" | normal font size
| <code><nowiki>{{refbegin|normalfont=yes}}</nowiki></code>||font size 100% (instead of default 90% for template)
|}
|}
Each use of {{tl|refbegin}}, with or without parameters, needs an accompanying {{tl|refend}} closing template to 'turn off' the formatting; refend does not need any parameters.
Each use of {{tl|refbegin}}, with or without parameters, needs an accompanying {{tl|refend}} closing template to 'turn off' the formatting; refend does not need any parameters.
Line 60: Line 57:


===Option 1: Default behaviour===
===Option 1: Default behaviour===
The default usage (without parameters) applies a style that reduces the text size of the bibliographies/reference list entries. This can be useful to make a long bibliography/list of references display more compactly, and it also mimics the formatting style applied to [[WP:FN|footnotes]] by the {{tl|reflist}} template.
The default usage (without parameters) applies a style that reduces the text size of the bibliographies/reference list entries. This can be useful to make a long bibliography/list of references display more compactly, and it also mimics the formatting style applied to [[WP:FN|footnotes]] by the {{tlx|reflist}} template.


The {{tl|reflist}} formats footnotes—any text in the article body that is placed between {{tag|ref}} tags—that are auto-generated by the [[Wikipedia:Cite.php|cite.php]] extension, called by {{tl|reflist}}. In the case of articles using the [[WP:CITESHORT|'shortened' footnotes]] referencing system, these footnotes will typically contain an abbreviated citation such as <code><nowiki><ref>Smith 2002, p.123</ref></nowiki></code> that corresponds with an entry in the bibliography/references list section (other text such as discursive notes may appear as well).
The {{tlx|reflist}} formats footnotes—any text in the article body that is placed between {{xtag|ref}} tags—that are auto-generated by the [[Wikipedia:Cite.php|cite.php]] extension, called by {{tlx|reflist}}. In the case of articles using the [[WP:CITESHORT|'shortened' footnotes]] referencing system, these footnotes will typically contain an abbreviated citation such as {{xtag|ref|p|content=Smith 2002, p.123}} that corresponds with an entry in the bibliography/references list section (other text such as discursive notes may appear as well).


The font size is set to 90% in the corresponding [[WP:TemplateStyles|TemplateStyles]] page.
The font size is set to 90% in the corresponding [[WP:TemplateStyles|TemplateStyles]] page.
Line 72: Line 69:
</pre>
</pre>


If there is a bibliography/references list but no footnoted citations (e.g. in general references or parenthetical referencing systems) then use {{tl|refbegin}} and {{tl|refend}} like so:
If there is a bibliography/references list but no footnoted citations (e.g. in general references or parenthetical referencing systems) then use {{tlx|refbegin}} and {{tlx|refend}} like so:


<pre>
<syntaxhighlight lang="tid">
==References==
==References==
{{refbegin}}
{{refbegin}}
Line 80: Line 77:
*general reference 2
*general reference 2
{{refend}}
{{refend}}
</pre>
</syntaxhighlight>


If there are footnoted citations and a separate bibliography/references list (i.e., the [[WP:CITESHORT]] system), then place {{tl|reflist}} to generate the footnotes in one section (immediately above the bibliography/references list), and use {{tl|refbegin}} in the latter section:
If there are footnoted citations and a separate bibliography/references list (i.e., the [[WP:CITESHORT]] system), then place {{tlx|reflist}} to generate the footnotes in one section (immediately above the bibliography/references list), and use {{tlx|refbegin}} in the latter section:


<pre>
<syntaxhighlight lang="tid">
==Notes==
==Notes==
{{reflist}} <!--this will auto-generate the numbered list of footnotes/cites -->
{{reflist}} <!--this will auto-generate the numbered list of footnotes/cites -->
Line 94: Line 91:
*etc
*etc
{{refend}}
{{refend}}
</pre>
</syntaxhighlight>


===Option 2: Multiple columns===
===Option 2: Multiple columns===
If a value with a unit is supplied as the first parameter, i.e. <code>30em</code>, the template will display the bibliography/references list in columns with a minimum width of that value, allowing the browser to determine the optimal number of columns. Using <nowiki>{{refbegin|30em}}</nowiki> for instance is useful for short citations. If no parameter is specified, the default is a single column.
If a value with a unit is supplied as the first parameter, i.e. <code>30em</code>, the template will display the bibliography/references list in columns with a minimum width of that value, allowing the browser to determine the optimal number of columns. Using <nowiki>{{refbegin|30em}}</nowiki> for instance is useful for short citations. If no parameter is specified, the default is a single column.


{{pre2|<nowiki>
{{pre|<nowiki>
==References==
==References==
{{refbegin|30em}}
{{refbegin|30em}}
Line 121: Line 118:
A [[hanging indentation]] may be applied to bibliographies/reference lists by using the {{para|indent}} parameter. This option can be useful in long bibliographies/reference lists and in particular when individual entries in the list are long, i.e. they wrap over more than one line in the browser display window. Applying a hanging indent to the list makes it much easier to distinguish the keywords (i.e. normally the authors' names) in the bibliography and makes them stand out from preceding and succeeding lines of text. Hanging indents in bibliographies also form part of several widely used citation style implementations, such as APA, MLA, and Chicago.
A [[hanging indentation]] may be applied to bibliographies/reference lists by using the {{para|indent}} parameter. This option can be useful in long bibliographies/reference lists and in particular when individual entries in the list are long, i.e. they wrap over more than one line in the browser display window. Applying a hanging indent to the list makes it much easier to distinguish the keywords (i.e. normally the authors' names) in the bibliography and makes them stand out from preceding and succeeding lines of text. Hanging indents in bibliographies also form part of several widely used citation style implementations, such as APA, MLA, and Chicago.


To use, set <code><nowiki>{{refbegin|indent=yes}}</nowiki></code>.
To use, set {{tlx|refbegin|indent{{=}}yes}}.


'''Examples'''
==== Examples ====


'''''a)''' Using {{tl|refbegin}} with the hanging indent option ''|indent=yes'' applied:''
===== Using {{tl|refbegin}} with the hanging indent option {{para|indent|yes}} applied =====
 
<syntaxhighlight lang="moin" style="overflow:auto;">
== References ==


<pre style="overflow:auto;">
==References==
{{refbegin|indent=yes}}
{{refbegin|indent=yes}}
* {{cite book |author= Dakin, Karen|year= 1994|chapter= El náhuatl en el yutoazteca sureño: algunas isoglosas gramaticales y fonológicas|title= Investigaciones lingüísticas en Mesoamérica |series= Estudios sobre Lenguas Americanas, no. 1|editor1=Carolyn MacKay |editor2=Verónica Vázquez |publisher= Universidad Nacional Autónoma de México, Instituto de Investigaciones Filológicas, Seminario de Lenguas Indígenas|location= México D.F.|pages= 3–86 |isbn= 968-36-4055-9 |oclc= 34716589 |language=es}}
* {{cite book |author= Dakin, Karen|year= 1994|chapter= El náhuatl en el yutoazteca sureño: algunas isoglosas gramaticales y fonológicas|title= Investigaciones lingüísticas en Mesoamérica |series= Estudios sobre Lenguas Americanas, no. 1|editor1=Carolyn MacKay |editor2=Verónica Vázquez |publisher= Universidad Nacional Autónoma de México, Instituto de Investigaciones Filológicas, Seminario de Lenguas Indígenas|location= México D.F.|pages= 3–86 |isbn= 968-36-4055-9 |oclc= 34716589 |language=es}}
Line 135: Line 133:
* {{cite book |author= Voegelin, Charles F.|author2= Florence M. Voegelin |author3=Kenneth L. Hale |year= 1962 |title= Typological and Comparative Grammar of Uto-Aztecan I: Phonology |type= Supplement to International Journal of American linguistics, vol. 28, no. 1 |series= Indiana University publications in anthropology and linguistics, Memoir 17 |location= Baltimore MD |publisher= Waverly Press |oclc= 55576894}}
* {{cite book |author= Voegelin, Charles F.|author2= Florence M. Voegelin |author3=Kenneth L. Hale |year= 1962 |title= Typological and Comparative Grammar of Uto-Aztecan I: Phonology |type= Supplement to International Journal of American linguistics, vol. 28, no. 1 |series= Indiana University publications in anthropology and linguistics, Memoir 17 |location= Baltimore MD |publisher= Waverly Press |oclc= 55576894}}
{{refend}}
{{refend}}
</pre>
</syntaxhighlight>
 
{{box|
'''References'''
{{fake heading|sub=2|References}}
{{refbegin|indent=yes}}
{{refbegin|indent=yes}}
* {{cite book |author= Dakin, Karen|year= 1994|chapter= El náhuatl en el yutoazteca sureño: algunas isoglosas gramaticales y fonológicas|title= Investigaciones lingüísticas en Mesoamérica |series= Estudios sobre Lenguas Americanas, no. 1|editor1=Carolyn MacKay |editor2=Verónica Vázquez |publisher= Universidad Nacional Autónoma de México, Instituto de Investigaciones Filológicas, Seminario de Lenguas Indígenas|location= México D.F.|pages= 3–86 |isbn= 968-36-4055-9 |oclc= 34716589 |language=es}}
* {{cite book |author= Dakin, Karen|year= 1994|chapter= El náhuatl en el yutoazteca sureño: algunas isoglosas gramaticales y fonológicas|title= Investigaciones lingüísticas en Mesoamérica |series= Estudios sobre Lenguas Americanas, no. 1|editor1=Carolyn MacKay |editor2=Verónica Vázquez |publisher= Universidad Nacional Autónoma de México, Instituto de Investigaciones Filológicas, Seminario de Lenguas Indígenas|location= México D.F.|pages= 3–86 |isbn= 968-36-4055-9 |oclc= 34716589 |language=es}}
Line 144: Line 142:
* {{cite book |author= Voegelin, Charles F.|author2= Florence M. Voegelin |author3=Kenneth L. Hale |year= 1962 |title= Typological and Comparative Grammar of Uto-Aztecan I: Phonology |type= Supplement to International Journal of American linguistics, vol. 28, no. 1 |series= Indiana University publications in anthropology and linguistics, Memoir 17 |location= Baltimore MD |publisher= Waverly Press |oclc= 55576894}}
* {{cite book |author= Voegelin, Charles F.|author2= Florence M. Voegelin |author3=Kenneth L. Hale |year= 1962 |title= Typological and Comparative Grammar of Uto-Aztecan I: Phonology |type= Supplement to International Journal of American linguistics, vol. 28, no. 1 |series= Indiana University publications in anthropology and linguistics, Memoir 17 |location= Baltimore MD |publisher= Waverly Press |oclc= 55576894}}
{{refend}}
{{refend}}
}}
===== Using indent in combination with multi-column (in this case, n = 2) display {{tlx|refbegin|2|indent{{=}}yes}} (note that multi-column only works in some browsers) =====


'''''b)''' Using indent in combination with multi-column (in this case, n = 2) display <nowiki>{{refbegin|2|indent=yes}}</nowiki> (note that multi-column only works in some browsers):''
<syntaxhighlight lang="moin" style="overflow:auto;">
== References ==


<pre style="overflow:auto;">
==References==
{{refbegin|30em|indent=yes}}
{{refbegin|30em|indent=yes}}
* {{cite book |author= Dakin, Karen|year= 1994|chapter= El náhuatl en el yutoazteca sureño: algunas isoglosas gramaticales y fonológicas|title= Investigaciones lingüísticas en Mesoamérica |series= Estudios sobre Lenguas Americanas, no. 1|editor1=Carolyn MacKay |editor2=Verónica Vázquez |publisher= Universidad Nacional Autónoma de México, Instituto de Investigaciones Filológicas, Seminario de Lenguas Indígenas|location= México D.F.|pages= 3–86 |isbn= 968-36-4055-9 |oclc= 34716589 |language=es}}
* {{cite book |author= Dakin, Karen|year= 1994|chapter= El náhuatl en el yutoazteca sureño: algunas isoglosas gramaticales y fonológicas|title= Investigaciones lingüísticas en Mesoamérica |series= Estudios sobre Lenguas Americanas, no. 1|editor1=Carolyn MacKay |editor2=Verónica Vázquez |publisher= Universidad Nacional Autónoma de México, Instituto de Investigaciones Filológicas, Seminario de Lenguas Indígenas|location= México D.F.|pages= 3–86 |isbn= 968-36-4055-9 |oclc= 34716589 |language=es}}
Line 155: Line 154:
* {{cite book |author= Voegelin, Charles F.|author2= Florence M. Voegelin |author3=Kenneth L. Hale |year= 1962 |title= Typological and Comparative Grammar of Uto-Aztecan I: Phonology |format= Supplement to International Journal of American linguistics, vol. 28, no. 1 |series= Indiana University publications in anthropology and linguistics, Memoir 17 |location= Baltimore MD |publisher= Waverly Press |oclc= 55576894}}
* {{cite book |author= Voegelin, Charles F.|author2= Florence M. Voegelin |author3=Kenneth L. Hale |year= 1962 |title= Typological and Comparative Grammar of Uto-Aztecan I: Phonology |format= Supplement to International Journal of American linguistics, vol. 28, no. 1 |series= Indiana University publications in anthropology and linguistics, Memoir 17 |location= Baltimore MD |publisher= Waverly Press |oclc= 55576894}}
{{refend}}
{{refend}}
</pre>
</syntaxhighlight>


'''References'''
{{box|
{{fake heading|sub=2|References}}
{{refbegin|30em|indent=yes}}
{{refbegin|30em|indent=yes}}
* {{cite book |author= Dakin, Karen|year= 1994|chapter= El náhuatl en el yutoazteca sureño: algunas isoglosas gramaticales y fonológicas|title= Investigaciones lingüísticas en Mesoamérica |series= Estudios sobre Lenguas Americanas, no. 1|editor1=Carolyn MacKay |editor2=Verónica Vázquez |publisher= Universidad Nacional Autónoma de México, Instituto de Investigaciones Filológicas, Seminario de Lenguas Indígenas|location= México D.F.|pages= 3–86 |isbn= 968-36-4055-9 |oclc= 34716589 |language=es}}
* {{cite book |author= Dakin, Karen|year= 1994|chapter= El náhuatl en el yutoazteca sureño: algunas isoglosas gramaticales y fonológicas|title= Investigaciones lingüísticas en Mesoamérica |series= Estudios sobre Lenguas Americanas, no. 1|editor1=Carolyn MacKay |editor2=Verónica Vázquez |publisher= Universidad Nacional Autónoma de México, Instituto de Investigaciones Filológicas, Seminario de Lenguas Indígenas|location= México D.F.|pages= 3–86 |isbn= 968-36-4055-9 |oclc= 34716589 |language=es}}
Line 164: Line 164:
* {{cite book |author= Voegelin, Charles F.|author2= Florence M. Voegelin |author3=Kenneth L. Hale |year= 1962 |title= Typological and Comparative Grammar of Uto-Aztecan I: Phonology |type= Supplement to International Journal of American linguistics, vol. 28, no. 1 |series= Indiana University publications in anthropology and linguistics, Memoir 17 |location= Baltimore MD |publisher= Waverly Press |oclc= 55576894}}
* {{cite book |author= Voegelin, Charles F.|author2= Florence M. Voegelin |author3=Kenneth L. Hale |year= 1962 |title= Typological and Comparative Grammar of Uto-Aztecan I: Phonology |type= Supplement to International Journal of American linguistics, vol. 28, no. 1 |series= Indiana University publications in anthropology and linguistics, Memoir 17 |location= Baltimore MD |publisher= Waverly Press |oclc= 55576894}}
{{refend}}
{{refend}}
}}


==Template data==
==Template data==
Line 176: Line 177:
<includeonly>{{Sandbox other||
<includeonly>{{Sandbox other||
[[Category:Reference list templates]]
[[Category:Reference list templates]]
[[Category:Text-specific formatting and function templates|{{PAGENAME}}]]
[[Category:Text-specific formatting and function templates]]
}}</includeonly>
}}</includeonly>
Anonymous user