0

Is it possible to store the caption of an image on the right inside an itemize list? So I have images and want to enumerate them and add the caption on the right side instead of below the image:

enter image description here

EDIT: I want to do something like below, no enumerating, just some images on the left side of the item in a \itemize section and a caption on the right. The images should occur inside the list of figures if possible.

\begin{itemize}
\item \begin{figure}[H]
  \includegraphics{Images/Sample1234.png}
    \caption[abc] {abcdefgh}
    \label{fig1}
\end{figure}
\item \begin{figure}[H]
  \includegraphics{Images/Sample.png}
    \caption[blablabla] {adhfiusgvb}
    \label{fig2}
\end{figure}
\end{itemize}
  • 1
    do you want to add captions to list of figure? – touhami Sep 10 '16 at 18:25
  • Yes, but I don't want to enumerate them like 1. blabla 2.whatever – FranzHuber23 Sep 12 '16 at 16:05
2

Here is a solution

\documentclass{article}
\usepackage{mwe}% just for the example

\renewcommand\labelenumi{\textbullet}

\newcommand{\mycaption}[1]{%
%\addcontentsline{lof}{figure}{\unexpanded{#1}}%  %   if  list of figure needed
My nice image \theenumi{} #1}


\begin{document}
\begin{enumerate}
\item \includegraphics[scale=.15]{example-image} \mycaption{caption} 
\item \includegraphics[scale=.15]{example-image} \mycaption{an other caption} 
\end{enumerate}
\end{document}

Update

\documentclass{article}
\usepackage{mwe}% just for the example

\usepackage{linegoal}


\newcommand{\mycaption}[1]{%
\addcontentsline{lof}{figure}{\unexpanded{#1}}
\quad\parbox[b]{\linegoal}{#1}}

\begin{document}
\listoffigures
\begin{itemize}
\item \includegraphics[scale=.15]{example-image} \mycaption{caption} 
\item \includegraphics[scale=.2]{example-image} \mycaption{an other caption} 
\end{itemize}
\end{document}
  • 1
    I would have gone with \refstepcounter{figure} and \thefigure, but probably this is good enough. – John Kormylo Sep 10 '16 at 19:15
  • 1
    @JohnKormylo I just suppose that the OP want images to be numbered this way as he used caption1, caption2 – touhami Sep 10 '16 at 19:19
  • Sorry, my failure, I didn't want to enumerate the captions in any way. Just have images on the left and the captions on the right inside a list (\enumerate) item. – FranzHuber23 Sep 12 '16 at 16:07
  • I have edited my question to make it more understandable. – FranzHuber23 Sep 12 '16 at 16:24
  • @FranzHuber23 please see update. – touhami Sep 14 '16 at 10:00

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.