spacemacs/layers/+readers/djvu
Daniel Nicolai 5ce60dfdf7
Add djvu layer
Update layers/+readers/djvu/packages.el

Co-authored-by: Lucius Hu <1222865+lebensterben@users.noreply.github.com>

Update layers/+readers/djvu/config.el
2021-09-11 21:28:34 +02:00
..
img Add djvu layer 2021-09-11 21:28:34 +02:00
config.el Add djvu layer 2021-09-11 21:28:34 +02:00
funcs.el Add djvu layer 2021-09-11 21:28:34 +02:00
layers.el Add djvu layer 2021-09-11 21:28:34 +02:00
packages.el Add djvu layer 2021-09-11 21:28:34 +02:00
README.org Add djvu layer 2021-09-11 21:28:34 +02:00

djvu layer

/TakeV/spacemacs/media/commit/5ce60dfdf76331c1600cf7a6710467e739c437b7/layers/+readers/djvu/img/djvu-logo.svg
source: https://commons.wikimedia.org/wiki/File:DjVu-logo.svg

Description

This layer adds support for reading djvu files with spacemacs.

Because of some difficulties, the layer does not lazy load the djvu.el and djvu3.el packages.

Features:

This layer provides a full featured djvu editor by implementing the djvu.el package along with the djvu3 extension (a newer alternative to djvu2.el).

  • flexible annotation editing and rendering, covering most (but not all) of djvused annotation definitions
  • fast navigation with imenu
  • fast search with djvu-occur
  • remember last view with djvu-restore
  • dark mode

Install

Prerequisites

The djvu package requires the djvused command (from djvulibre) to be available in exec-path.

Additionally, for dark-mode availability of the command pnminvert (from netpbm) is required.

Dotfile

After installing the dependencies, add this to your ~/.spacemacs.

(setq-default dotspacemacs-configuration-layers '(djvu))

After that, syncronize your configuration with SPC f e R.

Key bindings

djvu-read-mode

Key Binding Description
i djvu-image-toggle
j scroll up
k scroll down
J next page
K previous page
g goto page
d djvu-toggle-invert (dark-mode)
c djvu-toggle-semi-continuous-scrolling (works only when image larger than window)
+/- zoom-in/out
, s djvu-occur
/ djvu fast search
n djvu search continue
SPC j i imenu navigation
o outline

Annotations

SPC m h keyboard highlight
mouse-1-drag highlight
S-mouse-1-drag text annotation (comment)
C-mouse-1-drag text pushpin (rendering pushpin not, yet, implemented)
mouse-2-drag line
S-mouse-2-drag horizontal line
C-mouse-2-drag vertical line
C-S-mouse-2-drag arrow

djvu-image-minor-mode

s save-image

djvu-occur-mode

C-j next entry and follow
C-k prevoius entry and follow