def sanitize_tex(in_str: object) -> str:
    """
    Escape any characters in *in_str* that would lead to LaTeX compile errors

    :param in_str:
    :return: str
    """
    return (str(in_str)
            .replace('$', '')
            .replace('%', '')
            .replace('_', ' ')
            )