Skip to content

Emacs minor mode to interleave notes and text books

Notifications You must be signed in to change notification settings

llcc/interleave

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Interleave adapted to org-ref and helm-bibtex

First, You can find a much more comprehensive introduction of this package in interleave. I forked it from the original author rudolfochrist. Thanks rudolfochrist for giving us this great package.

So the package was modified on the top of rudolfochrist/interleave with a different approach, supply of new features and some issue fix. The biggest difference between these two is that you need to setup the PDF path in the original interleave, but no need in current one. The original one gets the PDF path from a INTERLEAVE_PDF property of entry headline which should be configured manually. This one can process the PDF path closely combined with two great packages org-ref and helm-bibtex, which have got them great reputation in the emacs bibtex management community. If you use them frequently, you can now just call interleave to make notes at ease without changing anything. This package ensure to make interleave work with them flawlessly.

Installation

Since it has changed a lot of codes from the original one, and offers another algorithm different from original one, but with same name, I cannot submit it to the MELPA repository. You can simply clone it by:

git clone https://github.com/llcc/interleave

and load it:

(add-to-list 'load-path "Your interleave path")
(require 'interleave)

Usage

If you use org-ref or helm-bibtex, you should have configured your own PDF and notes path. Helm-bibtex supports two kinds of note files: notes file per bibtex entry and multiple entry notes in one single file. This package only considers the multiple notes. If you make notes every single bibtex entry, you should not consider to use it. Of course, it is not hard to bring up this new functionality to compatible with multiple notes file, but it is not on my high priority. If you need this, please report it in the issue.

Start to interleave

After you create a note headline by helm-bibtex, this headline should have already had a property called Custom_ID with the bibtex entry key.

:* Schi(2001): Notes of a bibtex entry
:  :PROPERTIES:
:  :Custom_ID: jaap-2001-fatig
:  :END:

Then start here by (note: you need to put your cursor everywhere in scope of the headline):

M-x interleave

Navigation

You can use n, p, SPC, S-SPC to navigate the PDF, and synchronise PDF page and note by M-., M-p, M-n. Quit by q.

New notes for current PDF page

Press i to new a sub-note for current PDF page. A property named with the combination of entry key and “page”, i.e. jaap-2001-fatig-page, and page number, will be inserted below the parent headline.

:** Notes for page [[file:/jaap-2001-fatig.pdf::54][54]] 
:   :PROPERTIES:
:   :jaap-2001-fatig-page: 54
:   :END:

Changing the page of the PDF will also narrow to the notes for this particular PDF page. If no notes exist for current PDF page, overview of all the pages notes will be shown in the notes buffer.

You may have noticed the link: [[file:/jaap-2001-fatig.pdf::54][54]]. If you have SumatraPDF installed, you can open the PDF in the SumatraPDF by locating the exact page, which can let you to view the PDF comments externally. Of course you can turn it off by:

(setq interleave--pdf-external-link nil)

Customize

You can customize the PDF buffer width by:

(setq interleave--window-split-width 150)

or page property suffix

(setq interleave--page-property-suffix "page-number")

Currently, pdf-tools has not been supported yet, but it is on the table.

Any ideas and suggestion about the package are welcomed and appreciated!

About

Emacs minor mode to interleave notes and text books

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Emacs Lisp 100.0%