4

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}
2
  • You can only place rules after the table preamble or after a line change command ` \\ ` (or similar). Feb 8, 2014 at 3:18
  • in addition to needing \\ before the rule, your table will be too wide, the content of the c column is two minipages .5\textwidth wide separated by an inter-word-space, and then you have \tabcolsep space either side from the table padding so the total is 2\tabcolsep+ 1space wider than the page. Feb 8, 2014 at 3:22

1 Answer 1

4

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).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .