sarabander / sicp

HTML5/EPUB3 version of SICP
http://sarabander.github.io/sicp/
Other
4.35k stars 600 forks source link

Code isn't highlighted when opened in Books on an iPad #29

Open naorunaoru opened 6 years ago

naorunaoru commented 6 years ago

So I'm desperately looking for an ebook reader that can chew through this book, but as for now only one reader that kinda sorta does it is, unexpectedly, Microsoft Edge. Whodathunkit.

It lags, it does everything very slow, margins are very wide, but nevertheless Edge handles rendering of the text itself pretty much ok.

I got back my old iPad mini 2, tried to open this epub in Books, expecting to see perfect rendering and super smooth operation, but no, the tablet immediately started heating up. Page turns lag for about .5-1 sec and there's no code highlighting.

Here's a comparison photo between Edge and Books.

Can the code highlighting be fixed? Or maybe you can recommend a decent reader which doesn't look like butt and can render all the nice things you put in here. iOS preferred, but UWP apps and even Android are ok, I have a large zoo of different devices.

And maybe the SVG graphs can be generated using white stroke for better legibility on dark background, but that's something I can live with.

danielweck commented 6 years ago

Hello, could you please try the "Readium 2" test apps?

iOS: https://itunes.apple.com/us/app/r2-reader/id1363963230

Android: https://play.google.com/store/apps/details?id=org.readium.r2reader

I am curious to hear how they perform with the SICP EPUB :)

danielweck commented 6 years ago

For what it's worth, you can also load the "exploded" SICP EPUB ( https://github.com/sarabander/sicp-epub/tree/master/exploded ) directly in the Readium cloud/web reader app. The following link contains a bookmark reference that should directly open your screenshot page:

https://readium.firebaseapp.com/?epub=https%3A%2F%2Frawgit.com%2Fsarabander%2Fsicp-epub%2Fmaster%2Fexploded&goto=epubcfi(/6/20!/4/4/214/3:453)

danielweck commented 6 years ago

Otherwise, have you tried GitDen? This app gets pretty good reviews. https://play.google.com/store/apps/details?id=com.gitden.epub.reader.app&hl=en

naorunaoru commented 6 years ago

@danielweck Thank you for your answer!

R2 Reader on iOS works mostly fine — SVG, MathML seem to be working. Code snippets are rendered in monowidth typeface, but with no highlighting. That'll do.

R2 Reader on Android 9 (Pixel 2 XL) has weird pagination issues, when page is stuck inbetween transition. Scroll mode works fine though. Otherwise it renders text just as R2 on iOS. :)

GitDen on Android borks some things: for example, when using dark mode, footnote links have weird opaque background which covers a square of text with a side of about 1 line height. Also even if page background is dark, the page itself has a light border. Code isn't highlighted too.

I guess R2 on iOS is the way to go for now.