为标题框提供与投影仪中其他框不同的背景

为标题框提供与投影仪中其他框不同的背景

我正在尝试title frame使用 来设计与其他框架不同的风格beamer

这是我的 MWE:

\documentclass[xcolor=dvipsnames]{beamer}
\usepackage[sfdefault]{atkinson}
\usepackage{microtype}
\usepackage{textpos}
\usepackage{tikz}
\usepackage{pgfornament}

\beamertemplatenavigationsymbolsempty

\title{The Patience Study}
\author[TeX User]{TeX User}
\institute{University of Kyoto}

\tikzset{
    position in page centre/.style={
        shift={(current page.south)}
    },
}

\setbeamercolor{frametitle}{fg=black}

%%%Titlepage
\makeatletter
\setbeamertemplate{title page}{
\begin{tikzpicture}[remember picture,overlay,position in page centre]
\node[] at (-5.5,8.75) {\pgfornament[width=1cm]{39}};
\node[] at (5.5,8.75) {\pgfornament[width=1cm]{40}};
%
\node[] at (-5.5,0.75) {\pgfornament[width=1cm, symmetry=h]{39}};
\node[] at (5.5,0.75) {\pgfornament[width=1cm, symmetry=h]{40}};
%

\end{tikzpicture}
    \centering
    \vfill
      \usebeamerfont{title}\inserttitle\par%
      \ifx\insertsubtitle\@empty%
      \else%
        \vskip0.1em%
        {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
      \fi%
      \vskip-0.4em\par
      \begin{tikzpicture}
      \pgfornament[width=1cm]{75};
      \end{tikzpicture}
    \vskip0.5em\par
      \usebeamerfont{author}\small\insertauthor\par
      \vskip1.2em%
      \usebeamerfont{institute}\insertinstitute\par
      \vskip0.1em%
    {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
    \vskip0.1em%
    {\scriptsize{\usebeamerfont{date}\insertdate}}
    \vfill
}
\makeatother

%%%Background
\setbeamertemplate{background}{%
\begin{tikzpicture}[remember picture,overlay,position in page centre]
\foreach \i in {-4,...,4}
\node[] at (\i,0.75) {\pgfornament[width=1cm]{70}};
\end{tikzpicture}
}%




\begin{document}

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


\begin{frame}
\frametitle{Introduction}
\framesubtitle{Basic Research Question}

\end{frame}

\end{document}

正常框架看起来就像这样,底部有一个装饰图形,正如预期的那样:

正常帧

然而,标题框的底部也有装饰图形,这是不受欢迎的:

标题框

如何独立于标题框设计框架背景?有类似的东西吗\setbeamertemplate{normal frame}

我确实查看了手册beamer,但找不到帮助(或者可能错过了)。

我还参考了大约 11 年前在此处发布的解决方案:投影机中标题和“正常”框架的不同背景,但它似乎不能很好地解决我的问题。pgfornaments框架上根本没有显示。

答案1

您可以使用与https://topanswers.xyz/tex?q=1004#a1198

\documentclass[xcolor=dvipsnames]{beamer}
\usepackage[sfdefault]{atkinson}
\usepackage{microtype}
\usepackage{textpos}
\usepackage{tikz}
\usepackage{pgfornament}

\beamertemplatenavigationsymbolsempty

\title{The Patience Study}
\author[TeX User]{TeX User}
\institute{University of Kyoto}

\tikzset{
    position in page centre/.style={
        shift={(current page.south)}
    },
}

\setbeamercolor{frametitle}{fg=black}

%%%Titlepage
\makeatletter
\setbeamertemplate{title page}{
\begin{tikzpicture}[remember picture,overlay,position in page centre]
\node[] at (-5.5,8.75) {\pgfornament[width=1cm]{39}};
\node[] at (5.5,8.75) {\pgfornament[width=1cm]{40}};
%
\node[] at (-5.5,0.75) {\pgfornament[width=1cm, symmetry=h]{39}};
\node[] at (5.5,0.75) {\pgfornament[width=1cm, symmetry=h]{40}};
%

\end{tikzpicture}
    \centering
    \vfill
      \usebeamerfont{title}\inserttitle\par%
      \ifx\insertsubtitle\@empty%
      \else%
        \vskip0.1em%
        {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
      \fi%
      \vskip-0.4em\par
      \begin{tikzpicture}
      \pgfornament[width=1cm]{75};
      \end{tikzpicture}
    \vskip0.5em\par
      \usebeamerfont{author}\small\insertauthor\par
      \vskip1.2em%
      \usebeamerfont{institute}\insertinstitute\par
      \vskip0.1em%
    {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
    \vskip0.1em%
    {\scriptsize{\usebeamerfont{date}\insertdate}}
    \vfill
}

\def\ps@navigation@titlepage{%
    \setbeamertemplate{background}{}
    \@nameuse{ps@navigation}}
\addtobeamertemplate{title page}{\thispagestyle{navigation@titlepage}}{}

\makeatother

%%%Background
\setbeamertemplate{background}{%
\begin{tikzpicture}[remember picture,overlay,position in page centre]
\foreach \i in {-4,...,4}
\node[] at (\i,0.75) {\pgfornament[width=1cm]{70}};
\end{tikzpicture}
}%




\begin{document}

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


\begin{frame}
\frametitle{Introduction}
\framesubtitle{Basic Research Question}

\end{frame}

\end{document}

相关内容