This page explains the patterns behind how HTML, TeX, and Microsoft Word represent accented letters. The page begins with explanations for HTML, LaTeX, and Word and concludes with a chart summarizing how accents are handled across languages.
HTML uses “entities”, escape sequences, to represent accented letters (diacritics) with only ASCII characters. For example, à is encoded as
à. The general pattern for constructing an HTML entity for an accented letter is
& + letter + accent code + ;
The letters that can be accented this way are a, c, e, i, n, o, u, and y, in both their lower-case and upper-case forms.
The possible accent codes are grave, acute, circ (circumflex), tilde, and uml (umlaut).
Not all combinations of letters and accents are possible. For example, the entity
à places a grave accent on the letter “a”, but there is no entity
&ngrave; to put such an accent on top of a letter “n.”
There are three additional accent codes that can only be applied to a single letter. The code ring can only be applied to “a.”
å produces å and
Å produces Å. The cedil (cedilla) code can only be applied to “c.”
ç produces ç and
Ç produces Ç. Finally, slash only applies to “o.”
ø produces ø and
Ø produces Ø.
The æ ligature follows a pattern similar to accents:
æ produces æ and
Æ produces Æ.
Note that most HTML entities are not legal in XHTML. See Greek letters in HTML, XML, TeX, and Unicode for an explanation of how to denote Unicode symbols in ASCII text in XML.
TeX uses a consistent pattern for adding diacritical marks to letters:
\ + code + letter
The code is a single character indicating the kind of diacritical mark to add. Unlike HTML entities, any mark can be added to any letter. Letters may be upper-case or lower-case.
TeX supports 14 diacritical mark codes. The ones corresponding to HTML entities listed above are
" (umlaut), and
Examples: jalapeño is written
jalape\~no in TeX. garçon is written
\AE for æ and Æ,
\O for ø and Ø, and
\AA for å and Å.
Note that the above remarks only apply to text mode. LaTeX handles accents differently in math mode.
Microsoft Word is nearly identical to HTML in the accent-letter combinations it supports, but similar to TeX in the key strokes that it uses.
To add a grave accent to a vowel in Word, hold down the control key and press
` (sometimes call the back tick or back quote symbol, often in the top left of a US keyboard) then type the letter to accent. In short,
` is the escape sequence.
' for an acute accent,
^ for circumflex,
~ for tilde,
: for umlaut, and
, for cedilla.
& for æ and Æ,
/ for ø and Ø, and
@ for å and Å.