Take the 2-minute tour ×

It is produced in streams by newfile when I use special characters.

share|improve this question
add comment

1 Answer

up vote 12 down vote accepted

When dealing with UTF-8 coded document, one must keep in mind that characters are encoded by sequences of one to four bytes and that traditional TeX engines (including pdftex) are not able to directly interpret multibyte characters.

Thus multibyte clusters are, as soon as possible, translated to the LaTeX Internal Character Representation. This is feasible because in a multibyte cluster the first byte tells about the length of the cluster and so it's not too difficult to compute from this and the following bytes the Unicode point we are faced with; LaTeX maintains a table mapping Unicode points to LaTeX commands. For example, the multibyte cluster that the screen shows as Ü gets translated into \IeC{\"U}.

What's the purpose of \IeC? When \"U is found by LaTeX, it tries to expand \", which is wrong when writing to an auxiliary file: we want that \chapter{Über} writes something equivalent to Über in the .toc file and not the complicated sequence of commands needed to print it.

Thus \IeC: it does nothing during normal typesetting, but when LaTeX is writing to auxiliary files the tokens \IeC{\"U} are written out literally.

If you want to write literally to your own auxiliary files, then this mechanism must be disabled, which can be obtained by protecting the tokens with \unexpanded. An example of what you want to obtain should be shown.

share|improve this answer
An important feature of the syntax here is that it handles following spaces correctly. \"U wouldn't really need \IeC but other things translate to control sequences. IeC ends in a } so following space is not gobbled, and the macro can be defined to remove the brace group so avoiding problems with preventing kerning if if it generated \textalpha{} or whatever rather tahn \IeC{\textalpha} –  David Carlisle Jun 8 '12 at 16:42
add comment

Your Answer


