[Tex/LaTex] How to add block title section and color without the title in beamer

beamerblock

When I empty the block title in beamer it doesn't show the green color in Madrid theme. I want to get this color although when I empty the title as well as when give a title.

Best Answer

You could add \relax as title and if needed, also as subtitle:

\documentclass[]{beamer}

\usetheme{Madrid}

\begin{document}
\begin{frame}{\relax}%>>>
  No title in Madrid.
\end{frame}%<<<

\begin{frame}{\relax}{\relax}%>>>
  No title in Madrid.
\end{frame}%<<<

\end{document}

enter image description here

\relax doesn't work for a block environment. But for this you could use \strut or (if that is to big) \phantom{phantom Title} or something like that.

\documentclass[]{beamer}

\usetheme{Madrid}

\begin{document}
\begin{frame}{\relax}%>>>
  No title in Madrid.
  \begin{block}{\phantom{Tp}}
    Block without Title
  \end{block}
\end{frame}%<<<

\begin{frame}{\relax}{\relax}%>>>
  No title in Madrid.
\end{frame}%<<<

\end{document}

enter image description here