0

I prepared the following source

\documentclass[10pt,fleqn,xcolor=svgnames]{beamer}

\setbeamercolor{background canvas}{bg=Green!10}
\setbeamercolor{frametitle}{fg=Brown,bg=Yellow!20}
\setbeamercolor{normal text}{bg=DarkBlue}

\mode<presentation>

\begin{document}
\begin{frame}
\frametitle{Bla Bla}

Bla bla

\end{frame}
\end{document}

with the following result:

enter image description here

I would like to modify a bit the yellow box of the frame title to be framed. I tried using the command \setbeamertemplate but unsuccessfully. It is probably something quite easy, and there are some tips in other topics, but I have not find a way and I'm probably too dumb with beamer! Sorry about that.

2
\documentclass[10pt,fleqn,xcolor=svgnames]{beamer}

\setbeamercolor{background canvas}{bg=Green!10}
\setbeamercolor{frametitle}{fg=Brown,bg=Yellow!20}
\setbeamercolor{normal text}{bg=DarkBlue}


\usepackage{tcolorbox}

\makeatletter

\setbeamertemplate{frametitle}{%
  \ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
  \@tempdima=\textwidth%
  \advance\@tempdima by\beamer@leftmargin%
  \advance\@tempdima by\beamer@rightmargin%
  \begin{tcolorbox}[colback=Yellow!20,coltext=Brown,enlarge left by=-\beamer@leftmargin,width=\paperwidth]
    \usebeamerfont{frametitle}%
    \vbox{}\vskip-1ex%
    \if@tempswa\else\csname beamer@fteleft\endcsname\fi%
    \strut\insertframetitle\strut\par%
    {%
      \ifx\insertframesubtitle\@empty%
      \else%
      {\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle\strut\par}%
      \fi
    }%
    \vskip-1ex%
    \if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...
  \end{tcolorbox}%
}

\makeatother

\begin{document}
\begin{frame}
\frametitle{Bla Bla}

Bla bla

\end{frame}
\end{document}

enter image description here

  • Thanks for the attempt. It is quite the think I had in mind, but the frame box should cover completely the page. I would modify your answer myself, but I have not completely understood it yet. – Logos Apr 10 '18 at 18:42
  • 1
    @Logos please see my edited answer – user36296 Apr 10 '18 at 19:24
  • now it's much better. Can you just remove the rounded corners? – Logos Apr 11 '18 at 13:14
  • @Logos Have a look at the documentation of the tcolorbox package – user36296 Apr 11 '18 at 13:17
  • 1
    @Logos You can adjust the appearance of the box by changing the line \begin{tcolorbox}[colback=Yellow!20,coltext=Brown,enlarge left by=-\beamer@leftmargin,width=\paperwidth] – user36296 Apr 11 '18 at 13:19

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.