On Mon, 2011-02-14 at 17:28 -0500, Ted Pavlic wrote:
> > main.tex
> > chap1/
> > chap1.tex
>
> First, I assume you are familiar with the TeX FAQ about importing bits
> of document from subdirectories(?). There are complications that might
> make you think twice about that sort of organization (but there are
> packages that make it easier as well):
>
> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=docotherdir
Thanks for the link. I was aware of issues with paths etc, but figured
I'd see what I could do about them once I got started. Not very hard to
change back to a flat layout halfway.
>
> > When editing chap1.tex, \ll gives the following.
> >
> > || I can't find file `main.tex'. main.tex
> > || Emergency stop.
>
> This doesn't make much sense to me. Before TeX-LaTeX starts the build,
> it changes to the directory containing the latexmain file. The exception
> to this is when you set the b:fragmentFile parameter, but then it
> ignores the latexmain entirely. So it doesn't make sense that your build
> is finding the latexmain and yet not changing to the right directory.
>
> According to the TeX-LaTeX compiler.vim source, there used to be
> problems on Linux machines with changing to directories with spaces in
> their names. Do any of the directories in the /ABSOULTE/ path have
> spaces? (e.g., are your files stored within a "My Documents" folder?) It
> is possible that your vim is choking on the space and not changing
> directory properly.
>
> When I create a sample main.tex and ch1/ch1.tex, it works fine for me.
>
> Can you post a minimal example that has this problem? (e.g., a
> "main.tex" and a "chap1.tex" and information about the directory
> structure) Perhaps there is something else interesting going on.
>
> --Ted
>
My minimal example below. Its VERY minimal:-
main.tex--------------------------
\documentclass{article}
\begin{document}
\input{chap1/chap1.tex}
\end{document}
----------------------------------
chap1/chap1.tex-------------------
\chapter{Introduction}
\section{First section}
----------------------------------
And, of course, main.tex.latexmain is a blank file. Seeing as it works
for you (and presumably others as well), I'm wondering whether it has to
do with other vim plugins I have. Eclim is the big one, of course. I'm
attaching to this email my .vimrc if it makes a difference (maybe my
autocmd's are affecting things?).
|