TransWikia.com

Escape character for " in JabRef .layout file

TeX - LaTeX Asked on January 2, 2021

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.

One Answer

With JabRef 4.3.1, this code works for me:

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

To add some example, you can replace all newline characters and double quote like this:

"format[Replace(rn, ),Replace(n, ),Replace(r, ),Replace("",')]{abstract}"

Answered by Vincent on January 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP