DECdocument
Using Global Tags


Previous Contents Index


<MATH>(a<subscript>(2)<superscript>(n-1)) 
 

This example produces the following output: a_2^n-1

In extended mathematical expressions, the <SUPERSCRIPT> and <SUBSCRIPT> tags produce differing results in conjunction with the <INTEGRAL>, <PROD>, and <SUM> tags and their complementary tags--<INTEGRAL_LIMITS> and <INTEGRAL_NOLIMITS>, <PROD_LIMITS> and <PROD_NOLIMITS>, and <SUM_LIMITS> and <SUM_NOLIMITS>.

The <INTEGRAL>, <PROD>, and <SUM> tags place their subscripts and superscripts with regard to whether the tags are used in math text mode (used as an argument to the <MATH> tag) or in math display mode (used between the <MATH>(DISPLAY) and <ENDMATH> tags).

In math text mode, the <INTEGRAL>, <PROD>, and <SUM> tags all place the superscript and subscript to the right. Code these tags as follows:


<MATH>(<integral><subscript>(n=1)<superscript>( <pi><over>(2) ) <sp>   ) 
<MATH>(    <prod><subscript>(n=1)<superscript>( <pi><over>(2) ) <sp>   ) 
<math>(     <sum><subscript>(n=1)<superscript>( <pi><over>(2) )        ) 

This example produces the following output: Sn=1^ <pi symbol> 2 <prod symbol>n=1^ <pi symbol> 2 <sum symbol>n=1^ <pi symbol> 2

In math display mode, the <PROD> and <SUM> tags place the superscript and subscript above and below their respective signs; however, the <INTEGRAL> tag places superscripts and subscripts to the right. Code these tags as follows:


<MATH>(display) 
<integral><subscript>(n=1)<superscript>( <pi><over>(2) ) <sp> 
    <prod><subscript>(n=1)<superscript>( <pi><over>(2) ) <sp> 
     <sum><subscript>(n=1)<superscript>( <pi><over>(2) ) 
<ENDMATH> 

This example produces the following output:
Sn=1^ <pi symbol> 2 <prod symbol>n=1^ <pi symbol> 2 <sum symbol>n=1^ <pi symbol> 2

The <INTEGRAL_NOLIMITS>, <PROD_NOLIMITS>, and <SUM_NOLIMITS> tags always place the subscripts and superscripts to the right of the signs, regardless of the math mode. Code these tags as follows:


<MATH>(display) 
<integral_nolimits><subscript>(n=1)<superscript>( <pi><over>(2) ) <sp> 
    <prod_nolimits><subscript>(n=1)<superscript>( <pi><over>(2) ) <sp> 
     <sum_nolimits><subscript>(n=1)<superscript>( <pi><over>(2) ) 
<ENDMATH> 

This example produces the following output:
S<nolimits symbol>n=1^ <pi symbol> 2 <prod symbol><nolimits symbol>n=1^ <pi symbol> 2 <sum symbol><nolimits symbol>n=1^ <pi symbol> 2

The <INTEGRAL_LIMITS>, <PROD_LIMITS>, and <SUM_LIMITS> tags always place the subscripts and superscripts above and below the signs, regardless of the math mode. Code these tags as follows:


<MATH>(display) 
<integral_limits><subscript>(n=1)<superscript>( <pi><over>(2) ) <sp> 
    <prod_limits><subscript>(n=1)<superscript>( <pi><over>(2) ) <sp> 
     <sum_limits><subscript>(n=1)<superscript>( <pi><over>(2) ) 
<ENDMATH> 

This example produces the following output:
S<limits symbol>n=1^ <pi symbol> 2 <prod symbol><limits symbol>n=1^ <pi symbol> 2 <sum symbol><limits symbol>n=1^ <pi symbol> 2

Mathematical Functions

In addition to the operations and special functions listed in Table 1-1, you can specify mathematical functions using any of the tags listed in Table 1-2. These tags all let you specify the tag with or without an argument. If you specify an argument, place it in parentheses following the function name. For example:


<MATH>(<SIN>(d)) 

This produces: <sin(d) symbol> .

Table 1-2 Tags for Mathematical Functions
Tag Function
<ARCCOS> <arccos symbol>
<ARCSIN> <arcsin symbol>
<ARCTAN> <arctan symbol>
<ARG> <arg symbol>
<COS> <cos symbol>
<COSH> <cosh symbol>
<COT> <cot symbol>
<COTH> <coth symbol>
<CSC> <csc symbol>
<DEG> <deg symbol>
<DET> <det symbol>
<DIM> <dim symbol>
<EXP> <exp symbol>
<GCD> <gcd symbol>
<HOM> <hom symbol>
<INF> <inf symbol>
<KER> <ker symbol>
<LG> <lg symbol>
<LIM> <lim symbol>
<LIMINF> <liminf symbol>
<LIMSUP> <limsup symbol>
<LN> <ln symbol>
<LOG> <log symbol>
<MAX> <max symbol>
<MIN> <min symbol>
<MOD> mod
<PMOD> <pmod symbol>n ¹
<PR> <Pr symbol>
<SEC> <sec symbol>
<SIN> <sin symbol>
<SINH> <sinh symbol>
<SUP> <sup symbol>
<TAN> <tan symbol>
<TANH> <tanh symbol>


¹Using the <PMOD> tag adds a space before the output of the tag, which is why the output of the tag is not aligned in the "Function" column of this table.

An example of using some of the tags from the previous table follows:


<LIST>(UNNUMBERED) 
 
<le><math>( 
<sin>2<math_char>(theta) 
     <equals>2<sin><math_char>(theta)<cos><math_char>(theta) 
) 
 
<le><math>( 
O(n <log>n <log><log>n) 
) 
 
<le><math>( 
<pr>(X >x)= <exp>(-x/<math_char>(mu)) 
) 
 
<le><math>( 
  <max><subscript>(1<math_char>(geq)n<math_char>(geq)m) 
  <log><subscript>(2)P<subscript>(n) 
) 
 
<le><math>( 
<lim><subscript>(x<to>0)<group>( 
         <sin>x<over>(x)) 
<equals>1 
) 
<endmath> 
 
<ENDLIST> 

These examples produce the following output:

  • <sin symbol><theta symbol> =2<sin symbol><theta symbol><cos symbol><theta symbol>
  • O(n <log symbol><log symbol><log symbol>
  • <Pr symbol><exp symbol><mu symbol>)
  • <max symbol>1=>n=>m <log symbol>2P_n
  • <lim symbol>x<to symbol> <sin symbol>
    x =1

Aligning Expressions

To align math expressions on the right and left side of an alignment point (usually an equal sign) so that the expressions are balanced, use the following tags:

  • <EQUALIGN>---begins an alignment section and enables the <ELINE> tag.
  • <ELINE>---takes an argument representing the left and right side of the equation. The first character in the second argument is the character upon which the alignment is based.
  • <ENDEQUALIGN>---terminates the alignment section.

For example:


<math> 
<EQALIGN> 
<eline>(H(f)\= 
 
<GROUP>(<LBAR><GROUP>(<FRACTION>(E(x)\E(0)))<RBAR> 
 
<SUBSCRIPT>(E(0)=e<SUPERSCRIPT>(j<MATH_CHAR>(OMEGA)t)))) 
 
<Eline>(\=<GROUP>(e<SUPERSCRIPT>(-<MATH_CHAR>(GAMMA)x))) 
<endeqalign> 
<ENDMATH> 
 

This example produces the following output:
<eqalign symbol> H(f)&= <left| symbol>E(x)
E(0)<right| symbol> _E(0)=e^j<omega symbol>t <cr symbol> &=e^-<gamma symbol>x <cr symbol>

Delimited Expressions

To produce delimited expressions in mathematics, you must use one of the following pairs of tags:

  • <LBAR> and <RBAR>---for opening and closing vertical bars
  • <LBRACE> and <RBRACE>---for opening and closing curly braces
  • <LBRACKET> and <RBRACKET>---for opening and closing square brackets
  • <LCEIL> and <RCEIL>---for opening and closing ceiling delimiters
  • <LFLOOR> and <RFLOOR>---for opening and closing floor delimiters
  • <LPAREN> and <RPAREN>---for opening and closing parentheses

The text formatter automatically assumes that text within these pairs is to be grouped, and it sizes the delimiters automatically.

For example:


<MATH>(display) 
<group>( 
   C<subscript>(dg) 
       ) = 
 
  <fraction>(<math_char>(partial)Q<subscript>(d)\
                            <math_char>(partial)V<subscript>(g)) 
 
 = 
  -C<subscript>(oxt) 
 
    [0.5 
              + 
    <lparen>f<subscript>(0) DVG  - 
         <group>(2f<subscript>(0) V<subscript>(com)<over>(f<subscript>(1)) 
         ) 
    <rparen> 
    <group>(1 <over>(f<subscript>(1)<superscript>(2))) 
] 
 
<ENDMATH> 

This example produces the following output:
C_dg = <partial symbol>Q_d
<partial symbol>V_g = -C_oxt <left[0.5 symbol> + <left symbol>0 DVG - 2f_0 V_com
f_1 <right symbol> 1
f_1^2 <right] symbol>

Matrixes and Cases

You can construct matrixes and case constructs using the formats provided with <MATRIX> and <CASES> tags.

The <MATRIX> tag has the following format:

  • <MATRIX>(
    • BRACES
    • BRACKETS
    • VERTICAL_RULE
    )

The keywords BRACES, BRACKETS, and VERTICAL_RULE override the default matrix delimiter, parentheses.

When you construct a matrix, you must specify each row in the matrix using the <MATRIX_ROW> tag. You can specify a maximum of nine columns for the row. Terminate the matrix with the <ENDMATRIX> tag. For example:


<matrix>(brackets) 
 <matrix_row>(A) 
 <matrix_row>(B) 
 <matrix_row>(C) 
 <matrix_row>(D) 
<endmatrix> 

This simple, one-column matrix produces the following output:
<left[ symbol><matrix symbol> A<cr symbol> B<cr symbol> C<cr symbol> D<cr symbol> <right] symbol>

A more complex example shows how to code a multicolumn matrix:


<math>(display) 
<det><matrix>(vertical_rule) 
  <matrix_row>(c<subscript>(0)\c<subscript>(1)\
               c<subscript>(2)\<dots>\c<subscript>(n)) 
  <matrix_row>(c<subscript>(1)\c<subscript>(2)\
               c<subscript>(3)\<dots>\c<subscript>(n+1)) 
  <matrix_row>(c<subscript>(2)\c<subscript>(3)\
               c<subscript>(4)\<dots>\c<subscript>(n+2)) 
  <matrix_row>(<vdots>\<vdots>\<vdots>\<vdots>) 
  <matrix_row>(c<subscript>(n)\c<subscript>(n+1)\
               c<subscript>(n+2)\<dots>\c<subscript>(2n)) 
  <endmatrix> > 0. 
<endmath> 
 

This produces the following output:
<det symbol> <left| symbol><matrix symbol> c_0&c_1& c_2&...&c_n<cr symbol> c_1&c_2& c_3&...&c_n+1<cr symbol> c_2&c_3& c_4&...&c_n+2<cr symbol> <vdots symbol><vdots symbol><vdots symbol><vdots symbol><cr symbol> c_n&c_n+1& c_n+2&...&c_2n<cr symbol> <right| symbol> > 0.

The following example shows how to code a multicolumn matrix with fractions:


<math>(display) 
<matrix>(brackets) 
<matrix_row>(4<over>(4<minus>6)\2<over>(6<minus>4)) 
<matrix_row>(3<over>(6<minus>4)\1<over>(4<minus>6)) 
<endmatrix> = 
<matrix>(brackets) 
<matrix_row>(4<over>(<minus>2)\2<over>(2)) 
<matrix_row>(3<over>(2)\1<over>(<minus>2)) 
<endmatrix> = 
<matrix>(brackets) 
<matrix_row>(<minus>2\<sp>1) 
<matrix_row>(1.5\<minus>.5) 
<endmatrix> 
<endmath> 
 

This produces the following output:
<left[ symbol><matrix symbol> 4
4-6&2

6-4<cr symbol> 3

6-4&1

4-6<cr symbol> <right] symbol> = <left[ symbol><matrix symbol> 4
-2&2

2<cr symbol> 3

2&1

-2<cr symbol> <right] symbol> = <left[ symbol><matrix symbol> -2& 1<cr symbol> 1.5&-.5<cr symbol> <right] symbol>

The <CASES> tag is similar to the <MATRIX> tag, but it produces only a large left-hand brace; there is no closing delimiter. The following example shows how to use the <CASES> tag and its related tags:


<MATH>(display) 
<cases> 
<case_row>(1/3\if\0> x\;) 
<case_row>(2/3\if\3< x\;) 
<case_row>(0\elsewhere.) 
<endcases> 
<ENDMATH> 

This example produces the following output:
{=<lbrace symbol><cases symbol> 1/3&if
0> x; <cr symbol> 2/3&if 3< x ; <cr symbol> 0&elsewhere. <cr symbol>


Examples

The following example illustrates a simple mathematical expression used in the context of a sentence.
#1

The area of a circle is calculated using the 
formula <MATH>(a<equals><pi>r<superscript>(2)). 
 

This example produces the following output:

The circumference of a circle is calculated using the formula c=<pi symbol>2 .

The following example shows how to use the <MATH>(DISPLAY) tag. Note that the parenthetical expression following the first <MINUS> tag must have a space in front of it; otherwise, the expression will be interpreted as an argument to the <MINUS> tag.

#2

<MATH>(DISPLAY) 
vsize <equals> psize <minus>(<minus>topglue) <minus> topdepth <minus> footerglue 
<ENDMATH> 
 

This example produces the following output:
vsize = psize - (-topglue) - topdepth - footerglue

The following example shows how to use the <MATH> tag in a list.

#3

<LIST>(NUMBERED) 
<le><MATH>(1<over>(2)) 
<le><MATH>(n+1<over>(3)) 
<le><MATH>(<choose>(N+1\3)) 
<le><MATH>(<sum><subscript>(n=1)<superscript>(3)Z<subscript>(n)<superscript>(2)) 
<ENDLIST> 
 

This example produces the following output:

  1. 1
    2
  2. n+1
    3
  3. N+13
  4. <sum symbol>n=1^³Z_n^²

The following example illustrates how to use the <GROUP> tag to indicate the order of operation.

#4

<MATH>(DISPLAY) 
<GROUP>( 
a<over>(x<plus>y<superscript>(3)) 
) 
   <EQUALS> <SQRT>(<times><pi>) 
<ENDMATH> 
 

This example produces the following output:
a
x+y^3 = <sqrt symbol>*<pi symbol>

Note what the output would be if you did not use the <GROUP> tag:
a
x+y^3 = <sqrt symbol>*<pi symbol>

In the following example, the characters representing the mathematical operations are used directly.

#5

<MATH>(total = A + B - C * D / E) 
 

This example produces the following output:
total = A + B - C * D / E .
Note that this is equivalent to the following:


<MATH>(total <EQUALS> A <PLUS> B <MINUS> C <TIMES> D <DIVIDED_BY> E) 
 

The following example shows how to use the <MATH> tag to generate true minus signs in your SDML files.

#6

<MATH>(--)This begins a comment line. 
 

This example produces the following output:

  • -- This begins a comment line.

The following example shows how to use the <REFERENCE> tag to refer to an equation.

#7

<MATH>(DISPLAY\math_equation) 
math = numbers + letters 
<ENDMATH> 
<p>As <REFERENCE>(math_equation) shows, the relationship between 
letters and math must include numbers. 
 

This example produces the following output:
math = numbers + letters <eqno symbol>(1-1)

As (1-1) shows, the relationship between letters and math must include numbers.


Previous Next Contents Index