4

I'm using the thmtools to create theorem boxes.

\usepackage{thmtools}
\usepackage[unq]{unique}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{wrapfig}
\usepackage{float}

\declaretheoremstyle[
spaceabove=6pt, spacebelow=6pt,
headfont=\normalfont\bfseries,
notefont=\mdseries, notebraces={(}{)},
bodyfont=\normalfont,
postheadspace=1em,
qed=
]{mystyle}

\declaretheorem[style=mystyle, numbered=yes,name=Definition of bla and bla, shaded={bgcolor=Lavender,textwidth=20em}]{defBDL}

How do I wrap text around that 20em-wide box?

Werner
  • 603,163
feder
  • 143

1 Answers1

3

Here is a sample (using the lipsum package to create the dummy text):

Sample output

\documentclass{article}

\usepackage{amsthm}
\usepackage{thmtools}
\usepackage[unq]{unique}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{wrapfig}
\usepackage{float}

\declaretheoremstyle[
spaceabove=6pt, spacebelow=6pt,
headfont=\normalfont\bfseries,
notefont=\mdseries, notebraces={(}{)},
bodyfont=\normalfont,
postheadspace=1em,
qed=
]{mystyle}

\declaretheorem[style=mystyle, numbered=yes,name=Definition of bla and bla, shaded={bgcolor=Lavender,textwidth=20em}]{defBDL}

\usepackage{lipsum} %To produce dummy text

\begin{document}

\lipsum*[1]
\begin{wrapfigure}{l}{20em}
  \begin{defBDL}
    \lipsum[10]
  \end{defBDL}
\end{wrapfigure} \lipsum[2-4]

\end{document}
Andrew Swann
  • 95,762