WebAssign provides several special tags that allow you to render specific kinds of notation using HTML substitution. Like WaTeX — and unlike LaTeX or <symimage> markup — you can include answer boxes in your formatted notation. Using HTML substitution is often simpler than using WaTeX, but its functionality is also much more limited than WaTeX.
- You cannot use HTML substitution tags inside of other HTML substitution tags, WaTeX, LaTeX, or <symimage> markup.
- You cannot use WaTeX, LaTeX, or <symimage> markup inside of HTML substitution tags.
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 Notation That Can Be Used in HTML Substitution Tags for Math.
Expression |
Code |
Example |
Display |
---|---|---|---|
General math |
|
|
9x2 |
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. |
|
9x + 1 |
Addition |
|
|
x + 1 |
Subtraction |
|
|
x − 1 |
Multiplication |
|
|
x · 2 |
Division |
|
|
x ÷ 2 |
Exponents (superscripts) |
If the superscript is more than a single number or a single variable, enclose it in parentheses. |
|
x2 |
Bases (subscripts) |
If the subscript is more than a single number or a single variable, enclose it in parentheses. |
|
x2 |
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(x + 1) |
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-1x. |
|
sin-1x |
Exponential function |
|
|
e2 |
Logarithms |
|
|
ln(ex) = x |
Equality |
|
|
a = 2πr |
Inequality |
|
|
x > 3 |
Approximate |
|
|
x ≈ 3 |
Infinity |
|
|
∞ |
Greek |
Type the name of lowercase Greek letters in lowercase. Type the names of uppercase Greek letters in proper case. |
|
π |