Recently I've started to experience a problem with LatexWorkshop (an extension of VScode), where the problem warning \include should only be used after \begin{document}.
started to appear. My code example is:
\include{configurations.tex}
\begin{document}
\title{title}
\author
{
\textbf{Joe}
}
\date{\today}
\maketitle
\end{document}
I keep my configurations in the file configurations.tex
to keep the code clean, thus I can't move it inside the \begin
function, therefore I'm searching for a way to suppress or disable this specific problem notification.
CodePudding user response:
You shouldn't disable or suppress this warning, you should fix the problem!
\include
is made to include junks of the document body, it will do some magic like automatically starting a new page. What you are looking for is the \input
macro:
\input{configurations}
\begin{document}
\title{title}
\author
{
\textbf{Joe}
}
\date{\today}
\maketitle
\end{document}