On Wed, Apr 2, 2008 at 2:53 PM, David Kohel <[EMAIL PROTECTED]> wrote: > > Hi, > > On the subject of notebook features: > > One feature that would be really nice is to have distinct text cells, > in html or > even better latex mode. A text cell could created by a hot key (say > <cntrl-t>) > in edit mode which displays the source latex or html, then toggled out > of edit > mode to display the formatted text. This could be nicer for > preparing > worksheets for teaching which combine latex formatted exercises with > sage > cells for code, rather than using > > # Exercise 1. Let p = 75361. Evaluate x^(p-1) mod p for x = 2, 5, 7, > and 11. > # What do you observe? Is p a prime? > > Create text cell in edit mode: > > %latex > {\bf Exercise 1.} Let $p = 75361$. Evaluate $x^{p-1} \bmod p$ for $x > = 2, 3, > 5, 7$ and $11$ with the commands > \begin{verbatim} > p = 75361 > for x in (2,3,5,7,11): > powermod(x,p-1,p) > \end{verbatim} > What do you observe? Is $p$ a prime? > > <toggle edit mode> > > This would look much more professional than just using comments as in > the first > example. > > Even better, I could imagine exporting the worksheet as a latex file > and conversely > reading a marked up latex file as a workshop. > > Is this feasible? >
Have you ever tried clicking the blue edit button in the upper right side of the screen? It gives you a plain text representation of the worksheet. You can enter arbitrary HTML between the cells (the {{{ }}}), and it appears looking more professional when you click the "Save and Use" button. In fact, internally all the text between subsequent {{{ }}} compute cells *is* a TextCell. There is also one bonus -- if you put math in $'s or $$'s, it will get typeset as mathematics. -- William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---