Recommendations for how to annotate PDFs while working within Emacs?
Asked Answered
X

4

12

Many scientific papers, especially in the life sciences, are published in pdf format.

I want to work as much as possible within emacs (org-mode especially). I am aware of DocView mode which at least lets me view pdfs within emacs. I suspect it can do more for me but I haven't gotten beyond simply viewing the image based rendering of a pdf file.

Can anyone recommend ways of working with pdfs, most especially linking to files, exerting text and adding annotations to pdfs (the electronic equivalent of writing in the margins)?

Edit: Just to clarify I am not looking to actually edit the pdf image. Rather I want hyperlinked or bookmarked annotations in an org-file. I hadn't seen the text mode of DocView before, that might give me what I want but I don't know if I can bookmark/hyperlink to it.

Xerosis answered 24/1, 2011 at 22:57 Comment(0)
Y
8

IMO, there's no one optimal workflow for managing publications in emacs. I personally simply store links to PDFs in org mode and have them open in the external viewer (evince or Acrobat, depending on the platform). There are solutions to annotate PDFs by literally writing in the margins of the PDF (in principle, Xournal, Jarnal, and some proprietary Windows software can do it), but I never found any of them very usable. When I take notes on the papers, I either store them as folded items within the org-mode structure, or as links to external files.

Other people have come up with similar workflows -- see for instance, a nice screencast here: http://tincman.wordpress.com/2011/01/04/research-paper-management-with-emacs-org-mode-and-reftex/

For me, an ideal paper-management environment would be org-mode interfaced to Mendeley. Unfortunately, the closed-source nature of Mendeley makes this rather improbable.

Yearling answered 27/1, 2011 at 0:5 Comment(1)
I second Xournal - looks good, and allows you to hand-annotate PDF docs if you're using LINUX on a tablet computer.Dragging
P
19

The pdf-tools, among other things, allow to annotate pdf files in emacs. Young but promising project!

https://github.com/politza/pdf-tools

Photoreconnaissance answered 26/3, 2015 at 8:55 Comment(3)
I'd like to know why this answer was downvoted. Is there any drawback to pdf-tools ?Apotropaic
I just installed pdf-tools and gave it a try on linux - worked as advertised. Was able to quickly view a pdf, make an annotation and save it.Bactericide
A couple of years after this answer, I have to say that pdf-tools is the best way to go for managing annotations. Emacs can summarize all annotations for you. And if that's not good enough for your liking, check out interleave-mode to make notes directly in an org file.Panic
Y
8

IMO, there's no one optimal workflow for managing publications in emacs. I personally simply store links to PDFs in org mode and have them open in the external viewer (evince or Acrobat, depending on the platform). There are solutions to annotate PDFs by literally writing in the margins of the PDF (in principle, Xournal, Jarnal, and some proprietary Windows software can do it), but I never found any of them very usable. When I take notes on the papers, I either store them as folded items within the org-mode structure, or as links to external files.

Other people have come up with similar workflows -- see for instance, a nice screencast here: http://tincman.wordpress.com/2011/01/04/research-paper-management-with-emacs-org-mode-and-reftex/

For me, an ideal paper-management environment would be org-mode interfaced to Mendeley. Unfortunately, the closed-source nature of Mendeley makes this rather improbable.

Yearling answered 27/1, 2011 at 0:5 Comment(1)
I second Xournal - looks good, and allows you to hand-annotate PDF docs if you're using LINUX on a tablet computer.Dragging
A
4

DocView mode can toggle between editing and viewing. But from the info pages of doc-view-mode, PDF is not (readily) human editable and the docs don't talk anything about PDF annotating capabilities.

Otherwise, Xournal or such tools should be the way to annotate PDF unless you find a way to get it working under Emacs.

Alenaalene answered 24/1, 2011 at 23:27 Comment(0)
G
0

This is not really an answer, but in pdf-tools it's possible to attach handler functions with selected annotations. It's just that someone has to implement it.

;; Toy Example for custom annotations.

(require 'pdf-annot)

(add-hook 'pdf-annot-activate-handler-functions 'pdf-org-annotation-handler)
(add-hook 'pdf-annot-print-annotation-functions 'pdf-org-print-annotation)

(setq pdf-annot-activate-created-annotations t)

(defvar pdf-org-annot-label-guid "www.orgmode.org/annotation"
  "Unique annotation label used for org-annot annotations.")

(defun pdf-org-add-annotation (pos)
  (interactive
   (list (pdf-util-read-image-position "Click ...")))
  (pdf-util-assert-pdf-buffer)
  (pdf-annot-add-text-annotation
   pos
   "Circle"
   `((color . "orange")
     (label . ,pdf-org-annot-label-guid))))

(defun pdf-org-annotation-handler (a)
  (when (equal (pdf-annot-get a 'label)
               pdf-org-annot-label-guid)
    (pop-to-buffer (get-buffer-create
                    (format "%s-annotations.org"
                            (pdf-annot-get-buffer a))))
    ;; Do SOMETHING.
    t))

(defun pdf-org-print-annotation (a)
  (when (equal (pdf-annot-get a 'label)
               pdf-org-annot-label-guid)
    "Org annotation, click to do SOMETHING"))

(provide 'pdf-org)
Geodesy answered 6/4, 2015 at 22:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.