Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
\documentclass{article}
\usepackage[english]{babel}
\usepackage[utf8]{luainputenc}
\usepackage{unicode-math}

\begin{document}
Warning: $\dots$\\
Warning: $\ldots$\\
Warning: $\ldots$\\
OK: \dots\\
OK: \ldots\\
OK: $\vdots$
\end{document}

LuaLaTex output with unicode-math:

enter image description here

PDFLaTex output:

enter image description here

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

1 Answer 1

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

\DeclareUnicodeCharacter{2026}{\textellipsis}

(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 at 15:07
1  
@Mico Halfway to 500K. ;-) –  egreg Jan 18 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 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 at 16:07
    
@egreg: answer accepted and more points to reach 500K. Thanks for your help! –  user4811 Jan 18 at 16:07

Your Answer

 
discard

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.