Ask Your Question
4

highlighting the code in notebook

asked 2011-01-15 04:12:42 -0500

stanislav gravatar image

updated 2011-01-15 04:12:54 -0500

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.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2011-01-16 13:01:10 -0500

Mike Hansen gravatar image

Currently, the notebook does not syntax highlighting for the input cells; however, it does include CodeMirror which is used to do syntax highlighting for "data files" in the notebook. This was added at #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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-01-15 04:12:42 -0500

Seen: 1,580 times

Last updated: Jan 16 '11