auctex
[Top][All Lists]
Advanced

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

[AUCTeX] add to a key stroke: texify --tex-opt=--src --quiet %t"


From: Stefan Pofahl
Subject: [AUCTeX] add to a key stroke: texify --tex-opt=--src --quiet %t"
Date: Fri, 02 Sep 2005 16:42:38 +0200

Hi,

I want to have the command "texify --tex-opt=--src --quiet %t"
on a key strocke (texify.exe is part of miktex).
What is to do?
I tried the following in my init.el:
;; ---  add "Texify" to the TeX-command-list  ---
 (eval-after-load "tex"
   '(progn
      (add-to-list 'TeX-command-list
        (list "Texify" "texify --tex-opt=--src --quiet %t"
         'TeX-run-command nil t)
      )
   ) ; end of << '(progn  >>
 ) ; end of << (eval-after-load "tex" >>
;; --- add a key stroke definition --------------
(add-hook 'LaTeX-mode-hook 
  '(lambda nil
      ; control key bindings
      (define-key LaTeX-mode-map '[(control c)(control a)] 'do-LaTeX) 
  ;; safe buffer, run latex
    )    ) ;;end add-hook 'LaTeX-mode-hook
;; ------------------------
(eval-when-compile
  (require 'tex)) ;; (tip from: David Kastrup)
;; --- defined the wanted function --------------
(defun do-LaTeX ()
    "LaTex the curent file."
    (interactive)
    (save-buffer)
    (TeX-command "Texify" %t)
    )
;;----------------------------

It does not work, what is to do?
(TeX-command "Texify" 'TeX-active-buffer)
I also not working :-(
But 
(TeX-command "Texify" 'TeX-master-file)
and 
(TeX-command "Texify" 'TeX-region-file)
work both.
What is to do?


Stefan Pofahl



P.S.: 
I also tried define my own function, but this was 
no help.
;; 
(defcustom LaTeX-own "texify --tex-opt=--src --quiet %t"
  "*Command used to print a file.

`%t' is expanded to current file to prozess, then ordinary expansion 
is
performed as specified in `TeX-expand-list'.  If it is `nil',
then customization is requested."
  :group 'TeX-command
  :type '(choice (string :tag "LaTeX current file")
                 (const :tag "LaTeX command customized" nil)))

--
 Stefan Pofahl
 Zentrum fuer Sonnenenergie- und Wasserstoff-Forschung
 Geschaeftsbereich 3
 Helmholtzstr. 8 - 89081 Ulm  -  Germany
 tel: +49-(0)731-9530-408  -  fax: +49-(0)731-9530-666






reply via email to

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