给网站增加了公式插件

· 2022-09-18
点点滴滴 网站建设

最近在看数学课本,一遍看一遍记录,不免就要记录数学公式,之前的主题不支持,网上搜索实验了一番:
TypechoLaTeX 一款typecho数学公式插件

试验了一下,支持 Typecho 1.2,上 github 下载解压之后,放到 plugins 里面,再从后台开启即可使用。

看一下效果

一个大于 10 的数可以表示成 $a\times 10^{n}$ 的形式,其中 $1\leqslant a < 10$,n 是正整数。

1° 的 $\frac{1}{60}$ 为 1 分,记作 1',即 1° = 60'。
1' 的 $\frac{1}{60}$ 为 1 秒,记作 1'',即 1' = 60"。

$$ e_j = -k \sum_{i=1}^m (P_{ij} \ast \ln { P_{ij} } ) $$

$$ x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} $$

$$ \Large x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} $$

$$ A\times B=\begin{vmatrix} \hat{i} & \hat{j} & \hat{k}\\ A_0 & A_1 & A_2\\ B_0 & B_1 & B_2 \end{vmatrix} $$

$$ A\times B=\begin{vmatrix} \hat{i} & \hat{j} & \hat{k}\\ A_0 & A_1 & A_2\\ B_0 & B_1 & B_2 \end{vmatrix} $$

在线公式编辑器

https://www.codecogs.com/latex/eqneditor.php

或者使用 MathJax

地址:https://github.com/mathjax/MathJax
使用方法:

<script>
MathJax = {
  tex: {
    inlineMath: [['$', '$']],
    displayMath: [['$$', '$$']],
    processEscapes: true,      // use \$ to produce a literal dollar sign
    processEnvironments: true, // process \begin{xxx}...\end{xxx} outside math mode
    tags: 'ams'             // or 'ams' or 'all'

  }
};
</script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>

把上面的脚本放在 footer.php 文件 的前面即可。

tags:ams 的作用是使公式后面带有编号,用法如下:

带编号的公式1:
$$
\begin{equation}
\Large x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
\end{equation}
$$

latex

  • 本文作者:管理员
  • 本文链接:http://www.sirit.com.cn/archives/467/
  • 版权许可:知识共享署名-相同方式共享4.0国际许可协议
  • 友情提示:本文更新于2022年09月19日,已超过189天没有更新,若内容或图片失效,请留言反馈。
  • 北师大版《数学》七年级下册要点
  • 北师大版《数学》八年级上册要点
取消回复

说点什么?
Title
看一下效果
在线公式编辑器
或者使用 MathJax

本站已经运行0天 © 2005- 大嘴狗狗. - Typecho & Moricolor - 粤ICP备18101800号 - 粤公网安备44030402005553号