How to highlight (bold) some references in bibliography
I'm writing a grant application and it has been suggested that in the bibliography I should bold (or otherwise highlight) the references by my lab. I could go through the list and do it manually at the end, but this would obviously be very painful, especially right before the deadline.
Does anyone have a trick for this?
A feature that I can imagine is a checkbox when I add a citation, asking Zotero to (for example) bold the authors for that item in the bibliography. I don't think such a thing exists?
Thank you.
- Robert
Does anyone have a trick for this?
A feature that I can imagine is a checkbox when I add a citation, asking Zotero to (for example) bold the authors for that item in the bibliography. I don't think such a thing exists?
Thank you.
- Robert
if all, you could edit the style file (csl) or select the proper style.
if the latter, you could add
<b>
before the start of the text you want to bold and</b>
after the end in the item of zotero Info tab.I'd need to bold only some of the references. There are currently about 100 references in the document, and I'd want to bold about 40 of them.
The tags didn't appear in your message but I think you're suggesting that I add 'b' and '/b' HTML tags. I hadn't thought of it and I may end up having to do it. The problem is that it's only in this particular document that I want to bold them, not in other documents where I'll be citing them.
They work for me.
var oldName = "John Smith";
var newFirstName = "<b>John</b>";
var newLastName = "<b>Smith</b>";
var newFieldMode = 0; // 0: two-field, 1: one-field (with empty first name)
var rn = 0; //number of changes
await Zotero.DB.executeTransaction(async function () {
zoteroPane = Zotero.getActiveZoteroPane();
items = zoteroPane.getSelectedItems();
for (item of items) {
let creators = item.getCreators();
let newCreators = [];
for (let creator of creators) {
if (`${creator.firstName} ${creator.lastName}`.trim() == oldName) {
creator.firstName = newFirstName;
creator.lastName = newLastName;
creator.fieldMode = newFieldMode;
rn+=1;
}
newCreators.push(creator);
}
item.setCreators(newCreators);
await item.save();
}
});
return rn + " item(s) updated";