I want to format my documents in such a way that the image is to the right of the text and the text should wrap to it. Can you help me to do this? By the way I am using enumitem package.
Asked
Active
Viewed 771 times
3
Schweinebacke
- 26,336
user484792
- 55
2 Answers
3
With enumtiem's series and resume and convenient minipages you can solve the problem.
\documentclass{article}
\usepackage{enumitem}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\begin{enumerate}[series=myproblems]
\item \lipsum[2]
\item \lipsum[3]
\end{enumerate}
\begin{minipage}{.6\textwidth}
\begin{enumerate}[resume=myproblems]
\item This is a nice problem that you can solve with \texttt{resume} option of \texttt{enumitem} package. Include your text into a \texttt{minipage}
\item And the figure into another \texttt{minipage}
\item \dots
\item \dots
\end{enumerate}
\end{minipage}\hfill
\begin{minipage}{.3\textwidth}\centering
\includegraphics[width=\textwidth]{example-image}
\end{minipage}
\begin{enumerate}[resume=myproblems]
\item Some more problems
\item \lipsum[2]
\end{enumerate}
\end{document}
Ignasi
- 136,588
2
\documentclass{article}
\usepackage{graphicx}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}
\item text text text text text text text text text text text text text text text text text text text text text
\parbox[b]{.7\textwidth}{%
\item text text text text text text text text text text text text text text text text text text text text text
\item text text text text text text text text text text text text text text text text text text text text text
}\hfill\includegraphics[width=.2\textwidth]{example-image}
\item text text text text text text text text text text text text text text text text text text text text text
\end{enumerate}
\end{document}
samcarter_is_at_topanswers.xyz
- 158,329



wrapfiguredoesn't work in lists. – Torbjørn T. Oct 16 '17 at 09:15enumerateand topicwrapfigureyou will get several answers that could help. – Schweinebacke Oct 16 '17 at 09:26texmakerwould be completely wrong. I've removed it (and added two others). – Schweinebacke Oct 16 '17 at 09:30