#12156: Pretty print LatexExpr directly
------------------------------------------------------------------------+---
Reporter: jdemeyer |
Owner: jason
Type: defect |
Status: positive_review
Priority: major |
Milestone: sage-4.8
Component: misc |
Keywords: sd35
Work_issues: |
Upstream: N/A
Reviewer: Andrey Novoseltsev, Punarbasu Purkayastha, John Palmieri |
Author: Jeroen Demeyer, Punarbasu Purkayastha
Merged: |
Dependencies: #12197
------------------------------------------------------------------------+---
Comment(by ppurka):
I guess you are patching some 4.8alpha version of sage. I was patching
4.7.2, so I had to modify the patch [attachment:12156_fix_latex.patch] for
`sage/modular/dirichlet.py` to read as:
{{{
#!diff
diff --git a/sage/modular/dirichlet.py b/sage/modular/dirichlet.py
--- a/sage/modular/dirichlet.py
+++ b/sage/modular/dirichlet.py
@@ -511,7 +511,7 @@
for i in range(len(self.values_on_gens())):
if i != 0:
mapst += ', '
- mapst += latex(self.parent().unit_gens()[i]) + ' \mapsto ' +
latex(self.values_on_gens()[i])
+ mapst += self.parent().unit_gens()[i]._latex_() + ' \mapsto '
+ self.values_on_gens()[i]._latex_()
return r'Dirichlet character modulo %s of conductor %s mapping
$%s$'%(self.modulus(), self.conductor(), mapst)
def base_ring(self):
}}}
This, along with #12197 makes it pass the doctests. So, positive review
from me too.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12156#comment:29>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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/sage-trac?hl=en.