Closed ajustine closed 8 years ago
No worries, this is not the most intuitive part of BBT. The following should work:
this.add({ name: 'x-audience', value: 'international' });
this.add({ name: 'x-popularlevel', value: 'no' });
this.add({ name: 'x-peereviewing', value: 'yes' });
this.add({ name: 'x-proceedings', value: 'yes' });
this.add({ name: 'x-invitedcommunication', value: 'yes' });
if (this.has.language) {
this.has.language.name = 'x-language';
}
if (this.item.itemType = 'report' && this.has.type) {
this.has.type.name = 'x-reporttype';
}
(previous comment updated -- I missed two fields)
Thank you very much !! Unfortunately, I cannot access the about:config part of my Firefox, for safety reasons sigh Is there a place inside the JS code where I can paste this, and then replace the BibTeX.js file directly in the Zotero translators folder ?
Thank you again, Justine
I'll add the screen, but how come you can install XPIs, but not access about:config? That seems a little confused, security-wise.
Replacing the translator file won't help as they're replaced by BBT at every start.
It's in the "Advanced" part of the prefs
part of the next release
Hi, Thank you very much but it still doesn't work (I have a about:config button in the Advanced part of the Prefs but I still get an error message). I asked the IT department of my institution to do it for me and will keep you updated. Thank you again, Justine
No, I mean if you install that build, you can go into the Advanced prefs of Better BibTeX. There's a text box where you can paste your postscript.
IT WORKS \o/ Thank you so much !
I only got one problem left : the field "type" is renamed "reporttype" for every document type that contains a "type" field (e.g. phdthesis, misc and unpublished), and I only need it for techreport and manual...
My bad -- that last =
should have been an ==
this.add({ name: 'x-audience', value: 'international' });
this.add({ name: 'x-popularlevel', value: 'no' });
this.add({ name: 'x-peereviewing', value: 'yes' });
this.add({ name: 'x-proceedings', value: 'yes' });
this.add({ name: 'x-invitedcommunication', value: 'yes' });
if (this.has.language) {
this.has.language.name = 'x-language';
}
if (this.item.itemType == 'report' && this.has.type) {
this.has.type.name = 'x-reporttype';
}
Awesome !!! Can I take advantage of your kindness one last time ? How can I set the code if I only want the "x-peerreviewing" field to appear for a certain type of document (let's say, only for articles) ? Many thanks, Justine
this.add({ name: 'x-audience', value: 'international' });
this.add({ name: 'x-popularlevel', value: 'no' });
if (this.item.itemType == 'journalArticle') {
this.add({ name: 'x-peereviewing', value: 'yes' });
}
this.add({ name: 'x-proceedings', value: 'yes' });
this.add({ name: 'x-invitedcommunication', value: 'yes' });
if (this.has.language) {
this.has.language.name = 'x-language';
}
if (this.item.itemType == 'report' && this.has.type) {
this.has.type.name = 'x-reporttype';
}
(BTW, I wouldn't encourage you to raise the issue with IT, but their security policy is beyond flawed. It would take me all of 60 minutes to whip up an extension that replicates the about:config screen)
In the next release (due in a day or so, but it's not in the release you have) you will be able to do the shorter
this.add({ 'x-audience': 'international' });
this.add({ 'x-popularlevel': 'no' });
if (this.item.itemType == 'journalArticle') {
this.add({ 'x-peereviewing': 'yes' });
}
this.add({ 'x-proceedings': 'yes' });
this.add({ 'x-invitedcommunication': 'yes' });
if (this.has.language) {
this.has.language.name = 'x-language';
}
if (this.item.itemType == 'report' && this.has.type) {
this.has.type.name = 'x-reporttype';
}
Yaaaay ! Thank you soooo much ! And, well, I won't raise the issue with IT... Many thanks again !
My pleasure.
Hi,
Thank you very much for this BetterBibTeX tool, it has been very helpful to me. I found out here how to add specific fields in my BibTeX file using the Extra field of each of my references, but I was wondering if it was possible to add those specific fields in every references of an export. It seems possible, but I never wrote JavaScript, and English is not my mother tongue so I have difficulties understanding your tutorial.
What I would like to do is
Am I even clear ? I hope I am. Thank you very much for your help !
Justine