From d3907c810a91cdcc3f64c02229f50492126a956e Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Tue, 10 May 2022 12:03:40 -0700 Subject: [PATCH] Using PDF Tools instead of Docview Since the docview sometimes borks up, and PDF Tools is much better. --- ha-config.org | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ha-config.org b/ha-config.org index e1b85cf..736761b 100644 --- a/ha-config.org +++ b/ha-config.org @@ -1593,7 +1593,26 @@ Making demonstrations /within/ Emacs with my [[https://github.com/howardabrams/d :straight (:type git :protocol ssh :host github :repo "howardabrams/demo-it") :commands (demo-it-create demo-it-start)) #+END_SRC +** PDF Viewing +Why not [[https://github.com/politza/pdf-tools][view PDF files]] better? To do this, first install the following on a Mac: +#+BEGIN_SRC sh + brew install poppler automake +#+END_SRC +And the equivalent on Linux. Actually, it is better to run [[help:pdf-tools-install][pdf-tools-install]], as it will do the above for the system. +Finally, let’s install the Emacs connection to the =pdfinfo= program: +#+BEGIN_SRC emacs-lisp + (use-package pdf-tools + :mode ("\\.pdf\\'" . pdf-view-mode) + :init + (setq pdf-info-epdfinfo-program "/usr/local/bin/epdfinfo") + :general + (:states 'normal :keymaps 'pdf-view-mode-map + "gp" 'pdf-view-goto-page + ">" 'doc-view-fit-window-to-page)) +#+END_SRC + +Make sure the [[help:pdf-info-check-epdfinfo][pdf-info-check-epdfinfo]] function works. * Technical Artifacts :noexport: Let's provide a name so that the file can be required: