diff --git a/src/Encoding.cpp b/src/Encoding.cpp index 8041de988f..69437bf2f5 100644 --- a/src/Encoding.cpp +++ b/src/Encoding.cpp @@ -496,8 +496,9 @@ docstring Encodings::fromLaTeXCommand(docstring const & cmd, docstring & rem) // If this is an exact match, we found a (longer) // matching command in the unicodesymbols file if ((math == tmp || text == tmp) - && ((tmp.size() == 1 && !isAlphaASCII(tmp[0])) - || k == cmdend || !isAlphaASCII(cmd[k]))) { + && (tmp[0] != '\\' + || (tmp.size() == 2 && !isAlphaASCII(tmp[1])) + || k == cmdend || !isAlphaASCII(cmd[k]))) { c = it->first; j = k - 1; i = j + 1;