玛氪宕·梦魔(Markdown Memo),使用Markdown的云端备忘录,百度IFE的RIA启航班的不合格的作业,才……才没有什么阴谋呢!
源gitee链接https://gitee.com/arathi/MarkdownMemo?_from=gitee_search
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.8 KiB
65 lines
2.8 KiB
10 years ago
|
<!DOCTYPE html>
|
||
|
<html lang="zh">
|
||
|
<head>
|
||
|
<meta charset="utf-8" />
|
||
|
<title>Tex科学公式 - Editor.md examples</title>
|
||
|
<link rel="stylesheet" href="css/style.css" />
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="layout">
|
||
|
<header>
|
||
|
<h1>Tex科学公式</h1>
|
||
|
<p>基于KaTeX.js:<a href="http://khan.github.io/KaTeX/" target="_blank">http://khan.github.io/KaTeX/</a></p>
|
||
|
</header>
|
||
|
<div class="editormd" id="test-editormd">
|
||
|
<script type="text/markdown">####科学公式
|
||
|
|
||
|
$$E=mc^2$$
|
||
|
|
||
|
$$\(\sqrt{3x-1}+(1+x)^2\)$$
|
||
|
|
||
|
$$\sin(\alpha)^{\theta}=\sum_{i=0}^{n}(x^i + \cos(f))$$</script>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.1.1/katex.min.css">
|
||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.1.1/katex.min.js"></script>
|
||
|
<script src="../lib/jquery.min.js"></script>
|
||
|
<link rel="stylesheet" href="../dist/css/editormd.css" />
|
||
|
<script src="../src/js/editormd.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(function() {
|
||
|
//自定义MathJax加载URL,适用于国内
|
||
|
//editormd.mathjaxURL = "http://cdn.bootcss.com/mathjax/2.4.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
|
||
|
|
||
|
//适用于全球/国外
|
||
|
//editormd.mathjaxURL = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
|
||
|
var testEditor
|
||
|
|
||
|
$.get("./test.md", function(md){
|
||
|
testEditor = editormd("test-editormd", {
|
||
|
width: "90%",
|
||
|
height: 640,
|
||
|
path : '../lib/',
|
||
|
markdown : md,
|
||
|
//mathjax : true,
|
||
|
onload : function() {
|
||
|
this.editor.find(".mathjax-code").each(function(){
|
||
|
//console.log($(this)[0]);
|
||
|
$(this).html($(this).html().replace(/\$\$/g, ""));
|
||
|
katex.render($(this).html(), $(this)[0]);
|
||
|
});
|
||
|
},
|
||
|
onchange : function() {
|
||
|
this.editor.find(".mathjax-code").each(function(){
|
||
|
//console.log($(this)[0]);
|
||
|
$(this).html($(this).html().replace(/\$\$/g, ""));
|
||
|
katex.render($(this).html(), $(this)[0]);
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|