Path: utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!racine From: racine@yunexus.yorku.ca (Jeff Racine) Newsgroups: comp.text.tex Subject: Re: How to get out if wrong filename? Summary: emTeX batch to solve etc. Message-ID: <22069@yunexus.YorkU.CA> Date: 20 Mar 91 12:53:57 GMT References: <42.27E336F0@mom.uucp> <31174@usc> <66410@eerie.acsu.Buffalo.EDU> Sender: news@yunexus.YorkU.CA Organization: York University, Toronto, Ont. Lines: 55 In article momma@is.informatik.uni-stuttgart.de writes: > > >In article <66410@eerie.acsu.Buffalo.EDU> xiaofei@acsu.buffalo.edu (Xiaofei Wang) writes: > >> Since I am posting, I have a small question for long time: When I supply a >> wrong file name, TeX keeps say ``give me a correct filename:'' If I know >> the filename that is fine, but sometimes I have to check directory and >> I find it difficult to get out of there. [On unix, Control-C won't do >> and one has to use Control-Z. On msdos with emTeX I don't know how to do it. >> I have to reboot the PC :-( or supply any old thing [even though it is not >> a tex file] in order to get out of there.] Any one has the same experience? >> And come up with a smarter solution? My solution for emTeX running under MS-DOS 3.30 is to use a batch file called tex.bat as follows: -----------tex.bat @echo off :begin @cls if not exist %1.tex goto error if exist f:\texerr.bat del f:\texerr.bat @d:\emtex\tex /a=f:\texerr.bat %1 if not exist f:\texerr.bat goto end call f:\texerr.bat goto begin :error @echo The file %1.tex does not exist! :end ---------- My f: drive is a ramdrive, and the file texerr.bat is created by emTeX if there is an error (by the /a switch). If there is an error and you hit `e' at the TeX `?' (for edit), the file emtexed.bat is executed which runs my editor (MicroEmacs 3.10) and takes me to the line of the file where my error is. Upon exiting emacs, emTeX is automatically re-run, so you can iterate. Saves alot of time. Oh, and if the file you specified does not exist, nothing is run (your original question). ---------emtexed.bat f:\emacs.exe %2 -G%1 --------- Hope this helps. -------------------------------------------------------------------- Jeff Racine racine@nexus.yorku.ca racine@yunexus.UUCP