文章目录
1 使用Mathpix截图识别公式
首先下载安装Mathpix软件
官网地址:https://mathpix.com
安装完成后设置快捷键,点击Record Shortcut
,然后绑定快捷键。因为我的snipaste软件截图快捷键设置了Alt-X
,为了统一逻辑,这里设置为Ctrl-Alt-X
。
接下来,就可以对公式进行截图啦,截图完成之后,自动弹出识别界面。
检查没有错误之后,点击第一个(适合word)复制latex公式格式(第二个可以直接粘贴进入Typora软件变成公式)。
2 LaTeX转MathML格式
一个在线将LaTeX转成MathML格式的网站
官网传送门:texmath demo
https://johnmacfarlane.net/texmath
把我们刚才复制的LaTeX代码粘贴到这里,然后转换,复制全部MathML代码
3 Word中将MathML转公式
3.1 设置word粘贴选项
首先设置默认粘贴选项,也可以使用Ctrl-Alt-V
快捷键选择,这里设置为仅保留文本。
3.2 设置word公式格式
在插入选项卡上,选择插入公式,然后点击转换栏的设置按钮
在弹出的设置界面中,选择下面这个框
3.3 直接粘贴成公式
在设置好上面选项之后,复制刚才的MathML代码,代码非常长不需要理解,格式如下
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mrow>
<mo stretchy="true" form="prefix">(</mo>
<msubsup>
<mi>α</mi>
<mn>0</mn>
<msup>
<mn>360</mn>
<mo>∘</mo>
</msup>
</msubsup>
<mo>></mo>
<mn>112.5</mn>
<mo stretchy="true" form="postfix">)</mo>
</mrow>
<mspace width="1.0em" />
<mi>&</mi>
<mi>&</mi>
<mspace width="1.0em" />
<mrow>
<mo stretchy="true" form="prefix">(</mo>
<msubsup>
<mi>α</mi>
<mn>0</mn>
<msup>
<mn>360</mn>
<mo>∘</mo>
</msup>
</msubsup>
<mo><</mo>
<mn>247.5</mn>
<mo stretchy="true" form="postfix">)</mo>
</mrow>
<mspace width="1.0em" />
<mi>&</mi>
<mi>&</mi>
<mspace width="1.0em" />
<mrow>
<mo stretchy="true" form="prefix">(</mo>
<msup>
<mrow>
<mo stretchy="true" form="prefix">|</mo>
<msub>
<mi>β</mi>
<mn>0</mn>
</msub>
<mo stretchy="true" form="postfix">|</mo>
</mrow>
<msup>
<mn>180</mn>
<mo>∘</mo>
</msup>
</msup>
<mo><</mo>
<msubsup>
<mi>α</mi>
<mrow>
<mi>c</mi>
<mi>r</mi>
<mi>i</mi>
<mi>t</mi>
</mrow>
<mn>13</mn>
</msubsup>
<mo stretchy="true" form="postfix">)</mo>
</mrow>
</mrow>
</math>
直接Ctrl-V
,直接得到公式,BINGO !
参考文章
公式图片转latex神器Mathpix以及latex公式与word公式的相互转换 - 尹傲雄的小站
https://blog.yinaoxiong.cn/2019/03/20/公式图片转latex神器Mathpix以及latex公式与word公式的相互转换.html
如何将LaTeX公式拷贝到Word中 - Expressing Youself Using Code - CSDN博客
https://blog.csdn.net/bendanban/article/details/52823171