Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1477 by goodrich.ben: Printing with double subscripts
http://code.google.com/p/sympy/issues/detail?id=1477

see
http://groups.google.com/group/sympy-patches/browse_thread/thread/670ff83d8450131d

Currently, printing does not work well when there are multiple underscores
in the name of the variable, for example:

beta_13_2 = Symbol("beta_13_2")
beta_13_2
β_13_2

I suggested that this should PrettyPrint with a comma between the 13 and
the 2, like

β₁₃,₂

The other special forms of printing also do not work well in this case:

latex(beta_13_2)
'$beta_13_2$'

The attached patch appears to fix this issue with latex printing:

latex(beta_13_2)
$\beta_{13,2}$

and thus preview

preview(beta_13_2, output='png', viewer='gwenview')

works well with the patch but poorly without it.

Unfortunately, I do not know enough about printing to fix PrettyPrint, GTK
or MathML but here are the rest of the results:

print_gtk(beta_13_2)

does not do anything special anyway, perhaps it is not supposed to.

from sympy.printing.mathml import print_mathml
print_mathml(beta_13_2)
<ci>
         beta_13_2
</ci>

I am not sure whether that is the correct mathml syntax even for simple
subscripts.


Attachments:
        0001-latex-latex-double-subscripts-better.patch  1.1 KB

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

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

Reply via email to