Hello.

All of this is normal. If you use for example print(latex(x**2/2,
mode='equation*')), you will have the expected behavior.


*Christophe BAL*
*Enseignant de mathématiques en Lycée **et développeur Python amateur*
*---*
*French math teacher in a "Lycée" **and **Python **amateur developer*

2015-09-08 14:21 GMT+02:00 singlets <[email protected]>:

> I'm getting double backslashes using latex() in ipython ina terminal and
> Jupyter notebooks:
>
> Python 3.4.3 |Anaconda 2.2.0 (32-bit)| (default, Jun  4 2015, 15:28:02)
> IPython 4.0.0 -- An enhanced Interactive Python.
>
> In [1]: from sympy import *
>
> In [2]: init_printing()
>
> In [3]: var('x')
> Out[3]: x
>
> In [4]: latex(x**2/2, mode='equation*')
> Out[4]: '\\begin{equation*}\\frac{x^{2}}{2}\\end{equation*}'
>
> Using 'plain' python works 'as expected':
>
> Python 3.4.3 |Anaconda 2.2.0 (32-bit)| (default, Jun  4 2015, 15:28:02)
> >>> from sympy import *
> >>> init_printing()
> >>> var('x')
> x
> >>> latex(x**2/2, mode='equation*')
> \begin{equation*}\frac{x^{2}}{2}\end{equation*}
> >>>
>
> Is there a way to disable the escaping in ipython?
>
> Thanks,
> Steve
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/a2fbc76d-7f5b-441c-979c-f0c8f48874c6%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/a2fbc76d-7f5b-441c-979c-f0c8f48874c6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAAb4jG%3DnzJJd3t_kFhrLhP7AdpA%2BZ4un7brz0cNb3yRJ5JWtng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to