Last active
December 21, 2015 11:38
-
-
Save AyeGill/6299951 to your computer and use it in GitHub Desktop.
A emacs lisp command that uses pdflatex to compile a pdf version of the active buffer, then view it with evince.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun view-latex () | |
| (interactive) | |
| (if (buffer-modified-p) (save-buffer)) | |
| (shell-command (concat "pdflatex " buffer-file-name " >> /dev/null")) | |
| (shell-command (concat "evince " (substring buffer-file-name 0 | |
| (- (length buffer-file-name) 4)) ".pdf >> /dev/null"))) | |
| ;Obviously, replace "pdflatex" and "evince" with your own latex and pdf viewer systems, respectively. | |
| ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment