def use_label_with_root(label: str) -> str:
    """ Automatically convert LaTeX to something that is mostly ROOT compatible.

    Conversion consists of:

    - Replace "\\textendash" -> "\\mbox{-}"
    - Replace "\\%" -> "\\mbox{%}"

    In principle, LaTeX is supported in ``TMathText``, but the support is pretty flaky.

    Args:
        label: Label to be converted.
    Returns:
        Converted label.
    """
    return label.replace(r"\textendash", r"\mbox{-}").replace(r"\%", r"\mbox{%}")