子图:标题中的数字和换行符的颜色(投影仪)

子图:标题中的数字和换行符的颜色(投影仪)

在我的子图标题之前,Latex 自动将 (a) (b) 放在前面,颜色为蓝色。 有没有办法将 (a) 和 (b) 的颜色改为黑色?

另外,有没有办法在副标题中输入换行符?以下是我使用的标题:

\documentclass[xcolor={dvipsnames}]{beamer}
%
% Choose how your presentation looks.
%
% For more themes, color themes and font themes, see:
% http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html
%
\mode<presentation>
{
  \usetheme{Madrid}       % or try Darmstadt, Madrid, Warsaw, ...
  \usecolortheme{default} % or try albatross, beaver, crane, ...
  \usefonttheme{default}  % or try serif, structurebold, ...
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
  \setbeamertemplate{itemize items}[ball]
  \setbeamertemplate{itemize subitem}[triangle]
  \setbeamertemplate{footline}[page number]
} 

\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{dsfont} 
\usepackage{mathtools}
\usepackage{graphicx}
\DeclareMathOperator*{\Max}{Max} 
\DeclareMathOperator*{\Min}{Min}    
\DeclareMathOperator*{\argmin}{arg\,min}            
\DeclareMathOperator*{\argmax}{arg\,max}            
\usepackage{color}                                      
\definecolor{darkblue}{rgb}{0.0,0.0,0.66} 
\usepackage{hyperref}
\usepackage{bbm}
\usepackage{appendixnumberbeamer}
\usepackage{comment}
\usepackage{subfig}

\begin{document}

\section{Sample}
\begin{frame}{Sample}
\begin{figure}
  \centering
  \subfloat[This is figure a]{\includegraphics[width=0.49\textwidth]{example-image}}
  \subfloat[This is figure b]{\includegraphics[width=0.49\textwidth]{example-image}}
\end{figure}
\end{frame}

\end{document}

答案1

对于您使用的软件包的一些评论:

  • \usepackage{amsmath}如果您使用过,则不需要\usepackage{mathtools}
  • dsfont和都bbm提供“黑板”字体。我不会混合这两种字体,因为它们非常相似,所以请只选择一种。
  • 你不需要\usepackage{color},因为beamer已经使用了xcolor

解决方案如下:您需要的是\setbeamercolor{caption name}{fg=black}

\documentclass[xcolor={dvipsnames}]{beamer}
%
% Choose how your presentation looks.
%
% For more themes, color themes and font themes, see:
% http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html
%
\mode<presentation>
{
  \usetheme{Madrid}       % or try Darmstadt, Madrid, Warsaw, ...
  \usecolortheme{default} % or try albatross, beaver, crane, ...
  \usefonttheme{default}  % or try serif, structurebold, ...
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
  \setbeamertemplate{itemize items}[ball]
  \setbeamertemplate{itemize subitem}[triangle]
  \setbeamertemplate{footline}[page number]
}

\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\definecolor{darkblue}{rgb}{0.0,0.0,0.66}
\usepackage{subfig}

\setbeamercolor{caption name}{fg=black}

\begin{document}

\section{Sample}
\begin{frame}{Sample}
\begin{figure}
  \centering
  \subfloat[This is figure a with a very very very very very long caption]{\includegraphics[width=0.49\textwidth]{example-image}}%
  \subfloat[This is figure b]{\includegraphics[width=0.49\textwidth]{example-image}}
\end{figure}
\end{frame}

\end{document}

黑色标题

相关内容