auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-devel] problem solved.


From: Uwe Brauer
Subject: [AUCTeX-devel] problem solved.
Date: Fri, 11 Dec 2009 12:25:55 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) XEmacs/21.4.21 (linux)

Hello 

The following code works, however I don't know how to include it in
auctex.

(defvar include-command "/usr/bin/latex -jobname=%s 
\'\\includeonly\{%s\}\\edef\\jobname\{\\detokenize\{%s\}\}\\input\{%s\}\'")



(defun latex-run-other-name ()
  "Invoke  latex-inclue for the current buffer, but with different DVI name."
  (interactive)
  (let ((currentname 
                  (file-name-nondirectory (buffer-file-name (current-buffer))))
                 (origname
                  (file-name-nondirectory (read-file-name "Name of DVI file: " 
))))
    (save-buffer)
        (shell-command
         (format include-command-simple
                         origname 
                         currentname
                         ))
        (message "You have run latex resulting in a different dvi file.")
        (sleep-for 1)))



(defun latex-include-run-other-name ()  ;Version:1.6
  "Invoke  latex-inclue for the current latex file with include commands, but 
with different DVI name."
  (interactive)
  (let ((currentname 
                  (file-name-nondirectory (file-name-sans-extension 
(buffer-file-name (current-buffer)))))
                 (origname
                  (file-name-nondirectory (read-file-name "Name of DVI file: " 
))))
    (save-buffer)
        (shell-command
         (format include-command
                         origname 
                         origname 
                         currentname
                         currentname
                         ))
        (message "You have run latex resulting in a different dvi file.")
        (sleep-for 1)))


Uwe Brauer 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]