Hacker News new | past | comments | ask | show | jobs | submit login
Convert hand drawn equations to LaTeX (myscript.com)
156 points by ohblahitsme on Jan 13, 2016 | hide | past | favorite | 45 comments



Detexify is another one that's been around for many years (at least 5 at this point) and has saved me hours: http://detexify.kirelabs.org/classify.html


On a somewhat related note, does anyone have any particularly nice ways of writing math-related notes?

Part of me wants to just hand-write them and then maybe scan them, but that's not searchable/indexable, and doesn't lend itself well to version control.

Writing in TeX or LaTeX would make them searchable/indexable, but this seems a little heavyweight for just notes (like answers to exercises). I don't use TeX/LaTeX that often, so I feel like I'd be spending half of my mental energy figuring out how to format things, figuring out how to invoke the tools, what packages to install, etc.

Are there any nice solutions out there for this sort of thing?


Here's a video [1] by a math grad student showing how he uses a Surface Pro with OneNote for his math note taking, annotating papers, and stuff like that.

It can search in handwritten notes, and can convert them to text (including converting handwritten math).

I don't do enough math writing or note taking to justify the cost of a Surface Pro, so don't personally know if it really works as well as it appears to in the video.

[1] https://www.youtube.com/watch?v=C7OROShRVzQ


When I was an undergrad, I would take hand written notes in class, which helped the material sink in better I think. Then I would go home and write the notes up neatly using LyX. This re-enforced the material and let me worry about presentation in the second stage, so I could just worry about getting it on paper in the first stage. It also made me very fluid at writing mathematics in LyX, which has a strong advantage over latex in my opinion in that you can actually see what you are writing out.


Don't kill me, but I actually took notes during math lectures using Word [1]. Since 2007 it has math support which you can either enter from the ribbon with lots of clicks (not recommended) or by typing something that for the most part resembles math in TeX, except that you use parentheses instead of curly braces and there are some smarts built-in that make typing much easier, simply because you're typing less, e.g. x^2y is equivalent to x^{2y} and a/b is equivalent to \frac{a}{b}.

Symbols are for the most part the same as in TeX, e.g. \alpha, etc.

The nicest thing of all that for interactive note-taking (at least for me) is that you see what you're entering. While you're typing you always get to see how it looks. This avoided (again, for me) many situations where I'd leave syntax errors in an equation just to get home and not remember where I'd forgot a closing brace.

The worst thing to enter via the plain-text format are large matrices, though that's no different from TeX, IMHO. In this case using the GUI facilities to enter them can actually be faster.

A (preliminary) description of the format they use can be found in Unicode Technical Note #28 [2], although that's not in all cases still the current implementation.

Fun thing is, there is even a Math Input Panel in Windows which does pretty much the same as that web app: Convert hand-written math into MathML. You can then insert it into various applications (Word works fine, Mathematica too, I think – I guess anything that can handle Presentation MathML on paste or drag/drop). [3]

[1] Sample: http://hypftier.de/files/uni/04/math/Vorlesungsmitschriften....

[2] http://unicode.org/notes/tn28/

[3] Excuse my horrible writing, but I have no pen on this machine: http://hypftier.de/temp/2016-01-13_080128.jpg – Clicking "Insert" while Word is focused, will then yield this: http://hypftier.de/temp/2016-01-13_080219.jpg (it even used the correct d (\dd) which has a small gap in the front and, depending on the font, can be upright)


Again, insert enthusiastic Pandoc evangelism. I write first drafts of technical reports (for work) in Markdown + LaTeX equations (and you already know most of it, it seems) and then render to Word; in parallel, I write LaTeX from classes in the very same way.

Hopefully my research will converge with work duties at some point and I'll be writing a single alpha source for the very technical stuff.


One disadvantage of Word is that future versions may change the math formatting and kill your notes. I have old powerpoint slides that are effectively unusable, for example.


Well, I use (Lua)LaTeX for exactly that kind of thing (for the notes I want to be searchable and archived in a repo; for other stuff just writing by hand on paper is usually the best solution, because I don't actually need that much notes to be stored as nifty .tex / .pdf files -- and for less math-heavy stuff, .md / pandoc toolchain is often enough).

To make LaTeX writing a bit less 'heavyweight', I maintain a .sty file for packages I use often + a template where I can just start writing + vim setup for editing the files + compile with latexmk.

When it comes to syntax and stuff like that, after writing my math B.Sc. thesis and who-knows-how-many homework reports with more or less same combo of packages and tools, I already know it and learning to use LaTeX no longer feels like an obstacle (..it's a cost I've already paid).

Whether a similar solution would be worth the effort for you depends on how much things LaTeX is good at you anticipate writing in the future. Academic papers, homework, stuff like that? Yes, it might be useful. Some random notes? Maybe not.


Quip: I type notes in a Quip document on my laptop and also open the same document on my Android phone. Quip syncs the notes automatically. When I want to note down a math equation, I write it on a piece of paper, take a photo and append it to the Quip doc using the app.

Later, I export the Quip doc to Markdown and make it searchable by adding it to Algolia.


Part of me wants to just hand-write them and then maybe scan them, but that's not searchable/indexable, and doesn't lend itself well to version control.

I'll comment as someone who does hand-write and scan my notes. I date and number every page, then put a pile through a sheet-feeding scanner every so often. Sometimes I put date and page numbers in my code comments, so I can find my notes on where the code came from. I also enter a line of text (or more if necessary) about each scanned page so I can search that. Something I do in a brain-dead moment every month or two. It can be interesting to look back through the notes and see if I've forgotten about anything interesting.

Often I'll write out the math for something multiple times before I really understand it, and using a pen works much better for me. Only a small fraction of what I write out is worth TeXing up.


I handwrite them then type them.

Use Pandoc; it basically abstracts all of the pain of LaTeX and allows you to write Markdown with equations. Writing macros is also useful to save typing cramps and clarify meaning -- a typical example is

    \newcommand{\implies}{\Rightarrow}


Pandoc if you like markdown -- it allows LaTeX math and equations. Emacs org mode if you like emacs and not markdown.

Lately I've just found it easiest to use a text editor that has good keyboard support for entering unicode and just type everything in plain text. Vim's digraphs or Emacs's TeX input method are what I have in mind. It works fine for most personal notes (with a few unevaluated LaTeX macros on occasion) and it's not hard to go back later and convert it into a pandoc markdown document for nicer formatting.


Yep. For notes there is little justification for the full complexity of LaTeX, the most one needs is islands of LaTeX math. And you don't even need TeX installed — html with mathjax/katex is more flexible most of the time (but Pandoc will easily convert to latex/beamer when you need them).

I'm cataloguing math support in markdown tools at https://github.com/cben/mathdown/wiki/math-in-markdown (help welcome). If you don't know where to start, the first to check out are probably StackEdit, Atom + https://discuss.atom.io/t/using-atom-for-academic-writing/19....

I have a theory that a single pane styled in-place is nicer for quick writing than 2 source+preview pane. Typora, Texts.io, and my own https://mathdown.net do that.

If you do want full latex, try Overleaf.com, which has "rich text" mode where many constructs (sections, lists, math) are styled in-place (you could even hide the PDF pane).


I'm developing Writelive

(sample)

http://write-live.com/d/2aa4a21f-7bb0-4e02-929f-484dc8b7af10

(also check my other comment)


LyX is a LaTeX editor which has a very good visual math entry panel.


Libreoffice formula format is simple


It works quite well, but I wish there was a way to make small corrections (e.g. erase parts of my input).

The app keeps mistaking my handwritten "n" for "h", and my "k" for various obscure things like "|x:", and it's a bit of a pain to make small adjustments after most of the equation has been written: https://i.imgur.com/KneVGIU.png


it's n * (n + 1) / 2 :)


Works like a charm on my Surface Pro 3. Incredibly impressed, One note doesn't recognize my handwriting well but this is incredible as a math undegrad !

As many have said, an open-source app would be a godsend.


Awesome! This project reminds me of something I worked on years ago: http://goo.gl/GKOxrg


Very neat. One problem is immediate: when I handwrite an "x" for maths, it is as two 'c's touching back-to-back, so as not to confuse with some multiplication/cross-product symbol; such input proves very confusing to this code.


> so as not to confuse with some multiplication/cross-product symbol

There really isn't much need for the multiplication symbol when we have side-by-side multiplication notation, and if x is a vector then you can underline it to distinguish it from the cross product (or just not name your vectors x). The "two c's" x has always looked bad to me and ends up getting confused with α and other things.


Odd, I've done the same thing now and it has worked flawlessly. Maybe it is learning from the "Perfect / Poor" votes.


I just retried, and it does now gets it right for me too. Wow.


I usually use an italicized x for math variables, a dot for multiplication when not implicit in the formatting of the expression, and an uppercase X for cross product.


I am building an Android (best with stylus) hand writing app...

Drawings can be viewed / shared via web and are updated real-time (online whiteboard)

some samples:

http://write-live.com/d/dba21681-8d3f-4fbe-8b4b-e5c1983df934

http://docs.write-live.com/WriteliveServer/webview.html?d=2b...


From what I can tell, it had a hard time distinguishing matrices from vectors. What I wanted was:

  [ 1 1 ]
  [ 0 1 ]
What I got was

  [ 11 ]
  [ 01 ]


To be fair, most humans would probably have difficulty interpreting that. The problem with a lot of these tools is that they have no idea of context. A human reading your matrix will know why you are writing it out, and probably how it is expected to fit into the larger text, and therefore has a lot of contextual information prompting them towards interpreting your chicken scratch as a matrix, not a vector.

I tried to write the equivalent of \widetilde{u} which it interpreted as u^n. On reflection, what I wrote did look like an n above the u. But if you work in the same field as me, you would immediately assume it was a widetilde.


This would be quite a cool problem to attack using RNN. Perhaps using an attention-following mechanism like the one used for house numbers [1]. It's fairly well-defined. You would need a ton of example data though.

[1] http://arxiv.org/abs/1412.7755


Very impressive. It worked very well for me.


Pretty handy for someone like me who wastes a lot of time trying to get the Latex right in my R markdown docs.


awesome! how does it work? recurrent neural network?


This is actually pretty impressive

Tried it out on a random equation from the Fourier transform wiki page:

http://imgur.com/Ud9FNoA


Nice! I can't wait to try it on my touch screen PC.


Tried it -- it doesn't work on my Linux laptop touch-screen, because hand gestures count only as mouse moves, not drags. Windows might differ.

Update -- it does work on an Android tablet, where hand gestures do count as drags. Very nice -- if only my tablet were twice as big so my fingers wouldn't get in each others' way.

Pretty slick. Now to get it as an open-source app.



Touch works for me in Chromium on Linux, and Chromium on OpenBSD.

Make sure you have touch events working in general. I don't think Firefox supports them yet on X11.


Open source?


Looks like it's closed source with a liberal free plan.

https://dev.myscript.com/pricing/atk/


Good work! Is the code available?


Was Sheldon on the design team?


LaTeX is super cool for mathematics and academic papers. For my book though I had to migrate off to InDesign because it was just much easier/quicker to get it to do what I wanted.


I got pretty good with InDesign during high school, where I took Graphic Communications at our vo-tech. It really is an awesome tool for getting print ready. We used it in conjunction with an actual printing press.

If I had to do it now I would use LaTeX though. For me, open always trumps proprietary when available, and because of their proprietary sort of walled garden nature, Adobe is not a company I would like to support.


Open source is cool and all. But I'm not exaggerating when I say that doing the same thing in LaTeX would take years longer than doing it in InDesign, assuming the output of both is close enough to what I'm trying to achieve. So those years count toward something for me.


I used LaTeX a few times in anger while at the university.

Afterwards in the outside world, Office became the rule as I never needed to type mathematics again.

When we did a technical documentation project, DITA and Docbook were used instead, with WYSISWYG editors like oXygen.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: