[texhax] For bibitem

Robin Fairbairns Robin.Fairbairns at cl.cam.ac.uk
Sun Oct 31 10:33:16 CET 2004


john palmer wrote:

> pdv204 at lehigh.edu:
> > > Is there a tool I can use to convert these citations to the normal
> > > bibtex format like.
> 
> Reinhard Kotucha: 
> > It's nearly impossible to write a program which can understand the
> > \bibitems.  It is possible if all the \bibitems use ***exactly*** the
> > same format.  I doubt that this is the case.
>  
> I think one could do it with a perl program of a few dozen lines, even if
> the format of the bibitems varies a little, as perl has excellent
> functions for matching text with regular expressions.  I recently
> converted a list of 600 references from html to bibtex by this method.  
> You would probably need to make some individual adjustments afterwards
> with an editor, but the perl program would have done the repetitive work
> for you.
> 
> However this may not be useful advice unless you have some acquaintance
> with perl (or its forerunners, sed awk etc).  You may want to give it a
> go, though, as perl is very useful to know.

there's a readily available perl script to do the job.  strange as it
may seem, it's described in the faq...

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=makebib



More information about the texhax mailing list