6

How to change the beamer frame title to be like this

enter image description here

What I did till now (I want the background color as in my code):

\documentclass{beamer}
\usepackage{tikz}
\usetheme{CambridgeUS}

\begin{document}

\setbeamertemplate{background canvas}[vertical shading][top=red!5,bottom=blue!15]{

\begin{frame}{}

\begin{tikzpicture}[remember picture,overlay]
\node[anchor= north east,xshift=0cm,yshift=-0.8cm] at (current page.north){
     \begin{tikzpicture}[remember picture,overlay]%\tikz[overlay]
     \draw[fill=blue!15,line width=2pt] (-2,-1.3) rectangle (2,0.3);
     \draw[fill=blue!15,line width=2pt] (-1.8,-1.1) rectangle (1.8,0.1); 
     \node[] at (1,-0.2) {\Large Conclusions}; 
     \fill[color=red!5] (2.1,0.4) circle (0.6cm);
     \fill[color=red!5] (-2.1,-1.4) circle (0.6cm);
     \fill[color=red!5] (2.1,-1.3) circle (0.6cm);
     \fill[color=red!5] (-2.1,-0.1) circle (0.6cm);
    % \draw[step=.1cm,gray,very thin] (-2.5,-2.5) grid (2.5,2.5);
     \end{tikzpicture}
     };
\end{tikzpicture}


\end{frame}  
}
\end{document}
  • So what's the question exactly? If this is causing problems, I'm not surprised. Don't nest tikzpicture environments. – cfr May 24 '16 at 23:53
5

This avoids nesting tikzpictures and uses \setbeamertemplate correctly. It also provides the basis for the desired design. Tweaks and enhancements are left as an exercise for the reader.

Note, in particular, that variable width lines are really not TikZ's cup of tea. If these are considered essential, consider an alternative approach. (There are a couple of answers which coerce TikZ into approximating this, but the price is high and the results are never going to be entirely satisfactory. Better pick the right tool for the job and use TikZ for what it is designed for.)

\documentclass{beamer}
\usepackage{tikz}
\usetheme{CambridgeUS}
\usetikzlibrary{calc}
\usepackage[T1]{fontenc}
\DeclareRobustCommand{\zapfstyle}{%
  \fontencoding{T1}%
  \fontseries{mb}%
  \fontshape{it}%
  \fontfamily{pzc}%
  \selectfont}
\begin{document}
\setbeamertemplate{background canvas}[vertical shading][top=red!5,bottom=blue!15]
\begin{frame}{}
  \begin{tikzpicture}
    [
      remember picture,
      overlay,
      ribbon width/.store in=\ribbonwidth,
      edging width/.store in=\edgingwidth,
      edging colour/.store in=\edgingcolour,
      ribbon colour/.store in=\ribboncolour,
      ribbon width=5mm,
      edging width=1pt,
      edging colour=red!5!gray!75!blue!25,
      ribbon colour=gray!25!red!5!white,
    ]
    \node (c) [anchor=north, font=\zapfstyle\Large, inner sep=\ribbonwidth+1mm] at ([yshift=-8mm]current page.north) {Conclusions};
    \begin{scope}
      \clip ([xshift=-\ribbonwidth]c.north east) coordinate (a1) arc (180:270:\ribbonwidth) coordinate (a2) -- ([yshift=\ribbonwidth]c.south east) coordinate (a3) arc (90:180:\ribbonwidth) coordinate (a4) -- ([xshift=\ribbonwidth]c.south west) coordinate (a5) arc (0:90:\ribbonwidth) coordinate (a6) -- ([yshift=-\ribbonwidth]c.north west) coordinate (a7) arc (270:360:\ribbonwidth) coordinate (a8) -- cycle;
      \path [fill=\ribboncolour, even odd rule] (c.north east) rectangle (c.south west) ($(c.north east)+(-135:\ribbonwidth)$) coordinate (c1) rectangle ($(c.south west)+(45:\ribbonwidth)$) coordinate (c2);
      \draw [draw=\edgingcolour, opacity=.5] (c1) rectangle (c2);
    \end{scope}
    \begin{scope}
      \clip ([xshift=2.5*\edgingwidth,yshift=2.5*\edgingwidth]c.north east) rectangle  ([xshift=-2.5*\edgingwidth,yshift=-2.5*\edgingwidth]c.south west);
      \draw [draw=\edgingcolour, opacity=.75, line width=\edgingwidth] (a1) -- (a8) (a2) -- (a3) (a4) -- (a5) (a6) -- (a7) \foreach \i [count=\j, evaluate=\j as \k using 90*\j-45] in {north east, north west, south west, south east} {($(c.\i)+(\k:.5\edgingwidth)$) circle (\ribbonwidth)}  ;
    \end{scope}
  \end{tikzpicture}
\end{frame}
\end{document}

fancy title frame

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.