Browse Source

Update example notebook

Steven Silvester 9 years ago
parent
commit
9dfecc39cd
1 changed files with 56 additions and 17 deletions
  1. 56 17
      examples/lab/example.ipynb

+ 56 - 17
examples/lab/example.ipynb

@@ -4,7 +4,8 @@
    "cell_type": "code",
    "execution_count": 1,
    "metadata": {
-    "collapsed": false
+    "collapsed": false,
+    "tags": []
    },
    "outputs": [
     {
@@ -42,23 +43,15 @@
    ]
   },
   {
-   "cell_type": "code",
-   "execution_count": 1,
+   "cell_type": "markdown",
    "metadata": {
-    "collapsed": true
+    "tags": []
    },
-   "outputs": [],
-   "source": [
-    "from ipywidgets import IntSlider\n",
-    "IntSlider() # slider appears at the top of the notebook"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
    "source": [
     "# Markdown Cell\n",
     "\n",
+    "$ e^{ \\pm i\\theta } = \\cos \\theta \\pm i\\sin \\theta + \\beta $\n",
+    "\n",
     "*It* **really** is!"
    ]
   },
@@ -67,7 +60,7 @@
    "execution_count": 2,
    "metadata": {
     "collapsed": false,
-    "scrolled": true
+    "tags": []
    },
    "outputs": [
     {
@@ -85,9 +78,10 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 4,
+   "execution_count": 3,
    "metadata": {
-    "collapsed": false
+    "collapsed": false,
+    "tags": []
    },
    "outputs": [
     {
@@ -97,7 +91,7 @@
        "<IPython.core.display.Image object>"
       ]
      },
-     "execution_count": 4,
+     "execution_count": 3,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -107,6 +101,51 @@
     "Image('./jupyter.png')"
    ]
   },
+  {
+   "cell_type": "code",
+   "execution_count": 4,
+   "metadata": {
+    "collapsed": false,
+    "tags": []
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/latex": [
+       "The mass-energy equivalence is described by the famous equation\n",
+       " \n",
+       "$$E=mc^2$$\n",
+       " \n",
+       "discovered in 1905 by Albert Einstein. \n",
+       "In natural units ($c$ = 1), the formula expresses the identity\n",
+       " \n",
+       "\\begin{equation}\n",
+       "E=m\n",
+       "\\end{equation}"
+      ],
+      "text/plain": [
+       "<IPython.core.display.Latex object>"
+      ]
+     },
+     "execution_count": 4,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "from IPython.display import Latex\n",
+    "Latex('''The mass-energy equivalence is described by the famous equation\n",
+    " \n",
+    "$$E=mc^2$$\n",
+    " \n",
+    "discovered in 1905 by Albert Einstein. \n",
+    "In natural units ($c$ = 1), the formula expresses the identity\n",
+    " \n",
+    "\\\\begin{equation}\n",
+    "E=m\n",
+    "\\\\end{equation}''')"
+   ]
+  },
   {
    "cell_type": "code",
    "execution_count": null,