Common Fractions
This section describes XML coding for common fractions that are typeset using a slanted bar between the numerator and denominator and are roughly the same height as other characters. Example: ½. Fractions such as these should be captured using Unicode characters, not inline images.
Common fractions can usually be represented using Unicode characters instead of inline images. Common fractions captured using Unicode characters will typically display better online. The Unicode characters also work better than images for copying and pasting, searching, and screen readers.
Almost any character or symbol, including the letters, numbers and punctuation of many
languages, can be coded in XML using Unicode. The basic format is &code; (ampersand code
semicolon). Many commonly used characters have mnemonic names supported by TF JATS, and the
name can be used as the code. For example, the multiplication symbol can be coded as
×. Not all characters have mnemonic names, but every Unicode
character has a hex number that we can use. The format to use the hex number is ode;
(ampersand hash x code semicolon). For example, the multiplication symbol can be coded using
its hex number as ×.
Unicode has several characters to represent common (or vulgar) fractions that are typeset at roughly the same height as other characters and use a slanted bar between the numerator and denominator. Beyond these defined fraction characters, any fraction can be coded using combinations of characters as described below.
You can use superscript number characters to make the top part of the fraction, a fraction
slash, and subscript number characters to make the bottom part of the fraction. The fraction
slash character is ⁄ or ⁄. This
character has special dimensions that allow characters on the left and right to overlap the
same space, which allows the fraction to display correctly.
The way to code this example in XML using Unicode hex numbers is:
11⁷⁄₁₆ ×
9⁷⁄₁₆
Or, you can use mnemonic names where possible:
11⁷⁄₁₆ ×
9⁷⁄₁₆
This XML when rendered will display:
11⁷⁄₁₆ × 9⁷⁄₁₆
Note that whole numbers should use normal digits, and spaces should be placed where you expect there to be space.
The table below lists the codes for characters frequently used in fractions.
| Description | Display | Hex Numeric Character Reference | Mnemonic Character Entity Reference |
|---|---|---|---|
| multiplication sign | × | × | × |
| fraction slash | ⁄ | ⁄ | ⁄ |
| superscript zero | ⁰ | ⁰ | |
| superscript one | ¹ | ¹ | |
| superscript two | ² | ² | |
| superscript three | ³ | ³ | |
| superscript four | ⁴ | ⁴ | |
| superscript five | ⁵ | ⁵ | |
| superscript six | ⁶ | ⁶ | |
| superscript seven | ⁷ | ⁷ | |
| superscript eight | ⁸ | ⁸ | |
| superscript nine | ⁹ | ⁹ | |
| subscript zero | ₀ | ₀ | |
| subscript one | ₁ | ₁ | |
| subscript two | ₂ | ₂ | |
| subscript three | ₃ | ₃ | |
| subscript four | ₄ | ₄ | |
| subscript five | ₅ | ₅ | |
| subscript six | ₆ | ₆ | |
| subscript seven | ₇ | ₇ | |
| subscript eight | ₈ | ₈ | |
| subscript nine | ₉ | ₉ | |
| vulgar fraction one quarter | ¼ | ¼ | |
| vulgar fraction one half | ½ | ½ | |
| vulgar fraction three quarters | ¾ | ¾ |