2

I have copied a math expression from Mathematica in a beamer frame.

The equation is so long that although I have splitted it into several lines, which are separated by a plus symbol, still does not fit in the frame.

I have tried all that I have found here, I have put the equation in a minipage, and then resized it to the text width, even I have enlargered the frame with \geometry but neither of this works for me.

The \geometry will change all my others frames and I don't want that.

Besides I want that the equation be aligned to the left side of the frame and I don't know how.

This is my code:

\documentclass{beamer}
\begin{document}
\begin{frame}

the scattering amplitude

\resizebox{\textwidth}{!}{
\begin{minipage}[]{\textwidth}
\large{
\begin{eqnarray}
 \frac{2 \left(\text{tr} \left(\text{e}^4 \left(m_e-\bar{\gamma }\cdot \bar{K}\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }\left(\text{k}_2\right)\right).\left(\bar{\gamma }\cdot \left(-\overline{\text{k}_2}-\bar{K}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }^*\left(\text{q}_2\right)\right).\left(\bar{\gamma }\cdot \left(-\overline{\text{k}_2}-\bar{K}+\overline{\text{q}_2}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }^*\left(\text{q}_1\right)\right).\left(\bar{\gamma }\cdot \left(-\overline{\text{k}_2}-\bar{K}+\overline{\text{q}_1}+\overline{\text{q}_2}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }\left(\text{k}_1\right)\right)\right)\right)}
   {\left(\bar{K}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}\right){}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_2}\right){}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2}\right){}^2-m_e^2\right)}
+\frac{2 \left(\text{tr} \left(\text{e}^4 \left(\bar{\gamma }\cdot \left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }^*\left(\text{q}_2\right)\right).\left(\bar{\gamma }\cdot \left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }\left(\text{k}_2\right)\right).\left(\bar{\gamma }\cdot \left(\bar{K}-\overline{\text{q}_1}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }^*\left(\text{q}_1\right)\right).\left(\bar{\gamma }\cdot \bar{K}+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }\left(\text{k}_1\right)\right)\right)\right)}
   {\left(\bar{K}^2-m_e^2\right).\left(\left(\bar{K}-\overline{\text{q}_1}\right){}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}\right){}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2}\right){}^2-m_e^2\right)}
+\frac{2 \left(\text{tr} \left(\text{e}^4 \left(\bar{\gamma }\cdot \left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }^*\left(\text{q}_2\right)\right).\left(\bar{\gamma }\cdot \left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }^*\left(\text{q}_1\right)\right).\left(\bar{\gamma }\cdot \left(\overline{\text{k}_2}+\bar{K}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }\left(\text{k}_2\right)\right).\left(\bar{\gamma }\cdot \bar{K}+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }\left(\text{k}_1\right)\right)\right)\right)}
   {\left(\bar{K}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}\right){}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}\right){}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2}\right){}^2-m_e^2\right)}
\end{eqnarray}
}
\end{minipage}
}

\end{frame}
\end{document}

In here, as you can see, I have made not any splitting or enlarging of the page.

So maybe you can start to teach me how to split the expression properly.

  • 5
    Off-topic: Are you sure this equation is useful on a beamer slide? You're audience probably won't remember all the terms in detail... – samcarter_is_at_topanswers.xyz Mar 8 '17 at 16:52
  • 1
    @samcarter Hi, thanks for the advice but I am doing a presentation about a Mathematica package that can write and solve this, so I can show that is better check with Mathematica than doing it by hand cause is very easy get it wrong. I know that nobody will remember it but that is not the point. – NATALIA TAPIA Mar 8 '17 at 16:56
  • @NATALIATAPIA - If "nobody will remember" this monstrous formula, you should have the guts -- and the decency -- not to show it. – Mico Mar 8 '17 at 17:53
3

If you're going to show this monster of a math expression at all, you should give your audience a fighting chance to take in at least some of the details. There are 3 additive components to the full equation, each consisting of fractions with dreadfully long numerators and denominators. I suggest you break up each of the numerators across 3 lines, and each of the denominators across 2 lines.

Note that I've removed all 78 \left directives, all 78 \right directives, all 24 \cdot directives, and lots of other . (dot) terms. They simply do not belong in a well-typeset math expression. I could have also eliminated further groups of parentheses that appear to be there purely for the convenience of Mathematica, but I chose to give it a rest. I did add, though, large parentheses to enclose the multi-line numerator and denominator terms.

enter image description here

\documentclass{beamer}
\usepackage{amsmath}
\DeclareMathOperator{\tr}{tr} % trace operator?
\begin{document}
\begin{frame}
\footnotesize  % <--- yes, this is needed
\begin{align*}
&\frac{\left(\begin{aligned}
2 \tr \bigl[&\text{e}^4 (m_e-\bar{\gamma} \bar{K})(\bar{\gamma} \bar{\varepsilon}(\text{k}_2))(\bar{\gamma} (-\overline{\text{k}_2}-\bar{K})+m_e)(\bar{\gamma} \bar{\varepsilon}^*(\text{q}_2))\\
&\times(\bar{\gamma} (-\overline{\text{k}_2}-\bar{K}+\overline{\text{q}_2})+m_e)(\bar{\gamma} \bar{\varepsilon}^*(\text{q}_1))\\
&\times(\bar{\gamma} (-\overline{\text{k}_2}-\bar{K}+\overline{\text{q}_1}+\overline{\text{q}_2})+m_e)(\bar{\gamma} \bar{\varepsilon}(\text{k}_1))\bigr]
\end{aligned}\right)}%
{\left(\begin{aligned}
&(\bar{K}^2-m_e^2)((\overline{\text{k}_2}+\bar{K})^2-m_e^2)\\
&\times((\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_2})^2-m_e^2)((\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2})^2-m_e^2)
\end{aligned}\right)}\\[1ex]
{}+{}
&\frac{\left(\begin{aligned}
2 \tr \bigl[&\text{e}^4 (\bar{\gamma} (\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2})+m_e)(\bar{\gamma} \bar{\varepsilon}^*(\text{q}_2))\\
&\times(\bar{\gamma} (\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1})+m_e)(\bar{\gamma} \bar{\varepsilon}(\text{k}_2))(\bar{\gamma} (\bar{K}-\overline{\text{q}_1})+m_e)\\
&\times(\bar{\gamma} \bar{\varepsilon}^*(\text{q}_1))(\bar{\gamma} \bar{K}+m_e)(\bar{\gamma} \bar{\varepsilon}(\text{k}_1))\bigr]
\end{aligned}\right)}%
{\left(\begin{aligned}
&(\bar{K}^2-m_e^2)((\bar{K}-\overline{\text{q}_1})^2-m_e^2)\\
&\times((\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1})^2-m_e^2)((\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2})^2-m_e^2)
\end{aligned}\right)}\\[1ex]
{}+{}&
\frac{\left(\begin{aligned}
2 \tr \bigl[&\text{e}^4 (\bar{\gamma} (\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2})+m_e)(\bar{\gamma} \bar{\varepsilon}^*(\text{q}_2))\\
&\times(\bar{\gamma} (\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1})+m_e)(\bar{\gamma} \bar{\varepsilon}^*(\text{q}_1))\\
&\times(\bar{\gamma} (\overline{\text{k}_2}+\bar{K})+m_e)(\bar{\gamma} \bar{\varepsilon}(\text{k}_2))(\bar{\gamma} \bar{K}+m_e)(\bar{\gamma} \bar{\varepsilon}(\text{k}_1))\bigr]
\end{aligned}\right)}%
{\left(\begin{aligned}
&(\bar{K}^2-m_e^2)((\overline{\text{k}_2}+\bar{K})^2-m_e^2)\\
&\times((\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1})^2-m_e^2)((\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2})^2-m_e^2)
\end{aligned}\right)}
\end{align*}
\end{frame}
\end{document}
|improve this answer|||||
  • Thank you for your kindness @Mico, probably this will be better for the audience. – NATALIA TAPIA Mar 8 '17 at 18:52
2

Not sure how useful this is:

\documentclass{beamer}

\begin{document}
\begin{frame}[shrink=60]

\begin{align*}
&\frac{2 \left(\text{tr} \left(\text{e}^4 \left(m_e-\bar{\gamma }\cdot \bar{K}\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }\left(\text{k}_2\right)\right).\left(\bar{\gamma }\cdot \left(-\overline{\text{k}_2}-\bar{K}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }^*\left(\text{q}_2\right)\right).\left(\bar{\gamma }\cdot \left(-\overline{\text{k}_2}-\bar{K}+\overline{\text{q}_2}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }^*\left(\text{q}_1\right)\right).\left(\bar{\gamma }\cdot \left(-\overline{\text{k}_2}-\bar{K}+\overline{\text{q}_1}+\overline{\text{q}_2}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }\left(\text{k}_1\right)\right)\right)\right)}{\left(\bar{K}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}\right){}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_2}\right){}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2}\right){}^2-m_e^2\right)}+\\
+&\frac{2 \left(\text{tr} \left(\text{e}^4 \left(\bar{\gamma }\cdot \left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }^*\left(\text{q}_2\right)\right).\left(\bar{\gamma }\cdot \left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }\left(\text{k}_2\right)\right).\left(\bar{\gamma }\cdot \left(\bar{K}-\overline{\text{q}_1}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }^*\left(\text{q}_1\right)\right).\left(\bar{\gamma }\cdot \bar{K}+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }\left(\text{k}_1\right)\right)\right)\right)}{\left(\bar{K}^2-m_e^2\right).\left(\left(\bar{K}-\overline{\text{q}_1}\right){}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}\right){}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2}\right){}^2-m_e^2\right)}+\\
+&\frac{2 \left(\text{tr} \left(\text{e}^4 \left(\bar{\gamma }\cdot \left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }^*\left(\text{q}_2\right)\right).\left(\bar{\gamma }\cdot \left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }^*\left(\text{q}_1\right)\right).\left(\bar{\gamma }\cdot \left(\overline{\text{k}_2}+\bar{K}\right)+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }\left(\text{k}_2\right)\right).\left(\bar{\gamma }\cdot \bar{K}+m_e\right).\left(\bar{\gamma }\cdot \bar{\varepsilon }\left(\text{k}_1\right)\right)\right)\right)}{\left(\bar{K}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}\right){}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}\right){}^2-m_e^2\right).\left(\left(\overline{\text{k}_2}+\bar{K}-\overline{\text{q}_1}-\overline{\text{q}_2}\right){}^2-m_e^2\right)}
\end{align*}

\end{frame}

\end{document}

enter image description here

|improve this answer|||||
  • "Not sure how useful this is" -- really? :-) – Mico Mar 8 '17 at 17:37
  • 1
    @Mico I hope the main points of the question are fulfilled. I split the lines where it did not course any mathematical problems and adjusted the size, but now the font is so small it could easily been replaced with lorem lipsum -- but that's not my problem :) – samcarter_is_at_topanswers.xyz Mar 8 '17 at 17:46
  • I was just giving you a hard time. :-) – Mico Mar 8 '17 at 17:52
  • when I see such (long) equation, I lost all will to read it :-( – Zarko Mar 8 '17 at 18:00
  • 1
    @Mico And I just wanted to whine that the look is not my fault :) – samcarter_is_at_topanswers.xyz Mar 8 '17 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.