# Make a heading in beamer

I would like to have the ability to add "headings" to content in my beamer slides. By heading I just mean slightly larger text that automatically breaks the row and adds some margins to the surrounding text. Basically something that is exactly like the \section command when writing an article.

I have so far done this using the block environment like

\begin{block}{The heading}
The content goes here.
\end{block}


which worked with my previous theme since the block background was the same as the slide background. But in my new theme I want to have the usual colored boxes, so some other method is required.

I tried implementing a new headingblock environment that is basically a block environment with new colors:

\newenvironment{headingblock}[1]{%
\setbeamercolor{block body}{bg=white, fg=black}
\setbeamercolor{block title}{bg=white, fg=liu_blue}
\begin{block}{#1}}{\end{block}}


The problem is that everything else inside the block is affected by the \setbeamercolor calls which means I can't have another block inside the headingblock. Also it feels kind of hackish.

What is the best way to implement this?

Edit To be extra clear, I am not looking for a frame title, but subheadings within the frame. Something like:

\begin{frame}
\frametitle{The slide}

Some text and stuff that goes with the first heading

More stuff goes here.
\end{frame}

-
Welcome to TeX.sx! –  hpesoj626 Mar 12 at 8:50
Ok, I thought the \framesubtitle{...} command would solve this. But there can only be one subtitle to every frame... –  Dave Mar 12 at 9:40

You can define your own block structure in a similar way in which beamer defines exampleblock or alertblock, and set the block title and block body colors for this new block as desired. The original definitions can be found in the file beamerbaselocalstructure.sty. Here's a definition of such a block that you can adjust according to your needs:

\documentclass{beamer}

\begin{actionenv}#2%
\def\insertblocktitle{#1}%
\par%
\mode<presentation>{%
}%
\setbeamercolor{block title}{fg=orange,bg=structure}
%\setbeamercolor{block body}{fg=green,bg=orange} % to customize the colors of the block body
\usebeamertemplate{block begin}}
{\par%
\usebeamertemplate{block end}%
\end{actionenv}}

\begin{document}

\begin{frame}
Some test text.
\end{frame}

\end{document}


If you are not interested in a block and want something simpler, you can do something along the following lines (again, adjust the settings according to your needs):

\documentclass{beamer}

\par\bigskip
{\Large\bfseries#1}\par\smallskip}

\begin{document}

\begin{frame}
Some test text.