>
> William Stein wrote:
>> This could be implemented by having a button in the palette on the
>> top to insert a new "math" cell.   The cell itself could just be some
>> special HTML (maybe with a comment) that gets post-processed
>> by Sage and turned into an input cell.   See the attached "Picture 1"
>> -- that what it might look like right after one clicks the "insert a new
>> math cell" button.   Then "Picture 2" is what it looks like after one
>> clicks the save button.
>
On Wed, Feb 18, 2009 at 9:37 PM, Jason Grout wrote:
> My guess is that it would be much easier to implement the earlier
> proposal: a ctrl-; or something would split the text cell at the cursor
> position and create a new code cell in the middle.
>
> This way, we don't have to duplicate all of the functionality
> improvements that are going into code cells, like tab completion,
> etc.
>

In the example given by William the "new math cell" in text mode is
not "live", i.e. it does not contain any actual commands (yet). The
"special HTML" to which William referred is only an empty marker.
After clicking Save from TinyMCE, the cursor is positioned at the
newly created math cell and only then does the user begin to enter
Sage commands. So tab completion, etc. in TinyMCE never arises.

Of course it is tempting to allow commands to be entered instead the
special HTML construct while still in TinyMCE and I think it might
also be tempting (even necessary and desireable?) to allow more than
one such special HTML construct to be inserted before clicking Save.

I suppose that this design proposed by William is at least in part
motivated by some ideas about what might be simple to implement as an
extension of the current code base. But I have to admit that I find it
just a little more "obtuse" for the user. It raises the obvious
question about why actually command input might not be allowed inside
TinyMCE.

>
> How about this:
>
> If you are in a text cell:
>  * ctrl-; splits the text cell, puts in a new math cell, and focuses on
> the math cell.
>
> If you are in a math cell:
>  * ctrl-; splits the math cell, focusing on the second math cell
>  * ctrl-shift-; splits the math cell, inserts a new text cell between
> them, and focuses on the text cell.
>
> I actually find that last case one that comes up often for me.  I'm
> writing code for my class as a sequence of steps, then I want to
> explain it.  So I would just go to a place in the code I'd like to put
> in a note, press ctrl-shift-;, and type my note.
>

Except for the mysterious ctrl-shift- key combinations, I still like
this idea better. Besides these "hidden" key short-cuts, I presume
that these same functions would be available from a mouse click?

I also like you idea of splitting math cells in an analogous manner!

Regards,
Bill Page.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to