MarkdownPad 使用 MathJax

一直想要在MarkdownPad中支持数学公式,终于找到了一个方法:

在MarkdownPad中,点击"Tools > Options > Advanced > HTML Head Editor",这个是自定义头文件。添加下列内容:

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

这样在网页预览(F6),你写的公式就可以显示啦。

当然你也可以下载MathJax到本地,添加本地连接到上面的位置,原理都一样。

示例文件:

When \\( a \ne  \\), there are two solutions to \\(ax^ + bx + c = \\) and they are:
$$ x = {-b \pm \sqrt{b^-4ac} \over 2a} $$ $$
\begin{aligned}
\dot{x} & = \sigma(y-x) \\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{aligned}
$$

效果:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABAwAAADNCAIAAACzenUjAAAUOElEQVR4nO3dP3KCWsMH4HdPdHcR9y6ALWSGhZCant4qBTUzX0Wb1pYuM2yBrzgJ4aAgGpVonqdKFOEAkpwf5w//6wEAAEb+t3UBAACA30VIAAAAIkICAAAQERIAAICIkAAAAESEBAAAICIkAAAAESEBAACICAkAAEBESAAAACJCAgAAEBESAACAiJAAAABEhAQAACAiJAAAABEhAQAAiAgJAABAREgAAAAiQgIAABAREgAAgIiQAAAARIQEAAAgIiQAAAARIQEAAIgICQAAQERIAAAAIkICAAAQERIAAICIkAAAAESEBAAAICIkAAAAESEBAACICAnwGJqmSb60bbt1cQCAZyYkwGNIkmT4IU3TbQsDADw3IQEeQ5Iku92u7/ssy4bAAABwC0LCJeq6rqpq61Lwt+R5HnoZXT0k1HWdpmmSJFmWXXG1AMDjEhIucbKzx36/z7IsTdMsy/b7/X1KxR9xi9p827ZDS8UzcSUCwGWEhLPtdrvlZoSu65IkCTWS/X6fJEnXdSdX+/HxcbUi3tevLfl9Cnbn3T+3GWFlvb+qqiRJmqa5tFwXbvemLrsSr+vXXh0AsOzeIeH9NUle3+Pfk5e37/+jH28vycvbx8GCv0S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+EmNbnegwzDd8IUMXuKP9bVYudlPjpNF1XZZl4xhwWQlPhoQ1Z/+ZrgLgMkICPL8wi2K4qR/GI6anunqfu+bDFoPg6HMSwv3sUPuZ3De9SmGWd/PkcxJuVLxNhE4jwx3xcVf4G30lxjY50W3bhnp2qN3OVaxXLnZT4QkJw+y0k1NwcQlPhoQ1Z/+ZrgLgMkICcEOHT1zuum7o/RIqKONnzd7Bcu/qzYt3ReHgb9Xh/pmO5I0cDki4ijXdjZY5d0AvJAC3NmlkCPdEh5/vPK9iVVUn+xptWLzrmgxIuLNnOpI3UhTFLc7Oz/uMOXdALyQAtzZpTBj6Ooc+1r+qGaHfunjXdcWHo13gmY7kjfz8lv+NOHdALyQAdzB+DlTogR1uT9658rFmKskNi3d14dG5W239mY7kjfzaJw84d0AvJAD3Udf1trWNrusMvgSAlYQEAAAgIiQAAAARIQEAAIgICQAAQERIAAAAIkICAAAQERIAAICIkAAAAESEBAAAICIkAAAAESEBAACICAkAAEBESAAAACJCAgAAEBESAACAiJAAAABEhAQAACAiJAAAABEhAQAAiAgJAABAREgAAAAiQgIAABAREgAAgIiQAAAARIQEAAAgIiQAAAARIQEAAIgICQAAQERIAAAAIkICAAAQERIAAICIkAAAAESEBAAAICIkAAAAESEBAACICAkAAEBESAAAACJCAgAAEBESAACAiJAAAABEhAQAACAiJAAAABEhAQAAiAgJAABAREgAAAAiQgIAABAREgAAgIiQAAAARIQEAAAgIiQAAAARIQEAAIgICQAAQERIAAAAIkICAAAQ+X8f3M9KHuXHsgAAAABJRU5ErkJggg==" alt="" />

来自:http://ondulado.wordpress.com/2013/08/27/mathjax-with-markdownpad-2/

P.S.如果这个链接没法打开,可以用Google翻译,会有缓存效果,嗯

上一篇:OpenGL中旋转平移缩放等变换的顺序对模型的影响


下一篇:ANDROID自定义视图——onMeasure流程,MeasureSpec详解