2

After I change the bullet symbol of an item to be an image, it seems the bottom of the image is aligned with the top of the bullet text. A minimal example below (note.png):

\documentclass{article}

\usepackage{blindtext,graphicx}

\begin{document}

\blindtext

\begin{itemize}
\item[\includegraphics{note}] \blindtext
\end{itemize}

\end{document}

itemize with graphics

I'm wondering if it is possible to top-align the image with the text.

1 Answer 1

3

Here's a solution using enumitem. There may be a problem with the amount of whitespace surrounding your image. I left it as is because I'm not sure what your thoughts are about that, but if you trimmed the image somewhat, it might look better.

\documentclass{article}
\usepackage{blindtext,graphicx}
\usepackage{enumitem}
\setlist[1]{labelindent=\parindent}
%\setlist[itemize]{leftmargin=*}
\setlist[itemize,1]{label={%
    \raisebox{-\height}[0pt][0pt]{%
      \includegraphics{note}}}}

\begin{document}

\blindtext

\begin{itemize}
\item \blindtext
\end{itemize}

% The whitespace problem
\fbox{\includegraphics{note}}

\end{document}
2
  • You may find something like \raisebox{-0.7\height}[0pt][0pt]{...} acceptable in this case with this image, as long as you recognize it for the hack that it is.
    – jon
    Oct 13, 2015 at 3:39
  • Thanks! I can certainly trim the white margin of the image.
    – Yihui Xie
    Oct 13, 2015 at 4:05

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.