Template:Ref indent
From Wikipedia, the free encyclopedia
|
[edit] Basic usage description
This template will format a list of references or cited works, so that the references display with a hanging indent whenever the text wraps over more than one line.
- Standard usage–
{{ref indent}} <!--Begin hanging indent style --> ...[text block(s) to be formatted go here]... {{ref indent-end}} <!--End hanging indent style -->
- With parameter specified–
To (optionally) change the default offset for the indent:
{{ref indent|n}}
Where n is a positive (usually integer) value for the offset distance, measured in em; for example {{ref indent|2}}
will indent by 2em.
NOTE: Should always be paired with the corresponding closing tag, namely {{ref indent-end}}.
[edit] Purpose
This template will format blocks of text so that they display as a hanging indent, whenever the text wraps over more than one line.
Its primary purpose is to apply this formatting to lists of references and cited works, that typically appear in articles towards the end under section(s) entitled "References", "Sources", "Bibliography", "Further reading", or similar (see WP:CITE). Such listings are usually bulleted lists, alpha-sorted by author, providing details on the works (books, papers, webpages, etc) consulted for the article, or that are relevant to the topic. This template is intended to provide a visual cue or style making it easier to pick out the keywords (ie, the authors' names) from the listing, by forcing any wrap-around or overflow text to be indented.
Thus, a list of references such as:
== References ==
- Campbell, Lyle; and Ronald W. Langacker (1978). "Proto-Aztecan vowels: Parts I-III.". International Journal of American Linguistics 44: pp.85–102, 197–210, 262–79. Chicago: University of Chicago Press. ISSN 0020-7071.
- Flores Farfán, José Antonio (2002). "The Use of Multimedia and the Arts in Language Revitalization, Maintenance, and Development: The Case of the Balsas Nahuas of Guerrero, Mexico" (PDF) in Proceedings of the Annual Conference on Stabilizing Indigenous Languages (7th, Toronto, Ontario, Canada, May 11–14, 2000). Barbara Jane Burnaby and John Allan Reyhner (Eds.) Indigenous Languages across the Community: pp.225–236, Flagstaff, AZ: Center for Excellence in Education, Northern Arizona University. ISBN 0-9670554-2-3. OCLC 95062129.
- Fowler, William R., Jr. (1985). "Ethnohistoric Sources on the Pipil Nicarao: A Critical Analysis". Ethnohistory 32 (1): pp.37–62. Durham, NC: Duke University Press and the American Society for Ethnohistory. ISSN 0014-1801. OCLC 62217753.
will appear as:
== References ==
- Campbell, Lyle; and Ronald W. Langacker (1978). "Proto-Aztecan vowels: Parts I-III.". International Journal of American Linguistics 44: pp.85–102, 197–210, 262–79. Chicago: University of Chicago Press. ISSN 0020-7071.
- Flores Farfán, José Antonio (2002). "The Use of Multimedia and the Arts in Language Revitalization, Maintenance, and Development: The Case of the Balsas Nahuas of Guerrero, Mexico" (PDF) in Proceedings of the Annual Conference on Stabilizing Indigenous Languages (7th, Toronto, Ontario, Canada, May 11–14, 2000). Barbara Jane Burnaby and John Allan Reyhner (Eds.) Indigenous Languages across the Community: pp.225–236, Flagstaff, AZ: Center for Excellence in Education, Northern Arizona University. ISBN 0-9670554-2-3. OCLC 95062129.
- Fowler, William R., Jr. (1985). "Ethnohistoric Sources on the Pipil Nicarao: A Critical Analysis". Ethnohistory 32 (1): pp.37–62. Durham, NC: Duke University Press and the American Society for Ethnohistory. ISSN 0014-1801. OCLC 62217753.
The keywords (authors' names) used to identify the reference work are now easier to differentiate from the surrounding text when scanning down the list.
The individual references in the list can either be manually formatted, or formatted via one of the citation templates, or a combination of both; the effect should be uniform.
- Other applications
While intended to be used for bibliographical lists, in principle the formatting produced by this template can be applied to other list-type outputs, if there is some reason to do so. For example, it could be applied to the list of footnotes/inline citations generated by the cite.php method (ie, the <references/>
tag ) from the footnotes or inline cites appearing between <ref></ref>
tags. Note that if the footnotes are set to display as more than one column (eg by {{reflist|2}}
), applying the indent causes some overlapping of text between columns (in those browsers which can display multi-columned footnotes), so if used would only be recommended for single-column output.
It can also be applied to any other similar listing, or paragraphs and text blocks in general, if there is some reason to display the text in this fashion. NOTE, if tables, infoboxes, or other offset-type formatting are included within the block, the results may be unpredictable, so use with caution and preview the results before saving. Also note, the display may vary between different browsers/settings, depending on the circumstance.
[edit] Parameter and function
- Parameter
The template has one optional (unnamed) parameter, which can be used to change the size of the resulting indentation from the default value of 5em (five em-spaces).
To change the indent setting from the default, use {{ref indent|n}}
where n is a positive number (usually an integer) that specifies the offset. Compare:
Using {{ref indent|2}}—
- Flores Farfán, José Antonio (2002). "The Use of Multimedia and the Arts in Language Revitalization, Maintenance, and Development: The Case of the Balsas Nahuas of Guerrero, Mexico" (PDF) in Proceedings of the Annual Conference on Stabilizing Indigenous Languages (7th, Toronto, Ontario, Canada, May 11–14, 2000). Barbara Jane Burnaby and John Allan Reyhner (Eds.) Indigenous Languages across the Community: pp.225–236, Flagstaff, AZ: Center for Excellence in Education, Northern Arizona University. ISBN 0-9670554-2-3. OCLC 95062129.
Using {{ref indent|4}}—
- Flores Farfán, José Antonio (2002). "The Use of Multimedia and the Arts in Language Revitalization, Maintenance, and Development: The Case of the Balsas Nahuas of Guerrero, Mexico" (PDF) in Proceedings of the Annual Conference on Stabilizing Indigenous Languages (7th, Toronto, Ontario, Canada, May 11–14, 2000). Barbara Jane Burnaby and John Allan Reyhner (Eds.) Indigenous Languages across the Community: pp.225–236, Flagstaff, AZ: Center for Excellence in Education, Northern Arizona University. ISBN 0-9670554-2-3. OCLC 95062129.
If no parameter specified, {{ref indent}}
results in a default indent of 5em.
- Closing tag
The template applies a "div style=" to whatever text comes after it, and so when used it should be accompanied (paired) with a separate closing tag placed immediately at the end of the text block to be formatted. The template {{ref indent-end}} should be used to close the styled block.
Failure to supply the closing tag may result in unintended consequences for the subsequent text in the article (eg an 'External links' section, or any following navigation templates).
[edit] Usage examples
- For bibliography-type listings of references and works cited (typically under a "References" section, or "Further reading", and so on)
{{ref indent}} <!--Begin hanging indent style --> *First reference work in listing (author, year, title, publisher, etc) *Second reference work in listing (author, year, title, publisher, etc) ... *Last reference work in listing (author, year, title, publisher, etc) {{ref indent-end}} <!--End hanging indent style -->
- If used in conjunction with {{refbegin}} (applies "references-small" style)
{{ref indent}} <!--Begin hanging indent style --> {{refbegin}} <!--Begin 'references-small' style --> *First reference work in listing (author, year, title, publisher, etc) *Second reference work in listing (author, year, title, publisher, etc) ... *Last reference work in listing (author, year, title, publisher, etc) {{refend}} <!--End 'references-small' style --> {{ref indent-end}} <!--End hanging indent style -->
- To apply to the cite.php-generated listing of footnotes and inline citations
{{ref indent}} <!--Begin hanging indent style --> <references/> <!--or {{reflist}} --> {{ref indent-end}} <!--End hanging indent style -->
NOTE, not recommended if multi-column footnotes display is used.
[edit] Browser differences and list bullets
There is some difference between browsers in how the list-item bullet appears. For MSIE the bullet can appear up against the first character of the list item. This can be overcome by either inserting a non-breaking space[
] between the bullet and the text, or by making the list a non-bulleted list.
One shorthand way to apply non-breaking space(s) between the bullet and the text is to use the template {{nbsp}}, so for example *{{nbsp|2}}
will insert 2 non-breaking spaces between the bullet and the text.
To convert the list to a non-bulleted list, use a colon [:] in place of the asterisk [*] as the list-item delimiter.
[edit] 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
- {{reflist}}
- Reference list formatting
- {{Refbegin}} -applies "references-small" style (pair with {refend}}
- {{Refend}}
- {{Footnotes}}
- {{FootnotesSmall}}