0

Code

\documentclass[xcolor={x11names,table}]{beamer}
% http://tex.stackexchange.com/a/303060/13173
% http://tex.stackexchange.com/a/303091/13173
% http://tex.stackexchange.com/a/196808/13173
% http://tex.stackexchange.com/a/303021/13173

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage[TS1,T1]{fontenc}
\usefonttheme{professionalfonts}% otherwise fourier's font configuration will be partially overridden
\usepackage{fourier, heuristica}
\usepackage{array, booktabs}

\usepackage{caption}

\newcommand{\foo}{%
   \color{LightSteelBlue3}%
   \makebox[0pt]{\textbullet}%
   \hskip-0.5pt\vrule width 1pt%
   \hspace{\labelsep}%
}

\newlength{\CVbreakdotsep}% length to change spacing between dots
\setlength{\CVbreakdotsep}{0.6mm}

\newcommand{\CVbreakdot}{% command for smaller dots
   \scalebox{0.6}{\textbullet}%
}

\newcommand{\CVbreak}{% command for the break itself
   \multicolumn{2}{l}{%
      \hspace*{8.715mm}% <--- align dots with vertical line
      \rotatebox[origin=c]{-90}{%
         \color{LightSteelBlue3}%
         \hspace{2mm}% <--- extra vertical space
         \CVbreakdot\kern\CVbreakdotsep\CVbreakdot\kern\CVbreakdotsep\CVbreakdot
         \hspace{2mm}% <--- extra vertical space
      }%
   } \\%
}

\begin{document}

\begin{frame}
\begin{table}
   \renewcommand\arraystretch{1.4}
   \caption{Timeline, really?}\vskip -1.5ex
   \arrayrulecolor{LightSteelBlue3}
   \begin{tabular}{@{\,}r <{\hskip 2pt} !{\foo} >{\raggedright\arraybackslash}p{5cm}}
      \toprule
      \addlinespace[1.5ex]
      1969 & Lassa virus. \\
      \CVbreak
      1989 & Guanarito virus, Venezuela. \\
   \end{tabular}
\end{table}
\end{frame}

\end{document} 

Nunkulla's Test Code

Have the following line before \caption{...}

\captionsetup{labelformat=empty}

I run Nunkulla's code in my system of OS X 10.11.4 with MacTeX 2015 and I see no such an effect as Nunkulla sees, and I did have \captionsetup{...} active in one instance

enter image description here

Solution: Run TeX Live Utility and update packages. The ticket and ... were issued after the release of MacTeX 2015 so are not included in the package. The same output as in the accepted answer now.


How can you have no Table in Beamer's Cut?

Johannes_B
  • 24,235
  • 10
  • 93
  • 248
  • 1
    Try adding \usepackage{caption} \captionsetup{labelformat=empty}. See here: http://tex.stackexchange.com/questions/41880/table-caption-without-the-word-table – Ross Apr 08 '16 at 17:12
  • @Nunkulla Does not work with \usepackage{caption} \captionsetup{labelformat=empty}. – Léo Léopold Hertz 준영 Apr 08 '16 at 17:16
  • It works for me. Did you insert those commands after \usepackage{array, booktabs}? – Ross Apr 08 '16 at 17:23
  • @Nunkulla Yes. Please, provide it as an answer because I cannot get it work in OS X. Please, provide also a picture as an evidence. – Léo Léopold Hertz 준영 Apr 08 '16 at 17:24
  • 2
    Could be related to https://sourceforge.net/p/latex-caption/tickets/21/. If yes, updating should solve the issue. –  Apr 09 '16 at 10:16
  • @AxelSommerfeldt Yes, it is related because the patch was released after MacTeX 2015 release. The default installation of MacTeX 2015 does not include the patch and also does not involve automatic run of TeX Live Utility for updates. – Léo Léopold Hertz 준영 Apr 09 '16 at 14:14

2 Answers2

5

This answer follows @egreg's suggestion in the answer posted here: Table caption without the word "table", using the caption package and the captionsetup option from that package. The correct usage of caption setup in this instance is given in section 3.2 of the caption package manual. Since the desired result is to suppress the label in a specific table environment, the command \captionsetup{labelformat=empty} must be placed in the environment where the label would otherwise be generated.

This is demonstrated in the following code where in the first vertical timeline, "Table" is suppressed using captionsetup{labelformat=empty}. In the subsequent example, which duplicates the caption and table from the first example, but this time suppressing captionsetup{labelformat=empty} command, produces the label "Table".

\documentclass[xcolor={x11names,table}]{beamer}
% https://tex.stackexchange.com/a/303060/13173
% https://tex.stackexchange.com/a/303091/13173
% https://tex.stackexchange.com/a/196808/13173
% https://tex.stackexchange.com/a/303021/13173

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage[TS1,T1]{fontenc}
\usefonttheme{professionalfonts}% otherwise fourier's font configuration will be partially overridden
\usepackage{fourier, heuristica}
\usepackage{array, booktabs}
\usepackage{caption}


\newcommand{\foo}{%
   \color{LightSteelBlue3}%
   \makebox[0pt]{\textbullet}%
   \hskip-0.5pt\vrule width 1pt%
   \hspace{\labelsep}%
}

\newlength{\CVbreakdotsep}% length to change spacing between dots
\setlength{\CVbreakdotsep}{0.6mm}

\newcommand{\CVbreakdot}{% command for smaller dots
   \scalebox{0.6}{\textbullet}%
}

\newcommand{\CVbreak}{% command for the break itself
   \multicolumn{2}{l}{%
      \hspace*{8.715mm}% <--- align dots with vertical line
      \rotatebox[origin=c]{-90}{%
         \color{LightSteelBlue3}%
         \hspace{2mm}% <--- extra vertical space
         \CVbreakdot\kern\CVbreakdotsep\CVbreakdot\kern\CVbreakdotsep\CVbreakdot
         \hspace{2mm}% <--- extra vertical space
      }%
   } \\%
}

\begin{document}

\begin{frame}
\begin{table}
   \renewcommand\arraystretch{1.4}
   \captionsetup{labelformat=empty}   % suppress label ``Table''
   \caption{Timeline, really?}\vskip -1.5ex
   \arrayrulecolor{LightSteelBlue3}
   \begin{tabular}{@{\,}r <{\hskip 2pt} !{\foo} >{\raggedright\arraybackslash}p{5cm}}
      \toprule
      \addlinespace[1.5ex]
      1969 & Lassa virus. \\
      \CVbreak
      1989 & Guanarito virus, Venezuela. \\
   \end{tabular}
\end{table}

\begin{table}
    \renewcommand\arraystretch{1.4}
%   \captionsetup{labelformat=empty} % Label ``Table'' is not suppressed
    \caption{Timeline, really?}\vskip -1.5ex
    \arrayrulecolor{LightSteelBlue3}
    \begin{tabular}{@{\,}r <{\hskip 2pt} !{\foo} >{\raggedright\arraybackslash}p{5cm}}
        \toprule
        \addlinespace[1.5ex]
        1969 & Lassa virus. \\
        \CVbreak
        1989 & Guanarito virus, Venezuela. \\
    \end{tabular}
\end{table}
\end{frame}

\end{document} 

enter image description here

Ross
  • 5,656
  • 2
  • 14
  • 38
2

Don't want a caption? Don't use a caption!

\documentclass[xcolor={x11names,table}]{beamer}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage[TS1,T1]{fontenc}
\usefonttheme{professionalfonts}% otherwise fourier's font configuration will be partially overridden
\usepackage{fourier, heuristica}
\usepackage{array, booktabs}

\newcommand{\foo}{%
    \color{LightSteelBlue3}%
    \makebox[0pt]{\textbullet}%
    \hskip-0.5pt\vrule width 1pt%
    \hspace{\labelsep}%
}

\newlength{\CVbreakdotsep}% length to change spacing between dots
\setlength{\CVbreakdotsep}{0.6mm}

\newcommand{\CVbreakdot}{% command for smaller dots
    \scalebox{0.6}{\textbullet}%
}

\newcommand{\CVbreak}{% command for the break itself
    \multicolumn{2}{l}{%
        \hspace*{8.715mm}% <--- align dots with vertical line
        \rotatebox[origin=c]{-90}{%
            \color{LightSteelBlue3}%
            \hspace{2mm}% <--- extra vertical space
            \CVbreakdot\kern\CVbreakdotsep\CVbreakdot\kern\CVbreakdotsep\CVbreakdot
            \hspace{2mm}% <--- extra vertical space
        }%
    } \\%
}

\begin{document}

    \begin{frame}
        \begin{table}
            \renewcommand\arraystretch{1.4}
            Timeline, really?\linebreak
            \arrayrulecolor{LightSteelBlue3}
            \begin{tabular}{@{\,}r <{\hskip 2pt} !{\foo} >{\raggedright\arraybackslash}p{5cm}}
                \toprule
                \addlinespace[1.5ex]
                1969 & Lassa virus. \\
                \CVbreak
                1989 & Guanarito virus, Venezuela. \\
            \end{tabular}
        \end{table}
    \end{frame}

\end{document} 

enter image description here

  • @Masi Depends on what you want for your other captions. For this example, only the booktabs package is necessary, all the other packages are only there, because they had been in your (non-)minimal example. – samcarter_is_at_topanswers.xyz Apr 08 '16 at 17:57
  • I got a comment here that it is \\\ is corresponding to \par here so not correct. So I think there is a need to use a caption here but without Table. http://tex.stackexchange.com/a/303087/13173 – Léo Léopold Hertz 준영 Apr 08 '16 at 22:11
  • @Masi I admit, that \\ is bad style to force a linebreak, but this has nothing to do whether or not you need a caption. And your linked commend does not imply this at all! I am missing some context to really understand the comment of @crf, it sounds like you tried to modify the code in a way that does not correspond to the question you asked there. – samcarter_is_at_topanswers.xyz Apr 09 '16 at 09:57