Page 1 of 1

breaking up keyword lists

Posted: Tue Dec 13, 2022 10:00 am
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?

Re: breaking up keyword lists

Posted: Tue Dec 13, 2022 7:22 pm
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

Re: breaking up keyword lists

Posted: Tue Jan 10, 2023 7:53 am
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.

Re: breaking up keyword lists

Posted: Tue Jan 10, 2023 8:32 am
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

Re: breaking up keyword lists

Posted: Tue Jan 10, 2023 11:38 am
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

Re: breaking up keyword lists

Posted: Tue Jan 10, 2023 1:13 pm
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).