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?).
" An example for a vimrc file.
"
" Maintainer:   Bram Moolenaar <b...@vim.org>
" Last change:  2008 Dec 17
"
" To use it, copy it to
"     for Unix and OS/2:  ~/.vimrc
"             for Amiga:  s:.vimrc
"  for MS-DOS and Win32:  $VIM\_vimrc
"           for OpenVMS:  sys$login:.vimrc

" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
  finish
endif

" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible

" allow backspacing over everything in insert mode
set backspace=indent,eol,start

set backupdir=~/vimbackups " Don't store backups in the current directory
set nobackup            " do not keep a backup file, use versions instead
set history=50          " keep 50 lines of command line history
set ruler               " show the cursor position all the time
set showcmd             " display incomplete commands
set incsearch           " do incremental searching

" Don't use Ex mode, use Q for formatting
map Q gq

" CTRL-U in insert mode deletes a lot.  Use CTRL-G u to first break undo,
" so that you can undo CTRL-U after inserting a line break.
inoremap <C-U> <C-G>u<C-U>

" In many terminal emulators the mouse works just fine, thus enable it.
if has('mouse')
  set mouse=a
endif

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
  syntax on
  set hlsearch
  colorscheme desert
endif

if has("autocmd")

  " When editing a file, always jump to the last known cursor position.
  " Don't do it when the position is invalid or when inside an event handler
  " (happens when dropping a file on gvim).
  " Also don't do it when the mark is in the first line, that is the default
  " position when opening a file.
  autocmd BufReadPost *
    \ if line("'\"") > 1 && line("'\"") <= line("$") |
    \   exe "normal! g`\"" |
    \ endif

  set autoindent                " always set autoindenting on

  " Set the textwidth for University Work files
  autocmd BufReadPre /home/data/UniversityWork/Masters-StereoVision/* set tw=80
  " Set the textwidth for University Work files
  autocmd BufReadPre /home/data/UniversityWork/Masters-StereoVision/* set 
fo+=tcqo
  " Automatically change working directory
  autocmd BufEnter * lcd %:p:h
endif " has("autocmd")

if has("spell")
  " turn spelling on by default
  set spell

  " toggle spelling with F4 key
  map <F4> :set spell!<CR><Bar>:echo "Spell Check: " . strpart("OffOn", 3 * 
&spell, 3)<CR>

  " limit it to just the top 10 items
  set sps=best,10                    
endif

set nu
set expandtab
set tabstop=2
set shiftwidth=2
" Formatting options honor textwidth (if set), and work both within and outside
" comments. o is so that o/O within comments adds comments tag.
set fo+=tcqo
" Auto-folding
set foldmethod=syntax
" Options for vim-latexsuite
filetype plugin indent on
set grepprg=grep\ -H\ $*
let g:tex_flavor = "latex"
" Set default action for Project Tree
let g:EclimProjectTreeActions=[{'pattern': '.*', 'name': 'Edit', 'action': 
'edit'}, {'pattern': '.*', 'name': 'Tab', 'action': 'tablast | tabnew'}, 
{'pattern': '.*', 'name': 'Split', 'action': 'split'}]
let g:EclimCSearchSingleResult = "edit"
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Vim-latex-devel mailing list
Vim-latex-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vim-latex-devel

Reply via email to