2

I want my frame title background to fit the title, and to manually set the padding (e.g. like in CSS). In this example, this means that I want the background inside the red border to be orange, and the rest of the frame background to be white.

example

Code of the example:

\documentclass{beamer}

\setbeamercolor{frametitle}{fg=white, bg=orange}

\begin{document}
  \begin{frame}[plain]{This is my frame}
    Lore impsum dolor sit amet...
  \end{frame}
\end{document}

Any idea? Thanks a lot!

1
  • Welcome to TeX.SE!
    – Mensch
    Sep 4, 2022 at 15:31

1 Answer 1

1

You could redefine the frametitle template to something like this:

\documentclass{beamer}

\setbeamercolor{frametitle}{fg=white, bg=orange}

\setbeamertemplate{frametitle}{\colorbox{frametitle.bg}{\usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}\insertframetitle}}

\begin{document}
  \begin{frame}[plain]{This is my frame}
    Lore impsum dolor sit amet...
  \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 .