1

Let's say I have something like this

text text text

\begin{mywraptable}{r}{6cm}
my beautiful table
\end{mywraptable}

text text text

And now I define the following custom environment:

\newenvironment{mywraptable}[3]{%
\begin{wraptable}{#1}{#2}
\caption{#3}
}{%
\end{wraptable}
}

Why does the following not properly "wrap" with the surrounding text?

text text text

\begin{mywraptable}{r}{6cm}{hello}
my beautiful table
\end{mywraptable}

text text text
carsten
  • 2,966

1 Answers1

1

I discovered this question was a duplicate of Defining a custom wrapfig environemnt and was able to solve the issue by replacing \begin{wraptable} with \wraptable and \end{wraptable} with \endwraptable.

carsten
  • 2,966