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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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