我正在使用 beamer 模板。由于字幕很长,我想减小字幕的行距。这是当前的行距:
虽然我对标题的行距感到满意,但副标题的行距太大。我在文件中找到了此代码.sty
,但无法确定在哪里调整行距。我尝试使用 强制换行\\
,但这对行距没有影响。
\setbeamertemplate{title page}{
\vskip0pt plus 1filll
\hspace{-12mm}
\begin{beamercolorbox}[wd=0.5\textwidth,sep=10pt,leftskip=8mm]{title}
{\usebeamerfont{title}\inserttitle}\\
{\usebeamerfont{subtitle}\insertsubtitle}\\
{\usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor}
{\usebeamerfont{date}\usebeamercolor[fg]{date}\insertdate}
\end{beamercolorbox}
}
答案1
标题页模板应该在切换到其他字体大小之前完成段落:
\documentclass{beamer}
\setbeamertemplate{title page}{
\vskip0pt plus 1filll
\hspace{-12mm}
\begin{beamercolorbox}[wd=0.5\textwidth,sep=10pt,leftskip=8mm]{title}
{\usebeamerfont{title}\inserttitle\par}
{\usebeamerfont{subtitle}\insertsubtitle\par}
{\usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor\par}
{\usebeamerfont{date}\usebeamercolor[fg]{date}\insertdate\par}
\end{beamercolorbox}
}
\setbeamerfont{title}{size=\huge}
\setbeamerfont{subtitle}{size=\fontsize{10}{11}\selectfont}% <- second number controls the line spacing
\author{names}
\title{text text text text text text text text text text text text text text }
\subtitle{text text text text text text text text text text text text text text }
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\end{document}