-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latex preview and pdf view does not automatically refresh. #16705
Comments
You could configure recompilation on saving with something like the following: (add-hook 'LaTeX-mode-hook
(defun fn/latex-compile-on-save ()
(add-hook 'after-save-hook (lambda () (TeX-command-run-all nil)) nil t))) I use this hook to get the pdf to update after compilation: (add-hook 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer) This latter part seems like something the latex layer option To update the preview upon saving, you could in principle do something similar, but this might get annoying. Alternatively, xenops-mode seems like a better choice to me for this kind of functionality.
I think the mode is indeed not supposed to do that. |
BTW, those commands should also be bound under , p b, , a and , v, respectively. Do those bindings work for you, too? I am aware that the keybindings currently do not work on the Emacs 30 pre-release, but on Emacs 28 or 29 they should work. |
I can confirm that I would propose the rework this function.
|
I am also running into this issue, along with the lack of jumping to the location of the cursor in the code, getting the error |
Hello there. I'm trying to setup spacemacs with latex. I'd like to have auto-compilation to pdf whenever I save the file as well as auto-preview. The preview as well as compilation work fine if I use the explicit commands like
C-c C-p C-b
(preview buffer), orC-c C-a
(Tex-command-run-all).C-c C-v
also work as expected, i.e. jumps to the corresponding place in the pdf. I have installedtexlab
via cargo.However, the preview does not update automatically upon saving, the pdf does not recompile either. Also, I thought that the
TeX-source-correlate-mode
should make the pdf scroll automatically when going through the source code, but it does not happen (maybe I misunderstood this mode behavior?)I'm not sure what am I doing wrong. Could you please help me with that?
Emacs version: 28.2
.spacemacs
:The text was updated successfully, but these errors were encountered: