TA的每日心情 | 擦汗 前天 07:00 |
---|
签到天数: 1090 天 [LV.10]以坛为家III
状元
- 积分
- 10477
|
3楼
楼主 |
发表于 2016-11-16 10:13:56
|
只看该作者
例子如下:
- <head>
- <link rel="stylesheet" href="katex.min.css">
- <script src="katex.min.js"></script>
- <script src="auto-render.min.js"></script>
- <style>
-
- </style>
- </head>
- <body>
- <div id="results"></div>
- <script>
- //var eq = 'f(x) = \\int_{-\\infty}^\\infty\\hat f(\\xi)\\,e^{2 \\pi i \\xi x}\\,d\\xi';
- var eq = "f(x) = \\pm\\sqrt{a^2 + b^2}"
- katex.render(eq, document.getElementById('results'));
- </script>
- $\sqrt{2}$
- $\sqrt{a^2 + b^2}$
- <script>renderMathInElement(document.body,{delimiters:
- [{left: "$", right: "$", display: true},{left: "$", right: "$", display: false}]
- });</script>
- </body>
复制代码 |
|