LaTeX forum ⇒ Graphics, Figures & TablesFloats in Poster

Information and discussion about graphics, figures & tables in LaTeX documents.
kostis
Posts: 1
Joined: Wed May 18, 2011 1:55 pm

Floats in Poster

Postby kostis » Wed May 18, 2011 2:38 pm

I'm using the poster template baposter. My poster includes figures and tables that need captions and labels. So I have to use the figure and table environments. However my figures and tables appear only if I put them raw in the source file (without \begin{figure}\end{figure}).
If I use the table or figure environment, the figure-table does not appear.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \headerbox{Data used}{name=data,column=0,below=introduction}{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
... text here ...
\begin{table}
\begin{tabular}{|c|c|c|}
Data-set & something  & something \\ \hline
2003     & something  & something \\
\end{tabular}
\end{table}
\vspace{0.05em}
}


Is this caused because the figure environment does not want to be in a headerbox???
Could someone tell me why this happens or suggest another way to have captions,labels without using the figure-table environments?

If it helps this are the error messages I get:
! LaTeX Error: There's no line here to end.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help.... }
"C:\Program Files\MiKTeX 2.8\tex\latex\pgf\basiclayer\pgfbaselayers.sty This package is obsolete and no longer needed
Unused global option(s):[final].
Underfull \hbox (badness 2680) in paragraph at lines 233--233

User avatar
Stefan Kottwitz
Site Admin
Posts: 9787
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed May 18, 2011 8:29 pm

Hi kostis,

welcome to the board!

figure and table are intended to float, so they are special and cannot be used everywhere. For having captions, use a the caption (or capt-of) package. For example:

\usepackage[font=small,labelfont=bf]{caption}
...

\begin{minipage}{\linewidth}
  \centering
  \captionof{table}{Your caption}
  \label{tab:name}
  \begin{tabular}
    % table content
  \end{tabular}
\end{minipage}
\begin{center}
  \includegraphics{filename}
  \captionof{figure}{text}
  \label{fig:name}
\end{center}


Stefan
LaTeX.org admin

sandman
Posts: 1
Joined: Mon Jun 10, 2013 2:31 pm

Postby sandman » Mon Jun 10, 2013 2:32 pm

See here.
\usepackage{float}
...

\begin{figure}[H]
  \centering
  \includegraphics{slike/visina8}
  \caption{Write some caption here}\label{visina8}
\end{figure}

User avatar
Johannes_B
Site Moderator
Posts: 4183
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Mon Jun 10, 2013 4:29 pm

You shouldn't use floating environments (figure and table) where they don't belong. Stefan was completely right in advising \captionof{type}{caption}.

The float package along with the option H is not a very good idea. If you don't want your objects to float, simply don't use floating environments.

LaTeX does a pretty good job in placing figures and if paragraphs are indicated correctly, it will do a good job. Because using the \captionof command can lead to wrong numbering. So be careful.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: Stefan Kottwitz and 9 guests