
Wie im beigefügten Bild zu sehen, läuft der Text aus der Zellenbegrenzung heraus. Ich wäre dankbar, wenn mir jemand bei der Behebung des Problems helfen könnte.
\begin{table}[!htbp]
\centering
\caption{Experiment outline}
\label{tab:exp_process}
\begin{tabular}{|l|l|l|m{6cm}|}
\hline
Sessions & Objectives & Groups & Activities
\\
\hline\hline
\multirow{2}{*}{$1$st session} &
\multirow{2}{4cm}{Learning the basics of thermal conduction} &
Control &
\multirow{1}{6cm}{Solve a thermal system design problem using a real-time high-fidelity simulation with the CPU heat sink system}
\\
& & Experimental &
\\
\hline
\end{tabular}
\end{table}
Antwort1
Füge einfach zwei weitere Zeilen hinzu, um die Länge auszugleichen, die aus der Zelle herausragt. Und passe die Anzahl multirow{x}{width}{content}
so an, dass sie oben ausgerichtet sind.
\documentclass[]{article}%
\usepackage[margin=1cm]{geometry}
\usepackage{multirow,array}
\begin{document}
\begin{table}[!htbp]
\centering
\caption{Experiment outline}
\label{tab:exp_process}
\begin{tabular}{|l|l|l|m{6cm}|}
\hline
Sessions & Objectives & Groups & Activities \\ \hline\hline
\multirow{1}{*}{$1$st session} & \multirow{2}{4cm}{Learning the basics of thermal conduction} & Control &
\multirow{1}{6cm}{Solve a thermal system design problem using a real-time high-fidelity simulation with the CPU heat sink system}
\\
& & Experimental & \\
& & & \\
& & & \\ \hline
\end{tabular}
\end{table}
\end{document}
Antwort2
multirow
Wie wäre es , es überhaupt nicht zu verwenden ?
\documentclass{article}
\usepackage{array}
\begin{document}
\noindent
\begin{tabular}{|m{2cm}|m{3.5cm}|m{2.5cm}|m{5cm}|}
\hline
Sessions & Objectives & Groups & Activities \\
\hline\hline
First session &
Learning the basics of thermal conduction &
Control\newline Experimental &
Solve a thermal system design problem using a real-time
high-fidelity simulation with the CPU heat sink system \\
\hline
\end{tabular}
\end{document}
Andererseits würde ich ein „Top-Aligned“-Schema verwenden:
\documentclass{article}
\usepackage{array}
\begin{document}
\noindent
\begin{tabular}{|l|p{3.5cm}|p{2.5cm}|p{5cm}|}
\hline
Sessions & Objectives & Groups & Activities \\
\hline\hline
First session &
Learning the basics of thermal conduction &
Control\newline Experimental &
Solve a thermal system design problem using a real-time
high-fidelity simulation with the CPU heat sink system \\
\hline
\end{tabular}
\end{document}
Besser noch, ich würde auch verwenden booktabs
:
\documentclass{article}
\usepackage{array,booktabs}
\begin{document}
\noindent
\begin{tabular}{l p{3.5cm} p{2.5cm} p{5cm}}
\toprule
Sessions & Objectives & Groups & Activities \\
\midrule
First session &
Learning the basics of thermal conduction &
Control\newline Experimental &
Solve a thermal system design problem using a real-time
high-fidelity simulation with the CPU heat sink system \\
\bottomrule
\end{tabular}
\end{document}
Antwort3
Vielen Dank für den Vorschlag. Durch Anpassen der Zeilenanzahl konnte ich eine schön formatierte Tabelle erstellen, wie im Bild gezeigt.
\begin{table}[!htbp]
\centering
\caption{Experiment outline}
\label{tab:exp_process}
\begin{tabular}{|m{2cm}|m{4cm}|m{2.5cm}|m{6cm}|}
\hline
Sessions & Objectives & Groups & Activities \\ \hline\hline
\multirow{3}{*}{$1$st session} & \multirow{3}{4cm}{Learning the basics of thermal conduction} &
\multirow{2}{*}{Control} &
\multirow{3}{6cm}{Solve a thermal system design problem using a real-time high-fidelity simulation with the CPU heat sink system}
\\
& & \multirow{2}{*}{Experimental} & \\
& & & \\ \hline
\end{tabular}
\end{table}