Compare commits

...

2 Commits

1 changed files with 21 additions and 6 deletions

View File

@ -2055,7 +2055,9 @@ annotate [[https://en.wikipedia.org/wiki/PDF][PDF]] files. It also exploits the
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
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.
=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
bindings.
#+caption[Setup =pdf-tools=]:
#+caption: Setup =pdf-tools=.
@ -2068,9 +2070,7 @@ of [[https://github.com/vedang/pdf-tools][pdf-tools]] from [[https://melpa.org/]
(pdf-loader-install)
(with-eval-after-load 'pdf-outline
;; Unmask the `image-save' key binding in `pdf-view-mode-map' and
;; in `image-mode-map' (by parenthood).
(keymap-set pdf-outline-minor-mode-map "o" nil)
;; 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
@ -2078,6 +2078,20 @@ of [[https://github.com/vedang/pdf-tools][pdf-tools]] from [[https://melpa.org/]
pdf-view-use-scaling (eq system-type 'darwin))))
#+end_src
#+attr_latex: :booktabs yes :float table
#+caption[Pdf-tools commands with key bindings]:
#+caption: Pdf-tools commands with key bindings.
#+name: tab:pdf-tools-commands-and-bindings
|---------------------------------+--------------|
| command | key binding |
|---------------------------------+--------------|
| *pdf-outline* | {{{kbd(o)}}} |
| *pdf-outline* | {{{kbd(O)}}} |
| *pdf-view-fit-height-to-window* | {{{kbd(H)}}} |
| *pdf-view-fit-width-to-window* | {{{kbd(W)}}} |
|---------------------------------+--------------|
* Writing
:PROPERTIES:
:CUSTOM_ID: sec:writing
@ -4743,8 +4757,7 @@ true in case document headlines contain links. The code in listing
#+name: lst:setup-which-function-mode
#+begin_src emacs-lisp -n :results silent
;; https://emacs.stackexchange.com/questions/30894/
;; https://list.orgmode.org/20240205.141235.268481480563517065.teika@gmx.com/
;; (setopt which-func-display 'header) ;; AFAIU, fails on my system.
(defvar which-func-functions nil)
(defun which-func-org-function ()
@ -4781,6 +4794,8 @@ Return \"Front Matter\" when point is above the first headline."
(hl-page 0)
(old-title "Front Matter")
(new-title old-title))
;; Return the first headline on a page which is better than nothing.
;; I can't do better, since `pdf-view-mode' has no notion of point.
(while (and (< hl-index hl-count) (< hl-page current-page))
(setq old-title new-title)
(setq hl-page (alist-get 'page (nth hl-index outline)))