# Tool for converting maths writing to LaTeX

I have a dream. I want my maths writing to magically be made into a .tex file so that I can edit it. I want to write my papers, my exams, my lecture notes, everything, by hand, then wave a magic wand to convert them to something pretty (and editable!).

For example, could I scan in my writing and run some program which will do this for me? Or would I be able to use the Galaxy Note or Surface Pro (both of which come with usable styluses (styli?), and the Note can even read my handwriting!). Or is my dream not going to be realised just yet...

Just to be precise, I want something to do the following: when I write the following (on paper, on a tablet - I don't care!)...

1. Equations: $2+3x-5=6$
2. Blackboard-bold: $\mathbb{R}$ for the reals
3. Maybe \mathcal also works $\mathcal{C}$?
4. Maths on its own line is a must! $$e^{\pi i}=-1$$ And noticing the stuff below!
5. Subscripts and superscripts, sets and other common things. $$S=\{x_i: x_i^2\in\mathbb{Q}\}$$
6. Maybe I am dreaming a bit much with this one, how about rendering the "G" in "$G$ is a group"?
7. Works with align: \begin{align*} 3&=1+2\\ &=2+1\\ &=1+1+1 \end{align*}
8. Matrices: $$\left( \begin{array}{ccc} 1&0&0\\ 0&1&0\\ 0&0&1 \end{array} \right)$$
9. Finally, I want to prove theorems so it'd better recognise what is coming next...

Theorem 1 (A. Theorem). This is a theorem.

Proof. This is a proof. ∎

...then the magic wand will yield a .tex document with the following code (with suitable environments defined etc.)

\begin{enumerate}
\item Equations: $2+3x-5=6$
\item Blackboard-bold: $\mathbb{R}$ for the reals
\item Maybe \mathcal also works $\mathcal{C}$?
\item Maths on its own line is a must!
$e^{\pi i}=-1$
And noticing the stuff below!
\item Subscripts and superscripts, sets and other common things.
$S=\{x_i: x_i^2\in\mathbb{Q}\}$
\item Maybe I am dreaming a bit much with this one, how about rendering the "G" in "$G$ is a group"?
\item Works with align:
\begin{align*}
3&=1+2\\
&=2+1\\
&=1+1+1
\end{align*}
\item Matrices:
$\left( \begin{array}{ccc} 1&0&0\\ 0&1&0\\ 0&0&1 \end{array} \right)$
\item Finally, I want to prove theorems so it'd better recognise what is coming next...
\end{enumerate}

\begin{theorem}[A. Theorem]
This is a theorem.
\end{theorem}

\begin{proof}
This is a proof.
\end{proof}


Note that the following two questions are relevant, but do not answer the above question. They are both rather outdated.

Kindle as a Tool for Mathematicians?

-

## migrated from math.stackexchange.comAug 20 '14 at 14:28

This question came from our site for people studying math at any level and professionals in related fields.

Your dream is called lyx – i.ozturk Aug 20 '14 at 12:43

Note there are some commercial tools as well, e.g., MathJournal available from http://www.xthink.com/products.php or the Math Input Panel for Tablet PCs: http://windows.microsoft.com/en-us/windows7/use-math-input-panel-to-write-and-correct-math-equations

Agree though, that just using LyX http://www.lyx.org on a Tablet PC is quite nice.

-
I will have to look closer, but I do not think that these are all relevant. For example, FFES is simply (unsurprisingly, given the name) a formula entry system, not a LaTeX entry system. Unless I am missing something? – user1729 Aug 20 '14 at 15:46
Use these tools in conjunction w/ LyX --- handwrite into LyX for the bulk of the text, then write up an equation in InftyEditor and paste the LaTeX code in. – WillAdams Aug 26 '14 at 13:48

I think the answer is 'not written yet, probably not coming any time soon'. The nearest I know of is:

http://detexify.kirelabs.org/classify.html

which only does one character at a time. This would be a much bigger problem than OCR, as there are many more possible characters, and much more variety in layout needed. Even if it was done, m guess would be that the output code would be much more complex than if you just typeset the work yourself.

There are, on the other hand, WYSIWYG Latex editors, eg Lyx, which I think will also let you edit the code. I don't use any myself, but some people get on with them.

-
This might be of interest. And there's even a near demo! – DanZimm Aug 20 '14 at 14:00
Nice. That's much better than I expected to find. I suspect it wouldn't save time just yet though. It seemed to change its mind every so often about what character I had written. – Jessica B Aug 20 '14 at 16:55