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.

  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. \headerbox{Data used}{name=data,column=0,below=introduction}{
  3. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  4. ... text here ...
  5. \begin{table}
  6. \begin{tabular}{|c|c|c|}
  7. Data-set & something & something \\ \hline
  8. 2003 & something & something \\
  9. \end{tabular}
  10. \end{table}
  11. \vspace{0.05em}
  12. }


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:
  1. ! LaTeX Error: There's no line here to end.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help.... }
  2. "C:\Program Files\MiKTeX 2.8\tex\latex\pgf\basiclayer\pgfbaselayers.sty This package is obsolete and no longer needed
  3. Unused global option(s):[final].
  4. Underfull \hbox (badness 2680) in paragraph at lines 233--233

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 8980
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:

  1. \usepackage[font=small,labelfont=bf]{caption}
  2. ...
  3.  
  4. \begin{minipage}{\linewidth}
  5. \centering
  6. \captionof{table}{Your caption}
  7. \label{tab:name}
  8. \begin{tabular}
  9. % table content
  10. \end{tabular}
  11. \end{minipage}
  12. \begin{center}
  13. \includegraphics{filename}
  14. \captionof{figure}{text}
  15. \label{fig:name}
  16. \end{center}


Stefan
Site admin

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

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

See here.
  1. \usepackage{float}
  2. ...
  3.  
  4. \begin{figure}[H]
  5. \centering
  6. \includegraphics{slike/visina8}
  7. \caption{Write some caption here}\label{visina8}
  8. \end{figure}

User avatar
Johannes_B
Site Moderator
Posts: 3805
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: No registered users and 11 guests