from django_tex.environment import environment

def get_first(author_list):
    last = author_list.strip().split(' ')[-1].strip()
    first = author_list.strip().split(' ')[1].strip()
    if 'Cuniberti' == last:
        return True
    elif first == 'Cuniberti' or first == 'Cuniberti,' or first == 'Cuniberti.':
        return True
    
    else:
        return False
        
def my_environment(**options):
    env = environment(**options)
    env.filters.update({
        'get_first': get_first
    })
    return env