@database FinalWriter.guide
@author "Simon Ihmig"
@$VER: "FinalWriter.guide Version 1.0"
@smartwrap

@node Main "MathScript & FinalWriter"

How to use MathScript together with FinalWriter®.@{par}

@{"Introduction" link Einleitung}@{par}

@{"Installation" link Install}@{par}

@{"'Peculiarity' of FinalWriter" link bugs}@{par}

@{"Use of the ARexx scripts" link ARexx}


FinalWriter ©Copyright SoftWood Inc.

@endnode

@node Einleitung "Introduction"

In order to use EPS files of MathScript in word processors and DTP programs,
they must be able to load this file format. Most of them should be able to.@{par}
For showing and printing them they have to be "interpreted". Usually this
happens inside of a PostScript laser printer. Unfortunatelly these aren't
very cheap;-). Nevertheless they can be used with "normal" printers but in
this case the computer itself has to interpret the PostScript code.@{par}
FinalWriter has such an interpreter, so it is very suitable for use with
MathScript (apart of some minor errors:  @{"'Peculiarity' of FinalWriter" link bugs}).@{par}

If you do own such a PostScript printer, change the settings of MathScript so
that the math font will be included into the PostScript description, because
the PostScript interpreter of the printer cannot load the font from the
harddisk.@{par}
But a little error will occure with this setting
(see @{"'Peculiarity' of FinalWriter" link bugs} ).@{par}

If you do not own such a printer, do not include the font into your PostScript
code so that this error will not occure and the size of your files will be
kept at a minimum.@{par}

See @{"Change Settings" link "MathScript.guide/ChangeSettings"}

@endnode

@node Install "Installation"

For easier use of MathScript with FinalWriter do the following:@{par}

- Define in FinalWriter two new gadgets which start ARexx scripts.@{par}
The first gadget is assigned to MathScript:Rexx/OpenMathScript.ms, the other
to MathScript:Rexx/CloseMathScript.ms .@{par}

- Edit the file .../FinalWriter/FWFiles/init.ps .@{par}
The following paragraph has to be there:@{par}

@{code}
   systemdict
   /findfont
   {
   % Comment out the next 3 lines if you don't have a PSFonts: directory
   % If you have a directory containing Type-1 fonts to use for EPS clip
   % art, substitute the path name of the directory for "PSFonts:" below.
-->% dup FontDirectory exch known not             % Not in FontDirectory?
-->% { dup (PSFonts:) () loadfont                 % Try to load from PSFonts:
-->% } if
@{body}

Do what is written in the comment: remove the percent signs at the beginning
of the last three lines.

@endnode

@node bugs "'Peculiarity' of FinalWriter"

It seams that FinalWriter has a little bug with its EPS support.@{par}
If you save a document with an EPS file in which a PostScript font is included
this file cannot be seen after loading the document again:-(@{par}

Because including fonts in your files is only recommended if you use a
PostScript printer it is not so bad because the PostScript print is still
correct.@{par}

Without a PostScript printer there is no use of integrating the font into your
files so this error won't occur.

@endnode

@node ARexx "Use of the ARexx scripts"

In order to make the connection between MathScript and FinalWriter easier
three scripts are used:@{par}
OpenMathScript.ms@{par}
CloseMathScript.ms@{par}
InsertFormula.ms@{par}
The first two are started from FinalWriter (from the menu or from user-defined
gadgets,see @{"Installation" link Install} ).@{par}
The last is started by MathScript.@{par}

For creating documents with mathematical formulas just do the following:@{par}

1. Start FinalWriter @{par}

2. As soon as you need a formula start OpenMathScript.ms@{par}

3. Enter your formula into MathScript@{par}

4. Start the script InsertFormula.ms from MathScript@{par}

5. The formula is automatically inserted into your document. Just move it
around and scale it as you like@{par}

Repeat the steps 2-5 until all formulas are complete@{par}

6. Start CloseMathScript.ms. A requester will ask you to save your document.
This is necessary in order to be able to delete the formulas after they have
been integrated into your document by saving it.@{par}

Now some tips:@{par}

You don't have the fastest computer and the display of the formulas in
FinalWriter takes too long.@{par}
  Do the following:@{par}
Edit the file MathScript:Rexx/InsertFormula.ms.@{par}
There should be the following line:@{par}
  IMPORTPREFS DISPLAY FULL@{par}
Replace FULL with CHECKBOX.@{par}
This will show all formulas as crossboxes which will the display quite faster;-)@{par}

During the execution of InsertFormula.ms the error occurs that your Ram Disk
is full.@{par}
  Do the following:@{par}
Edit the files InsertFormula.ms and CloseMathScript.ms.@{par}
Replace all "T:" with any legal path so that the formulas will be saved there
(and deleted afterwards) instead of your RAM.

@endnode
