Floating table for new page

1

Hello,

I'm trying to fit a table so that it stays on the same page as the section that was created to behave it, however, even though it's an empty page section with only this table, it automatically moves to a new page leaving the table previous blank.

\documentclass[a4paper,12pt,oneside,onecolumn,final,fleqn]{repUERJ}                           
\usepackage{graphicx}       
\usepackage{subfig}
\usepackage{multirow}
\usepackage{amsmath,amssymb}  
\usepackage[alf]{abntex2cite} 
\usepackage[font=default,frame=no]{repUERJformat}                                             
\usepackage[maxfloats=25]{morefloats}
\usepackage{array}
\setlength\extrarowheight{2pt}
\usepackage[section]{placeins}
\usepackage{placeins}'

My table:

\begin{table}[h] {12cm}
    \centering
    \caption{Variáveis e Fontes dos Dados}
    \label{Variáveis e Fontes dos Dados}
    \begin{tabular}{cc}
        \textbf{Variável}                                                                                                                                               & \textbf{Fonte} \ \hline
        \multicolumn{1}{c|}{I  }                                                                                                             & SEV           \ \hline
        \multicolumn{1}{c|}{P }                                                                                                                              & IBGE           \ \hline
        \multicolumn{1}{c|}{A}                                                                                                                         & IBGE           \ \hline
        \multicolumn{1}{c|}{\begin{tabular}[c]{@{}c@{}}T = Intensidade Energética\ O\end{tabular}} & IBGE e BEN     \ \hline
    \end{tabular}
\end{table}

I have tried too many options variations of the float package, such as [H] , but did not change that.

NOTE: I am using the available repUerj template here

    
asked by anonymous 10.05.2018 / 00:41

1 answer

0

Try deleting the second load of placeins on

\usepackage[section]{placeins}
\usepackage{placeins}

Maybe this has cleared the section option on the first call. If it does not work, try to force before the section with '\ FloatBarrier'

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

Algum texto finalizando a seção.

\FloatBarrier

\section{próxima seção}

But I recommend using this kind of thing only in the end. Let the table and figures float in the drafts. Normally LaTeX finds a better position than I imagine. Only in very short texts do I have to force the position of the figure.

If none of this works, you do not need to let the table float. Remove the tab from within table and use \captionof .

\begin{minipage}{\textwidth}
  \centering
  \captionof{table}{Variáveis e Fontes dos Dados}
  \label{Variáveis e Fontes dos Dados}
  \begin{tabular}{cc}
    \multicolumn{1}{c|}{I} & SEV \ \hline
    \multicolumn{1}{c|}{P} & IBGE \ \hline
    \multicolumn{1}{c|}{A} & IBGE \ \hline
    \multicolumn{1}{c|}{\begin{tabular}[c]{@{}c@{}}T = Intensidade Energética
                        \ O\end{tabular}} & IBGE e BEN \ \hline
    \end{tabular}
\end{minipage}
    
10.05.2018 / 18:48