autotelicum / Smooth-CoffeeScript

A book on functional programming in CoffeeScript
http://autotelicum.github.com/Smooth-CoffeeScript/
576 stars 69 forks source link

EBook version #6

Closed nagisa closed 13 years ago

nagisa commented 13 years ago

You should make e-Book version. Most e-books now days can read PDF's, but most of the time page is too big, so rendered text is way too small for actual reading.

So suggestion: make version with either bigger font size or smaller page.

autotelicum commented 13 years ago

Is this readable on your device? I spotted a few formatting issues, but generally by making it B6 landscape most of the formatting should stay intact.

http://autotelicum.github.com/Smooth-CoffeeScript/Smooth-CoffeeScript-Tiny-Page-Experiment.pdf

I can read this format on my iPod Touch thanks to its Retina 3.5" display - actually I can read the original size on it in landscape. But I can not say what might work better on lower resolution devices, so let me know.

nagisa commented 13 years ago

I made some Kindle screenshots (sorry for horrible quality):

Original looks pretty much OK, just fonts are somewhat small (looks like 6-7pt). It's readable, but not very comfortable. Experimental tiny version's fonts are better, however page occupies only half of screen, it is annoying. Of course you can rotate document in Kindle, but reading in landscape is pretty much uncomfortable too.

Personally I think, that increasing font size by 2-3pt(3-5px) would solve this issue.

autotelicum commented 13 years ago

Thanks for the screenshots. I have never seen a Kindle in real life. I can see what you are saying, the experiment with a small page size is no improvement, I will remove it.

Just increasing the font size is not as easy as it sounds.

When increasing the font size what happens is that the code sections overrun the margins and the side of the page. Code in CoffeeScript can not be word-wrapped because it is indentation/white space sensitive. Possibly the margins could then be reduced and a new balance between font size and text layout could be found.

LyX (and the underlying latex) is not like Word, it uses document classes. The one I use 'scrbook' implements three font sizes: 10, 11, 12pt. I already use 12pt. So I can not directly increase the font size further. A different document class might implement larger font sizes, it would have to implement all the same paragraph environments. The ones I have tried have given me spurious errors.


So another possibility would be to export in HTML / ePub formats. But that is also not as easy as it sounds.

Let me document my trials and tribulations here, if someone else should decide to try doing this:

And even if any of these conversion programs worked, there would still be a lot of manual work, because HTML and ePub are reflow formats. The code sections will need to be manually handled because of CoffeeScript's whitespace awareness, that means the code blocks have to be scaled, it is very confusing to use word wrapping in a code section. There is also a lot of inline code in a fixed width font where line breaks and hyphenation marks has to be avoided, because they would be confusing - does it mean a minus there or what?


Maybe someone else read this and decide to give it a try. Installing LyX is easy with prebuilt binaries at http://lyx.org. TeX is not difficult to install but it is huge (something like 1.5 Gb). I use the much smaller basicTeX, but supplemented with a lot of classes from TeX Live.


On iOS I simply double-click or pinch-to-zoom on the touchscreen and the margins are gone with the text enlarged. I guess there is no way to make a Kindle display the text without margins?

nagisa commented 13 years ago

You can view page at 100%, then there's no margins, but you have to move around page as it is bigger than screen. That's pretty much impossible due to EInk Screen nature.

And I'm done reading your book, and fonts aren't as small as they looked from first look. And it seems to be pain in * to make more e-book friendly version, so I guess this issue can be closed.