[Tex/LaTex] \bottomrule not working in tabular environment with minipage inside

tables

When I use this code: \toprule works well. \bottomrule appear on the bottom but this error occurs: misplaced \noalign \bottomrule. You know why? Thank you!

\begin{quadro}
\caption{Experiência com ensino de italiano - grupos 1 e 2}
\label{quad:experiencia_com_ensino_de_italiano_grupos1_e2}
 \begin{tabular}{c}
 \toprule
 \begin{minipage}{.5\textwidth}
  \renewcommand{\bcfontstyle}{} %muda a fonte do gráfico - bchart - para o padrão do documento. 
     \begin{bchart}[step=50, max=100, unit=\%, scale=0.4]
          \bcxlabel{Grupo 1}
          \bcbar[label=Sim]{76}
              \medskip
          \bcbar[label=Não]{24}
    \end{bchart}
\end{minipage} 
\begin{minipage}{.5\textwidth}
   \renewcommand{\bcfontstyle}{} %muda a fonte do gráfico - bchart - para o padrão do documento. 
   \begin{bchart}[step=50,max=100, unit=\%, scale=0.4]
   \bcxlabel{Grupo2}
          \bcbar[label=Sim]{91}
              \medskip
          \bcbar[label=Não]{9}
 \end{bchart}
 \end{minipage}
 \bottomrule
 \end{tabular}
 \end{quadro}

Best Answer

You can only place rules after the table preamble or after a line change command \\ (or similar). You can add \\ after the last minipage:

\documentclass[draft]{article}
\usepackage{newfloat}
\usepackage{booktabs}
\usepackage{bchart}

\DeclareFloatingEnvironment{quadro}

\begin{document}

\begin{quadro}
\caption{Experiência com ensino de italiano - grupos 1 e 2}
\label{quad:experiencia_com_ensino_de_italiano_grupos1_e2}
 \begin{tabular}{@{}c@{}}
 \toprule
 \begin{minipage}{.5\textwidth}
  \renewcommand{\bcfontstyle}{} %muda a fonte do gráfico - bchart - para o padrão do documento. 
     \begin{bchart}[step=50, max=100, unit=\%, scale=0.4]
          \bcxlabel{Grupo 1}
          \bcbar[label=Sim]{76}
              \medskip
          \bcbar[label=Não]{24}
    \end{bchart}
\end{minipage}% 
\begin{minipage}{.5\textwidth}
   \renewcommand{\bcfontstyle}{} %muda a fonte do gráfico - bchart - para o padrão do documento. 
   \begin{bchart}[step=50,max=100, unit=\%, scale=0.4]
   \bcxlabel{Grupo2}
          \bcbar[label=Sim]{91}
              \medskip
          \bcbar[label=Não]{9}
 \end{bchart}
 \end{minipage}\\
 \bottomrule
 \end{tabular}
 \end{quadro}

\end{document}

enter image description here

Notice that I commented out a superfluous blank space after the first \end{minipage} (otherwise, you'll get an overfull \hbox). I also killed the space before and after the tabular contents using @{}c@{} (again, to prevent an overfull \hbox).

Related Question