Template:Refbegin/doc
This is a documentation |
{{refbegin}} and its complementary closing template {{refend}} are used to apply any of several optional styles or presentational choices for bibliographies or reference lists—that is, lists of fully-specified references / sources / works cited, alpha-sorted by author/contributor) that appear in Wikipedia articles. These bibliographies or reference lists frequently appear in dedicated sections within an article, variously titled == References ==, == Works cited ==, == Bibliography ==, == Further reading ==, == Published works ==, and so on. Wikipedia referencing or citation systems that use bibliography-style reference lists include: 'shortened' footnotes, parenthetical referencing, and 'general' referencing. The 'full' footnote and embedded citations referencing systems do not use those lists, although articles using these latter two systems may also contain "Further reading" or other sections containing bibliography-style listings, that {{refbegin}} formatting could be applied to. The formatting options provided by this template are:
Each use of {{refbegin}} whether with or without parameters, needs an accompanying {{refend}} closing template to 'turn off' the formatting; refend does not need any parameters. Font size reduction is applied by default. Either one, the other, or both of multi-columns and hanging indent may be applied as well (though see specifics and caveats on browser differences in relevant sections, below). Usage[edit source]With all (optional) parameters shown: ==References== {{ refbegin |n |normalfont= |indent= |indentsize= }} * list of bibliography/references entries.. ... {{refend}} Placement[edit source]The {{refbegin}} is placed immediately below the header of the bibliography/references section its formatting will be applied to. The closing {{refend}} template is placed within the same section, at the end of the bibliography/references list content. When used, each occurrence of {{refbegin}} should always be paired with a corresponding closing {{refend}} template: ==References== {{refbegin}} *1st entry in the bibliography/references list.. *2nd entry in the bibliography/references list.. ... *last entry in the bibliography/references list.. {{refend}} The formatting provided by {{refbegin}} is "turned on" at the location where the template is placed, and is applied to all text after and below it, until it is "turned off" by a closing {{refend}} template (or </div> tag). Failing to provide a closing {{refend}} may produce unwanted effects in other sections that may appear below the 'References', 'Bibliography' etc. section, such as 'External links' sections that are usually placed at or near the article's end. Option 1: Default behaviour[edit source]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 footnotes by the {{reflist}} template. The {{reflist}} formats footnotes—any text in the article body that is placed between Template:Tag tags—that are auto-generated by the cite.php extension, called by {{reflist}}. In the case of articles using the 'shortened' footnotes referencing system, these footnotes will typically contain an abbreviated citation such as <ref>Smith 2002, p.123</ref> that corresponds with an entry in the bibliography/references list section (other text such as discursive notes may appear as well). The font size should reduce to 90% for most browsers, but may appear to show at 100% for Internet Explorer and possibly other browsers. Reflist and Refbegin use each one CSS entry in MediaWiki:Common.css to set the font size: div.reflist, div.refbegin { font-size: 90%; } Editors may over-ride this setting by using normalfont=yes in the template. If the 'full' footnotes referencing system is used (i.e. there is no separate bibliography/references list, all cites/references are defined in Template:Tag tags), then use {{reflist}} alone: == References == {{reflist}} If there is a bibliography/references list but no footnoted citations (e.g. in general references or parenthetical referencing systems) then use {{refbegin}} and {{refend}} like so: == References == {{refbegin}} * general reference 1 * general reference 2 {{refend}} If there are footnoted citations and a separate bibliography/references list (i.e., the WP:CITESHORT system), then place {{reflist}} to generate the footnotes in one section (immediately above the bibliography/references list), and use {{refbegin}} in the latter section: == Notes == {{reflist}} <!--this will auto-generate the numbered list of footnotes/cites --> == References == {{refbegin}} * bibliography entry / reference 1 * bibliography entry / reference 2 * etc {{refend}} Option 2: Multiple columns[edit source]If an integer n is supplied as the first parameter, the template will display the bibliography/references list in n columns. This may be useful for compact display for a lengthy list, and matches also the optional capability of {{reflist}} to display output in multiple columns. Thus, {{refbegin|2}} will display the list in two columns. If no integer parameter is specified, the default is a single column. Note, it will rarely be useful or practical to display bibliography/references list entries in more than two columns. If a value with a unit is supplied as the first parameter, i.e. 30em, 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 {{refbegin|30em}} for instance is useful for short citations. Browser support[edit source]
Multiple columns are generated by using CSS3, which is still in development; thus only browsers that properly support the multi-column property will show multiple columns. See here for more information. Option 3: Hanging indentation[edit source]A hanging indentation may be applied to bibliographies/reference lists by using the In order for indents to display properly, do not use bullet markers (*); you must use indent markers (:) instead. To use, set {{refbegin|indent=yes}}.
a) Using {{refbegin}} with the hanging indent option |indent=yes applied:
b) Using indent in combination with multi-column (in this case, n=2) display {{refbegin|2|indent=yes}} (note that multi-column only works in some browsers): }} </includeonly> |