arminstraub.com

# Reading mathematical papers on the Nook

Update (2013/07/28): Since compiling the tips below, I have created and released krop, which is a simple graphical tool to crop PDF documents in a way that is optimized for eReaders like the Nook.

Recently, I got myself a Barnes & Noble Nook 1st Edition because it seems perfect for reading while traveling when you (literally, with the current baggage restrictions) can't afford to have several rather voluminous books with you. While hoping that this Nook will lower hurdles for picking up some non-mathematical reading again, another big hope was that I would be able to read mathematical papers (and possibly books) on it so as to spare the rain forest and me.

## The Nook and PDF

By default, the Nook tries to reformat your PDF documents: it tries to break physical lines and to reassemble them in a way that they fit the (tiny if compared to A4) screen (this is called reflowing). While this works quite well for documents that consist of text mostly, it usually becomes quite nasty when the document contains formulas. One can't quite blame the Nook—the problem is that a PDF document mostly consists of a bunch of "put this stuff at this position" commands. So, for instance, once mashed from latex into PDF it is extremely hard to tell that $$\sum_{n=1}^\infty \frac{1}{n^2}$$ is a single formula/object. Indeed the Nook will frequently treat this as text on three lines (the "actual" one plus one for sub- and superscript). Again, the Nook is trying hard but it's a tough job. The most promising way to go back from PDF to semantic markup like latex (so that one can then sensibly reformat lines and other aspects) seems to be via OCR—a mathematically oriented project being the impressively looking InftyReader which would cost you more than four Nooks.

The good news: there is a slightly obscure way to stop the Nook from messing with the PDF at all. If you select the font size to be small then it will display the PDF as it is. However, the bad news is that this usually means you can hardly read more than the headlines because the Nook only shows the full page on its screen. It currently does not allow any zooming and panning.

## How to still read mathematical papers on it

This basically means that reading the PDF of a scientific paper on the Nook seems out of question. And if you only have a PDF it may very well be (at the moment)...

But if you have the latex source of the paper, then a small amount of work can save you! The idea is to modify the source code a little bit so that latex doesn't create an A4 or letter sized document but one which is adapted just for your Nook. In many cases, all you need to do is modify the tex file so that it uses something along the lines of

\documentclass[9pt]{article}
...
\usepackage[paperwidth=90mm,paperheight=109.5mm,margin=2mm]{geometry}
And, voila! You have a PDF file which is perfectly readable on your Nook. (Don't forget to set the font size to small—if you want it bigger or smaller change the 9pt above.)

As an example, I'm attaching the PDF cenbin-nook.pdf which was created using the above method applied to this paper. Note that you could have done this yourself because (as is usual) it's latex source is publicly available on the arXiv.

Of course, this advice applies to other eReaders like Amazon's Kindle as well.

Update: you may want to also experiment with the following additions to the preamble:

\usepackage[kerning=true]{microtype}
\usepackage[T1]{fontenc}
\usepackage[charter]{mathdesign}
\usepackage[normalmargins]{savetrees}
\sloppy
\pagestyle{empty}
For the effects of each I'll just refer you this beautiful post by Kevin Klement from which this is shamelessly taken.

## PDFs in landscape mode

The Nook has no built-in ability to switch from potrait to landscape reading (neither automatically by turning it nor by some command). In fact, if you load a landscape PDF document the Nook will actually shrink it so it can be read with the Nook held upright as usual. In order, to have the document display using the full screen while holding the Nook sideways you can rotate the pages using for instance:

\$ pdftk document.pdf cat 1-endE output nook.pdf

Again, don't forget to set the font size to small. By the way, this is perfect for going through the slides of a presentation on the Nook. Here is an example attached that you can try out on your nook: the file ramanujantau-nook.pdf is the nookified version of this presentation.