TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Trying to use the lettrine package in XeLaTeX with the Georg Duffner's EB Garamond font results in:

! Bad USV code (-2411)

Trial and error shows that the problem comes with these two lines in lettrine.sty:

       \hskip \the\L@Findent}}

These lines, in the original lettrine.sty file, are enclosed within $ $ and thus typeset in math mode. I removed the $ $ and the problem disappeared.

Question: Is there any reason why these two lines should be in math mode, given that they don't do anything about math?

share|improve this question
I can't see any reason, and and the documented source doesn't give any clue. On the other hand the error indicates a badly encoded unicode input file. The math version of smash typesets the expression four times including script and scriptscript size so it may have caused some font loading code to be loaded, otherwise I can't see how the error could be affected by this. – David Carlisle Mar 11 '13 at 20:35
Apparently, lettrine's author thought that \smash works only in math mode, which is untrue. – egreg Mar 11 '13 at 20:46
FWIW, I've had a similar problem with EB Garamond, but without lettrine. I suspect the problem may lie in mt-EBGaramond.cfg (the microtype configuration), as renaming this file 'cures' the (my) problem, as does omitting microtype altogether. Using LuaTeX also cures. – Brent.Longborough May 7 '13 at 11:55

Apparently the author of lettrine was thinking that \smash works only in math mode. There are problems when using it outside math mode, since it doesn't start a paragraph as it could be expected. However the code in the definition of \@lettrine is

  <...omitted code...>
          \hskip \the\L@Findent}}$%

and the \noindent would already make TeX switch to horizontal mode (and the \leavevmode is redundant). We can see that no math mode material is used in the argument to \smash.

Thus there's no risk in removing the $; but it's better to stop the search for other \parshape specifications that could cause \smash to be expanded prematurely. Thus I propose the following patch:


that is, changing the first $ into \relax and removing the second $.

The patch should do nothing if the \@lettrine macro is changed in a package revision (provided it doesn't inject $ in other places of the same macro).

share|improve this answer
I agree with this analysis. I have just uploaded to CTAN a new version (1.64) correcting this bug following egreg's suggestions. Thanks to all of you! – user27392 Mar 14 '13 at 16:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.