I'm using latexsuite with vim and I am currently editing files that have the form
\documentclass[10pt]{article}
\input{header.tex}
\item blah
\input{footer.tex}
The problem is that the \begin{document} declaration is in the header.tex file, so that when I try to use latexsuite macros, it thinks I'm in the preamble. Is there any way to force latexsuite to behave as though it is in the body of the document? (also, if you're confused, the header.tex file also starts a list environment, hence the开发者_开发技巧 \item in the body.)
Thanks
As a practical solution, why don't you move the \begin{document}
and \end{document}
lines out of header.tex
and footer.tex
templates and into each actual document? I understand you may be trying to follow the DRY principle, but for a TeX file that's honestly intended to be compiled as a document, I feel that these two tags should actually be in that document, not sourced from another TeX file.
精彩评论