Only a too long comment about:
I thought \documentclass
always went right at the top.
Not necessarily, beside \RequirePackage{}
, that could be needed to load the package before the macros contained in the .cls file, many (not all) commands works above \documentclass
. For example (It is a proof of concept, not a recommendation!) this is a functional code:
\def\mymacro{Some macro make this text. }
\newcommand\thistoo{This too. }
\title{My title}
\author{Me}
\date{\today}
\documentclass{article}
\begin{document}
\maketitle
Hello, Word. \mymacro
\thistoo
\end{document}
In fact, you can have a working main.tex
file without a \documentclass
, as this can be loaded from a subdocument:
\input{pre-preamble}
\begin{document}
\TEST
\lipsum[1-10]
\end{document}
Where pre-preamble.tex
could be some like:
% pre-preamble.tex
\def\TEST{A test. }
\documentclass[twocolumn]{article}
\usepackage{lipsum}
:-D
Not that I'm an expert, but I can't think of any others besidesnag
andhyphsubst
. – Paul Gessler Dec 29 '14 at 23:03fix-cm
one? – cfr Dec 29 '14 at 23:34