2

I was making description under equation using gather method from this this page.

\begin{gather}\label{eq:1}
R=\rho \frac{l}{A},
\intertext{Where:}
  \begin{tabular}{>{$}r<{$}@{\ :\ }l}
    P_{xi} & is the predicted rate for user~$x$ on item~$i$ \\
    S_{ki} & is the rate of song~$i$ given by user~$k$ \\
    D_{kx} & the correlation between user~$x$ and user~$k$ \\
    \overline{U}_x & the average rate over user~$x$ \\
    \overline{U}_k & the average rate over user~$k$ \\
    \sigma_x & is the standard deviation of all the rates of user~$x$
  \end{tabular}\nonumber
\end{gather}

In result some float image appeared between equation and description. What is the way to keep some block together disallowing floats to be placed inside of them?

d21d3q
  • 121
  • your example code is incomplete -- it doesn't include any floating material. please provide a complete (small) example that reproduces the problem, starting with \documentclass and ending with \end{document}. – barbara beeton Jun 25 '15 at 12:19

1 Answers1

2

Put the tabular into the \intertext, too:

\noindent\begin{minipage}{\linewidth}
\begin{gather}\label{eq:1}
    R=\rho \frac{l}{A},
    \intertext{Where:
      \begin{tabular}[t]{>{$}r<{$}@{\ :\ }l}
        P_{xi} & is the predicted rate for user~$x$ on item~$i$ \\
        S_{ki} & is the rate of song~$i$ given by user~$k$ \\
        D_{kx} & the correlation between user~$x$ and user~$k$ \\
        \overline{U}_x & the average rate over user~$x$ \\
        \overline{U}_k & the average rate over user~$k$ \\
        \sigma_x & is the standard deviation of all the rates of user~$x$
    \end{tabular}}\nonumber
\end{gather}
\end{minipage}

enter image description here

  • didn't help, I still have floating figure between equation and description. – d21d3q Jun 25 '15 at 11:20
  • see edited answer –  Jun 25 '15 at 12:27
  • works, but... I feel that it should work like this, that it should be (page)breakable. There can be pagebreak anywhere in whole block, but no float is acceptable inside of it. Your answer is enough, but I am still looking for some "ideal solution) – d21d3q Jun 25 '15 at 18:03
  • you can try as optional argument for the float [!htb] –  Jun 25 '15 at 18:14
  • one more thing - linebreaking is not working. If description is long it stays in one line. – d21d3q Jun 26 '15 at 21:27
  • sure, you used a default r column instead of a p{width} one. Or a tabularx with a X column –  Jun 26 '15 at 21:38
  • solved with tabularx. So as long as I use minipage there is no need to use intertext and gather? – d21d3q Jun 26 '15 at 21:49
  • yes, that is correct –  Jun 26 '15 at 21:51