On Oct 30, 2007, at 7:34 AM, P Kishor wrote:

> First thing, perhaps the most important thing, I would suggest is to
> make BD as strict as a "strongly typed language." For now, I can stuff
> anything in BD, and it happily takes it.

This is legal with BibTeX...it lets you put anything you want in a  
database.

> The problem comes when I try
> to interface BD with any other program. Some of you might recall that
> I was having the darndest time trying to import my bib into CiteULike
> or Connotea. There were many opaque errors (or no error messages at
> all), but the closest descriptive error I would get was that some of
> my entries were too long. Well, the culprits were the Annote and
> Abstract fields that I had merrily filled with my notes. In one case,
> I had stuffed the text of the entire paper in the Annote field... it
> was convenient for me to look up the plain text, and BD didn't
> complain when I stuffed the text in. Well, apparently it violated
> BibTeX's rules.

This doesn't violate BibTeX file format rules, per se.  You may need  
to reorder your entries and save annote/abstract at the end of each  
entry (see the Files pref pane), but that's to work around a  
limitation in some versions of bibtex (the program) which have tiny  
memory capacity.

> Moving on, I gave up on CiteULike and Connotea, for the time being,
> and went back to BD. Until yesterday -- I tried using LyX, as much as
> I disliked using such an "anvil and hammer" looking system on my Mac.
> It seemed to work. Funnily, LyX's citation inserting workflow was
> really smooth and quick. Soon, I had my article text in LyX, with
> several citations scattered within. Then I decided to do a preview in
> PDF, and all hell broke loose. All kinds of errors that I couldn't
> even figure out where they were coming from. After much diagnosis, I
> realized that LyX was complaining about errors in my BD database.
> Because there were "illegal characters" (mostly quotation marks in
> Abstract and Annote fields), LyX was not even processing my document
> for replacing \cite{...} with citations. Seems like I can't type
> something "as simple as this" in the Abstract field without violating
> BibTex rules (Tex items at zero-depth... etc.)

This should only be a problem if you are /using/ annote and abstract  
in your citations.  Those aren't "standard" BibTeX fields, so the  
bibtex program ignores them unless you specifically modify the style  
to include them.

Now, double quotes in title/author/etc are going to cause problems.   
You can catch those by enabling warnings in BibDesk's Files pref pane.

> So, I tried my Perl script for doing a scan and replace. Well, I got
> the following --
>
> =================
> ~/bibliography.bib, line 69, warning: found " at brace-depth zero in
> string (TeX accents in BibTeX should be inside braces)
> ~/bibliography.bib, line 140, warning: found " at brace-depth zero in
> string (TeX accents in BibTeX should be inside braces)
> lexical buffer overflowed (reallocating to 4000 bytes)
> ..
> lexical buffer overflowed (reallocating to 10000 bytes)
> lexical buffer overflowed (reallocating to 12000 bytes)

Were these from BibDesk, or are you using the perl module that uses  
the same parser we use?  All of these are non-critical warnings.  Come  
to think of it, we disabled the lexical buffer warning, since it's  
meaningless.

>
> lex_auxiliary.c:162: failed assertion `(txt[0] == '{' && txt[len-1] ==
> '}') || (txt[0] == '\"' && txt[len-1] == '\"')'
> Abort trap
> =================

It would be interesting to see the file you used to cause that crash.

> Finally, getting desperate, I went into my bibliography using
> TextWrangler, cropped all text entries to really short (to avoid the
> "lexical buffer overflows") removed all double-quotes, and was finally
> able to import the entire db into RefWorks (web edition). Then I
> re-inserted the citations in my text using RefWorks schema, and was
> successfully able to have RefWorks scan and replace to create a decent
> looking manuscript in RTF.
>
> The cleaned up bib also imported successfully into CiteULike and  
> Connotea.

Something else you might try is exporting as "minimal" BibTeX from  
BibDesk.  If programs have limited (or otherwise crappy) BibTeX  
support, that might be safer.

> For that, I urge the developers (who, by the way, are compleatly
> wonderful folks) to make BD more strict by not allowing me, the user,
> enter into it anything that would be illegal downstream.

We go to great lengths to keep you from entering invalid data, because  
BibDesk won't read it back in.  In fact, the parser we use is more  
strict than BibTeX itself in some respects, so my tendency is to blame  
the 3rd parties involved here (CiteULike, RefWorks).  So, enable  
warnings, and try the minimal BibTeX approach, and see if those help.

-- 
adam


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

Reply via email to