Skip to content

Instantly share code, notes, and snippets.

@LorenRiccie
LorenRiccie / pdf-tools-skim-annotation-workflow.md
Created March 18, 2026 18:58
PDF annotation workflow for academics: pdf-tools (Emacs) + Skim on macOS — consolidate annotations for iOS and Preview compatibility

PDF Annotation Workflow: pdf-tools (Emacs) + Skim on macOS

Context

Academics using Emacs on macOS often need to annotate PDF files (research papers, critical editions, book chapters) and have those annotations survive outside Emacs — on MacOs default reader or iOS readers, or simply when sharing a file with colleagues.

The standard Emacs solution is pdf-tools, which renders PDFs inside Emacs buffers

@LorenRiccie
LorenRiccie / org-cite-overlay-locator-fix.el
Created June 11, 2026 19:39
Fix for org-cite-overlay: locator label dropped when rendering citations with page suffix
#+begin_src emacs-lisp
;;; org-cite-overlay-locator-fix.el --- Fix locator rendering in org-cite-overlay
;; This patch fixes a rendering issue in org-cite-overlay' where citations ;; with locators (e.g. [cite:@dupont2012 p. 45]) are rendered without the ;; page label (e.g. "(Dupont 2012, 45)" instead of "(Dupont 2012, p. 45)"). ;; ;; The issue is in org-cite-overlay--citation-to-citeproc': the suffix is
;; passed as a raw string to citeproc, bypassing CSL formatting. Citeproc
;; never receives a structured locator, so the page label is dropped.
;;
;; This fix extracts the locator label and value from the suffix string,
;; normalizes them to the canonical English labels expected by citeproc,
;; and passes them as proper :label' and :locator' arguments to
;; `citeproc-citation-create', so that the CSL style can render them