home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 9
/
FreshFishVol9-CD2.bin
/
bbs
/
util
/
gedscripts-1.1.lha
/
GEDScripts
/
PasTeX
/
GoToSDVI.ged
< prev
next >
Wrap
Text File
|
1994-02-15
|
1KB
|
72 lines
/*RX
GoToSDVI.ced NAME:GoToSDVI.ced Version:1.00
- Load SDVI if it isn't running, with the current dvi file of the CED
view (if it's a tex file)
- Check if the current CED view filename (with dvi) is the filename in
ShowDVI. If it isn't, load it into SDVI. Check if DVI file is there.
- If the above things don't apply, bring SDVI to front.
Ren\'e Laederach 19-Dec-1992
*/
OPTIONS RESULTS
ADDRESS 'GOLDED.1'
LOCK CURRENT
QUERY FILE
filename=RESULT
QUERY PATH
pathname=RESULT
if (RIGHT(pathname,1)) ~= ":" THEN DO
pathname = pathname||"/"
END
filename = left(filename,lastpos('.',filename)-1)
IF ~EXISTS(pathname||filename||".dvi") THEN DO
'REQUEST BODY="The corresponding .dvi file does not exist|Use Start_TeX to generate one."'
UNLOCK
EXIT
END
/* Now check if ShowDVI is running */
IF ~SHOW('P','showdvi') THEN DO
ADDRESS COMMAND "run <nil: >nil: tex:bin/ShowDVI" pathname||filename||".dvi"
UNLOCK
EXIT
END
UNLOCK
address "showdvi"
getfile
loadedfile = RESULT
getdir
loadeddir = RESULT
IF RIGHT(loadeddir,1)~=':' & RIGHT(loadeddir,1)~='/' THEN
loadeddir = loadeddir||'/'
IF loadeddir||loadedfile~=fullsrc THEN DO
loadnew fullsrc||".dvi"
tofront
activate
END
ELSE DO
tofront
activate
EXIT
END