Beamer 桌子位于罗切斯特的中心?

Beamer 桌子位于罗切斯特的中心?

我试着中心投影机中的表格,但即使我使用,\begin{center}左侧的空间仍然比右侧的空间大。你知道我可以用这个做什么吗?

\documentclass{beamer}
\let\Tiny\tiny% http://tex.stackexchange.com/q/58087/5764    

\usepackage[utf8]{inputenc}
\usepackage{polski}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{mathabx}
\usepackage{esint}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{booktabs}

\usetheme{Rochester}

\begin{document}

\begin{frame}[plain]
\begin{center}
\begin{small}
    \begin{tabular}{p{3cm} c c c c}
    \toprule
    \textbf{qwerty} & \textbf{qwerty} & \textbf{qwerty} & \textbf{qwerty} & \textbf{qwerty}\\
    \midrule
    {qwerty} & \textcolor{red}{Niemożliwe} & \textcolor{red}{Niemożliwe} & \textcolor{orange}{Utrudnione} & \textcolor{green}{Możliwe}\\
\midrule
    \pause
    {qwerty} & \textcolor{orange}{Utrudniona} & \textcolor{orange}{Utrudniona} & \textcolor{green}{Możliwa} & \textcolor{green}{Możliwa}\\
\midrule
\pause
{qwerty} & \textcolor{red}{Trudny} & \textcolor{red}{Trudny} & \textcolor{green}{Prosty} & \textcolor{green}{Prosty}\\
\midrule
\pause
{qwerty} & \textcolor{red}{Niemożliwa} & \textcolor{red}{Niemożliwa} &    \textcolor{orange}{Utrudniona} & \textcolor{green}{Możliwa}\\
    \bottomrule
    \pause
       \end{tabular}
   \end{small}

   \textbf{qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty    qwerty    qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty }
   \end{center}
   \end{frame}

   \end{document}

答案1

可能是由于您固定了列宽,所以p{3cm}表格比 更宽textwidth。这就是它进入右侧边距的原因。

c代替p{3cm}它似乎居中:

\documentclass{beamer}
\let\Tiny\tiny% http://tex.stackexchange.com/q/58087/5764    

\usepackage[utf8]{inputenc}
\usepackage{polski}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{mathabx}
\usepackage{esint}
%\usepackage{xcolor}
%\usepackage{graphicx}
\usepackage{booktabs}

\usetheme{Rochester}

\begin{document}

    \begin{frame}[plain]
        \begin{center}
            \begin{small}
                \begin{tabular}{c c c c c}
                    \toprule
                    \textbf{qwerty} & \textbf{qwerty} & \textbf{qwerty} & \textbf{qwerty} & \textbf{qwerty}\\
                    \midrule
                    {qwerty} & \textcolor{red}{Niemożliwe} & \textcolor{red}{Niemożliwe} & \textcolor{orange}{Utrudnione} & \textcolor{green}{Możliwe}\\                      \midrule
                    \pause
                    {qwerty} & \textcolor{orange}{Utrudniona} & \textcolor{orange}{Utrudniona} & \textcolor{green}{Możliwa} & \textcolor{green}{Możliwa}\\                      \midrule
                    \pause
                    {qwerty} & \textcolor{red}{Trudny} & \textcolor{red}{Trudny} & \textcolor{green}{Prosty} & \textcolor{green}{Prosty}\\                       \midrule
                    \pause
                    {qwerty} & \textcolor{red}{Niemożliwa} & \textcolor{red}{Niemożliwa} &    \textcolor{orange}{Utrudniona} & \textcolor{green}{Możliwa}\\                      \bottomrule
                    \pause
                \end{tabular}
            \end{small}

            \textbf{qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty    qwerty    qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty qwerty }
        \end{center}
    \end{frame}

\end{document}

在此处输入图片描述

答案2

您的表格居中但太大:

段落第 42-42 行的 \hbox 过满(宽了 13.76324pt)

这大约是 0.5 英寸,您可以看到这个差异。

相关内容