0

I would like a figure (including a Tikz picture) to appear inside a theorem-like environment (the point is that I need a caption for the figure).

Even using the option [H] with the float package the figure does not behave so.

Is there an easy way of accomplishing this?

Thanks

suitangi
  • 799
  • The packages caption and capt-of offer the facilities to have captions outside of floats. – gernot Sep 21 '16 at 10:42
  • with H the figure will stay where you place it, but the only reason to use figure is to allow latex to move it so just using tikzpicture (or \includegraphics) directly without a figure environment is often clearer – David Carlisle Sep 21 '16 at 10:44
  • @David Indeed, the figure does not appear where I placed it (inside the environment, i.e. just below the environment heading). On the other hand, I used figure to allow a caption; is it not a valid reason for using it? – suitangi Sep 21 '16 at 10:52
  • 1
    as the first comment says you can add a caption anywhere if you use the capt-of package (which is just one line of code:-) – David Carlisle Sep 21 '16 at 10:53
  • I see, if any of you wants to write this as an answer I will accept it. Thanks! – suitangi Sep 21 '16 at 10:58
  • but I don't see why H should not work (but the question must be a duplicate of something, probably the "when do we still need.." one in the related links on the right:-) – David Carlisle Sep 21 '16 at 11:05

0 Answers0