[Vim-latex-devel] Re: tex-refs project and xml to vim-help conversion
Brought to you by:
srinathava,
tmaas
From: Srinath A. <sr...@fa...> - 2003-02-01 02:58:15
|
Hey Michael, Thanks for the information! On Fri, 31 Jan 2003, Michael Wiedmann wrote: > For TXT output we use the HTML non-chunked output and use 'lynx -dump' > to create TXT output. Note: there are no XSL stylesheets to generate > directly TXT output! > Thats what it looked like :) A question: How hard is it to tweak the xsl stylesheets for html non-chunked so that instead of generating sections like: <h1 class=section><a name="#section-tag">Overview</h1> it will do something like: <table> <tr><td colspan=2>=====================================================================</td></tr> <tr><td>Section name</td><td align=right>*section-tag*</td></tr> </table> I hope you see what I'm trying to say... This way, hopefully lynx -dump will produce the sections in the familiar way: ===================================================================== OVERVIEW *section-tag* So... although a xsl stylesheet for creating plain text does not exist, how hard is it to tweak the html-nonchunked stylesheet so that lynx -dump will look reasonable? Is this a better option? Lesser work maybe? > > > For a simple vim help file itself, we need not more than a couple of > > > elements: > > > > > > 1. table > > > 2. option > > > 3. tag > > > 4. para > > > > > > and maybe a few more. > > IMHO it's _not_ a good idea to restrict the use to a subset of all available > DocBook tags! If a backend cannot handle specific tags it should simply > copy the contents (all between start and end tag) of the unknown tags > unchanged to the output file. > Its just that supporting each tag becomes more and more work... Well, we could always just get the text data from all unsupported tags... Dunno how good an idea that is though.... Might even be better just completely ignoring unsupported tags. > Maybe you should consider to split the source XML file into separate > files. It can be easier to handle only a part (e.g. Chapter 1, TeX) > of the complete XML file at the beginning. I could provide a XSL > stylesheets which auomatically extracts a specific section of the > complete source file into a separate file. > I do not really know how splitting XML sources into seperate files will be much help. A typical vim help file is a single text file with sections... And unlike the tex-refs project, a vim help file is well within maybe 10-20 kb. I will also reply to Benji's mail here... He asked whether it will be a good idea to process DocBook XML directly from within python. If you remember, I had spent some time mocking up a tiny little python script to do this. My experience was that its very easy to get started and get some results if you use python. The xml.dom and xml.dom.minidom packages are extremeley nice and let you get something done without having to know much XML. The problem is that after a while, it will become a bit of grunt work supporting each tag. Actually, over the last couple of weeks, I have been very slowly hacking away at that primitive python code. It has gotten to a pretty respectable size now (unfortunately)... It is able to do some good stuff now... Benji, are you interested in taking a look at it? If you are interested in going the python way, its definitely worth a look... I am very surprized to find that there is no docbook-latex converter already!!! But it will be a big gain even if we can have just vim-help and html... Srinath PS: I am subscribed to the tex-refs mailing list too... -- Srinath Avadhanula Jan 31 1:04pm "Not only is this incomprehensible, but the ink is ugly and the paper is from the wrong kind of tree." -- Professor W. |