
Палитра выше имеет низкий пропуск, который выглядит уродливо. Как мы можем добавить небольшой отступ, как тот, который мы получаем с заголовками в одну строку?
\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» в качестве нисходящей буквы. Если вы хотите, чтобы все заголовки вели себя как во втором случае, вы можете добавить after \strut
в \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
Запустив ваш код, я получаю правильный padding. Однако вы можете использовать \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}