2

What I am doing below should suffice but I invite any other better ways. Is there any other better ones?

\documentclass[preview,border=12pt,12pt]{standalone}
\usepackage{enumitem,graphicx}
\begin{document}
\begin{enumerate}
    \item Consider the following image.\\
    \begin{minipage}{.5\linewidth}
    \includegraphics[width=\linewidth]{example-image-a}
    \end{minipage}
    \begin{minipage}{.5\linewidth}
    \begin{enumerate}
    \item What is your name?
    \item What time is it?
    \item Who am I?
    \item Do you love me?
    \end{enumerate}
    \end{minipage}
\end{enumerate}
\end{document}

enter image description here

  • Not really. You can replace the first minipage with \raisebox{-0.5\height}{...} assuming you still want to align the centers. You can use minpages to align the bottoms, but not the tops. For that you need \rasiebox{\dimexpr \topskip-\height}{...} – John Kormylo Nov 28 '18 at 15:25
  • I do not decide the accepted answer until I am finished checking each answer and find its drawback. – Only The Paranoid Survive Nov 29 '18 at 6:46
4

You can align at top both minipages:

\documentclass[preview,border=12pt,12pt]{standalone}
\usepackage{enumitem,graphicx}
\begin{document}
\begin{enumerate}
    \item Consider the following image.

    \begin{minipage}[t]{.5\linewidth}\vspace{0pt}
    \includegraphics[width=\linewidth]{example-image-a}
    \end{minipage}
    \begin{minipage}[t]{.5\linewidth}\vspace{0pt}
    \begin{enumerate}
    \item What is your name?
    \item What time is it?
    \item Who am I?
    \item Do you love me?
    \end{enumerate}
    \end{minipage}
\end{enumerate}
\end{document}

And you can omit the first minipage using adjustbox:

\documentclass[preview,border=12pt,12pt]{standalone}
\usepackage{enumitem,graphicx}
\usepackage[export]{adjustbox}
\begin{document}
\begin{enumerate}
    \item Consider the following image.\par
    \includegraphics[valign=t,width=.5\linewidth]{example-image-a}
    \begin{minipage}[t]{.5\linewidth}
    \begin{enumerate}
    \item What is your name?
    \item What time is it?
    \item Who am I?
    \item Do you love me?
    \end{enumerate}
    \end{minipage}
\end{enumerate}
\end{document}

Or without any minipage, using multicol (but not with standalone):

\documentclass[border=12pt,12pt]{article}
\usepackage{enumitem,graphicx}
\usepackage{multicol}
\begin{document}
\begin{enumerate}
    \item Consider the following image.
    \begin{multicols}{2}
    \includegraphics[width=\linewidth]{example-image-a}
    \begin{enumerate}
    \item What is your name?
    \item What time is it?
    \item Who am I?
    \item Do you love me?
    \end{enumerate}
    \end{multicols}
\end{enumerate}
\end{document}

Or with \parbox instead of a minipage (simpler syntax):

\documentclass{article}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\begin{document}
\begin{enumerate}
    \item Consider the following image.\par
    \includegraphics[valign=t,width=.5\linewidth]{example-image-a}
    \parbox[t]{.5\linewidth}{
    \begin{enumerate}
    \item What is your name?
    \item What time is it?
    \item Who am I?
    \item Do you love me?
    \end{enumerate}} 
\end{enumerate}
\end{document}

And for a center or bottom alignment, a simple tabular could do the job using m or b columns:

\documentclass{article}
\usepackage{graphicx,array}
\begin{document}
\begin{enumerate}
    \item Consider the following image.\par
    \begin{tabular}{m{.5\linewidth}m{.5\linewidth}}
    \includegraphics[width=\linewidth]{example-image-a} &
    \begin{enumerate}
    \item What is your name?
    \item What time is it?
    \item Who am I?
    \item Do you love me?
    \end{enumerate}\\
    \end{tabular}
\end{enumerate}
\end{document}

Ahem! And also for top alignment with classic p columns (that do not need the array package but a déjà vu dirty trick):

\documentclass{article}
\usepackage{graphicx,array}
\begin{document}
\begin{enumerate}
    \item Consider the following image.\par
    \begin{tabular}{p{.5\linewidth}p{.5\linewidth}}\vspace{0pt}
    \includegraphics[width=\linewidth]{example-image-a} &
    \begin{enumerate}
    \item What is your name?
    \item What time is it?
    \item Who am I?
    \item Do you love me?
    \end{enumerate}\\
    \end{tabular}
\end{enumerate}
\end{document}

And dubiously for other purposes, but this is a good method for procastination: :)

\documentclass{article}
\usepackage{graphicx,tabto}
\begin{document}
\begin{enumerate}
    \item Consider the following image.\par
    \vbox to -0pt{
    \includegraphics[height=5cm]{example-image-a}}
    \tab
    \vbox to 2\baselineskip{
    \begin{enumerate}
    \item What is your name?
    \item What time is it?
    \item Who am I?
    \item Do you love me?
    \end{enumerate}}
\end{enumerate}
\end{document}
|improve this answer|||||
  • Ah yes, add an invisible line above the image. I would have gone with \hrule height0pt, but evidently \vspace{0pt} works too. – John Kormylo Nov 29 '18 at 14:39
2

Just some examples with tcbsidebyside boxes (from tcolorbox package):

\documentclass{article}
\usepackage[most]{tcolorbox}
\begin{document}
\begin{enumerate}
    \item Consider the following image.\par
    \tcbsidebyside[blanker, sidebyside gap=5mm]{
    \includegraphics[width=\linewidth]{example-image-a}}{%
    \begin{enumerate}
    \item What is your name?
    \item What time is it?
    \item Who am I?
    \item Do you love me?
    \end{enumerate}}
\end{enumerate}

\begin{enumerate}
    \item Consider the following image.\par
    \tcbsidebyside[righthand ratio=.4, sidebyside align=top seam, blanker, sidebyside gap=5mm]{%
    \includegraphics[width=\linewidth]{example-image-a}}{%
    \begin{enumerate}
    \item What is your name?
    \item What time is it?
    \item Who am I?
    \item Do you love me?
    \end{enumerate}}
\end{enumerate}

\begin{enumerate}
    \item Consider the following image.\par
    \tcbsidebyside[righthand ratio=.6, sidebyside align=bottom seam, blanker, sidebyside gap=5mm]{%
    \includegraphics[width=\linewidth]{example-image-a}}{%
    \begin{enumerate}
    \item What is your name?
    \item What time is it?
    \item Who am I?
    \item Do you love me?
    \end{enumerate}}
\end{enumerate}
\end{document}

enter image description here

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.