複数行の問題: テキストがセル境界からはみ出す

複数行の問題: テキストがセル境界からはみ出す

テーブル

添付画像に示すように、テキストがセルの境界からはみ出しています。問題の解決にご協力いただける方がいらっしゃいましたら幸いです。

\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}

答え1

セルからはみ出した長さを補うために、さらに 2 本の線を追加します。そして、multirow{x}{width}{content}線が上部に揃うように数を調整します。

ここに画像の説明を入力してください

\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}

答え2

multirowまったく使わない場合はどうでしょうか?

\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}

ここに画像の説明を入力してください

一方、私は「上揃え」のスキームを使用します。

\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}

ここに画像の説明を入力してください

さらに良いのは、以下も使うことです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}

ここに画像の説明を入力してください

答え3

ご提案ありがとうございます。行数を微調整することで、画像のようにきれいにフォーマットされた表を作成できました。

ここに画像の説明を入力してください

\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}

関連情報