我在乳胶中使用马尔堡主题来用垂直条显示我的部分。
在专门针对标题的第一页中,我想删除保留顶部和底部栏的栏。
我知道该选项plain
会删除侧边栏,但这会删除所有栏。
你知道我怎样才能实现我的目标吗?
我的代码:
\documentclass[hyperref={pdftex}]{beamer}
\useoutertheme{shadow}
\usetheme[left]{Marburg}
\definecolor{ceruleanblue}{rgb}{0.16, 0.32, 0.75}
\definecolor{caribbeangreen}{rgb}{0.0, 0.8, 0.6}
\definecolor{darkpastelgreen}{rgb}{0.01, 0.75, 0.24}
\setbeamertemplate{sidebar canvas left}[vertical shading][top=ceruleanblue,middle=darkpastelgreen,bottom=ceruleanblue]
\colorlet{titleleft}{ceruleanblue}
\colorlet{titlemiddle}{darkpastelgreen}
\colorlet{titleright}{ceruleanblue}
\pgfdeclarehorizontalshading[titleleft,titlemiddle,titleright]
{beamer@frametitleshade}{\paperheight}{
color(0pt)=(titleleft);
color(0.6\paperwidth)=(titlemiddle);
color(\paperwidth)=(titleright)
}
\title[aa]{aa}
\date{\today}
\setbeamerfont{title}{size=\Large, series=\bf}
\setbeamerfont{subtitle}{size=\large}
\setbeamerfont{institute}{size=\small}
\setbeamerfont{date}{size=\footnotesize}
\author[bla]
{
\textbf{bla}\inst{1}, bla\inst{2}, bla\inst{3}}
\institute[]
{
\inst{1 }bla \\
\inst{2 }bla\\
\inst{ 3}bla
}
\setbeamercolor{author in head/foot}{parent=palette primary,bg=}
\setbeamercolor{title in head/foot}{parent=palette secondary,bg=}
\setbeamercolor{date in head/foot}{parent=palette tertiary,bg=}
\setbeamercolor{section in head/foot}{parent=palette primary,bg=}
\setbeamercolor{subsection in head/foot}{parent=palette secondary,bg=}
\makeatletter
\setbeamertemplate{footline}
{
\leavevmode%
\setbox\beamer@tempbox=\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}%
}%
\beamer@tempdim=\ht\beamer@tempbox%
\advance\beamer@tempdim by 4pt%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{20pt}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
\pgfusepath{clip}
\pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}}
\end{pgfpicture}
\vskip-\beamer@tempdim%
\box\beamer@tempbox%
}%
\setbeamertemplate{headline}
{
\leavevmode%
\setbox\beamer@tempbox=\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,right]{section in head/foot}%
\usebeamerfont{section in head/foot}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,left]{subsection in head/foot}%
\usebeamerfont{subsection in head/foot}
\end{beamercolorbox}%
}%
\beamer@tempdim=\ht\beamer@tempbox%
\advance\beamer@tempdim by 4pt%
\vskip-\beamer@tempdim%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{20pt}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
\pgfusepath{clip}
\pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}}
\end{pgfpicture}
\vskip-\beamer@tempdim%
\box\beamer@tempbox%
\vskip0pt%
}
\begin{document}
\begin{frame}
\begin{titlepage}
\end{titlepage}
\end{frame}
\section{ble}
\subsection{bla}
\begin{frame}{Slide 1}
Content
\end{frame}
\end{document}
答案1
您可以暂时重新定义sidebar canvas left
和sidebar left
模板:
\documentclass[hyperref={pdftex}]{beamer}
\useoutertheme{shadow}
\usetheme[left]{Marburg}
\definecolor{ceruleanblue}{rgb}{0.16, 0.32, 0.75}
\definecolor{caribbeangreen}{rgb}{0.0, 0.8, 0.6}
\definecolor{darkpastelgreen}{rgb}{0.01, 0.75, 0.24}
\setbeamertemplate{sidebar canvas left}[vertical shading][top=ceruleanblue,middle=darkpastelgreen,bottom=ceruleanblue]
\colorlet{titleleft}{ceruleanblue}
\colorlet{titlemiddle}{darkpastelgreen}
\colorlet{titleright}{ceruleanblue}
\pgfdeclarehorizontalshading[titleleft,titlemiddle,titleright]
{beamer@frametitleshade}{\paperheight}{
color(0pt)=(titleleft);
color(0.6\paperwidth)=(titlemiddle);
color(\paperwidth)=(titleright)
}
\title[aa]{aa}
\date{\today}
\setbeamerfont{title}{size=\Large, series=\bf}
\setbeamerfont{subtitle}{size=\large}
\setbeamerfont{institute}{size=\small}
\setbeamerfont{date}{size=\footnotesize}
\author[bla]
{
\textbf{bla}\inst{1}, bla\inst{2}, bla\inst{3}}
\institute[]
{
\inst{1 }bla \\
\inst{2 }bla\\
\inst{ 3}bla
}
\setbeamercolor{author in head/foot}{parent=palette primary,bg=}
\setbeamercolor{title in head/foot}{parent=palette secondary,bg=}
\setbeamercolor{date in head/foot}{parent=palette tertiary,bg=}
\setbeamercolor{section in head/foot}{parent=palette primary,bg=}
\setbeamercolor{subsection in head/foot}{parent=palette secondary,bg=}
\makeatletter
\setbeamertemplate{footline}
{
\leavevmode%
\setbox\beamer@tempbox=\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}%
}%
\beamer@tempdim=\ht\beamer@tempbox%
\advance\beamer@tempdim by 4pt%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{20pt}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
\pgfusepath{clip}
\pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}}
\end{pgfpicture}
\vskip-\beamer@tempdim%
\box\beamer@tempbox%
}%
\setbeamertemplate{headline}
{
\leavevmode%
\setbox\beamer@tempbox=\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,right]{section in head/foot}%
\usebeamerfont{section in head/foot}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,left]{subsection in head/foot}%
\usebeamerfont{subsection in head/foot}
\end{beamercolorbox}%
}%
\beamer@tempdim=\ht\beamer@tempbox%
\advance\beamer@tempdim by 4pt%
\vskip-\beamer@tempdim%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{20pt}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
\pgfusepath{clip}
\pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}}
\end{pgfpicture}
\vskip-\beamer@tempdim%
\box\beamer@tempbox%
\vskip0pt%
}
\begin{document}
{
\setbeamertemplate{sidebar left}{}
\setbeamertemplate{sidebar canvas left}{}
\begin{frame}
\hspace{-.5\beamersidebarwidth}
\begin{minipage}{\linewidth}
\maketitle
\end{minipage}
\end{frame}
}
\section{ble}
\subsection{bla}
\begin{frame}{Slide 1}
Content
\end{frame}
\end{document}