help-emacs-windows
[Top][All Lists]
Advanced

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

RE: [h-e-w] Error when running latex in emacs (spawning child pro cess:


From: Underwood, Jonathan
Subject: RE: [h-e-w] Error when running latex in emacs (spawning child pro cess: invalid argument)
Date: Thu, 25 Apr 2002 10:33:58 -0400

Only today I've done a clean install of miktex, auctex, emacs-21.2 and
everything works fine for me. I suspect you've not setup tex-site.el
properly as described in the auctex notes.

Below is the file i use to set everything up which i name site-tex.el - i
don't bother editing tex-site.el, rather i just put this file in a directory
on my load-path and have (require 'site-tex) in my .emacs. You'll need to
edit this to suit yourself. Note the flyspell stuff will only function if
you have ispell installed

Hope that helps

jonathan

;Time-stamp: <Fri 12 Apr, 2002. 19:32>
;; Rather than copy and edit the tex-site.el as suggested in the auctex
;; distribution, here i do all the site customization. The reason being
there
;; was errors in the tex-mik.el file, so it was easier to first load the
auctex
;; files and then fix things up.

(provide 'site-tex)

;;; These are the only variables which should need changing (these are my
own
;;; defines)
(defvar auctex-file-dir "c:/usr/emacs/site-lisp/auctex-10.0g/" 
  "*Directory where the auctex package resides. Used first to load the
tex-site.el from auctex package, and then to set TeX-lisp-directory.")

(defvar tex-macro-dir '("c:/usr/texmf/tex/" "c:/usr/localtexmf/tex/")
  "*List of directories where the tex macro and style files reside. Used to
set
TeX-macro-global.")

(defvar auctex-info-dir (list "c:/usr/emacs/site-lisp/auctex-10.0g/doc/")
  "*Directory in which the AucTeX info files reside.")
;___________________________________________________________________________
________

;;; Add auctex directory to load path and load tex-site from the auctex
package.
(setq Info-default-directory-list (append auctex-info-dir
Info-default-directory-list))
(setq load-path (append (list auctex-file-dir) load-path))
(require 'tex-site)

;___________________________________________________________________________
________

;;; Fix things not set in tex-site.el (taken from tex-site.el)
(setq TeX-lisp-directory auctex-file-dir)
(setq TeX-macro-global tex-macro-dir)

;___________________________________________________________________________
________

;;; Windows specific stuff, assuming using the miktex distribution.
(cond ((string-match "nt" system-configuration)
      ;; Stuff taken from tex-mik.el
      ;; The MikTeX commands.
      (setq TeX-command-list
            (list (list "TeX" "tex \\nonstopmode\\input %t" 'TeX-run-TeX nil
t)
                  (list "LaTeX" "%l \\nonstopmode\\input{%t}" 'TeX-run-LaTeX
nil t)
                  (list "LaTeX PDF" "pdflatex \\nonstopmode\\input{%t}"
                        'TeX-run-LaTeX nil t)
                  (list "View" "%v" 'TeX-run-discard nil nil)
                  ;;    (list "gsview" "gsview32 %f" 'TeX-run-command t nil)
                  (list "dvips" "dvips %d -o %f " 'TeX-run-command t nil)
                  (list "dvips (Letter)" "dvips %d -t letter -o %f "
                        'TeX-run-command t nil)
                  (list "BibTeX" "bibtex %s" 'TeX-run-BibTeX nil nil)
                  (list "Index" "makeindex %s" 'TeX-run-command nil t)
                  (list "Check" "lacheck %s" 'TeX-run-compile nil t)
                  (list "Other" "" 'TeX-run-command t t)))
      
      ;; DVI to source correspondence (stolen from the German magazine c't).
      (setq LaTeX-command-style '(("." "latex --src-specials
--c-style-errors"))) 
      (setq TeX-view-style '(("^a5$" "yap %d -paper a5")
                             ("^landscape$" "yap %d -paper a4r -s 4")
                             ("^epsf$" "gsview32 %f")
                             ("." "yap -1 -s%n%b %d")))
      
      ;; These two auctex variables cope for the situation where cmd.exe is
not the
      ;; usual shell. This seems futile since bash set up still screws up
latexing.
      (require 'tex-buf)
      (setq TeX-shell "cmd")
      (setq TeX-shell-command-option "/c")
      ))
;___________________________________________________________________________
________

;;; The Following stuff has been migrated from .emacs file
;; Auctex options.
(setq TeX-default-mode 'LaTeX-mode) ; as opposed to emacs latex mode.
(setq TeX-auto-save t) 
(setq TeX-parse-self t) 
(setq-default TeX-master nil); Query for Master file

;; Font latex - enhanced font lock for latex files.
(require 'font-latex)

;; reftex 
(autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t)
(autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
(autoload 'reftex-citation "reftex-cite" "Make citation" nil)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
(setq reftex-plug-into-AUCTeX t)
(setq reftex-enable-partial-scans t)
(setq reftex-save-parse-info t)
(setq reftex-use-multiple-selection-buffers t)
(setq bib-cite-use-reftex-view-crossref t)
(setq reftex-cite-format 'natbib)

;; flyspell (minor mode) seems to cause problems on startup with desktop.el
;(add-hook 'LaTeX-mode-hook 'flyspell-mode)
;(setq ispell-parser 'tex)

;; Local mode customization-add functions and bind keys.
(add-hook 'LaTeX-mode-hook
          '(lambda()
             (local-set-key [f5] 'do-LaTeX)
             (local-set-key [f6] 'do-BibTeX)
             (local-set-key [f7] 'do-dviview)
             (local-set-key [f8] 'do-dvips)
             (defun do-LaTeX ()
               "LaTeX the current file."
               (interactive)
               (TeX-command "LaTeX" 'TeX-master-file))
             (defun do-BibTeX ()
               "BibTeX the current file."
               (interactive)
               (TeX-command "BibTeX" 'TeX-master-file))
             (defun do-dviview ()
               "YAPview the current file."
               (interactive)
               (TeX-command "View" 'TeX-master-file))
             (defun do-dvips ()
               "DVIPS the current file."
               (interactive)
               (TeX-command "dvips" 'TeX-master-file))
             ))

;; settings for bib-cite.el (for bibtex files)
(require 'imenu)
(autoload 'turn-on-bib-cite "bib-cite")
(add-hook 'LaTeX-mode-hook 'turn-on-bib-cite)


-----Original Message-----
From: Sven Enger [mailto:address@hidden
Sent: Thursday, April 25, 2002 11:45 AM
To: address@hidden
Subject: [h-e-w] Error when running latex in emacs (spawning child
process: invalid argument)


Hi,

I have downloaded and installed Emacs and MikTeX on a Win-NT computer.
Emacs with Auc-TeX works, but if I try to compile a tex document (c-c
c-c latex), I get an error message:

        spawning child process: invalid argument

(in Emacs)

Earlier, I have installed emacs and miktex on my own computer back home
(for Win-NT and 2000) without any problems. Do you have any idea what I
can do to make it run?

Thanks for any help in advance,

Sven



reply via email to

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