Re: [Vim-latex-devel] Forward search with okular
Brought to you by:
srinathava,
tmaas
From: Filip K. <ka...@fz...> - 2012-05-29 11:38:05
|
Hello Peter, I think the problem is resolved now. The clue was in the line: let g:Tex_CompileRule_pdf = 'pdflatex --synctex=1 -interaction=nonstopmode $*' instead of which I had let g:Tex_CompileRule_pdf = "/usr/local/bin/latexmk -e '$pdflatex=q/pdflatex -interaction=nonstopmode -file-line-error -halt-on-error -synctex=1/' -pdf -bibtex $*" coming from one of your posts. I think the synctex option was missing most. Now the forward search works. Though, I had one more problem: both the forward and backward searches always launched a new instance of viewer / gvim. To resolve this, I have searched some older mailing list archives and modified my .vimrc lines as follows: let g:Tex_ViewRule_pdf = 'okular --unique' let g:Tex_CompileRule_pdf = 'pdflatex --synctex=1 -interaction=nonstopmode $* -inverse-search "gvim --servername GVIM --remote +\%l \%f"' These options enforce the use of already running okular / gvim, hopefully this will help somebody. I wonder why these options are not included in the latest vim-latex version which I had installed. The only detail still remaining is that the windows don't get the KDE focus, I am not sure this has a solution. Filip > Hi Filip, > > If you have something like this i your vimrc > > set grepprg=grep\ -nH\ $* > let g:tex_flavor='latex' > let g:Tex_DefaultTargetFormat = 'pdf' > let g:Tex_ViewRule_pdf = 'okular' > let g:Tex_CompileRule_pdf = 'pdflatex --synctex=1 -interaction=nonstopmode $*' > > and have a ...synctex.gz (this is the file with all information needed > for forward searching) file in your project folder after compiling the > document, > I have no clue why forward search would not work. > > I use Okular version 0.14.2. > > Sorry if I cant help you more. > > Peter > > On Thu, May 17, 2012 at 4:46 PM, Filip Kadlec <ka...@fz...> wrote: >> Dear Peter, >> >> thanks so much for your description. I have updated vim-latex to the latest >> version; installed and activated pathogen, un-installed the distribution >> system-wide vim-latex, and then installed the latest vim-latex: >> >> ~>cd ~/.vim/bundle >> >> ~/.vim/bundle> git clone >> git://vim-latex.git.sourceforge.net/gitroot/vim-latex/vim-latex >> Cloning into vim-latex... >> remote: Counting objects: 4161, done. >> remote: Compressing objects: 100% (1469/1469), done. >> remote: Total 4161 (delta 2718), reused 4045 (delta 2665) >> Receiving objects: 100% (4161/4161), 1003.90 KiB | 774 KiB/s, done. >> Resolving deltas: 100% (2718/2718), done. >> >> After restarting vim, the scripts appear to be active; :scriptnames >> provides: >> >> ... >> 18: /home/kadlecf/.vim/bundle/vim-latex/plugin/SyntaxFolds.vim >> 19: /home/kadlecf/.vim/bundle/vim-latex/plugin/filebrowser.vim >> 20: /home/kadlecf/.vim/bundle/vim-latex/plugin/imaps.vim >> 21: /home/kadlecf/.vim/bundle/vim-latex/plugin/libList.vim >> 22: /home/kadlecf/.vim/bundle/vim-latex/plugin/remoteOpen.vim >> ... >> >> Also, \ll and \lv work as expected. Alas, \ls still does not work. It only >> states: >> :call Tex_ForwardSearchLaTeX() >> >> but the okular window does not open. The situation is the same if I source >> the files you sent in the previous post. Not sure if I am not doing >> something wrong... >> >> With best regards, >> >> Filip >> >> >> On Thu, 17 May 2012, Peter Vasil wrote: >>> >>> On Thu, May 17, 2012 at 1:00 PM, Filip Kadlec <ka...@fz...> wrote: >>>> >>>> Peter, >>>> thanks for your reply. >>>> >>>> Having sourced the lines below into vim, there is some progress. Now, >>>> when I >>>> type \ls , three new okular instances will open; one contains the >>>> compiled >>>> file while the other two are empty. Each provides an error box, like >>>> this: >>>> >>>> Could not open /home/kadlecf/Documents/path/file.tex and >>>> Could not open /home/kadlecf/Documents/path/40 >>>> >>>> where 40 corresponds to the current line in the .tex source. >>> >>> This could be the thing with the old version of vim-latex. I just can >>> say for the latest vim-latex version from the git-repository that >>> forward search works because I made some fixes regarding okular which >>> then went into the vim-latex source. Which vim-latex version do you >>> use? >>> >>>> >>>> Concerning the option "-synctex=1", sorry for my ignorance, but I don't >>>> know >>>> where to set it. What exactly does it influence? >>> >>> If you have put all lines in your vimrc which I posted in my previous >>> email, then the synctex option is already there. This option generates >>> the necessary data for forward search. Without this option forward >>> search doesn't work and not only in vim-latex. All latex editors use >>> the synctex option for forward search. >>> >>>> >>>> Also, I would be ready to install the latest version using the >>>> git-repository, but I do not know how to proceed... >>> >>> I use vim-pathogen [1] for managing my vim plugins. Simply clone the >>> vim-latex repository into the bundle directory. >>> If you read [1] then you will probably know what I mean with the >>> bundle directory. >>> The clone command is: >>> git clone git://vim-latex.git.sourceforge.net/gitroot/vim-latex/vim-latex >>> >>> You could also clone the repoository and copy all files manually to >>> ~/.vim/ folder. There is also some help on the vim-latex download page >>> [2], where to put all files. But the description is without the >>> pathogen plugin. >>> >>> [1]: http://www.vim.org/scripts/script.php?script_id=2332 >>> [2]: http://vim-latex.sourceforge.net/index.php?subject=download >>> >>> >>> Hope this helps, >>> Peter >>> >>> >>>> >>>> Filip >>>> >>>> >>>> On Thu, 17 May 2012, Peter Vasil wrote: >>>> >>>>> Hi, >>>>> >>>>> I use vim-latex with okular and forward search works like a charm. >>>>> >>>>> I have this in my .vimrc >>>>> >>>>> set grepprg=grep\ -nH\ $* >>>>> let g:tex_flavor='latex' >>>>> let g:Tex_DefaultTargetFormat = 'pdf' >>>>> let g:Tex_ViewRule_pdf = 'okular' >>>>> let g:Tex_CompileRule_pdf = "/usr/local/bin/latexmk -e >>>>> '$pdflatex=q/pdflatex -interaction=nonstopmode -file-line-error >>>>> -halt-on-error -synctex=1/' -pdf -bibtex $*" >>>>> >>>>> I use latexmk for compilation and you have to set "-synctex=1" >>>>> somewhere in the compile rules. >>>>> >>>>> Also, did you try to use the latest vim-latex from the git repository? >>>>> I dont know which version is in the OpenSUSE repositories but okular >>>>> forward search is working with the latest vim-latex version from the >>>>> git repository. >>>>> >>>>> Peter >>>>> >>>>> >>>>> On Thu, May 17, 2012 at 11:40 AM, Filip Kadlec <ka...@fz...> wrote: >>>>>> >>>>>> >>>>>> Hello, >>>>>> I would appreciate if someone could help me to resolve this problem. >>>>>> >>>>>> I have installed vim-latex from the OpenSuSE distribution. Most of its >>>>>> features work correctly. \ll will start latex translation, and \lv >>>>>> launches the viewer. However, \ls , instead of launching the forward >>>>>> search, does nothing. I have tried to make it work by entering, in vim: >>>>>> >>>>>> :let g:Tex_CompileRule_dvi = 'let'atex -src-specials >>>>>> -interaction=nonstopmode $*' ' >>>>>> >>>>>> and >>>>>> >>>>>> TCTarget dvi >>>>>> >>>>>> as found in the FAQ. However, this does not help. I understand from the >>>>>> mailing list there were some quite recent patches to this behavior, >>>>>> also >>>>>> in order to get a single instance of okular, but I am not sure how it >>>>>> is >>>>>> best to proceed. >>>>>> >>>>>> Thanks in advance for your assistance. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Live Security Virtual Conference >>>>>> Exclusive live event will cover all the ways today's security and >>>>>> threat landscape has changed and how IT managers can respond. >>>>>> Discussions >>>>>> will include endpoint security, mobile security and the latest in >>>>>> malware >>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>> _______________________________________________ >>>>>> Vim-latex-devel mailing list >>>>>> Vim...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/vim-latex-devel >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Live Security Virtual Conference >>>>> Exclusive live event will cover all the ways today's security and threat >>>>> landscape has changed and how IT managers can respond. Discussions will >>>>> include endpoint security, mobile security and the latest in malware >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> Vim-latex-devel mailing list >>>>> Vim...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/vim-latex-devel >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Vim-latex-devel mailing list >>>> Vim...@li... >>>> https://lists.sourceforge.net/lists/listinfo/vim-latex-devel >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and threat >>> landscape has changed and how IT managers can respond. Discussions will >>> include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Vim-latex-devel mailing list >>> Vim...@li... >>> https://lists.sourceforge.net/lists/listinfo/vim-latex-devel >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Vim-latex-devel mailing list >> Vim...@li... >> https://lists.sourceforge.net/lists/listinfo/vim-latex-devel >> > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Vim-latex-devel mailing list > Vim...@li... > https://lists.sourceforge.net/lists/listinfo/vim-latex-devel |