def lookup_journal(tex):
    """
    Return the name or acronym of the journal, given its tex macro.
    """
    plaintext = tex.replace('\\','')
    lookup = {'apj':'ApJ', 'apjs':'ApJS', 'aj':'AJ', 'mnras':'MNRAS', 'nature':'Nature', 'aap':'A&amp;A', 'pasp':'PASP', 'jcap':'JCAP'}
    try:
        journal = lookup[plaintext]
    except:
        journal = plaintext
    return journal