From 22382726ef34f8da797b69eb8f42cc5ce5f415c0 Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Sun, 3 Mar 2019 22:57:09 +1300 Subject: Configure bibstyle to abbreviate names --- docs/source/bibstyle.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs/source/bibstyle.py') 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 # @@ -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) -- cgit v1.2.3