fuxialexander / org-pdftools

A custom org link type for pdf-tools
GNU General Public License v3.0
335 stars 36 forks source link

Help with setting this up #2

Closed nbk9 closed 5 years ago

nbk9 commented 5 years ago

Thanks for this very useful package. I have a question. I am also using pdf-tools with org-ref (+ helm-bibtex). There are many ways to create "notes" for a pdf, using helm-bibtex or with org-ref or with org-noter. But the headers are differently created. Can you explain your workflow and what are the required changes in the doom private configs?

For example, in the documentation, the path to pdfs is set like this (use-package org-pdftools :config (setq org-pdftools-root-dir /path/you/store/pdfs)). But I have pdfs stored in hierarchical sub-directories (by journal and authors). What would be the way to work around this?

fuxialexander commented 5 years ago
  1. What are you referring to by "header"? This package only takes care of pdftools link creation and opening. PDF notes are not in the scope of this package. Regarding the config in doom-emacs, that's still a WIP. Will update you when it's ready. The notes function of helm-bibtex, org-ref and org-noter serve the same purpose and is actually redundant. I will probably use org-noter exclusively later in my workflow as it provides more advanced features.
  2. Simply set org-pdftools-root-dir to the common parent folder of all your PDFs. This is just for the ease of sync directory between different devices, which may have different HOME path.
nbk9 commented 5 years ago

Thanks for the clarification. I asked this question here in this org-pdftools repo, yes I realise I should have asked it on your fork of org-noter. My question was more about how you make org-noter, org-pdftools, pdftools, and org-ref play nicely. By header I meant the org-mode #+ headers which specify title, author, and export parameters etc. org-ref and helm-bibtex do it a bit differently. Basically I wanted to know your workflow: 1) which function you call to create a note 2) After exporting the skeleton, when you add more annotations in the pdf using other app (like skim or okular) how do you update the corresponding org-note?(do you re-export the skeleton) 3) Your fork of org-noter allows placing annotations in exact location in pdf, but the annotation which is created in the pdf just holds the position, and the note content for that annotation has to be added separately using pdftools. On the org-notes side, the Note: entry becomes the heading for that annotation in the skeleton and again the content of the note has to be added separately. Am I missing something? Please do share your configs when you feel they are ready. Thanks!

I am closing this now.

fuxialexander commented 5 years ago

@nbk9

  1. Start an org-noter session in the PDF buffer and call org-noter-insert-note, read org-noter manual here: https://github.com/weirdNox/org-noter Later, in doom-emacs +ref flag, I will unify the helm/ivy-bibtex and org-ref edit notes function to make them open the same org files with org-noter.
  2. I'm not using skim/okular to add notes. I only use emacs (either pdf-tools with org-noter or functions in skim.el with org-capture) to add notes. The notes are added to an org file, and if when adding notes some text is highlighted or some existing annotation is selected in the PDF, they will be marked-up (if not already), and the location of that highlights (or other annotations) will be stored in the corresponding org-entry. And then I write things I want to note under the heading. If you have extra sentences in the PDF that you'd like to link to when editing the notes, and you don't want to create another org heading, you can select the text in the PDF and call org-store-link, and then in the org buffer call org-insert-link. That way the text will be underlined and a org-pdftools link will be insert to the org buffer.
  3. Later I will come up with a function that copies the org subtree to its corresponding PDF annotation. But for now, the main annotation reading/editing is done in emacs with org-noter. So yes, you need to write in org files rather than the PDF viewers. I personally think the text-editing experience in emacs is better, with all those bells and whistles.
  4. Regarding the header inconsistency you mentioned, I'll see whether I can come up with a solution in the doom-emacs +ref flag. Probably I'll just advice those notes editing functions to the same one.
  5. Currently the skim workflow and org-noter workflow are not compatible with each other, which means they use different links format to denote the location of annotations. I'm looking into unify them in the new +noter flag in doom-emacs pdf module.
nbk9 commented 5 years ago

Thanks again for the detailed reply!