Re: [Vim-latex-devel] running latex
Brought to you by:
srinathava,
tmaas
From: Srinath A. <sr...@ee...> - 2002-11-20 11:56:53
|
Dear Carl, Here's an update about the compiler part... I just had a go at adding the kind of functionality you wanted. As I previously mentioned, I like the quickfix window because it gives us a nice overview of the errors and also allows us to fix the errors out of sequence. You and Benji seem to prefer looking at the log file. Hence I made a compormize. Show both! So here's what happens in the latest version: -----------------------------------%<----------------------------------- When you press \ll, then the quickfix window with one error on each line opens up. Beneath the quickfix window, the log file is opened in a "preview" window. The display within the preview window is adjusted to match with the error currently being examined by the user. When the user moves around within the quickfix window, this display is automatically adjusted to keep in sync. When the user presses <enter> in the quickfix window, then he is taken to the correct line and column number of the .tex file. The column number is computed either from the length of the broken line after l.\d\+ in the log file or if we have a undefined citation, then search for the missing citation word... TODO: 1. multiple errors on the same line dont work. the preview window gets stuck on the first error. 2. test more robustly. 3. Ask people about various formats of LaTeX warnings, so we can guess column numbers in other situations too. As of now, only undefined citations and errors are caught well. For all other kinds, we goto the first column of the correct line number. -----------------------------------%<----------------------------------- Please try it out when you get a chance. http://vim-latex.sourceforge.net/download/latexSuite-beta.zip (Note: Its still "slightly" beta, but should be fixed up soon). BTW, Mikolaj and I have also included most of your suggestions about the environment macros. Right now, pressing <F5> in insert mode prompts for an environment to insert... We will soon also implement a customizable way to have <S-F1...4> map to common environments. The bracketing polymorphic functions have been merged into latex-suite (thanks!) as well as the ReadLine() function for splitting a line keeping $$ in the same line... All in all, almost all your suggestions so far have been incorporated :) Please remind us if we have forgotten something. Have a look, Srinath On Tue, 19 Nov 2002, Srinath Avadhanula wrote: > > Hello Carl, > > > I prefer automatic updating of xdvi. > > > Firstly, the thing where you prefer to update the xdvi thing is a > setting problem rather than having to rewrite code. You could set > > g:Tex_CompileRule_dvi =3D 'xterm -bg ivory -fn 7x14 -e latex $* &' > > if you want the xdvi to be updated. Thats why there are all these > customization options in latex-suite... so each person can be happy. I > dont think its a good idea to hardcode something like this in > latex-suite. As of now, I think this complaint/preference of yours can > be handled completeley within the existing structure. > > [ NOTE: I just found out that there is bug in latex-suite which makes > this suggestion of mine not true... see the post-script. The bug > is very easy to fix and I am on it now ] > > Also, when you say the .log file is not updated when you have the above > setting, thats obviously because you run the latex command in the > background and immediately look at the log file. What about doing > something like: > > g:Tex_CompileRule_dvi=3D 'xterm -bg ivory -fn 7x14 -e latex \nonstopmode = \input{$*}; cat $*.log' > > That will get the xterm to quit as soon as latex finishes and you get > the automatically updated quickfix window. > > I tried this out on my cygwin/xdvi/latex/xterm setup and it does work > pretty well... (there were a few problems with characters in the > quickfix window, but that doesn't seem like a big deal. A matter of > passing it through sed or something to chomp lines...) > > > I know people have put in a lot of work on the quickfix way of > > displaying tex errors. Could my suggestions be considered as > > an option? > > > Also, the quickfix window does not give you as little information as you > think... In fact, the line which you see in the quick-fix window is a > concatenation of all lines in the log file starting from the one > starting with '!' to the first blank line after that... I have never > found any information about the error beyond that... > > About the going to the exact location thing... > > I personally do not like :cnext but the :cwindow method, because it lets > me go to some arbitrary error without having to go in order. Therefore, > the method proposed here of indenting the .log file seems not the optmal > one. I think a solution which fits in better with the existing setup > (and which I think will be more elegant) is to first list things in > cwindow and if the user wants open a preview window or something... This > should be not hard to do at all... Just a matter of having something > like: > > map p :pedit ^l.10<CR>:wincmd w<CR> > > Anyway, setting up the compiler and making it as customizable as it > presently is has been a continuing challenge... I would really prefer a > solution which either everyone likes or is customizable... > > Thanks, > > Srinath > > PS: I just noticed that there is a bug (again) in the compiler 'makeprg' > setup. If the user sets g:Tex_CompileRule_dvi directly in his ~/.vimrc, > that setting is ignored until the first time he does :TCTarget dvi. > Which is ofcourse because g:Tex_CompileRule_dvi is never used in > compiler/tex.vim... > > > N=18=AC=B1=F9=DE=B5=E9=9A=8AX=AC=B2=9A'=B2=8A=DEu=BC=BEN=89^j=B9=ED=85=E6= =DA=B2',=A1=FB=1Er=EA=E2=9E=0C=A8=BA=BC=1En=C8=AD{=08=AD=85$=8BrX=9C=92=17= =ABz=DA z=D6=85DA=13D=80=0B=A1=F6=93=85=AC-y'=AB=BD=EA=C2z=BBb~' |