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.

I am wondering when you place a non-floating object such as a minipage into a floating environment such as a table or figure if this construction as a whole is then a floating or a non-floating object?

Example:

\begin{table}
    \begin{minipage}
    ...
    \end{minipage}

    \begin{minipage}
    ...
    \end{minipage}
\end{table}

Is this table considered to be a floating object or in different words, is this object still floating?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

A minipage environment, just like \parbox, \mbox, \makebox and similar commands creates an object that to LaTeX is almost like a big letter. The same holds for tabular.

A floating object is one that LaTeX defers the positioning of, typically table or figure (and other similar floats that can be defined with packages such as newfloat or are defined by packages such as algorithm and listings).

Each floating object is essentially a chunk of copy that is momentarily stored in memory for being placed accordingly to LaTeX rules. It can contain anything that can go in normal text, including minipage, tabular and so on. The only restriction is that a float cannot contain another float and page breaking instructions (that make no sense in them).

Let's see an example that often confuses beginners. Typically, a figure float has this structure

\begin{figure}
\centering
\includegraphics{file}
\caption{A caption}\label{label}
\end{figure}

This declares a float that LaTeX will place according to its rules. However, \includegraphics by itself is a command similar to \mbox and so can go anywhere: to the eyes of LaTeX it's a "big letter". In the case of a figure we can see it: LaTeX builds a paragraph (with center "justification") consisting only of one big letter. The caption is, by rule, a differently built object.

Thus the answer to your question is yes: table is a floating object, whatever it contains.

share|improve this answer
    
wow, that's an amazing explanation to my simple question. thanks a lot for clarifying that. I now know even more than actually requested :-) Many thanks! –  Josh Feb 17 '13 at 10:42

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.