标题没有在第二行继续,而是超出了屏幕范围
使用了不同的.sty文件,但我不确定问题出在哪里。主要的.tex文件如下
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage{calc}
\usepackage[absolute,overlay]{textpos}
\usepackage{}
\mode<presentation>{\usetheme{tud}}
\title[Master thesis defence]
{The influence of the leading edge thickness on the force coefficients for airfoils at $90^\circ$ angle of attack}
%\subtitle
%\institute[TU Delft]{Delft University of Technology}
\author{M. Van Roosbroeck}
\date{\today}
% Insert frame before each subsection (requires 2 latex runs)
\AtBeginSubsection[] {
\begin{frame}<beamer>\frametitle{\titleSubsec}
\tableofcontents[currentsection,currentsubsection] % Generation of the Table of Contents
\end{frame}
}
% Define the title of each inserted pre-subsection frame
\newcommand*\titleSubsec{Outline}
% Define the title of the "Table of Contents" frame
\newcommand*\titleTOC{Outline}
% define a symbol which can be removed if you don't need it
\newcommand{\field}[1]{\mathbb{#1}}
\newcommand{\Zset}{\field{Z}}
\begin{document}
{
% remove the next line if you don't want a background image
\usebackgroundtemplate{\includegraphics[width=\paperwidth,height=\paperheight]{images/background-titlepage.jpg}}%
\setbeamertemplate{footline}{\usebeamertemplate*{minimal footline}}
\frame{\titlepage}
}
我认为问题出在 .sty 文件中的以下代码中:
\DeclareOptionBeamer{shadow}[true]{\def\beamer@themerounded@shadow{#1}}
\ExecuteOptionsBeamer{shadow=false}
\ProcessOptionsBeamer
\mode<presentation>
\defbeamertemplate*{title page}{}{
\newsavebox\titleBox
\newsavebox\subtitleBox
\newsavebox\instituteBox
\newsavebox\authorBox
\newsavebox\dateBox
\sbox{\titleBox}{\usebeamercolor[fg]{title}\usebeamerfont{title}\inserttitle}
\ifx\insertsubtitle\@empty%
\sbox{\subtitleBox}{}
\else%
\sbox{\subtitleBox}{\usebeamercolor[fg]{subtitle}\usebeamerfont{subtitle}\insertsubtitle}
\fi%
\sbox{\instituteBox}{\usebeamercolor[fg]{institute}\usebeamerfont{institute}\insertinstitute}
\sbox{\authorBox}{\usebeamercolor[fg]{author}\usebeamerfont{author}\insertauthor}
\sbox{\dateBox}{\usebeamercolor[fg]{date}\usebeamerfont{date}\insertdate}
\newlength{\titleBoxWidth}
\newlength{\titleBoxInnerWidth}
\setlength{\titleBoxInnerWidth}{\maxof{\wd\titleBox}{\maxof{\wd\subtitleBox}{\maxof{\wd\instituteBox}{\maxof{\wd\authorBox}{\wd\dateBox}}}}}
\setlength{\titleBoxWidth}{\titleBoxInnerWidth}
\addtolength{\titleBoxWidth}{1cm}
\begin{textblock*}{\titleBoxWidth}(0.5cm,2.5cm)
\begin{beamercolorbox}[sep=2mm,leftskip=3mm,rightskip=3mm,wd=\titleBoxWidth,center]{title block body}
\begin{beamercolorbox}[sep=0pt,vmode,wd=\titleBoxInnerWidth,left]{}
\begin{beamercolorbox}[wd=\wd\titleBox]{title}
\usebox{\titleBox}%
\end{beamercolorbox}%
\ifx\insertsubtitle\@empty%
\else%
\vskip1mm
\begin{beamercolorbox}[wd=\wd\subtitleBox]{subtitle}
\usebox{\subtitleBox}%
\end{beamercolorbox}
\fi%
\vskip1mm
\begin{beamercolorbox}[wd=\wd\instituteBox]{institute}
\usebox{\instituteBox}%
\end{beamercolorbox}
\vskip7mm
\begin{beamercolorbox}[wd=\wd\authorBox]{author}
\usebox{\authorBox}%
\end{beamercolorbox}
\vskip1mm
\begin{beamercolorbox}[wd=\wd\dateBox]{date}
\usebox{\dateBox}%
\end{beamercolorbox}
\vskip0pt
\end{beamercolorbox}
\end{beamercolorbox}
\end{textblock*}
}
\addtobeamertemplate{frametitle}{\hspace*{0.5cm}}
\setbeamertemplate{blocks}[rounded][shadow=\beamer@themerounded@shadow]
\setbeamertemplate{items}[circle]
\setbeamertemplate{sections/subsections in toc}[circle]
\mode
<all>
我希望有人能帮助我。
非常感谢
建议采用以下解决方案:
将该行替换\sbox{\titleBox}{...}
为
\sbox\titleBox{\parbox{\linewidth}{%
\usebeamercolor[fg]{title}\usebeamerfont{title}\inserttitle}}
结果导致编译时出现以下错误:\useinnertheme[shadow]{tux}
停用此行会导致编译成功,但有其他输出
如何解决这个问题?
提前致谢
答案1
将该行替换\sbox{\titleBox}{...}
为
\sbox\titleBox{\parbox{\linewidth}{%
\usebeamercolor[fg]{title}\usebeamerfont{title}\inserttitle}}
并且它会起作用。
答案2
使用minipage
标题周围的,您可以获得所需的结果,只需替换
\usebox{\titleBox}%
经过
\begin{minipage}[b][24mm][b]{110mm} % <- adjust width or position here!!!
\usebeamercolor[fg]{title}\usebeamerfont{title}{\inserttitle\par}
\end{minipage}
完整的改变beamerinnerthemetud.sty
(最初来自http://www.ewi.tudelft.nl/en/the-faculty/departments/applied-mathematics/latex/beamer/):
% TU Delft Beamer template
% Author: Maarten Abbink
% Delft Universiy of Technology
% March 2014
\DeclareOptionBeamer{shadow}[true]{\def\beamer@themerounded@shadow{#1}}
\ExecuteOptionsBeamer{shadow=false}
\ProcessOptionsBeamer
\mode<presentation>
\defbeamertemplate*{title page}{}{
\newsavebox\titleBox
\newsavebox\subtitleBox
\newsavebox\instituteBox
\newsavebox\authorBox
\newsavebox\dateBox
\sbox{\titleBox}{\usebeamercolor[fg]{title}\usebeamerfont{title}\inserttitle}
\ifx\insertsubtitle\@empty%
\sbox{\subtitleBox}{}
\else%
\sbox{\subtitleBox}{\usebeamercolor[fg]{subtitle}\usebeamerfont{subtitle}\insertsubtitle}
\fi%
\sbox{\instituteBox}{\usebeamercolor[fg]{institute}\usebeamerfont{institute}\insertinstitute}
\sbox{\authorBox}{\usebeamercolor[fg]{author}\usebeamerfont{author}\insertauthor}
\sbox{\dateBox}{\usebeamercolor[fg]{date}\usebeamerfont{date}\insertdate}
\newlength{\titleBoxWidth}
\newlength{\titleBoxInnerWidth}
\setlength{\titleBoxInnerWidth}{\maxof{\wd\titleBox}{\maxof{\wd\subtitleBox}{\maxof{\wd\instituteBox}{\maxof{\wd\authorBox}{\wd\dateBox}}}}}
\setlength{\titleBoxWidth}{\titleBoxInnerWidth}
\addtolength{\titleBoxWidth}{1cm}
\begin{textblock*}{\titleBoxWidth}(0.5cm,2.5cm)
\begin{beamercolorbox}[sep=2mm,leftskip=3mm,rightskip=3mm,wd=\titleBoxWidth,center]{title block body}
\begin{beamercolorbox}[sep=0pt,vmode,wd=\titleBoxInnerWidth,left]{}
\begin{beamercolorbox}[wd=\wd\titleBox]{title}
\begin{minipage}[b][24mm][b]{110mm} % <- adjust width or position here!!!
\usebeamercolor[fg]{title}\usebeamerfont{title}{\inserttitle\par}
\end{minipage}
\end{beamercolorbox}%
\ifx\insertsubtitle\@empty%
\else%
\vskip1mm
\begin{beamercolorbox}[wd=\wd\subtitleBox]{subtitle}
\usebox{\subtitleBox}%
\end{beamercolorbox}
\fi%
\vskip1mm
\begin{beamercolorbox}[wd=\wd\instituteBox]{institute}
\usebox{\instituteBox}%
\end{beamercolorbox}
\vskip7mm
\begin{beamercolorbox}[wd=\wd\authorBox]{author}
\usebox{\authorBox}%
\end{beamercolorbox}
\vskip1mm
\begin{beamercolorbox}[wd=\wd\dateBox]{date}
\usebox{\dateBox}%
\end{beamercolorbox}
\vskip0pt
\end{beamercolorbox}
\end{beamercolorbox}
\end{textblock*}
}
\addtobeamertemplate{frametitle}{\hspace*{0.5cm}}
\setbeamertemplate{blocks}[rounded][shadow=\beamer@themerounded@shadow]
\setbeamertemplate{items}[circle]
\setbeamertemplate{sections/subsections in toc}[circle]
\mode
<all>
答案3
我也使用带有长标题的相同模板 - 我通过进入名为“beamerfontthemetud.sty”的 sty. 文件并更改标题和副标题格式来修复它,使它们是同一个东西(标题被分成两个的错觉) - 这也保持了黑匣子的完整性!
请参阅以下更改(我已标记已更改的部分):
% TU Delft Beamer template
% Author: Maarten Abbink
% Delft Universiy of Technology
% March 2014
\mode<presentation>
\setbeamerfont{normal text}{family=\sffamily}
\setbeamerfont{structure}{family=\rmfamily}
\setbeamerfont{title}{series=\bfseries,size=\Large} % FIXED
\setbeamerfont{subtitle}{series=\bfseries,size=\Large} % FIXED
\setbeamerfont{institute}{parent=structure,series=\bfseries,size=\large}
\setbeamerfont{author}{size=\normalsize}
\setbeamerfont{date}{parent=author}
\setbeamerfont{frametitle}{series=\bfseries}
\setbeamerfont{section in toc}{parent=structure,family=\sffamily}
\setbeamerfont{block body}{parent=normal text}
\setbeamerfont{item}{parent=normal text}
\mode