I need to create a really simple document template for other people to fill in and compile (e.g., they need to provide a name and email address). I could distribute it as a .cls
file and a template .tex
file, but I think it might be easier to just distribute it as a single file.
It appears that one can compile a document without a \documentclass
without any warnings. For example, despite not having a \documentclass
line, the following is a complete MWE:
\renewcommand\normalsize{\fontsize{10pt}{12pt}\selectfont}
\begin{document}
Hello world
\end{document}
Where the entire "class" is \renewcommand\normalsize{\fontsize{10pt}{12pt}\selectfont}
. What are the drawbacks of defining the entire "class" within the .tex
file and not using a \documentclass
line?
EDIT
To add a little more about what I am doing. I created a custom class that was not based on any other class. I then took David Carlisle idea
and changed
\documentclass{myclass}
to
\documentclass{article}
\makeatletter
% your definitions
\makeatother
but this caused conflicts of things that were defined in both myclass
and the article
class. It probably would have been better to use the minimal
class, but I realized that I didn't need the \documentclass{article}
before I thought about the minimal
class.
\usepackage
.\documentclass
was mandatory :P\normalsize
is used to produce an error, so if you define it you can run a classless document.