|
| 1 | +var md = require('markdown-it')(), |
| 2 | + mk = require('./index'); |
| 3 | + |
| 4 | +md.use(mk); |
| 5 | + |
| 6 | +var input = document.getElementById('input'), |
| 7 | + output = document.getElementById('output'), |
| 8 | + button = document.getElementById('button'); |
| 9 | + |
| 10 | +button.addEventListener('click', function(ev){ |
| 11 | + |
| 12 | + var result = md.render(input.value); |
| 13 | + |
| 14 | + output.innerHTML = result; |
| 15 | + |
| 16 | +}); |
| 17 | + |
| 18 | +/* |
| 19 | +
|
| 20 | +# Some Math |
| 21 | +
|
| 22 | +$\sqrt{3x-1}+(1+x)^2$ |
| 23 | +
|
| 24 | +# Maxwells Equations |
| 25 | +
|
| 26 | +$\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} |
| 27 | += \frac{4\pi}{c}\vec{\mathbf{j}} \nabla \cdot \vec{\mathbf{E}} = 4 \pi \rho$ |
| 28 | +
|
| 29 | +$\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} = \vec{\mathbf{0}}$ (curl of $\vec{\mathbf{E}}$ is proportional to the time derivative of $\vec{\mathbf{B}}$) |
| 30 | +
|
| 31 | +$\nabla \cdot \vec{\mathbf{B}} = 0$ |
| 32 | +
|
| 33 | +
|
| 34 | +
|
| 35 | +\sqrt{3x-1}+(1+x)^2 |
| 36 | +
|
| 37 | +c = \pm\sqrt{a^2 + b^2} |
| 38 | +
|
| 39 | +Maxwell's Equations |
| 40 | +
|
| 41 | +\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} |
| 42 | += \frac{4\pi}{c}\vec{\mathbf{j}} \nabla \cdot \vec{\mathbf{E}} = 4 \pi \rho |
| 43 | +
|
| 44 | +\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} = \vec{\mathbf{0}} |
| 45 | +
|
| 46 | +\nabla \cdot \vec{\mathbf{B}} = 0 |
| 47 | +
|
| 48 | +Same thing in a LaTeX array |
| 49 | +\begin{array}{c} |
| 50 | +
|
| 51 | +\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & |
| 52 | += \frac{4\pi}{c}\vec{\mathbf{j}} \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ |
| 53 | +
|
| 54 | +\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ |
| 55 | +
|
| 56 | +\nabla \cdot \vec{\mathbf{B}} & = 0 |
| 57 | +
|
| 58 | +\end{array} |
| 59 | +
|
| 60 | +
|
| 61 | +\begin{array}{c} |
| 62 | +y_1 \\ |
| 63 | +y_2 \mathtt{t}_i \\ |
| 64 | +z_{3,4} |
| 65 | +\end{array} |
| 66 | +
|
| 67 | +\begin{array}{c} |
| 68 | +x' &=& &x \sin\phi &+& z \cos\phi \\ |
| 69 | +z' &=& - &x \cos\phi &+& z \sin\phi \\ |
| 70 | +\end{array} |
| 71 | +
|
| 72 | +
|
| 73 | +
|
| 74 | +# Maxwell's Equations |
| 75 | +
|
| 76 | +
|
| 77 | +equation | description |
| 78 | +----------|------------ |
| 79 | +$\nabla \cdot \vec{\mathbf{B}} = 0$ | divergence of $\vec{\mathbf{B}}$ is zero |
| 80 | +$\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} = \vec{\mathbf{0}}$ | curl of $\vec{\mathbf{E}}$ is proportional to the rate of change of $\vec{\mathbf{B}}$ |
| 81 | +$\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$ | wha? |
| 82 | +
|
| 83 | + |
| 84 | +*/ |
0 commit comments