A newer djvu3
package is available here. This djvu2
package requires the
external Imagemagick program, while the djvu3
package uses Emacs native svg
rendering capabilities.
Except for dark=mode
, djvu3
provides all features of djvu2. Additionally it
is capable of drawing all kinds of annotation shapes. (Although shapes other
than rectangle must be set in the annotation buffer. See M-x man djvused
for
djvu annotation syntax.)
The original djvu.el is a great package for annotating djvu files, but it only offers basic functionality to show/read djvu files.[fn:its docstring mentions that it relies on djview for that] The djvu.el in this package extends the original djvu.el with the following functions, all heavily inspired by the pdf-tools package:
- smooth scrolling [fn:Has been implemented in the original djvu.el in the meantime]
- show various types of annotations (as shown in the demo below)
- simple (not asynchronous as in pdf-tools, but still fast) djvu occur function
(
djvu-occur
) - show color inverted document, i.e. somewhat equivalent to pdf-tools its
midnight-minor-mode (
djvu-invert
)
All extended functionality is implemented in a very basic straightforward way and most of the code can be much improved/better integrated (you are welcome to ;), but everything works very fine.
WARNING!! You should use C-x C-s
for saving annotations (before you close/save a
file). Do not rely on the usual way to save files, you can easily end up with
some invalid file.
Install with quelpa using the follow lines
(quelpa '(djvu :fetcher git :url "git@github.com:dalanicolai/djvu2.el.git"))
(require 'djvu)
For Spacemacs there is a djvu layer available.
Instructions for usage are found in the preliminary comments in the djvu.el
file itself. Keybindings can be looked up by typing C-h m
when djvu-read-mode
is active (i.e. when visiting a djvu-file).
The annotations are somewhat customizable. It is quite straightforward to extend the functionality with Emacs lisp.