If a is your real number, and then a._latex_?? will point you in the
direction that you need to go. It leads to the _latex_ function for
which there really isn't anything deep going on.
If all you care about is truncating zeros, then following changes will do:
diff -r 07a824fa8f2b sage/rings/real_mpfr.pyx
--- a/sage/rings/real_mpfr.pyx Sun Nov 16 06:26:41 2008 -0800
+++ b/sage/rings/real_mpfr.pyx Mon Nov 17 07:41:40 2008 -0800
@@ -963,7 +963,9 @@
# scientific notation
if parts[1][0] == '+':
parts[1] = parts[1][1:]
- s = "%s \\times 10^{%s}" % (parts[0], parts[1])
+ s = "%s \\times 10^{%s}" % (str(parts[0]).rstrip('0'), parts[1])
+ else:
+ s = s.rstrip('0')
return s
--Mike
--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---