Automatic escape characters for special character

I premise that I’m not sure if this should go here (already implemented feature I cannot find) or in the “features” channel (new feature to be implemented), but here is my problem:

what I usually do is to search some sources I want to cite (often journal articles) and since most of them have an associate DOI and JabRef can retrieve all the data automatically, I just copy the DOI and let JabRef do its magic and I’m ready to use my bibliography in latex.

And this usually works.

The problem rise when some fields (es. the journal name) usual some characters that have special meaning in Latex and should be escaped (for example the letter “&” that JabRef retrieve as “&amp” but latex would like to see as “&”).

Now, since I often write some large portion of my document before re-running it, it will occur to me that I will have add maybe 15-20 references among which several contains these special characters, so what I’m doing now is to close JabRef, open the .bib file as plain text (es. notepad++), replace all the occurrences of the special characters, run the .tex file and then re-open JabRef (NOTE: closing/re-opening JabRef is not mandatory but I noticed that sometimes it does not like that other softwares mess up with the files it had open and after JabRef tried to merge all the changes resulting often in some errors).

What I would like to have is a function that would let me look thought the whole .bib file (as plain text, not formatted one) looking fore some text and replace it with something else. Or, even better, to set JabRef to automatically fix these problems after importing the metadata.
Is it possible (, discouraged) or not?

Thanks,
Jacopo

If you want to perform the replacement in JabRef instead of in an editor, you can use the find and replace function in the “Edit” menu. I think it would be a good idea for JabRef to include corrections like this in the clean-up tools.

If there is a small number of known offenders (journals that you use frequently) you might be able to create an automatic substitution as a journal “abbreviation”. I think an automatic fix like this would be a good thing for JabRef to include by default for journal names.

Hi,

for this LaTeX Special chars, there is an extra Cleanup Formatter under Quality-> Cleanup
Save actions | JabRef

These field formatters can also be configured as saveActions:

1 Like

Thanks a lot for all your suggestion. I will have a look (especially to what Christoph say) and let you know if they may fix my problem