author names with special LaTeX characters are not properly abbreviated in citation labels

Issue #442 new
Matthias Troffaes created an issue

Author names with special LaTeX characters are not properly abbreviated in citation labels. A quick fix is to update the abbreviate function to first decode the LaTeX and remove curly braces, i.e. to change the abbreviate function at

https://bitbucket.org/pybtex-devs/pybtex/src/2b82780b5090b1c3de0875617b782fbb5b74ba4e/pybtex/textutils.py#lines-104

into

    def abbreviate(part):
        import codecs
        import latexcodec
        part = codecs.decode(part, 'ulatex').replace('{', '').replace('}', '')
        if part.isalpha():
            return part[0] + '.'
        else:
            return part

(This is just a quick hack; the imports should probably got to the top of the file.)

Originally reported here by jboynyc: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/319

Comments (0)

  1. Log in to comment