home *** CD-ROM | disk | FTP | other *** search
- /* 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
-
-
-