更改 Beamer 模板样式

更改 Beamer 模板样式

我正在使用在网页上找到的以下 Beamer 模板:

http://recherche.noiraudes.net/en/LaTeX.php

(即样式文件beamercolorthemeprogressbarbeamerfontthemeprogressbarbeamerinnerthemeprogressbarbeamerouterthemeprogressbarbeamerthemeprogressbar)。我想删除第二张(以及接下来的几张)幻灯片“第 1 章”中的圆框,并将其替换为第一张幻灯片上出现的左侧透明顶部标题“第 1 章”(没有圆框)。我该怎么做?主文件是:

\documentclass[10pt,unknownkeysallowed]{beamer}

\mode<article> % only for the article version
{
  \usepackage{fullpage}
  \usepackage{hyperref}
}


\mode<presentation>
{
  %\setbeamertemplate{background canvas}[vertical shading][bottom=red!10,top=blue!10]
  \setbeamercovered{transparent}
  \usetheme{progressbar}
  \usefonttheme{serif}
  %\usecolortheme{crane}

}

\usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade}
\usepackage{colortbl}
\usepackage{amstext,amssymb,amsmath,amsfonts,amsthm,amsbsy}
\usepackage{mathtools}
%\usepackage{epstopdf}
\usepackage{enumerate}
\usepackage{boxedminipage}

\setbeamercovered{dynamic}

\setbeamertemplate{items}[circle]

\title[]{Title}

\author{\parbox[t]{10.0cm}{\vfill \hfill\hbox{}{\bf Chapter 1} \hfill\hbox{} \vfill}}

\date{{\footnotesize Author}}

\begin{document}

% Slide 1

\begin{frame}

\maketitle

\end{frame}

% Slide 2

\begin{frame}

\section[Chapter 1]{Chapter}

\subsection[My section]{My section}

\textbf{Section.} \\
This is my section.

\end{frame}

\end{document} 

非常感谢。请参阅以下屏幕截图 在此处输入图片描述

答案1

您可以注释掉该行\draw[rounded corners=3pt, draw=structure.fg!80!bg] (-0.5\progressbar@sectionboxwidth, 0pt) rectangle (0.5\progressbar@sectionboxwidth, \progressbar@sectionboxheight);以删除边框:

\documentclass[10pt,unknownkeysallowed]{beamer}

\mode<article> % only for the article version
{
  \usepackage{fullpage}
  \usepackage{hyperref}
}


\mode<presentation>
{
  %\setbeamertemplate{background canvas}[vertical shading][bottom=red!10,top=blue!10]
  \setbeamercovered{transparent}
  \usetheme{progressbar}
  \usefonttheme{serif}
  %\usecolortheme{crane}

}

\usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade}
\usepackage{colortbl}
\usepackage{amstext,amssymb,amsmath,amsfonts,amsthm,amsbsy}
\usepackage{mathtools}
%\usepackage{epstopdf}
\usepackage{enumerate}
\usepackage{boxedminipage}

\setbeamercovered{dynamic}

\setbeamertemplate{items}[circle]

\title[]{Title}

\author{\parbox[t]{10.0cm}{\vfill \hfill\hbox{}{\bf Chapter 1} \hfill\hbox{} \vfill}}

\date{{\footnotesize Author}}


\makeatletter
\usesectionheadtemplate
  {\hfill
    \setbox\progressbar@sectionbox=\hbox{\insertsectionhead}%
    \progressbar@sectionboxwidth=\wd\progressbar@sectionbox
    \advance\progressbar@sectionboxwidth by 4pt
    \setbox\progressbar@sectionbox=\hbox{\pgfinterruptpicture t \endpgfinterruptpicture}%
    \progressbar@sectionboxheight=\ht\progressbar@sectionbox
    \advance\progressbar@sectionboxheight by 4pt
    \begin{tikzpicture}
      \useasboundingbox (-0.5\progressbar@sectionboxwidth, 0pt) rectangle (0.5\progressbar@sectionboxwidth, \progressbar@sectionboxheight);
      \draw[anchor=base] (0pt, 2pt) node {\color{structure.fg!80!bg} \insertsectionhead};
%      \draw[rounded corners=3pt, draw=structure.fg!80!bg] (-0.5\progressbar@sectionboxwidth, 0pt) rectangle (0.5\progressbar@sectionboxwidth, \progressbar@sectionboxheight);
    \end{tikzpicture}
  }
  {\hfill
    \setbox\progressbar@sectionbox=\hbox{\pgfinterruptpicture\insertsectionhead\endpgfinterruptpicture}%
    \progressbar@sectionboxwidth=\wd\progressbar@sectionbox
    \advance\progressbar@sectionboxwidth by 4pt
    \setbox\progressbar@sectionboxbox=\hbox{\pgfinterruptpicture t \endpgfinterruptpicture}%
    \progressbar@sectionboxheight=\ht\progressbar@sectionboxbox
    \advance\progressbar@sectionboxheight by 4pt
    \begin{tikzpicture}
      \useasboundingbox (-0.5\progressbar@sectionboxwidth, 0pt) rectangle (0.5\progressbar@sectionboxwidth, \progressbar@sectionboxheight);
      \draw[anchor=base] (0pt, 2pt) node {\color{structure.fg!50!bg} \insertsectionhead};
    \end{tikzpicture}
  }
\makeatother

\begin{document}

% Slide 1

\begin{frame}

\maketitle

\end{frame}

% Slide 2

\begin{frame}

\section[Chapter 1]{Chapter}

\subsection[My section]{My section}

\textbf{Section.} \\
This is my section.

\end{frame}

\end{document} 

在此处输入图片描述

相关内容