I was talking to couple of friends about blogs in mathematics classrooms and they both asked "How do you typeset math in HTML". I had to say I had no idea. We use LaTeX, but that doesn't translate to HTML, unfortunately. So, instead of asking around, I tried to look it up. The is the first thing I discovered, courtesy of
Clark Grubb , and I guess it should be accessible to high school and college students. Scroll down to find LaTeX lover's solution :)
The character entities can all be invoked via their numeric or alphabetic names. For example, bothx ∈ A
and x ∈ A
will displayx ∈ A
A radical can be done. The HTML√<span style="text-decoration: overline">a + b</span>
will display as√
a + bBelow is a partial list of the character entities specificied in the W3C Character Entity References for HTML 4. It includes most of the characters of interest to the mathematician.Generic Character Entities
| # | alpha | sym | IE6 | FF | description |
|---|
| 38 | amp | & | Y | Y | ampersand |
| 160 | nbsp |
| Y | Y | no-break space = non-breaking space |
| 8194 | ensp | | N | ? | en space |
| 8195 | emsp | | N | ? | em space |
| 8201 | thinsp | | N | ? | thin space |
| 8204 | zwnj |
| ? | ? | zero width non-joiner |
| 8205 | zwj |
| ? | ? | zero width joiner |
| 8211 | ndash | – | Y | Y | en dash |
| 8212 | mdash | — | Y | Y | em dash |
| 8230 | hellip | … | Y | Y | horizontal ellipsis = three dot leader |
Mathematical Character Entities
| # | alpha | sym | IE6 | FF | description |
|---|
| 60 | lt | < | Y | Y | less-than sign |
| 62 | gt | > | Y | Y | greater-than sign |
| 176 | deg | ° | Y | Y | degree sign |
| 177 | plusmn | ± | Y | Y | plus-minus sign = plus-or-minus sign |
| 215 | times | × | Y | Y | multiplication sign |
| 216 | Oslash | Ø | Y | Y | latin capital letter O with stroke = latin capital letter O slash |
| 247 | divide | ÷ | Y | Y | division sign |
| 8226 | bull | • | Y | Y | bullet = black small circle |
| 8465 | image | ℑ | N | Y | blackletter capital I = imaginary part |
| 8472 | weierp | ℘ | N | Y | script capital P = power set = Weierstrass p |
| 8476 | real | ℜ | N | Y | blackletter capital R = real part symbol |
| 8501 | alefsym | ℵ | N | Y | alef symbol = first transfinite cardinal |
| 8592 | larr | ← | Y | Y | leftwards arrow |
| 8593 | uarr | ↑ | Y | Y | upwards arrow |
| 8594 | rarr | → | Y | Y | rightwards arrow |
| 8595 | darr | ↓ | Y | Y | downwards arrow |
| 8596 | harr | ↔ | Y | Y | left right arrow |
| 8709 | empty | ∅ | N | Y | empty set = null set = diameter |
| 8711 | nabla | ∇ | Y | Y | nabla = backward difference |
| 8712 | isin | ∈ | Y | Y | element of |
| 8713 | notin | ∉ | N | Y | not an element of |
| 8715 | ni | ∋ | Y | Y | contains as member |
| 8719 | prod | ∏ | Y | Y | n-ary product = product sign |
| 8721 | sum | ∑ | Y | Y | n-ary sumation |
| 8722 | minus | − | Y | Y | minus sign |
| 8730 | radic | √ | Y | Y | square root = radical sign |
| 8734 | infin | ∞ | Y | Y | infinity |
| 8736 | ang | ∠ | Y | Y | angle |
| 8746 | cup | ∪ | Y | Y | union = cup |
| 8747 | int | ∫ | Y | Y | integral |
| 8764 | sim | ∼ | Y | Y | tilde operator = varies with = similar to |
| 8773 | cong | ≅ | N | Y | approximately equal to |
| 8776 | asymp | ≈ | Y | Y | almost equal to = asymptotic to |
| 8800 | ne | ≠ | Y | Y | not equal to |
| 8801 | equiv | ≡ | Y | Y | identical to |
| 8804 | le | ≤ | Y | Y | less-than or equal to |
| 8805 | ge | ≥ | Y | Y | greater-than or equal to |
| 8834 | sub | ⊂ | Y | Y | subset of |
| 8835 | sup | ⊃ | Y | Y | superset of |
| 8836 | nsub | ⊄ | N | Y | not a subset of |
| 8838 | sube | ⊆ | Y | Y | subset of or equal to |
| 8839 | supe | ⊇ | Y | Y | superset of or equal to |
| 8853 | oplus | ⊕ | Y | Y | circled plus = direct sum |
| 8855 | otimes | ⊗ | N | Y | circled times = vector product |
| 8869 | perp | ⊥ | Y | Y | up tack = orthogonal to = perpendicular |
| 8901 | sdot | ⋅ | N | Y | dot operator |
| 8968 | lceil | ⌈ | N | Y | left ceiling = apl upstile |
| 8969 | rceil | ⌉ | N | Y | right ceiling |
| 8970 | lfloor | ⌊ | N | Y | left floor = apl downstile |
| 8971 | rfloor | ⌋ | N | Y | right floor |
| 9001 | lang | 〈 | N | Y | left-pointing angle bracket = bra |
| 9002 | rang | 〉 | N | Y | right-pointing angle bracket = ket |
Greek Letter Character Entities
Both IE6 and Firefox implement all of these characters.
| # | alpha | sym | description |
|---|
| 913 | Alpha | Α | greek capital letter alpha |
| 914 | Beta | Β | greek capital letter beta |
| 915 | Gamma | Γ | greek capital letter gamma |
| 916 | Delta | Δ | greek capital letter delta |
| 917 | Epsilon | Ε | greek capital letter epsilon |
| 918 | Zeta | Ζ | greek capital letter zeta |
| 919 | Eta | Η | greek capital letter eta |
| 920 | Theta | Θ | greek capital letter theta |
| 921 | Iota | Ι | greek capital letter iota |
| 922 | Kappa | Κ | greek capital letter kappa |
| 923 | Lambda | Λ | greek capital letter lambda |
| 924 | Mu | Μ | greek capital letter mu |
| 925 | Nu | Ν | greek capital letter nu |
| 926 | Xi | Ξ | greek capital letter xi |
| 927 | Omicron | Ο | greek capital letter omicron |
| 928 | Pi | Π | greek capital letter pi |
| 929 | Rho | Ρ | greek capital letter rho there is no Sigmaf, and no U+03A2 character either |
| 931 | Sigma | Σ | greek capital letter sigma |
| 932 | Tau | Τ | greek capital letter tau |
| 933 | Upsilon | Υ | greek capital letter upsilon |
| 934 | Phi | Φ | greek capital letter phi |
| 935 | Chi | Χ | greek capital letter chi |
| 936 | Psi | Ψ | greek capital letter psi |
| 937 | Omega | Ω | greek capital letter omega |
| 945 | alpha | α | greek small letter alpha |
| 946 | beta | β | greek small letter beta |
| 947 | gamma | γ | greek small letter gamma |
| 948 | delta | δ | greek small letter delta |
| 949 | epsilon | ε | greek small letter epsilon |
| 950 | zeta | ζ | greek small letter zeta |
| 951 | eta | η | greek small letter eta |
| 952 | theta | θ | greek small letter theta |
| 953 | iota | ι | greek small letter iota |
| 954 | kappa | κ | greek small letter kappa |
| 955 | lambda | λ | greek small letter lambda |
| 956 | mu | μ | greek small letter mu |
| 957 | nu | ν | greek small letter nu |
| 958 | xi | ξ | greek small letter xi |
| 959 | omicron | ο | greek small letter omicron |
| 960 | pi | π | greek small letter pi |
| 961 | rho | ρ | greek small letter rho |
| 962 | sigmaf | ς | greek small letter final sigma |
| 963 | sigma | σ | greek small letter sigma |
| 964 | tau | τ | greek small letter tau |
| 965 | upsilon | υ | greek small letter upsilon |
| 966 | phi | φ | greek small letter phi |
| 967 | chi | χ | greek small letter chi |
| 968 | psi | ψ | greek small letter psi |
| 969 | omega | ω | greek small letter omega |
Immediately after stealing all this code from Clark (thanks a bunch), I ran into Flip Tomato's Blog. This was an absolute gem, as it contained the following link: mimeTeX. Score! I better get this running on my computers. If anybody has better solutions, let me know.
Technorati tags:
tex,
math,
type math