如何垂直对齐多行内的两个元素

如何垂直对齐多行内的两个元素

我想\includegraphics{test.png}在多行单元格内的图像上方包含一个居中的“(a)”。

我尝试过一个\break命令:

\multirow{2}{*}{(a)\break\includegraphics{test.png}}

它没有起作用。我尝试包含一个tabular环境

\multirow{2}{*}{\begin{tabular}{c}(a)\\\includegraphics{test.png}\end{tabular}}

它破坏了我的编译。

这是我想要获得的结果:

在此处输入图片描述

我对环境使用以下格式tabular

@{}p{.144\textwidth}p{.049\textwidth}p{.617\textwidth}p{.09\textwidth}@{}

我需要的是将“(a)”和“(e)”放在图像上方......

我怎样才能做到这一点?

答案1

我建议可以把以下内容作为起点:

在此处输入图片描述

\documentclass{article}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{lipsum} % for dummy text. Do not use in real document.

\begin{document}
\noindent
\begin{minipage}{\textwidth}
\begin{tabular}{cc}
(a)  \\
\includegraphics[width=2cm]{example-image}
\end{tabular}
\begin{tabular}{lp{5.5cm}}
(b) & \lipsum[1][1]\\
(c) & \lipsum[1][3]\\
(d) & \includegraphics[width=1cm,valign=t]{example-image}
\end{tabular}
\begin{tabular}{cc}
(e)  \\
\includegraphics[width=2cm]{example-image}
\end{tabular}
\end{minipage}
\end{document}

相关内容