0

I am using the windows subsystem for Linux and recently installed vim latex (latex-suite). I was following the tutorial and typed

:let g:Tex_CompileRule_dvi = 'latex -src-specials -interaction=nonstopmode $*'

and

:TCTarget dvi

in gvims command line. However when I type \ll and \ls nothing happens. It just says :call Tex_ForwardSearchLaTeX(). I am using xdvik as my viewer. Any help would be greatly appreciated.

Also - I tried the same thing in an Ubuntu virtual machine and I get the same problem. I thought it might be the viewer but the official website says that xdvik supports forward searching.

1

After looking around at the xdvi documentation (I wasn't using xdvik apparently) I found this command for forward searching:

:execute "!xdvi -sourceposition " .line(".").expand("%")." ".expand("%:r").".dvi"

which works after pressing /ll. Is there anyway I can map this to /ls? (By going into latex-suites config file or something).

0

I mapped this command by adding the line

<f4> :execute "!xdvi -sourceposition " .line(".").expand("%")." ".expand("%:r").".dvi"

in

~/.vim/after/plugin/maps.vim

You can create such a file, vim will find it. In the tex file, add \uspackage{srcltx}. Install the package srcltx.sty if it is not installed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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