Thread: [Vim-latex-devel] Viewer doesnt start in Ubuntu Dapper Drake
Brought to you by:
srinathava,
tmaas
From: Sebastian M. <seb...@un...> - 2006-03-22 13:09:39
|
Hi all I switched from Debian to Ubuntu recently. When i start gvim from the file-browser (nautilus), "g:call Tex_ViewLaTeX()" (\lv), doesnt do anything. When I start gvim from the shell everything works fine. In /usr/share/vim/addons/ftplugin/texrc, I uncommented " TexLet g:Tex_ViewRuleComplete_dvi = '' But that didnt help. Version of latexsuite as reported by synaptic: 0.20041219-2 Version of vim: 6.4.6 Any suggestions? Regards, Sebastian. |
From: Srinath A. <sri...@gm...> - 2006-03-22 22:05:37
|
Hi, > I switched from Debian to Ubuntu recently. When i start gvim from the > file-browser (nautilus), "g:call Tex_ViewLaTeX()" (\lv), doesnt do > anything. When I start gvim from the shell everything works fine. > I do not have access to Ubuntu right now, but a guess is that in the two cases, the $PATH variable is different so that in one case, the program specified by g:Tex_ViewRule_dvi is not found while its found in the other. In your case, I am pretty sure the following should work: :let g:Tex_ViewRule_dvi =3D '/usr/bin/xdvi' and then do \lv. If you specify the complete path to your viewer, things _should_ work. > In /usr/share/vim/addons/ftplugin/texrc, I uncommented > > " TexLet g:Tex_ViewRuleComplete_dvi =3D '' g:Tex_ViewRuleComplete_dvi is to fix another problem i.e, when your viewer needs to be called with a custom syntax. > > Version of latexsuite as reported by synaptic: 0.20041219-2 > Version of vim: 6.4.6 > This is a _really_ old version of latex-suite. I would recommend getting the latest version directly from: http://vim-latex.sourceforge.net/index.php?subject=3Ddownload&title=3DDownl= oad Srinath |
From: Aethon <ae...@gm...> - 2006-03-23 01:04:17
|
On 3/22/06, Srinath Avadhanula <sri...@gm...> wrote: > > Version of latexsuite as reported by synaptic: 0.20041219-2 > > Version of vim: 6.4.6 > > > This is a _really_ old version of latex-suite. That is actually the version that Debian has packaged[1]. The package is currently up for adoption, waiting for someone who knows what they are doing to take over. Ubuntu has inherited the package straight from Debian, out of date as it is. [1] http://packages.qa.debian.org/v/vim-latexsuite.html |
From: Sebastian M. <seb...@un...> - 2006-03-23 10:58:47
|
Am Mittwoch, den 22.03.2006, 14:05 -0800 schrieb Srinath Avadhanula: > Hi, > > > I switched from Debian to Ubuntu recently. When i start gvim from the > > file-browser (nautilus), "g:call Tex_ViewLaTeX()" (\lv), doesnt do > > anything. When I start gvim from the shell everything works fine. > > > cases, the $PATH variable is different so that in one case, the program > specified by g:Tex_ViewRule_dvi is not found while its found in the > other. > > In your case, I am pretty sure the following should work: > > :let g:Tex_ViewRule_dvi = '/usr/bin/xdvi' > > and then do \lv. If you specify the complete path to your viewer, things > _should_ work. Nope. > > In /usr/share/vim/addons/ftplugin/texrc, I uncommented > > > > " TexLet g:Tex_ViewRuleComplete_dvi = '' > > g:Tex_ViewRuleComplete_dvi is to fix another problem i.e, when your > viewer needs to be called with a custom syntax. I understood that, but default was the empty string, and if I get it right, that overwrites "g:Tex_ViewRule_dvi" !? Anyway, that's OT. > This is a _really_ old version of latex-suite. I would recommend getting > the latest version directly from: > > http://vim-latex.sourceforge.net/index.php?subject=download&title=Download OK, I did so, but that didnt help either. Can give some suggestions how to debug it myself? I would like to see what happens exactly when calling the view function. I guess that xdvi dies out of some reason and vim/latexsuite doesnt sense that thinking that regards, Sebastian. |
From: Srinath A. <sri...@gm...> - 2006-03-23 19:04:29
|
Hi, On 3/23/06, Sebastian Menge <seb...@un...> wrote: > > Can give some suggestions how to debug it myself? I would like to see > what happens exactly when calling the view function. I guess that xdvi > dies out of some reason and vim/latexsuite doesnt sense that thinking > that > Thanks for offering to debug. Here are suggestions: 1. Put :let g:Tex_Debug =3D 1 in your ~/.vim/ftplugin/tex.vim. And then press \lv. Then type: :call Tex_PrintDebug('comp') This should show a string like: Tex_ViewLaTeX: execString =3D xdvi "file.dvi" & Vim-Latex basically runs this string as: exec 'silent! !'.execString You can try running this without the silent! to see any error messages which might pop up. Type in exactly the string which is reported by Tex_ViewLaTeX. So, try :! xdvi "file.dvi" & from within vim to see what might be happening. This should give you a clue. The last command will be the most informative. It should tell you if the external command has any errors etc. 2. If none of this gives you any new information, you can try as a last resort looking at the Tex_ViewLaTeX() function in ~/.vim/ftplugin/latex-suite/compiler.vim. This is the function invoked when you type \lv. HTH Srinath |
From: Sebastian M. <seb...@un...> - 2006-03-24 09:23:41
|
Am Donnerstag, den 23.03.2006, 11:04 -0800 schrieb Srinath Avadhanula: > 2. If none of this gives you any new information, you can try as a last > resort looking at the Tex_ViewLaTeX() function in > ~/.vim/ftplugin/latex-suite/compiler.vim. This is the function > invoked when you type \lv. Bad news: wrong CWD was wrong .. I looked into the function and put some new debug statements there to be sure what the cwd is. There was no problem at all. Good news: Problem is fixed. :-) Here a small log of my analysis: When i opened the file in nautilus (the gnome file explorer) with "GVim Text Editor", I had _two_ buffers in vim. One with "~/path/file.tex" and one with "file:///home/me/path/file.tex". Dont know why. But starting a file from nautilus with my homebrewn command "gvim", i had only one buffer, and surprisingly "\lv" works fine. To reproduce the error, I launched gvim from the shell the same way it is launched from nautilus: # gvim -f file:///home/me/path/file.tex And look, i had two buffers and \lv didnt work. Interestingly, # gvim file:///... (without '-f') opens two buffers but \lv works. Looking into the man-page "-f" means "foreground, do not fork and detach from the shell vim was started in". Whatever that means. Testing # gvim -f path/file.tex results in one buffer, but \lv doesnt work. So forget the two buffers and file:// URL and focus on "-f" So i guess the problem is analyzed and solved, but im not sure whose it is :-) regards, Sebastian. |
From: Sebastian M. <seb...@un...> - 2006-03-23 21:47:29
|
Am Donnerstag, den 23.03.2006, 11:04 -0800 schrieb Srinath Avadhanula: > reported by Tex_ViewLaTeX. So, try > :! xdvi "file.dvi" & > from within vim to see what might be happening. This should give you > a clue. The last command will be the most informative. It should tell Got it. I am in my homefolder, instead of the folder the tex/dvi file resides in. Now i think that's a problem with my OS/Desktop. Or should latexsuite use the absolute path !? Thanks for the support, latexsuite rocks :-) Sebastian. |
From: Srinath A. <sri...@gm...> - 2006-03-24 03:53:32
|
Hi Sebastian, On 3/23/06, Sebastian Menge <seb...@un...> wrote: > Am Donnerstag, den 23.03.2006, 11:04 -0800 schrieb Srinath Avadhanula: > > reported by Tex_ViewLaTeX. So, try > > :! xdvi "file.dvi" & > > from within vim to see what might be happening. This should give you > > a clue. The last command will be the most informative. It should tel= l > > Got it. I am in my homefolder, instead of the folder the tex/dvi file > resides in. Now i think that's a problem with my OS/Desktop. > > Or should latexsuite use the absolute path !? Well, latex-suite at least in my case, does not care about the current directory of vim as long as the DVI file is in the same directory as the tex file being edited. It also figures out the path using the .latexmain file if found.. So something like: $ cd ~/research/phd/ $ vim main.tex :cd /tmp " from within vim \lv " in normal mode. works for me. I hope the sequence of actions I'm describing is clear. > Thanks for the support, latexsuite rocks :-) Thanks :) Srinath |