On the next page I get a small table all by itself. But the table
could easily fit in on the float page. I can do this if I changes the
table to be a figure, even though it has tabular content. It works
fine except that the caption is 'Figure' not 'Table' and it is also
numbered as a figure.
How do I fix this?
Pict1 Pict2
Pict3 Table1
Thanks in advance.
J{\o}rn
--
Joern Lodahl - I used to be a Falcon...
(remove SPAMFILTR from above address) http://www.mi.aau.dk/~jqrn/
Doing an Industrial Ph.D. in Regional Science/Operations Research.
We can learn from history that we don't learn from history!
The following example defines a \tabcaption command which
produces table captions in figure environments. Similarly,
the \figcaption command produces figure captions in table
environments.
Since LaTeX allows table floats leapfrog figure floats (and
vice-versa) this may result in out-of-order figures/tables.
In the example below, the figure environment may be placed
ahead of an unprocessed table environment, this will cause the
\tabcaption table to appear ahead of the lower-numbered tables
in the unprocessed table environment. Putting a \FloatBarrier
(from the placeins package) before the figure will solve this.
Good luck,
Keith
\documentclass{article}
\usepackage{graphicx}
\makeatletter
\newcommand\tabcaption{\def\@captype{table}\caption}
\newcommand\figcaption{\def\@captype{figure}\caption}
\makeatother
\begin{document}
\begin{figure}
\begin{minipage}[b]{0.47\textwidth}
\centering
\includegraphics[width=0.8\textwidth]{file.eps}
\caption{This is a Figure by a Table}
\label{fig:by:table}
\end{minipage}%
\hfill%
\begin{minipage}[b]{0.47\textwidth}
\centering
\begin{tabular}{|c|c|} \hline
Day & Reading \\ \hline\hline
Monday & 14.6 \\
Tuesday & 14.3 \\
Wednesday & 14.2 \\
Thursday & 14.5 \\
Friday & 14.9 \\ \hline
\end{tabular}
\tabcaption{This is a Table by a Figure}
\label{table:by:fig}
\end{minipage}%
\end{figure}
\end{document}
But it obviously doesn't fit or LaTeX woould have put it there.
I recommend you set smaller values for \@fpsep and \abovecaptionskip:
\makeatletter % *WHY* is this parameter "internal" when \textfloatsep isn't?
\setlength{\@fpsep}{4pt plus 2fil} % was 8pt plus
\makeatother
\setlength{\abovecaptionskip}{5pt}% was 10pt
Donald Arseneau as...@triumf.ca