BiBTeX - Doubled URL
Hey,
I hope u can help me with this:
If I set an entry as "Website" and export my library to BiBTeX, this entry will look like this (without "-->"):
@misc{google_project_2012,
title = {{{Project} Glass}},
--> url = {https://plus.google.com/111626127367496192147/posts},
author = {{{Google}}},
year = {2012},
--> howpublished = {https://plus.google.com/111626127367496192147/posts},
}
The problem: Now I've got a double URL in my bibliography.
Is there any way of telling Zotero not to export the URL-Property to both "url" and "howpublished"?
Thanks for your help!
I hope u can help me with this:
If I set an entry as "Website" and export my library to BiBTeX, this entry will look like this (without "-->"):
@misc{google_project_2012,
title = {{{Project} Glass}},
--> url = {https://plus.google.com/111626127367496192147/posts},
author = {{{Google}}},
year = {2012},
--> howpublished = {https://plus.google.com/111626127367496192147/posts},
}
The problem: Now I've got a double URL in my bibliography.
Is there any way of telling Zotero not to export the URL-Property to both "url" and "howpublished"?
Thanks for your help!
The url shows up twice because it exports it in boththe howpublished and URL fields.
My solution works with natbib. You can find the file here:
plainnat_no_howpublished.bst
Instructions
1. Make sure you use natbib. There should be \usepackage{natbib} in your preamble
2. Place the downloaded file in the directory where your latex document(s) are.
3. Use the downloaded file. Place \bibliographystyle{plainnat_no_howpublished} after \usepackage{natbib}
4. Compile your latex file twice. Done.
This not only removes the first occurrence of your url (the non-clickable one), it also adds the date on which you accessed the website, which is required for some projects.
The journal I'm looking at looks like it insists on using it's own .bst file. Is the modification of that file major or minor?
To edit your own file:
1. add "urldate" to the ENTRY list. Line 76 in my file.
2. Add function format.urldate after format.url. Line 303 in my file.
FUNCTION {format.urldate}
{ urldate empty$
{ "" }
{ "accessed " urldate * }
if$
}
3. In function {misc}, add "format.urldate output" between format.url and new.block. Line 954 in my file.
Hope this works for you
For an option inside latex. I think it should be
\AtEveryBibitem{% Clean up the bibtex rather than editing it
\ifentrytype{misc}{% websites are of misc type
\clearfield{howpublished}
}{}
}
But haven't tested it
However, these legacy styles are getting fewer and farther between.
Bibutils, Bibsonomy, CiteULike, KBibTeX, Referencer (gnome), and Mendeley just export to 'url' and not 'howpublished'. I'd propose we do the same, though a few BibTeX users will complain anyway.
the code is commented out and easy to put back in in a custom version for those who want to.
Your version of Zotero will automatically update within 24hs, or you can update manually using the "Update Now" button in the "General" tab of the Zotero preferences.