I want to make a blank tex file in PyLatex with no headers and no environments added from the start. i.e. I do not want \documentclass
and \begin{document}
to be in my LaTex file. I've tried to write a class that does not propagate any packages or adds anything to the file in the beginning, but I can no longer add my commands to the file afterward.
\cvsection{}
\begin{cventries}
\cventry
{}
{}
{}
{}
{}
\vspace{5mm}
\end{cventries}
But every I've tried to use the Document
class, PyLatex adds the \begin{document}
and \documentclass
preamble. This is the minimum I've been able to achieve:
\documentclass
%
%
%
%
\begin{document}%
\normalsize%
\end{document}
I only need a simple blank tex file where I can add 1 command cvsection
and 1 environment cventries
.
This was the dumps method in my class:
def dumps(self):
head = ''
print("No headers")
head += dumps_list(self.variables) + '%\n'
head += dumps_list(self.preamble) + '%\n'
return head + '%\n' + super(ArgFreeDoc, self).dumps()
This still has the same output as the Document
class. If I remove the super method in the return statement, I can't add new text to my file.
TLDR; How do I generate a blank tex file class and add commands to it after that?