2

I am working on my dissertation and am having a problem with the caption/subcaption package pushing all tables (not figures) to the end of the document. I would like to use the subcaption package to have tables with multiple panels, but this is causing serious issues.

I have commented out the table requiring the use of the subcaption package so it's not being compiled. Then, I ONLY change wether the subcaption package is being loaded (by commenting out \usepackage{subcaption}). If it is loaded, tables are at the end of the document. If it IS NOT, there is no problem, tables appear where they should. Any help is very much appreciated.

Example:

\usepackage{amsmath, etc}
\usepackage{subcaption}
\usepackage[options]{hyperref}
\begin{document}
...
TEXT BEFORE TABLE
...
\begin{table}
TABLE
\end{table}
...
TEXT AFTER TABLE
...
\end{document}

To reiterate, if \usepackage{subcaption} is commented out, TABLE appears in the text, where it should. If \usepackage{subcaption} is compiled, TABLE occurs at the end of the document. NO OTHER CHANGES ARE BEING MADE. Please help! You're my only hope!

migrated from stackoverflow.com Jul 14 '13 at 22:23

This question came from our site for professional and enthusiast programmers.

  • 1
    It may be that there is one table causing this. That is, up to some point, all tables display where they should be. However, all tables after some point just get bundled at the end. If this is the case, you may have a too-large float that causes such problems. It's difficult to say without more information, especially working with only code snippets. – Werner Jul 12 '13 at 19:37
  • That seems to be the problem, it just happened to be my first table pushing everything to the back. The 'subcaption' package must reset something that makes my first table too large when 'subcaption' is loaded. Any idea how to reset those size parameters to their normal defaults? The table that is 'too large' isn't actually that large. – SJW Jul 12 '13 at 19:46
  • I don't know what "large" or "too large" means since I have no frame of reference. Can you include a minimal working example (MWE) that replicates the problem? – Werner Jul 12 '13 at 19:48
  • Added what? You can write up an answer. It's perfectly fine to answer your own question(s). – Werner Jul 12 '13 at 20:19
  • Problem solved! I added:\renewcommand{\topfraction}{.85} \renewcommand{\bottomfraction}{.7} \renewcommand{\textfraction}{.15} \renewcommand{\floatpagefraction}{.66} \renewcommand{\dbltopfraction}{.66} \renewcommand{\dblfloatpagefraction}{.66} to the body of the document. Thanks for your help, Werner! ( would have answered my question with the proper format, but I don't have enough 'reputation') – SJW Jul 12 '13 at 20:19
3

[Converting comments to an answer]

It may be that there is one table causing this. That is, up to some point, all tables display where they should be. However, all tables after some point just get bundled at the end. If this is the case, you may have a too-large float that causes such problems. Making more space 'available' for floats may help, for example

\renewcommand{\topfraction}{.85}
\renewcommand{\bottomfraction}{.7}
\renewcommand{\textfraction}{.15}
\renewcommand{\floatpagefraction}{.66}
\renewcommand{\dbltopfraction}{.66}
\renewcommand{\dblfloatpagefraction}{.66}

(see http://www.tex.ac.uk/cgi-bin/texfaq2html?label=floats).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy