![Beamer 中的 Footline colobox 间距问题?](https://linux22.com/image/259025/Beamer%20%E4%B8%AD%E7%9A%84%20Footline%20colobox%20%E9%97%B4%E8%B7%9D%E9%97%AE%E9%A2%98%EF%BC%9F.png)
我一直尝试在beamer
模板中自定义脚注线,但是当我添加第四个框时,间距就变得很奇怪。
这是我的模板:
\DeclareOptionBeamer{compress}{\beamer@compresstrue}
\ProcessOptionsBeamer
\mode<presentation>
\useoutertheme[subsection=false]{miniframes}
% Define colors
\definecolor{beamer@blendedblue}{RGB}{26,89,142}
\definecolor{beamer@darkblue}{RGB}{17,59,94}
% Title block
\setbeamercolor*{title}{use=structure,fg=white,bg=beamer@darkblue}
\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=true]
% Bottom infolines
\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
% Name and institution
\begin{beamercolorbox}[wd=0.3\paperwidth,ht=2.3ex,dp=1.25ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}
\end{beamercolorbox}%
% Short title
\begin{beamercolorbox}[wd=0.4\paperwidth,ht=2.3ex,dp=1.25ex,center]{author in head/foot}%
\usebeamerfont{anthor in head/foot}\insertshorttitle
\end{beamercolorbox}%
% Date
\begin{beamercolorbox}[wd=0.2\paperwidth,ht=2.3ex,dp=1.25ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshortdate{}
\end{beamercolorbox}
% Frame counter
\begin{beamercolorbox}[wd=0.1\paperwidth,ht=2.3ex,dp=1.25ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertframenumber{}\hspace*{1pt}/\hspace*{1pt}\inserttotalframenumber
\end{beamercolorbox}}%
\vskip0pt%
}
% Set themes
\useinnertheme{circles}
\usecolortheme{whale}
\usecolortheme{orchid}
% Set colors
\setbeamercolor{structure}{fg=beamer@blendedblue}
\setbeamercolor{titlelike}{parent=structure}
\setbeamercolor{frametitle}{fg=black}
\setbeamercolor{title}{fg=white}
\setbeamercolor{item}{fg=beamer@blendedblue}
\mode
<all>
我的 MWE 是:
\documentclass[compress]{beamer}
\usetheme{Bread} % Custom theme (listed above)
\title[Uncertainty in Life]{Uncertainty in Life}
\author[Mr. Smith]{John Smith}
\institute[UN]{University of Nowhere}
\date{November 28, 2012}
\begin{document}
\begin{frame}
\end{frame}
\end{document}
从示例中可以看出,第一个和第二个框之间有轻微的间隙,而第三个和第四个框之间有较大的间隙。
答案1
%
您忘记在第三个框的末尾添加\end{beamercolorbox}
,就在注释行上方的行上% Frame counter
。
请记住,换行符算作空格,因此在行末添加注释有时可以修复间距问题,就像本例一样。另外,请注意,空行会指示引擎TeX
开始一个新段落。