next up previous contents
Next: Declaring math sizes Up: Math fonts Previous: Declaring symbol fonts

   
Declaring math symbols


\DeclareMathSymbol {<symbol>} {<type>} {<sym-font>} {<slot>}

The <symbol> can be either a single character such as `>>', or a macro name, such as \sum. Defines the <symbol> to be a math symbol of type <type> in slot <slot> of symbol font <sym-font>. The <type> can be given as a number or as a command:

Type Meaning Example
0 or \mathord Ordinary $\alpha$
1 or \mathop Large operator $\sum$
2 or \mathbin Binary operation $\times$
3 or \mathrel Relation $\leq$
4 or \mathopen Opening $\langle$
5 or \mathclose Closing $\rangle$
6 or \mathpunct Punctuation ;
7 or \mathalpha Alphabet character A
Only symbols of type \mathalpha will be affected by math alphabet commands: within the argument of a math alphabet command they will produce the character in slot <slot> of that math alphabet's font. Symbols of other types will always produce the same symbol (within one math version). \DeclareMathSymbol allows a macro <symbol> to be redefined only if it was previously defined to be a math symbol. It also checks that the <sym-font> is a declared symbol font. Example:
   \DeclareMathSymbol{\alpha}{0}{letters}{"0B}
   \DeclareMathSymbol{\lessdot}{\mathbin}{AMSb}{"0C}
   \DeclareMathSymbol{\alphld}{\mathalpha}{AMSb}{"0C}

\DeclareMathDelimiter {<cmd>} {<type>} {<sym-font-1>} {<slot-1>}
{<sym-font-2>} {<slot-2>}

Defines <cmd> to be a math delimiter where the small variant is in slot <slot-1> of symbol font <sym-font-1> and the large variant is in slot <slot-2> of symbol font <sym-font-2>. Both symbol fonts must have been declared previously. Checks that <sym-font-i> are both declared symbol fonts. If TEX is not looking for a delimiter, <cmd> is treated just as if it had been defined with \DeclareMathSymbol using <type>, <sym-font-1> and <slot-1>. In other words, if a command is defined as a delimiter then this automatically defines it as a math symbol.

In case <cmd> is a single character such as `[', the same syntax is used. Previously the {<type>} argument was not present (and thus the corresponding math symbol declaration had to be provided seperately). Example:

   \DeclareMathDelimiter{\langle}{\mathopen}{symbols}{"68}
                                            {largesymbols}{"0A}
   \DeclareMathDelimiter{(}      {\mathopen}{operators}{"28}
                                            {largesymbols}{"00}

\DeclareMathAccent {<cmd>} {<type>} {<sym-font>} {<slot>}

Defines <cmd> to act as a math accent. The accent character comes from slot <slot> in <sym-font>. The <type> can be either \mathord or \mathalpha; in the latter case the accent character changes font when used in a math alphabet. Example:

   \DeclareMathAccent{\acute}{\mathalpha}{operators}{"13}
   \DeclareMathAccent{\vec}{\mathord}{letters}{"7E}

\DeclareMathRadical {<cmd>} {<sym-font-1>} {<slot-1>}
{<sym-font-2>} {<slot-2>}

Defines <cmd> to be a radical where the small variant is in slot <slot-1> of symbol font <sym-font-1> and the large variant is in slot <slot-2> of symbol font <sym-font-2>. Both symbol fonts must have been declared previously. Example (probably the only use for it!):

   \DeclareMathRadical{\sqrt}{symbols}{"70}{largesymbols}{"70}

next up previous contents
Next: Declaring math sizes Up: Math fonts Previous: Declaring symbol fonts
LaTeX3 Mail Server
1999-07-12