reddit / emacs

pdf-tools

cellular--automaton · 2022-06-12 13:28
Hi, I have recently started using `pdf-tools`, and I am loving it so far. The outline and annotation features are so well integrated with the emacs experience. I have managed to use `display-buffer-alist` to move the outline window to hte left and cover a certain ratio of the screen: ``` (customize-set-variable 'display-buffer-alist '(("^\\*outline" display-buffer-in-side-window (side . left) (window-width . 0.35) (inhibit-switch-frame . t)))) ``` However, I can't seem to do the same with the annotations windows as they have dynamic titles. I am trying to understand: 1. how to move the annotation (and the associated contents and editing) windows to the left rather than the right 2. how I can control their widths 3. how I can make the modeline in the windows go away without disturbing the very nice black outline that surrounds them (using `hide-mode-line` does this...) If you have some clues/tips/configurations that might be helpful, please do share!
nonreligious · 2022-06-12 14:35
Not a direct answer to your questions, but [here is a nice setup](https://pragmaticemacs.wordpress.com/2017/11/08/more-pdf-tools-tweaks/) for annotating pdfs in `pdf-tools`. You might also want to look at `org-roam-bibtex` and using `org-noter` in conjuction with `pdf-tools`.
cellular--automaton · 2022-06-12 15:15
Hi, thank you. I am looking at `org-noter` right now. I use `zotero` for citations as they also work in stuff like word or libreoffice, which my collaborators use.
nonreligious · 2022-06-12 16:10
I'd been using Zotero for a long time before finding out about `org-mode` and learning how to use `emacs` beyond it's core purpose as a text editor. My combination of the two isn't as great as it can be, but the `helm-bibtex` interface alone is worth it to be able to browse all the papers I've collected over the years, and then display them with `pdf-tools` . You've probably already encountered this, but if you haven't, `org-ref` is also worth looking into -- there's a lot of stuff there, but I just use it for the citing ability.
cellular--automaton · 2022-06-12 16:54
Thanks again. I didn't know about `org-ref`. I'll check it out! For my own notes and drafts I usually use `org-mode`. However, when I have to write a manuscript, I usually use what the least tech-savvy collaborator is using - usually word + some citaiton software (I have even gone as low as using endnote for one of my projects...). Of course, my personal preference has, for years, been emacs. If you might be interested, here is a shameless plug for my 'distro' for newbies who refuse to turn non-newbies : [emacs-groundup](https://gitlab.com/public-repositories/emacs-groundup) !
whale-sibling · 2022-06-12 17:03
Here's that in proper `use-package` fashion. Keybinding moved to `:bind`, hooks moved to `:hook`, etc. (use-package pdf-tools :mode (("\\.pdf$" . pdf-view-mode)) :custom pdf-annot-activate-created-annotations t pdf-view-resize-factor 1.1 :bind (:map pdf-view-mode-map ;; normal isearch ("C-s" . isearch-forward) ;; custom keys ("h" . pdf-annot-activate-created-annotations) ("t" . pdf-annot-add-text-annotation) ("D" . pdf-annot-delete)) :hook ((pdf-view-mode) . (lambda () (cua-mode 0))) :config (pdf-tools-install) (setq-default pdf-view-display-size 'fit-page))
nonreligious · 2022-06-12 17:29
Thanks for the plug - maybe not for me, as my `config.org` file has almost achieved sentience, but I will keep it in mind if I want to prod someone else into using Emacs.
cellular--automaton · 2022-06-12 18:20
Great. That's more or less the purpose of the distro!
cellular--automaton · 2022-06-12 18:20
Yup, more or less my config. Still no way to move the annotation windows to the right though :(
whale-sibling · 2022-06-12 19:49
Is `display-buffer-overriding-action` non `nil`?