def filter_publications(citations, authors, reverse=False, bold=True):
    'Filter publications by the author(s)/editor(s)\n\n    Parameters\n    ----------\n    citations : list of dict\n        The publication citations\n    authors : set of str\n        The authors to be filtered against\n    reverse : bool, optional\n        If True reverse the order, defaults to False\n    bold : bool, optional\n        If True put latex bold around the author(s) in question\n    '
    pubs = []
    for pub in citations:
        if (len(((set(pub.get('author', [])) | set(pub.get('editor', []))) & authors)) == 0):
            continue
        pub = deepcopy(pub)
        if bold:
            bold_self = []
            for a in pub['author']:
                if (a in authors):
                    bold_self.append((('\\textbf{' + a) + '}'))
                else:
                    bold_self.append(a)
            pub['author'] = bold_self
        else:
            pub = deepcopy(pub)
        pubs.append(pub)
    pubs.sort(key=doc_date_key, reverse=reverse)
    return pubs
Filter publications by the author(s)/editor(s)

Parameters
----------
citations : list of dict
    The publication citations
authors : set of str
    The authors to be filtered against
reverse : bool, optional
    If True reverse the order, defaults to False
bold : bool, optional
    If True put latex bold around the author(s) in question
def filter_publications(citations, authors, reverse=False, bold=True):
    'Filter publications by the author(s)/editor(s)\n\n    Parameters\n    ----------\n    citations : list of dict\n        The publication citations\n    authors : set of str\n        The authors to be filtered against\n    reverse : bool, optional\n        If True reverse the order, defaults to False\n    bold : bool, optional\n        If True put latex bold around the author(s) in question\n    '
    pubs = []
    for pub in citations:
        if (len(((set(pub.get('author', [])) | set(pub.get('editor', []))) & authors)) == 0):
            continue
        pub = deepcopy(pub)
        if bold:
            bold_self = []
            for a in pub['author']:
                if (a in authors):
                    bold_self.append((('\\textbf{' + a) + '}'))
                else:
                    bold_self.append(a)
            pub['author'] = bold_self
        else:
            pub = deepcopy(pub)
        pubs.append(pub)
    pubs.sort(key=doc_date_key, reverse=reverse)
    return pubs