home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 3
/
goldfish_volume_3.bin
/
files
/
fish
/
disks
/
d1084.lha
/
Programs
/
MathScript
/
Rexx
/
InsertFormula.ms
< prev
next >
Wrap
Text File
|
1995-03-21
|
1KB
|
73 lines
/* This script is for the use with FinalWriter®.
For the detailed description of how to connect MathScript and FinalWriter®
via ARexx, see the file FinalWriter.guide in your Docs drawer */
options results
IF ~SHOW('p',"FINALW.1") THEN EXIT
/* If FW does not run -> quit */
DO i=0 WHILE EXISTS("T:formula"||i)
END
ADDRESS FINALW.1
STATUS FONTSIZE
size=result
/* The formula will be created with the same font size */
STATUS PAGE "Insert"
page=result
/* The formula will be inserted into the current page */
ADDRESS "MATHSCRIPT.1"
GETGENERALPREFS FONTSIZE
old_size=result
SETGENERALPREFS FONTSIZE size
/* Use the current font size */
GETDIMENSIONS
dimensions=result
w=WORD(dimensions,1)*10
h=WORD(dimensions,2)*10
/* Get the formula's size in micropoints */
EXPORT BINEPS "T:formula"||i FORCE
/* save as Binary EPS */
SETGENERALPREFS FONTSIZE old_size
ADDRESS "FINALW.1"
SETMEASURE MICROPOINTS
CURRENTOBJECT
id=result
x=-1
y=-1
IF id~=0 THEN
DO
GETOBJECTCOORDS id
page=WORD(result,1)
x=WORD(result,2)
y=WORD(result,3)
DELETEOBJECT id
END
/* Use position of selected object (if there is one) */
SCREENTOFRONT
IMPORTPREFS DISPLAY PREVIEW TEXTFLOW NONE LINKED NO
INSERTIMAGE "T:formula"||i POSITION page x y w h
/* load the EPS-file into FW */
REDRAW