表内のセルのサイズを自動変更しますか?

表内のセルのサイズを自動変更しますか?

基本的に、テキストをテーブルの 3 列目に折り返したいのですが、現在の状態では、テキストはテーブルを通り抜けてドキュメントの右側からはみ出てしまいます。これが私のコードです。

\begin{table}[h]
\centering
\begin{tabularx}{\linewidth}{|l|l|X|}
\hline
\textbf{Item} & \textbf{Due} & \textbf{Specifics and Owner}                                                                                                                                                                                                                         
\\ \hline
Progress Report 1 & 2/15 & \begin{tabular}[c]{@{}l@{}}Preprocess data. Create simple neural network as proof of concept.\\ Owners: Group Effort\end{tabular}                                                                                                                   \\ \hline
Progress Report 2 & 3/15 & \begin{tabular}[c]{@{}l@{}}First implementation of working neural network x-ray classifier. Includes any improvement over randomly classifying data.\\ Owners: Group Effort\end{tabular}                                                            \\ \hline
Preliminary Writeup & 4/12 & \begin{tabular}[c]{@{}l@{}}Strong improvement in classification by supervising neural network weight selection. \\ Owners: Group Effort\end{tabular}                                                                                                \\ \hline
Final Oral Presentation \& Report & 4/24 - 4/26  & \begin{tabular}[c]{@{}l@{}}Finished product that is demonstrable. Possibly a final push to see improvements over Preliminary Writeup results. Make sure there is a group understanding of all applied concepts.\\ Owners: Group Effort\end{tabular} \\ \hline
\end{tabularx}
\end{table}

現在起こっていることのイメージ:https://i.stack.imgur.com/oPwzO.jpg

答え1

常にコンパイル可能な最小限の動作例を提供してください。

ネストされたテーブルは必要ありません。Xの列tabularxではすでにテキストが折り返されています。 列のセル内に改行を入れるにはX\newlineの代わりにを入れます\\(これにより新しいテーブル行が開始されます)。

\documentclass{article}
\usepackage{tabularx}

\begin{document}

\begin{table}[h]
%\centering   % see Mico's comment
\begin{tabularx}{\linewidth}{|l|l|X|}
\hline
\textbf{Item} & \textbf{Due} & \textbf{Specifics and Owner} \\ \hline
Progress Report 1 & 2/15 & Preprocess data. Create simple neural network as proof of concept.\newline Owners: Group Effort \\ \hline
Progress Report 2 & 3/15 & First implementation of working neural network x-ray classifier. Includes any improvement over randomly classifying data.\newline Owners: Group Effort \\ \hline
Preliminary Writeup & 4/12 & Strong improvement in classification by supervising neural network weight selection. \newline Owners: Group Effort \\ \hline
Final Oral Presentation \& Report & 4/24--4/26 & Finished product that is demonstrable. Possibly a final push to see improvements over Preliminary Writeup results. Make sure there is a group understanding of all applied concepts.\newline Owners: Group Effort \\ \hline
\end{tabularx}
\end{table}

\end{document}

生産:

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


編集:

いくつかのコメントで提案されている、 と をbooktabs使用した別のバージョン:\RaggedRight

\documentclass{article}
\usepackage{tabularx,booktabs,ragged2e}

\begin{document}

\begin{table}[h]
%\centering   % see Mico's comment
\begin{tabularx}{\linewidth}{l l >{\RaggedRight}X}
\toprule
\textbf{Item} & \textbf{Due} & \textbf{Specifics and Owner} \\ \midrule
Progress Report 1 & 2/15 & Preprocess data. Create simple neural network as proof of concept.\newline Owners: Group Effort \\ \midrule
Progress Report 2 & 3/15 & First implementation of working neural network x-ray classifier. Includes any improvement over randomly classifying data.\newline Owners: Group Effort \\ \midrule
Preliminary Writeup & 4/12 & Strong improvement in classification by supervising neural network weight selection. \newline Owners: Group Effort \\ \midrule
Final Oral Presentation \& Report & 4/24--4/26 & Finished product that is demonstrable. Possibly a final push to see improvements over Preliminary Writeup results. Make sure there is a group understanding of all applied concepts.\newline Owners: Group Effort \\ \bottomrule
\end{tabularx}
\end{table}

\end{document}

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

関連情報