Mathematical equation - %eq[equation]

In this section:

%eq (Equation) is provided to enable mathematical equations to be drawn. It is followed by a standard character string (i.e. a string in square brackets, or an '@' symbol with a string as an argument). It takes two integer arguments which are the width and depth of the equation in pixels. If the contents of the equation are not going to change, then the width and depth are set to zero, forcing the size of the region to be defined by the equation. Equations may also be included in hypertext (see Hypertext windows).

Equations are strings with the three characters {;} reserved. The following symbols can be included in strings:













































The names of these special symbols are case sensitive, and the Greek characters also exist as upper case characters. In this context only the first character is upper case.

In addition, a number of more complex constructions are supplied. In the list below , the asterisk "*" stands for any equation string:

{sup *}

Superscript or exponent

{sub *}


{divide *;*}

Division written with a horizontal bar

{sum *}

Summation without upper limit

{sum *;*}

Summation with both limits

{integral }

Indefinite integral

{integral *}

Integral with lower limit only

(integral *;*}

Full definite integral.

{symbol nnn}

Character number nnn (decimal) from the symbol font.

Note that the body of the sum or integral will be placed after the closing curly brace. Spaces are important in the above constructions.

Badly formed equations will normally cause a Clearwin+ error. However, if a grave accent modifier is specified (%`eq), the error will be suppressed.

Excessive nesting of constructs such as 'sup' or 'sub', that reduce the font size, may result in unreadable equations.

Here are a few well known equations and chemical formulae as examples:

 INTEGER i,w,winio@
 CHARACTER*80 s(4)
 s(1)='H{sub 2}SO{sub 4}'< BR> s(2)='E=mc{sup 2}'< BR> s(3)='{del}.B=0'
+'{sum n=1;{infinity}}{divide 1;n{sup 2}}={divide {pi}{sup 2};6}'
 DO i=1,4
 w=winio@(' ')

Equations are constructed using symbols from the Times New Roman and Symbol fonts.

These same equation strings may be used in hypertext (%ht (Hypertext)) embedded between <equation> and </equation>. The string between these delimiters is treated as a pure equation - no mark-up codes are recognised. So, for example, the '<' symbol should be written as it is.



Copyright © 1999-2021 Silverfrost Limited