0

I'd just heard about mathpix, a way that can identify formula from images and generate the LaTeX code. I have some handouts (already printed) from my teacher 10 years ago written in Chinese and many math formulas. I don't have the original digital file, but only have those documents on my shelves. I want to turn it into digital files, namely get the Chinese texts and math formula in LaTeX code so that I can reproduce and reprint it. However doing it by hand is a heavy work, so I want to seek some clever way. I think mathpix can help me a lot. But I have two main questions with respect to it:

  • If I have a picture like this, with many inline math: (just a demo, not the actual document I have)enter image description here

    Can I get the result both with the English words and LaTeX inline math? (I mean, get the resulting string "Suppose $A$ is bounded subset of $\Bbb R^n$. If ...") It seems that I need a pure text OCR tool and mathpix work together nicely. How to achieve such task?

  • If I have bunches of images to identify, I guess I need to write some python program with the mathpix API provided in mathpix API. But the sample code given is not work in my python 3 now. I'm not good at python, how to modify it? Or is there other clever way to do? (Maybe I should ask this question in another board, but I think it would be fewer people know LaTeX there.)

3
  • Hi, is this really a matter of LaTeX ? mathpix handles mathematical expressions by default, but text can also be read using some options (see here). Also, if you are not fluent with python, you can apparently use shell commands to call the API but not example of that seems to be shown. In order to test the API you must sign up ... and then you have to pay after 1000 requests.
    – BambOo
    Apr 8, 2018 at 18:11
  • What is your use-case exactly? Do you want to quote/reuse math expressions from existing documents? Edit compiled documents? Create a snippet collection? There may be alternative solutions available depending on what you want to do.
    – Marijn
    Apr 9, 2018 at 13:28
  • @Marijn I have some handouts (already printed) from my teacher 10 years ago written in Chinese and many math formulas. I don't have the original digital file, but only have those documents on my shelves. I want to turn it into digital files, namely get the Chinese texts and math formula in LaTeX code so that I can reproduce and reprint it. However doing it by hand is a heavy work, so I want to seek some clever way. By the way, the picture in my post just an demo, not the exact document I'm going to deal with.
    – Eric
    Apr 9, 2018 at 17:10

1 Answer 1

5

If you only have the hard copy version, you could also try using the Mathpix Android or iOS apps to take a picture of the documents and it will render the LaTeX. You can then export the LaTeX. Try it out and see if that works any better for you!

1
  • 1
    Sounds great. I'll try it!
    – Eric
    May 26, 2018 at 4:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .