0

enter image description here

\documentclass[usenames,dvipsnames]{beamer}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{listings}
\usepackage{dcolumn}
\usepackage{algpseudocode}
\usefonttheme[onlymath]{serif}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage[justification=centering]{caption}
\usetheme{Madrid}
\newcolumntype{2}{D{.}{}{2.0}}
\begin{document}
\begin{frame}
 \frametitle{GF(2)}
 The simplest finite field is $GF(2)$. It's arithmetic operation are easily summarized:
 \\
\begin{columns}
\setlength{\tabcolsep}{3.5pt}
\noindent
\begin{column}{0.3\linewidth}
  \begin{tabular}{r|*{2}{2}}
+ & 0 & 1\\
\hline
0 & 0 & 1\\
1 & 1 & 0\\
\end{tabular}
\captionof{table}{Addition}
\end{column}
\begin{column}{0.3\linewidth}
  \begin{tabular}{r|*{2}{2}}
x & 0 & 1\\
\hline
0 & 0 & 0\\
1 & 0 & 1\\
\end{tabular}
\captionof{table}{Multiplication}
\end{column}
\begin{column}{0.3\linewidth}
  \begin{tabular}{r|*{2}{2}}
x & 0 & 1\\
\hline
0 & 0 & 0\\
1 & 0 & 1\\
\end{tabular}
\captionof{table}{Inverse}
\end{column}
\end{columns}
 \end{frame}    
\end{document}  

I want to align the tables and their captions. I want to show caption as "addition", "multiplication", "Inverse" without the "Table".

alhelal
  • 2,451
  • 2
    Just do \usepackage[labelformat=empty,justification=centering]{caption} and perhaps add \centering before each \begin{tabular}. (Much simpler than playing with Galois fields... ;-) –  Jul 29 '18 at 17:40

1 Answers1

2

The only real benefit from using a caption in beamer is that the word "Table" is added. So instead of trying to remove the word, why use a caption in the first place?


Some other comments:

  • as said several times, you don't need \usepackage{xcolor} with beamer

  • the correct syntax for passing options to the xcolor package is xcolor={usenames,dvipsnames}.

  • you should also not use \\ to get a new line before the columns environment (see When to use \par and when \\, or blank lines).

  • Another thing which I don't understand: why are you specifying 4 columns if your tables only have 3?

  • your definition of the "2" column type is for numbers with more digits. You probably noticed that the columns consequently get too wide (a problem you try to solve with \setlength{\tabcolsep}{3.5pt}). Instead you could define a suitable column type or simply use a standard c column as your numbers don't have any decimal marks to align.


\documentclass[xcolor={usenames,dvipsnames}]{beamer}
%\usepackage{xcolor}

\usetheme{Madrid}

\begin{document}

\begin{frame}
\frametitle{GF(2)}

The simplest finite field is GF(2). It's arithmetic operation are easily summarized:
\bigskip
\begin{columns}
\begin{column}{0.3\linewidth}
\centering
\begin{tabular}{r|*{2}{c}}
+ & 0 & 1\\
\hline
0 & 0 & 1\\
1 & 1 & 0\\
\end{tabular}

\vspace*{.5\baselineskip}
Addition
\end{column}
\begin{column}{0.3\linewidth}
\centering
\begin{tabular}{r|*{2}{c}}
x & 0 & 1\\
\hline
0 & 0 & 0\\
1 & 0 & 1\\
\end{tabular}

\vspace*{.5\baselineskip}
Multiplication
\end{column}
\begin{column}{0.3\linewidth}
\centering
\begin{tabular}{r|*{2}{c}}
x & 0 & 1\\
\hline
0 & 0 & 0\\
1 & 0 & 1\\
\end{tabular}

\vspace*{.5\baselineskip}
Inverse
\end{column}
\end{columns}
\end{frame}    

\end{document}  

enter image description here