JabRef version 3.3 on Linux (Mageia 5).
Steps to reproduce:
title field of which containing a LaTeX command.
A (quite large) subset of LaTeX-commands are converted to Unicode, the rest is removed. One could consider returning them rather than removing them, but it is not obvious that it is a better idea in general.
It is always possible to increase the list of available commands, but that particular one is asa far as I know not available as a Unicode character.
One could consider returning them rather than removing them, but it is not obvious that it is a better idea in general.
IMHO, returning them verbatim if not available as a Unicode character is not only a good idea, it is necessary.
Could you give an actual example where it is necessary? (In your current, obviously toy, example, it would be better to return LaTeX.)
I think @dbitouze has a point that returning the actual LaTeX command is the best idea if our conversion to Unicode for the UI fails - should not be too hard to implement :wink:
It is always possible to increase the list of available commands, but that particular one is asa far as I know not available as a Unicode character.
I don't know what are the available commands but I guess it is impossible to deal with all the 14032 LaTeX symbols available. Another problem is for chemical formulae (e.g. \ce{Sb2O3} from mhchem package).
No, not hard to implement (a few if-statements), but better? \textbf{}? Is \ce{Sb203} better than Sb203 (which I think the current result would be)?
Could you give an actual example where it is necessary? (In your current, obviously toy, example, it would be better to return LaTeX.)
Well, when your bibliography contains books about LaTeX, that's not only a toy ;) For the other examples,see my other comments (e.g. \ce{Sb2O3} from mhchem package).
Is \ce{Sb203} better than Sb203 (which I think the current result would be)
Indeed: good point!
(Still have not looked in the code.)
So the logic should be that unknown commands without parameter (e.g, \textbullet, \textSigma, \curlyyogh) are not replaced - command withs params are stripped so that only the params are left?
So the logic should be that unknown commands without parameter (e.g, \textbullet, \textSigma, \curlyyogh) are not replaced - command withs params are stripped so that only the params are left?
Yes, except if the "parameter" is empty.
Indeed, commands without parameter gobble the following space: \LaTeX is great would be typeset as "LaTeXis great" by LaTeX. Hence such commands should protect the following space with either {} or \: \LaTeX{} is great would be typeset as "LaTeX is great" by LaTeX. With the {} (widely used), these commands may be considered as commands with parameter(s) and hence be stripped (AFAICS, that's what currently happens to \LaTeX{}).
Now, I got some time to work on this. There are basically two cases in the code (although it looks like more):
\command where currently the command is stripped unless it is recognized. Will change it to keep command.
\command{argument} where currently the command is stripped and argument is kept. Will change it to keep command if argument is empty.