update packages and add valign

This commit is contained in:
2026-04-05 20:00:27 +02:00
parent b062fb98e3
commit 03fb00e374
640 changed files with 109768 additions and 39311 deletions

View File

@@ -277,15 +277,18 @@ Has no effect if `pdf-sync-backward-use-heuristic' is nil."
(xy (posn-object-x-y posn)))
(unless image
(error "Outside of image area"))
(pdf-sync-backward-search (car xy) (cdr xy))))
(pdf-sync-backward-search
(car xy) (cdr xy)
(and (bound-and-true-p pdf-view-roll-minor-mode)
(/ (+ (posn-point posn) 3) 4)))))
(defun pdf-sync-backward-search (x y)
"Go to the source corresponding to image coordinates X, Y.
(defun pdf-sync-backward-search (x y &optional page)
"Go to the source corresponding to image coordinates X, Y on PAGE.
Try to find the exact position, if
`pdf-sync-backward-use-heuristic' is non-nil."
(cl-destructuring-bind (source finder)
(pdf-sync-backward-correlate x y)
(pdf-sync-backward-correlate x y page)
(pop-to-buffer (or (find-buffer-visiting source)
(find-file-noselect source))
pdf-sync-backward-display-action)
@@ -293,8 +296,8 @@ Try to find the exact position, if
(funcall finder)
(run-hooks 'pdf-sync-backward-hook)))
(defun pdf-sync-backward-correlate (x y)
"Find the source corresponding to image coordinates X, Y.
(defun pdf-sync-backward-correlate (x y &optional page)
"Find the source corresponding to image coordinates X, Y on PAGE.
Returns a list \(SOURCE FINDER\), where SOURCE is the name of the
TeX file and FINDER a function of zero arguments which, when
@@ -303,7 +306,7 @@ point to the correct position."
(pdf-util-assert-pdf-window)
(let ((size (pdf-view-image-size))
(page (pdf-view-current-page)))
(page (or page (pdf-view-current-page))))
(setq x (/ x (float (car size)))
y (/ y (float (cdr size))))
(let-alist (pdf-info-synctex-backward-search page x y)
@@ -656,7 +659,7 @@ Needs to have `pdf-sync-backward-debug-minor-mode' enabled."
buffer pdf-sync-forward-display-action)
(pdf-util-assert-pdf-window)
(when page
(pdf-view-goto-page page)
(pdf-view-goto-page page (selected-window))
(when y1
(let ((top (* y1 (cdr (pdf-view-image-size)))))
(pdf-util-tooltip-arrow (round top))))))
@@ -670,7 +673,7 @@ Returns a list \(PDF PAGE X1 Y1 X2 Y2\), where PAGE, X1, Y1, X2
and Y2 may be nil, if the destination could not be found."
(unless (fboundp 'TeX-master-file)
(error "This function works only with AUCTeX"))
(unless line (setq line (line-number-at-pos)))
(unless line (setq line (line-number-at-pos nil t)))
(unless column (setq column (current-column)))
(let* ((pdf (expand-file-name