3

I am trying to make a custom beamer background using the pgfornaments package. I seem to be unable to position the images despite specifying the coordinates.

Here is my MWE:

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

\beamertemplatenavigationsymbolsempty

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

%%%Background
\setbeamertemplate{background}{%
\begin{tikzpicture}[remember picture, absolute]
\foreach \i in {4,5,6,...,10}
\node[] at (\i,0) {\pgfornament[width=1cm]{70}};
%
\foreach \i in {4,5,6,...,10}
\node[] at (\i,9) {\pgfornament[width=1cm]{70}};
\end{tikzpicture}
}%


%%%Titlepage
\makeatletter
\setbeamertemplate{title page}{
    \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

\begin{document}

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


\begin{frame}
\frametitle{Introduction}
\framesubtitle{Basic research question}

\end{frame}

\end{document}

Here is the corresponding output of the title page:

Test Image

In this example, despite stating the absolute coordinates in the tikz nodes, I am unable to centralise the ornaments. How do I go about positioning the elements using absolute positions on this beamer template.

1 Answer 1

2

I like to use this little trick taken from https://topanswers.xyz/tex?q=1989 to position the tikzpicture with respect to the page. This will place the origin of the picture at the bottom south of the page and you can arrange your nodes symmetrically by placing them from -x to x.

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

\beamertemplatenavigationsymbolsempty

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

% trick taken from https://topanswers.xyz/tex?q=1989
\tikzset{
    position in page centre/.style={
        shift={(current page.south)}
    },
}

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


%%%Titlepage
\makeatletter
\setbeamertemplate{title page}{
    \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

\begin{document}

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


\begin{frame}
\frametitle{Introduction}
\framesubtitle{Basic research question}

\end{frame}

\end{document}

enter image description here

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .