Taking Notes

The notebook lets you write documents.

The language used to do formatting is called Markdown. You can do a lot of formatting:

Lists

Todo list before claiming Nobel prize discovery:

  1. double check calibration
  2. find notes from meeting with Higgs
  3. type up notes
  4. document analysis in a jupyter notebook

Tim's shopping list:

  • milk
  • ice cream (chocolate)
  • pasta
  • bananas

Code

Igor sent me this code fragment but I don't get why it works:

for (i=0; i<n; i++) {
  printf("hello %d\n", i);
  x += 4;
}

Equations!

It supports LaTeX for equations inline: $y = \sin(x)$ and display mode:

$$ a^2 + b^2 = c^2 $$

HTML

If Markdown can't do it, just use raw HTML. Old school.

(c) Wolfgang Moritzer

But wait, there is more

The best part is you can mix executable code with your notes:


In [ ]:
# Taken from https://github.com/fperez/talk-1504-boulder/blob/master/QuickTour.ipynb
%matplotlib inline
import matplotlib.pyplot as plt
from scipy import special
import numpy as np
def plot_bessel(xmax=20, nmin=0, nmax=10, nstep=3):
    x = np.linspace(0, xmax, 200)
    f, ax = plt.subplots()
    for n in range(nmin, nmax+1, nstep):
        plt.plot(x, special.jn(n, x), label=r'$J_{%i(x)}$' % n)
    plt.grid()
    plt.legend()
    plt.title('Bessel Functions')

plot_bessel()

In [ ]:
from IPython.html.widgets import interact

interact(plot_bessel,
         xmax=(10,100.),
         nmin=(0, 10),
         nmax=(10, 30),
         nstep=(1,5));