Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
Aligning enumerate labels to top of image?

The current code produces the labels at the lower left corners of the enumerated images.

enter image description here

\documentclass[a6paper]{article}
\usepackage{geometry,graphicx,multicol,enumerate}
\columnsep=5pt

\begin{document}
\begin{enumerate}[\bf 1.]
\item Which is the correct diagram?
    \begin{multicols}{2}
        \begin{enumerate}[a.]
            \item \includegraphics[width=\linewidth]{example-image-A}           
            \item \includegraphics[width=\linewidth]{example-image-B}
            \item \includegraphics[width=\linewidth]{example-grid-100x100pt}            
            \item \includegraphics[width=\linewidth]{example-image-A}           
            \item \includegraphics[width=\linewidth]{example-image-B}
        \end{enumerate}
    \end{multicols}
\item What is your name?
\end{enumerate}
\end{document}

How to put the labels of enumerated images at the middle left of the images?

share|improve this question

marked as duplicate by egreg, Who is crazy first, Torbjørn T., Tom Bombadil, Claudio Fiandrino Oct 21 '12 at 12:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
With the adjustbox package it's easy to position the image as one prefers. However, for languages written from left to right and from top to bottom, the order of the labels seems wrong: "a" and "b" should be in the first row. Never use \bf: \bfseries is the correct command. –  egreg Oct 21 '12 at 10:23
    
@egreg: Thanks for this useful comment. I have made the answer in wiki. –  Who is crazy first Oct 21 '12 at 10:32
    
Almost identical question. –  Who is crazy first Oct 21 '12 at 10:42

1 Answer 1

up vote 2 down vote accepted

enter image description here

\documentclass[a6paper]{article}
\usepackage{geometry,graphicx,multicol,enumerate,adjustbox}
\columnsep=5pt
\def\importgraphics#1{\adjustbox{valign=m}{\includegraphics[width=\linewidth]{#1}}}

\begin{document}
\begin{enumerate}[\bfseries 1.]
\item Which is the correct diagram?
    \begin{multicols}{2}
        \begin{enumerate}[a.]
            \item \importgraphics{example-image-A}
            \item \importgraphics{example-image-B}
            \item \importgraphics{example-grid-100x100pt}           
            \item \importgraphics{example-image-A}          
            \item \importgraphics{example-image-B}
        \end{enumerate}
    \end{multicols}
\item What is your name?
\end{enumerate}
\end{document}
share|improve this answer

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