/interleave

Emacs minor mode to interleave notes and text books

Primary LanguageEmacs Lisp

http://melpa.org/packages/interleave-badge.svg https://travis-ci.org/rudolfochrist/interleave.svg?branch=master

IMPORTANT

This package is not maintained anymore. User should go and checkout weirdNox/org-noter as an alternative.

Interleaved Textbooks?

Some history, what this is all about…

In the past, textbooks were sometimes published as interleaved editions. That meant, each page was followed by a blank page and ambitious students/scholars had the ability to take their notes directly in their copy of the textbook. Newton and Kant were prominent representatives of this technique [fn:blumbach].

Nowadays textbooks (or lecture material) come in PDF format. Although almost every PDF Reader has the ability to add some notes to the PDF itself, it is not as powerful as it could be. This is what this Emacs minor mode tries to accomplish. It presents your PDF side by side to an Org Mode buffer with you notes. Narrowing down to just those passages that are relevant to this particular page in the document viewer.

In a later step it should be possible to create truly interleaved PDFs of your notes.

Installation

Add MELPA to your package archives in your init file

(package-initialize)
(add-to-list 'package-archives
             '("melpa" . "http://melpa.org/packages/") t)

Then install interleave-mode with

M-x package-install RET interleave RET

Usage

Create a Org file that will keep your notes. In the Org header section (#+TITLE, #+AUTHOR, etc.) add

#+INTERLEAVE_PDF: /the/path/to/pdf.pdf

Then you can start interleave by typing

M-x interleave-mode

This will display the PDF side by side to the org buffer for your notes. You can navigate the PDF as usual with n and p. Changing the page of the PDF will also narrow to the notes that are meant for this particular PDF page.

The split direction is determined by the customizable variable interleave-split-direction. When interleave-mode is invoked with a prefix argument the inverse split direction is used e.g. if interleave-split-direction is set to vertical the buffer is split horizontally.

If you want to add some notes to the current page you can type i. This will create a new headline for your notes. If some notes are already present, i will switch over to the other buffer.

Typing q in the DocView will quit interleave-mode.

To customize Interleave you can use the customization interface with

M-x customize-group RET interleave 

Multi-PDF Notes

Normally the notes/PDF relation is bidirectional. This means for every PDF there is one notes file. But it is also possible to keep a single notes file for multiple PDFs.

To keep a multi-PDF notes file create a headline for each PDF and set the INTERLEAVE_PDF property on it.

* Notes for CS103
  :PROPERTIES:
  :INTERLEAVE_PDF: cs103.pdf
  :END:

To use interleave-mode on this headline, simply place your point onto the headline an type

M-x interleave-mode RET

to start interleave-mode for this subtree.

Notice that you have to decide. It is not possible to keep multi-PDF and normal notes in the same file.

Idiosyncrasies

Interleave does some automated buffer switching for you, especially at start up. This may affect some hooks (see Issue #40). This means that even when you start interleave-mode in an Org buffer the hooks may be run in the newly established DocView=/=PdfView buffer.

Interleave provides the variables interleave-org-buffer and interleave-pdf-buffer to access either the Org buffer (the buffer with your notes) or the PDF buffer respectively. Please specify the buffer you’d like to use explicitly, like this:

(defun my-interleave-hook ()
  (with-current-buffer interleave-org-buffer
    ;; Do something meaningful here
    (message "Hi there. I'm in the org buffer!")))

(add-hook 'interleave-mode-hook #'my-interleave-hook)

Key-bindings

KeyDescriptionAvailability
nGo to next pagePDF Buffer
pGo to previous pagePDF Buffer
SPCScroll upPDF Buffer
S-SPCScroll downPDF Buffer
DELScroll downPDF Buffer
iInsert new notes/go to notesPDF Buffer
qQuit interleave-modePDF Buffer
M-.Go to page of currently visible notesPDF and Org Buffer
M-pGo to the page of the previous set of notesPDF and Org Buffer
M-nGo to the page of the next set of notesPDF and Org Buffer

Footnotes

[fn:blumbach] For some more information see: http://takingnotenow.blogspot.de/2008/07/note-keeping-in-1786-blumenbachs-system.html