图像和多行文本

图像和多行文本

我想显示多行并行的图像。

参见附图

我的最小工作代码:

\documentclass[a5paper,oneside,14pt]{article}
\usepackage[a5paper,landscape,left=0.5cm,right=1cm,top=0.5cm,bottom=0.5cm]{geometry}
\usepackage{tcolorbox}
\usepackage{enumitem}
\begin{document}
\begin{tcolorbox}

 \begin{minipage}{17.5cm}
 \includegraphics[width=2cm,height=2cm]{example-image-a}
 \hspace{7cm}
 AAAA AAAA \\
 AAAA AAAA
 \hfill
 BBBB BBBB \\
 BBBB BBBB

 \end{minipage}


\begin{itemize}[topsep=0.01cm,parsep=0.2cm,partopsep=10pt,topsep=0ex,leftmargin=1.2 cm,labelwidth=6pt,labelsep=4pt]
\item a
 \item b
 \item c
 \item d
 \item e
 \item f
 \end{itemize}

\end{tcolorbox}

\end{document}

在此处输入图片描述

谢谢

答案1

该解决方案使用 varwidth,对齐中心。

\documentclass[a5paper,oneside,14pt]{article}
\usepackage[a5paper,landscape,left=0.5cm,right=1cm,top=0.5cm,bottom=0.5cm]{geometry}
\usepackage{tcolorbox}
\usepackage{enumitem}
\usepackage{varwidth}

\begin{document}
\begin{tcolorbox}

\begin{minipage}{17.5cm}
 \raisebox{-0.5\height}{\includegraphics[width=2cm,height=2cm]{example-image-a}}% align to center
 \hspace{7cm}\begin{varwidth}[c]{0.4\linewidth}% upper limit
 AAAA AAAA \\
 AAAA AAAA
 \end{varwidth}
 \hfill\begin{varwidth}[c]{0.4\linewidth}
 BBBB BBBB \\
 BBBB BBBB
 \end{varwidth}
\end{minipage}


\begin{itemize}[topsep=0.01cm,parsep=0.2cm,partopsep=10pt,topsep=0ex,leftmargin=1.2 cm,labelwidth=6pt,labelsep=4pt]
\item a
 \item b
 \item c
 \item d
 \item e
 \item f
 \end{itemize}

\end{tcolorbox}
\end{document}

此版本使用表格形式,对齐顶部。

\documentclass[a5paper,oneside,14pt]{article}
\usepackage[a5paper,landscape,left=0.5cm,right=1cm,top=0.5cm,bottom=0.5cm]{geometry}
\usepackage{tcolorbox}
\usepackage{enumitem}

\begin{document}
\begin{tcolorbox}

\begin{minipage}{17.5cm}
 \raisebox{\dimexpr \ht\strutbox-\height}{\includegraphics[width=2cm,height=2cm]{example-image-a}}% align to top
 \hspace{7cm}\begin{tabular}[t]{@{}l@{}}
 AAAA AAAA \\
 AAAA AAAA
 \end{tabular}
 \hfill\begin{tabular}[t]{@{}l@{}}
 BBBB BBBB \\
 BBBB BBBB
 \end{tabular}
\end{minipage}


\begin{itemize}[topsep=0.01cm,parsep=0.2cm,partopsep=10pt,topsep=0ex,leftmargin=1.2 cm,labelwidth=6pt,labelsep=4pt]
\item a
 \item b
 \item c
 \item d
 \item e
 \item f
 \end{itemize}

\end{tcolorbox}
\end{document}

相关内容