How to customize BibTeX export
Hi All
Im a very happy Zotero user with just one problem.
When I want to export a collection of sources to a LaTeX project I use the export feature that lets Zotero generate a .bib file. That is all well and good but one of the points for each source is annoying me.
E.g.:
@article{gross_methodology_2010,
title = {Methodology for Assessing Bodily Expression of Emotion},
volume = {34},
issn = {0191-5886, 1573-3653},
url = {http://link.springer.com/10.1007/s10919-010-0094-x},
doi = {10.1007/s10919-010-0094-x},
number = {4},
urldate = {2013-09-12},
journal = {Journal of Nonverbal Behavior},
author = {Gross, M. Melissa and Crane, Elizabeth A. and Fredrickson, Barbara L.},
month = jul,
year = {2010},
keywords = {{ABM} in {HHI}},
pages = {223--248},
file = {Expression of emotion and intention by robot body movement.pdf:C:\Users\***\AppData\Roaming\Zotero\Zotero\Profiles\u5jynbzo.default\zotero\storage\66IIMPDB\Expression of emotion and intention by robot body movement.pdf:application/pdf;Gross_Crane_Fredrickson_2010__Methodology of assessing bodily expressions of emotion.pdf:C:\Users\***\AppData\Roaming\Zotero\Zotero\Profiles\u5jynbzo.default\zotero\storage\QPK2FQI2\Gross_Crane_Fredrickson_2010__Methodology of assessing bodily expressions of emotion.pdf:application/pdf}
},
That whole 'file = {' tag in the end is taking a lot of space and is making a long bib file confused. Is there a way to prevent Zotero to include file information?
Im a very happy Zotero user with just one problem.
When I want to export a collection of sources to a LaTeX project I use the export feature that lets Zotero generate a .bib file. That is all well and good but one of the points for each source is annoying me.
E.g.:
@article{gross_methodology_2010,
title = {Methodology for Assessing Bodily Expression of Emotion},
volume = {34},
issn = {0191-5886, 1573-3653},
url = {http://link.springer.com/10.1007/s10919-010-0094-x},
doi = {10.1007/s10919-010-0094-x},
number = {4},
urldate = {2013-09-12},
journal = {Journal of Nonverbal Behavior},
author = {Gross, M. Melissa and Crane, Elizabeth A. and Fredrickson, Barbara L.},
month = jul,
year = {2010},
keywords = {{ABM} in {HHI}},
pages = {223--248},
file = {Expression of emotion and intention by robot body movement.pdf:C:\Users\***\AppData\Roaming\Zotero\Zotero\Profiles\u5jynbzo.default\zotero\storage\66IIMPDB\Expression of emotion and intention by robot body movement.pdf:application/pdf;Gross_Crane_Fredrickson_2010__Methodology of assessing bodily expressions of emotion.pdf:C:\Users\***\AppData\Roaming\Zotero\Zotero\Profiles\u5jynbzo.default\zotero\storage\QPK2FQI2\Gross_Crane_Fredrickson_2010__Methodology of assessing bodily expressions of emotion.pdf:application/pdf}
},
That whole 'file = {' tag in the end is taking a lot of space and is making a long bib file confused. Is there a way to prevent Zotero to include file information?
writeField("file", attachmentString.substr(1));
in the bibtex export translator by putting to slashes in front of it
//writeField("file", attachmentString.substr(1));
The bibtex translator is a file called BibTeX.js in the "translator" directory of your Zotero data folder.
http://www.zotero.org/support/zotero_data
you can open and edit it with any text editor like Notepad.
Make sure to update your translators (general tab of the Zotero preferences) before you do this, so your change won't be overwritten immediately.
This will still happen occasionally on updates, but since this is such a quick edit I'd imagine you can live with that.
edited for clarity.
awk '!/file =/'
I edited the BibTeX.js file in \AppData\Roaming\Zotero but even after restarting my computer Zotero still outputs the file string.
@noksagt
What program do I need to perform the post-processing?
I included the parenthesis from your example. Omitting them gave me the desired output. Thank you very much :)