我想创建一个如下图所示的表格,并希望使用“项目样式”逐项列出 lamba_1 > lamba_2 > 0,即每个类别的单元格。有人能帮帮我吗?
答案1
为了简单起见,我认为您不需要itemize
列表。下面的 MWE 用于\tabitem
设置一个假项目,让您以常规方式创建表格(也使代码更具可读性):
\documentclass{article}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\begin{document}
\begin{table}
\centering
\begin{tabular}{lll}
\toprule
\multicolumn{3}{c}{Classification of the criticel point $(0,0)$ of $x' = Ax, |\mathbf{A}| \not= 0$.} \\[.5\normalbaselineskip]
Types & Type of Critical Point & Stability \\
\midrule
1.~Real unequal eigenvalues of same sign \\
\tabitem $\lambda_1 > \lambda_2 > 0$ & Improper node/node & Unstable \\
\tabitem $\lambda_1 < \lambda_2 < 0$ & Improper node/node & Asym.~stable \\[.5\normalbaselineskip]
2.~Real unequal eigenvalues of opposite sign \\
\tabitem $\lambda_2 < 0 > \lambda_1$ & Saddle point & Unstable \\[.5\normalbaselineskip]
3.~Equal eigenvalues \\ Subtype 1: Two Independent vectors \\
\tabitem $\lambda_1 = \lambda_2 > 0$ & Proper node & Unstable \\
\tabitem $\lambda_1 = \lambda_2 < 0$ & Proper node & Asym.~stable \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
booktabs
提供补充的tabular
视觉享受。
答案2
当我遇到同样的问题时,我用 解决了它tabularx
。这是您的示例的代码(我假设第 4 行的数字应该是 2):
\documentclass{article}
\usepackage[textwidth = 155mm]{geometry}
\usepackage{tabularx}
\begin{document}
\begin{table}
\begin{tabularx}{\textwidth}{|>{\setlength\hsize{1.4\hsize}\setlength\linewidth{\hsize}}X|>{\setlength\hsize{.9\hsize}\setlength\linewidth{\hsize}}X|>{\setlength\hsize{.7\hsize}\setlength\linewidth{\hsize}}X|}
\hline
\multicolumn{3}{|c|}{Classification of the criticel point $(0,0)$ of $x'=Ax,|\mathbf{A}|\not=0$.}\\
\hline
Types & Type of Critical Point & Stability \\
\hline
1. Real unequal eigenvalues of same sign
\begin{itemize}
\item $\lambda_1 > \lambda_2 > 0$
\item $\lambda_1 < \lambda_2 < 0$
\end{itemize} &
\vphantom{1. Real unequal eigenvalues of same sign}
\begin{itemize}
\item Improper Node/Node
\item Improper Node/Node
\end{itemize} &
\vphantom{1. Real unequal eigenvalues of same sign}
\begin{itemize}
\item Unstable
\item Asym. Stable
\end{itemize}\\
\hline
2. Real unequal eigenvalues of opposite sign
\begin{itemize}
\item $\lambda_2 < 0 >\lambda_1$
\end{itemize} &
\vphantom{2. Real unequal eigenvalues of opposite sign}
\begin{itemize}
\item Saddle Point
\end{itemize} &
\vphantom{2. Real unequal eigenvalues of opposite sign}
\begin{itemize}
\item Unstable
\end{itemize}\\
\hline
3. Equal eigenvalues \newline Subtype 1: Two Independent vectors
\begin{itemize}
\item $\lambda_1 = \lambda_2 > 0$
\item $\lambda_1 = \lambda_2 < 0$
\end{itemize} &
\vphantom{3. Equal eigenvalues} \vphantom{ Subtype 1: Two Independent vectors}
\begin{itemize}
\item Proper Node
\item Proper Node
\end{itemize} &
\vphantom{3. Equal eigenvalues} \vphantom{ Subtype 1: Two Independent vectors}
\begin{itemize}
\item Unstable
\item Asym. Stable
\end{itemize}\\
\hline
\end{tabularx}
\end{table}
\end{document}
如果您不喜欢第二列和第三列的项目符号,请使用\item[]
。
答案3
如果换行符(反斜杠)与另一个单元格重叠,则可以使用 itemization withminipage
可能是一种选择。例如:
\multicolumn{2}{c}{\textbf{Classification 1}} \\ [2pt] \hline
\textit{Classification 1} &
\begin{minipage} [t] {0.4\textwidth}
\begin{itemize}
\item item 1
\subitem subitem 2
\subitem subitem 3
\end{itemize}
\end{minipage} \\ [2pt] \hline
答案4
\begin{tabularx}{\textwidth}{p{50mm}|X}
1. item 1 \par %
2. item 2 & this works \\\hline
1. item 3 \par
2. item 4 \par
3. item 5 & second line too
\end{tabularx}
一个简单的解决方案是使用p
段落列,您可以\par
将其与单元格内的段落分开。我在这里为每个段落使用了文本标签,但您可以使用项目符号或其他样式。