class CiteProc::Name

Names consist of several dependent parts of strings. Simple personal names are composed of family and given elements, containing respectively the family and given name of the individual.

Name.new(:family => 'Doe', :given => 'Jane')

Institutional and other names that should always be presented literally (such as “The Artist Formerly Known as Prince”, “Banksy”, or “Ramses IV”) should be delivered as a single :literal element:

Name.new(:literal => 'Banksy')

Name particles, such as the “von” in “Alexander von Humboldt”, can be delivered separately from the family and given name, as :dropping-particle and :non-dropping-particle elements.

Name suffixes such as the “Jr.” in “Frank Bennett, Jr.” and the “III” in “Horatio Ramses III” can be delivered as a suffix element.

Name.new do |n|
  n.family, n.given, n.suffix = 'Ramses', 'Horatio', 'III'
end

Names not written in the Latin or Cyrillic scripts are always displayed with the family name first. Sometimes it might be desired to handle a Latin or Cyrillic transliteration as if it were a fixed (non-Byzantine) name (e.g., for Hungarian names). This behavior can be prompted by including activating static-ordering:

Name.new(:family => 'Murakami', :given => 'Haruki').to_s
#-> "Haruki Murakami"

Name.new(:family => 'Murakami', :given => 'Haruki').static_order!.to_s
#-> "Murakami Haruki"