我想要一个枚举列表和一张图片并排显示。我可以使用 beamer 的列环境使用该功能,但我需要 beamer 之外的类似功能。
\begin{columns}%
\begin{column}{0.5\textwidth}%
\begin{center}%
\includegraphics[width=0.9\textwidth]{pic/}
\end{center}%
\end{column}%
\begin{column}{0.5\textwidth}%
... % enum
\end{column}%
\end{columns}%
我尝试使用两个小页面并排放置,但我的代码不起作用。有什么解决办法吗?
\documentclass{article}
\usepackage{graphicx}
\usepackage{enumitem}
\newcommand{\boxit}[1]{\fbox{\begin{minipage}{#1}\hfill\vspace{1em}\end{minipage}}}
\begin{document}
\begin{minipage}[b]{0.3\linewidth}\centering
\includegraphics[width=2.5in]{gg}
\end{minipage}
\begin{minipage}[b]{0.3\linewidth}\centering
\begin{enumerate}[label = \arabic*.]
\setlength\itemsep{-0.2em}
\addtocounter{enumi}{0}
\item \boxit{3in}
\item \boxit{3in}
\item \boxit{3in}
\item \boxit{3in}
\item \boxit{3in}
\item \boxit{3in}
\item \boxit{3in}
\item \boxit{3in}
\item \boxit{3in}
\end{enumerate}
\end{minipage}
\end{document}
答案1
如果您想要的话,通过消除小页面之间的行距,我可以将它们并排放置。
\documentclass{article}
\usepackage[draft]{graphicx}
\usepackage{enumitem}
\newcommand{\boxit}[1]{\fbox{\begin{minipage}{#1}\hfill\vspace{1em}\end{minipage}}}
\begin{document}
\begin{minipage}[b]{0.3\linewidth}\centering
\rule{2cm}{2cm} % <--- to get a filler on my build.
\end{minipage}%<-- no line gap between minipages
\begin{minipage}[b]{0.3\linewidth}\centering
\begin{enumerate}[label = \arabic*.]
\setlength\itemsep{-0.2em}
\addtocounter{enumi}{0}
\item \boxit{3in}
\item \boxit{3in}
\item \boxit{3in}
\item \boxit{3in}
\item \boxit{3in}
\item \boxit{3in}
\item \boxit{3in}
\item \boxit{3in}
\item \boxit{3in}
\end{enumerate}
\end{minipage}
\end{document}