![latex 无法在 beamerposter 的标题中显示数字](https://linux22.com/image/269106/latex%20%E6%97%A0%E6%B3%95%E5%9C%A8%20beamerposter%20%E7%9A%84%E6%A0%87%E9%A2%98%E4%B8%AD%E6%98%BE%E7%A4%BA%E6%95%B0%E5%AD%97.png)
我正在使用 beamerposter 制作海报,但在子图和标题方面遇到了问题。问题是 latex 只显示标题文本,但不显示字母,如 ((a) caption a)
这是我正在做的事情:
\documentclass[final,hyperref={pdfpagelabels=false}]{beamer}
\mode<presentation>{\usetheme{mytheme}}
\usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}
\usepackage{changepage}
\usepackage{array,tabularx}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{caption}
\setbeamertemplate{caption}[numbered]
\captionsetup{labelformat=simple}
\newcolumntype{Z}{>{\centering\arraybackslash}X} % centered tabularx columns
\begin{beamercolorbox}{block title}
\begin{figure}
\begin{tabularx}{\linewidth}{ZZ}
\begin{subfigure}[b]{\linewidth}
\includegraphics[width=0.95\linewidth]{result-test-22-multiples}
\caption{asdasd}
\end{subfigure} &
\begin{subfigure}[b]{\linewidth}
\includegraphics[width=0.95\linewidth]{result-test-22-single}
\caption{asdasd}
\end{subfigure}
\end{tabularx}
\end{figure}
\end{beamercolorbox}
以下是主题,抱歉,有点乱:
\ProvidesPackage{mytheme}
\RequirePackage{tangocolors}
\selectcolormodel{cmyk}
\mode<presentation>
\setbeamercolor{block title}{bg=taaluminium,fg=black}
\setbeamercolor{headline}{fg=tabutter,bg=white}
\setbeamercolor{footline}{fg=tabutter, bg=blue}
\setbeamerfont{footline}{size=\LARGE,series=\bf}
\setbeamercolor{separation line}{bg=black}
\setbeamercolor{title in headline}{fg=blue}
\setbeamercolor{author in headline}{fg=blue}
\setbeamercolor{institute in headline}{fg=green}
\setbeamercolor{framesubtitle}{fg=ta3orange, bg=ta2gray}
\setbeamercolor{author in head/foot}{fg=blue, bg=white}
%\setbeamercolor{title in head/foot}{fg=blue, bg=white}
\setbeamercolor{background canvas}{bg=white}
%\setbeamercolor*{normal text}{fg=tachameleon, bg=ta3gray}
\setbeamercolor*{block body}{bg=taaluminium,fg=black}
%\setbeamercolor*{block title}{fg=taorange,bg=ta3skyblue}
\setbeamerfont{block title}{size=\large,series=\bf}
\setbeamercolor{upper separation line head}{fg=ta2orange}
%\setbeamercolor*{example body}{fg=ta3aluminium,bg=white}
%\setbeamercolor*{example text}{fg=ta3aluminium,bg=black}
%\setbeamercolor*{example title}{bg=taorange,fg=ta2gray}
\setbeamercolor{alerted text}{fg=red}
%\setbeamercolor{example text}{fg=taorange}
\setbeamercolor{structure}{fg=white}
\setbeamertemplate{itemize items}[triangle]
\setbeamertemplate{navigation symbols}{} % no navigation on a poster
\setbeamercolor{itemize item}{fg=ta2skyblue}
\setbeamercolor{itemize subitem}{fg=black}
\setbeamertemplate{itemize subitem}[circle]
\setbeamertemplate{block begin}{
\vskip.75ex
\begin{beamercolorbox}[rounded=true,shadow=false,leftskip=1cm,colsep*=.75ex] {block title}%
\usebeamerfont*{block title}\insertblocktitle
\end{beamercolorbox}%
{\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body}%
\begin{beamercolorbox} [rounded=true,shadow=false,colsep*=.75ex,sep=.75ex,vmode]{block body}%
\ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}
\setbeamertemplate{block end}{
\end{beamercolorbox}
}
\addtobeamertemplate{block begin}{}
{
% separates paragraphs in a block
\setlength{\parskip}{12pt plus 1pt minus 1pt}%
\begin{adjustwidth}{1cm}{1cm}
}
\addtobeamertemplate{block end}
{\end{adjustwidth}%
\vspace{1ex plus 0.5ex minus 0.5ex}}% Pads bottom of block
\setbeamertemplate{headline}{
\leavevmode
\begin{beamercolorbox}[wd=\paperwidth]{headline}
\begin{columns}[T]
\begin{column}{.02\paperwidth}
\end{column}
\begin{column}{.3\paperwidth}
\begin{center}
\includegraphics[width=.3\paperwidth]{banner}
\end{center}
\end{column}
\begin{column}{.65\paperwidth}
\vskip3ex
\raggedleft
\usebeamercolor{title in headline}{\color{fg} \textbf{\LARGE{\inserttitle}}\\[1ex]}
\usebeamercolor{author in headline}{\color{fg}\large{\insertauthor}\\[1ex]}
\usebeamercolor{institute in headline}{\color{fg} \large{\insertinstitute}\\[1ex]}
\end{column}
\begin{column}{.03\paperwidth}
\end{column}
\end{columns}
\end{beamercolorbox}
\begin{beamercolorbox}[wd=\paperwidth]{lower separation line head}
\rule{0pt}{2pt}
\end{beamercolorbox}
}
% \setbeamertemplate{headline}{
% \leavevmode
% \begin{beamercolorbox}[sep=0.5cm,wd=.8\paperwidth]{headline}
% \usebeamercolor{title in headline}{\raggedleft\color{fg} \textbf{\LARGE{\inserttitle}}\\[1ex]}
% \usebeamercolor{author in headline}{\raggedleft\color{fg} \large{\insertauthor}\\[1ex]}
% \usebeamercolor{institute in headline}{\raggedleft\color{fg} \large{\insertinstitute}\\[1ex]}
% \end{beamercolorbox}%
% \begin{beamercolorbox}[wd=.2\paperwidth]{logo in headline}
% \centering
% \LARGE{LOGO}
% \end{beamercolorbox}
%}
\setbeamertemplate{footline}{
\begin{beamercolorbox}[wd=\paperwidth]{upper separation line foot}
\rule{0pt}{2pt}
\end{beamercolorbox}
\leavevmode%
\begin{beamercolorbox}[ht=2em,leftskip=1cm,rightskip=1cm]{author in head/foot}%
\begin{columns}[T]
\begin{column}{.80\paperwidth}
\centering \Large{Institute}
\hfill
\vskip1ex
\end{column}
\begin{column}{.15\linewidth}
\includegraphics[scale=.8]{logo}
\vskip1ex
\end{column}
\end{columns}
\end{beamercolorbox}
\vskip0pt%
\begin{beamercolorbox}[wd=\paperwidth]{lower separation line foot}
\rule{0pt}{2pt}
\end{beamercolorbox}
}
% Display a grid to help align images ... and it looks nice with this color scheme
%\beamertemplategridbackground[1cm]
\mode<all>
%%% Local Variables:
%%% mode: latex
%%% TeX-PDF-mode: t
%%% TeX-master: "poster"
%%% End:
答案1
问题是使用的主题有
\setbeamercolor{structure}{fg=white}
在构建编号标题时,beamer
使用(参见文件beamerbaseauxtemplates.sty
):
\usebeamercolor[fg]{caption name}
因此标题编号将在浅色背景上显示为白色,几乎不可见;要纠正此问题,请caption name
适当设置颜色;例如(更改red
为所需的颜色):
\setbeamercolor{caption name}{fg=red}