Sage cell and loooooooooong answers

17 views
Skip to first unread message

kcrisman

unread,
Jun 18, 2015, 9:29:45 AM6/18/15
to sage-n...@googlegroups.com, Andrey Novoseltsev, jason...@creativetrax.com
A colleague was trying out Sage cell and came across the following annoyance.


In particular, the answer

[x == -1/2*(I*sqrt(3) + 1)*(1/6*sqrt(-1/3*variable2^2*variable3^2 + 4/3*variable1*variable3^3 + 9*variable1^2*variable4^2 + 2/3*(2*variable2^3 - 9*variable1*variable2*variable3)*variable4)/variable1^2 - 1/54*(2*variable2^3 - 9*variable1*variable2*variable3 + 27*variable1^2*variable4)/variable1^3)^(1/3) - 1/3*variable2/variable1 - 1/18*(variable2^2 - 3*variable1*variable3)*(-I*sqrt(3) + 1)/(variable1^2*(1/6*sqrt(-1/3*variable2^2*variable3^2 + 4/3*variable1*variable3^3 + 9*variable1^2*variable4^2 + 2/3*(2*variable2^3 - 9*variable1*variable2*variable3)*variable4)/variable1^2 - 1/54*(2*variable2^3 - 9*variable1*variable2*variable3 + 27*variable1^2*variable4)/variable1^3)^(1/3)), x == -1/2*(-I*sqrt(3) + 1)*(1/6*sqrt(-1/3*variable2^2*variable3^2 + 4/3*variable1*variable3^3 + 9*variable1^2*variable4^2 + 2/3*(2*variable2^3 - 9*variable1*variable2*variable3)*variable4)/variable1^2 - 1/54*(2*variable2^3 - 9*variable1*variable2*variable3 + 27*variable1^2*variable4)/variable1^3)^(1/3) - 1/3*variable2/variable1 - 1/18*(variable2^2 - 3*variable1*variable3)*(I*sqrt(3) + 1)/(variable1^2*(1/6*sqrt(-1/3*variable2^2*variable3^2 + 4/3*variable1*variable3^3 + 9*variable1^2*variable4^2 + 2/3*(2*variable2^3 - 9*variable1*variable2*variable3)*variable4)/variable1^2 - 1/54*(2*variable2^3 - 9*variable1*variable2*variable3 + 27*variable1^2*variable4)/variable1^3)^(1/3)), x == (1/6*sqrt(-1/3*variable2^2*variable3^2 + 4/3*variable1*variable3^3 + 9*variable1^2*variable4^2 + 2/3*(2*variable2^3 - 9*variable1*variable2*variable3)*variable4)/variable1^2 - 1/54*(2*variable2^3 - 9*variable1*variable2*variable3 + 27*variable1^2*variable4)/variable1^3)^(1/3) - 1/3*variable2/variable1 + 1/9*(variable2^2 - 3*variable1*variable3)/(variable1^2*(1/6*sqrt(-1/3*variable2^2*variable3^2 + 4/3*variable1*variable3^3 + 9*variable1^2*variable4^2 + 2/3*(2*variable2^3 - 9*variable1*variable2*variable3)*variable4)/variable1^2 - 1/54*(2*variable2^3 - 9*variable1*variable2*variable3 + 27*variable1^2*variable4)/variable1^3)^(1/3))]

has over two thousand characters in ONE line.

Note that in your email or web reader, there is natural wrapping that happens, as well as command line Sage and sagenb.  But not in Sage cell.  Is there any default that would be appropriate here?  I'm sure there is something nice for embedded instances from CodeMirror, my point is that the default Sage cell page behaves this way.  It makes it nearly unusable for certain kinds of settings.

Thanks for any ideas,
- kcrisman

Harald Schilly

unread,
Jun 18, 2015, 9:35:53 AM6/18/15
to sage-notebook, Andrey Novoseltsev, Jason Grout
On Thu, Jun 18, 2015 at 3:29 PM, kcrisman <kcri...@gmail.com> wrote:
>
> Note that in your email or web reader, there is natural wrapping that happens,

I would suggest to add this CSS setting:

.sagecell_sessionOutput pre {
margin: 0;
white-space: pre-wrap;
}

-- harald

kcrisman

unread,
Jun 18, 2015, 9:59:38 AM6/18/15
to sage-n...@googlegroups.com, har...@schil.ly, jason...@creativetrax.com, novo...@gmail.com
> Note that in your email or web reader, there is natural wrapping that happens,

I would suggest to add this CSS setting:

.sagecell_sessionOutput pre {
  margin: 0;
  white-space: pre-wrap;
}


That does seem to work, trying it out in my browser's web inspector.

Can anyone think of any bad effects that would cause for people using the Sage cell server?  Would it be confusing if there were two lines of output?  E.g. http://sagecell.sagemath.org/?q=iubuhb
Reply all
Reply to author
Forward
0 new messages