乳胶表是水平格式的:&
分隔单元格/列,\\
指示一行单元格的末尾。将第一行指定为
A & B \\
第二行为
C & D \\
因此,您的情况应进行编码:
\documentclass{article}
\begin{document}
\begin{table*}
\begin{tabular}{|p{4cm}|p{4cm}|}
\hline \textbf{Heading 1} & \textbf{Heading 2}\\
Text col 1 with plenty of extra text
&Text col 2 with plenty of extra text\\
\hline
\end{tabular}
\end{table*}
\end{document}
(出于显示目的,我减小了单元格的宽度。)
如果要在给定的单元格中使用换行符,只需在输入文件中保留空白行。这是您的文本的两种不同方式。
\documentclass{article}
\begin{document}
\begin{table*}
\begin{tabular}{|p{4cm}|p{4cm}|}
\hline \textbf{Heading 1} & \textbf{Heading 2}\\
Text col 1 with plenty of extra text.
And more lines of text in column one.
Yet more lines.
&Text col 2 with plenty of extra text.\\
\hline
\end{tabular}
\end{table*}
\begin{table*}
\begin{tabular}{|p{4cm}|p{4cm}|}
\hline \textbf{Heading 1}
Text col 1 with plenty of extra text.
And more lines of text in column one.
Yet more lines.
&\textbf{Heading 2}
Text col 2 with plenty of extra text.\\
\hline
\end{tabular}
\end{table*}
\end{document}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句