chenyanming / nov-xwidget

The best epub reader in Emacs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nov-xwidget - the best epub reader in Emacs

Introduction

nov-xwidget extends 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

(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))

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.

FunctionFeature
xwidget-webkit-backBack
xwidget-webkit-forwardForward
nov-xwidget-goto-tocGoto table of contents
nov-xwidget-next-documentGoto next document
nov-xwidget-previous-documentGoto previous document
nov-xwidget-find-source-fileGoto the original source file
nov-xwidget-inject-all-filesApply 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!

About

The best epub reader in Emacs


Languages

Language:Emacs Lisp 100.0%