[Tex/LaTex] Exporting Mathematica table to LaTeX

pdftextableswolfram-mathematica

I have generated a code for a table using Mathematica using TeX as output. The code did not get compile. Kindly guide me.

%% AMS-LaTeX Created by Wolfram Mathematica 7.0 : www.wolfram.com

\documentclass{article}
\usepackage{amsmath, amssymb, graphics}

\newcommand{\mathsym}[1]{{}}
\newcommand{\unicode}{{}}

\begin{document}

\[
\begin{array}{ccccc}
 \text{Bounds on NP Parameter} &  & \left.\text{Branching Fraction($\times $}10^{-22}\right) &  &  \\
 \theta  & \left|\Sigma _{i=1}^3\lambda '_{\text{ik3}}^*\lambda '_{\text{ik1}}\text{$|\backslash $n    $\times $}10^{-6}\right. & \text{NP} & \text{Interference}
& \text{Combined} \\
 0 & 1.0164 & 3.325 & 0.269 & 3.6 \\
 30 & 1.0298 & 3.413 & 0.151 & 3.57 \\
 60 & 1.0506 & 3.552 & -0.23 & 3.328 \\
 90 & 1.0735 & 3.709 & -0.23 & 3.485 \\
 120 & 1.0923 & 3.84 & 0.168 & 4.014 \\
 150 & 1.1016 & 3.905 & 0.289 & 4.2 \\
 180 & 1.0987 & 3.885 & -0.08 & 3.811 \\
 210 & 1.0844 & 3.784 & -0.308 & 3.482 \\
 240 & 1.0629 & 3.636 & -0.016 & 3.626 \\
 270 & 1.0402 & 3.482 & 0.291 & 3.779 \\
 300 & 1.0223 & 3.363 & 0.104 & 3.473 \\
 330 & 1.0137 & 3.307 & -0.252 & 3.061 \\
 360 & 1.0164 & 3.325 & -0.181 & 3.15
\end{array}
\]

\end{document}

Best Answer

The problem was that the character ' is active in math mode, and it expands to ^\prime. When you say \lambda '_{\text{ik3}}^* you basically have \lambda^\prime_{\text{ik3}}^*, and this makes TeX throw a ! Double Superscript error.

Knowing this, you can group the \prime with the *:

\lambda _{\text{ik3}}^{\prime*}

Apparently Mathematica doesn't know it can't use superscripts like this...

Compilable code:

%% AMS-LaTeX Created by Wolfram Mathematica 7.0 : www.wolfram.com

\documentclass{article}
\usepackage{amsmath, amssymb, graphics}

\newcommand{\mathsym}[1]{{}}
\newcommand{\unicode}{{}}

\begin{document}

\[
\begin{array}{ccccc}
 \text{Bounds on NP Parameter} &  & \left.\text{Branching Fraction($\times $}10^{-22}\right) &  &  \\
 \theta  & \left|\Sigma _{i=1}^3\lambda _{\text{ik3}}^{\prime*}\lambda '_{\text{ik1}}\text{$|\backslash $n    $\times $}10^{-6}\right. & \text{NP} & \text{Interference}
& \text{Combined} \\
 0 & 1.0164 & 3.325 & 0.269 & 3.6 \\
 30 & 1.0298 & 3.413 & 0.151 & 3.57 \\
 60 & 1.0506 & 3.552 & -0.23 & 3.328 \\
 90 & 1.0735 & 3.709 & -0.23 & 3.485 \\
 120 & 1.0923 & 3.84 & 0.168 & 4.014 \\
 150 & 1.1016 & 3.905 & 0.289 & 4.2 \\
 180 & 1.0987 & 3.885 & -0.08 & 3.811 \\
 210 & 1.0844 & 3.784 & -0.308 & 3.482 \\
 240 & 1.0629 & 3.636 & -0.016 & 3.626 \\
 270 & 1.0402 & 3.482 & 0.291 & 3.779 \\
 300 & 1.0223 & 3.363 & 0.104 & 3.473 \\
 330 & 1.0137 & 3.307 & -0.252 & 3.061 \\
 360 & 1.0164 & 3.325 & -0.181 & 3.15
\end{array}
\]

\end{document}