Unable to format tables inside question environment

Added by Roberto González over 10 years ago

Hi, everybody.

I'm creating an exam with AMC 1.2.1 on openSUSE 12.3. I'm experiencing the following issues:

When creating a question where part of the information is given within a table, I'm unable to properly set the table position inside the document.
For example, if I use:

\begin{table}[h!]
\centering
\begin{tabular}
... table content
\end{tabular}
\end{table}

I get an error message telling me that floats were not displayed.

Besides, I'm not able to draw horizontal lines between the rows, except for the top of the first one. For details, see the attached files.


Replies (2)

RE: Unable to format tables inside question environment - Added by Alexis Bienvenüe over 10 years ago

As you have noticed, you can draw your tables without the table environment. It seems that you can get orizontal lines with \hline next to the \\:

\begin{center}
  \begin{tabular}{|c|c|}
  \hline
  {\bf Número de hermanos}     & {\bf Frecuencia}    \\ \hline
  0                & 19            \\ \hline
  1                & 18            \\ \hline
  2                & 19            \\ \hline
  3                & 14            \\ \hline
  4                & 20            \\ \hline
  5                & 10                    \\ \hline
  \end{tabular}
\end{center}

RE: Unable to format tables inside question environment - Added by Roberto González over 10 years ago

Thank you very much. I tried by using \begin{center} ... \end{center} but with \newline before and after this environment. It seems that was causing the problems.

(1-2/2)