自定义标题的问题

自定义标题的问题

我的幻灯片中有章节和子章节的名称,但我只想显示章节的名称。我该怎么做?

\documentclass[11pt,xcolor={dvipsnames}]{beamer}

\mode<presentation>{

  \usetheme{Warsaw}  
  \usecolortheme[named=OliveGreen]{structure}
  \useoutertheme{shadow}

   \setbeamercovered{transparent}

   \setbeamercolor{block title example}{fg=white,bg=Blue}
   \setbeamercolor{block body example}{fg=black,bg=Blue!10} 
   \setbeamercolor{postit}{fg=black,bg=OliveGreen!20}
   \setbeamercolor{postit2}{fg=yellow,bg=OliveGreen}
}

\usepackage[italian]{babel}
\usepackage[latin1]{inputenc}
\usepackage{times}

答案1

据我了解,您的问题是,您想删除子部分导航。这可以通过在标题定义中注释相应的行来实现:

\documentclass[11pt,xcolor={dvipsnames}]{beamer}

\mode<presentation>{
    \usetheme{Warsaw}  
    \usecolortheme[named=OliveGreen]{structure}
    \useoutertheme{shadow}

    \setbeamercovered{transparent}

    \setbeamercolor{block title example}{fg=white,bg=Blue}
    \setbeamercolor{block body example}{fg=black,bg=Blue!10} 
    \setbeamercolor{postit}{fg=black,bg=OliveGreen!20}
    \setbeamercolor{postit2}{fg=yellow,bg=OliveGreen}
}

\usepackage[italian]{babel}
\usepackage[latin1]{inputenc}
\usepackage{times}

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


\begin{document}

\section{section}
\subsection{subsection}
\begin{frame}
    abc
\end{frame} 

\end{document}

在此处输入图片描述

相关内容