TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm more or less in the process of converting old (let's say from the 70's) paper documents into their modern LaTeX version. What I am doing is as follows:

  1. write the whole Latex source from scratch (very long and inefficient)
  2. scan the document, use an OCR tool and translate the subsequent txt file into a tex file

I'm also thinking of using voice recognition software to go a bit faster. Are some of you in the same situation and what would be your advices to accelerate the whole process? The final goal is to share the PDF documents and related LaTeX source on an open archive and give revival to these "about to die" interesting documents.

Edit 1: work has also to be done on figures and diagrams. As far as I know, it is almost impossible to automate this task. So, I'm currently redrawing everything with either Inkscape, TikZ or pstricks.

Edit 2: Tesseract-ocr is willing to help but it is not high priority. Anyway, it looks like Tesseract can be trained.

share|improve this question
What type of documents are these? Lots of tips on this type of work can be found at gutenberg.org. Unfortunately some manual LaTeX work is inevitable. The positive aspect will be that they will be machine readable 50 years from now. Consider also outsourcing spelling corrections to Mechanical Turks at Amazon. – Yiannis Lazarides Apr 11 '11 at 15:25
@Yiannis they are mostly old and nicely done lecture notes that are worth sharing. I'm also adding a comment on figures. – pluton Apr 11 '11 at 15:31
I feel your pain:) – Yiannis Lazarides Apr 11 '11 at 16:06
@Yiannis thanks:) – pluton Apr 11 '11 at 16:15
You might also want to consider the path OCR -> text -> RST -> LaTeX, if the structure of the document makes this easier. – Brent.Longborough Apr 11 '11 at 16:58
up vote 3 down vote accepted

I have the following workflow:

  1. Scan pages into series of tiff images.
  2. Process them with Scan Tailor for fix orientation, split pages and to get b/w images
  3. Join resulting images to multi page tiff with the tiffcp command from libtiff

Then I use finereader, because result have to be in the RTF format.

But, open source OCR engines like Cuneiformor Tessseract have recently good results and they can export text in HOCR format. HOCR is in fact HTML with information about paragraphs, page and line breaks and other elements of the page. It should be possible to write some script for conversion from this format to LaTeX.

Illustrations are another problem, you can vectorize them with potrace or autotrace. You can use potrace from inkscape. Results are good for illustrations, but I don't know if they are usable for diagrams or graphs.

share|improve this answer
@michal.h21 Readiris for recognition, also makes fine job (text + pictures), but unfortunately it's not an Open Source soft. – filokalos Apr 11 '11 at 18:09
@filokalos Main problem is, if it can export text in some format which can be converted to LaTeX. For example, finereader can export to HTML, but the code is ugly and it would be complicated to convert it to LaTeX – michal.h21 Apr 11 '11 at 18:34
@michal.h21 Could you give me some scanned document as an example (kazhanchik(at)yandex.ru)? I will try and will send you the results. – filokalos Apr 11 '11 at 18:58
filokalos ok, I have sent some pages to your mail – michal.h21 Apr 11 '11 at 19:10
@michal.h21 Check your e-mail. I've sent it. It was recognized in absolutely automatic mode. – filokalos Apr 11 '11 at 19:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.