Template:Refbegin/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>CJLL Wright
some tweaks
meta>CJLL Wright
re need to pair with a closing refend tag
Line 1: Line 1:
{{documentation subpage}}
{{documentation subpage}}
'''{{tl|Refbegin}}''' and '''{{tl|refend}}''' are use to apply any of several optional styles or presentational choices for [[bibliography|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 <tt>==References==, ==Works cited==, ==Bibliography==, ==Further reading==, ==Published works==,</tt> and so on.


== Usage ==
{{tl|Refbegin}} and {{tl|refend}} are use to apply any of several optional styles or presentational choices for [[bibliography|bibliographies]] or reference lists&mdash;that is, lists of fully-specified references / sources / works cited, alpha-sorted by author/contributor) that appear in wikipedia articles.


The options provided are:
The options provided are:
Line 9: Line 10:
*apply hanging indent if an individual reference wraps over more than one line in the browser's display window
*apply hanging indent if an individual reference wraps over more than one line in the browser's display window


== Usage ==
===Placement===
The {{tl|refbegin}} is placed immediately below the header of the bibliography/references section its formatting will be applied to.
When used, each occurrence of {{tl|refbegin}} should always be paired with a corresponding closing {{tl|refend}} template:
<pre>
==References==
{{refbegin}}
*1st entry in the bibliography/references list..
*2nd entry in the bibliography/references list..
...
*last entry in the bibliography/references list..
{{refend}}
</pre>
The formatting provided by {{tl|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 {{tl|refend}} template (or <tt><nowiki></div></nowiki></tt> tag). Failing to provide a closing {{tl|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: Text size (default behaviour)==
The default usage (without parameters) formats bibliographies/reference lists in a manner similar to the way {{tl|reflist}} formats footnotes (which are auto-generated by the [[Wikipedia:Cite.php|cite.php]] extension). 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 uses one CSS entry in [[MediaWiki:Common.css]] to set the font size:
The default usage (without parameters) formats bibliographies/reference lists in a manner similar to the way {{tl|reflist}} formats footnotes (which are auto-generated by the [[Wikipedia:Cite.php|cite.php]] extension). 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 uses one CSS entry in [[MediaWiki:Common.css]] to set the font size:



Revision as of 03:01, 9 October 2009

{{Refbegin}} and {{refend}} are use 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.


The options provided are:

  • font size reduction
  • display list across multiple columns (in most cases, no more than two columns would be recommended for reasons of practicality and readability)
  • apply hanging indent if an individual reference wraps over more than one line in the browser's display window

Usage

Placement

The {{refbegin}} is placed immediately below the header of the bibliography/references section its formatting will be applied to.

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: Text size (default behaviour)

The default usage (without parameters) formats bibliographies/reference lists in a manner similar to the way {{reflist}} formats footnotes (which are auto-generated by the cite.php extension). 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 uses one CSS entry in MediaWiki:Common.css to set the font size:

  • .references-small { font-size: 90%;}

Editors may over-ride this setting by placing entries in their personal CSS.


If the only references are those defined in <ref>...</ref> tags, then use {{reflist}} alone:

== References ==
{{reflist}}

If no references use <ref>...</ref> tags, then use {{refbegin}} and {{refend}}:

== References ==
{{refbegin}}
* general reference 1
* general reference 2
{{refend}}

If there are both types of references, then use both methods:

== References ==
{{reflist}}
{{refbegin}}
* general reference 1
* general reference 2
{{refend}}

Columns

To match {{reflist}}, the number of columns can be given as the first parameterof {{refbegin}}, such as {{refbegin|2}} (defaults to 1).

== References ==
{{refbegin|2}}
* general reference 1
* general reference 2
{{refend}}
References
  • general reference 1
  • general reference 2

Columns may also be set by specifying the width with |colwidth=:

== References ==
{{refbegin|colwidth=20em}}
* general reference 1
* general reference 2
{{refend}}
References
  • general reference 1
  • general reference 2

Browser support

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.

  • Mozilla Firefox and other Gecko-based browsers support multiple columns, but may create widows
  • Internet Explorer through version 8 does not currently support the column selector
  • Safari, Google Chrome and probably other WebKit based browsers have a bug that breaks links in multiple columns; WebKit support is removed in {{reflist}} for this reason, but is enabled in {{refbegin}} as such links will usually not be used in bibliographies
  • Opera does not support multiple columns

Hanging indentation

A hanging indentation may be applied to bibliographies with |indent=

== References ==
{{refbegin|indent=yes}}
Baker, William, and John C. Ross, comps.  ''Harold Pinter: A Bibliographical History''.  London: The [[British Library]] and New Castle, DE: Oak Knoll P, 2005.  ISBN 1584561564 (10).  ISBN 9781584561569 (13).  Print.  "Oak Knoll Press Bestsellers", {{PDFlink|''[http://www.oakknoll.com/resources/pdfcatalogues/Cat2007Spring_web.pdf Spring – Summer 2007 Catalogue]''|9.25 MB}}.  Oak Knoll Press, 2007.  [[World Wide Web|Web]].  2 Oct. 2007.  (Page 37 of 40 pages.)
{{refend}}
References

Baker, William, and John C. Ross, comps. Harold Pinter: A Bibliographical History. London: The British Library and New Castle, DE: Oak Knoll P, 2005. ISBN 1584561564 (10). ISBN 9781584561569 (13). Print. "Oak Knoll Press Bestsellers", Template:PDFlink. Oak Knoll Press, 2007. Web. 2 Oct. 2007. (Page 37 of 40 pages.)


See also

Reference and citation guidelines
Citation formatting and presentation templates
  • WP:CITET –description of various templates to format individual citation references
Other reference and citation formatting templates
  • Auto-generated listing of footnotes and inline citations
  • Reference list formatting