Graphics, Figures & TablesCaption for Figure in Textblock

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
pazmush
Posts: 23
Joined: Thu Jan 01, 2009 11:39 pm

Caption for Figure in Textblock

Post by pazmush »

i have this


\begin{textblock}{7}(7.5, 3)
\begin{figure}
\includegraphics[width=\textwidth]{pics/tcbg.eps}
\caption{adam}
\label{tcbg}
\end{figure}
\end{textblock}

and it gives me a

\caption outside float error

can anyone help

thanks
Last edited by pazmush on Thu May 26, 2011 12:07 pm, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Caption for Figure in Textblock

Post by localghost »

Never use a float environment within another environment. It will always try to float out. Use the the \captionof command from the caption package to allow captions wherever you need them.

By the way, there is a »Code« button that you should use for inserting code here. It just improves the readability of your posts.


Thorsten
Post Reply