Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Centering a result

A simple question. I construct the table t (see the following code), and I want the table displayed centered in the cell. I do not know how since I use Sagecell. I wonder if through html display, there is a way to achieve this.

 A=matrix(QQ,[[(1/2),(1/4),0],[1,3,-1], [1,1,0]])
b = vector(QQ,[100, 200, 300])
c = vector(QQ,[40, 50, 60])
I=identity_matrix(3)
L=block_matrix([[A,I]],subdivide=False)
L=L.augment(b)
n=A.nrows()
z1=vector([0 for i in range(n+1)])
c=flatten(-c)
z1=flatten(z1)
zc=vector(c+z1)
L=matrix(L.rows()+[zc])
rows = list(L)
t = table(rows, header_row=['$x_1$', '$x_2$','$x_3$','$\\epsilon_1$','$\\epsilon_2$','$\\epsilon_3$','$b$'], header_column=['','$\\epsilon_1$','$\\epsilon_2$','$\\epsilon_3$','z'], frame=True)
show(LatexExpr(r"\text{Le tableau initial du simplex (ou premier dictionnaire)   est     :}"))
show(t)

I encounter the same problem for displaying plots.