#NEWLINE# def autorun_get_latex_interactive_session( cmds , **kargs ) : #NEWLINE# #INDENT# ct = conf . color_theme #NEWLINE# to_latex = ( lambda s : tex_escape ( s ) . replace ( '@[@' , '{' ) . replace ( '@]@' , '}' ) . replace ( '@`@' , '\\' ) ) #NEWLINE# try : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# conf . color_theme = LatexTheme2 ( ) #NEWLINE# ( s , res ) = autorun_get_interactive_session ( cmds , ** res ) #NEWLINE# #UNINDENT# except StopAutorun as e : #NEWLINE# #INDENT# e . code_run = to_latex ( e . code_run ) #NEWLINE# raise #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# conf . color_theme = ct #NEWLINE# #UNINDENT# return ( to_latex ( s ) , res )