Subject: Re: EMACS and LATEX

From: [email-masked] (Douglas Gray Stephens)
Date: Thu, 26 Jun 1997 06:26:41 -0500

Andreas,

At 12:00 on 26-June-1997, Andreas Bieniek wrote:
 > Hi,
 > 
 > Has anybody succeeded in installing EMACS and LATEX on an
 > NT machine so that you can run latex, dvips and the dvi-viewer
 > out of the editor ?
 > 
 > I have been workin on that for a while, but without any success.
 > I tried the packages emtex and gtex (with an excellent previer and
 > which comes in combinarion with a micro-emacs port).
 > 
 > To run latex seems to be no problem with both packages,
 > but the dvi previer is called in unix syntax:
 > 
 > The absolute path name has / in it, instead of \ used
 > for DOS programs. Since I am not familiar with lisp I do not know
 > how and where to change that.
 > 
 > I would appreciate any help or suggestions.

I'm using the miktex, and have things working after modifying emacs'
tex-mode.el in the function tex-region, by replacing
    (tex-send-command tex-shell-cd-command zap-directory)
with
    ;; Thu 30-Jan-1997; Douglas Gray Stephens 
    ;; Handling / to \ for cd on DOS
    (let ((char-pointer 0)
	  (dos-directory "")
	  )
      (condition-case nil
	  (while (substring zap-directory char-pointer (+ char-pointer 1))
	    (setq dos-directory (concat dos-directory
					(if (string= (substring zap-directory char-pointer (+ char-pointer 1)) "/")
					    "\\"
					  (substring zap-directory char-pointer (+ char-pointer 1))
					  )
					)
		  char-pointer (+ char-pointer 1))
	    )
	(error nil)
	)
      (tex-send-command tex-shell-cd-command dos-directory)
      )
    ;; was    
    ;;  (tex-send-command tex-shell-cd-command zap-directory)
    ;; End DGS's changes

I have a minor problem, in that running tex or latex, in that I get an
error:
 Process tex-shell not running
when I run tex or latex (but not on the first occurence).  I just hit 
 Ctrl-C b
a second time, and the shell starts.  I think there may be a timing
issue, which I've not spent time on.  On my Windows 95 machine, I
suppress the killing of the process, so do not have the problem.

I hope that this helps,

Douglas.

-- 

================================
Dr. Douglas GRAY STEPHENS        
Schlumberger Austin Product Centre,
8311 North FM 620,
AUSTIN,
TX 78726

Phone +1 512 331 3717
Fax   +1 512 331 3760
Email [email-masked]
================================