Formatting a set of contributors

Table of Contents

Introduction

Cited works often have multiple authors, editors, and other types of contributors. To format a set of contributors, BibWord use 13 variables. All the variables are grouped inside a single list element which in turn belongs to the namelists section of the BibWord data element. To make this a bit more clear, consider the following definition of a list:

  <xsl:variable name="data">
    <namelists>
      <list name="citation" id="1">
        <!-- The 13 variables influencing the look of a list of contributors. -->
      </list>
    </namelists>
  </xsl:variable>
As you can see in the example, the list element contains two attributes: name and id.

The id attribute is a mandatory numerical value and is used by format strings to know which list to use when formatting a set of contributors. For example, a format string looking like {%Author:5%} indicates that the authors should be formatted according to the rules provided in the list with an id equal to 5.

The name attribute is optional and purely intended for developers. It can help them identify what the list is used for. In the above example, it indicates that this list is probably used to format contributors in a citation.

Variables

Formatting a single name

BibWord provides three variables/elements to format names in a set of contributors:
  • first_person: format information for the name of the first contributor in the set
  • other_persons: format information for all contributors in the set except the first one
  • corporate: format information in case the contributor is a corporation
Each of these three elements take a format strings as value. For example:

  <first_person>{%Last:u%}{, %First%}</first_person>
  <other_persons>{%First% }{%Last%}</other_persons>
  <corporate>{%Corporate:u%}</corporate>

Combining names

When there is more than one contributor in a set, the contributors have to be grouped in some way. BibWord provides three variables to do this grouping:
  • separator_between_if_two: the separator to display if there are only two contributors
  • separator_between_if_more_than_two: the separator to display if there are more than two contributors
  • separator_before_last: the separator to display before the last contributor if there are more than two contributors
For each of these elements, any possible string value can be used. For example:

  <separator_between_if_two> and </separator_between_if_two>
  <separator_between_if_more_than_two>; </separator_between_if_more_than_two>
  <separator_before_last>; and </separator_before_last>

Limiting the number of authors shown

Sometimes a set of contributors consists of more persons than the style allows to display. In such case, only a limited number of contributors is shown followed by a string like 'et al.' to indicate that there are more contributors. BibWord can do this by means of 3 elements:
  • max_number_of_persons_to_display: indicates the maximum number of contributors that can be displayed
  • number_of_persons_to_display_if_more_than_max: indicates the number of contributors to display if the set of contributors contains more contributors than the maximum number that can be displayed
  • overflow: contains the string to display after the last contributor if there are too many contributers
The first two elements require a numerical value while for the last one any string value can be used. For example:

  <max_number_of_persons_to_display>5</max_number_of_persons_to_display>
  <number_of_persons_to_display_if_more_than_max>1</number_of_persons_to_display_if_more_than_max>
  <overflow>, et al.</overflow>

Prefix and suffix

Sometimes a set of contributors are no ordinary authors, they can be editors, translators, ... in which case you might want to add a prefix or suffix string like 'ed.' or 'eds.'.
  • single_prefix: the text to display in front of the contributors if there is only one
  • single_suffix: the text to display behind the contributors if there is only one
  • multi_prefix: the text to display in front of the contributors if there is more than one
  • multi_suffix: the text to display behind the contributors if there is more than one

  <single_prefix>Editor: </single_prefix>
  <single_suffix> (ed.)</single_suffix>
  <multi_prefix>Editors: </multi_prefix>
  <multi_suffix> (eds.)</multi_suffix>

Examples

Consider the following contributor set:
  • Mick Jagger
  • Brian Jones
  • Keith Richards
  • Bill Wyman
  • Charlie Watts
With the following output:
  • JAGGER M. and B. Jones
  • JAGGER M., B. Jones, K. Richards, and B. Wyman
  • JAGGER M., et al.
Ït is clear that the first contributor should be displayed in capitals with his last name first and his first name abbreviated:

  <first_person>{%Last:u%}{ %First:asdp%}</first_person>
The other contributors are formatted with an abbreviated first name followed by their last name:

  <other_persons>{%First:asdp% }{%Last%}</other_persons>
There is no information on how to format corporate contributors, but it seems logical that they follow the same rule as for the first contributor:

  <corporate>{%Corporate:u%}</corporate>
Now that the different names in the contributor set are formatted correctly, it is time to combine them. From the first example, one can see that if only two contributors are available, " and " is used to combine them. If there are more than two contributors, as in the second example, a comma is used for concatenating. Also, from the second example, one can see that ", and " is used to combine the last contributor with the others. So we get:

  <separator_between_if_two> and </separator_between_if_two>
  <separator_between_if_more_than_two>, </separator_between_if_more_than_two>
  <separator_before_last>, and </separator_before_last>
The last example shows what happens in case there are too many contributors to display them all. Only the first is displayed, followed by 'et al.' in italics. In combination with the second example, we see that 4 contributors can be displayed at most at one time. Hence, we get:

  <max_number_of_persons_to_display>4</max_number_of_persons_to_display>
  <number_of_persons_to_display_if_more_than_max>1</number_of_persons_to_display_if_more_than_max>
  <overflow>, &lt;i&gt;et al.&lt;/i&gt;</overflow>
Note that the overflow contains "&lt;i&gt;" which translates to the html tag "<i>" which is used to indicate that "et al." should be displayed in italics.

Combining all these items results in:

  <xsl:variable name="data">
    <namelists>
      <list name="authors" id="2">
        <first_person>{%Last:u%}{ %First:asdp%}</first_person>
        <other_persons>{%First:asdp% }{%Last%}</other_persons>
        <corporate>{%Corporate:u%}</corporate>
        <separator_between_if_two> and </separator_between_if_two>
        <separator_between_if_more_than_two>, </separator_between_if_more_than_two>
        <separator_before_last>, and </separator_before_last>
        <max_number_of_persons_to_display>4</max_number_of_persons_to_display>
        <number_of_persons_to_display_if_more_than_max>1</number_of_persons_to_display_if_more_than_max>
        <overflow>, &lt;i&gt;et al.&lt;/i&gt;</overflow>
      </list>
    </namelists>
  </xsl:variable>

Last edited Nov 13, 2009 at 5:22 PM by Yves, version 1

Comments

mnelisigasa Mar 15, 2014 at 9:47 PM 
PIease help! I would like to add a soace instead of a comma in the seperater_between_if_more_than_two variable. If I simply insert a blank space it doesn't appear in word.