nov-xwidget icon indicating copy to clipboard operation
nov-xwidget copied to clipboard

The best epub reader in Emacs

#+TITLE: nov-xwidget - the best epub reader in Emacs #+DATE: June 1, 2022 #+SINCE: #+STARTUP: inlineimages nofold

  • Introduction =nov-xwidget= extends [[https://depp.brause.cc/nov.el/][nov.el]] with the built-in xwidget webkit (You have to compile Emacs with xwidget support) and render the epub html/xhtml files with any customized CSS styles or JavaScript scripts.

  • Features

  • Render epub with any CSS or JavaScript scripts, including but not limited to fonts, layout etc.
  • Support dark or light mode
  • For some systems that can not use xwidget, set =nov-xwidget-browser-function= to other browser functions, e.g. =browse-url=.
  • Installation and Configuration #+begin_src org (use-package nov-xwidget :demand t :after nov :config (define-key nov-mode-map (kbd "o") 'nov-xwidget-view) (add-hook 'nov-mode-hook 'nov-xwidget-inject-all-files)) #+end_src

Three options for you to configure:

  • =nov-xwidget-script=
  • =nov-xwidget-style-light=
  • =nov-xwidget-style-dark=
  • Usage Open an epub file in Emacs, then =M-x nov-xwidget-view= to change to xwidget webkit buffer.

| Function | Feature | |------------------------------+-------------------------------------------------------| | =xwidget-webkit-back= | Back | | =xwidget-webkit-forward= | Forward | | =nov-xwidget-goto-toc= | Goto table of contents | | =nov-xwidget-next-document= | Goto next document | | =nov-xwidget-previous-document= | Goto previous document | | =nov-xwidget-find-source-file= | Goto the original source file | | =nov-xwidget-inject-all-files= | Apply styles and scripts to all documents in one epub |

  • Contributions I need your helps on adding more advanced styles or scripts. Add more features and make Emacs as the best epub reader!