在Blogger上书写LaTeX公式

坑:

如果你在后台设置的主题背景中编辑HTML,出现下面这个错误:
The widget settings in widget with id <b>AdSense1</b> is not valid. An internal error occurred. Please try again.
我在网上发现有不少人都遇到过,而且没有太好的解决办法。所以我就用比较暴力的方法:

直接定位到这个插件的位置,把AdSense的两个插件相关的几行代码删掉。

教程:

1. 复制下面的内容
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">
    MathJax.Hub.Config({
     TeX: { equationNumbers: { autoNumber: "AMS" } },
     tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
      processEscapes: true },
     'HTML-CSS': { scale: 90 },
     displayIndent: '2em'
    });
</script>

2. 在后台设置$\rightarrow$主题背景$\rightarrow$编辑HTML,把这些内容粘贴到head标签内

示例:

$\LaTeX$
$\sum \limits_{i=0}^n(\gamma \times Q(s|a))$

评论

此博客中的热门博文

Flash被淘汰后打开swf文件的最佳方法

[SOLVED] Supermicro cannot connect to VGA video port or iKVM

MacBook日文键盘四种输入模式输入法切换(同样适用于其他布局的键盘)