Re: [Vim-latex-devel] Features like preview-latex
Brought to you by:
srinathava,
tmaas
From: Aditya M. <ad...@um...> - 2003-10-03 15:55:54
|
Hi Srinath, Sep 21 Srinath Avadhanula wrote about Re: [Vim-latex-devel] Features like... >Hi Aditya, > >On Fri, 19 Sep 2003, Aditya Mahajan wrote: > >> this package for preview-latex (http://preview-latex.sourceforge.net/) for >> xemacs, and by the look of it, it looks really impressive. >> The main feature that I am concerned about is the ability to display >> math. I always liked that feature in lyx also. I am wondering, why it can >> not be done in (g)vim. I think that one could use a unicode encoding for >> the file and replace \sum by sigma from unicode and go about it. The only >> >I must admit preview-latex does sound extremeley impressive and might be >very useful. But IMHO you underestimate the complexity of rendering >equations using unicode fonts. Simple things like $x^2 + y^2 = z^2$ >might be fine, because most probably we could just use the singe line >itself, but with more complex equations where the latex source occupies >much more space than the equation displayed, things will get very very >complex indeed. > >You will notice that preview-latex actually runs latex and then >ghostscript to generate the bitmap and then displays that inline in the >document. I beleive that a project which aims to do something like this >in native vim script is going to be as complicated as LaTeX itself! > >Infact, an easier solution would be to patch VIM itself to allow for >inline graphics and then use the same route which preview-latex does. >Ofcourse, having delved into the VIM source only very briefly, I do not >know if this is even feasible. > Please have a look at http://www.angelfire.com/vt2/conceal/ and http://www.angelfire.com/vt2/conceal/Introduction.html for a snapshot. This is closer to what I had in mind, though I do not like some of the aspects of the implementation. I think that somethings like having section headings in bold and using unicode characters to display greek symbols would be much better. It does not try to render equations, but is much closer to what I would like to have. But the only trouble is that is is given as a patch to the original code, but I do not have the courage to read the entire vim code and try to figure it out. My question: Is it possible to do something like this in a vim script. This is what I think is possible.... open a preview window and scrollbind it to the main tex window. This is exactly what the author of conceal is doing. Make some changes to the higlight scheme to be used for preview window (how?? the preview window has no tags!) to have things like bold underline, a different color for the math mode and replacement of simple math characters (you mentioned that there was a script that already did this, so that will save some work) and we have a system where we can preview as we type. Maybe I am still on a bit of a nostalgia from lyx. I learnt latex b working on lyx. And I found it amazing. Then I shifted to typing documents in latex as lyx does not give me as much control as raw latex does. Also there was the problem of editing in lyx, use the arrow keys, copy paste, everyhting was too primitive. That is why I shifted to latex+vim. Now I wonder of (g)vim can give atleast some comparable viewing. Cheers aditya >Quite frankly, I would not even attempt something this complicated >myself :( > >Also, for simple things like displaying the actual greek character theta >instead of \theta, the greek Sigma character in place of \sum etc, I >beleive someone has already done something like that in VIM. I do not >have the URL handy though. And I wonder how they handle the case where >in some places, the user wants \sum but wants to display \sigma in other >places... > >Srinath > |