viewing epub in emacs
Table of Contents
Intro
I finally arranged my employer to purchase Mastering Emacs1, which provided it in pdf and epub. PDF2 has long since been my standard thanks to being able to view it nicely on all my devices, but I thought I would give epub a try, too. It’s major feature sounds like both emacs-window text resizing, and page memory so it keeps track of where you’ve read. It turns out that the lauded epub mode has some extra steps with the installation. I use straight use-package3, and here was the invocation.
use-package esxml
An XML package, still on Github. I guess epub, like docx, is heavily xml-based. https://github.com/tali713/esxml
(use-package esxml
:straight (esxml :type git :host nil :repo "https://github.com/tali713/esxml.git"))
use-package nov.el
https://depp.brause.cc/nov.el/ . Known as the best (or only) epub reading package, no longer maintained on github. Straight has an easy syntax for non-github git repositories.
(use-package nov
:after esxml
:straight (nov :type git :host nil :repo "https://depp.brause.cc/nov.el.git"))
Footnotes
1 Purchase as well as sizable excepts are available at https://www.masteringemacs.org/. While most or all of the book is available online for free, I wanted to support the author with a purchase.
2 emacs can handle pdfs out of the box with recent versions, but it has an absolutely excellent (and much faster) pdf-tools mode at https://github.com/politza/pdf-tools.
3 The straight package manager, using the use-package extension, makes package management reproducible and simple. https://github.com/radian-software/straight.el#integration-with-use-package