Beamer,调整顶部/底部线的分隔符

Beamer,调整顶部/底部线的分隔符

我想调整华沙主题的投影仪幻灯片顶部和底部的分隔线(左侧),以便分隔线右侧有更多空间。可以吗?

最小工作示例:

    \documentclass[slidestop,compress,11pt]{beamer}
    \mode<presentation> {
        \usetheme{Warsaw}
    }
    \title[Test]{Test }
    \begin{document}
    \section{section1}
    \subsection{subsection1}
    \begin{frame}
    \end{frame}
    \subsection{subsection2}
    \begin{frame}
    \end{frame}
    \end{document}

答案1

beamercolorbox通常情况下, es的宽度wd=.5\paperwidth适用于两侧。在下面的例子中,我将它们移至.3并且.7[导航元素的宽度必须以相同的方式更改]

\documentclass[slidestop,compress,11pt]{beamer}
\mode<presentation>{
    \usetheme{Warsaw}
}
\title[Test]{Test}

\makeatletter
\setbeamertemplate{headline}{%
  \leavevmode%
  \begin{beamercolorbox}[wd=.3\paperwidth,ht=2.5ex,dp=1.125ex]{section in head/foot}%
    \insertsectionnavigationhorizontal{.3\paperwidth}{\hskip0pt plus1filll}{}%
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.7\paperwidth,ht=2.5ex,dp=1.125ex]{subsection in head/foot}%
    \insertsubsectionnavigationhorizontal{.7\paperwidth}{}{\hskip0pt plus1filll}%
  \end{beamercolorbox}%
}

\setbeamertemplate{footline}{%
  \leavevmode%
  \hbox{\begin{beamercolorbox}[wd=.3\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm plus1fill,rightskip=.3cm]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.7\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
  \end{beamercolorbox}}%
  \vskip0pt%
}

\makeatother

\begin{document}
\section{section1}
\subsection{subsection1}
\begin{frame}
\end{frame}
\subsection{subsection2}
\begin{frame}
\end{frame}
\end{document}

在此处输入图片描述

相关内容