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

Have a couple of documents with the following sort of construct:

y=\sqrt[n]{\prod_{i=1}^{n} x_{i}}

Compiles/renders fine using 'standard' LaTeX, but fails miserably using LuaLaTeX. (I'm using MikTeX 2.9 for both).

Any suggestions? Here is a MWE to 'play with'. As noted, the problem arises because of the 'product' inside the square root. luaLaTeX seems to be having problems handling 'big expressions' nested within the square-root construct.

Thanks in advance.



This equation is properly rendered using a standard \LaTeX. However, it is not when compiled using lua\LaTeX.

y=\sqrt[n]{\prod_{i=1}^{n} x_{i}}

This simpler expression compiles correctly.



OK, tried

\setmathfont{Asana Math}

and it compiles fine, except I don't particular want to use Asana Math (given everything else is CM). So, for my (never-ending) edification, the * trick* (solution) hinges on using unicode?

It seems as if the problem (as originally described) relates specifically to the \prod operator. For example,


compiles/renders fine.

Here is what the PDF I'm rendering before adding the suggested unicode-math package.


share|improve this question
Welcome to TeX.SX! I get the same result with both engines; the horizontal line over the product seems misaligned where the two pieces connect, but it's a problem with the PDF viewer. – egreg Jul 2 '12 at 15:26
@egreg I can reproduce the problem (with miktex and texlive 2012). And the problem is not directly related to \prod. I get it with \frac too if I put something big in its argument, e.g. \displaystyle\int and so force LaTeX to use the largesymbols font for the square root. – Ulrike Fischer Jul 2 '12 at 16:20
@UlrikeFischer Can't test now on 2012; with 2009, 2010 and 2011 it's correct – egreg Jul 2 '12 at 16:26
Looks like a bug I introduced in the latest LuaTeX, why such bugs are only found that late :(. – Khaled Hosny Jul 2 '12 at 18:03
@KhaledHosny: Is it possible to get corrected binaries into TL2012 at some point? Or are we stuck with this bug for a year? – Caramdir Jul 2 '12 at 18:25

With LuaLaTeX try

\setmathfont{Latin Modern Math}

share|improve this answer
You don't need to set LMMath explicitly, it's loaded by default. – Caramdir Jul 2 '12 at 18:21
@Caramdir: Not in pre-TL2012 versions of unicode-math. – Khaled Hosny Jul 2 '12 at 18:35
@KhaledHosny: I thought that it did that for some time now, but apparently that version of unicode-math never made it into TL2011. – Caramdir Jul 2 '12 at 18:37

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.