New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaTex printing of Cycle #10210

Closed
gxyd opened this Issue Dec 7, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@gxyd
Copy link
Member

gxyd commented Dec 7, 2015

Currently

>>> from sympy.combinatorics.permutations import Cycle
>>> latex(Cycle(1, 2))
'\\left \\{ 1 : 2, \\quad 2 : 1\\right \\}'

That's something of latex for dictionary(dict). The LaTex should give the latex representation of (1 2). i.e latex(Cycle(1, 2)) should return the latex representation of (1 2).

In IPython Notebook

>>> init_printing(use_unicode=True)
>>> Cycle(1, 2)
{0:0,1:2,2:1}

You can also see the discussion here on PR #10183 . Changes should be made to file printing/latex.py(mentioned by jksuom) This will be an "easy to fix" issue.

@aktech aktech added the printing label Dec 9, 2015

gxyd pushed a commit to gxyd/sympy that referenced this issue Dec 15, 2015

Gaurav Dhingra
latx printing of Cycle, Permutation
Now
>>> init_printing(use_unicode=True)
>>> Cycle(1, 2, 4)(5, 6)
(1 2 4)(5 6)
>>> latex(Cycle(1, 2, 4)(5, 6))
'\\left( 1\\, 2\\, 4\\right)\\left( 5\\, 6\\right)'

same printing for Permutation

fixes sympy#10210

gxyd pushed a commit to gxyd/sympy that referenced this issue Dec 15, 2015

Gaurav Dhingra
latex printing of Cycle, Permutation
Now
>>> init_printing(use_unicode=True)
>>> Cycle(1, 2, 4)(5, 6)
(1 2 4)(5 6)
>>> latex(Cycle(1, 2, 4)(5, 6))
'\\left( 1\\, 2\\, 4\\right)\\left( 5\\, 6\\right)'

same printing for Permutation

fixes sympy#10210

gxyd pushed a commit to gxyd/sympy that referenced this issue Dec 16, 2015

Gaurav Dhingra
latex printing of Cycle, Permutation
Now
>>> init_printing(use_unicode=True)
>>> Cycle(1, 2, 4)(5, 6)
(1 2 4)(5 6)
>>> latex(Cycle(1, 2, 4)(5, 6))
'\\left( 1\\; 2\\; 4\\right)\\left( 5\\; 6\\right)'

same printing for Permutation
tests fixes

fixes sympy#10210

skirpichev added a commit to skirpichev/diofant that referenced this issue Jul 16, 2016

latex printing of Cycle, Permutation
Now
>>> init_printing(use_unicode=True)
>>> Cycle(1, 2, 4)(5, 6)
(1 2 4)(5 6)
>>> latex(Cycle(1, 2, 4)(5, 6))
'\\left( 1\\; 2\\; 4\\right)\\left( 5\\; 6\\right)'

same printing for Permutation
tests fixes

fixes sympy/sympy#10210

// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>

skirpichev added a commit to skirpichev/diofant that referenced this issue Jul 17, 2016

latex printing of Cycle, Permutation
Now
>>> init_printing(use_unicode=True)
>>> Cycle(1, 2, 4)(5, 6)
(1 2 4)(5 6)
>>> latex(Cycle(1, 2, 4)(5, 6))
'\\left( 1\\; 2\\; 4\\right)\\left( 5\\; 6\\right)'

same printing for Permutation
tests fixes

fixes sympy/sympy#10210

// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>

skirpichev added a commit to skirpichev/diofant that referenced this issue Jul 17, 2016

latex printing of Cycle, Permutation
Now
>>> init_printing(use_unicode=True)
>>> Cycle(1, 2, 4)(5, 6)
(1 2 4)(5 6)
>>> latex(Cycle(1, 2, 4)(5, 6))
'\\left( 1\\; 2\\; 4\\right)\\left( 5\\; 6\\right)'

same printing for Permutation
tests fixes

fixes sympy/sympy#10210

// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment