1

I am struggling to fit a figure in the right side of the page next to itemize environment. My point is that it is practical to use empty space beside itemize for figures. Any sugestions?

1
  • 1
    Welcome to TeX SX! Could you post a (full) minimal compilable code?
    – Bernard
    Oct 8 '18 at 21:31
1

Here is a way using tikz overlays (If I got the question correct):

\documentclass{article}      
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{tikz}
\begin{document}
\section{Foo}
\lipsum[1]
\begin{itemize}
    \item \begin{tikzpicture}[overlay,remember picture] \coordinate(Here);\node[shift={(-.6cm,-0.65cm)}] at(Here){\includegraphics[width=0.5cm, height=2cm]{example-image-a}}; \end{tikzpicture}Test
    \item Test 2
    \item Test 3
\end{itemize}
\end{document}

Output:

enter image description here

3
  • If "beside" is the other direction, then, by changing in the shift parameter you can place the text anywhere you like.
    – koleygr
    Oct 8 '18 at 21:45
  • Any chance I can add a caption? Oct 8 '18 at 22:10
  • The way to add a caption is in @Ignasi's answer by using caption package and \captionof command inside a minipage. But if you really want the figure to be on the left and no extra space added, you have to use tikz overlays or something simmilar. If you just want to add the figure to the right and there are no big items in itemize, @Ignasi's answer is easier and better
    – koleygr
    Oct 9 '18 at 9:16
4

You don't need TikZ, only two minipages and a captionof command for the non floating figure caption.

\documentclass{article}      
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{caption}

\begin{document}
\section{Foo}
\lipsum[1]
\begin{minipage}{.5\linewidth}
\begin{itemize}
    \item Test 1
    \item Test 2
    \item Test 3
\end{itemize}
\end{minipage}
\hfill
\begin{minipage}{.5\linewidth}
\centering
\includegraphics[width=.5\linewidth]{example-image-a}
\captionof{figure}{This is a nice image}
\end{minipage}

\end{document}

enter image description here

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.