Improve "Reading PDF files" section

This commit is contained in:
Gerard Vermeulen 2024-04-17 10:25:27 +02:00
parent d3f50dde54
commit 1ccd44ba3e

View File

@ -2032,8 +2032,9 @@ files produced with LaTeX to the original LaTeX sources. In order to use
[[https://github.com/vedang/pdf-tools][pdf-tools]], you have to type {{{kbd(M-x pdf-tools-install)}}} after installation [[https://github.com/vedang/pdf-tools][pdf-tools]], you have to type {{{kbd(M-x pdf-tools-install)}}} after installation
of [[https://github.com/vedang/pdf-tools][pdf-tools]] from [[https://melpa.org/][MELPA]] or after each update of [[https://github.com/freedesktop/poppler][poppler]] to build or rebuild the of [[https://github.com/vedang/pdf-tools][pdf-tools]] from [[https://melpa.org/][MELPA]] or after each update of [[https://github.com/freedesktop/poppler][poppler]] to build or rebuild the
=epdfinfo= executable that serves the [[https://en.wikipedia.org/wiki/PDF][PDF]] files to Emacs. Table =epdfinfo= executable that serves the [[https://en.wikipedia.org/wiki/PDF][PDF]] files to Emacs. Table
[[tab:pdf-tools-commands-and-bindings]] lists important local map ~pdf-tools~ key [[tab:pdf-view-mode-commands-and-bindings]] lists important local map key bindings
bindings. in ~pdf-view-mode~. Note: ~image-save~ saves the page under point to a ~png~
file.
#+caption[Setup =pdf-tools=]: #+caption[Setup =pdf-tools=]:
#+caption: Setup =pdf-tools=. #+caption: Setup =pdf-tools=.
@ -2041,14 +2042,9 @@ bindings.
#+begin_src emacs-lisp -n :results silent #+begin_src emacs-lisp -n :results silent
(when (and (ensure-package-installation 'pdf-tools) (when (and (ensure-package-installation 'pdf-tools)
(fboundp 'pdf-loader-install)) (fboundp 'pdf-loader-install))
;; `pdf-loader-install' is the lazy equivalent of `pdf-tools-install': ;; Use `pdf-loader-install' for faster startup than with `pdf-tools-install'.
;; see the README file.
(pdf-loader-install) (pdf-loader-install)
(with-eval-after-load 'pdf-outline
;; The `image-save' key binding is now "i o".
(keymap-set pdf-outline-minor-mode-map "O" #'pdf-outline))
(with-eval-after-load 'pdf-view (with-eval-after-load 'pdf-view
(setopt pdf-view-display-size 'fit-page (setopt pdf-view-display-size 'fit-page
pdf-view-use-scaling (eq system-type 'darwin)))) pdf-view-use-scaling (eq system-type 'darwin))))
@ -2056,17 +2052,17 @@ bindings.
#+attr_latex: :booktabs yes :float table #+attr_latex: :booktabs yes :float table
#+caption[Pdf-tools commands with key bindings]: #+caption[Commands with local key bindings in ~pdf-view-mode~]:
#+caption: Pdf-tools commands with key bindings. #+caption: Commands with local key bindings in ~pdf-view-mode~.
#+name: tab:pdf-tools-commands-and-bindings #+name: tab:pdf-view-mode-commands-and-bindings
|---------------------------------+--------------| |---------------------------------+----------------|
| command | key binding | | command | key binding |
|---------------------------------+--------------| |---------------------------------+----------------|
| *image-save* | {{{kbd(i o)}}} |
| *pdf-outline* | {{{kbd(o)}}} | | *pdf-outline* | {{{kbd(o)}}} |
| *pdf-outline* | {{{kbd(O)}}} |
| *pdf-view-fit-height-to-window* | {{{kbd(H)}}} | | *pdf-view-fit-height-to-window* | {{{kbd(H)}}} |
| *pdf-view-fit-width-to-window* | {{{kbd(W)}}} | | *pdf-view-fit-width-to-window* | {{{kbd(W)}}} |
|---------------------------------+--------------| |---------------------------------+----------------|
* Writing * Writing
:PROPERTIES: :PROPERTIES: