BE, tex and Lyx

A place for users to ask each other questions, make suggestions, and discuss Bookends.
olivier
Posts: 12
Joined: Mon Oct 06, 2008 7:51 am

BE, tex and Lyx

Post by olivier »

Hi all,
I'm using BE with Lyx, using the export to bibtex function. First, this is a combination I strongly encourage you to try, it works wonderfully.
Second, here is the problem I have (which shouldn't undermine my recommandation!). I've about 1500 references. I'm writing a phd and don't know in advance which reference I will need exactly, so I want to have all the references at hands in my bibtex file. When I want to add a new reference, once I found it, I have to (i) mark all references (ii) export hits as (iii) agree with the bibliography format (iv) agree with the bibtex format (v) agree with replacing my old bibtex file (vi) wait for the exportation to take place, which is taking more and more time with my list of references growing (about 40 sec now I would say). It means that once I have the new reference, I still need to click 5 times in BE and wait for the exportation before using my reference in Lyx.
I agree it's not such a big deal, but I'm now doing that several times a day, and I was wondering whether I could use a simpler procedure. In my best dreams, the bibtex file would be updated automatically,in the background, each time I enter a new reference, so that working with lyx and BE would be as simple as working with Word and BE, without the user needing to export the references.

Thanks for you help !

OIivier
Jon
Site Admin
Posts: 10089
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: BE, tex and Lyx

Post by Jon »

Hi,

First, you might save a step if you used Biblio -> Bibliography Formatter to save the file to disk (Shift-Command-B).

Second, I think what you're asking for is actually a pretty complex new capability. That is, having Bookends update a text file in the background whenever a reference is added or removed (and presumably not generating the entire file each time (40 sec+), but just finding and removing or adding references as they are deleted/added from the database). I suppose such a thing is possible, but it would require quite a bit of overhead with regard to the UI (preferences and such) and would have a pretty limited audience. I'll see if I can think of a better way to do this.

Jon
Sonny Software
olivier
Posts: 12
Joined: Mon Oct 06, 2008 7:51 am

Re: BE, tex and Lyx

Post by olivier »

Thanks for your quick answer. I was a bit expecting that it would be complicated, saving a step is already nice!
kveldalf
Posts: 16
Joined: Sun Oct 14, 2007 11:33 pm

Re: BE, tex and Lyx

Post by kveldalf »

On the topic of Lyx and BE, how exactly do you use BE with LyX? Any tutorials or walk-through available, text or video?
Jon
Site Admin
Posts: 10089
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: BE, tex and Lyx

Post by Jon »

Not from me (who use neither). Maybe Olivier has some pointers?

Jon
Sonny Software
olivier
Posts: 12
Joined: Mon Oct 06, 2008 7:51 am

Re: BE, tex and Lyx

Post by olivier »

Hi,

I know of no tutorial but the whole thing is quite easy :
(i) first export you reference from BE in a bibtex file.
(ii) then insert a bibliography in lyx and link it to the bibtex file.
(iii) use the "insert reference" icon to insert references in you text
...that's it!

The only problem I had is that you have to take care not to have any accents in the bibtex key generated by BE: this happens sometimes when the author has an accent in its name.
Hope this help, feel free to ask if you have other question!

Olivier
kveldalf
Posts: 16
Joined: Sun Oct 14, 2007 11:33 pm

Re: BE, tex and Lyx

Post by kveldalf »

EDITED

I used to do my work using XeLaTeX, but it's been a while. I'd like to use LyX with BE, but just need a few things clarified/refreshed. That this involves BE directly, I am posted it here instead of partly on the LyX or XeTeX lists and the BE parts here. The logic being, you are able to use BE with LyX.

1. On the BE side, does anything need to be enabled in preferences? (e.g. Scan & Bib citation prefixes or anything; or BibTeX "enable"?)

As for your instructions:
(i) first export you reference from BE in a bibtex file.
I did this from Biblio > Bibliography Formatter, but then need to know if I'm formatting as footnote or bibliography. I know to set the "as" as BibTeX. I sent this to a file.

(ii) then insert a bibliography in lyx and link it to the bibtex file.
Insert > List/TOC > BibTeX Bibliography. A new window opens. Under database, I click Add. A new window opens. I select Browse and select the file I had just exported from BE—I presume—And click, Add? Rescan? Either way ,this brings me back to the Bibliography window.

Style. The Style stays at plain, or seems to, even if I select a different style. A note here. I actually have a stylesheet that I made in BE: SBL. It's not listed in the LyX list, so—.

(iii) use the "insert reference" icon to insert references in you text.
After doing the above, and selecting the insert references, I don't see any "References Available."

If it would be better to take this off list, you can email me at this user name at gmail.
olivier
Posts: 12
Joined: Mon Oct 06, 2008 7:51 am

Re: BE, tex and Lyx

Post by olivier »

Hi,
1. in BE preference, Bibtex, everything should be activated.
(i) I'm not sur I get your question, in the bibliography formatter you should have : output in the format of BIBTEX as BIBTEX
(ii) click add, and then ok in the biliography menu, a new "bilbiography" object appears on you document
style : some style do not work in lyx I don't know why, plainat ieetranSN work fine with me.
(iii) that's strange : are you sure you have bibtex key in you initial BE refs ? If not, select all and click "generate bibtex keys" in the refs menu of BE

hope this helps...
Olivier
cysouw
Posts: 6
Joined: Thu Mar 27, 2008 6:16 am

Re: BE, tex and Lyx

Post by cysouw »

Back to the original question:

To get references from BE to Lyx I normally use Bibdesk as an intermediate. I open the lyx-connected Bibtex file in Bibdesk, and then I drag BE references to Bibdesk, save the library in Bibdesk, and then the reference is available from within Lyx.

best
michael
olivier
Posts: 12
Joined: Mon Oct 06, 2008 7:51 am

Re: BE, tex and Lyx

Post by olivier »

thanks Michael, that's useful!
Olivier
kveldalf
Posts: 16
Joined: Sun Oct 14, 2007 11:33 pm

Re: BE, tex and Lyx

Post by kveldalf »

Since I'm getting issues in BibDesk, and ultimately want to use my BE library with LyX, I will start at the beginning.

In Bookends
1. Preferences > Scan & Bib
Do you mark anything here? Previous posts suggest that nothing is marked here.
_pref_ScanBib.png
_pref_ScanBib.png (120.59 KiB) Viewed 12768 times
2.Preferences > Scan & Bib
According to the above, all of these boxes are to be checked.
BE_pref_BibTeX.png
BE_pref_BibTeX.png (103.33 KiB) Viewed 12769 times
3. Closing preferences, now titles in the library are selected, e.g. all of them, and go to Refs > Generate BibTeX key ⇧⌘K
This sets the key field within a record to a BibTeX key, e.g. King2003.

4. Now the bibliography can be exported as BibTeX by going to Biblio > Bibliography Formatter…⇧⌘B. The file is sent to "Disk" and is then a *.bib file.
BE_pref_BibTeX.png
BE_pref_BibTeX.png (103.33 KiB) Viewed 12769 times
BE_pref_BibTeX.png[/attachment]

5. When I open this *.bib file with BibDesk, I get an error:
FileName.bib line number 14 syntax error at end of input, expected "@"

Before proceeding to the LyX side of things I would like to get feedback, or corrections to the above.

Thanks
Attachments
BE Bibl Formatter.png
BE Bibl Formatter.png (34.27 KiB) Viewed 12722 times
Last edited by kveldalf on Sat Jun 27, 2009 3:02 pm, edited 1 time in total.
Jon
Site Admin
Posts: 10089
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: BE, tex and Lyx

Post by Jon »

I think you want to set (in the Bibliography formatter) the output format to BibTeX and the output style to BibTeX (not Styled Text).

Jon
Sonny Software
kveldalf
Posts: 16
Joined: Sun Oct 14, 2007 11:33 pm

Re: BE, tex and Lyx

Post by kveldalf »

Jon, I corrected the image; I had BibTeX selected as output.
If ever I get this to work, I'll make the walk-through/tutorial myself for others.
Jon
Site Admin
Posts: 10089
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: BE, tex and Lyx

Post by Jon »

But the format is set to SBL Bibliography. You should be exporting using the BibTeX format (the other setting, as BibTeX, tells Bookends to use TeX markup for things like styles).

Jon
Sonny Software
kveldalf
Posts: 16
Joined: Sun Oct 14, 2007 11:33 pm

Re: BE, tex and Lyx

Post by kveldalf »

Ok. Getting much much closer now.
Export/Import of .bib file successful
I've been able to export a .bib file.
I've imported the .bib file into the LyX doc.
I've inserted a Bibliography.
I've added a citation (though I can't recall how to add a page number; it might be as simple as adding text after the citation).

Saving .tex and .bib in same direcltory
I turned of XeLaTeX options, so that the document is just like a plain LaTeX file. Eventually, I'll need to turn enable these so I can do my multilingual things.
I saved this document and the .bib in the same directory.

Export the .tex file
Here's where it gets a bit uncertain. Nonetheless, I exported the file as LaTeX (plain) to keep things simple, this was put in the same directory as the .bib file.

I then opened TeXShop (a front end to TeX), and ran LaTeX once, BibTeX twice, and then LaTeX again.
The footnote shows as a [?], and the bibliography as:

[TsukimotoTsukimoto1985] Tsukimoto, A. (1985). Untersuchungen zur Totenpflege
(kispum) im alten Mesopotamien, Volume 216. Neukirchen-Vluyn: Neukirchener Ver-
lag.


Not sure how to resolve the [TsukimotoTsukimoto1985] in the bibliography, and I need the footnote to appear.

I can send files if necessary.

Jon, if this has veered too far from the Bookends board, just let me know and I'll try to get help elsewhere. That it does still involve BE, I'm probably ok,no?
Post Reply