https://github.com/dalanicolai/djvu3
Raw File
Tip revision: 32e8a8bae9f9a62a512f598fae0af58470ec382f authored by Daniel Nicolai on 16 September 2021, 11:58:48 UTC
Merge pull request #2 from c1-g/main
Tip revision: 32e8a8b
README.org
* djvu3

  This file extends [[https://github.com/emacsmirror/djvu/blob/master/djvu.el][djvu.el]] (and [[https://www.gnu.org/software/emacs/manual/html_node/elisp/SVG-Images.html][svg.el]]) with annotation rendering features and
  a fast occur search feature. The annotation drawing feature is implemented
  using =svg.el=. It is a newer alternative to [[https://github.com/dalanicolai/djvu2.el][djvu2.el]], which uses the external
  =imagemagick= command for rendering annotations.

  The ultimate goal of this package is to get it merged into =djvu.el=. However,
  the code in both =djvu.el= and in this package could use some refactoring.
  Also, the annotation features and interface can be easily extended and made
  more user-friendly. Any feedback or suggestions how to organize/design the
  interface are very welcome.

  =djvu.el= already provides extensive annotation editing features, but without
  rendering features for which it recommends users to use an external
  application (e.g. djview).
  
  The main features that this package implements are:
  - annotation rendering features using =svg.el= and =clickable links=
  - a =marker extension= to =svg.el= for providing =arrowheads= (or other types
    of markers)
  - fast occur search function, similar to that of the [[https://github.com/politza/pdf-tools][pdf-tools]] package.
  - a quite fancy keyboard annotation function (=djvu-keyboard-annot=)
  - an imenu index function to enable imenu navigation
  - document restore function to open the document at the last location of the
    previous session
  - transient for quickly adding metadata (=djvu-edit-metadata=)

** Installation
 Simply load the file =djvu3.el= after =djvu.el= (djvu3.el will
 load =djvu.el= automatically if it is found in the load path)

** Usage
   Instructions for usage are found in the preliminary comments in the djvu.el
   file itself. Keybindings (e.g. for annotations) can be looked up by typing
   =M-x describe-keymap RET djvu-image-mode-map=. Additionally =C-h m= shows mode
   keybindings is active (i.e. when visiting a djvu-file).

   In particular, the package provides the following interactive functions (called
   via =M-x=):
   - =djvu-occur=
   - =djvu-keyboard-annot=
   and support for:
   - =imenu=
   - =djvu-edit-metadata=
   
*** Spacemacs
 This package can very easily be installed via the [[https://github.com/dalanicolai/djvu-layer][djvu-layer]].

** Comments
   - *text annotations*: The font ratio in SVG is fixed. Therefore, the text
     size is determined by fitting the complete comment either horizontally or
     vertically inside the annotation area.

* Keybindings
| Key Binding        | Description                                            |
|--------------------+--------------------------------------------------------|
| ~SPC m h~          | keyboard highlight                                     |
| ~mouse-1-drag~     | highlight                                              |
| ~S-mouse-1-drag~   | text annotation ([[https://github.com/dalanicolai/djvu3#comments][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                                                  |
back to top