Next / Previous / Contents / Shipman's homepage

18. Special characters

A wide variety of special symbols are available in DocBook. These character entities always start with an ampersand (&) and end with a semicolon (;).

The only certain way to obtain a specific character is to use its Unicode code point value, which is an integer. There are two formats, depending on whether you prefer decimal (N) or hexadecimal (H) representation:

&#N;
&#xH;

For example, the Unicode character whose official name is “NO-BREAK SPACE”, has code point decimal 160, hexadecimal A0. So to get this character you may use either   or  .

One drawback to this method is that code points have no mnemonic value. A better way is to use a named XML character entity. Your document must include a declaration inside its DOCTYPE that defines the name and the equivalent code point. For example, to define the entity   as NO-BREAK SPACE, you would add this entity declaration:

<!ENTITY  nbsp         "&#x00A0;">

The ISO 9573-2003 standard defines a huge set of named entities. For a complete catalog of these entities, see The ISO 9573-2003 Unicode entity group, which also includes a downloadable file of all the entity defines that you can include in your document. This includes extended natural language characters like “á” and “Σ”, common symbols like “†”, and numerous science and engineering symbols: ℏ, ∞, ℵ.