1

Attempting to use wraptable/wrapfigure from within a bulleted list results in the table going below the list, and not within the list itself.

The text in the bulleted list should be paragraph-sized, but I've shortened them for the purpose of a MWE.

Preamble text
\begin{itemize}
\item Bullet 1
\item Bullet 2
\item Bullet 3

\begin{wraptable}{r}{4.3cm}
\begin{tabular}{|c|c|}
\hline
  &\textbf{YYYYY}\\
\hline
HF/HF &XXXX         \\  
HF/HF &XXXX         \\  
HF/HF &XXXX         \\
\hline 
\end{tabular}
\caption{Caption.}
\label{table: XXYY}
\end{wraptable}

\item Bullet 4
\item Bullet 5
\item Bullet 6
\end{itemize}

Prologue text

Usually the way I've worked around this is to place the wraptable just before \begin{itemize}, but this anchoring only works so far and is undesirable if the table needs to be, say on the second page of a two-page bulleted list.

ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
ChrisP
  • 13

1 Answers1

4

enter image description here

\documentclass{article}
\def\t{Bullet 3 Bullet 3 Bullet 3 Bullet 3 Bullet 3 Bullet 3 }
\usepackage{wrapfig}
\newsavebox\wrbox
\sbox\wrbox{\parbox[t]{\dimexpr\columnwidth-\leftmargini}{%
\mbox{}\par\vspace{-\baselineskip}
\begin{wraptable}{r}{4.3cm}
\begin{tabular}{|c|c|}
\hline
  &\textbf{YYYYY}\\
\hline
HF/HF &XXXX         \\  
HF/HF &XXXX         \\  
HF/HF &XXXX         \\
\hline 
\end{tabular}
\caption{Caption.}
\label{table: XXYY}
\end{wraptable}
\t\t\t\t\t\t\t\t\t\t}}

\begin{document}


Preamble text
\begin{itemize}
\item Bullet 1
\item Bullet 2
\item \usebox\wrbox


\item Bullet 4
\item Bullet 5
\item Bullet 6
\end{itemize}

\noindent X\dotfill X

Prologue text


\end{document}
David Carlisle
  • 757,742