diff options
| author | Sam Steingold <sds@gnu.org> | 2014-09-05 15:07:52 -0400 |
|---|---|---|
| committer | Sam Steingold <sds@gnu.org> | 2014-09-05 15:07:52 -0400 |
| commit | 2beb60dc1092ca1eb2270b58e8f54f238b6d5ebd (patch) | |
| tree | 85310907f79764f0dfa35c935761bc0ce94846c1 | |
| parent | 833cea36b9eb2f7c15f05a7de4c70d693353452c (diff) | |
| download | emacs-2beb60dc1092ca1eb2270b58e8f54f238b6d5ebd.tar.gz | |
New custom variable `tex-print-file-extension' to help users who use PDF instead of DVI.
* lisp/textmodes/tex-mode.el (tex-print-file-extension): New user
option.
(tex-print): Use it instead of the hard-coded string.
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 14 |
3 files changed, 23 insertions, 2 deletions
@@ -163,6 +163,11 @@ reinclusion protected header files from being fully hidden. *** New custom variable `hide-ifdef-exclude-define-regexp' to define symbol name patterns (e.x. all "FOR_DOXYGEN_ONLY_*") to be excluded. +** TeX mode + +*** New custom variable `tex-print-file-extension' to help users who +use PDF instead of DVI. + ** Obsolete packages --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9bfcdb631c3..502981d6179 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-09-05 Sam Steingold <sds@gnu.org> + + * textmodes/tex-mode.el (tex-print-file-extension): New user + option. + (tex-print): Use it instead of the hard-coded string. + 2014-09-05 Michael Albinus <michael.albinus@gmx.de> * net/tramp-sh.el (tramp-sh-handle-start-file-process): diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 18843bcd15a..2e2f412b997 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -2573,18 +2573,28 @@ line LINE of the window, or centered if LINE is nil." (prefix-numeric-value linenum) (/ (window-height) 2))))))) +(defcustom tex-print-file-extension ".dvi" + "The TeX-compiled file extension for viewing and printing. +If you use pdflatex instead of latex, set this to \".pdf\" and modify + `tex-dvi-view-command' and `tex-dvi-print-command' appropriatelty." + :type 'string + :group 'tex-view + :version "24.5") + (defun tex-print (&optional alt) "Print the .dvi file made by \\[tex-region], \\[tex-buffer] or \\[tex-file]. Runs the shell command defined by `tex-dvi-print-command'. If prefix argument is provided, use the alternative command, `tex-alt-dvi-print-command'." (interactive "P") - (let ((print-file-name-dvi (tex-append tex-print-file ".dvi")) + (let ((print-file-name-dvi (tex-append tex-print-file + tex-print-file-extension)) test-name) (if (and (not (equal (current-buffer) tex-last-buffer-texed)) (buffer-file-name) ;; Check that this buffer's printed file is up to date. (file-newer-than-file-p - (setq test-name (tex-append (buffer-file-name) ".dvi")) + (setq test-name (tex-append (buffer-file-name) + tex-print-file-extension)) (buffer-file-name))) (setq print-file-name-dvi test-name)) (if (not (file-exists-p print-file-name-dvi)) |
