Python codec for generating international characters in Latex syntax
This package installs codecs that allow to convert byte strings (meaning standard Python 2 strings) into an equivalent that has all special characters expressed as Latex commands.
>>> import latexcodec >>> print u"Peter Tr\xf6ger".encode("latex") >>> print u"Peter Tr\xf6ger".encode("latex_bracket") Peter Tr\"oger
The conversion table is generated from the Latex utf-8 inputenc package, which should make sure that all relevant characters are covered.
The functionality of this package somehow is a hack, since LaTex encoding is not really a codec.
The future plan is to implement this alternatively as invalid character error handler, or as transformation codec starting from Python 3.3.
- Adding additional codec with brackets around special characters
- Initial release