Skip to navigation
Logo Penaz's Area

cat /dev/random > penaz

"2DGD_F0TH": The Epub version is available for download!


After weeks worth of work, the EPub version of this book is available for download, along with a small digression on the changes that came with it.

This is a follow-up to a previous post: Check out "2DGD_F0TH": Poll results, analysis and thoughts first.

Hello everyone, long time no see!

Finally, after weeks of (irregular) work, I can consider the "EPub" branch of this book mature enough to be released to the public, with the hope I forgot nothing on the way.

If you want to download the book, you can do it from the following iframe:

I would like to talk about how I solved the problems I found, hoping to help someone who wants to take on a challenge similar to mine.

Embedded PDFs

This solution was technically simple, but everything else was complex: converting the images to SVG was more than enough.

The problems started when my favourite Epub reader (the fantastic KOReader ) refused to show images in the EPub format.

After a while, I started suspecting the problem was lying on the reader, more than the ebook itself, and I switched to the built-in reader used in Calibre which was showing all images without a single issue.

So converting images to SVG solved the issue with the EPub format, and good old Pandoc takes care of converting the images for the PDF release on its own.

Math formulas

This problem was easier to fix than I thought: I found a tool that, used as a Pandoc filter, allows to convert all math formulas to SVG images, automatically bundling them into the document.

Such tool is called GladTeX and boy am I glad it exists (pun intended).

Embedded LaTeX and Dynamic Code listings

This was the toughest part of the whole transition, converting pure LaTeX to something Pandoc could understand.

I spend entire evenings studying the documentation and I wrote 7 Lua filters to allow converting various placeholders and "Divs" in a format that could work both for EPub and PDF, totalling 201 rows of Lua (which for someone like me, who doesn't know the language, it's huge).

Other pieces of LaTeX were deleted and converted to SVG images, some others (multi-column sections) were straight out deleted because they didn't make sense in a "fluid" format like EPub.

What's missing

Not much: the dedication is missing from the front matter, the back cover is missing and the front cover doesn't show the edition. These are all minor things in my book (pun intended, again), in the meantime I think releasing the book and see if everything is readable is far more important.

Conclusions

I'm happy that I won this little big challenge and finally get this result out of the door, now I am (slowly) dedicating myself to adding new content.

Thank you everyone for reading.

Penaz.