关于如何在 Emacs 中工作时注释 PDF 的建议?

发布于 2024-10-14 05:41:17 字数 368 浏览 8 评论 0原文

许多科学论文,尤其是生命科学领域的论文,都以 pdf 格式出版。

我想尽可能在​​ emacs 中工作(尤其是 org 模式)。我知道 DocView 模式至少可以让我在 emacs 中查看 pdf。我怀疑它可以为我做更多的事情,但除了简单地查看 pdf 文件的基于图像的渲染之外,我还没有做更多的事情。

任何人都可以推荐使用 pdf 的方法,尤其是链接到文件、施加文本和向 pdf 添加注释(电子版相当于在页边空白处书写)?

编辑:只是澄清一下,我并不打算实际编辑 pdf 图像。相反,我想要在组织文件中添加超链接或书签注释。我以前没有见过 DocView 的文本模式,这可能会给我我想要的东西,但我不知道是否可以为它添加书签/超链接。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

过度放纵 2024-10-21 05:41:18

IMO,没有一种最佳工作流程可以在 emacs 中管理出版物。我个人只是在组织模式下存储 PDF 的链接,并在外部查看器(evince 或 Acrobat,具体取决于平台)中打开它们。有一些解决方案可以通过在 PDF 的页边空白处逐字书写来注释 PDF(原则上,Xournal、Jarnal 和一些专有的 Windows 软件可以做到这一点),但我从未发现其中任何一个非常有用。当我在论文上做笔记时,我要么将它们存储为组织模式结构中的折叠项目,要么存储为外部文件的链接。

其他人也提出了类似的工作流程 - 例如,请参见此处的一个不错的截屏视频:http://tincman.wordpress.com/2011/01/04/research-paper-management-with-emacs-org-mode-and-reftex/< /a>

对我来说,理想的纸张管理环境是与 Mendeley 接口的 org 模式。不幸的是,Mendeley 的闭源性质使得这种情况不太可能发生。

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.

你爱我像她 2024-10-21 05:41:18

DocView 模式可以在编辑和查看之间切换。但从 doc-view-mode 的信息页面来看,PDF 不是(容易)人类可编辑的,并且文档没有谈论任何有关 PDF 注释功能的内容。

否则,Xournal 或此类工具应该是注释 PDF 的方法,除非您找到一种方法让它在 Emacs 下工作。

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.

紧拥背影 2024-10-21 05:41:18

这并不是真正的答案,但在 pdf-tools 中,可以使用选定的注释附加处理程序函数。只是总得有人去执行而已。

;; 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)

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)
心作怪 2024-10-21 05:41:17

pdf-tools 除其他功能外,还允许在 emacs 中注释 pdf 文件。年轻但有前途的项目!

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

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文