答案1
这里有两个简单的例子。也许你可以用它们作为起点。对于第二列中的图像,我使用了薛定谔猫在回答上一个问题:
\documentclass{article}
\usepackage{array}
\begin{document}
\begin{tabular}{|l|m{3cm}|l|}
\hline
$ n = 1$ &
\begin{verbatim}
/\
/ \
/ \
\end{verbatim}
& way\\
\hline
\end{tabular}
\end{document}
\documentclass{article}
\usepackage{tikz}
\usepgfmodule{parser}
\pgfparserdef{pft}{initial}{the character -}%
{\tikzset{insert path={edge[shorten <=1.75pt,shorten >=1.75pt] ++(1,-1) ++(1,-1)}}}%
\pgfparserdef{pft}{initial}{the character +}%
{\tikzset{insert path={edge[shorten <=1.75pt,shorten >=1.75pt] ++(1,1) ++(1,1)}}}%
\pgfparserdef{pft}{initial}{the character ;}%
{\pgfparserswitch{final}}%
\tikzset{hillside/.code={\pgfparserparse{pft}#1;%
}}
\begin{document}
\begin{tabular}{|l|p{3cm}|l|}
\hline
$ n = 1$ &
\begin{tikzpicture}[x=1ex,y=1em,thick, baseline=(current bounding box.center)]
\draw (0,0)[hillside={+++---}];
\end{tikzpicture}
& ways
\\ \hline
\end{tabular}
\end{document}