2

Currently the bottom of the image is aligned with the enumeration number, how can I align the top of the image instead?

enter image description here

\documentclass[12pt]{article}
\usepackage{graphicx}
\begin{document}

\begin{enumerate}
    \item %1
    \includegraphics{test.png}
\end{enumerate}

\end{document}
6

enter image description here

\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage[Export]{adjustbox}
\begin{document}

\begin{enumerate}
    \item %1
    \includegraphics[width=5cm,valign=t]{example-image.png}
\end{enumerate}

\end{document}
  • @David Carlisle --- This answer is different from the answers to the duplicate question, and arguably better. Perhaps you could also post it as an answer there (or maybe there is some site convention for moving answers in such cases). – Ian Thompson Nov 22 '18 at 8:33
  • @IanThompson I looked when it was marked as dup, but it's essentially the same as egreg's accepted answer ther, adjustbox/valign=t isn't it? – David Carlisle Nov 22 '18 at 8:56
  • @DavidCarlisle --- My mistake; I didn't see that your answer requires the adjustbox package. – Ian Thompson Nov 22 '18 at 10:06

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