I have two problems rendering latex. The first is in a plot title. The
fraction should be centered.
If I try the same latex:
\sum_{n=1}^{\infty}\frac{12}{(-5)^n}
at
http://www.codecogs.com/latex/eqneditor.php
it renders as I expect.
The second problem is rendering latex for a table. I thought I could do
something like this:
t=text("$%s$" %latex(table(ls,header_row=('n','partial sum'))) ,(2,-1),
I have tried with and without the enclosing $, with it \$, \\$. It
always shows the unrendered latex.
I've tried this in 8.0 and 8.1rc2. Both in the notebook, and from the
command line. The code for the plot is is bellow.
def an(n):
return 12/(-5)^n
def sn(n):
return sum([an(n) for n in range(1,n+1)])
ls=[(n,RR(sn(n))) for n in range(1,11)]
la=[(n,RR(an(n))) for n in range(1,11)]
t=text("$%s$" %latex(table(ls,header_row=('n','partial sum'))) ,(2,-1),
color='black')
s=list_plot(ls, title="8.2-3 $\\sum_{n=1}^{\\infty}\\frac{12}{(-5)^n}$",
title_pos=(0.5,1.2))
a=list_plot(la)
show(t+s+a)
Thanks,
Andy