I have a table where one of the formulas is simply too long. Is there a way to break up an equation in Latex in a table? It's already rotated and I tried p{5cm} but it simply overlaps the text as it can't find a place to break the equation, even with spaces added. Which packages might be useful? The one relevant answer on here that I found was frustratingly unhelpful.
Thanks in advance!
The code for my table:
\begin{sidewaystable}
\begin{center}
\begin{tabular}{|l|l|l|l|} \hline
Objekt & Trägheitsmoment & Fehler Formel & Trägheitsmoment [$kg\cdot m^{2}$] \\ \hline
Hantelkörper &&& \\ \hline
Hohlzylinder & $J=\frac{m}{2}\left(r_{a}^{2}+r_{i}^{2}\right)^{2}$ & $\sqrt{\sigma_{m}^{2}\left(\frac{1}{2}\left(r_{a}^{2}+r_{i}^{2}\right)\right)^{2} +\sigma_{r_{a}}^{2}\left(r_{a}m\left(r_{a}^{2}+r_{i}^{2}\right)\right)^{2} +\sigma_{r_{i}}^{2}\left(r_{i}m\left(r_{a}^{2}+r_{i}^{2}\right)\right)^{2}}$ & $0.00057668 \pm 0.00000000$ \\ \hline
\end{tabular}
\end{center}
\end{sidewaystable}
Best Answer
I can think of two main options: first, use a substitution for common expressions. Second, make a
savebox
of a more complicated aligned equation, and insert that box into the table. This protects the&
characters from being interpreted by thetabular
environment.Also, in terms of general table layout, see the booktabs documentation. I've left your format intact, but if it were me, I'd get rid of most or all of the rules.