Re: [Ebib-users] Ebib 1.5.2 released; git repository
Brought to you by:
joostkremers
From: Thomas A. S. <tho...@un...> - 2007-11-03 16:40:37
|
Hi Joost, thanks for your incredibly fast reaction - this is just great! On Nov 3, 2007, at 12:05 PM, Joost Kremers wrote: > hi thomas, > > On Fri, Nov 02, 2007 at 06:21:38PM +0100, Joost Kremers wrote: > [unbalanced parentheses in field values] >> what i *should* have done is to make ebib not choke on unbalanced >> parentheses. the simplest way to do that is to tell ebib that () >> are not to >> be considered parentheses at all. >> >> unfortunately, bibtex itself makes this simple solution unnecessarily >> difficult, because it actually *allows* braces to be used to >> enclose an >> entry. that is, this: >> >> @article(key, >> ... >> ) >> >> is equivalent to: >> >> @article{key, >> ... >> } >> >> but there is probably a way to work around that. with a bit of >> luck, i'll >> have something put together in a few days. i'll let you know when i >> do. > > well, i've looked at it, and working around this problem isn't so > easy as i > had hoped. i have a fix that allows you to use unbalanced > parentheses in > field values, but it breaks the ability to use parentheses as entry > delimiter. > > so, for that reason, i'm not adding this code to the master branch for > now. but i've added it to the devel branch (ATM, the difference > between > master and devel is *only* this code), so that you at least have a > way to > load your .bib files, provided you use braces {} to delimit entries. > > if you have git installed, you can get the code here: > <http://repo.or.cz/w/ebib.git> (make sure to check out the devel > branch, of > course.) if you don't have git, just let me know, i can send you the > source > privately. > Sigh... I can see why BibTeX syntax must be giving you headaches. I knew that you could use either braces or quotation marks as delimiters, I had no idea that parentheses are possible as well. In which case it is of course quite difficult for you to make a universally valid parser. I don't have that much experience with BibTex databases, but am just wondering how many people actually use parentheses for this purpose? > i haven't looked at error reporting at all yet. from the looks of > it, this > parentheses problem cannot be solved within the existing code, so i > think > my energy is better spent working on a reimplementation of the .bib- > file > parsing code rather than continue to modify the existing code... > > Well, maybe a good error-reporting tool would provide a solution. If ebib could provide something like "There are unbalanced parentheses in your file on lines X, XX, and XXX. Do you want to edit the file before I load it" and then load the file into a normal emacs buffer, that would help. In my case, I have such parentheses in the "annote"-field only, but of course, I could imagine that they may be found in titles as well (just think of the old-fashioned German way of haveing something like "1)" as a numbering system). So I would say disregard the problem; I'll just have to be careful to edit my files accordingly. I'll have a look at the other bibtex tools I use (such as pybliographer, jabref, and bibdesk); they never complained about the parentheses, so I assume that they disable parentheses as delimiters for bibtex by default. I don't have git; could you send me the source file by mail? Thanks a lot! All best Thomas |