For auctex with pdftools it is convenient for me (eyesight problems) to have the emacs latex frame on my laptop close to my eyes, and the corresponding pdf (in pdftools) on a separate frame on the dual monitor. How can this be implemented? i.e., emacs latex source in one frame and corresponding pdftools pdf in a separate frame. (Typically latex and pdftools exist in the same frame with two different buffers e.g. with C-x 2; but I want two different frames so that I can drag these frames independently to different monitors)
This is a variation of the question about preview the pdf in a split buffer beside the source.
You can use the following Elisp code in your init file.
If you do not have already two frames. The pdf view will open in a window beside the window with the LaTeX source. Select that window and type C-x 5 2 for
make-frame-command. There will be a new frame showing the pdf. You can delete the original window showing the pdf now. If you call
TeX-View the window in the other frame is used.
(defun framesMenus-display-buffer-use-some-frame (fun &rest args) "Use `display-buffer-use-some-frame' as `display-buffer-overriding-action'. Then run FUN with ARGS." (let ((display-buffer-overriding-action '(display-buffer-use-some-frame))) (apply fun args))) (advice-add 'TeX-pdf-tools-sync-view :around #'framesMenus-display-buffer-use-some-frame) (advice-add 'pdf-sync-backward-search-mouse :around #'framesMenus-display-buffer-use-some-frame)