Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using vim 7.3.35 with the vim-latexsuite on ubuntu. After googling around I managed to setup forward/inverse search with xdvi by adding the following to my .vimrc:

let g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode --src-specials $*'
let g:Tex_ViewRuleComplete_dvi = 'xdvi -s 8 -keep -editor "gvim --servername vimlatex --remote +\%l \%f" $* &'

(I run vim on tex files as vim --servername vimlatex myfile.tex so that I do not get different instances of vim on the inverse search)

The above lines work fine except for two cases:

  1. If at any part of the path to my tex file there is a space character
  2. If my tex file name contains a dot

In the fist case, if I compile the file "a b.tex" and try to view it with xdvi I will get the error:

xdvi.bin: Error: Unrecognized option `b.tex'

In the second case, it will compile but when xdvi opens I get a warning dialog:

No references to source file "myfile.tex" in DVI file.

I assume it has to do with the way those lines in my .vimrc are written. Any ideas how I could work around that so that I can use space and dots in my paths?

share|improve this question
I am having the exact same problem with xdvi. Did you find a way to get around it? I am okay with not having spaces with my file names or directories but the warning is really annoying. Inverse search works without a problem but I am not able to do forward search. –  Shitikanth Feb 7 '13 at 10:11
Yes, that's the "solution": no spaces in the file name AND path. If that is the case I do not get any warnings. So you have no spaces whatsoever and you still get a warning? –  geo909 Feb 10 '13 at 16:35
Never mind, I figured out how to fix the problem. I was not giving xdvi the correct arguments for sourceposition. –  Shitikanth Feb 13 '13 at 2:31

1 Answer 1

up vote 2 down vote accepted

Many parts of the TeX 'tool chain' do not support spaces in file names/paths. While there are workarounds for some of the cases, that is not always possible. As such, the best approach here is not to have any relative or absolute paths in use which include spaces.

share|improve this answer
Thanks for bumping this up, I was still wondering about it. –  geo909 Dec 6 '12 at 19:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.