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

I get tons of warnings "Command \textellipsis invalid in math mode" after I have switched to LuaLaTex. The warning comes from the unicode-math package, which I needed to set the math font. If I use \dots or \ldots (\vdots is ok) in math mode, the appearance is different from the text-mode version and I get a warning. If I use PDFLaTex or don't use unicode-math there is no difference in appearance and I get no warning.

Is this a bug (or at least is something not correctly implemented)? The MWE illustrates the problem:

% !TEX TS-program = lualatex
% !TEX encoding = UTF-8 Unicode

Warning: $\dots$\\
Warning: $\ldots$\\
Warning: $\ldots$\\
OK: \dots\\
OK: \ldots\\
OK: $\vdots$

LuaLaTex output with unicode-math:

enter image description here

PDFLaTex output:

enter image description here

share|improve this question
Remove the call to luainputenc to begin with. Isn't it black magic? ;-) – egreg Jan 18 '14 at 14:47
up vote 8 down vote accepted

The luainputenc package should be loaded only with legacy documents, but never when the encoding is already UTF-8.

The package loads lutf8.def that has


(which is an error, in my opinion, but it's another matter).

share|improve this answer
Congrats on passing the 250K mark!! – Mico Jan 18 '14 at 15:07
@Mico Halfway to 500K. ;-) – egreg Jan 18 '14 at 15:42
@egreg: I have read that I need luainputenc but you are right, everything works like a charm even without this package! Thanks, but \dots and \ldots are still different in math and text mode if I use unicode-math. Maybe this is a "feature" although I have to say that I don't like it... ;) – user4811 Jan 18 '14 at 16:06
@user4811 Yes, it's a feature, I'm afraid. Tell who said you to use luainputenc that they're wrong. – egreg Jan 18 '14 at 16:07
@egreg: answer accepted and more points to reach 500K. Thanks for your help! – user4811 Jan 18 '14 at 16:07

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.