I type fast enough that for most things it's not a pain, but I have a few big stacks of old course notes I'd like in LaTeX which I'm dreading having to go through. So, I'm just wondering what the best solution for handwriting -> LaTeX is so far, if any.
[Tex/LaTex] the status of generating LaTeX from handwriting (i.e., OCR)
big-listconversion
Related Solutions
Often, I have the use-case that I want to convert a given data table into a "suitable" LaTeX table.
Typically, my data is of numeric type and requires number formatting, perhaps alignment at a decimal point, and in most cases, it requires elementary post-processing (like quotients, differences, gradients).
Since I needed such stuff very often, I wrote some C++ scripts which generated .tex files. It was useful - but I realized very early that it is insufficient; it is just not flexible enough and -as any external tool- produces unwanted complications due to the many tools involved.
My solution is the LaTeX package pgfplotstable. It is a LaTeX table generator, i.e. it converts input data explicitly by a set of configurable rules into something like \begin{tabular}....\end{tabular}
.
DISCLAIMER NOTE: I wrote the package.
Among its features are
- separation of data + format
- data in form of external data files (CSV with customizable separators) or inline tables (inside of the
.tex
file) - central format definition (for example in the preamble or in form of styles)
- format numbers with the full power of LaTeX
- supports simple text columns as well
- simple support for alternating row colors (
colortbl
) - simple support for standart LaTeX table packages (
booktabs
,longtable
,colortbl
,multirow
,\multicolumn
,...) - can produce completely new columns containing postprocessed data, with the powerful
pgf
math engine - can convert single-column output to two-column output
- is written completely in TeX (no external tools required)
- highly customizable
- has a manual with lots of examples.
You may want to inspect the link mentioned above and its examples to see if it fits your needs.
I don't know whether these are open problems or not, but since you are looking for a capstone project, you might be interested to explore if the basic algorithmic aspects of TeX can be improved.
Line-breaking algorithm. The current line breaking algorithm is a gold standard that all line-breaking software emulate, but is it the best way to break lines? Knuth and Plass's algorithm made specific premature optimization choices (pun intended!) like separating page-break from line break, assigning badness based on the raggedness of line but not accounting for rivers, etc. The only real advance since then has been character protrusion, and from what I understand, it still follows the same basic line-breaking algorithm. Now don't get me wrong. I am not saying that these choices were wrong. But a lot of these choices were made because the computational resources of that time could not really handle anything more sophisticated. But now that we have computers that are 1000 times more powerful than those in the 70s, it should be possible to explore other options to see if the line breaking algorithm can be improved by taking into account more factors, especially page-breaking, footnotes, side-notes, and floats. What is better, perfect line breaks but huge vertical spaces to balance the page, or slightly underfull lines but no vertical spaces? There is no way to play around with these in the current framework (please correct me if I am wrong).
Automatic breaking of display equations. Currently the
breqn
package implements the ideas of Michael J Downes, but AFAIK, the algorithmic aspects are not as well understood as that of line-breaking of text. Is it possible to case line-breaking of display equations as an optimization problem and determine a solution based on penalties and badness?Parsing natural math. There are recurring questions asking if it is possible to automatically translate
<=
to\le
,sin(x/y)
to\sin\left(\frac{x}{y}\right)
, etc. Although it is possible to do so to a varying degree of success with TeX and LuaTeX (e.g., thecalcmath
module in ConTeXt), I haven't seen any work that tries to understand how to parse math without markup. Given how sophisticated the current NLP techniques are, it should be possible to do better than simple heuristics for parsing natural math.
Best Answer
There is none, and if there’ll ever be one it’s probably years, if not decades off. I know people who are currently working on recognizing just the layout of a document, i.e. recognizing that a paper represents a letter, etc.
That works fairly well, but it’s still research level, and going from recognizing the layout to replicating the layout using LaTeX is a big, non-obvious step. And we’re not even talking about text recognition itself.
Just text recognition (i.e. ignoring any layout issue) works fairly well today but only for plain text, not with any formatting.
That said, there’s JMathNotes which recognizes basic formulas and produces LaTeX output. It’s a nice and quite powerful proof of concept.
But it’s important to realize that even though many of the individual building blocks exist, piecing together a working solution is hard.