我对调试 Beamer 演示文稿中过满的水平盒子感到很疯狂。页脚不断产生以下消息:
Overfull \hbox (456.8095pt too wide) has occurred while \output is active
我得到的模板有几百行长,我无法找到一个最小的工作示例(抱歉!)但我发现了问题所在,也许有人明白其原因。
它在页脚中的这些行中:
\defbeamertemplate*{footline}{decolines theme}
{
\leavevmode%
% Page number.
\hbox{%
\begin{beamercolorbox}[wd=.2\paperwidth,ht=0ex,dp=0ex,center]{}%
\usebeamerfont{palette primary}\insertframenumber{} \beamer@decolines@pageofpages{} \inserttotalframenumber%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.8\paperwidth,ht=0ex,dp=0ex]{}%
\end{beamercolorbox}%
} %
% First line.
\hbox{%
\begin{beamercolorbox}[wd=.2\paperwidth,ht=\beamer@decolines@lineup,dp=0pt]{}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.8\paperwidth,ht=\beamer@decolines@lineup,dp=0pt]{lineup}%
\end{beamercolorbox}%
} %
% Second line.
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=\beamer@decolines@linemid,dp=0pt]{linemid}%
\end{beamercolorbox}%
} %
% Third line.
\hbox{%
\begin{beamercolorbox}[wd=.1\paperwidth,ht=\beamer@decolines@linebottom,dp=0pt]{}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.9\paperwidth,ht=\beamer@decolines@linebottom,dp=0pt]{linebottom}%
\end{beamercolorbox}%
}%
}%
它基本上产生三行:第一行包含页码,第二行包含长蓝线,第三行包含黄线。
我确实知道改变这些 wd 参数的长度会改变“过满”的量,但我找不到任何解决方法。
这里有没有人能理解这段代码(即使没有例子)并能猜出解决方案?
答案1
您似乎正在使用基于 Torino 主题的主题。此主题\par
在脚注中缺少空行或 。您可以像这样修复它:
\documentclass{beamer}
\usetheme{Torino}
\makeatletter
\setbeamertemplate{footline}{
\leavevmode%
% Page number.
\hbox{%
\begin{beamercolorbox}[wd=.2\paperwidth,ht=0ex,dp=0ex,center]{}%
\usebeamerfont{palette primary}\insertframenumber{} \beamer@decolines@pageofpages{} \inserttotalframenumber%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.8\paperwidth,ht=0ex,dp=0ex]{}%
\end{beamercolorbox}%
} %
% First line.
\hbox{%
\begin{beamercolorbox}[wd=.2\paperwidth,ht=\beamer@decolines@lineup,dp=0pt]{}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.8\paperwidth,ht=\beamer@decolines@lineup,dp=0pt]{lineup}%
\end{beamercolorbox}%
} %
% Second line.
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=\beamer@decolines@linemid,dp=0pt]{linemid}%
\end{beamercolorbox}%
} %
% Third line.
\hbox{%
\begin{beamercolorbox}[wd=.1\paperwidth,ht=\beamer@decolines@linebottom,dp=0pt]{}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.9\paperwidth,ht=\beamer@decolines@linebottom,dp=0pt]{linebottom}%
\end{beamercolorbox}%
}%
}%
\makeatother
\begin{document}
\begin{frame}
test
\end{frame}
\end{document}