Export of special chars to bibtex problem
I have exported my collection to bibtex and now have a problem when compiling the latex document.
One author is named "Wätjen". The ä is exported very strangely. In LaTeX it should be exported as \"a. Some goes for ö and ü. It even looks strange if I open the file in a simple text editor.
Furthermore URLs should be surrounded with the \url{} tag making links clickable in pdf documents.
Are there somewhere some settings for the bibtex module to correct the behaviour?
One author is named "Wätjen". The ä is exported very strangely. In LaTeX it should be exported as \"a. Some goes for ö and ü. It even looks strange if I open the file in a simple text editor.
Furthermore URLs should be surrounded with the \url{} tag making links clickable in pdf documents.
Are there somewhere some settings for the bibtex module to correct the behaviour?
This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
For example code #1:
@misc{bar,
title = {bar},
url = {http://foo_feature_transform&printable=yes},
howpublished = {{http://foo\_feature\_transform\&printable=yes}}
},
Here there is a problem with the url because of the _ and & !
The problem could be avoided, if the special characters would be translated like it is done in the "howpublished" entry (see code #1)! Using \_ and \& .
Or one could use the \url or \href tag like in code #2:
@misc{foo,
title = {foo},
url = {\url{http://foo_feature_transform&printable=yes}},
howpublished = {{http://foo\_feature\_transform\&printable=yes}}
},
But the latter method has been disapproved by the community because it is no standard. See http://forums.zotero.org/discussion/4331/bibtex-importexport-problems/
So the solution would be just to parse the url as it is done for "howpublished"? Am I right? And if so, can somebody correct the code in Zotero, please? This error prevents the exported library to compile.
I use Zotero 2.1.6 and Firefox 3.6.17.
Unfortunately I am bounded to a specific bst file by my publisher. Is there any other way to deal with this problem, apart from escaping the characters in my bib file manually?
I have copied and modified the original BibTeX translator by Simon Kornblith and Richard Karnesky in order to escape special characters in urls. I would like to share my experience in case somebody else encounters this issue:
The easy steps are:
- create a new Translator: http://www.zotero.org/support/dev/translator_development_outside_scaffold#create_or_modify_a_translator_file and save it at the appropriate location (see http://www.zotero.org/support/dev/translator_development_outside_scaffold#translator_files)
- Edit the metadata: Change the label to the new filename of the translator without .js:
- Change the code at line 1830 and following:
- restart Firefox
It works so far. I hope this helps anybody. Feel free to criticize or correct me."label":"BibTeX (modified URLs)",
in line 4 and set a new translator-ID:"translatorID":"aea153a0-812b-11e0-a9da-0002a5d5c51b",
(you can use this service to generate one: http://www.itu.int/ITU-T/asn1/uuid.html)// url field is preserved, for use with \href and \url
to// Other fields (DOI?) may need similar treatment
if(!((field == "url") || (field == "doi") | (field == "file"))) {
// url field is preserved, for use with \href and \url
This way "url" is not exempted from the escaping any more.// Other fields (DOI?) may need similar treatment
if(!((field == "doi") | (field == "file"))) { //edited! Original was: if(!((field == "url") || (field == "doi") | (field == "file"))) {