Thread: [Vim-latex-devel] Compilation
Brought to you by:
srinathava,
tmaas
From: Simon F. <sim...@a-...> - 2008-06-18 09:43:54
|
Hi Listmembers, I have two issues. a) I set "let g:Tex_ViewRuleComplete_pdf = 'evince $* &'" but it is not automatically opened after compilation, is that the desired behavior? b) Sometimes after compilation I get a "press a Button" message. So far only happened in conjunction with "latex ran once". So it doesn't seem to happen if latex runs multiple times. My entire tex.vim: let g:tex_flavor = "latex" let g:Tex_MultipleCompileFormats = 'pdf' let g:Tex_ViewRuleComplete_pdf = 'evince $* &' let g:Tex_DefaultTargetFormat = 'pdf' Thanks in advance Simon |
From: Simon F. <sim...@a-...> - 2008-06-18 09:52:28
|
let g:Tex_ViewRuleComplete_pdf = 'evince $* &' didn't work I had to add a ".pdf" let g:Tex_ViewRuleComplete_pdf = 'evince $*.pdf &' |
From: Till M. <ope...@ti...> - 2008-06-18 10:12:41
|
On Wed June 18 2008, Simon Friedberger wrote: > I have two issues. > > a) I set "let g:Tex_ViewRuleComplete_pdf = 'evince $* &'" but it is not > automatically opened after compilation, is that the desired behavior? Iirc it should be enough to set it to 'evince' on UNIX/Linux systems, the filename and ampersand are added by default. But it is not ViewRuleComplete but ViewRule that you need to change to 'evince'. Regards, Till |
From: Simon F. <sim...@a-...> - 2008-06-18 10:21:18
|
> Iirc it should be enough to set it to 'evince' on UNIX/Linux systems, the > filename and ampersand are added by default. It does not work without. > But it is not ViewRuleComplete but ViewRule that you need to change to 'evince'. I think you misunderstood me. The command works I just wondered if it should be executed automatically after compilation. Bye Simon |
From: Simon P. <pre...@gm...> - 2008-06-18 11:40:15
|
Simon, Yes, I think that is the standard behaviour. It annoyed me a bit, so I added in ~/vimfiles/ftplugin/latex-suite/compiler.vim the function: function! Tex_SaveCompileView() silent! update call Tex_RunLaTeX() call Tex_ViewLaTeX() endfunction And inside "function! <SID>Tex_SetCompilerMaps()" I added call Tex_MakeMap(s:ml."lz", "<Plug>Tex_SaveCompileView", 'n', '<buffer>') so that now "\lz" saves the tex file, compiles, and opens the viewer. Hope that helps, Simon On Wed, Jun 18, 2008 at 11:21 AM, Simon Friedberger <sim...@a-...<simon%2Bv...@a-...>> wrote: > > Iirc it should be enough to set it to 'evince' on UNIX/Linux systems, the > > filename and ampersand are added by default. > It does not work without. > > > But it is not ViewRuleComplete but ViewRule that you need to change to > 'evince'. > I think you misunderstood me. The command works I just wondered if it > should be executed automatically after compilation. > > Bye > Simon > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Vim-latex-devel mailing list > Vim...@li... > https://lists.sourceforge.net/lists/listinfo/vim-latex-devel > > |
From: Ted P. <te...@te...> - 2008-06-18 12:10:08
|
> Yes, I think that is the standard behaviour. It annoyed me a bit, so I > added in > ~/vimfiles/ftplugin/latex-suite/compiler.vim the function: > function! Tex_SaveCompileView() > silent! update > call Tex_RunLaTeX() > call Tex_ViewLaTeX() > endfunction > And inside "function! <SID>Tex_SetCompilerMaps()" I added > call Tex_MakeMap(s:ml."lz", "<Plug>Tex_SaveCompileView", 'n', '<buffer>') > so that now "\lz" saves the tex file, compiles, and opens the viewer. Wouldn't (in .vimrc): :map \lz \ll\lv<CR> be simpler than modifying Vim-LaTeX? A few other points: 1. Many Vim-LaTeX users have PDF (or DVI) viewers that do autorefreshing (Skim and TeXniscope in OS/X are terrific examples; Yap in Windows works too). In that case, \lv and \ll are all that's needed. Every time an \ll completes, the PDF viewer autorefreshes. On Linux, I *believe* kpdf autorefreshes (or did at one point). 2. If you really do need to call your PDF viewer EVERY TIME you build, you could add an "&& viewer" line in your CompileRule. That should be roughly equivalent to adding an "\lz" command (I understand that the viewer will get called more than is necessary when Vim-LaTeX runs latex several times, but it's a start). 3. Remember that Vim-LaTeX will pass your build target to "make" if it finds a Makefile in the current directory (additionally, if you have multiple TeX files, you can create a dummy file ending in ".latexmain" with the same root name as your main TeX file. That lets Vim-LaTeX know what to do when you call \lv (or \lz)). In that case, your makefile can do some of the heavy loading (e.g., running the viewer). 4. I've modded my own Vim-LaTeX so that if a flag is set and the target is DVI, it runs a dvi-to-pdf command *after* all of the latex runs (rather than creating a PDF on each latex run). A similar fix could be applied here. That is, if a flag is set, after everything in an "\ll" is done, run the viewer. In the end, I think this problem is solved for most people by either: *) having an auto-refreshing PDF viewer, *) adding a ":map" command to their .vimrc that implements an "\lz" HTH -- --Ted > > Hope that helps, > Simon > > On Wed, Jun 18, 2008 at 11:21 AM, Simon Friedberger > <sim...@a-... <mailto:simon%2Bv...@a-...>> wrote: > > > Iirc it should be enough to set it to 'evince' on UNIX/Linux > systems, the > > filename and ampersand are added by default. > It does not work without. > > > But it is not ViewRuleComplete but ViewRule that you need to > change to 'evince'. > I think you misunderstood me. The command works I just wondered if it > should be executed automatically after compilation. > > Bye > Simon > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Vim-latex-devel mailing list > Vim...@li... > <mailto:Vim...@li...> > https://lists.sourceforge.net/lists/listinfo/vim-latex-devel > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > > > ------------------------------------------------------------------------ > > _______________________________________________ > Vim-latex-devel mailing list > Vim...@li... > https://lists.sourceforge.net/lists/listinfo/vim-latex-devel -- Ted Pavlic <te...@te...> |
From: Simon P. <pre...@gm...> - 2008-06-18 15:57:28
|
> > Wouldn't (in .vimrc): > > :map \lz \ll\lv<CR> > > be simpler than modifying Vim-LaTeX? > > Yes, it would. My solution was a result of i) being inclined to understand better how latex-suite worked, and ii) being too stupid to think of using "map". Best wishes, S |
From: Simon F. <sim...@a-...> - 2008-06-18 17:01:11
|
That's the solution I used though I believe that would be the better default behaviour for \ll or \lv. On 16:11 Wed 18.06.08, Simon Preston wrote: > > > > Wouldn't (in .vimrc): > > > > :map \lz \ll\lv<CR> > > > > be simpler than modifying Vim-LaTeX? > > > > > Yes, it would. My solution was a result of i) being inclined to understand > better how latex-suite worked, and ii) being too stupid to think of using > "map". > > Best wishes, S |
From: Till M. <ope...@ti...> - 2008-06-18 10:13:51
|
On Wed June 18 2008, Simon Friedberger wrote: > let g:Tex_ViewRuleComplete_pdf = 'evince $* &' > didn't work I had to add a ".pdf" > let g:Tex_ViewRuleComplete_pdf = 'evince $*.pdf &' Btw, This beheavior is documented in: vimfiles/ftplugin/latex-suite/texrc Regards, Till |
From: Simon P. <pre...@gm...> - 2008-06-18 11:51:00
|
> > > b) Sometimes after compilation I get a "press a Button" message. So far > only happened in conjunction with "latex ran once". So it doesn't seem > to happen if latex runs multiple times. > > On your second point, I also get this behaviour - haven't looked into it though, and afraid I can offer no insight to why it happens. Does anybody else know? Regards, S |
From: Ted P. <te...@te...> - 2008-06-18 17:14:12
|
Simon Friedberger wrote: > That's the solution I used though I believe that would be the better > default behaviour for \ll or \lv. I disagree. I think many people who have auto-refreshing PDF viewers (e.g., everyone on the floor of my department) would be upset by that change. It's simple to add the behavior you want (by one of the myriad methods already described), and it's hard to get rid of it if it's there by default. Additionally... >>> :map \lz \ll\lv<CR> By putting that <CR> in there, it should get you passed some of the "Press enter to continue" prompts after compilations. I don't use this method. It's just a guess. --Ted >>> >>> be simpler than modifying Vim-LaTeX? >>> >>> >> Yes, it would. My solution was a result of i) being inclined to understand >> better how latex-suite worked, and ii) being too stupid to think of using >> "map". >> >> Best wishes, S > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Vim-latex-devel mailing list > Vim...@li... > https://lists.sourceforge.net/lists/listinfo/vim-latex-devel > -- Ted Pavlic <te...@te...> |
From: Martin S. <fo...@un...> - 2008-06-19 22:32:32
|
On Wed, Jun 18, 2008 at 01:14:10PM -0400, Ted Pavlic wrote: > >>> :map \lz \ll\lv<CR> > > By putting that <CR> in there, it should get you passed some of the > "Press enter to continue" prompts after compilations. I don't use this > method. It's just a guess. In .vim/after/ftplugin/tex.vim: if !has("gui_running") :nnoremap <buffer> <Plug>Tex_Compile :call Tex_RunLaTeX()\|<cr><cr> endif But it worked a lot better in vim 7.0, now I have to press enter once in a while. Also, the earlier mentioned >> call Tex_MakeMap(s:ml."lz", "<Plug>Tex_SaveCompileView", 'n', >> '<buffer>') Is not necessary, see: :help autowrite Happy vimming Martin |