Seite 1 von 1
Zeilenumbruch bei Formel in Tabelle
Verfasst: Di 17. Jun 2014, 08:50
von Ajda
Hallo zusammen,
ich habe eine Tabelle, in welcher Formeln stehen. Jetzt ist die Formel aber so lang, dass ich einen Zeilenumbruch machen müsste. Wie mache ich das? Ich habe schon die üblichen Zeilenumbruch-Kniffe aus dem Forum ausprobiert, aber mit dieser Formel mag das einfach nicht funktionieren...
LG Ajda
Verfasst: Di 17. Jun 2014, 08:57
von Johannes_B
Wir haben doch keinen blassen Schimmer was du für eine Tabelle hast, oder wie du die Formel da rein zimmerst.
Erstell uns bitte ein
Minimalbeispiel. Nur so können wir nachvollziehen was du tust.
Verfasst: Di 17. Jun 2014, 09:43
von Ajda
\documentclass[12pt,twoside,a4paper]{article}
\begin{document}
\begin{tabular}{|*{2}{l|}}
%\begin{tabular}{|@{}*{2}{l|}@{}}
\hline
$f_A$ & $\frac{12345 \cdot x + 34567 \cdot t +45+z+123456789+3456789+d+6574398927 \cdot u-98652617 \cdot f^2-f}{12345 \cdot x + 34567 \cdot t}-\frac{12345 \cdot x + 34567 \cdot t +45+z+123456789+5555555555555+d+55555555555 \cdot u-98652617 \cdot f^2-f}{78900 \cdot x + 34567 \cdot t}+\frac{123456 \cdot x + 34567 \cdot t +45+z+2+3456789+d+6574398927 \cdot u-98652617 \cdot f^2-f}{4567 \cdot r + 9999 \cdot t}$ \tabularnewline \hline
$f_B$ & $\frac{12345 \cdot x + 34567 \cdot t +45+z+123456789+3456789+d+6574398927 \cdot u-98652617 \cdot f^2-f}{12345 \cdot x + 34567 \cdot t}-\frac{12345 \cdot x + 34567 \cdot t +45+z+123456789+5555555555555+d+55555555555 \cdot u-98652617 \cdot f^2-f}{78900 \cdot x + 34567 \cdot t}+\frac{123456 \cdot x + 34567 \cdot t +45+z+2+3456789+d+6574398927 \cdot u-98652617 \cdot f^2-f}{4567 \cdot r + 9999 \cdot t}$ \tabularnewline \hline
\end{tabular}
\end{document}
Verfasst: Di 17. Jun 2014, 09:50
von Johannes_B
Du könntest statt einer linkszentrierten Spalte ein Parbox nehmen. Der Inhalt wird dann wie ganz normaler Text behandelt. Mit dem Paket tabularx kannst du die Gesamtbreite der Tabelle angeben, die X-Spalte nimmt dann so viel Platz ein, wie noch übrig ist.
\documentclass[12pt,twoside,a4paper]{article}
\usepackage{tabularx}
\begin{document}
\begin{tabularx}{\textwidth}{|l|X|}
%\begin{tabular}{|@{}*{2}{l|}@{}}
\hline
$f_A$ & $\frac{12345 \cdot x + 34567 \cdot t
+45+z+123456789+3456789+d+6574398927 \cdot u-98652617 \cdot
f^2-f}{12345 \cdot x + 34567 \cdot t}-\frac{12345 \cdot x +
34567 \cdot t +45+z+123456789+5555555555555+d+55555555555 \cdot
u-98652617 \cdot f^2-f}{78900 \cdot x + 34567 \cdot
t}+\frac{123456 \cdot x + 34567 \cdot t
+45+z+2+3456789+d+6574398927 \cdot u-98652617 \cdot f^2-f}{4567
\cdot r + 9999 \cdot t}$ \tabularnewline \hline $f_B$ &
$\frac{12345 \cdot x + 34567 \cdot t
+45+z+123456789+3456789+d+6574398927 \cdot u-98652617 \cdot
f^2-f}{12345 \cdot x + 34567 \cdot t}-\frac{12345 \cdot x +
34567 \cdot t +45+z+123456789+5555555555555+d+55555555555 \cdot
u-98652617 \cdot f^2-f}{78900 \cdot x + 34567 \cdot
t}+\frac{123456 \cdot x + 34567 \cdot t
+45+z+2+3456789+d+6574398927 \cdot u-98652617 \cdot f^2-f}{4567
\cdot r + 9999 \cdot t}$ \tabularnewline \hline
\end{tabularx}
\end{document}
Ich weiß ja nicht, was in deinem Original erscheint, aber diese Tabelle ist mehr als verwirrend.
Schau bitte auch in die Dokumentation von
booktabs.
Verfasst: Di 17. Jun 2014, 10:04
von Ajda
Merci, vielen Dank! Es klappt.