Taking notes with Markdown and Latex using IPython notebooks

I don’t know why I haven’t been using this forever, but I recently discovered the following near-ideal ways to take notes in CS or math-type classes on my computer:

  1. Install IPython on your computer
  2. From the folder you want to save your notes, launch the IPython notebook server:
     $ ipython notebook 
  3. In the resulting browser window, create a new notebook
  4. Change the cell type of the current cell to “Markdown”
  5. Write notes on the fly, wrapping anything you want to be rendered as Latex in $ $ tags!
  6. Press Shift+Enter to render the cell. To my knowledge, it doesn’t matter what’s split among cells (that’s more useful when you’re dealing with the results of Python expressions (the intended use of IPython…)

But wait- it gets better!

Generally, IPython notebooks are best viewed by a notebook server you launch from the directory. However, if you choose to make your notebooks available on the web (for instance, by hosting them on Github), then you can render them live using the IPython Notebook Viewer. This creates a link to the rendered notebook, incorporating all the Markdown and Latex formatting you wrote. And you can share it!

As an example, here’s a link to my (somewhat terrible) notes on Regression from the Machine Learning class I’m taking this semester: http://nbviewer.ipython.org/urls/raw.github.com/eclarke/Machine-Learning-Notes/master/Regression.ipynb

Edit: corrected capitalization of IPython.

Advertisements

An excerpt from They Thought They Were Free: The Germans, 1933-45, by Milton Mayer:

Herr Simon [a former Nazi interviewed after WWII], was greatly interested in the mass deportation of Americans of Japanese ancestry from our West Coast in 1942. He had not heard of it before […]

He asked me whether I had known anybody connected with the West Coast deportation. When I said “No,” he asked me what I had done about it. When I said “Nothing,” he said, triumphantly, “There. You learned about all these things openly, through your government and your press. We did not learn through ours. As in your case, nothing was required of us–in our case, not even knowledge. You knew about things you thought were wrong, didn’t you, Herr Professor?” “Yes.” “So. You did nothing. We heard, or guessed, and we did nothing. So it is everywhere.” When I protested that the Japanese-descended Americans had not been treated like the Jews, he said “And if they had been–what then? Do you not see that the idea of doing something or doing nothing is in either case the same?”