def METHOD_NAME(cli: CliRunner, temp_with_override, file_regression):
    """Testing LaTex output"""
    path_output = temp_with_override.joinpath("mybook").absolute()
    # Regular TOC should work
    p_toc = path_books.joinpath("toc")
    path_toc = p_toc.joinpath("_toc_urllink.yml")
    result = cli.invoke(
        build,
        [
            p_toc.as_posix(),
            "--path-output",
            path_output.as_posix(),
            "--toc",
            path_toc.as_posix(),
            "--builder",
            "pdflatex",
        ],
    )
    assert result.exit_code == 0, result.output
    # reading the tex file
    path_output_file = path_output.joinpath("_build", "latex", "python.tex")
    file_content = TexSoup(path_output_file.read_text())
    # checking the table of contents which is a list with the first '\begin{itemize}'
    file_regression.check(str(file_content.itemize), extension=".tex", encoding="utf8")