Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

A floating figure or table typically consists of the following parts:

  • The floating environment
  • The figure itself
  • A caption
  • Optionally, rules before/after the figure
  • Perhaps a "source" statement
  • ...

Different layouts have different requirements for, e.g., positioning of captions, typical placement of floats, presence of rules etc.. This makes code reuse difficult. For this reason, we have created an abstraction layer that takes everything the figure consists of as arguments and arranges it so that it matches the requirements of the different layouts.

My question is: Is there already a package that provides this or a similar functionality? If not, would such a package be of general interest, or is the approach flawed in some way?

share|improve this question
    
You may look at the floatrow package –  egreg Nov 1 '12 at 13:46
    
@egreg: Wow. Could you please make an answer of this so I can close this question? –  krlmlr Nov 1 '12 at 13:57
    
You can supply a self-answer from what you build up with that package –  egreg Nov 1 '12 at 13:58
add comment

1 Answer

up vote 1 down vote accepted

Thanks to egreg for pointing me at the floatrow package. I didn't go through the entire 100+ pages manual just yet, but to me it appears that

\usepackage{floatrow}
\floatsetup[table]{style=plaintop}

in the preamble and

\begin{table}
    \ttabbox
    {\caption{A small table ...}\label{...}}
    {\begin{tabular}...\end{tabular}}
\end{table}

will produce the table with the caption on top, just as would

\begin{table}
    \caption{A small table ...}\label{...}
    \begin{tabular}...\end{tabular}
\end{table}

but with the advantage that it's possible to change the location of the caption throughout the document with just one setting. Of course, the package provides many more features than just that (e.g., it can do rules with \floatsetup{style=Ruled}).

Conclusion: there's definitely no need for another package of this kind.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.