author
or editor
field in bibtex record. Constructor performs parsing of raw field text and stores preformatted data. Various accessor methods return author/editor field in different formats.
Parsing algorithm is designed to satisfy two requirements: (a) when author's name is typed correctly, the result should coincide with the one of BiBTeX; (b) for erroneous names, output should be reasonable (but may differ from BiBTeX output). The following rules are used:
Character.isWhitespace(c)==true
), commas (,), dashes (-), and tildas (~); Character.isLetter(c)==true
) that does not belong to a sequence of letters that immediately follows "\" character, with one exception: if "\" is followed by "aa", "AA", "ae", "AE", "l", "L", "o", "O", "oe", "OE", "i", or "j" followed by non-letter, the 'first letter' of a token is a letter that follows "\"; for example: in "a{x}b" 'first letter' is "a", in "{\"{U}}bel" 'first letter' is "U", in "{\noopsort{\"o}}xyz" 'first letter' is "o", in "{\AE}x" 'first letter' is "A", in "\aex\ijk\Oe\j" 'first letter' is "j"; if there is no letter satisfying the above rule, 'first letter' is undefined; Character.isLowerCase(c)==true
), and token is "upper-case" token otherwise;
|
|
|
|
|
|
|
|
|
|
|
|
|
|