HTML Substitution Tags for Math
Six tags are provided for displaying math notation using HTML substitution. Inside each of these tags, you can use the math notation described in.
Expression | Code | Example | Display |
|---|---|---|---|
General math | | | 9 |
Fractions |
Use WaTeX to display a fraction in the numerator or denominator of another fraction or under a square root. | | |
Square roots | | | |
Matrices |
Use | to separate columns and; to indicate the end of a row. Ensure that there is a space between the contents of a cell and the | or; delimiters. | | |
Determinants |
Use | to separate columns and; to indicate the end of a row. Ensure that there is a space between the contents of a cell and the | or; delimiters. | | |
Long division | | |
Notation That Can Be Used in HTML Substitution Tags for Math
Except where noted, you can use all of the notation in the following table in each of the HTML substitution tags for displaying math notation. Math variables are automatically italicized. You can also use any of the <s> tags described in Add Symbols to Questions.
Expression | Code | Example | Display |
|---|---|---|---|
Perl variables |
Use braces or add a space after each variable name to distinguish it from other text. Do not use the lowercase <eqn> tag. |
| 9 |
Addition | | |
|
Subtraction | | |
|
Multiplication |
|
|
|
Division |
|
|
|
Exponents (superscripts) |
If the superscript is more than a single number or a single variable, enclose it in parentheses. |
|
|
Bases (subscripts) |
If the subscript is more than a single number or a single variable, enclose it in parentheses. |
|
|
Parentheses |
In cases where a set of parentheses is required to format notation, such as with exponents, use two pairs of parentheses to explicitly display the parentheses. |
| 4( |
Absolute value |
You cannot use vertical bars to specify absolute values in in the <h:longdiv> tag. |
| |x| abs(x) |
Square root |
You cannot use sqrt() in the <h:sqrt> or <h:longdiv> tags. | | |
Factorial | ! | | 5! |
Trigonometry |
When arccos, arcsin, and so on are abbreviated like acos or asin, the function is displayed using exponential notation, like sin-1 |
| sin-1 |
Exponential function | | |
|
Logarithms |
|
| ln(e |
Equality | | |
|
Inequality |
|
|
|
Approximate | | |
|
Infinity | | | ∞ |
Greek | Type the name of lowercase Greek letters in lowercase. Type the names of uppercase Greek letters in proper case. |
| π Ω |