diff options
| author | Mike Taves <mwtoews@gmail.com> | 2019-03-03 22:57:09 +1300 |
|---|---|---|
| committer | Mike Taves <mwtoews@gmail.com> | 2019-03-03 22:57:09 +1300 |
| commit | 22382726ef34f8da797b69eb8f42cc5ce5f415c0 (patch) | |
| tree | 1169c2a7468f53573bee033e0b16a6741ac2e76a /docs/source/bibstyle.py | |
| parent | 688b4adb37c2303bde0a31718fc8a8b1fe85ab43 (diff) | |
| download | PROJ-22382726ef34f8da797b69eb8f42cc5ce5f415c0.tar.gz PROJ-22382726ef34f8da797b69eb8f42cc5ce5f415c0.zip | |
Configure bibstyle to abbreviate names
Diffstat (limited to 'docs/source/bibstyle.py')
| -rw-r--r-- | docs/source/bibstyle.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/source/bibstyle.py b/docs/source/bibstyle.py index 8e2cc02a..addfedbd 100644 --- a/docs/source/bibstyle.py +++ b/docs/source/bibstyle.py @@ -1,5 +1,6 @@ ############################################################################### # +# Project: PROJ # Purpose: Configure custom bibliography style for sphinxcontrib-bibtex # Author: Mike Toews <mwtoews at gmail.com> # @@ -53,11 +54,15 @@ class LinkLabelStyle(LabelStyle): class CustomStyle(UnsrtStyle): """Citation style in the References section""" + # TODO: Make more Harvard-like, i.e. year after name(s) default_label_style = 'linklabel' default_name_style = 'lastfirst' default_sorting_style = 'author_year_title' - # TODO: Make more Harvard-like, i.e. year after name(s) + + def __init__(self, **kwargs): + kwargs['abbreviate_names'] = True + UnsrtStyle.__init__(self, **kwargs) register_plugin('pybtex.style.labels', 'linklabel', LinkLabelStyle) |
