<< Click to display table of contents >> Mathematical Expressions (Equations) in TRichView Documents [VCL] |
Items of this type display mathematical expressions.
Class for this item type is TRVMathItemInfo (see for detailed information).
Style of this item type: rvsMathEquation (-210)
This item requires RAD Studio XE4 or newer. This item type is not available in Lazarus and FireMonkey versions.
This item uses Adit Math Engine by Denis Sletkov (Adit Software): aditsoftware.com
There are two version of Adit Math Engine: free version and commercial version.
Free version
Units of the free version of Adit Math Engine are included in TRichView installation (in Math folder). They are covered by MPL 2.0 with the following addition restrictions:
Adit Math Engine cannot be used in any E-learning/Assessment/Testing/Math software (Freeware or Shareware) or outside TRichView engine without our [Adit Software] written permission.
You can contact Adit Software if you want to use Adit Math Engine under a different license or to request an exception from the restrictions above.
Commercial version
To use the commercial version, include RVAdvMathWrapper.pas in your project (for example, add in in "uses" of the main form unit).
The following viewer-style method adds item of this type to the end of the document:
▪AddItem (create TRVMathItemInfo object, add it using AddItem)
The following method returns TRVMathItemInfo object
The following editor-style method inserts item of this type at the position of caret:
▪InsertItem (create TRVMathItemInfo object, insert it using InsertItem)
The following method returns TRVMathItemInfo object at the position of caret:
The following methods change properties of items as editing operations:
▪SetCurrentItemExtraIntPropertyEx;
▪SetCurrentItemExtraStrPropertyEx;
Main properties:
▪Text – mathematical expression in LaTeX-like format,
▪DisplayInline – switches between the inline mode and the display mode.
These properties are also accessible as rveipcDisplayInline and rvespcText properties. Accessing them in this way allows changing them in editing operations.
This item type has the following integer properties related to layout and appearance:
▪rvepSpacing – padding (spacing between the expression image and its border);
▪rvepBorderWidth, rvepBorderColor – width and color of a border;
▪rvepOuterHSpacing, rvepOuterVSpacing – horizontal and vertical spacing around the border
▪rvepColor – background color.
Additionally, it has the properties:
▪FontSizeDouble – font size in half-points,
▪FontName – font name (only mathematical fonts can be used),
▪TextColor – text color.
These properties are also accessible as rveipcTextColor, rveipcFontSizeDouble and rvespcFontName properties. Accessing them in this way allows changing them in editing operations. If values of these properties are default, the item uses global settings specified in TRVMathDocObject object.
Export to HTML
Equations are saved as images (PNG, if possible).
Export to RTF and DocX
Equations are saved as images.
Export to text
Text property is saved.