##// END OF EJS Templates
Fix "Source" text for the "Other Syntax" section of the notebook...
Carlos Cordoba -
Show More
@@ -1,259 +1,260
1 {
1 {
2 "metadata": {
2 "metadata": {
3 "name": ""
3 "name": ""
4 },
4 },
5 "nbformat": 3,
5 "nbformat": 3,
6 "nbformat_minor": 0,
6 "nbformat_minor": 0,
7 "worksheets": [
7 "worksheets": [
8 {
8 {
9 "cells": [
9 "cells": [
10 {
10 {
11 "cell_type": "markdown",
11 "cell_type": "markdown",
12 "metadata": {},
12 "metadata": {},
13 "source": [
13 "source": [
14 "The Markdown parser included in IPython is MathJax-aware. This means that you can freely mix in mathematical expressions using the [MathJax subset of Tex and LaTeX](http://docs.mathjax.org/en/latest/tex.html#tex-support). [Some examples from the MathJax site](http://www.mathjax.org/demos/tex-samples/) are reproduced below, as well as the Markdown+TeX source."
14 "The Markdown parser included in IPython is MathJax-aware. This means that you can freely mix in mathematical expressions using the [MathJax subset of Tex and LaTeX](http://docs.mathjax.org/en/latest/tex.html#tex-support). [Some examples from the MathJax site](http://www.mathjax.org/demos/tex-samples/) are reproduced below, as well as the Markdown+TeX source."
15 ]
15 ]
16 },
16 },
17 {
17 {
18 "cell_type": "markdown",
18 "cell_type": "markdown",
19 "metadata": {},
19 "metadata": {},
20 "source": [
20 "source": [
21 "# Motivating Examples\n",
21 "# Motivating Examples\n",
22 "\n",
22 "\n",
23 "---\n",
23 "---\n",
24 "\n",
24 "\n",
25 "## The Lorenz Equations\n",
25 "## The Lorenz Equations\n",
26 "### Source\n",
26 "### Source\n",
27 "```\\begin{align}\n",
27 "```\\begin{align}\n",
28 "\\dot{x} & = \\sigma(y-x) \\\\\n",
28 "\\dot{x} & = \\sigma(y-x) \\\\\n",
29 "\\dot{y} & = \\rho x - y - xz \\\\\n",
29 "\\dot{y} & = \\rho x - y - xz \\\\\n",
30 "\\dot{z} & = -\\beta z + xy\n",
30 "\\dot{z} & = -\\beta z + xy\n",
31 "\\end{align}\n",
31 "\\end{align}\n",
32 "```\n",
32 "```\n",
33 "### Display\n",
33 "### Display\n",
34 "\\begin{align}\n",
34 "\\begin{align}\n",
35 "\\dot{x} & = \\sigma(y-x) \\\\\n",
35 "\\dot{x} & = \\sigma(y-x) \\\\\n",
36 "\\dot{y} & = \\rho x - y - xz \\\\\n",
36 "\\dot{y} & = \\rho x - y - xz \\\\\n",
37 "\\dot{z} & = -\\beta z + xy\n",
37 "\\dot{z} & = -\\beta z + xy\n",
38 "\\end{align}"
38 "\\end{align}"
39 ]
39 ]
40 },
40 },
41 {
41 {
42 "cell_type": "markdown",
42 "cell_type": "markdown",
43 "metadata": {},
43 "metadata": {},
44 "source": [
44 "source": [
45 "## The Cauchy-Schwarz Inequality\n",
45 "## The Cauchy-Schwarz Inequality\n",
46 "### Source\n",
46 "### Source\n",
47 "```\\begin{equation*}\n",
47 "```\\begin{equation*}\n",
48 "\\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right)\n",
48 "\\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right)\n",
49 "\\end{equation*}\n",
49 "\\end{equation*}\n",
50 "```\n",
50 "```\n",
51 "### Display\n",
51 "### Display\n",
52 "\\begin{equation*}\n",
52 "\\begin{equation*}\n",
53 "\\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right)\n",
53 "\\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right)\n",
54 "\\end{equation*}"
54 "\\end{equation*}"
55 ]
55 ]
56 },
56 },
57 {
57 {
58 "cell_type": "markdown",
58 "cell_type": "markdown",
59 "metadata": {},
59 "metadata": {},
60 "source": [
60 "source": [
61 "## A Cross Product Formula\n",
61 "## A Cross Product Formula\n",
62 "### Source\n",
62 "### Source\n",
63 "```\\begin{equation*}\n",
63 "```\\begin{equation*}\n",
64 "\\mathbf{V}_1 \\times \\mathbf{V}_2 = \\begin{vmatrix}\n",
64 "\\mathbf{V}_1 \\times \\mathbf{V}_2 = \\begin{vmatrix}\n",
65 "\\mathbf{i} & \\mathbf{j} & \\mathbf{k} \\\\\n",
65 "\\mathbf{i} & \\mathbf{j} & \\mathbf{k} \\\\\n",
66 "\\frac{\\partial X}{\\partial u} & \\frac{\\partial Y}{\\partial u} & 0 \\\\\n",
66 "\\frac{\\partial X}{\\partial u} & \\frac{\\partial Y}{\\partial u} & 0 \\\\\n",
67 "\\frac{\\partial X}{\\partial v} & \\frac{\\partial Y}{\\partial v} & 0\n",
67 "\\frac{\\partial X}{\\partial v} & \\frac{\\partial Y}{\\partial v} & 0\n",
68 "\\end{vmatrix} \n",
68 "\\end{vmatrix} \n",
69 "\\end{equation*}\n",
69 "\\end{equation*}\n",
70 "```\n",
70 "```\n",
71 "### Display\n",
71 "### Display\n",
72 "\\begin{equation*}\n",
72 "\\begin{equation*}\n",
73 "\\mathbf{V}_1 \\times \\mathbf{V}_2 = \\begin{vmatrix}\n",
73 "\\mathbf{V}_1 \\times \\mathbf{V}_2 = \\begin{vmatrix}\n",
74 "\\mathbf{i} & \\mathbf{j} & \\mathbf{k} \\\\\n",
74 "\\mathbf{i} & \\mathbf{j} & \\mathbf{k} \\\\\n",
75 "\\frac{\\partial X}{\\partial u} & \\frac{\\partial Y}{\\partial u} & 0 \\\\\n",
75 "\\frac{\\partial X}{\\partial u} & \\frac{\\partial Y}{\\partial u} & 0 \\\\\n",
76 "\\frac{\\partial X}{\\partial v} & \\frac{\\partial Y}{\\partial v} & 0\n",
76 "\\frac{\\partial X}{\\partial v} & \\frac{\\partial Y}{\\partial v} & 0\n",
77 "\\end{vmatrix} \n",
77 "\\end{vmatrix} \n",
78 "\\end{equation*}"
78 "\\end{equation*}"
79 ]
79 ]
80 },
80 },
81 {
81 {
82 "cell_type": "markdown",
82 "cell_type": "markdown",
83 "metadata": {},
83 "metadata": {},
84 "source": [
84 "source": [
85 "## The probability of getting \\(k\\) heads when flipping \\(n\\) coins is\n",
85 "## The probability of getting \\(k\\) heads when flipping \\(n\\) coins is\n",
86 "### Source\n",
86 "### Source\n",
87 "```\\begin{equation*}\n",
87 "```\\begin{equation*}\n",
88 "P(E) = {n \\choose k} p^k (1-p)^{ n-k} \n",
88 "P(E) = {n \\choose k} p^k (1-p)^{ n-k} \n",
89 "\\end{equation*}\n",
89 "\\end{equation*}\n",
90 "```\n",
90 "```\n",
91 "### Display\n",
91 "### Display\n",
92 "\\begin{equation*}\n",
92 "\\begin{equation*}\n",
93 "P(E) = {n \\choose k} p^k (1-p)^{ n-k} \n",
93 "P(E) = {n \\choose k} p^k (1-p)^{ n-k} \n",
94 "\\end{equation*}"
94 "\\end{equation*}"
95 ]
95 ]
96 },
96 },
97 {
97 {
98 "cell_type": "markdown",
98 "cell_type": "markdown",
99 "metadata": {},
99 "metadata": {},
100 "source": [
100 "source": [
101 "## An Identity of Ramanujan\n",
101 "## An Identity of Ramanujan\n",
102 "### Source\n",
102 "### Source\n",
103 "```\\begin{equation*}\n",
103 "```\\begin{equation*}\n",
104 "\\frac{1}{\\Bigl(\\sqrt{\\phi \\sqrt{5}}-\\phi\\Bigr) e^{\\frac25 \\pi}} =\n",
104 "\\frac{1}{\\Bigl(\\sqrt{\\phi \\sqrt{5}}-\\phi\\Bigr) e^{\\frac25 \\pi}} =\n",
105 "1+\\frac{e^{-2\\pi}} {1+\\frac{e^{-4\\pi}} {1+\\frac{e^{-6\\pi}}\n",
105 "1+\\frac{e^{-2\\pi}} {1+\\frac{e^{-4\\pi}} {1+\\frac{e^{-6\\pi}}\n",
106 "{1+\\frac{e^{-8\\pi}} {1+\\ldots} } } } \n",
106 "{1+\\frac{e^{-8\\pi}} {1+\\ldots} } } } \n",
107 "\\end{equation*}\n",
107 "\\end{equation*}\n",
108 "```\n",
108 "```\n",
109 "### Display\n",
109 "### Display\n",
110 "\\begin{equation*}\n",
110 "\\begin{equation*}\n",
111 "\\frac{1}{\\Bigl(\\sqrt{\\phi \\sqrt{5}}-\\phi\\Bigr) e^{\\frac25 \\pi}} =\n",
111 "\\frac{1}{\\Bigl(\\sqrt{\\phi \\sqrt{5}}-\\phi\\Bigr) e^{\\frac25 \\pi}} =\n",
112 "1+\\frac{e^{-2\\pi}} {1+\\frac{e^{-4\\pi}} {1+\\frac{e^{-6\\pi}}\n",
112 "1+\\frac{e^{-2\\pi}} {1+\\frac{e^{-4\\pi}} {1+\\frac{e^{-6\\pi}}\n",
113 "{1+\\frac{e^{-8\\pi}} {1+\\ldots} } } } \n",
113 "{1+\\frac{e^{-8\\pi}} {1+\\ldots} } } } \n",
114 "\\end{equation*}"
114 "\\end{equation*}"
115 ]
115 ]
116 },
116 },
117 {
117 {
118 "cell_type": "markdown",
118 "cell_type": "markdown",
119 "metadata": {},
119 "metadata": {},
120 "source": [
120 "source": [
121 "## A Rogers-Ramanujan Identity\n",
121 "## A Rogers-Ramanujan Identity\n",
122 "### Source\n",
122 "### Source\n",
123 "```\\begin{equation*}\n",
123 "```\\begin{equation*}\n",
124 "1 + \\frac{q^2}{(1-q)}+\\frac{q^6}{(1-q)(1-q^2)}+\\cdots =\n",
124 "1 + \\frac{q^2}{(1-q)}+\\frac{q^6}{(1-q)(1-q^2)}+\\cdots =\n",
125 "\\prod_{j=0}^{\\infty}\\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},\n",
125 "\\prod_{j=0}^{\\infty}\\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},\n",
126 "\\quad\\quad \\text{for $|q|<1$}. \n",
126 "\\quad\\quad \\text{for $|q|<1$}. \n",
127 "\\end{equation*}\n",
127 "\\end{equation*}\n",
128 "```\n",
128 "```\n",
129 "### Display\n",
129 "### Display\n",
130 "\\begin{equation*}\n",
130 "\\begin{equation*}\n",
131 "1 + \\frac{q^2}{(1-q)}+\\frac{q^6}{(1-q)(1-q^2)}+\\cdots =\n",
131 "1 + \\frac{q^2}{(1-q)}+\\frac{q^6}{(1-q)(1-q^2)}+\\cdots =\n",
132 "\\prod_{j=0}^{\\infty}\\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},\n",
132 "\\prod_{j=0}^{\\infty}\\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},\n",
133 "\\quad\\quad \\text{for $|q|<1$}. \n",
133 "\\quad\\quad \\text{for $|q|<1$}. \n",
134 "\\end{equation*}"
134 "\\end{equation*}"
135 ]
135 ]
136 },
136 },
137 {
137 {
138 "cell_type": "markdown",
138 "cell_type": "markdown",
139 "metadata": {},
139 "metadata": {},
140 "source": [
140 "source": [
141 "## Maxwell's Equations\n",
141 "## Maxwell's Equations\n",
142 "### Source\n",
142 "### Source\n",
143 "```\\begin{align}\n",
143 "```\\begin{align}\n",
144 "\\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} & = \\frac{4\\pi}{c}\\vec{\\mathbf{j}} \\\\ \\nabla \\cdot \\vec{\\mathbf{E}} & = 4 \\pi \\rho \\\\\n",
144 "\\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} & = \\frac{4\\pi}{c}\\vec{\\mathbf{j}} \\\\ \\nabla \\cdot \\vec{\\mathbf{E}} & = 4 \\pi \\rho \\\\\n",
145 "\\nabla \\times \\vec{\\mathbf{E}}\\, +\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{B}}}{\\partial t} & = \\vec{\\mathbf{0}} \\\\\n",
145 "\\nabla \\times \\vec{\\mathbf{E}}\\, +\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{B}}}{\\partial t} & = \\vec{\\mathbf{0}} \\\\\n",
146 "\\nabla \\cdot \\vec{\\mathbf{B}} & = 0 \n",
146 "\\nabla \\cdot \\vec{\\mathbf{B}} & = 0 \n",
147 "\\end{align}\n",
147 "\\end{align}\n",
148 "```\n",
148 "```\n",
149 "### Display\n",
149 "### Display\n",
150 "\\begin{align}\n",
150 "\\begin{align}\n",
151 "\\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} & = \\frac{4\\pi}{c}\\vec{\\mathbf{j}} \\\\ \\nabla \\cdot \\vec{\\mathbf{E}} & = 4 \\pi \\rho \\\\\n",
151 "\\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} & = \\frac{4\\pi}{c}\\vec{\\mathbf{j}} \\\\ \\nabla \\cdot \\vec{\\mathbf{E}} & = 4 \\pi \\rho \\\\\n",
152 "\\nabla \\times \\vec{\\mathbf{E}}\\, +\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{B}}}{\\partial t} & = \\vec{\\mathbf{0}} \\\\\n",
152 "\\nabla \\times \\vec{\\mathbf{E}}\\, +\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{B}}}{\\partial t} & = \\vec{\\mathbf{0}} \\\\\n",
153 "\\nabla \\cdot \\vec{\\mathbf{B}} & = 0 \n",
153 "\\nabla \\cdot \\vec{\\mathbf{B}} & = 0 \n",
154 "\\end{align}"
154 "\\end{align}"
155 ]
155 ]
156 },
156 },
157 {
157 {
158 "cell_type": "markdown",
158 "cell_type": "markdown",
159 "metadata": {},
159 "metadata": {},
160 "source": [
160 "source": [
161 "# Equation Numbering and References\n",
161 "# Equation Numbering and References\n",
162 "\n",
162 "\n",
163 "---\n",
163 "---\n",
164 "\n",
164 "\n",
165 "Equation numbering and referencing will be available in a future version of IPython."
165 "Equation numbering and referencing will be available in a future version of IPython."
166 ]
166 ]
167 },
167 },
168 {
168 {
169 "cell_type": "markdown",
169 "cell_type": "markdown",
170 "metadata": {},
170 "metadata": {},
171 "source": [
171 "source": [
172 "# Inline Typesetting (Mixing Markdown and TeX)\n",
172 "# Inline Typesetting (Mixing Markdown and TeX)\n",
173 "\n",
173 "\n",
174 "---\n",
174 "---\n",
175 "\n",
175 "\n",
176 "While display equations look good for a page of samples, the ability to mix math and *formatted* **text** in a paragraph is also important.\n",
176 "While display equations look good for a page of samples, the ability to mix math and *formatted* **text** in a paragraph is also important.\n",
177 "\n",
177 "\n",
178 "## Source\n",
178 "## Source\n",
179 "``` This expression $\\sqrt{3x-1}+(1+x)^2$ is an example of a TeX inline equation in a **[Markdown-formatted](http://daringfireball.net/projects/markdown/)** sentence. \n",
179 "``` This expression $\\sqrt{3x-1}+(1+x)^2$ is an example of a TeX inline equation in a **[Markdown-formatted](http://daringfireball.net/projects/markdown/)** sentence. \n",
180 "```\n",
180 "```\n",
181 "## Display\n",
181 "## Display\n",
182 "This expression $\\sqrt{3x-1}+(1+x)^2$ is an example of a TeX inline equation in a **[Markdown-formatted](http://daringfireball.net/projects/markdown/)** sentence. "
182 "This expression $\\sqrt{3x-1}+(1+x)^2$ is an example of a TeX inline equation in a **[Markdown-formatted](http://daringfireball.net/projects/markdown/)** sentence. "
183 ]
183 ]
184 },
184 },
185 {
185 {
186 "cell_type": "markdown",
186 "cell_type": "markdown",
187 "metadata": {},
187 "metadata": {},
188 "source": [
188 "source": [
189 "# Other Syntax\n",
189 "# Other Syntax\n",
190 "\n",
190 "\n",
191 "---\n",
191 "---\n",
192 "\n",
192 "\n",
193 "You will notice in other places on the web that `$$` are needed explicitly to begin and end MathJax typesetting. This is **not** required if you will be using TeX environments, but the IPython notebook will accept this syntax on legacy notebooks. \n",
193 "You will notice in other places on the web that `$$` are needed explicitly to begin and end MathJax typesetting. This is **not** required if you will be using TeX environments, but the IPython notebook will accept this syntax on legacy notebooks. \n",
194 "\n",
194 "\n",
195 "### Source\n",
195 "### Source\n",
196 "```$$\n",
196 "```\n",
197 "$$\n",
197 "\\begin{array}{c}\n",
198 "\\begin{array}{c}\n",
198 "y_1 \\\\\\\n",
199 "y_1 \\\\\\\n",
199 "y_2 \\mathtt{t}_i \\\\\\\n",
200 "y_2 \\mathtt{t}_i \\\\\\\n",
200 "z_{3,4}\n",
201 "z_{3,4}\n",
201 "\\end{array}\n",
202 "\\end{array}\n",
202 "$$\n",
203 "$$\n",
203 "```\n",
204 "```\n",
204 "\n",
205 "\n",
205 "```\n",
206 "```\n",
206 "$$\n",
207 "$$\n",
207 "\\begin{array}{c}\n",
208 "\\begin{array}{c}\n",
208 "y_1 \\cr\n",
209 "y_1 \\cr\n",
209 "y_2 \\mathtt{t}_i \\cr\n",
210 "y_2 \\mathtt{t}_i \\cr\n",
210 "y_{3}\n",
211 "y_{3}\n",
211 "\\end{array}\n",
212 "\\end{array}\n",
212 "$$\n",
213 "$$\n",
213 "```\n",
214 "```\n",
214 "\n",
215 "\n",
215 "```\n",
216 "```\n",
216 "$$\\begin{eqnarray} \n",
217 "$$\\begin{eqnarray} \n",
217 "x' &=& &x \\sin\\phi &+& z \\cos\\phi \\\\\n",
218 "x' &=& &x \\sin\\phi &+& z \\cos\\phi \\\\\n",
218 "z' &=& - &x \\cos\\phi &+& z \\sin\\phi \\\\\n",
219 "z' &=& - &x \\cos\\phi &+& z \\sin\\phi \\\\\n",
219 "\\end{eqnarray}$$\n",
220 "\\end{eqnarray}$$\n",
220 "```\n",
221 "```\n",
221 "\n",
222 "\n",
222 "```\n",
223 "```\n",
223 "$$\n",
224 "$$\n",
224 "x=4\n",
225 "x=4\n",
225 "$$\n",
226 "$$\n",
226 "```\n",
227 "```\n",
227 "\n",
228 "\n",
228 "### Display\n",
229 "### Display\n",
229 "$$\n",
230 "$$\n",
230 "\\begin{array}{c}\n",
231 "\\begin{array}{c}\n",
231 "y_1 \\\\\\\n",
232 "y_1 \\\\\\\n",
232 "y_2 \\mathtt{t}_i \\\\\\\n",
233 "y_2 \\mathtt{t}_i \\\\\\\n",
233 "z_{3,4}\n",
234 "z_{3,4}\n",
234 "\\end{array}\n",
235 "\\end{array}\n",
235 "$$\n",
236 "$$\n",
236 "\n",
237 "\n",
237 "$$\n",
238 "$$\n",
238 "\\begin{array}{c}\n",
239 "\\begin{array}{c}\n",
239 "y_1 \\cr\n",
240 "y_1 \\cr\n",
240 "y_2 \\mathtt{t}_i \\cr\n",
241 "y_2 \\mathtt{t}_i \\cr\n",
241 "y_{3}\n",
242 "y_{3}\n",
242 "\\end{array}\n",
243 "\\end{array}\n",
243 "$$\n",
244 "$$\n",
244 "\n",
245 "\n",
245 "$$\\begin{eqnarray} \n",
246 "$$\\begin{eqnarray} \n",
246 "x' &=& &x \\sin\\phi &+& z \\cos\\phi \\\\\n",
247 "x' &=& &x \\sin\\phi &+& z \\cos\\phi \\\\\n",
247 "z' &=& - &x \\cos\\phi &+& z \\sin\\phi \\\\\n",
248 "z' &=& - &x \\cos\\phi &+& z \\sin\\phi \\\\\n",
248 "\\end{eqnarray}$$\n",
249 "\\end{eqnarray}$$\n",
249 "\n",
250 "\n",
250 "$$\n",
251 "$$\n",
251 "x=4\n",
252 "x=4\n",
252 "$$"
253 "$$"
253 ]
254 ]
254 }
255 }
255 ],
256 ],
256 "metadata": {}
257 "metadata": {}
257 }
258 }
258 ]
259 ]
259 } No newline at end of file
260 }
General Comments 0
You need to be logged in to leave comments. Login now