On Jul 9, 6:21 am, Jason Grout <jason-s...@creativetrax.com> wrote: > On 7/7/10 2:34 PM, David Sanders wrote: > > > > > Hi, > > > [Using 'Sage Version 4.4.4, Release Date: 2010-06-23' on Kubuntu > > 10.04] > > > I have just started using Sage, mainly using the notebook interface, > > which on the whole is excellent and impressive! > > > I started out by trying the new interface "Cantor", which is very > > nice, but I found it to be too unstable, for example it randomly > > crashed several times when I pressed "Tab" in the wrong place. > > > But I liked its font, and especially its syntax highlighting. So the > > question is: is it possible to change the font and to use syntax > > highlighting in the standard (web browser) notebook interface? I > > found a few discussions on sage-devel, but they are apparently old > > (?). It seems to me that this is an important missing feature at the > > moment (assuming I am not just not finding the correct check box!) > > In the notebook, you can edit a file and get syntax highlighting. For > example, open a new worksheet, go to the Data menu, click "Upload or > create file", and type a name in the third box (for naming a new file). > An editor will then open up that has python syntax highlighting.
I followed these instructions, but I do not seem to get an editable file. I get the message "You may download test or create a linked copy to the worksheet or delete test. Access test in this worksheet by typing DATA+'test'. Here DATA is a special variable that gives the exact path to all data files uploaded to this worksheet. " But I can't edit anything on that page. > hope is that eventually, we might use something like this for code > cells. However, as Mike says, speed is a primary concern. Another > primary concern is that the syntax highlighting uses a different kind of > input box that is typically way more buggy in browsers than the plain > text box we currently use. There are huge amounts of bug workarounds > for various browsers in the syntax highlighting program used above, for > example. > > However, if the application (CodeMirror) that we use for syntax > highlighting above proves to be okay for cells, there are *lots* more > cool things that we can do beyond just changing fonts and syntax > highlighting. On Jul 9, 10:14 am, Jason Grout <jason-s...@creativetrax.com> wrote: > On 7/8/10 9:45 PM, Alex Leone wrote: > > > I just recently got a patch into codemirror (the syntax highlighting > > that data files use) so that it resizes just like sage input cell > > textarea's. We should be able to replace input cells with codemirror soon. > > Yea! Seehttp://github.com/jasongrout/CodeMirrorfor my github mirror > of CodeMirror, where I've explored some ideas about having javascript > widgets embedded in Codemirror cells. The code is just exploratory at > this point, but I think there's a real possibility for some fantastic > interfaces (for example, a graph editor right in the code cell that lets > you draw that graph, like: > > G=<box with an editable graph inside it> > This sounds excellent, can't wait to see what it all looks like! Thanks to everybody for the replies. David. > > By the way, it's straightforward to change the fonts in the input boxes. > I'm not sure of the exact code, but you just have to find out what CSS > variable controls the font inside text area boxes and change that. It > should be something like one line that you can execute inside a Sage > cell to change the font. > > Thanks, > > Jason -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org