Fractions in Unicode
There are Unicode characters for a few fractions, such as . This looks a little better than 1/2, depending on the context.
Here's the Taylor series for log(1 + x) written in pure HTML:
log(1 + x) = x - x^2 + x^3 - 1/4x + x -
See this post for how the exponents were made.
Notice that the three dots on the end are centered vertically, like \cdots in LaTeX. This was done with ⋯ (U+22EF).
Available fractionsThe selection of available fraction number forms is small and a little strange.
There are characters for fractions with denominator d equal to 2, 3, 4, 5, 6, and 8, with numerators 1 through d-1, except for fractions that can be reduced.
If d = 7, 9, or 10, there's a character for 1/d but not for fractions with numerators other than 1. For example, there is a character for but not for 2/7.
HTML EntitiesFor denominators 2, 3, 4, 5, 6, and 8 the HTML entity for characters is easy: they all have the form
& frac <n> <d> ;
where n is the numerator and d is the denominator. For example, ⅗ is the HTML entity for .
There are no HTML entities for 1/7, 1/9, or 1/10.
Related postsThe post Fractions in Unicode first appeared on John D. Cook.