There should be an API for encoding user text strings to LaTeX strings. The
encoding consists of two tasks:
1) Escaping BibTeX and LaTeX special characters such as '{', '#', '&' etc. For
example, the publisher name "Taylor and Francis" should become "Taylor \&
Francis".
2) Replacing non US-ASCII character sets characters with the corresponding
LaTeX commands. For example, the greek small letter alpha should be replaced
with "\alpha".
It must be noted that the character replacement step is mandatory when the API
user wants to have its output in the US-ASCII character encoding. It is
optional when the output is in the Unicode character encoding.
The inverse operation (ie. decoding LaTeX strings to user text strings) is
currently implemented in the LaTeXPrinter class. It would be probably wise to
rename this class, so that there could be a pair of LaTeXEncoder and
LaTeXDecoder classes.
Original issue reported on code.google.com by
villu.ru...@gmail.comon 15 May 2012 at 9:38