Highlight selected authors within Bibliography

Hello, and many thanks for all the work you've made around Zotero.

I want to highlight some of the authors in a selected bibliography (it is a report for my lab and all members of the lab need to be highlighted - bolded or underlined - in the bibliography - i.e. list of the published articles from the lab) giving a list of name that have to be higlighted.

For the following bibliography I would just have to give the names Beta and Epsilon and the result would be :

1. A. Alpha, B. Beta, G. Gamma & E. Epsilon . Journal etc...
2. D. Delta, T. Theta & B. Beta. Journal etc...
3. B. Beta and E. Epsilon . Journal etc...
4.....

It seemed to me obvious at the beginning taht editing the CSL by adding a choose option inside the names variable="author" within the CSL code but I wonder that the adding of the authors seem to be made in one shot not being able to analyse each author of one item independently.

Is anybody has an idea about that ?
Precision : I just began to watch @ CSL specification few days ago so I perhaps missed something in that language.

And thanks again for all your work!!
  • can't be done with CSL, sorry. cs:choose can never be used to test for specific content of a variable (in this case the name of an author), but also authors are indeed rendered as a single string so even if this were possible it wouldn't help.

    Why not just do this with Word (or LO) search&replace, though? That includes advanced options for formatting.
  • Thanks for the blitz answer!!

    Ok then, It was just for me a nicer (and more easy-to-modify-hereafter and moreover quicker as I have to highlight around 30 authors among a 1000 of citations...) way of doing that.

    Thanks for your time Adam.

    Aurélien
  • @toofikam : Not a solution in Zotero, but I do it via JabRef (by exporting my references in .bib). You can create an personnalized exportation style in which you can do the search and replace in underline. The script will be long to write, as you will have to type your 30 names but it's a one-time thing.
  • @mel47 : Thanks for the tip, but I wish I could keep my own CSL already made for Zotero. I don't think that CSL is alerady usable with JabRef. Thanks for the tip anyway.
  • I have exactly the same problem, for a lab with more than one hundred researchers. Maybe the solution would be to have yet another type of creator, something like "authorbis"?

    The sticky points is that the distinction between "author" and "authorbis" should be irrelevant for existing styles and only be picked up in new styles that actually look for it.

    I have no idea how this could be done in CSL...
  • I don't even think that such a trick could fit as your whole bibliography would have to be adapt to such an extra item.

    Finally as proposed by Adam I just created a simple macro in LibreOffice which is doing the job. But still, my geek part is left hungry ;)
  • We are just starting, so for us it would not be a big deal to use the extra item from now on.

    I even thought of "diverting" the "reviewed author" type, but this would break all existing styles.
  • even with a separate author type you couldn't do this, at least not the way it's posted in the OP with highlighted authors sorted in between regular authors. I don't think we'll try to introduce this in CSL, sorry.
    I'll say that putting this in a macro really isn't very different from what bibtex does. There is not really a reason this needs to be in the citation style.

    @toofikam - would be nice if you'd put your macro on github and put a link here, so people can use it
  • edited March 18, 2014
    @adamsmith :
    I tried, but I do not get anything to that Git stuff. It is totally impossible to understand anything within it!

    Tried something here :
    https://github.com/toofikam/HighlihtAuthors/

    But seemed to be unreadable. So below is the macro (LibreOffice) :


    [code removed — see below — D.S.]
  • sorry, you seemed so comfortable with code I assumed you knew your way around github. You can just paste any text into the window at gist.github.com and create a public gist. Doesn't even require registration if you don't want to (though you can edit the file later if you're registered).
  • Thanks for your nice comments Adam. But no, I was not used to Git (In fact I am as I have use the git command dozen of times on my machine without knowing exactly what git was except a place to download stuff...)
    Anyway here it hus the Gist link for the Macro :

    https://gist.github.com/toofikam/9622188
  • great, thanks.
    FWIW - git is a version control system, i.e. it's incredibly useful if you work on larger projects and with multiple people as it keeps a detailed history of who did what when and with their comments. There is really no need to use it to share small snippets of code - that's what the gists are for.
  • I had similar issue. Great suggestion by toofikam for using a macro. For Word users, I found this macro helpful to overcome the issue. https://word.tips.net/T001762_Using_a_Macro_to_Change_the_Formatting_of_All_Instances_of_a_Word.html
Sign In or Register to comment.