如何在 LaTeX 中删除 Szeged 中的第二条页眉和页脚条

如何在 LaTeX 中删除 Szeged 中的第二条页眉和页脚条

我想使用 LaTeX 中的 Szeged 主题制作 Beamer 演示文稿。问题是页眉中有三行,我想删除最后一行和下面的页脚

\documentclass[compress]{beamer}

\usetheme{Szeged}

\usecolortheme{default}
\usefonttheme{default}

\makeatletter
\setbeamertemplate{footline}{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor\expandafter\beamer@ifempty\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
    \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
    \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatother


\title[sd]{Title}
\author[d]{A:T \inst{1}\\B.T \inst{2}\\  C.A \inst{1}}
\date[sd]{xx.mm.yyyy}
 \institute[]{\inst{1}Something\\Somewhere\\ \inst{2} Something\\Somewhere}


\begin{document}

\begin{frame}
\titlepage
\end{frame}


\section{First Section}
\subsection{}
\begin{frame}
\frametitle{Hello}
\textbf{here we go}



\end{frame}

\end{document}

答案1

据我了解,您的需求是,您只想删除框架顶部的第三条水平线。

这是headlinebeamerthemelined.sty现有主题中获取的修改后的模板定义。

% arara: lwpdflatex
\documentclass[compress]{beamer}

\usetheme{Szeged}

\usecolortheme{default}
\usefonttheme{default}

\makeatletter
\setbeamertemplate{footline}{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor\expandafter\beamer@ifempty\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
    \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
    \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatother

% Taken from beamerthemelined.sty
\setbeamertemplate{headline}[text line]
{%
  \vbox{%
    \vskip3pt%
    \beamerline{\insertnavigation{\paperwidth}}%
    \vskip1.5pt%
    \insertvrule{2pt}{beamerstructure!50!averagebackgroundcolor}%
    \vskip1.5pt%
    \tinyline{\color{beamerstructure}\insertsubsection\hfill}
  }%
}


\title[sd]{Title}
\author[d]{A:T \inst{1}\\B.T \inst{2}\\  C.A \inst{1}}
\date[sd]{xx.mm.yyyy}
 \institute[]{\inst{1}Something\\Somewhere\\ \inst{2} Something\\Somewhere}


\begin{document}

\begin{frame}
\titlepage
\end{frame}


\section{First Section}
\subsection{}
\begin{frame}
\frametitle{Hello}
\textbf{here we go}



\end{frame}

\end{document}

在此处输入图片描述

相关内容