You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
420 B
15 lines
420 B
8 months ago
|
from pybtex.style.names import BaseNameStyle, name_part
|
||
|
from pybtex.style.template import join
|
||
|
|
||
|
|
||
|
class LastNameStyle(BaseNameStyle):
|
||
|
"""A simple name style for formatting the last name of an author."""
|
||
|
|
||
|
def format(self, person, abbr=True):
|
||
|
"""Format last names."""
|
||
|
|
||
|
return join[
|
||
|
name_part(tie=True)[person.rich_prelast_names],
|
||
|
name_part[person.rich_last_names],
|
||
|
]
|