Mathpix图片转LaTeX,Word快速插入LaTeX公式教程

发布于:2023-04-27 ⋅ 阅读:(604) ⋅ 点赞:(0)

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>&gt;</mo>
      <mn>112.5</mn>
      <mo stretchy="true" form="postfix">)</mo>
    </mrow>
    <mspace width="1.0em" />
    <mi>&amp;</mi>
    <mi>&amp;</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>&lt;</mo>
      <mn>247.5</mn>
      <mo stretchy="true" form="postfix">)</mo>
    </mrow>
    <mspace width="1.0em" />
    <mi>&amp;</mi>
    <mi>&amp;</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>&lt;</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


网站公告

今日签到

点亮在社区的每一天
去签到