leo-colisson / robust-externalize

A LaTeX library to cache pictures (including tikz, python code, and more) in a robust, customizable, and pure way.
8 stars 2 forks source link

Polyglossia error: language/robExt polyglossia language.tex:7: LaTeX Error: Missing \begin{document} #22

Closed dflvunoooooo closed 7 months ago

dflvunoooooo commented 7 months ago

There was an texlive update today and now robust-externalize does not work with poylglossia anymore. If the language is passed with setdefaultlanguage to robust-externalize, it throws the error polyglossia language/robExt polyglossia language.tex:7: LaTeX Error: Missing \begin{document}. If the setdefaultlanguage command is commented out, it is working again. Here is a simple code:

\documentclass{scrartcl} 

\usepackage{robust-externalize}
\runHereAndInPreambleOfCachedFiles{         % Eine Option von robust-externalize (siehe unten). Lädt die Pakete / Optionen auch für sich.
    \usepackage{fontspec}
    \setdefaultlanguage{german}
}

\begin{document}
\begin{figure}
    \centering
    \begin{CacheMeCode}{python, set includegraphics options={width=\textwidth, height=0.71\textwidth}}
        import matplotlib.pyplot as plt

        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('Number')
        plt.ylabel('Number of futurestud.io Tutorials')
        plt.savefig("__ROBEXT_OUTPUT_PDF__")
    \end{CacheMeCode}
    \caption{Number Test Python PGF}%
    \label{py:testPGF}
\end{figure}
\end{document}
dflvunoooooo commented 7 months ago

Never mind, this seems to be a problem with polyglossia itself. Sorry to have bothered you.

tobiasBora commented 7 months ago

Ok good then. I have no idea about polyglossia…

Btw, thanks for your donation!