I'm trying to export from JabRef to a CSV using a custom layout file. Some of the text for my fields contains double quote marks ("), which breaks the encasing quotes early and any subsequent commas move text to the next field in Excel. It is very important that the data is in the correct columns as it will be ingested elsewhere after. Is there an escape character so that I can replace the double quotes with something else so that it no longer breaks?

Currently this is what I have for one of the problem fields, trying to replace the double quotes with single quotes. However this just ends up printing everything after the double quotes (without the Replace function the rest of the layout file works fine).

previousField,"\format[Replace(",'),FormatChars,RemoveLatexCommands]{\abstract}", nextField

I have tried various escape characters I can think of (/,\,',"").

The simple answer of course is to remove all double quotes from the source text, but I don't have total control over it and can't guarantee that it will happen.

  • I think you have to use the java escape style here, so a combination of backlash + double quote, \“ should work – Christoph S Aug 23 '17 at 22:01
  • I tired that and it didn't work. I think for some reason it is matching to the double quotes before the format call, even though that should just be regular text that gets written out. – kat Aug 25 '17 at 2:41

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.