\begin{tabular}[h]{|l|c|}
\hline
\multicolumn{2}{|l|}{Proving Rectangle}\\
\hline
4 right angles & \raisebox{-\totalheight}{\includegraphics[scale=0.3]{ProveRectangleA}}\\
\hline
Parallelogram with 1 right angle & \raisebox{-\totalheight}{\includegraphics[scale=0.3]{ProveRectangleB}}\\
\hline
\end{tabular} \end{center}
答案1
使用该cellspace
包,您可以在图像周围实现空白边框。 \cellspacetoplimit
可以\cellspacebottomlimit
使用命令将其设置为您选择的长度setlength
。在示例中,我还添加了一个不太冗长且略有不同的变体,使用adjustbox
包和valign=t
选项实现顶部对齐的图像。(比较第一幅和第二幅图像相对于左列相应行中的文本行的对齐情况。)
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{cellspace}
\setlength\cellspacetoplimit{6pt}
\setlength\cellspacebottomlimit{6pt}
\usepackage[export]{adjustbox}
\begin{document}
\begin{tabular}{|l|Sc|}
\hline
\multicolumn{2}{|l|}{Proving Rectangle}\\
\hline
4 right angles & \raisebox{-\totalheight}{\includegraphics[scale=0.3]{ProveRectangleA}}\\
\hline
Parallelogram with 1 right angle & \includegraphics[scale=0.3,valign=t]{ProveRectangleB} \\
\hline
\end{tabular}
\end{document}
答案2
您可以添加一个空行 \\ &
\documentclass{article}
\usepackage{graphicx}
\usepackage{mwe}
\begin{document}
\begin{tabular}{|l|c|}
\hline
\multicolumn{2}{|l|}{Proving Rectangle}\\
\hline
4 right angles & \raisebox{-\totalheight}{\includegraphics[scale=0.3]{example-image-a}}\\
&\\ % <----------- added
\hline
Parallelogram with 1 right angle & \raisebox{-\totalheight}{\includegraphics[scale=0.3]{example-image-b}}\\
&\\ % <------------- added
\hline
\end{tabular}
\end{document}