Note
This documentation is for a development version of IPython. There may be significant differences from the latest stable release (1.2.1).
Filters for processing ANSI colors within Jinja templates.
Remove ansi from text
Parameters: | source : str
|
---|
Conver ansi colors to html colors.
Parameters: | text : str
|
---|
Converts single ansi markup to latex format.
Return latex code and number of open brackets.
Accepts codes like ‘[1;32m’ (bold, red) and the short form ‘[32m’ (red)
Colors are matched to those defined in coloransi, which defines colors using the 0, 1 (bold) and 5 (blinking) styles. Styles 1 and 5 are interpreted as bold. All other styles are mapped to 0. Note that in coloransi, a style of 1 does not just mean bold; for example, Brown is “0;33”, but Yellow is “1;33”. An empty string is returned for unrecognised codes and the “reset” code ‘[m’.
Converts ansi formated text to latex version
based on https://bitbucket.org/birkenfeld/sphinx-contrib/ansi.py