TeX fonts usually have a slot dedicated to a “dotless i”, which is used for adding accents not already provided as precomposed glyphs. The command \i
produces this glyph.
I assume LaTeX, because plain TeX doesn't really have support for different font encodings than the traditional Knuth one.
Recent versions of the kernel and of the base packages support several composites freeing from the need to use \i
. For instance, ot1enc.def
has
\DeclareTextComposite{\.}{OT1}{i}{`\i}
\DeclareTextComposite{\.}{OT1}{\i}{`\i}
\DeclareTextCompositeCommand{\`}{OT1}{i}{\@tabacckludge`\i}
\DeclareTextCompositeCommand{\'}{OT1}{i}{\@tabacckludge'\i}
\DeclareTextCompositeCommand{\^}{OT1}{i}{\^\i}
\DeclareTextCompositeCommand{\"}{OT1}{i}{\"\i}
which means you can type
\.i \`i \'i \^i \"i
to get “i”, “ì”, “í”, “î” and “ï” respectively. The inputs
\.{\i} \`{\i} \'{\i} \^{\i} \"{\i}
will do exactly the same. This is probably the reason why you have never seen \i
.
With the T1 encoding the set of composites is the same (but all of them point to a single glyph and not to a composite one).
On the other hand, using UTF-8 as input allows to use directly essentially all accents over “i”:
ì í î ï ī ĭ
and perhaps some others. However, “classical” input for the last two characters needs \i
, so you have to input \={\i}
and \u{\i}
(no TeX font provides the precomposed glyphs).
There is also \j
for the “dotless j”, but there is no precomposed glyph for the accented letter, so you always need the input \'{\j}
or similar. However, not all fonts provide the dotless j.
\imath
. – Mico Aug 7 '17 at 15:01\imath
. – murray Aug 7 '17 at 15:02\i
sometimes works in math mode is an accident of the implementation and only true with certain encodings, it should not be used in math. – David Carlisle Aug 7 '17 at 16:36