katex-tests.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <title>KaTeX Tests</title>
  5. <meta charset="UTF-8">
  6. <meta name="description" content="" />
  7. <meta name="keywords" content="" />
  8. <style>
  9. * {
  10. margin:0;
  11. padding:0;
  12. }
  13. body{font-size:14px;color:#444;font-family:"微软雅黑",Arial;background:#fff;padding: 15px;}
  14. .katex {display: block;margin-bottom: 10px;}
  15. </style>
  16. </head>
  17. <body>
  18. <a href="http://khan.github.io/KaTeX/" target="_blank">http://khan.github.io/KaTeX/</a><br/><br/>
  19. <a href="http://meta.wikimedia.org/wiki/Help:Displaying_a_formula" target="_blank">http://meta.wikimedia.org/wiki/Help:Displaying_a_formula</a>
  20. <br/><br/>
  21. <span class="katex">a^2</span>
  22. <span class="katex">a^{2+2}</span>
  23. <span class="katex">a_2</span>
  24. <span class="katex">{x_2}^3</span>
  25. <span class="katex">x_2^3</span>
  26. <span class="katex">10^{10^{8}}</span>
  27. <span class="katex">a_{i,j}</span>
  28. <span class="katex">_nP_k</span>
  29. <span class="katex">E=MC^2</span>
  30. <span class="katex">\left \{ \frac{a}{b} \right \} \quad \left \lbrace \frac{a}{b} \right \rbrace</span>
  31. <span class="katex">\left [ \frac{a}{b} \right ] \quad \left \lbrack \frac{a}{b} \right \rbrack</span>
  32. <span class="katex">\left ( \frac{a}{b} \right )</span>
  33. <span class="katex">\left \langle \frac{a}{b} \right \rangle</span>
  34. <span class="katex">x > y = 100</span>
  35. <span class="katex">c = \pm\sqrt{a^2 + b^2}</span>
  36. <span class="katex">\left . \frac{A}{B} \right \} \to X</span>
  37. <span class="katex">\left / \frac{a}{b} \right \backslash</span>
  38. <span class="katex">\left \lfloor \frac{a}{b} \right \rfloor \left \lceil \frac{c}{d} \right \rceil</span>
  39. <span class="katex">\frac{1}{2}=0.5</span>
  40. <span class="katex">\dfrac{k}{k-1} = 0.5</span>
  41. <span class="katex">\dbinom{n}{k} \binom{n}{k}</span>
  42. <span class="katex">\oint_C x^3\, dx + 4y^2\, dy</span>
  43. <span class="katex">\bigcap_1^n p \bigcup_1^k p</span>
  44. <span class="katex">\phi_n(\kappa) =
  45. \frac{1}{4\pi^2\kappa^2} \int_0^\infty
  46. \frac{\sin(\kappa R)}{\kappa R}
  47. \frac{\partial}{\partial R}
  48. \left[R^2\frac{\partial D_n(R)}{\partial R}\right]\,dR</span>
  49. <span class="katex">\sum_{m=1}^\infty\sum_{n=1}^\infty\frac{m^2\,n}
  50. {3^m\left(m\,3^n+n\,3^m\right)}</span>
  51. <span class="katex">e^{i \pi} + 1 = 0</span>
  52. <span class="katex">\left ( \frac{1}{2} \right )</span>
  53. <span class="katex">x_{1,2}=\frac{-b\pm\sqrt{\color{Red}b^2-4ac}}{2a}</span>
  54. <span class="katex">{\color{Blue}x^2}+{\color{YellowOrange}2x}-{\color{OliveGreen}1}</span>
  55. <span class="katex">\textstyle \sum_{k=1}^N k^2</span>
  56. <span class="katex">\dfrac{ \tfrac{1}{2}[1-(\tfrac{1}{2})^n] }{ 1-\tfrac{1}{2} } = s_n</span>
  57. <span class="katex">\binom{n}{k}</span>
  58. <span class="katex">0+1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+\cdots</span>
  59. <span class="katex">f(x) = \int_{-\infty}^\infty
  60. \hat f(\xi)\,e^{2 \pi i \xi x}
  61. \,d\xi</span>
  62. <span class="katex">\displaystyle \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }</span>
  63. <span class="katex">\displaystyle \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)</span>
  64. <span class="katex">\displaystyle 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for }\lvert q\rvert<1.</span>
  65. <span class="katex">2 = \left(
  66. \frac{\left(3-x\right) \times 2}{3-x}
  67. \right)</span>
  68. <span class="katex">S_{\text{new}} = S_{\text{old}} - \frac{ \left( 5-T \right) ^2} {2}</span>
  69. <span class="katex">x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}</span>
  70. <span class="katex">ax^2 + bx + c = 0\,</span>
  71. <span class="katex">\int_a^x \!\!\!\int_a^s f(y)\,dy\,ds
  72. = \int_a^x f(y)(x-y)\,dy</span>
  73. <span class="katex">\sum_{m=1}^\infty\sum_{n=1}^\infty\frac{m^2\,n}
  74. {3^m\left(m\,3^n+n\,3^m\right)}</span>
  75. <span class="katex">u'' + p(x)u' + q(x)u=f(x),\quad x>a</span>
  76. <span class="katex">|\bar{z}| = |z|,
  77. |(\bar{z})^n| = |z|^n,
  78. \arg(z^n) = n \arg(z)</span>
  79. <span class="katex">\lim_{z\rightarrow z_0} f(z)=f(z_0)</span>
  80. <span class="katex">\phi_n(\kappa) =
  81. 0.033C_n^2\kappa^{-11/3},\quad
  82. \frac{1}{L_0}\ll\kappa\ll\frac{1}{l_0}</span>
  83. <span class="katex">\sum_{k=1}^N k^2</span>
  84. <span class="katex">\textstyle \sum_{k=1}^N k^2</span>
  85. <span class="katex">\prod_{i=1}^N x_i</span>
  86. <span class="katex">\textstyle \prod_{i=1}^N x_i</span>
  87. <span class="katex">\coprod_{i=1}^N x_i</span>
  88. <span class="katex">\textstyle \coprod_{i=1}^N x_i</span>
  89. <span class="katex">\int_{1}^{3}\frac{e^3/x}{x^2}\, dx</span>
  90. <span class="katex">\int_C x^3\, dx + 4y^2\, dy</span>
  91. <span class="katex">{}_1^2\!\Omega_3^4</span>
  92. <span class="katex">x', y'', f', f''</span>
  93. <span class="katex">\dot{x}, \ddot{x}</span>
  94. <span class="katex">\hat a \ \bar b \ \vec c</span>
  95. <span class="katex">\lessapprox \lesssim \eqslantless \leqslant \leqq \geqq \geqslant \eqslantgtr \gtrsim \gtrapprox</span>
  96. <span class="katex">\smile \frown \wr \triangleleft \triangleright \infty \bot \top</span>
  97. <span class="katex">\leftarrow \gets \rightarrow \to \nleftarrow \nrightarrow \leftrightarrow \nleftrightarrow \longleftarrow \longrightarrow \longleftrightarrow</span>
  98. <span class="katex">\uparrow \downarrow \updownarrow \Uparrow \Downarrow \Updownarrow \nearrow \searrow \swarrow \nwarrow</span>
  99. <span class="katex">\rightharpoonup \rightharpoondown \leftharpoonup \leftharpoondown \upharpoonleft \upharpoonright \downharpoonleft \downharpoonright \rightleftharpoons \leftrightharpoons</span>
  100. <span class="katex">\curvearrowleft \circlearrowleft \Lsh \upuparrows \rightrightarrows \rightleftarrows \Rrightarrow \rightarrowtail \looparrowright</span>
  101. <span class="katex">\curvearrowright \circlearrowright \Rsh \downdownarrows \leftleftarrows \leftrightarrows \Lleftarrow \leftarrowtail \looparrowleft</span>
  102. <span class="katex">\mapsto \longmapsto \hookrightarrow \hookleftarrow \multimap \leftrightsquigarrow \rightsquigarrow</span>
  103. <span class="katex">\Diamond \Box \triangle \angle \perp \mid \nmid \| 45^\circ</span>
  104. <span class="katex">
  105. \sim \approx \simeq \cong \dot= \overset{\underset{\mathrm{def}}{}}{=}</span>
  106. <span class="katex"></span>
  107. <span class="katex"></span>
  108. <span class="katex"></span>
  109. <span class="katex"></span>
  110. <span class="katex"></span>
  111. <span class="katex"></span>
  112. <span class="katex"></span>
  113. <span class="katex"></span>
  114. <span class="katex"></span>
  115. <span class="katex"></span>
  116. <span class="katex"></span>
  117. <script src="../examples/js/jquery.min.js"></script>
  118. <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min.css">
  119. <script src="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min.js"></script>
  120. <script type="text/javascript">
  121. $(function() {
  122. $(".katex").each(function(){
  123. var tex = $(this);
  124. katex.render(tex.text(), tex[0]);
  125. });
  126. });
  127. </script>
  128. </body>
  129. </html>