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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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