How to make slides from handwritten notes using potrace
I've never been a fan of Beamer, but handwritten slides (overheads) aren't ideal either — they smear, they aren't reproducible, and they look, well, handwritten. So, I've come up with my own process, which can be summarized as follows:
- Handwrite my slides on plain paper with a black marker.
- Scan the slides.
- Use Peter Selinger's potrace program to convert these scans into smooth vector graphics.
- (Optional) Color these new slides using Adobe Illustrator or another vector graphics program.
The first step is to download and install potrace. Thankfully, Peter now has binaries for most operating sytems. You'll want to put potrace somewhere central; I put it in /usr/local/bin.
One minor difficulty with potrace is that it doesn't read many different formats. In my setup, I get pdf scans, but have to convert them to bitmaps before I run potrace. You could do that with ghostscript, for example the command
gs -dNOPAUSE -sDEVICE=bmp16m -r300 -sOutputFile=slides.bmp scan.pdf -c quitNote: Peter informs me that this process is lossy, and recommends a utility called pdfimages, which is included with poppler-utils. OS X installation instructions for poppler-utils are available, yet laziness has prevented me from making the switch.
At this point, if you are lucky enough to have gray-scale input files (I am not; all I get are black and white scans), Peter recommends upscaling your input file with his mkbitmap utility before passing it to potrace.
Once we have a bmp (or pnm, pbm, pgm, ppm) file, we can finally run potrace:
potrace -b pdf -r 300 -t 5 -O 0.4 slides.bmpThe output of potrace will be a gorgeous vector graphics version of slides.bmp called slides.pdf.
Below is my bash script to take care of this all. Of course, you may wish to replace ghostscript with pdfimages, and insert mkbitmap before potrace.
#!/bin/bash gs -dNOPAUSE -sDEVICE=bmp16m -r300 -sOutputFile=$1.bmp $1.pdf -c quit potrace -b pdf -r 300 -t 5 -O 0.4 $1.bmp rm $1.bmp