Excellent suggestion. We've wanted this for a long time now. We
welcome anyone who wants to implement it.
Thanks,
Jason
This has long been a feature of Mathematica notebooks. Another one that
goes hand in hand with it (IMO) is the ability to group cells into a
tree-like hierarchy - you can then expand or contract entire subtrees
(say, corresponding to various sections of a document) with a single
click. Is that desirable for the Sage notebook as well? Is it even
possible without a change to the .sws file format or a weird hack?
-Keshav
----
Join us in #sagemath on irc.freenode.net !
Sure. How about just adding a bit of javascript code to add a little
expand/contract symbol next to any html heading that expands/contracts
the appropriate block. Then you could use TinyMCE to insert the
headings, and they would automatically inherit expand/collapse symbols.
So I tried this:
$("#worksheet").delegate("h1","click", function(event) {
$(this).nextUntil("h1").toggle();
});
It worked fine for collapsing things inside a single text cell, but
since all the html for a text cell is inside of a div, we need to be a
little trickier with how we collapse input cells and other elements of
other text cells.
Thanks,
Jason