I want both bold and small capital effect for my table caption label. Could anybody tell me what's wrong with my code? Why doesn't it work? Thanks
\documentclass{beamer}
\mode<presentation> {
\usetheme{CambridgeUS}
}
\usepackage[T1]{fontenc}
\usepackage{caption}
\captionsetup[table]{labelfont={scriptsize,bf,sc},textfont={it,scriptsize}}
\begin{document}
\begin{frame}[t]
\frametitle{Tables Testing}
\begin{table}[htdp]
\caption{default}
\begin{center}
\begin{tabular}{|cc|}
\hline
column A & column B \\ \hline
line1 & line2 \\ \hline
\end{tabular}
\end{center}
\label{default}
\end{table}%
\end{frame}
\end{document}
Best Answer
As the warning message now reports,
caption
does not know about whatbeamer
is doing, and as a result, gives up.But
beamer
already has hooks to the caption label/text fonts that we can use directly to achieve the same result:I put the changes inside
\AtBeginEnvironment{table}{<...>}
frometoolbox
to keep the changes local to tables only; the captions for figures are unaffected, as illustrated below.Of course, we need a font that has all the required combinations; I chose
libertine
as suggested in the comments, but you may have a better idea of what you want to use.