Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite compilation if file not found #36

Open
dflvunoooooo opened this issue Mar 23, 2024 · 3 comments
Open

Infinite compilation if file not found #36

dflvunoooooo opened this issue Mar 23, 2024 · 3 comments

Comments

@dflvunoooooo
Copy link
Contributor

dflvunoooooo commented Mar 23, 2024

If I cache a tex file with ´CacheMe´ and do not specify to look in the parent dircetory of robust-extrenalize, the file is not found. This leads to an infinite compilation process which deosn't stop. If compilation is aborted, one can find the hint in the robust-externalize log, that the file wasn't found.

\documentclass{scrreport}

\usepackage{robust-externalize}

\begin{filecontents}{test2.tex}   
    \chapter{Test1}
    Test bla Test.   
\end{filecontents}

\begin{document}

\begin{CacheMe}{latex}
    \input{test2.tex}
\end{CacheMe}

\end{document}
@tobiasBora
Copy link
Contributor

Hum, good point. Note that copy file to cache or ( __ROBEXT_WAY_BACK___ + add dependencies) is the proper way to solve this issue, but the error is not great, I should find a latex compilation option not to wait infinitely if there is an error, I'll try to solve that when I've some time.

@dflvunoooooo
Copy link
Contributor Author

dflvunoooooo commented Mar 23, 2024

Thank you for the hint. Can I add the __ROBEXT_WAY_BACK__ to my own preset? It is working with \input{__ROBEXT_WAY_BACK__test2.tex}.

@dflvunoooooo
Copy link
Contributor Author

Another occurrence of infinite compilation is with this:

\documentclass{scrreport}


\usepackage{robust-externalize}
%\runHereAndInPreambleOfCachedFiles{\usepackage{robust-externalize}}
\usepackage{pdfpages}

\robExtConfigure{
    new preset={latex scrreport}{
        latex, 
        set documentclass={scrreport},
        set latex options={fontsize=11pt},
        add to preamble={\usepackage{robust-externalize}},
        set placeholder={__ROBEXT_LATEX_MAIN_CONTENT_WRAPPED__}{__ROBEXT_MAIN_CONTENT__},
        custom include command={\includepdf{\robExtAddCachePathAndName{\robExtFinalHash.pdf}}}
    },
}

\begin{filecontents}{test2.tex}   
    \chapter{Test1}
    Test bla Test. 
    \begin{figure}
        \centering
        \begin{CacheMeCode}{python}
            import matplotlib.pyplot as plt
            import matplotlib
            matplotlib.use('pgf')
            year = [2014, 2015, 2016, 2017, 2018, 2019]
            tutorial_count = [39, 117, 111, 110, 67, 29]
            plt.plot(year, tutorial_count, color="#6c3376", linewidth=2)
            plt.title("Simple plot")
            plt.xlabel('Year')
            plt.ylabel('Number of futurestud.io Tutorials')
            print(get_filename_from_extension(".pgf"))
            plt.savefig("__ROBEXT_OUTPUT_PDF__")
        \end{CacheMeCode}
        \caption{test}%
        \label{py:test}
    \end{figure}  
\end{filecontents}

\begin{document}

\cacheMe[latex scrreport]{\input{__ROBEXT_WAY_BACK__test2.tex}}

\end{document}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants