The code listed in this table is valid in the <watex>
tag. Unless
specified otherwise, all of the examples in the following table are shown as they
are displayed
when using math mode.
- Prerequisites
- Display Notation with WaTeX
<s:space>
.
Expression |
Code |
Example |
Display |
---|---|---|---|
Perl variables |
Use braces when the Perl variable is followed by other text. Use <EQN> to display the variable in black. |
|
35 35x 35 |
Roman text, WebAssign tags, or HTML |
Not needed unless using math mode. Not needed for answer placeholder string |
|
2x km |
Answer placeholder strings |
This cannot be done with <symimage> or LaTeX. |
|
|
Line breaks |
Use Consecutive line breaks are treated as a single line break. To add more vertical
spacing, use |
|
3x 4y |
Line breaks with vertical spacing |
Adds a line break with the specified amount of space between the lines. Do not add a space between the number and the unit. For on-screen display, ems and pixels are preferred units, but you can also use cm, in, mm, pc, or pt. |
|
3x 4y |
Addition |
|
|
x + 1 |
Subtraction |
|
|
x − 1 |
Multiplication |
|
|
x · 2 x × 2 2x |
Division |
|
|
x ÷ 2 |
Fractions |
You can put a fraction in the numerator or denominator of another fraction. |
|
|
Binomial |
|
|
|
Combinations, permutations, and isotopes (over/under notation) |
This is sometimes used with |
|
|
Exponents (superscripts) |
If the superscript is more than 1 character, enclose it in braces {}. |
|
x2 x12 |
Bases (subscripts) |
If the subscript is more than 1 character, enclose it in braces {}. |
|
x2 x(y + 3) |
Parentheses |
Specify the optional size as an integer from 1 through 9. |
|
(x) |
Brackets |
Specify the optional size as an integer from 1 through 9. |
|
[x] |
Braces |
Specify the optional size as an integer from 1 through 9. |
|
{x} |
Angle brackets |
Specify the optional size as an integer from 0 through 9. |
|
|
Absolute values (vertical bars) |
Specify the optional size as an integer from 1 through 9. |
|
|x| |
Magnitude (double vertical bars) |
Specify the optional size as an integer from 0 through 9. |
|
|
Greatest integer function (double brackets) |
Specify the optional size as an integer from 1 through 9. |
|
|
Square root |
Specify the optional size in positive integers; the height is approximately size lines. |
|
|
Nth root |
Specify the optional size in positive integers; the height is approximately size lines. |
|
|
Factorial |
|
|
5! |
Trigonometry |
\arccos, \arcsin, and so on can be abbreviated like \acos or \asin, but the longer version of the function name is displayed. |
|
arcsin x cos θ csch a tan(45°) coth-1(x) |
Exponential function |
|
|
e2 |
Logarithms |
|
|
ln(ex) = x log(1000) = 3 log2(128) = 7 |
Equality |
|
|
a = 2πr |
Inequality |
|
|
x > 3 x < 3 x ≥ 3 x ≤ 3 x ≠ 3 x 3 x 3 |
Approximate |
|
|
x ≈ 3 |
Plus or minus |
|
|
x ± 3 |
Minus or plus |
|
|
x 3 |
Infinity |
|
|
∞ |
Greek |
|
|
π |
Capital Greek |
|
|
Ω |
Arrays |
For more information, see Create WaTeX Arrays and Matrices. |
|
|
Matrices |
For more information, see Create WaTeX Arrays and Matrices. |
|
|
Determinants |
For more information, see Create WaTeX Arrays and Matrices. |
|
det(A) = |A|
|
Ellipses |
|
|
|
Overline |
|
|
0.3 |
Indefinite summation |
|
|
|
Definite summation |
|
|
|
Indefinite integrals |
|
|
|
Definite integrals |
|
|
|
Limits |
|
|
|
Right arrows |
|
|
→ |
Arrows over notation |
|
|
|
Harpoons over notation |
|
|
|
Middle dot |
|
|
· |
Circle |
|
|
|
Non-breaking text |
|
|
1.2 × 102 |
Italics |
Not needed in math mode. |
|
text italicized text |
Boldface |
|
|
boldface |
Strikeout |
|
|
strikeout |
Underline |
|
|
underlined |