The Mathpix Snip tool is quite impressive. I recommend you check it out! It could save you a lot of effort in trying to write $\rm\LaTeX$ code.

Here is an example at work. Original image:

enter image description here

First crack at the $\rm\LaTeX$ code generated by Mathpix Snip:

\(\begin{aligned} P(Y>1.5 | Y>1) &=\frac{P(Y>1.5 \cap Y>1)}{P(Y>1)} \\ &=\frac{P(Y>1.5)}{P(Y>1)} \\ &=\frac{1-P(Y \leq 1.5))}{1-P(Y \leq 1)} \\ &=\frac{1-F(1.5)}{1-F(1.5)} \\ &=\frac{0.125}{0.5} \\ &=0.25 \end{aligned}\)

which displays as

(\begin{aligned} P(Y>1.5 | Y>1) &=\frac{P(Y>1.5 \cap Y>1)}{P(Y>1)} \\ &=\frac{P(Y>1.5)}{P(Y>1)} \\ &=\frac{1-P(Y \leq 1.5))}{1-P(Y \leq 1)} \\ &=\frac{1-F(1.5)}{1-F(1.5)} \\ &=\frac{0.125}{0.5} \\ &=0.25 \end{aligned})

So the only catch here is that MathJax doesn't behave quite the same as regular $\rm\LaTeX$ in, say, TeXstudio. That is a setting you can change, though.

  • 1
    $\begingroup$ Detexify probably my way or TeX stackexchange search. $\endgroup$
    – user645636
    Jan 3, 2020 at 18:34
  • 1
    $\begingroup$ Does detexify do whole equations? Even multiline? The Mathpix Snip does. $\endgroup$ Jan 3, 2020 at 18:35
  • $\begingroup$ No, but if I want code that works, I test in in VerbTeX, or I make it myself as there's about 20 ways to do the same thing. $\endgroup$
    – user645636
    Jan 3, 2020 at 18:39
  • 1
    $\begingroup$ I have added (mathjax) tag - which seems like a reasonable tag for this question. Perhaps also (images) would be suitable? (As I wasn't entirely sure, I'll leave the decision whether to add this tag to others.) $\endgroup$ Jan 3, 2020 at 20:36
  • 1
    $\begingroup$ @MartinSleziak: Agree with images tag. Edited. $\endgroup$ Jan 3, 2020 at 20:47
  • 1
    $\begingroup$ I don't see a question in this "question". And maybe it's just me, but I don't see what it has to do with math.stackexchange. $\endgroup$ Jan 4, 2020 at 3:55
  • 1
    $\begingroup$ Related: Extraction of Math -expressions with OCR from scanned photos? $\endgroup$ Jan 4, 2020 at 5:45
  • 3
    $\begingroup$ @GerryMyerson In my opinion, it is a bit related to Mathematics in this sense: Some users post their questions (on answers) as images. Often other users retype their questions. If there are tools which can make it easier to convert something from image to text (be it regular text or - in this case - formulas), they might be useful. $\endgroup$ Jan 4, 2020 at 5:49
  • 2
    $\begingroup$ @Martin, thanks. I'd encourage OP to edit something like what Martin has written into the body of the question (preferably before it gets closed as off-topic). $\endgroup$ Jan 4, 2020 at 15:33
  • 1
    $\begingroup$ For the record, I voted to close this question. I wouldn't vote to delete it, because it contains useful information that should be retained in some form. Still, as there is no question there is no sense in having people be able to answer it. $\endgroup$
    – user694818
    Jan 4, 2020 at 16:42
  • $\begingroup$ And I don't really care if it is closed. It's more of an announcement them anything else, but the SE format isn't well-suited to that sort of thing. $\endgroup$ Jan 4, 2020 at 20:30
  • 1
    $\begingroup$ The link in this post went from one with a referral code to a link to the image in the post. Can you post a neutral link so there is no concern about using meta to get some referral benefit? $\endgroup$
    – Mark S.
    Jan 5, 2020 at 0:29
  • 1
    $\begingroup$ In another discussion related to topic of images in MSE posts, Jeff Atwood gave a recommendation of a tool which could be used for getting text from a picture: How can I post some of the pages from google books preview? (Of course, that's completely different from getting math formulas.) $\endgroup$ Jan 5, 2020 at 5:54
  • 1
    $\begingroup$ I will mention this recent question: What tools can be used to extract MathJax/LaTeX from scanned input? (Since this one was closed, I have posted something which is closer to question than to an announcement.) $\endgroup$ Jan 27, 2020 at 15:17


Browse other questions tagged .