Your support for our advertisers helps cover the cost of hosting, research, and maintenance of this document

Formatting Information — An introduction to typesetting with LATEX

Appendix D: ASCII characters

The American Standard Code for Information Interchange (ASCII) was invented in 1963, and after some development settled down in 1984 as standard X3.4 of American National Standards Institute (ANSI). It represents the 95 codes for the printable characters (A-Z, a-z, 0-9, and punctuation) of the unaccented Latin alphabet, plus 33 internal ‘control characters’ originally intended for the control of computers, programs, and external devices like printers, screens, disks, modems, etc.

Many other character sets (strictly speaking, ‘character repertoires’) have been used for accented Latin characters and for other (non-Latin) writing systems, for representing the symbols people use when writing text on computers, but the current standard is ISO 10646 (Unicode), which covers pretty much all the marks the human race makes when communicating, and you SHOULD use only Unicode UTF-8 when writing for LATEX, and AVOID obsolete codepages like Windows-1252, Mac Roman 8, and DEC Multinational.

Although the TEX and LATEX file formats can easily be used with many other encoding systems (see the discussion of the inputenc package in § 1.9 above), their markup is based on ASCII. It is therefore important that you know where to find all 95 of the printable ASCII characters, as some of them are not often used in other text-formatting systems. The printable characters are:

  • Uppercase (capital) letters A–Z;

  • Lowercase (small) letters a–z;

  • Digits 0–9;

  • Punctuation, white-space, and symbols:

    • TAB, space, newline (line-end), linefeed;

    • exclamation mark, unidirectional apostrophe, unidirectional quote, comma, hyphen, fullpoint (period), slash, colon, semicolon, question mark, at (@)

    • left and right parentheses, left and right square brackets, left and right curly braces;

    • hash, dollar, percent, ampersand, asterisk;

    • plus, less-than, equals, greater-than, backslash, caret, underscore, grave accent (backtick), and tilde.

Other ASCII characters MUST NOT be used (the invisible control characters), but using LuaLATEX all printable Unicode characters are recognised (but you will of course still need extra fonts for non-Latin characters).