简体   繁体   中英

Vim and Latex-Suite

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM