latex 公式转为 word 公式
真是惨,帮同学改论文,发现因版本不兼容,公式全部转为图片了,需要将公式的图片转为 word 公式:
-
先使用
mathpix
将图片转为 latex。
mathpix
软件下载地址:https://mathpix.com/
mathpix
的使用是ctrl+alt+m
。 -
再将latex 转为 word 公式。
这个可以有两种方式:
-
采用 LaTex2Word-Equation。
可以将latex 公式代码复制到 https://www.mathjax.org/#demo,再转为 word 公式:
-
采用浏览器将 latex 转换为 mathML 代码,然后复制到 word 文档后,粘贴“只保留文本”。。
需要一个本地文件 example.html:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<title>tex texample</title>
</head>
<body>
$$
\mathbf{C}_{i, j}=\left\{\begin{array}{ll}{\left(\mathbf{T}_{i, j}+\mathbf{T}_{M, N}+\mathbf{Q}_{i, j}\right) \bmod F,} & {\text { if } i=1, j=1} \\ {\left(\mathbf{T}_{i, j}+\mathbf{C}_{M, j-1}+\mathbf{Q}_{i, j}\right) \bmod F,} & {\text { if } i=1, j \neq 1} \\ {\left(\mathbf{T}_{i, j}+\mathbf{C}_{i-1, j}+\mathbf{Q}_{i, j}\right) \bmod F,} & {\text { if } i \neq 1}\end{array}\right.
$$
</body>
把需要转换的 latex 代码贴到 $$
中。
用浏览器打开文件:
复制 mathML 代码,到 word 文档粘贴“只保留文本”。