Comment #1 on issue 2083 by [email protected]: Geometric Algebra and the LaTeX Printer
http://code.google.com/p/sympy/issues/detail?id=2083

I don't know if it's correct but the following changes in sympy/galgebra/latex_ex.py file works for me (use at your own risk) It also fixes an issue if the base is a symbol before XYZW in alphabetical order (like E).

822,826c822,826
<                 if type(grade) != types.IntType:
<                     ibase = 0
<                     for base in grade:
<                         if base != 0:
<                             tmp = Symbol('XYZW')
---
                 ibase = 0
                 for base in grade:
                     if base != 0:
                         if igrade > 0:
                             tmp = Symbol('AAAA')
831,832c831,832
<                             if base_str[1:5] == 'XYZW':
<                                 base_str = base_str.replace('XYZW','')
---
                             if base_str[1:5] == 'AAAA':
                                 base_str = base_str.replace('AAAA','')
834,840c834,842
<                                 base_str = base_str.replace('XYZW','1')
<                             MV_str += base_str+\
< LatexPrinter.build_base(igrade,ibase,expr.bladeflg)
<                             if LatexPrinter.fmt_dict['mv'] == 3:
<                                 line_lst.append(MV_str)
<                                 MV_str = ''
<                         ibase += 1
---
                                 base_str = base_str.replace('AAAA','1')
                         else:
                             base_str = str(base)
                         MV_str += base_str+\
LatexPrinter.build_base(igrade,ibase,expr.bladeflg)
                         if LatexPrinter.fmt_dict['mv'] == 3:
                             line_lst.append(MV_str)
                             MV_str = ''
                     ibase += 1


--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to