1

Okay so I have a definition using the amsthm theorem environments, and a tikzpicture which I want to see side by side. The material inside the definition is not too big, so I expect the final height of the two to be about the same. wrapfig does not work inside the definition environment because it's a list. I could not get cutwin to work, it puts the picture right after "Definition." and the text below.

Then I tried tabularx (tabular gives me some missing \item error) which seems to approximate what I want the best, but somehow places the two on different rows, even though the code is like the following:

\documentclass{article}

\usepackage{tabularx,amsthm,tikz}
\newtheorem{definition}{Definition}

\begin{document}

\begin{tabularx}{\textwidth}{X r}
\begin{definition}
Blah blah blah 
\end{definition} & \begin{tikzpicture}
\draw (0,0) grid (1,1);
\end{tikzpicture}\\
\end{tabularx}

\end{document}

Is there a good way of doing this?

(P.S. I'm not sure what tags are appropriate for this.)

ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
ronno
  • 1,325
  • Are yuu sure this is a good idea from a reader stand point? – daleif Jun 17 '13 at 08:23
  • @daleif Well, the picture is supposed to be a diagram of what I'm defining. Is this considered bad practice for some reason? I myself find this useful as a reader. – ronno Jun 17 '13 at 08:24
  • Trying to wrap a definition around an image, does not look well in my opinion. Do it as a normal figure instead. – daleif Jun 17 '13 at 08:33
  • @daleif I have encountered this occasionally in certain geometry/topology related texts, see for example page 43 in http://www.math.cornell.edu/~hatcher/AT/AT.pdf, although with an "Example" instead of "Definition". Or even page 17 in the same file, where I believe he uses his own styled definition environment. So to convince me away, you'll need something better than "does not look well in my opinion". Even if I decide not to do this, I would still like to know a way of solving this problem. (Btw, my page numbers are wrt the pdf, not the book's page numbers) – ronno Jun 17 '13 at 08:43
  • Hatchers book is also the only example I can think of. Personally I find it anoying to read. I don't remember how he actually did that, but it might be a lot of paragraph shapes. I don't remember if it is written in LaTeX or plain TeX. – daleif Jun 17 '13 at 09:15
  • 1
    Have you checked out the answers to this question? http://tex.stackexchange.com/questions/14825/how-to-wrap-around-a-figure-in-a-theorem-like-environment – papabravo Jun 17 '13 at 11:10
  • Voted to close as unclear. The answers papabravo's linked question are probably solutions, but without feedback from the OP, it's impossible to say. – Paul Gessler Mar 08 '15 at 18:31
  • I think it's fine to close this as duplicate of the question linked by papabravo. – ronno Mar 08 '15 at 18:36

0 Answers0