breaking up keyword lists

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
thomashegna
Posts: 6
Joined: Tue Dec 06, 2022 5:57 pm

breaking up keyword lists

Post by thomashegna »

Due to how I imported some references a number of years ago, I have several varieties of keyword lists. Some are like this:
Keyword; keyword2; keyword3

. . . and others like this:
Keyword keyword2 keyword3

Using the global change function, is it possible to change '; ' with a line break?
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: breaking up keyword lists

Post by Jon »

Sure. Search for

;

and replace with ¬ (that's Option-J on a US keyboard -- it will insert a return in its place).

As always, make a COPY of your library before doing this in case something goes wrong, it's not undoable.

Jon
Sonny Software
Bernardo
Posts: 25
Joined: Wed May 15, 2019 7:52 pm

Re: breaking up keyword lists

Post by Bernardo »

On the same topic: is there a way to export keywords as a comma separated string in BibTeX? Bookends uses a ; which Biber does not recognize and which render keywords unusable for filtering bibliography.
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: breaking up keyword lists

Post by Jon »

Bookends does that because keywords can contain commas. You can either post-process with find/replace in a text editor (which is what I imagine you do now). Or, if you don't care about using the keywords in Bookends as intended (meaning having a Keyword term list, autocomplete entry, etc.) you can enter them in Bookends as a comma-separated list. And for the present keywords, you can use Global Change to search for returns and convert to commas (on a COPY of the library, to be safe).

Jon
Sonny Software
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: breaking up keyword lists

Post by Jon »

Is the semicolon treated as a special character for BibTeX? Or is it just in this particular case? If it's generalizable, I could have Bookends output a comma between keywords if BibTeX Markup was specified for outputting formatted references. But if it's specific to this particular app (Biber) I wouldn't do that.

Jon
Sonny Software
Bernardo
Posts: 25
Joined: Wed May 15, 2019 7:52 pm

Re: breaking up keyword lists

Post by Bernardo »

The short answer is: it is generalizable.

Slightly longer answer: it is, in fact, the correct markup. Apparently, semicolons mean nothing to BibTeX/Biber, so all the keywords are treated as a single string (rendering them unusable, so to speak).
Post Reply