def math_wrap(tex_str_list, export):
    """
    Warp each string item in a list with latex math environment ``$...$``.

    Parameters
    ----------
    tex_str_list : list
        A list of equations to be wrapped
    export : str, ('rest', 'plain')
        Export format. Only wrap equations if export format is ``rest``.
    """
    if export != 'rest':
        return list(tex_str_list)

    out = []
    for item in tex_str_list:
        if item is None or item == '':
            out.append('')
        else:
            out.append(rf':math:`{item}`')
    return out