def latex_species(sp):
    """
    *** PURPOSE:
        make a species formula to Latex format:
        e.g. H3O+   =>   r'${\rm H_3O^+}$'
    *** INPUT:
        sp --- species in string. e.g. 'H2O'
    *** OUTPUT:
        xsp --- species in latex format
    """
    xsp=r'${\rm '
    for x in sp:
        if x in '23456789':
            x='_'+x
        elif x in '+-':
            x='^{'+x+'}'
        xsp+=x
    xsp+='}$'
    if '[1_3C]' in xsp:
        xsp=xsp.replace('[1_3C]','^{13}C')
    return xsp