56

I want to create a table like the picture below, and i wish to itemize the lamba_1 > lamba_2 > 0 using 'item style', which is the cell of each categories. Can someone help me?

enter image description here

  • 4
    Here's a hint: Use a p{<len>}-style column, and then you can use \begin{itemize}...\end{itemize}. – Werner Dec 18 '13 at 7:25
  • Hi @Werner, u mean the \begin{tabular}[pos]{p{<len>}} smth like this? – superhuman1314 Dec 19 '13 at 4:43
  • Yes. The proposed solution uses tabularx which calculates the width of the X-column itself, but is very similar to a p{<len>} (fixed-width, paragraph) column. – Werner Dec 19 '13 at 7:09
  • Ypur diagram would be so much easier to understand with some small and simple drawings like these: twt.mpei.ac.ru/TTHB/New-Chem-Kin/ChemKin/3-19.PNG – Benjamin McKay Jul 31 '17 at 12:15
57

For simplicity, I don't think you need to itemize the list. The MWE below uses \tabitem to set a fake item, letting you create the table in the regular way (also making the code more readable):

enter image description here

\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 provides the supplemental tabular eye-candy.

  • 2
    +1: This looks great and is minimalistic at the same time. Good job! – Henri Menke Dec 19 '13 at 8:10
  • But there's a problem which is the table will extend the margin of the paper if I type a longer word in the stability column, such as I change Asym.~stable to Asymptotically stable. – superhuman1314 Dec 24 '13 at 4:57
  • 1
    @AndrewOoi: That's because all the columns are set as left-aligned. If you have such long items, use tabularx with its X-column in the one you want to break. – Werner Dec 24 '13 at 5:29
  • 1
    Could you suggest a solution for multiline lists? The auto-justification seems to cause problems with the intending here. – Ébe Isaac Mar 30 '16 at 11:18
  • 1
    @crypdick: Double backslashes \\ underwent an arbitrary removal for posts prior to 2015. We're in the process of converting that. See Double backslashes disappear from code – Werner Feb 23 '17 at 19:36
15

When I had the same problem I solved it with tabularx. Here's the code for your example (I'm assuming the number in the 4th row should be 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}

Table

If you don't like the item symbols in the 2nd and 3rd columns, use \item[].

  • 1
    two points: (1) the baselines of the items in the first column aren't even with (they're higher than) those in the other two columns; (2) the indentation caused by the itemize in the last two columns causes the text to be shifted unpleasantly far right. – barbara beeton Dec 18 '13 at 16:35
  • 1
    This code doesn't work as-is for me – crypdick Feb 23 '17 at 19:34
  • 2
    "criticel" should be "critical" (but don't worry; its not critical). – Benjamin McKay Jul 31 '17 at 12:14
3

Using itemization with minipage might be an option if the newline (backslash) is overlapping to another cell. For example:

     \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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.