Skip to content

dalanicolai/djvu2.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

djvu2.el

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

Read and annotate djvu with Emacs

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

Install with quelpa using the follow lines

(quelpa '(djvu :fetcher git :url "git@github.com:dalanicolai/djvu2.el.git"))
(require 'djvu)

Spacemacs

For Spacemacs there is a djvu layer available.

Usage

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

Demo

annots-demo.gif

The annotations are somewhat customizable. It is quite straightforward to extend the functionality with Emacs lisp.

About

Read and annotate djvu with Emacs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published