2

enter image description here

\documentclass[10pt]{beamer}

\begin{document}
    \begin{tabular}{ |p{1.1cm}||p{1.1cm}|p{1.1cm}|p{1.1cm}| |p{1.1cm}| |p{1.1cm}| |p{1.1cm}|  }
 \hline
 \multicolumn{7}{|c|}{\textbf{W1011daily}} \\
 \hline
\textbf{1}& \textbf{2}&\textbf{3}& \textbf{\dots \dots} & \textbf{150}& \textbf{\dots \dots} & \textbf{252}  \\
 \hline
 1000.182  &  996.4293 &993.6557 &   \dots \dots & 992.7738& \dots \dots & 987.8528 \\
 996.6344&   990.0872  & 990.881  & \dots \dots & 999.3244&  \dots \dots & 989.349\\
 990.2731 &  987.3196 & 988.7692&   \dots \dots & 1030.053&  \dots \dots & 961.9883\\
 \vdots  & \vdots & \vdots &   \vdots  & \vdots &  \vdots  & \vdots \\
1013.578 &1023.227& 1071.947 &   \dots \dots & 832.6109 &  \dots \dots & 1143.922\\
   \vdots  & \vdots & \vdots &   \vdots  & \vdots &  \vdots  & \vdots \\  
  734.5305 &821.8897 & 825.8748 &   \dots \dots &  947.0167 &  \dots \dots & 1356.77\\

 \hline
\end{tabular}
\end{document}
  • All numbers or just the column headers? – user36296 Nov 28 '18 at 14:08
  • @samcarter the headline – Tommaso Dellolmo Nov 28 '18 at 14:09
5

To centre the column headlines you can use \makecell[c]{...} or \thead from the makecell package

\documentclass[10pt]{beamer}

\usepackage{makecell}
\renewcommand\theadfont{\bfseries\normalsize}

\begin{document}
    \begin{tabular}{ |p{1.1cm}||p{1.1cm}|p{1.1cm}|p{1.1cm}| |p{1.1cm}| |p{1.1cm}| |p{1.1cm}|  }
 \hline
 \multicolumn{7}{|c|}{\thead{W1011daily}} \\
 \hline
\thead{1}& \thead{2}&\thead{3}& \thead{\dots \dots} & \thead{150}& \thead{\dots \dots} & \thead{252}  \\
 \hline
 1000.182  &  996.4293 &993.6557 &   \dots \dots & 992.7738& \dots \dots & 987.8528 \\
 996.6344&   990.0872  & 990.881  & \dots \dots & 999.3244&  \dots \dots & 989.349\\
 990.2731 &  987.3196 & 988.7692&   \dots \dots & 1030.053&  \dots \dots & 961.9883\\
 \vdots  & \vdots & \vdots &   \vdots  & \vdots &  \vdots  & \vdots \\
1013.578 &1023.227& 1071.947 &   \dots \dots & 832.6109 &  \dots \dots & 1143.922\\
   \vdots  & \vdots & \vdots &   \vdots  & \vdots &  \vdots  & \vdots \\  
  734.5305 &821.8897 & 825.8748 &   \dots \dots &  947.0167 &  \dots \dots & 1356.77\\

 \hline
\end{tabular}
\end{document}

enter image description here

Personally I'd prefer a cleaner table without all the vertical lines and numbers aligned by their decimal marker:

\documentclass[10pt]{beamer}

\usepackage{makecell}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{siunitx}
\renewcommand\theadfont{\bfseries\normalsize}

\begin{document}
\begin{frame}
    \begin{tabularx}{\linewidth}{%
        @{}
        S[table-format=4.4]
        S[table-format=4.4]
        S[table-format=4.4]
        X
        S[table-format=4.4]
        X
        S[table-format=4.4]
        @{}
    }
    \toprule
    \multicolumn{7}{c}{\textbf{W1011daily}}\\
        \midrule
        {\thead{1}} & {\thead{2}} & {\thead{3}}& {\dots} & {\thead{150}}& {\dots} & {\thead{252}}\\
        \midrule
         1000.182 & 996.4293 & 993.6557 & \dots & 992.7738 & \dots & 987.8528 \\
        996.6344&   990.0872  & 990.881  & \dots & 999.3244&  \dots & 989.349\\
        990.2731 &  987.3196 & 988.7692&   \dots & 1030.053&  \dots & 961.9883\\
        {\vdots}  & {\vdots} & {\vdots} &  & {\vdots} &  & {\vdots} \\
        1013.578 &1023.227& 1071.947 &   \dots & 832.6109 &  \dots & 1143.922\\
        {\vdots}  & {\vdots} & {\vdots} &   & {\vdots} &  & {\vdots} \\
        734.5305 &821.8897 & 825.8748 &   \dots &  947.0167 &  \dots & 1356.77\\
        \bottomrule
    \end{tabularx}
\end{frame}
\end{document}

enter image description here

2

I believe this answer has been addressed, here.

To keep it most similar to the math Latex that I know, I would use

\documentclass[conference]{IEEEtran} 
\begin{document}
\begin{table}
 \centering
 \begin{tabular}{|c|c|c|}
 \hline
 Reconstruction strategy & aa          & bb( \%) \\ \hline
 Classic                 & 3342 voxels & 68 \%   \\ \hline
 VC                      & 4296 voxels & 87 \%   \\ \hline
 V m=7                   & 4745 voxels & 96 \%   \\ \hline
 \end{tabular}
\newline\newline 
\caption{title}\label{tab1}
\end{table}
\end{document}

Credit to sandoval31 for that snippet of code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.