On Thursday, November 14, 2013 3:01:02 AM UTC-5, Jason Grout wrote:
>
> On 11/13/13 9:45 PM, Jotace wrote: 
> > Hello to everyone, 
> > 
> > I was trying to make some camputational tool for my students, to allow 
> > them to compute powers of matrices quickly. I made a tiny htm page with 
> > some text giving explanations, and the following code embedden in a 
> > one-cell script 
> > 
> > DEF=[[0.25,0.55,0.2],[0.35,0.15,0.1],[0.45,0.3,0.7]]; 
> > 
> > @interact 
> > def  _(T=input_grid(3,3, default = DEF, label='Transition matrix $T=$', 
> >         to_value=matrix), d=input_box(3, width=5, label="number of 
> digits "), 
> >         n=input_box(2,width=5,label="power of $T$, $n=$")): 
> >      T = T.apply_map(RealField(d*log(10)/log(2))) 
> >      M=T^n 
> >      html('$T^n = \displaystyle %s$'%latex(M)) 
> > 
> > 
> > 
> > I happen to have a page which background is blue, so the standard 
> > output, in black is not very adapted... Anyone can tell how to change 
> > the output color of html(...) to white? 
>
> Here are two ways: 
>
> * since you have all math, you can use the latex \color command: 
> html('$\color{white}{T^n = \displaystyle %s}$'%latex(M)) 
>
> * In general, you can set a CSS style using a div or span tag: 
>
>      html('<div style="color: white;">$T^n = \displaystyle 
> %s$</div>'%latex(M)) 
>
>
But... just out of curiosity (and related to a recent ask.sagemath 
question), is it possible to use a stylesheet in any way in the cell or 
notebook?  Presumably it would have to be linked from the body, not quite 
standards-compliant...  (The question on ask is about sagemathcloud, which 
I am less familiar with). 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to