在乳胶表格中编写多行的替代方法?
An alternative to write multirow in latex's tabular?
在乳胶中,我知道我们可以像下面这样使用多行命令,
\begin{table}[!h]
\centering
\begin{tabular}{|c|l|}
\hline
\multirow{2}{*}{A}
& I want to place this sentence in multiple lines, \
& but don't want to control the linebreak myself \
\hline
\end{tabular}
\end{table}
我觉得自己控制换行太蠢了
还有其他适合文本宽度与线宽的替代方法吗?
\documentclass{article}
\usepackage{tabularx}
\renewcommand\tabularxcolumn[1]{m{#1}}
\begin{document}
\begin{table}[htbp]
\centering
\begin{tabularx}{\linewidth}{|c|X|}
\hline
A
& I want to place this sentence in multiple lines, but don't want to control the linebreak myself \
\hline
\end{tabularx}
\end{table}
\end{document}
在乳胶中,我知道我们可以像下面这样使用多行命令,
\begin{table}[!h]
\centering
\begin{tabular}{|c|l|}
\hline
\multirow{2}{*}{A}
& I want to place this sentence in multiple lines, \
& but don't want to control the linebreak myself \
\hline
\end{tabular}
\end{table}
我觉得自己控制换行太蠢了
还有其他适合文本宽度与线宽的替代方法吗?
\documentclass{article}
\usepackage{tabularx}
\renewcommand\tabularxcolumn[1]{m{#1}}
\begin{document}
\begin{table}[htbp]
\centering
\begin{tabularx}{\linewidth}{|c|X|}
\hline
A
& I want to place this sentence in multiple lines, but don't want to control the linebreak myself \
\hline
\end{tabularx}
\end{table}
\end{document}