First time here? Check out the FAQ!

Ask Your Question
4

highlighting the code in notebook

asked 14 years ago

stanislav gravatar image

updated 14 years ago

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.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 14 years ago

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.

Preview: (hide)
link

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: 14 years ago

Seen: 2,185 times

Last updated: Jan 16 '11