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