Graphics, Figures & Tableslongtable | Figure inside a Cell

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
waterboy
Posts: 8
Joined: Fri Jun 17, 2011 9:47 pm

longtable | Figure inside a Cell

Post by waterboy »

Hi.

I want a figure inside a cell in a longtable. But when i try so i get the error: "Float lost". How do i fix it?

\begin{longtable}{m{0.2\textwidth}m{0.4\textwidth}m{0.3\textwidth}}
\endfirsthead
\cellcolor{niceblue}\color{white} \textbf{Abb.} &\cellcolor{niceblue}\color{white} \textbf{Meaning} & \cellcolor{niceblue}\color{white} \textbf{Comment}\\%\midrule
\endhead
\bottomrule
\multicolumn{3}{r}{\textit{continued on the next page\dots}}
\endfoot
\bottomrule
\endlastfoot
\cellcolor{niceblue}\color{white} \textbf{abb.} &\cellcolor{niceblue}\color{white} \textbf{Meaning} & \cellcolor{niceblue}\color{white} \textbf{Comment}\\
1 & 1 & \begin{figure} \includegraphics{1} \end{figure} \\

\end{longtable}

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

longtable | Figure inside a Cell

Post by localghost »

The figure environment doesn't make sense here. It will try to float. So just drop it.

And by the way, the forum software offers a »Code« environment to tag code as such. The button is in the list right above the input window while composing a message. It would be very kind if you use it. It just keep a post clear and legible.


Thorsten
waterboy
Posts: 8
Joined: Fri Jun 17, 2011 9:47 pm

Re: longtable | Figure inside a Cell

Post by waterboy »

Okay.. But how do i put a figure into a longtable?

Thanks.. I will do that :D
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

longtable | Figure inside a Cell

Post by localghost »

Of course with the \includegraphics command from the graphicx package. More specific help only possible with a true minimal example.
Post Reply