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 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 . *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 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 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 . 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.

Pingback: More on Kindle Oriented LaTeX « Analyze the Data not the Drivel.

Alexandre BorovikDear John (if I may),

I ask your kind permission to republish this your post and another one, “More on Kindle Oriented LaTeX”, in the new Blog run by the London Mathematical Society: The De Morgan Journal, http://education.lms.ac.uk/

Many thanks — Alexandre

John BakerPost authorAlexandre,

Please feel free to re-post my Kindle blog entries. I only ask that you retain a link to this blog.

Thanks.

Vijay LullaJohn,

I’m a new J’er (about 2 months) and I have very little experience with array-based languages (primarily through R). I’m trying to learn how you fixed the includegraphics command in the RescaleHilbertgraphics.ijs file. I’m having trouble with line 23 (uw=. …..) especially the cut part. Can you please point me to some good explanation of cut conjunction, or if it isn’t much hassle, can you please explain how you use it?

Thanks in advance,

Vijay.

John BakerPost authorVijay,

The best source for the J language is the Dictionary of J. The entire book is online at:

http://www.jsoftware.com/docs/help701/index.htm

A description of the cut conjunction with examples is at:

http://www.jsoftware.com/docs/help701/dictionary/d331.htm

If you are just starting out with J I would strongly recommend joining one of the J mail groups. You can learn about these groups on the J wiki, (which is also an excellent source of information about J), at:

http://www.jsoftware.com/jwiki/FrontPage

You will find that the J community is always happy to welcome new users and help them learn the language.