
上面的調色板有低跳過,看起來很醜。我們怎麼能像單行標題一樣添加一點填充呢?
\documentclass[aspectratio=169, xcolor={x11names}]{beamer}
\usecolortheme{seahorse}
\useoutertheme[]{split}
\useinnertheme{inmargin}
\newlength{\widthTextMarginLeft}
\setlength{\widthTextMarginLeft}{1.5mm}
\newlength{\widthTextMarginRight}
\setlength{\widthTextMarginRight}{2mm}
\setbeamersize{text margin left=\widthTextMarginLeft, text margin right=\widthTextMarginRight}
\newlength{\sidebarWidth}
\setlength{\sidebarWidth}{0.3\paperwidth}
\setbeamersize{sidebar width left=\sidebarWidth, sidebar width right=0cm}
\begin{document}
\begin{frame}{Uncovering Contents When They Cannot Fit in One Slide}
\end{frame}
\end{document}
答案1
「問題」是您的第一個標題「One Slide」的最後一行不包含任何降序字母,而「Uncovering Contents」則將「g」作為降序字母。如果您希望所有標題都像第二種情況一樣,您可以在範本定義中新增\strut
after :\insertframetitle
\documentclass[aspectratio=169, xcolor={x11names}]{beamer}
\usecolortheme{seahorse}
\useoutertheme[]{split}
\useinnertheme{inmargin}
\newlength{\widthTextMarginLeft}
\setlength{\widthTextMarginLeft}{1.5mm}
\newlength{\widthTextMarginRight}
\setlength{\widthTextMarginRight}{2mm}
\setbeamersize{text margin left=\widthTextMarginLeft, text margin right=\widthTextMarginRight}
\newlength{\sidebarWidth}
\setlength{\sidebarWidth}{0.3\paperwidth}
\setbeamersize{sidebar width left=\sidebarWidth, sidebar width right=0cm}
\makeatletter
\setbeamertemplate{frametitle}{%
\ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
\@tempdima=\textwidth%
\advance\@tempdima by\beamer@leftmargin%
\advance\@tempdima by\beamer@rightmargin%
\begin{beamercolorbox}[sep=0.3cm,left,wd=\the\@tempdima]{frametitle}
\usebeamerfont{frametitle}%
\vbox{}\vskip-1ex%
\if@tempswa\else\csname beamer@fteleft\endcsname\fi%
\strut\insertframetitle\strut\par%
{%
\ifx\insertframesubtitle\@empty%
\else%
{\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\strut\insertframesubtitle\par}%
\fi
}%
\vskip-1ex%
\if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...
\end{beamercolorbox}%
}
\makeatother
\begin{document}
\begin{frame}{Uncovering Contents When They Cannot Fit in One Slide}
\end{frame}
\end{document}
答案2
運行你的程式碼,我得到了正確的填充。但是您可以\vspace
在內容末尾使用:
\documentclass[aspectratio=169, xcolor={x11names}]{beamer}
\usecolortheme{seahorse}
\useoutertheme[]{split}
\useinnertheme{inmargin}
\newlength{\widthTextMarginLeft}
\setlength{\widthTextMarginLeft}{1.5mm}
\newlength{\widthTextMarginRight}
\setlength{\widthTextMarginRight}{2mm}
\setbeamersize{text margin left=\widthTextMarginLeft, text margin right=\widthTextMarginRight}
\newlength{\sidebarWidth}
\setlength{\sidebarWidth}{0.3\paperwidth}
\setbeamersize{sidebar width left=\sidebarWidth, sidebar width right=0cm}
\begin{document}
\begin{frame}{Uncovering Contents When They Cannot Fit in One Slide\vspace{0.2cm}}
\end{frame}
\end{document}