# problem compiling some 'math' using LuaLaTeX

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.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

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

\begin{equation*}
y=\sqrt[n]{\prod_{i=1}^{n} x_{i}}
\end{equation*}

This simpler expression compiles correctly.

\begin{equation*}
y=\sqrt[n]{x}
\end{equation*}

\end{document}


OK, tried

\usepackage{unicode-math}
\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,

$$y=\sqrt[n]{\frac{x^n-y^n}{1+u^{2n}}}$$


compiles/renders fine.

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

http://canuck.dnr.cornell.edu/misc/mah-example.pdf

-
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

\documentclass{article}

@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