Previous Topic

Next Topic

Book Contents

Book Index

Using the Command Line (Java)

A sample application has been provided to illustrate the use of the Equation Composer (for Java) from the command line.

<path-to-mathflow-sdk>/java/samples/equation_composer_cmd.bat (on Windows systems)
<path-to-mathflow-sdk>/java/samples/equation_composer_cmd.sh (on non-Windows systems)

About the Script

The Equation Composer batch file (or shell script) calls EquationComposer with several options. It contains the following command (formatted for clarity):

java -classpath .;../MathFlow.jar
com/dessci/mathflow/sdk/composer/EquationComposer
-license dessci.lic
-mathmlfile test.mml
-imagefolder images
-imagename test
-imagetype png
-fontmapping FontMapping.opt

IMPORTANT NOTES:

  • There is only one .jar file, and it must be on the classpath are as shown above.
  • Within the MathFlow.jar file, the EquationComposer program is located at com/dessci/mathflow/sdk/composer/EquationComposer.
  • Your license, dessci.lic, is a FlexNet license file that is located in the same directory as the Equation Composer shell script. This option is always required.
  • MathML is read from a file named test.mml, located in the same directory as the batch file or shell script. Either a mathml or mathmlfile option is always required. If both are supplied, mathmlfile takes precedence over the mathml value.
  • The name of the image file will be test.png, (imagename.imagetype, which will be written to the images subdirectory. If this file already exists, it will be overwritten.
  • A fontmapping file, FontMapping.opt, located in the same directory as the batch file or shell script, will be used. This fontmapping file specifies the following fonts to be used for each class of symbols (see Java Rendering Engine for more information):

    100=Times New Roman (ALPHA_NUMERIC)
    101=Euclid Symbol (SYMBOL)
    102=Code2000 (EXTRA_SYMBOL)
    103=Euclid Symbol (GREEK)

For a complete list of the command line options, see Command Line Parameters.

Previous Topic

Next Topic

Book Contents

Book Index


[Design Science Home]
Copyright © 1996-2016 Design Science, Inc. All rights reserved.