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?

2
  • Instead of code snippets, please provide a complete, minimal working example (MWE).
    – Werner
    Sep 12, 2013 at 2:01
  • Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question.
    – Werner
    Sep 23, 2013 at 18:16

1 Answer 1

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}
1
  • Solid example. Appreciated. Thank you, Andrew.
    – feder
    Sep 25, 2013 at 9:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .