Open Source Hilbert for the Kindle

David Hilbert

David Hilbert

While searching for free Kindle books I found Project Gutenberg. Project Gutenberg offers free Kindle books but they also have something better! Would you believe \LaTeX source code for some mathematical classics.

The best book I’ve found so far is an English translation of David Hilbert’s Foundations of Geometry. Hilbert’s Foundations exposed some flaws in the ancient treatment of Euclidean geometry and recast the subject with modern axioms. Because it is relatively easy to follow, compared to Hilbert’s more recondite publications, this little book exercised disproportionate influence on 20th century mathematics. We still see its style aped, but rarely matched, in mathematics texts today.

I couldn’t resist the temptation of compiling a mathematical classic so I eagerly downloaded the source and ran it through \LaTeX.  Foundations compiled without problems and generated a nice letter-sized PDF. Letter-size is fine but I was looking for free Kindle books! I decided to invest a little energy modifying the source to produce a Kindle version. Project Gutenberg makes it clear that we are free to modify the source. Isn’t open source wonderful!

Converting Foundations was simple. The main \LaTeX file included 52 *.png illustrations with hard-coded widths in \includegraphics commands. I wrote a J script that converted all these fixed widths to relative \textwidth‘s. This lets \LaTeX automatically resize images for arbitrary page geometries. When compiled with Kindle page dimensions this fixed most of the illustrations. I had to tweak a few wragfig‘s to better typeset images surrounded by text. The result is a very readable Kindle oriented PDF version of Hilbert’s book. There are still a few problems. The Table of Contents is a plain tabular that does not wrap well and one table rolls off the right Kindle margin. Neither of these deficiencies seriously impair the readability of the text.  If these defects annoy you download the Project Gutenberg source with my modifications and build your own version.

This little experiment convinced me that providing free classic books, in source code form, is a service to mankind.  Not only does it allow you to “publish” classics on new media it also fundamentally changes your attitude toward books. Hilbert was one of the great mathematical geniuses of the 19th and 20th century. It’s hard to suppress we are not worthy moments and maintain a sharp critical eye when reading his “printed” works.  You don’t get the same vibe when reading raw \LaTeX.  Source code puts you in a, it’s just another bug infested program, frame of mind. You expect errors in code and you typically find them. This is exactly the hard-nosed attitude you need when reading mathematics.

Oh Crap Martin Gardner has Died!

Martin Gardner

Martin Gardner

Last night I heard of Martin Gardner’s death at the age of ninety-five.  When someone lives into their nineties death is not unexpected but in Gardner’s case it still saddens me.  Martin Gardner’s famous Mathematical Games column set a standard for mathematical exposition that has yet to be equaled. He proved, month after month for twenty-five years, that popular writing did not have to dumb things down to misleading trivialities but could, in fact, inspire, thrill and challenge specialists and children alike. There probably isn’t a mathematician, physicist, computer scientist or engineer of my generation that didn’t grow up reading Gardner’s column.

When I was getting ready to teach mathematics as a CUSO volunteer in Ghana I decided to collect all of Martin Gardner’s columns.  During my school years Gardner’s columns served as an antidote to curriculum mathematics. Curriculum mathematics, in many public school systems, is horribly ahistorical. There is no rhyme or reason why certain mathematical topics are covered and others, the vast majority, are ignored.  Gardner’s columns filled in the gaps and resurrected the beauty of even the dullest bits of curriculum mathematics.  As a new mathematics teacher I couldn’t think of a better resource so I wisely photocopied Gardner and ignored textbooks.

In Ghana I lived without TV, radio, recorded music and sometimes newspapers but I didn’t care!  On many nights I slowly read through my big pile of Mathematical Games photocopies.  The effect of reading all the columns was striking.  Taken one at a time Gardner’s entries were always interesting  but when read from start to finish you come away stunned by the level of erudition.  Genius is an abused word.  Our silly media makes everyone a genius for 15 minutes.  In Gardner’s case the word is apt.  I will miss the man.