ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 16 Jan 2011 13:01:10 -0600highlighting the code in notebookhttp://ask.sagemath.org/question/7871/highlighting-the-code-in-notebook/I wonder if there is any way to highlight the code (things like "def" "for") in the notebook.
I have found some informations about the css fileused by notebook but maybe someone could describe me the way if there is one.
Thanks.Sat, 15 Jan 2011 04:12:42 -0600http://ask.sagemath.org/question/7871/highlighting-the-code-in-notebook/Answer by Mike Hansen for <p>I wonder if there is any way to highlight the code (things like "def" "for") in the notebook.</p>
<p>I have found some informations about the css fileused by notebook but maybe someone could describe me the way if there is one.</p>
<p>Thanks.</p>
http://ask.sagemath.org/question/7871/highlighting-the-code-in-notebook/?answer=11981#post-id-11981Currently, the notebook does not syntax highlighting for the input cells; however, it does include [CodeMirror](http://codemirror.net/) which is used to do syntax highlighting for "data files" in the notebook. This was added at [#7501](http://trac.sagemath.org/sage_trac/ticket/7501). With a little bit of hacking, it'd be possible to add this support to input cells. It would basically involve adding a bit of Javascript code at the end of each cell. The main reason why this hasn't been done yet is due to performance reasons.Sun, 16 Jan 2011 13:01:10 -0600http://ask.sagemath.org/question/7871/highlighting-the-code-in-notebook/?answer=11981#post-id-11981