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}
0

1 Answer 1

7

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}
3
  • @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). Nov 22, 2018 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? Nov 22, 2018 at 8:56
  • @DavidCarlisle --- My mistake; I didn't see that your answer requires the adjustbox package. Nov 22, 2018 at 10:06

Not the answer you're looking for? Browse other questions tagged .