1

I'm using (Metropolis Theme like a Beamer) and I make a simple table and something big is shown, then I looked how to reduce it and I used:

\begin{table}[H]
\resizebox{0.8\textwidth}{!}{\begin{minipage}{\textwidth} 
....
\end{minipage}}
\end{table}

and works fine, but the table isn't center position, always move more right side. I try to include all table using \centering \begin{center} and \begin{flushleft}, but it doesn't move.

Here my Table:

\begin{flushleft}
\begin{table}[H]
 \resizebox{0.8\textwidth}{!}{\begin{minipage}{\textwidth}
\begin{tabular}{l| l l}
\toprule
\textbf{Parameters} & \textbf{Description of values}  \\
\toprule
$ Prohibited\_times $ & Timeslots prohibited for the event. \\
$ Prohibited\_rooms $ & Rooms prohibited for the event. \\
$ Prohibited\_events\_clash $ & Events you can not clash. \\
$ Count\_students $ & Number of students associated to the event. \\
$ Predecessor $ & Events predecessor to the event. \\
$ Successor $ & Event successor to the events. \\
$ Features $ & Characteristics of the event. \\
\bottomrule
\end{tabular}
\end{minipage}}
\end{table}
\end{flushleft} 
\end{frame}

enter image description here

Any ideas? regards

1
  • 2
    Avoid scaling tables via resizing the surrounding box. Use a smaller font and also use \textunderscore if you don't have any \texttt around the text instead of abusing math mode.
    – percusse
    Jul 5, 2017 at 16:35

2 Answers 2

3

Have you tried to include \centering after \begin{table}[h]?

Also, you can remove the minipage environment.

The example below worked just fine for me:

\begin{frame}
    \begin{table}[h]
    \centering
    \resizebox{0.7\textwidth}{!}{
        \begin{tabular}{l l l}
\toprule
\textbf{Parameters} & \textbf{Description of values}  \\
\toprule
$ Prohibited\_times $ & Timeslots prohibited for the event. \\
$ Prohibited\_rooms $ & Rooms prohibited for the event. \\
$ Prohibited\_events\_clash $ & Events you can not clash. \\
$ Count\_students $ & Number of students associated to the event. \\
$ Predecessor $ & Events predecessor to the event. \\
$ Successor $ & Event successor to the events. \\
$ Features $ & Characteristics of the event. \\
\bottomrule
        \end{tabular}
    }
    \end{table}
\end{frame}
2
  • Hi, I have tried it but it continues the same way.
    – affernan
    Jul 5, 2017 at 17:47
  • Can you add a minimum working example with your beamer settings? I used \centering and it worked just fine.
    – Andre
    Jul 5, 2017 at 18:40
1

I tried with adjustbox and it worked. regards.

\begin{table}[h]
\centering
\begin{adjustbox}{max width=\textwidth}
\begin{tabular}{l| l l}
\toprule
\textbf{Parameters} & \textbf{Description of values}  \\
\toprule
$ Prohibited\_times $ & Timeslots prohibited for the event. \\
$ Prohibited\_rooms $ & Rooms prohibited for the event. \\
$ Prohibited\_events\_clash $ & Events you can not clash. \\
$ Count\_students $ & Number of students associated to the event. \\
$ Predecessor $ & Events predecessor to the event. \\
$ Successor $ & Event successor to the events. \\
$ Features $ & Characteristics of the event. \\
\bottomrule
\end{tabular}
\end{adjustbox}
\end{table}
\end{frame}

You must log in to answer this question.

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