I currently have an issue the cause of which I cannot find. On the first page of our document, a weird text which says "pgfcalendar" appears (see picture).
Usually I would guess, that this is somehow connected to the wrong usage of a package or something. But in this document pgfcalendar
isn't even used. I searched through every .tex file and just can not find it anywhere. The error message is also pretty weird:
LaTeX Error: Can be used only in preamble.
/usr/local/texlive/2020/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.dateplot.code.tex, 22 You have used a command in the main body of your document which should be used in the preamble. Make sure that \documentclass[…]{…} and all \usepackage{…} commands are written before \begin{document}. Learn more
l.22 \pgfutil@usemodule{pgfcalendar} Your command was ignored. Type I command to replace it with another command, or to continue without it.
Based on the name of the reference path, I would say that it's somehow connected to a local file or directory, which is weird, since no one in the Overleaf project is using separate software.
pgfplots
, maybe a package that usespgfplots
in the background, specifically something related to date/time plots. Try to see if you find anything suspicuous that may attempt to load the module in the error mid-document. But it can also be that there is an earlier completely unrelated error that cascades into this error, in that case you need to fix the earlier error first and then this error probably also goes away.\usepgfplotslibrary{dateplot}
after\begin{document}
?